Untitled
public class Bullet : MonoBehaviour { public float speed = 20f; void Start() { Rigidbody2D rb = GetComponent<Rigidbody2D>(); rb.velocity = transform.up * speed; } }
Leave a Comment
public class Bullet : MonoBehaviour { public float speed = 20f; void Start() { Rigidbody2D rb = GetComponent<Rigidbody2D>(); rb.velocity = transform.up * speed; } }