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

            sellTowerEventArgs.TowerSerialId = towerSerialId;
            return(sellTowerEventArgs);
        }
Exemple #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));
                }
            }
        }
        private void OnSellTower(object sender, GameEventArgs e)
        {
            HideTowerInLevelEventArgs ne = (HideTowerInLevelEventArgs)e;

            if (ne == null)
            {
                return;
            }

            if (levelControl == null)
            {
                return;
            }

            levelControl.HideTower(ne.TowerSerialId);
        }
        protected override void Dead()
        {
            base.Dead();

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