Esempio n. 1
0
    void Start()
    {
        gui = GetComponent <Canvas>();
        Button button1interact = button1.GetComponent <Button>();
        Button button2interact = button2.GetComponent <Button>();

        button1interact.onClick.AddListener(OnClickHide);
        button2interact.onClick.AddListener(OnClickLoot);
        money    = FindObjectOfType <PlayerMoney>();
        generate = GetComponent <GenerateMoney>();
    }
Esempio n. 2
0
    void Start()
    {
        player         = FindObjectOfType <PlayerController>();
        playerinteract = FindObjectOfType <PlayerInteract>();
        gui            = GetComponent <Canvas>();
        Button button1interact = button1.GetComponent <Button>();
        Button button2interact = button2.GetComponent <Button>();

        button1interact.onClick.AddListener(OnClickPlay);
        button2interact.onClick.AddListener(OnClickLoot);
        money    = FindObjectOfType <PlayerMoney>();
        generate = GetComponent <GenerateMoney>();
    }