Compare commits
2 Commits
d308ce7231
...
624b538ad8
Author | SHA1 | Date |
---|---|---|
3wc | 624b538ad8 | |
3wc | e375d0028e |
|
@ -2,4 +2,4 @@ compile-common.hxml
|
||||||
|
|
||||||
-D windowTitle=StoneInAGlasshouse
|
-D windowTitle=StoneInAGlasshouse
|
||||||
-lib hlsdl
|
-lib hlsdl
|
||||||
-hl bin/rewild.hl
|
-hl bin/glasshouse.hl
|
||||||
|
|
10
makefile
10
makefile
|
@ -1,23 +1,23 @@
|
||||||
.PHONY: watch run
|
.PHONY: watch run
|
||||||
|
|
||||||
default: bin/rewild.hl
|
default: bin/glasshouse.hl
|
||||||
|
|
||||||
SOURCES := $(shell find . -name \*.hx -print)
|
SOURCES := $(shell find . -name \*.hx -print)
|
||||||
|
|
||||||
bin/rewild.hl: $(SOURCES)
|
bin/glasshouse.hl: $(SOURCES)
|
||||||
haxe compile-hl.hxml
|
haxe compile-hl.hxml
|
||||||
|
|
||||||
bin/rewild.js: $(SOURCES)
|
bin/glasshouse.js: $(SOURCES)
|
||||||
haxe compile-js.hxml
|
haxe compile-js.hxml
|
||||||
|
|
||||||
debug: $(SOURCES)
|
debug: $(SOURCES)
|
||||||
haxe --debug compile-hl.hxml
|
haxe --debug compile-hl.hxml
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f bin/rewild.hl bin/rewild.js
|
rm -f bin/glasshouse.hl bin/glasshouse.js
|
||||||
|
|
||||||
watch:
|
watch:
|
||||||
@inotifywait --recursive --monitor --event modify,move,create,delete --include '.*.hx$$' ./ | while read changed; do echo $$changed; make debug; done
|
@inotifywait --recursive --monitor --event modify,move,create,delete --include '.*.hx$$' ./ | while read changed; do echo $$changed; make debug; done
|
||||||
|
|
||||||
run:
|
run:
|
||||||
hl bin/rewild.hl
|
hl bin/glasshouse.hl
|
||||||
|
|
|
@ -55,18 +55,16 @@ menubutton:active {
|
||||||
|
|
||||||
flow.dialogue-container {
|
flow.dialogue-container {
|
||||||
fill-width: true;
|
fill-width: true;
|
||||||
height: 20;
|
min-height: 20;
|
||||||
layout: vertical;
|
layout: vertical;
|
||||||
}
|
}
|
||||||
|
|
||||||
dialogue-box {
|
dialogue-box {
|
||||||
fill-width: true;
|
fill-width: true;
|
||||||
height: 20;
|
|
||||||
/* background: tile("ui.png", 5, 5); */
|
|
||||||
/* background-tile-pos: 1 1; */
|
|
||||||
background: blue;
|
background: blue;
|
||||||
padding: 10;
|
padding: 10;
|
||||||
alpha: 0.9;
|
alpha: 0.9;
|
||||||
|
min-height: 20;
|
||||||
}
|
}
|
||||||
|
|
||||||
dialogue-options {
|
dialogue-options {
|
||||||
|
|
|
@ -1,16 +1,20 @@
|
||||||
title: Room:quarters
|
title: Room:quarters
|
||||||
---
|
---
|
||||||
<<declare $roll = 0>>
|
<<declare $roll = 0>>
|
||||||
|
<<declare $quartersIntroSeen = false>>
|
||||||
<<declare $hangarKeyFound = false>>
|
<<declare $hangarKeyFound = false>>
|
||||||
<<declare $sleepingMatSetUp = false>>
|
<<declare $sleepingMatSetUp = false>>
|
||||||
|
<<if not $quartersIntroSeen>>
|
||||||
You: It's the crew quarters.
|
You: It's the crew quarters.
|
||||||
You: Well, it will be. Set-up hasn't started yet.
|
You: Well, it will be. Set-up hasn't started yet.
|
||||||
You: That was meant to be one of my first jobs after defrost...
|
You: That was meant to be one of my first jobs after defrost...
|
||||||
You: ...but it doesn't exactly seem like a priority now.
|
You: ...but it doesn't exactly seem like a priority now.
|
||||||
|
<<set $quartersIntroSeen to true>>
|
||||||
|
<<endif>>
|
||||||
You: Maybe there's something useful here?
|
You: Maybe there's something useful here?
|
||||||
-> Search the lockers (perception) <<if not $hangarKeyFound>>
|
-> Search the lockers (perception) <<if not $hangarKeyFound>>
|
||||||
<<set $roll to dice(6)>>
|
<<set $roll to dice(6)>>
|
||||||
<<if $roll > 2>>
|
<<if $roll > 0>>
|
||||||
You: Aha! A small piece of paper with the **hangar access code**.
|
You: Aha! A small piece of paper with the **hangar access code**.
|
||||||
<<room hangar>>
|
<<room hangar>>
|
||||||
<<set $hangarKeyFound to true>>
|
<<set $hangarKeyFound to true>>
|
||||||
|
|
|
@ -69,6 +69,12 @@ class DialogueOptionsComponent extends h2d.Flow implements h2d.domkit.Object {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override function onRemove() {
|
||||||
|
for (option in this.options)
|
||||||
|
option.remove();
|
||||||
|
super.onRemove();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@:uiComp("dialogue-box")
|
@:uiComp("dialogue-box")
|
||||||
|
@ -116,7 +122,6 @@ class DialogueBoxComponent extends h2d.Flow implements h2d.domkit.Object {
|
||||||
function updateText() {
|
function updateText() {
|
||||||
if (textPos == internalText.length) {
|
if (textPos == internalText.length) {
|
||||||
timer.stop();
|
timer.stop();
|
||||||
// onReady();
|
|
||||||
// if (chan != null)
|
// if (chan != null)
|
||||||
// chan.stop();
|
// chan.stop();
|
||||||
return;
|
return;
|
||||||
|
@ -136,6 +141,13 @@ class DialogueBoxComponent extends h2d.Flow implements h2d.domkit.Object {
|
||||||
displayedText = internalText.substr(0, textPos);
|
displayedText = internalText.substr(0, textPos);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override function onRemove() {
|
||||||
|
super.onRemove();
|
||||||
|
// if (chan != null)
|
||||||
|
// chan.stop();
|
||||||
|
// timer.stop();
|
||||||
|
}
|
||||||
|
|
||||||
public dynamic function onClick() {
|
public dynamic function onClick() {
|
||||||
if (textPos == internalText.length)
|
if (textPos == internalText.length)
|
||||||
Game.current.globalEventBus.publishEvent(new NextLine());
|
Game.current.globalEventBus.publishEvent(new NextLine());
|
||||||
|
|
|
@ -36,25 +36,18 @@ class DialogueBoxController {
|
||||||
eventBus.subscribe(DialogueComplete, onDialogueComplete);
|
eventBus.subscribe(DialogueComplete, onDialogueComplete);
|
||||||
}
|
}
|
||||||
|
|
||||||
// override function onRemove() {
|
|
||||||
// super.onRemove();
|
|
||||||
// // if (chan != null)
|
|
||||||
// // chan.stop();
|
|
||||||
// // timer.stop();
|
|
||||||
// }
|
|
||||||
|
|
||||||
public dynamic function onClick() {}
|
public dynamic function onClick() {}
|
||||||
|
|
||||||
public dynamic function onReady() {}
|
public dynamic function onReady() {}
|
||||||
|
|
||||||
function onLineShown(event:LineShown) {
|
function onLineShown(event:LineShown) {
|
||||||
if (dialogueBox != null) {
|
if (dialogueBox == null) {
|
||||||
dialogueBox.remove();
|
var d = new DialogueBoxComponent(event.line(), this.parent);
|
||||||
|
style.addObject(d);
|
||||||
|
dialogueBox = d;
|
||||||
|
} else {
|
||||||
|
dialogueBox.internalText = event.line();
|
||||||
}
|
}
|
||||||
var d = new DialogueBoxComponent(event.line(), this.parent);
|
|
||||||
style.addObject(d);
|
|
||||||
|
|
||||||
dialogueBox = d;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function onOptionsShown(event:OptionsShown) {
|
function onOptionsShown(event:OptionsShown) {
|
||||||
|
@ -69,6 +62,6 @@ class DialogueBoxController {
|
||||||
dialogueBox.remove();
|
dialogueBox.remove();
|
||||||
if (dialogueOptions != null)
|
if (dialogueOptions != null)
|
||||||
dialogueOptions.remove();
|
dialogueOptions.remove();
|
||||||
|
dialogueBox = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue