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