EerieVillage/Assets/Scripts/Gameplay/EnablePlayerInput.cs

23 lines
750 B
C#

using UnityEngine;
using Platformer.Core;
using Platformer.Model;
namespace Platformer.Gameplay
{
/// <summary>
/// This event is fired when user input should be enabled.
/// </summary>
public class EnablePlayerInput : Simulation.Event<EnablePlayerInput>
{
PlatformerModel model = Simulation.GetModel<PlatformerModel>();
public override void Execute()
{
var player = model.player;
player.controlEnabled = true;
// PD 지시 2026-05-13 — 부활 모션 종료 시점 Rigidbody2D.simulated 복원 (PlayerDeath 영역 disable 영역 복원)
var body = player.GetComponent<Rigidbody2D>();
if (body != null) body.simulated = true;
}
}
}