void Start() { homingObject = GameObject.FindGameObjectWithTag(tagName).transform; smoothFollowScript = GetComponent <SmoothFollowOrig> (); smoothFollowScript.target = homingObject.transform; if (homingObject == null || homingObject.transform == null) { Destroy(gameObject); } }
void Start() { homingObject = GameObject.FindGameObjectWithTag (tagName).transform; smoothFollowScript = GetComponent<SmoothFollowOrig> (); smoothFollowScript.target = homingObject.transform; if (homingObject == null || homingObject.transform == null) { Destroy (gameObject); } }
void FindComponents() { gameControllerScript = GameObject.FindGameObjectWithTag ("GameController").GetComponent<GameController>(); Brain = GameObject.Find ("Brain"); boss = GameObject.FindGameObjectWithTag ("Boss"); bossHover = GameObject.Find ("EnemyBossRestPoint").GetComponent<Transform> (); NameText = GameObject.Find ("BossTextText").GetComponent<Text> (); BossTextObject.GetComponentInChildren<Animator> ().Play (0); smoothFollowScript = GetComponent<SmoothFollowOrig> (); smoothFollowScript.target = bossHover.transform; }
void FindComponents() { gameControllerScript = GameObject.FindGameObjectWithTag("GameController").GetComponent <GameController>(); Brain = GameObject.Find("Brain"); boss = GameObject.FindGameObjectWithTag("Boss"); bossHover = GameObject.Find("EnemyBossRestPoint").GetComponent <Transform> (); NameText = GameObject.Find("BossTextText").GetComponent <Text> (); BossTextObject.GetComponentInChildren <Animator> ().Play(0); smoothFollowScript = GetComponent <SmoothFollowOrig> (); smoothFollowScript.target = bossHover.transform; }
void FindComponents() { playerControllerScript = GameObject.Find("Player").GetComponent <PlayerController> (); smoothFollowScript = GetComponent <SmoothFollowOrig> (); player = GameObject.Find("Player").transform; }
void FindComponents() { playerControllerScript = GameObject.Find ("Player").GetComponent<PlayerController> (); smoothFollowScript = GetComponent<SmoothFollowOrig> (); player = GameObject.Find ("Player").transform; }