public CharacterBrain(AnimationsSet animationsSet, GameObject owner) : base(owner) { _transform = owner.Components.Get <Transform>() ?? throw new ComponentNotFoundException <Transform>(); _animationComponent = owner.Components.Get <AnimatedSpriteRenderComponent>() ?? throw new ComponentNotFoundException <AnimatedSpriteRenderComponent>(); }
public void Enter(AnimatedSpriteRenderComponent animationComponent) { animationComponent.Animation = _animation; }