void Start()
    {
        _number = 3;

        _nextDayPanel    = GameObject.Find("ChangeDayPanel");
        _changedaybutton = GameObject.Find("ChangeDayButton").GetComponent <Button>();
        _inventory       = GameObject.FindGameObjectWithTag("Inventory").GetComponent <Inventory>();

        _endlessGameVariables = GameObject.Find("LevelManager").GetComponent <EndlessGameVariables>();

        _inventoryPanel = GameObject.Find("InventoryPanel");

        _changedaybutton.onClick.AddListener(NewTime);

        for (int i = 0; i < _number; i++)
        {
            _visitors.Add(null);
        }

        for (int i = 0; i < _number; i++)
        {
            GameObject _visitor = GameObject.Find("mexican" + i);
            _visitors[i] = _visitor;
        }

        _nextDayPanel.SetActive(false);
    }
Exemplo n.º 2
0
    void Paiment(int money) //need to be update to all versions of game
    {
        EndlessGameVariables levelManagerGameObject = GameObject.FindWithTag("LevelManager").GetComponent <EndlessGameVariables>();

        levelManagerGameObject.AddMoney(money);
    }