-
Notifications
You must be signed in to change notification settings - Fork 92
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add sprint/running to player #142
Comments
@BrianCheung1 Can I work on this? |
Absolutely @BrianCheung1. Make sure that the character isn't moving to fast because I saw a bug where the player was then able to "jump" over the map boundaries somehow. |
You can assign this to @hpatel292-seneca as I might not be able to get to it for a little. |
Done @BrianCheung1. |
Hi @BrianCheung1, I have a question. In the description you mentioned "add a sprint key/running animation," is it like a permanent increase in speed or like a sprint (for a few seconds)?? |
@hpatel292-seneca However it is totally up to you how you would like to implement it. It could be a permanent speed buff, a quick dash, some other kind of movement. |
And you said 25% increase in speed if energy is greater than 50% and 10% increase in speed if energy is less than 50%, here is what I came up with
|
Yes that was the solution I initially came up with. I believe it currently only affects speeds when energy greater than 50% so you’ll have to add in the logic for energy under 50% |
Yea, it's checking if energy is greater than 50 and if it is then it multiplies speed by 1.25 else it multiple speed by 1.1 (10%). Thats what you asked right is energy 50-100, 25% increase and if energy 0-50, 10% increase. |
Oh yes sorry I missed that, looks good to me. |
Want to add
Recently we've added a new energy bar to the player
I would like to add a sprint key/running animation to the player model that allows the player to move a little faster depending on how much energy the player has left
I was thinking somewhere along the lines for 25% faster if player has 50% or higher energy and 10% if the player has less than 50% energy
Files to change
I believe the only file i would need to change would be player,controls.js and specially onButtonDown for up/down/left/right and onMouseDown
I believe adding some condition like this
would be a step in the right direction
The text was updated successfully, but these errors were encountered: