diff --git a/config.js b/config.js index 37537f6..0da0f47 100644 --- a/config.js +++ b/config.js @@ -1,6 +1,10 @@ gameobject.clone("ball", { collider: circle2d.clone(), img: sprite.clone(), + + collide(hit) { + Sound.play("bump.wav"); + }, }); var Gameboy = { @@ -68,7 +72,12 @@ var paddle = gameobject.clone("paddle", { v[1] = 0; this.pos = this.pos.add(v.scale(this.speed*Yugine.dt)); }, + setup() { Player.players[0].control(this); }, + + collide(hit) { + Log.warn("hit"); + }, }); diff --git a/game.config b/game.config index ff109ff..940616b 100644 --- a/game.config +++ b/game.config @@ -9,10 +9,10 @@ "Collision": { "types": { "0": [ - false, - false, - false, - false, + true, + true, + true, + true, false, false, false, @@ -21,10 +21,10 @@ false ], "1": [ - false, - false, - false, - false, + true, + true, + true, + true, false, false, false, @@ -33,10 +33,10 @@ false ], "2": [ - false, - false, - false, - false, + true, + true, + true, + true, false, false, false, @@ -45,10 +45,10 @@ false ], "3": [ - false, - false, - false, - false, + true, + true, + true, + true, false, false, false, diff --git a/game.info b/game.info deleted file mode 100644 index 0434bc2..0000000 --- a/game.info +++ /dev/null @@ -1 +0,0 @@ -Yugine v. 0.0.1-43a543e, sys dbg. \ No newline at end of file diff --git a/game.js b/game.js index 0b05743..2e76d0f 100644 --- a/game.js +++ b/game.js @@ -3,3 +3,38 @@ sim_start(); World.loadfile("lvl1.lvl"); World.spawn(gameobjects['ball']); +//Sound.play("start.wav"); + +var camcontroller = { + input_a_down() { + cmd(99); + }, + + input_d_down() { + cmd(100); + }, + + input_q_down() { + cmd(98); + }, + + input_e_down() { + cmd(97); + }, + + input_w_down() { cmd(101); }, + input_s_down() { cmd(102); }, +}; + + +function texttest() +{ + GUI.text("test 1", [0,0], 1,[5,120,240]); + GUI.text("test 2", [100,100],1,[100,2,250]); +} + +register_gui(texttest); + + +Log.warn("set controller"); + diff --git a/packedfont.png b/packedfont.png deleted file mode 100644 index 6b206d8..0000000 Binary files a/packedfont.png and /dev/null differ