// Use this for initialization void Start() { shakeScreenObj = GameObject.Find("Main Camera"); shakeScreenScript = shakeScreenObj.GetComponent<ShakeScreen>(); attackAudioObj = GameObject.Find("AttackAudios"); attackAudioScript = attackAudioObj.GetComponent<attackAudio>(); scoreObj = GameObject.Find("Kill"); scoreScript = scoreObj.GetComponent<ScoreManager>(); }
// Use this for initialization void Start() { animationTest = this.GetComponent<SkeletonAnimation>(); m_transform = this.transform; gameOverObj = GameObject.Find("GameOver"); gameOverScript = gameOverObj.GetComponent<GameOver>(); furyBarObj = GameObject.Find("FuryBar"); furyBarScript = furyBarObj.GetComponent<FuryBarManager>(); enemyManagerObj = GameObject.Find("EnemyCreator"); enemyManagerScript = enemyManagerObj.GetComponent<EnemyManager>(); //mainScreenObj = GameObject.Find("MainCamera"); shakeScreenScript = mainScreenObj.GetComponent<ShakeScreen>(); attackAudioObj = GameObject.Find("AttackAudios"); attackAudioScript = attackAudioObj.GetComponent<attackAudio>(); AudioObj = GameObject.Find("Audios"); m_audioManager = AudioObj.GetComponent<AudioManager>(); scoreManagerObj = GameObject.Find("Kill"); m_scoreManager = scoreManagerObj.GetComponent<ScoreManager>(); minPosX = Screen.width / 16f * 6.5f; maxPosX = Screen.width / 16f * 9f; minPosY = Screen.height / 16f * 6.5f; maxPosY = Screen.height / 16f * 9f; animationTest.state.Event += Event; animationTest.state.End += state_End; //animationTest.state.End += (state, trackIndex) => //{ // Debug.Log("start: " + state.GetCurrent(trackIndex)); //}; //animationTest.state.End += ActionChange; }