This commit is contained in:
John Alanbrook 2023-05-12 18:22:56 +00:00
parent 9d7a5f0163
commit 6f09bc72fb
5 changed files with 60 additions and 17 deletions

View file

@ -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");
},
});

View file

@ -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,

View file

@ -1 +0,0 @@
Yugine v. 0.0.1-43a543e, sys dbg.

35
game.js
View file

@ -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");

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB