2023-04-28 12:47:04 -05:00
|
|
|
gameobject.clone("ball", {
|
|
|
|
collider: circle2d.clone(),
|
|
|
|
img: sprite.clone(),
|
|
|
|
});
|
|
|
|
|
2023-04-29 22:11:17 -05:00
|
|
|
var Gameboy = {
|
|
|
|
darkest: [15,56,15],
|
|
|
|
dark: [48,98,48],
|
|
|
|
light: [139,172,15],
|
|
|
|
lightest: [155,188,15]
|
|
|
|
};
|
|
|
|
|
|
|
|
var Rainbow = {
|
|
|
|
red: [204,0,1],
|
|
|
|
orange: [255,102,0],
|
|
|
|
darkorange: [205,102,1],
|
|
|
|
yellow: [205,204,0],
|
|
|
|
green: [0,153,1],
|
|
|
|
blue: [53,51,255]
|
|
|
|
};
|
|
|
|
|
|
|
|
var Resources = [];
|
|
|
|
|
2023-04-29 10:08:16 -05:00
|
|
|
Resources["brick.png"] = {
|
|
|
|
frames:6,
|
|
|
|
fps:24,
|
|
|
|
loop:false
|
|
|
|
};
|
|
|
|
|
2023-04-28 12:47:04 -05:00
|
|
|
gameobject.clone("brick", {
|
|
|
|
collider: polygon2d.clone(),
|
|
|
|
char: char2d.clone({
|
2023-04-29 22:11:17 -05:00
|
|
|
flash:"brick.png"
|
2023-04-28 12:47:04 -05:00
|
|
|
}),
|
|
|
|
|
|
|
|
start() {
|
|
|
|
this.char.stop();
|
|
|
|
this.flash();
|
|
|
|
this.timer = timer.make(() => {
|
|
|
|
this.flash();
|
|
|
|
this.timer.time = Math.random_range(2,10);
|
|
|
|
}, Math.random_range(2,10));
|
|
|
|
},
|
|
|
|
|
|
|
|
flash() {
|
|
|
|
this.char.play("flash");
|
|
|
|
},
|
|
|
|
|
|
|
|
stop() {
|
|
|
|
this.timer.kill();
|
|
|
|
},
|
|
|
|
});
|
|
|
|
|
|
|
|
gameobject.clone("paddle", {
|
|
|
|
collider: polygon2d.clone(),
|
|
|
|
img: sprite.clone(),
|
|
|
|
});
|