23 lines
522 B
C#
23 lines
522 B
C#
using Chickensoft.Introspection;
|
|
|
|
namespace Zennysoft.Game.Ma;
|
|
|
|
public partial class BossLogic
|
|
{
|
|
public partial record State
|
|
{
|
|
[Meta, Id("boss_logic_state_followplayer")]
|
|
public partial record FollowPlayer : Activated, IGet<Input.PhysicsTick>
|
|
{
|
|
public Transition On(in Input.PhysicsTick input)
|
|
{
|
|
var enemy = Get<IEnemy>();
|
|
var player = Get<IPlayer>();
|
|
var target = player.CurrentPosition;
|
|
enemy.SetTarget(target);
|
|
return ToSelf();
|
|
}
|
|
}
|
|
}
|
|
}
|