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,21 @@
using UnityEngine;
namespace Level5 {
public class EnemyWeakPoint5 : MonoBehaviour {
Enemy5 _enemy;
void Awake() {
_enemy = GetComponentInParent<Enemy5>();
}
void OnTriggerEnter2D(Collider2D other) {
if (!other.CompareTag("Player")) return;
PlayerMovement5 player = other.GetComponent<PlayerMovement5>();
player.Rb.velocity = new Vector2(player.Rb.velocity.x, player.deathForce);
player.Animator.SetTrigger(PlayerMovement5.Jump1);
Destroy(_enemy.gameObject);
}
}
}