Beispiel #1
0
    public void PutCard(DeckTag putDeck, int playerCardIndex, bool isBack = false, float reverseTime = 0.5f)
    {
        var deck        = DeckSystem.GetInstance().GetDeck(putDeck);
        var putCardIdx  = PlayerCard[playerCardIndex].GetCardIndex();
        var putShapeIdx = PlayerCard[playerCardIndex].GetShapeIndex();

        PlayerCard[playerCardIndex].transform.DOMove(deck.GetPosition(), 0.5f);
        PlayerCard[playerCardIndex].transform.DORotate(deck.GetAngle(), 0.5f);

        if (isBack)
        {
            CardAnimationSystem.GetInstance().ReverseAnimation(
                PlayerCard[playerCardIndex], reverseTime);
        }

        deck.AddCard(PlayerCard[playerCardIndex]);

        //////////////////////////////////////
        /// TODO : 커플링으로 인해 분리해야함
        RuleSystem.GetInstance().AddAttackCardDamage(putCardIdx, putShapeIdx);
        AlertSystem.GetInstance().AddAlerts(putCardIdx, putShapeIdx);
        //////////////////////////////////////

        IsPutCard = true;

        PlayerCard.RemoveAt(playerCardIndex);

        RePosition();

        NetworkSystem.GetInstance().SendServer(string.Format("PUT-CARD:{0}:{1}", PlayerId, playerCardIndex));
    }
Beispiel #2
0
 public void EndAttackTurn()
 {
     RuleSystem.GetInstance().IsAttackTurn     = false;
     RuleSystem.GetInstance().SaveAttackDamage = 0;
     AlertSystem.GetInstance().ClearAlert();
 }