public void UseCard(Person card, int newNum, CardGamePlayerObject newPlayer) { cardName.text = card.name; //image.sprite = (Sprite) Resources.Load(card.imagePath); num = newNum; player = newPlayer; }
static public void AddPlayer(CardGamePlayerObject paddle) { Players[paddle.number] = paddle; paddle.SpawnAt(paddle.number); if (instance != null) { //add player can be called BEFORE the object is built (i.e. when a client is also server, another client can have //loaded its scene faster. So no instance exist yet. All palyer will be init in the awake fonction then //if that function is called after the Awake (and so when an instance exist), we still need to init the player, so better do it here. // _instance.ScoreZones[paddle.number].linkedPlayer = paddle; } }