Fixed sound effects; fix invisible chars
This commit is contained in:
parent
403771d7f8
commit
9106ebcc48
|
@ -238,6 +238,10 @@ This method allows high composability of game objects.
|
||||||
|
|
||||||
If an entity is created without an ur, is ur is defined as its given text and data. It cannot be saved. It must be given a new ur name.
|
If an entity is created without an ur, is ur is defined as its given text and data. It cannot be saved. It must be given a new ur name.
|
||||||
|
|
||||||
|
Objects can be composed on the fly by stringing together urs. For example, a "2x.json" might define scale as 2x. Then, you can create a goblin with `ur.goblin`, or a large goblin with `ur.goblin.2x`. This creates a goblin object, and then applies the 2x scripts and jsons onto the object.
|
||||||
|
|
||||||
|
*** Urs in game
|
||||||
|
|
||||||
Each ur has the following fields.
|
Each ur has the following fields.
|
||||||
|
|
||||||
| field | description |
|
| field | description |
|
||||||
|
|
|
@ -1246,8 +1246,8 @@ editor.inputs.g = function() {
|
||||||
var comp = editor.sel_comp;
|
var comp = editor.sel_comp;
|
||||||
var o = {
|
var o = {
|
||||||
pos: editor.sel_comp.pos,
|
pos: editor.sel_comp.pos,
|
||||||
move(d) { comp.pos = comp.pos.add(comp.gameobject.dir_world2this(d)); },
|
move(d) { comp.pos = comp.pos.add(comp.gameobject.dir_world2this(d)); },
|
||||||
sync: comp.sync.bind(comp),
|
sync: comp.sync.bind(comp),
|
||||||
};
|
};
|
||||||
editor.grabselect = [o];
|
editor.grabselect = [o];
|
||||||
return;
|
return;
|
||||||
|
@ -1423,14 +1423,12 @@ var inputpanel = {
|
||||||
var itms = this.guibody();
|
var itms = this.guibody();
|
||||||
if (!Array.isArray(itms)) itms = [itms];
|
if (!Array.isArray(itms)) itms = [itms];
|
||||||
if (this.title)
|
if (this.title)
|
||||||
this.win.items = [
|
this.win.items = [
|
||||||
Mum.column({items: [
|
Mum.column({items: [Mum.text({str:this.title}), ...itms ]})
|
||||||
Mum.text({str:this.title}),
|
];
|
||||||
...itms
|
|
||||||
]})
|
|
||||||
];
|
|
||||||
else
|
else
|
||||||
this.win.items = itms;
|
this.win.items = itms;
|
||||||
|
|
||||||
this.win.draw([100, window.size.y-50]);
|
this.win.draw([100, window.size.y-50]);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -32,7 +32,8 @@ var killer = Register.appupdate.register(function() {
|
||||||
for (var i in cries) {
|
for (var i in cries) {
|
||||||
var cry = cries[i];
|
var cry = cries[i];
|
||||||
if (!cry.ended) continue;
|
if (!cry.ended) continue;
|
||||||
if (cry.frame < cry.lastframe || cry.frame === cry.lastframe) cry.ended();
|
if (cry.frame < cry.lastframe || cry.frame === cry.frames())
|
||||||
|
cry.ended();
|
||||||
cry.lastframe = cry.frame;
|
cry.lastframe = cry.frame;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include "particle.h"
|
#include "particle.h"
|
||||||
#include "simplex.h"
|
#include "simplex.h"
|
||||||
|
#include <wctype.h>
|
||||||
|
|
||||||
#include "datastream.h"
|
#include "datastream.h"
|
||||||
|
|
||||||
|
@ -119,6 +120,7 @@ void c_event(const sapp_event *e)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SAPP_EVENTTYPE_CHAR:
|
case SAPP_EVENTTYPE_CHAR:
|
||||||
|
if (iswcntrl(e->char_code)) break;
|
||||||
snprintf(lcfmt, 5, "%lc", e->char_code);
|
snprintf(lcfmt, 5, "%lc", e->char_code);
|
||||||
script_evalf("prosperon.textinput(`%s`);", lcfmt);
|
script_evalf("prosperon.textinput(`%s`);", lcfmt);
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue