Base mechanics done

This commit is contained in:
Gerard Gascón 2023-08-20 17:27:37 +02:00
parent e4cc23e7f0
commit eaa8cdd462
67 changed files with 21667 additions and 330 deletions

View file

@ -1,12 +1,9 @@
using UnityEngine;
namespace Level4 {
public class Bullet4 : MonoBehaviour {
[SerializeField] float speed;
public class Bullet4 : BulletStats {
public void AddForce(int direction) {
Rigidbody2D rb = GetComponent<Rigidbody2D>();
rb.velocity = Vector2.right * direction * speed;
GetComponent<Rigidbody2D>().velocity = Vector2.right * direction * bulletSpeed;
}
void OnCollisionEnter2D(Collision2D other) {