Пример #1
0
    void Start()
    {
        gci = GameObject.Find("GameManagerInScene").GetComponent <GameControlInPlay>();

        left_inventoryEquipBtn.onClick.AddListener(delegate() { gci.OpenInventoryEquip(); AudioControl.Instance.PlaySound("system_button"); });
        left_inventoryScrollBtn.onClick.AddListener(delegate() { gci.OpenInventorySkill(); AudioControl.Instance.PlaySound("system_button"); });
        left_inventoryConsumableBtn.onClick.AddListener(delegate() { gci.OpenInventoryConsumable(); AudioControl.Instance.PlaySound("system_button"); });
        left_technologyBtn.onClick.AddListener(delegate() { gci.OpenTechnology(); AudioControl.Instance.PlaySound("system_button"); });
        left_diplomacyBtn.onClick.AddListener(delegate() { gci.OpenDiplomacy(); AudioControl.Instance.PlaySound("system_button"); });
        left_heroBtn.onClick.AddListener(delegate() { gci.OpenHeroSelect(-1); AudioControl.Instance.PlaySound("system_button"); });
        left_adventureBtn.onClick.AddListener(delegate() { gci.OpenAdventureMain(); });


        top_saveBtn.onClick.AddListener(delegate() { gci.GameSave(); });
        top_setBtn.onClick.AddListener(delegate() { SystemSetPanel.Instance.OnShow(); });

        top_pauseBtn.onClick.AddListener(delegate() { gci.TimePause(); });
        top_playBtn.onClick.AddListener(delegate() { gci.TimePlay(); });
        top_fastBtn.onClick.AddListener(delegate() { gci.TimeFast(); });

        top_resourcesBtn.onClick.AddListener(delegate()
        {
            if (IsShowResourcesBlock)
            {
                HideResourcesBlock();
            }
            else
            {
                ShowResourcesBlock();
            }
        });


        bottom_adventureLastBtn.onClick.AddListener(delegate() { AdventureStartIndexToLast(); });
        bottom_adventureNextBtn.onClick.AddListener(delegate() { AdventureStartIndexToNext(); });
    }
Пример #2
0
 void Awake()
 {
     Instance = this;
     gc       = GameObject.Find("GameManager").GetComponent <GameControl>();
     gci      = GameObject.Find("GameManagerInScene").GetComponent <GameControlInPlay>();
 }