private void CreateAnimations() { // Instância, mas também manipulação e criação das animações que serão passadas ao personagem. animations = new AnimationCollection(); Animation run = new Animation(running, 10, 10, 1, 48, 48, new Point(0, 0)); run.isLoop = true; animations.AddAnimation("Correr", run); Animation stopped = new Animation(idle, 10, 1, 1, 64, 64, new Point(0, 0)); stopped.isLoop = false; animations.AddAnimation("Parado", stopped); Animation die = new Animation(dying, 10, 12, 1, 59, 64, new Point(-3, 0)); die.isLoop = false; animations.AddAnimation("Morrer", die); animations.currentAnimation = "Correr"; animations.position.X = initialPosition; }
private void CreateAnimations() { // Instância, mas também manipulação e criação das animações que serão passadas ao personagem. animations = new AnimationCollection(); Animation run = new Animation(running, 10, 10, 1, 64, 64, new Point(0, 0)); run.isLoop = true; animations.AddAnimation("Correr", run); Animation celebrate = new Animation(celebrating, 10, 11, 1, 64, 64, new Point(0, 0)); celebrate.isLoop = true; animations.AddAnimation("Celebrar", celebrate); Animation jump = new Animation(jumping, 10, 10, 1, 64, 64, new Point(0, 0)); jump.isLoop = true; animations.AddAnimation("Pular", jump); Animation stopped = new Animation(idle, 10, 1, 1, 64, 64, new Point(0, 0)); stopped.isLoop = false; animations.AddAnimation("Parado", stopped); Animation die = new Animation(dying, 10, 12, 1, 59, 64, new Point(-3, 0)); die.isLoop = false; animations.AddAnimation("Morrer", die); beginNow = true; animations.currentAnimation = "Parado"; }