void RpcRemoveFromList(GameObject obj) { if (hasAuthority) { DiscardStack.Shuffle(obj); } }
private void Start() { text = GetComponent <Text>(); if (OutputValue == Value.PlayerLaidCardsSum || OutputValue == Value.PlayerHandCardCount) { Player = GetComponentInParent <Player>(); if (Player == null) { throw new MissingReferenceException("ValueOutput is set to output PlayerLaidCardsSum or PlayerHandCardCount but is not child of a Player!"); } } else if (OutputValue == Value.CardStackCardCount) { CardStack = GetComponentInParent <CardStack>(); if (CardStack == null) { throw new MissingReferenceException("ValueOutput is set to output the CardStackCardCount but is not child of a CardStack!"); } } else if (OutputValue == Value.DiscardStackCardCount) { DiscardStack = GetComponentInParent <DiscardStack>(); if (DiscardStack == null) { throw new MissingReferenceException("ValueOutput is set to output the DiscardStackCardCount but is not child of a DiscardStack!"); } } }
protected override void Awake() { base.Awake(); if (singleton == null) { singleton = this; } NumCards = Cards.Count; }
public void Setup() { if (singleton == null) { singleton = this; } this.Cards = new List <GameObject> (); this.StackName = "DiscardStack"; SetReady(); }