Exemple #1
0
    protected override void Execute(List <UnitEntity> entities)
    {
        _gameContext.isMainMissionCompleted = true;
        var end = _eventContext.CreateEntity();

        end.isEventEndGame = true;
    }
Exemple #2
0
 protected override void Execute(List <GameEntity> entities)
 {
     foreach (var e in entities)
     {
         if (e.round.Count >= _context.roundLimit.Count)
         {
             var eventEntity = _eventContext.CreateEntity();
             eventEntity.isEventEndGame = true;
         }
     }
 }
Exemple #3
0
 protected override void Execute(List <UnitEntity> entities)
 {
     if (_context.GetEntities(UnitMatcher.Owner)
         .Where(e => !e.owner.Entity.isBossPlayer)
         .ToList()
         .TrueForAll(e => e.isDead)
         )
     {
         var end = _eventContext.CreateEntity();
         end.isEventEndGame = true;
     }
 }
    protected override void Execute(List<GameEntity> entities)
    {
        foreach (var e in entities)
        {
            Debug.Log("Boss Prepare active");
            var cards = _cardContext.GetPlayerSkills<ActiveAbility<UnitEntity>>(e);
            var unit = _unitContext.GetEntityOwnedBy(e);
            foreach (var card in cards)
            {
                Debug.Log("Boss Activeskill card");
                var ability = card.ability.Ability as ActiveAbility<UnitEntity>;
                Debug.Log("ability boss = "+(ability==null));
                ability.OnTargetSelected(unit, unit);

                if(card.hasAbilityEffect) {
                    IAbilityAnimation animation = ability as IAbilityAnimation;
                    if(animation == null) {

                        var effect = Object.Instantiate(
                            card.abilityEffect.EffectObject,
                            unit.view.GameObject.transform
                            , false
                        ).GetComponent<AbilityEffect>();
                        effect.PlayAnimation();

                    } else {
                        var effect = card.abilityEffect.EffectObject;
                        animation.PlayAnimation(effect,unit,unit);
                    }
                }
            }
        }

        if(_syscon.AutoEndTurnForBoss)
        {
            _noti.AnimationEndAction = () =>
            {
                var endTurnEvent = _eventContext.CreateEntity();
                endTurnEvent.isEventEndTurn = true;
            };
        }
    }
    private void EndGame()
    {
        var eventEntity = _eventContext.CreateEntity();

        eventEntity.isEventEndGame = true;
    }
    protected override void Execute(List <GameEntity> entities)
    {
        var eventEntity = _eventContext.CreateEntity();

        eventEntity.isEventEndGame = true;
    }
Exemple #7
0
 public void Initialize()
 {
     _gameEventcontext.CreateEntity()
     .AddStateEvent("Game");
 }