// Use this for initialization void Awake() { //다른컴포넌트 받아오기위한 선언 _vector = GameObject.Find("Initial").GetComponent <Initial>(); move = GameObject.Find("Character").GetComponent <Move>(); ifpop = GameObject.Find("ColorField").GetComponent <IfPopUp>(); ft = GameObject.Find("Map").GetComponent <FindTile>(); if (GameObject.FindWithTag("BlinkingObstacle")) { bo = GameObject.FindWithTag("BlinkingObstacle").GetComponent <BlinkingObstacle>(); } if (GameObject.FindWithTag("MovingObstacle")) { mo = GameObject.FindWithTag("MovingObstacle").GetComponent <MovingObstacle>(); } startPos = GameObject.Find("Character").transform.position; //처음위치를 기억한다. flow = GameObject.Find("Flow").GetComponent <RawImage>(); if (GameObject.Find("StepText")) { StepText = GameObject.Find("StepText").GetComponent <Text>(); } #pragma warning disable CS0618 // 형식 또는 멤버는 사용되지 않습니다. stagename = Application.loadedLevelName; #pragma warning restore CS0618 // 형식 또는 멤버는 사용되지 않습니다. }
/*초기화*/ void Awake() { pl = GameObject.Find("Play").GetComponent <Play>(); _vector = GameObject.Find("Initial").GetComponent <Initial>(); //다른컴포넌트 받아오기위한 선언 ifpop = GameObject.Find("ColorField").GetComponent <IfPopUp>(); plus = new Vector3(55, 0, 0); inVector = false; /*불필요하긴한데 혹시모르니 해주는 초기화*/ tname = "MainTab"; list = _vector.vector; listDst = _vector.vectorDst; }