Пример #1
0
        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>();
        }
Пример #2
0
 public void Enter(AnimatedSpriteRenderComponent animationComponent)
 {
     animationComponent.Animation = _animation;
 }