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 Level8 {
public class EnemyWeakPoint8 : MonoBehaviour {
Enemy8 _enemy;
void Awake() {
_enemy = GetComponentInParent<Enemy8>();
}
void OnTriggerEnter2D(Collider2D other) {
if (!other.CompareTag("Player")) return;
PlayerMovement8 player = other.GetComponent<PlayerMovement8>();
player.Rb.velocity = new Vector2(player.Rb.velocity.x, player.deathForce);
player.Animator.SetTrigger(PlayerMovement8.Jump1);
Destroy(_enemy.gameObject);
}
}
}