englercj / lttp

An incomplete remake of The Legend of Zelda - A Link to the Past using WebGL and the browser.
MIT License
123 stars 20 forks source link

Controls? #6

Closed archae0pteryx closed 7 years ago

archae0pteryx commented 8 years ago

I'm not familiar with Phaser... I guess I need to get there.In the meantime, will you point me in the right direction for modifing the controls? F. N. Love it though mate. Really. You're missing a ; in math.ts

Cheers

englercj commented 8 years ago

In this game the level binds the user input and dispatches it to the player as events, this is because of how I unload and load worlds as you "zone" to different maps.

In the base level you can see where I map actions to keys:

https://github.com/englercj/lttp/blob/master/src/levels/Level.ts#L35-L64

and where I handle keyboard input:

https://github.com/englercj/lttp/blob/master/src/levels/Level.ts#L300

Keyboard input (and others) are bound here in the BaseState class, which Level inherits from:

https://github.com/englercj/lttp/blob/master/src/states/GameState.ts#L24

Hope this helps! Feel free to put in PRs, I don't have time to work on this much these days.

archae0pteryx commented 8 years ago

Awesome thanks for your help!