Exemplo n.º 1
0
    // Start is called before the first frame update
    void Start()
    {
        ui         = FindObjectOfType <BUI>();
        controller = FindObjectOfType <BController>();
        if (level >= 2)
        {
            controller.Tutorial_1_2();
            controller.Tutorial_2_3();
        }

        spawnPoints.ToList().ForEach((sp) =>
        {
            sp.gameObject.SetActive(false);
        });
        ActivateSpawnPointsOfLevel(Mathf.Max(0, level));

        spawners.ToList().ForEach((sp) =>
        {
            sp.gameObject.SetActive(false);
        });
        ActivateSpawnersOfLevel(Mathf.Max(0, level));
    }
Exemplo n.º 2
0
    // Update is called once per frame
    void Update()
    {
        if (level == -1 && startingArrow == null)
        {
            level = 0;
            controller.Tutorial_1_2();
        }

        // if can upgrade...
        if (level >= 0 && level <= levelReq.Length - 2)
        {
            if (ui.Coins >= levelReq[level + 1])
            {
                level++;
                ActivateSpawnPointsOfLevel(level);
                ActivateSpawnersOfLevel(level);
                if (level == 1)
                {
                    controller.Tutorial_2_3();
                }
            }
        }
    }