Esempio n. 1
0
 public SimplePatrolAI(LevelObjectView view, SimplePatrolAIModel aiModel, SpriteAnimatorConfig animator)
 {
     _view     = view != null ? view : throw new ArgumentException(nameof(view));
     _aiModel  = aiModel != null ? aiModel : throw new ArgumentException(nameof(aiModel));
     _animator = animator != null ? new SpriteAnimator(animator) : throw new ArgumentException(nameof(animator));
     _animator.StartAnimation(_view.SpriteRenderer, AnimState.Run, true, _animationSpeed);
 }
Esempio n. 2
0
 public SpriteAnimator(SpriteAnimatorConfig config)
 {
     _config           = config;
     _activeAnimations = new Dictionary <SpriteRenderer, Animation>();
 }