Ejemplo n.º 1
0
 private void SoChange(string oldValue, string newValue)
 {
     name = newValue;
     so   = ScriptableObject.CreateInstance(newValue) as CardSo;
     Debug.Assert(so != null, nameof(so) + " is null");
     so.Init(gameObject);
     CardEvents.SoChange(gameObject);
 }
        void Hand_ReceiveCard(object sender, CardEvents e)
        {
            AnimatedCardsGameComponent animatedCardGameComponent =
                new AnimatedCardsGameComponent(e.Card, CardGame)
            {
                Visible = false
            };

            heldAnimationCards.Add(animatedCardGameComponent);
            Game.Components.Add(animatedCardGameComponent);
        }
 void Hand_LostCard(object sender, CardEvents e)
 {
     for (int animationIndex = 0; animationIndex < heldAnimationCards.Count; animationIndex++)
     {
         if (heldAnimationCards[animationIndex].Card == e.Card)
         {
             Game.Components.Remove(heldAnimationCards[animationIndex]);
             heldAnimationCards.RemoveAt(animationIndex);
             return;
         }
     }
 }
Ejemplo n.º 4
0
 private void SickChange(int oldValue, int newValue) => CardEvents.CardSickChange(gameObject);
Ejemplo n.º 5
0
 private void HealthChange(int oldValue, int newValue) => CardEvents.CardHealthChange(gameObject);
Ejemplo n.º 6
0
 private void RpcCardCollision(GameObject a, GameObject b) => CardEvents.CardCollision(a, b);