コード例 #1
0
        public static HideTowerInLevelEventArgs Create(int towerSerialId, object userData = null)
        {
            HideTowerInLevelEventArgs sellTowerEventArgs = ReferencePool.Acquire <HideTowerInLevelEventArgs>();

            sellTowerEventArgs.TowerSerialId = towerSerialId;
            return(sellTowerEventArgs);
        }
コード例 #2
0
        protected override void OnUpdate(float elapseSeconds, float realElapseSeconds)
        {
            base.OnUpdate(elapseSeconds, realElapseSeconds);

            if (dataLevel.LevelState == EnumLevelState.Normal)
            {
                timer += elapseSeconds;

                if (timer > time)
                {
                    GameEntry.Event.Fire(this, HideTowerInLevelEventArgs.Create(entityDataTower.Tower.SerialId));
                }
            }
        }
コード例 #3
0
        private void OnSellTower(object sender, GameEventArgs e)
        {
            HideTowerInLevelEventArgs ne = (HideTowerInLevelEventArgs)e;

            if (ne == null)
            {
                return;
            }

            if (levelControl == null)
            {
                return;
            }

            levelControl.HideTower(ne.TowerSerialId);
        }
コード例 #4
0
        protected override void Dead()
        {
            base.Dead();

            GameEntry.Event.Fire(this, HideTowerInLevelEventArgs.Create(entityDataTower.Tower.SerialId));
        }