You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
569 B
26 lines
569 B
using System.Collections; |
|
using System.Collections.Generic; |
|
using UnityEngine; |
|
|
|
public class ControlStair : MonoBehaviour { |
|
|
|
public int cengID; |
|
public string TheName; |
|
private void Start() |
|
{ |
|
cengID = GetFloorID(); |
|
TheName = GetName(); |
|
} |
|
|
|
public int GetFloorID() |
|
{ |
|
int ID = transform.parent.GetChild(0).GetComponent<CengID>().cengID; |
|
return ID; |
|
} |
|
public string GetName() |
|
{ |
|
string Num = transform.parent.name.Substring(3); |
|
string Name = "Cube" + Num; |
|
return Name; |
|
} |
|
}
|
|
|