示例#1
0
    void Start()
    {
        playerCM = GameObject.FindGameObjectWithTag(Constants.TAG_PLAYER_CARD_MANAGER).GetComponent <PlayerCardManager>();
        // eventCM = GameObject.FindGameObjectWithTag(Constants.TAG_EVENT_CARD_MANAGER).GetComponent<EventCardManager>();
        supplyCM = GameObject.FindGameObjectWithTag(Constants.TAG_SUPPLY_CARD_MANAGER).GetComponent <SupplyCardManager>();

        winScreen  = GetComponent <WinScreen>();
        loseScreen = GetComponent <LoseScreen>();

        InitializeGame();
    }
 void Awake()
 {
     // singleton setup
     if (instance == null)
     {
         Object.DontDestroyOnLoad(this.gameObject);
         instance = this;
     }
     else if (instance != this)
     {
         Destroy(gameObject);
     }
 }