Some things

This commit is contained in:
Gerard Gascón 2023-08-19 23:55:03 +02:00
parent 6ba30e430e
commit e4cc23e7f0
119 changed files with 70085 additions and 682 deletions

View file

@ -0,0 +1,16 @@
using UnityEngine;
namespace Level1 {
public class Bullet1 : MonoBehaviour {
[SerializeField] float speed;
public void AddForce(int direction) {
Rigidbody2D rb = GetComponent<Rigidbody2D>();
rb.velocity = Vector2.right * direction * speed;
}
void OnCollisionEnter2D(Collision2D other) {
Destroy(gameObject);
}
}
}