public void DestroyAllmonsterObjs() { foreach (GameObject go in monsterObjs) { HelpUtil.DestroyObject(go); } monsterObjs.Clear(); }
public void DestroyAllChests() { foreach (GameObject go in chestObjs) { HelpUtil.DestroyObject(go); } chestObjs.Clear(); }
// Use this for initialization protected void Awake() { publisher.NotifyMonoAwake(); // Don't destroy this script when loading. DontDestroyOnLoad(this.gameObject); GameObject tStaticRes = GameObject.Find("StaticRes"); if (tStaticRes != null) { DontDestroyOnLoad(tStaticRes); } // Start time mDataTime = new System.DateTime(); mDataTime = System.DateTime.Now; mLastFrameTime = mDataTime; Input.imeCompositionMode = IMECompositionMode.On; //------------------- // Set random seed. UnityEngine.Random.seed = (int)System.DateTime.Now.Ticks; phoneImei = SystemInfo.deviceUniqueIdentifier; //------------- Debug.Log("Application.persistentDataPath : " + Application.persistentDataPath); // 2012.05.22 LiHaojie Adjust the targetFrameRate is 35 fps Application.targetFrameRate = 35; Application.runInBackground = true; Globals.Instance.Awake(); GameSystemInfo.CollectSystemInfo(); //TalkingDataGA.SessionStarted("01BD57E566CD46FF3889ED4A4D547BD4", "gfan"); if (!GameDefines.ToastEnabled) { HelpUtil.DestroyObject(textShow.gameObject); textShow = null; } // AdaptiveUI (); }
public void DestroyMonster(GameObject monster) { monsterObjs.Remove(monster); HelpUtil.DestroyObject(monster); }