Untitled

 avatar
unknown
c_cpp
a month ago
198 B
2
Indexable
public class Bullet : MonoBehaviour
{
    public float speed = 20f;

    void Start()
    {
        Rigidbody2D rb = GetComponent<Rigidbody2D>();
        rb.velocity = transform.up * speed;
    }
}
Leave a Comment