// ALL METHODS void Awake() { // find all scripts of type Player and store them in Players array // (we should have only 2 players in the scene) Players = GameObject.FindObjectsOfType <Player>(); // obtain unique id from IDFactory PlayerID = IDFactory.GetUniqueID(); if (deck == null) { deck = GameObject.Find("DeckLogic").GetComponent <Deck>(); deck.cards.Shuffle(); } if (charAsset == null) { CharAssetLogic charAssetLogic = GameObject.Find("CharLogic").GetComponent <CharAssetLogic>(); charAsset = charAssetLogic.playerChar; } }
public void Choose() { CharAssetLogic charAssetLogic = GameObject.Find("CharLogic").GetComponent <CharAssetLogic>(); charAssetLogic.playerChar = charAsset; }