public void Balance(List <Vector3> map, bool IgnoreBalanceIsZero = false) { var Balance = Level1_DB.UFOList.Count - map.Count; //多(少)幾台 //extra if (Balance > 0) { UFO.DestroyUFO(Balance); //Destroy幾台 } //lack if (Balance < 0) { UFO.InstantiateUFOs(Mathf.Abs(Balance)); //實例化UFO } //重設場上所有UFO座標 if (!DB.start || !IgnoreBalanceIsZero) { for (int i = 0; i < map.Count; i++) { Level1_DB.UFOList [i].moveTo(1f, (Vector3)map [i], true, 0.1f); } } }
public override void Again(string str) { base.Again(str); UFO.DestroyUFO(Level1_DB.UFOList.Count, 1f); //清空場上所有UFO }
public override void TimeOut() { base.TimeOut(); UFO.DestroyUFO(Level1_DB.UFOList.Count, 1f); //清空場上所有UFO }
public override void GameOver() { base.GameOver(); UFO.DestroyUFO(Level1_DB.UFOList.Count, 1f); //清空場上所有UFO }
//遊戲狀態......... public override void Finish() { base.Finish(); UFO.DestroyUFO(Level1_DB.UFOList.Count, 1f); //清空場上所有UFO }
//移除整個RotationGroup物件,並移除所有子物件(UFO) public void DestoryGroup(Level1_RotationFix rf) { UFO.DestroyUFO(rf.transform.childCount); MonoBehaviour.Destroy(rf.gameObject, 0.5f); L1DB.RotationGroup_Index--; }