I shall let Arden know. Thank you so much for your feedback! <3
TeuFox
Creator of
Recent community posts
• 0.5 • March 1st • Flourished Update •
Tied up the loose ends left from the game jam.
Added chain damage system.
Added chain-based score multiplier.
Added attack and marking animations for the druid.
and many other polish and bug based fixes.
• 0.2 • February 28 • Game Jam Release •
Initial release, no previous version able to compare to.
Please take some time to test and give feedback on my work in progress game Dexus.
Let me know feedback on the mechanics the feel of the movement etc. The levels are not completed nor is all of them in but I want to get feedback so I can hasten development and make corrections.
Leave any feedback in this topic post and I will respond right away! Thank you so much! ~ Joel
Sup.ArcadePhysics2D.setGravity(0, -0.02);
class PlayerBehavior extends Sup.Behavior {
speed = 0.08;
jumpSpeed = 0.35;
frameSpeed = 1;
reverseSpeed = -1;
update() {
Sup.ArcadePhysics2D.collides(this.actor.arcadeBody2D, Sup.ArcadePhysics2D.getAllBodies());
// As explained above, we get the current velocity
let velocity = this.actor.arcadeBody2D.getVelocity();
// We override the `.x` component based on the player's input
if (Sup.Input.isKeyDown("DOWN")) {
this.actor.spriteRenderer.setAnimation("Crouch",true);
velocity.x = 0.000001;
//this.actor.spriteRenderer.setPlaybackSpeed(this.frameSpeed);
}else if (Sup.Input.isKeyDown("RIGHT")) {
velocity.x = this.speed;
this.actor.spriteRenderer.setAnimation("Walk");
this.actor.spriteRenderer.setPlaybackSpeed(this.frameSpeed);
} else if (Sup.Input.isKeyDown("LEFT")) {
velocity.x = -this.speed + 0.02;
this.actor.spriteRenderer.setAnimation("Walk");
this.actor.spriteRenderer.setPlaybackSpeed(this.reverseSpeed);
//velocity.x = this.speed - 0.08;
} else {
velocity.x = 0;
}
// If the player is on the ground and wants to jump,
// we update the `.y` component accordingly
let touchBottom = this.actor.arcadeBody2D.getTouches().bottom;
if (touchBottom) {
if (Sup.Input.wasKeyJustPressed("UP")) {
velocity.y = this.jumpSpeed;
this.actor.spriteRenderer.setAnimation("Jump");
} else {
// Here, we should play either "Idle" or "Run" depending on the horizontal speed
if (velocity.x === 0) {
this.actor.spriteRenderer.setAnimation("Idle");
this.actor.spriteRenderer.setPlaybackSpeed(this.frameSpeed);
} else {
if (velocity.x === 0.000001) {
this.actor.spriteRenderer.setAnimation("Crouch",false);
}
}
}
} else {
// Here, we should play either "Jump" or "Fall" depending on the vertical speed
if (velocity.y >= 0) this.actor.spriteRenderer.setAnimation("Jump");
else this.actor.spriteRenderer.setAnimation("Fall");
}
// Finally, we apply the velocity back to the ArcadePhysics body
this.actor.arcadeBody2D.setVelocity(velocity);
}
}
Sup.registerBehavior(PlayerBehavior);
this.actor.spriteRenderer.setAnimation("Crouch",false);
API: this.actor.spriteRenderer.setAnimation(String " ",looping? boolean);
No matter what I do I cannot get this animation to not loop, and I have tried to go the long way by using "wait" functions but I could not figure out how to do that either, please help!