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; } } }
private void SickChange(int oldValue, int newValue) => CardEvents.CardSickChange(gameObject);
private void HealthChange(int oldValue, int newValue) => CardEvents.CardHealthChange(gameObject);
private void RpcCardCollision(GameObject a, GameObject b) => CardEvents.CardCollision(a, b);