Recerca-Cerdanya-Talk/Assets/Scripts/Level 5/Bullet5.cs
2023-08-20 17:27:37 +02:00

13 lines
331 B
C#

using UnityEngine;
namespace Level5 {
public class Bullet5 : BulletStats {
public void AddForce(int direction) {
GetComponent<Rigidbody2D>().velocity = Vector2.right * direction * maxYSpeed;
}
void OnCollisionEnter2D(Collision2D other) {
Destroy(gameObject);
}
}
}