Ejemplo n.º 1
0
    private void UseFirstReviveCardFromBox(UnitEntity deadEntity)
    {
        var card = _cardContext.GetPlayerBoxCards <IReviveAbility>(deadEntity.owner.Entity)
                   .OrderBy(c => c.inBox.Index)
                   .FirstOrDefault();

        if (card != null)
        {
            var ability = (IReviveAbility)card.ability.Ability;
            ability.OnDead(deadEntity);
            card.MoveCardToDeck();
        }
    }
Ejemplo n.º 2
0
 private void ShowDisplayStatus(UnitEntity unit)
 {
     _panel.SetCharacter(unit);
     _panel.gameObject.SetActive(true);
     _panel.UpdateBoxCardCount(_cardContext.GetPlayerBoxCards(unit.owner.Entity).Length);
     _panel.UpdateDeckCardCount(_cardContext.GetPlayerDeckCards(unit.owner.Entity).Length);
     _panel.UpdatePlayingTurn(unit.owner.Entity.isPlaying);
 }
Ejemplo n.º 3
0
    protected override void Execute(List <CardEntity> entities)
    {
        var deckCardCount = _context.GetPlayerDeckCards(_status.ShowingCharacter.owner.Entity)
                            .Length;
        var boxCardCount = _context.GetPlayerBoxCards(_status.ShowingCharacter.owner.Entity)
                           .Length;

        _status.UpdateDeckCardCount(deckCardCount);
        _status.UpdateBoxCardCount(boxCardCount);
    }
    protected override void Execute(List <CardEntity> entities)
    {
        var deckCardCount = _context.GetPlayerDeckCards(_gameContext.localEntity)
                            .Length;
        var resouceHandCount = _context.GetPlayerResourceCards(_gameContext.localEntity)
                               .Length;
        var boxCardCount = _context.GetPlayerBoxCards(_gameContext.localEntity)
                           .Length;

        //UnityEngine.Debug.Log("Card > "+(deckCardCount+resouceHandCount)+","+boxCardCount);
        _status.UpdateDeckCardCount(deckCardCount + resouceHandCount);
        _status.UpdateBoxCardCount(boxCardCount);
    }
Ejemplo n.º 5
0
 public PlayerBoxCardSynchronizer(CardContext context, GameEntity player)
 {
     _cards = context.GetPlayerBoxCards(player);
 }