void AddWave() { MainSoundSrc.PlaySound("airplane"); airplane.GetComponent <Animator>().Play("AirplaneFly", -1, 0f); bird.GetComponent <Animator>().Play("bird_airplane", -1, 0f); timer = Game3_LvlingStat.GetLvling().airplaneDelayed; GameObject gobj = new GameObject("Wave"); ParashootWave wave = gobj.AddComponent <ParashootWave>(); wave.SetupWave(gameplayItem); }
// Update is called once per frame void Update() { if (pGlobal.gController.state == GameState.GS_PLAY) { timer -= Time.deltaTime; //popup airplane and delayed if (timer <= 0) { timer += Game3_LvlingStat.GetLvling().airplaneDelayed; AddWave(); } } }
void Awake() { lvling = Game3_LvlingStat.GetLvling(); IsPerfect = true; }