// 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() { #pragma warning disable CS0618 // 형식 또는 멤버는 사용되지 않습니다. stagename = Application.loadedLevelName; #pragma warning restore CS0618 // 형식 또는 멤버는 사용되지 않습니다. rigid = GetComponent <Rigidbody>(); //다른컴포넌트 받아오기위한 선언 pl = GameObject.Find("Play").GetComponent <Play>(); _vector = GameObject.Find("Initial").GetComponent <Initial>(); if (GameObject.Find("Score")) { sc = GameObject.Find("Score").GetComponent <Score>(); } 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>(); } Blinkingobject = new List <GameObject>(); Movingobject = new List <GameObject>(); color_list = new List <Color>(); tile = new List <GameObject[]>(); itemPos = new Vector3[10]; // 텍스트 설정 if (!(stagename.Substring(0, 5) == "Guide")) { PlayText = GameObject.Find("PlayCount").GetComponent <Text>(); LineText = GameObject.Find("LineCount").GetComponent <Text>(); ForText = GameObject.Find("ForCount").GetComponent <Text>(); FuncText = GameObject.Find("FuncCount").GetComponent <Text>(); IfText = GameObject.Find("IfCount").GetComponent <Text>(); CodeText = GameObject.Find("Code").GetComponent <Text>(); bestCode = GameObject.Find("BestCode").GetComponent <Text>(); frequencyCode = GameObject.Find("FrequencyCode").GetComponent <Text>(); } popCanvas = GameObject.Find("ClearPopUp").GetComponent <Canvas>(); }