Beispiel #1
0
    void Update()
    {
        //Update bullet origin point
        missleOrigin = player.transform.position;

        if (missleCount < missleAmount)
        {
            outOfMissles = false;

            if (InputHandler.IsKeyDown(playerShooter.shootingKey))
            {
                ShootBasedOnIdentifier();
            }
        }
        else
        {
            if (this.transform.childCount > 0)
            {
                this.transform.GetChild(0).GetComponent <Renderer>().enabled = false;
            }
            outOfMissles = true;
        }

        if (canDestroy)
        {
            destroyDelay -= Time.deltaTime;
            if (destroyDelay < 0)
            {
                powerup.DestroyPowerup();
            }
        }
    }