public JunimoSlave(Vector2 position, IMonitor monitor) : base(new AnimatedSprite("Characters\\Junimo", 0, 16, 16), position, 0, "JunimoSlave", (LocalizedContentManager)null) { this.monitor = monitor; this.inputHelper = new InputHelper(); this.ignoreMovementAnimation = true; this.movementDirection = Vector2.Zero; this.currentAnimation = new JunimoAnimationIdle(this); }
public bool HandleInputEvents(object sender, EventArgsInput e) { this.movementDirection = this.CalculateMovementBasedOnInput(e); this.SetMovementBasedOnDirection(this.movementDirection); IJunimoAnimation movementAnimation = this.DecideMovementAnimation(this.movementDirection); if (movementAnimation == null) { this.currentAnimation = new JunimoAnimationIdle(this); } else { this.currentAnimation = movementAnimation; } return(true); }