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

@ -0,0 +1,21 @@
using UnityEngine;
namespace Level9 {
public class EnemyWeakPoint9 : MonoBehaviour {
Enemy9 _enemy;
void Awake() {
_enemy = GetComponentInParent<Enemy9>();
}
void OnTriggerEnter2D(Collider2D other) {
if (!other.CompareTag("Player")) return;
PlayerMovement9 player = other.GetComponent<PlayerMovement9>();
player.Rb.velocity = new Vector2(player.Rb.velocity.x, player.deathForce);
player.Animator.SetTrigger(PlayerMovement9.Jump1);
Destroy(_enemy.gameObject);
}
}
}