Exemple #1
0
    void Start()
    {
        Transform resourcesPanel = transform.Find("Resources");

        resourceBar1.DynamicSetup(resourcesPanel, 1);
        resourceBar2.DynamicSetup(resourcesPanel, 2);
        resourceBar3.DynamicSetup(resourcesPanel, 3);
        resourceBar4.DynamicSetup(resourcesPanel, 4);

        menuMainPause.privateOnClick.AddListener(OnMenuMainPause);
        menuMainOptions.privateOnClick.AddListener(OnMenuMainOptions);
        menuMainEnd.privateOnClick.AddListener(OnMenuMainEnd);
        menuLocalLeave.privateOnClick.AddListener(OnMenuLocalLeave);
        menuGuestOptions.privateOnClick.AddListener(OnMenuGuestOptions);
        menuGuestLeave.privateOnClick.AddListener(OnMenuGuestLeave);

        InactivateMenu();

        initialized = true;

        SwitchMenu(Menu.STATE);
    }