Exemple #1
0
 void Start()
 {
     // Initialize private fields
     towerMenuSystem   = transform.Find("TowerMenuUI").GetComponent <TowerMenuUISystem>();
     upgradeMenuSystem = transform.Find("UpgradeUI").GetComponent <UpgradeMenuUISystem>();
     screenStack       = new Stack <IUISystem>();
 }
    void Start()
    {
        // Initialize private fields
        towerMenuSystem   = transform.Find("TowerMenuUI").GetComponent <TowerMenuUISystem>();
        upgradeMenuSystem = transform.Find("UpgradeUI").GetComponent <UpgradeMenuUISystem>();
        pauseMenu         = transform.Find("PauseMenu").GetComponent <PauseMenu>();

        // Register events and callbacks
        EventRegistry.RegisterAction <GameObject, Type>("showMenu", ShowMenu);
        EventRegistry.RegisterAction("hideMenu", HideMenu);
        EventRegistry.RegisterAction("pause", Pause);
    }