Ejemplo n.º 1
0
    // Update is called once per frame
    void Update()
    {
        if (isSpeedSet)
        {
            transform.Translate(0f, -speed * Time.deltaTime, 0f);
        }

        if (transform.position.y <= offScreenHeight)
        {
            // Rocket hits base
            ScoreController.AddHealth(-10);
            Destroy(gameObject);
        }
    }