Exemplo n.º 1
0
    public void CliquerBtn()
    {
        spawnerCube.SpawnCube();
        audioSource.PlayOneShot(son);

        if (offMesh != null && !offMesh.activated)
        {
            offMesh.activated = true;
        }
    }
Exemplo n.º 2
0
    private void Update()
    {
        if (Input.GetButtonDown("Fire1"))
        {
            if (MovingCube.CurrentCube != null)
            {
                MovingCube.CurrentCube.Stop();
            }


            spawnerIndex   = spawnerIndex == 0 ? 1 : 0;
            currentSpawner = spawners[spawnerIndex];

            currentSpawner.SpawnCube();

            OnCubeSpawned();

            score++;
        }
    }