Ejemplo n.º 1
0
 void Update()
 {
     _rb.MovePosition(_rb.position + transform.forward * Time.deltaTime * Speed);
     if (!GameBounds.IsWithinBounds(transform.position))
     {
         GameObject.Destroy(gameObject);
     }
 }
Ejemplo n.º 2
0
    void Update()
    {
        var speed = Mathf.Lerp(Speed.x, Speed.y, _difficulty);

        _rb.MovePosition(_rb.position + Vector3.back * Time.deltaTime * speed);
        if (!GameBounds.IsWithinBounds(transform.position))
        {
            GameObject.Destroy(gameObject);
        }

        //_hull.Fire(true); // TODO: FIRE
    }