Beispiel #1
0
    void fire()
    {
        Debug.Log("fire");
        if (ammo.bulletsLeft() == 0)
        {
            flashReload = 0.25f;
        }
        else
        {
            Debug.Log("go");
            Color color = spawner.fireAtMonsters(number, letter) ? Color.red : Color.white;
            Debug.Log(color);

            ammo.useBullet();
            shot.createShot(number, letter);

            letterDisplay.setColor(color);
            numberDisplay.setColor(color);
        }

        letterDisplay.fadeOut(0, false);
        numberDisplay.fadeOut(0, false);

        letter = -1;
        number = -1;

        Debug.Log("done");
    }