d
This commit is contained in:
parent
1e8d82ce39
commit
c8ba538f5b
4
Makefile
4
Makefile
|
@ -150,6 +150,10 @@ $(objprefix)/%.o:%.c
|
||||||
@echo Making C object $@
|
@echo Making C object $@
|
||||||
@$(CC) $(COMPILER_FLAGS)
|
@$(CC) $(COMPILER_FLAGS)
|
||||||
|
|
||||||
|
.PHONY: docs
|
||||||
|
docs:
|
||||||
|
asciidoctor docs/*.adoc
|
||||||
|
|
||||||
.PHONY: clean
|
.PHONY: clean
|
||||||
clean:
|
clean:
|
||||||
@echo Cleaning project
|
@echo Cleaning project
|
||||||
|
|
|
@ -103,7 +103,7 @@ assets for it.
|
||||||
.Collider controls
|
.Collider controls
|
||||||
* Alt-S Toggle sensor
|
* Alt-S Toggle sensor
|
||||||
|
|
||||||
= Yugine Programming
|
== Yugine Programming
|
||||||
|
|
||||||
.Object functions
|
.Object functions
|
||||||
|
|
||||||
|
|
|
@ -35,6 +35,7 @@ var Debug = {
|
||||||
},
|
},
|
||||||
|
|
||||||
boundingbox(bb, color) {
|
boundingbox(bb, color) {
|
||||||
|
color ??= Color.white;
|
||||||
cmd_points(0, bb2points(bb), color);
|
cmd_points(0, bb2points(bb), color);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -1324,7 +1324,7 @@ var editor = {
|
||||||
GUI.text(lvlstr, [0, ypos], 1, lvlcolor);
|
GUI.text(lvlstr, [0, ypos], 1, lvlcolor);
|
||||||
|
|
||||||
lvlcolor = Color.gray;
|
lvlcolor = Color.gray;
|
||||||
drawarrows = true;
|
|
||||||
clvl = clvl.level;
|
clvl = clvl.level;
|
||||||
if (clvl) {
|
if (clvl) {
|
||||||
GUI.text("^^^^^^", [0,ypos+5],1);
|
GUI.text("^^^^^^", [0,ypos+5],1);
|
||||||
|
@ -1412,7 +1412,9 @@ var editor = {
|
||||||
wh[1] = Math.abs(endpos[1] - this.sel_start[1]);
|
wh[1] = Math.abs(endpos[1] - this.sel_start[1]);
|
||||||
wh[0] /= editor.camera.zoom;
|
wh[0] /= editor.camera.zoom;
|
||||||
wh[1] /= editor.camera.zoom;
|
wh[1] /= editor.camera.zoom;
|
||||||
Debug.box(world2screen(c), wh);
|
var bb = cwh2bb(world2screen(c),wh);
|
||||||
|
Debug.boundingbox(bb, [255,255,255,10]);
|
||||||
|
Debug.line(bb2points(bb).wrapped(1), Color.white);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.curpanel && this.curpanel.on)
|
if (this.curpanel && this.curpanel.on)
|
||||||
|
|
|
@ -338,7 +338,7 @@ var GUI = {
|
||||||
},
|
},
|
||||||
|
|
||||||
input_s_pressed() {
|
input_s_pressed() {
|
||||||
if (GUI.selected.down) {
|
if (GUI.selected?.down) {
|
||||||
GUI.selected.selected = false;
|
GUI.selected.selected = false;
|
||||||
GUI.selected = GUI.selected.down;
|
GUI.selected = GUI.selected.down;
|
||||||
GUI.selected.selected = true;
|
GUI.selected.selected = true;
|
||||||
|
@ -346,7 +346,7 @@ var GUI = {
|
||||||
},
|
},
|
||||||
|
|
||||||
input_w_pressed() {
|
input_w_pressed() {
|
||||||
if (GUI.selected.up) {
|
if (GUI.selected?.up) {
|
||||||
GUI.selected.selected = false;
|
GUI.selected.selected = false;
|
||||||
GUI.selected = GUI.selected.up;
|
GUI.selected = GUI.selected.up;
|
||||||
GUI.selected.selected = true;
|
GUI.selected.selected = true;
|
||||||
|
@ -1725,6 +1725,7 @@ var World = Level.create();
|
||||||
World.name = "World";
|
World.name = "World";
|
||||||
|
|
||||||
var gameobjects = {};
|
var gameobjects = {};
|
||||||
|
var Prefabs = gameobjects;
|
||||||
|
|
||||||
/* Returns the index of the smallest element in array, defined by a function that returns a number */
|
/* Returns the index of the smallest element in array, defined by a function that returns a number */
|
||||||
Object.defineProperty(Array.prototype, 'min', {
|
Object.defineProperty(Array.prototype, 'min', {
|
||||||
|
|
Loading…
Reference in a new issue