/// <summary> /// 离开场景 /// </summary> /// <returns></returns> public virtual IEnumerator Exit() { IsDead = true; mLayer[mPosition] = null; yield return(mDisplay.Exit()); mDisplay = null; }
/// <summary> /// 首次进入场景 /// </summary> /// <returns></returns> public virtual IEnumerator Enter() { IsDead = false; if (mDisplay == null) { mDisplay = Game.Instance.DisplayFactory.GetTileDisplay(this); } yield return(mDisplay.Enter()); }