示例#1
0
    // 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;
        }
    }
示例#2
0
    public void Choose()
    {
        CharAssetLogic charAssetLogic = GameObject.Find("CharLogic").GetComponent <CharAssetLogic>();

        charAssetLogic.playerChar = charAsset;
    }