Exemplo n.º 1
0
    // Use this for initialization
    void Start()
    {
        c = Control_Script.controlObj.GetComponent <Control_Script> ();
        toMainButton.onClick.AddListener(() => GoToMain());

        gOne.onClick.AddListener(() => c.BuyGold(1));
        gTwo.onClick.AddListener(() => c.BuyGold(2));
        gThree.onClick.AddListener(() => c.BuyGold(3));
        gFour.onClick.AddListener(() => c.BuyGold(4));

        gemOne.onClick.AddListener(() => c.BuyGems(1));
        gemTwo.onClick.AddListener(() => c.BuyGems(2));
        gemThree.onClick.AddListener(() => c.BuyGems(3));
        gemFour.onClick.AddListener(() => c.BuyGems(4));

        gameObject.SetActive(false);
    }