private void HeroAbilityActivateActionCallback(uint id, object cookie)
        {
            HeroAbilityAction heroAbilityAction = cookie as HeroAbilityAction;
            IDataController   dataController    = Service.Get <IDataController>();
            TroopTypeVO       troopTypeVO       = dataController.Get <TroopTypeVO>(heroAbilityAction.TroopUid);

            Service.Get <TroopAbilityController>().ActivateHeroAbility(troopTypeVO.Uid);
        }
Ejemplo n.º 2
0
        private void HeroAbilityActivateActionCallback(uint id, object cookie)
        {
            HeroAbilityAction    heroAbilityAction    = cookie as HeroAbilityAction;
            StaticDataController staticDataController = Service.StaticDataController;
            TroopTypeVO          troopTypeVO          = staticDataController.Get <TroopTypeVO>(heroAbilityAction.TroopUid);

            Service.TroopAbilityController.ActivateHeroAbility(troopTypeVO.Uid);
        }
        private void HandleTroopAbilityActivateEvent(object cookie)
        {
            SmartEntity    smartEntity = (SmartEntity)cookie;
            TroopAbilityVO abilityVO   = smartEntity.TroopComp.AbilityVO;

            if (abilityVO != null && !abilityVO.Auto)
            {
                HeroAbilityAction heroAbilityAction = new HeroAbilityAction();
                heroAbilityAction.Time     = this.GetActionTime();
                heroAbilityAction.TroopUid = smartEntity.TroopComp.TroopType.Uid;
                this.battleRecord.Add(heroAbilityAction);
            }
        }