pause
This commit is contained in:
parent
82a0e898db
commit
3252f219d3
30
breakout.js
30
breakout.js
|
@ -164,10 +164,34 @@ killbox.register_hit(hit => {
|
||||||
|
|
||||||
//Sound.play("start.wav");
|
//Sound.play("start.wav");
|
||||||
|
|
||||||
let gamepawn =
|
var pause = {
|
||||||
{
|
gui() {
|
||||||
|
var pausecolor = [0,0,0,100];
|
||||||
|
Debug.box(Window.dimensions.scale(0.5), Window.dimensions, pausecolor);
|
||||||
|
GUI.text_fn("PAUSE", {font_size: 3, anchor: [0.5,0.5]}).draw(Window.dimensions.scale([0.5,0.5]));
|
||||||
|
},
|
||||||
|
|
||||||
|
unpause() {
|
||||||
|
unregister_gui(pause.gui);
|
||||||
|
},
|
||||||
|
|
||||||
input_escape_pressed() {
|
input_escape_pressed() {
|
||||||
backtomain();
|
pause.unpause();
|
||||||
|
Player.players[0].control(gamepawn);
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
var gamepawn =
|
||||||
|
{
|
||||||
|
pause() {
|
||||||
|
register_gui(pause.gui);
|
||||||
|
},
|
||||||
|
|
||||||
|
input_escape_pressed() {
|
||||||
|
this.pause();
|
||||||
|
Player.players[0].uncontrol(gamepawn);
|
||||||
|
Player.players[0].control(pause);
|
||||||
},
|
},
|
||||||
|
|
||||||
input_o_pressed() {
|
input_o_pressed() {
|
||||||
|
|
4
bugs.md
4
bugs.md
|
@ -1,5 +1,9 @@
|
||||||
* Changing img of sprite sometimes changes different sprite
|
* Changing img of sprite sometimes changes different sprite
|
||||||
* Bounding box calculates incorrect width
|
* Bounding box calculates incorrect width
|
||||||
* Calculate bounding box without instantiating first
|
* Calculate bounding box without instantiating first
|
||||||
|
- For both gameobjects and GUI items
|
||||||
|
* Implement pausing - stop updates on needed objects
|
||||||
|
* Add GUI layering
|
||||||
|
* Add generic signal sending from C code based on strings
|
||||||
|
|
||||||
- Look up collision functions dynamically instead of with registry
|
- Look up collision functions dynamically instead of with registry
|
||||||
|
|
Loading…
Reference in a new issue