void Start() { m_gameController = GameObject.FindGameObjectWithTag(GameConsts.TAG_GAME_CONTROLLER).GetComponent <GameController>(); m_gameController.AddListener(this); MyPlayer player = GameObject.FindGameObjectWithTag(GameConsts.TAG_PLAYER).GetComponent <MyPlayer>(); m_shawlController = player.GetComponentInChildren <ShawlController>(); m_occluder = GetComponentInChildren <ObstaclesOccluder>(); }
void Awake() { m_audioSource = GetComponent <AudioSource>(); m_animator = GetComponentInChildren <Animator>(); m_shawlController = GetComponentInChildren <ShawlController>(); }