Esempio n. 1
0
        /// <summary>
        /// 离开场景
        /// </summary>
        /// <returns></returns>
        public virtual IEnumerator Exit()
        {
            IsDead            = true;
            mLayer[mPosition] = null;

            yield return(mDisplay.Exit());

            mDisplay = null;
        }
Esempio n. 2
0
        /// <summary>
        /// 首次进入场景
        /// </summary>
        /// <returns></returns>
        public virtual IEnumerator Enter()
        {
            IsDead = false;
            if (mDisplay == null)
            {
                mDisplay = Game.Instance.DisplayFactory.GetTileDisplay(this);
            }

            yield return(mDisplay.Enter());
        }