Compare commits
7 Commits
b16b27e03d
...
c768073503
Author | SHA1 | Date | |
---|---|---|---|
c768073503 | |||
32885707de | |||
bb7690e606 | |||
4b00d713a9 | |||
8be7c18d4f | |||
fd6b9ee8dd | |||
808958f7cc |
2
.gitignore
vendored
2
.gitignore
vendored
@ -1 +1,3 @@
|
|||||||
/bin/*
|
/bin/*
|
||||||
|
/res/.tmp/
|
||||||
|
/res/rewild.tiled-*
|
||||||
|
23
TODO.md
Normal file
23
TODO.md
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
# TODO
|
||||||
|
|
||||||
|
## Features
|
||||||
|
|
||||||
|
- Saving and loading games
|
||||||
|
- Character select
|
||||||
|
- Stats
|
||||||
|
- Better open / closed state graphics for rooms
|
||||||
|
- Displaying sprites (characters, objects)
|
||||||
|
- Inventory
|
||||||
|
- Room labels
|
||||||
|
- Background music
|
||||||
|
- Sound effects
|
||||||
|
|
||||||
|
### Dialogue
|
||||||
|
|
||||||
|
- Text formatting
|
||||||
|
- Character profiles / speaker ID
|
||||||
|
|
||||||
|
## Code architecture
|
||||||
|
|
||||||
|
- Move dialogue- and option-drawing out of `Game.hx`
|
||||||
|
- Use domkit for dialogue
|
@ -1 +0,0 @@
|
|||||||
by25:minecraftia_regular_6.fntaoy3:veri1y4:timei1707771858y4:hashy40:985b62563507866445c3c81a04f7e6645d90dad5y3:outy33:.tmp%2Fminecraftia_regular_6.bfntghy40:font%2Fpixel_unicode%2FPixel-UniCode.fntaoR1i1R2i1707784556R3y40:bc4073da70385f93ae70e391a786e346daac2b1fR5y48:.tmp%2Ffont%2Fpixel_unicode%2FPixel-UniCode.bfntghy32:font%2Fminecraftia_regular_6.fntaoR1i1R2i1707771858R3R4R5y40:.tmp%2Ffont%2Fminecraftia_regular_6.bfntghh
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,14 +0,0 @@
|
|||||||
{
|
|
||||||
"automappingRulesFile": "",
|
|
||||||
"commands": [
|
|
||||||
],
|
|
||||||
"compatibilityVersion": 1100,
|
|
||||||
"extensionsPath": "extensions",
|
|
||||||
"folders": [
|
|
||||||
"."
|
|
||||||
],
|
|
||||||
"properties": [
|
|
||||||
],
|
|
||||||
"propertyTypes": [
|
|
||||||
]
|
|
||||||
}
|
|
@ -1,45 +0,0 @@
|
|||||||
{
|
|
||||||
"activeFile": "map.tmx",
|
|
||||||
"expandedProjectPaths": [
|
|
||||||
],
|
|
||||||
"fileStates": {
|
|
||||||
"/home/f/Projects/Rewild/references/ld28/res/map.tmx": {
|
|
||||||
"scale": 1.5684895833333334,
|
|
||||||
"selectedLayer": 6,
|
|
||||||
"viewCenter": {
|
|
||||||
"x": 191.90436659472022,
|
|
||||||
"y": 144.08766395483977
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"/home/f/Projects/Rewild/references/ld28/res/map.tmx#tiles": {
|
|
||||||
"scaleInDock": 1
|
|
||||||
},
|
|
||||||
"/home/f/Projects/Rewild/references/ld28/res/spaaace.tsx": {
|
|
||||||
"scaleInEditor": 1
|
|
||||||
},
|
|
||||||
"map.tmx": {
|
|
||||||
"expandedObjectLayers": [
|
|
||||||
3
|
|
||||||
],
|
|
||||||
"scale": 0.75,
|
|
||||||
"selectedLayer": 1,
|
|
||||||
"viewCenter": {
|
|
||||||
"x": 479.3333333333333,
|
|
||||||
"y": 320
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"map.tmx#tiles": {
|
|
||||||
"scaleInDock": 1
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"openFiles": [
|
|
||||||
"map.tmx",
|
|
||||||
"/home/f/Projects/Rewild/references/ld28/res/map.tmx"
|
|
||||||
],
|
|
||||||
"project": "rewild.tiled-project",
|
|
||||||
"recentFiles": [
|
|
||||||
"/home/f/Projects/Rewild/references/ld28/res/map.tmx",
|
|
||||||
"map.tmx",
|
|
||||||
"/home/f/Projects/Rewild/references/ld28/res/spaaace.tsx"
|
|
||||||
]
|
|
||||||
}
|
|
@ -10,35 +10,3 @@ You: What happened to the updates from mission control?
|
|||||||
You: Let's have another look around...
|
You: Let's have another look around...
|
||||||
<<room quarters>>
|
<<room quarters>>
|
||||||
===
|
===
|
||||||
title: Room:quarters
|
|
||||||
---
|
|
||||||
<<declare $roll = 0>>
|
|
||||||
// You: It's the crew quarters.
|
|
||||||
// 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: ...but it doesn't exactly seem like a priority now.
|
|
||||||
You: Maybe there's something useful here?
|
|
||||||
-> Search the lockers [perception]
|
|
||||||
<<set $roll to dice(6)>>
|
|
||||||
<<if $roll > 2>>
|
|
||||||
You: Aha! A small piece of paper with the **hangar access code**.
|
|
||||||
<<room hangar>>
|
|
||||||
<<else>>
|
|
||||||
You: Just some dust bunnies. Guess they stowed away from Earth.
|
|
||||||
<<endif>>
|
|
||||||
-> Set up a sleeping mat [ingenuity]
|
|
||||||
<<set $roll to dice(6)>>
|
|
||||||
<<if $roll > 2>>
|
|
||||||
You: Nice, at least I have somewhere to crash now.
|
|
||||||
<<else>>
|
|
||||||
You: Hmm, I was never good at this camping stuff. Maybe I can find somewhere else to rest.
|
|
||||||
<<endif>>
|
|
||||||
===
|
|
||||||
title: Room:hangar
|
|
||||||
---
|
|
||||||
You: The **hangar** seems eerily deserted
|
|
||||||
===
|
|
||||||
title: Room not open
|
|
||||||
---
|
|
||||||
You: Hmm, that part of the ship is still inaccessible. I wonder how to get in?
|
|
||||||
===
|
|
||||||
|
37
res/text/rooms.yarn
Normal file
37
res/text/rooms.yarn
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
title: Room:quarters
|
||||||
|
---
|
||||||
|
<<declare $roll = 0>>
|
||||||
|
<<declare $hangarKeyFound = false>>
|
||||||
|
<<declare $sleepingMatSetUp = false>>
|
||||||
|
You: It's the crew quarters.
|
||||||
|
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: ...but it doesn't exactly seem like a priority now.
|
||||||
|
You: Maybe there's something useful here?
|
||||||
|
-> Search the lockers (perception) <<if not $hangarKeyFound>>
|
||||||
|
<<set $roll to dice(6)>>
|
||||||
|
<<if $roll > 2>>
|
||||||
|
You: Aha! A small piece of paper with the **hangar access code**.
|
||||||
|
<<room hangar>>
|
||||||
|
<<set $hangarKeyFound to true>>
|
||||||
|
<<else>>
|
||||||
|
You: Just some dust bunnies. Guess they stowed away from Earth.
|
||||||
|
<<endif>>
|
||||||
|
-> Set up a sleeping mat (ingenuity) <<if not $sleepingMatSetUp>>
|
||||||
|
<<set $roll to dice(6)>>
|
||||||
|
<<if $roll > 2>>
|
||||||
|
You: Nice, at least I have somewhere to crash now.
|
||||||
|
<<set $sleepingMatSetUp to true>>
|
||||||
|
<<else>>
|
||||||
|
You: Hmm, I was never good at this camping stuff. Maybe I can find somewhere else to rest.
|
||||||
|
<<endif>>
|
||||||
|
-> Leave
|
||||||
|
===
|
||||||
|
title: Room:hangar
|
||||||
|
---
|
||||||
|
You: The **hangar** seems eerily deserted.
|
||||||
|
===
|
||||||
|
title: Room not open
|
||||||
|
---
|
||||||
|
You: Hmm, that part of the ship is still inaccessible. I wonder how to get in?
|
||||||
|
===
|
25
src/Game.hx
25
src/Game.hx
@ -1,22 +1,19 @@
|
|||||||
import h2d.Layers;
|
import h2d.Layers;
|
||||||
import h2d.Console;
|
import h2d.Console;
|
||||||
|
import h3d.Vector4;
|
||||||
import scene.TitleScene;
|
import scene.TitleScene;
|
||||||
import scene.WorldMapScene;
|
import scene.WorldMapScene;
|
||||||
import scene.GameScene;
|
import scene.GameScene;
|
||||||
import event.EventBus;
|
import event.EventBus;
|
||||||
import event.ChangeSceneEvent;
|
import event.ChangeSceneEvent;
|
||||||
|
|
||||||
import Const;
|
import Const;
|
||||||
import dialogue.DialogueBox;
|
import dialogue.DialogueBox;
|
||||||
import dialogue.DialogueManager;
|
import dialogue.DialogueManager;
|
||||||
|
|
||||||
import dialogue.event.LineShown;
|
import dialogue.event.LineShown;
|
||||||
import dialogue.event.OptionsShown;
|
import dialogue.event.OptionsShown;
|
||||||
import dialogue.event.OptionSelected;
|
import dialogue.event.OptionSelected;
|
||||||
import dialogue.event.DialogueComplete;
|
import dialogue.event.DialogueComplete;
|
||||||
import dialogue.event.NextLine;
|
import dialogue.event.NextLine;
|
||||||
|
|
||||||
import dialogue.command.OpenRoomCommand;
|
import dialogue.command.OpenRoomCommand;
|
||||||
|
|
||||||
@:uiComp("game-container")
|
@:uiComp("game-container")
|
||||||
@ -40,11 +37,14 @@ class Game extends hxd.App {
|
|||||||
public var dialogueManager:DialogueManager;
|
public var dialogueManager:DialogueManager;
|
||||||
|
|
||||||
public var globalEventBus:EventBus;
|
public var globalEventBus:EventBus;
|
||||||
|
|
||||||
public static var current:Game; // Current Game (singleton)
|
public static var current:Game; // Current Game (singleton)
|
||||||
|
|
||||||
var layer:Layers;
|
var layer:Layers;
|
||||||
|
|
||||||
public var root:GameContainer;
|
public var root:GameContainer;
|
||||||
public var console:Console;
|
public var console:Console;
|
||||||
|
|
||||||
var style = null;
|
var style = null;
|
||||||
|
|
||||||
public static var loader = new tiled.Tiled();
|
public static var loader = new tiled.Tiled();
|
||||||
@ -85,12 +85,8 @@ class Game extends hxd.App {
|
|||||||
|
|
||||||
dialogueManager = new DialogueManager(globalEventBus);
|
dialogueManager = new DialogueManager(globalEventBus);
|
||||||
|
|
||||||
var yarnText = [
|
var yarnText = [hxd.Res.text.intro.entry.getText(), hxd.Res.text.rooms.entry.getText(),];
|
||||||
hxd.Res.text.intro.entry.getText(),
|
var yarnFileNames = [hxd.Res.text.intro.entry.name, hxd.Res.text.rooms.entry.name,];
|
||||||
];
|
|
||||||
var yarnFileNames = [
|
|
||||||
hxd.Res.text.intro.entry.name,
|
|
||||||
];
|
|
||||||
dialogueManager.load(yarnText, yarnFileNames);
|
dialogueManager.load(yarnText, yarnFileNames);
|
||||||
|
|
||||||
globalEventBus.subscribe(LineShown, dialogue);
|
globalEventBus.subscribe(LineShown, dialogue);
|
||||||
@ -135,8 +131,10 @@ class Game extends hxd.App {
|
|||||||
|
|
||||||
function renderOptions(event:OptionsShown) {
|
function renderOptions(event:OptionsShown) {
|
||||||
for (option in event.options) {
|
for (option in event.options) {
|
||||||
addOption(option.text, function() {
|
addOption(option.text, option.enabled, function() {
|
||||||
|
if (option.enabled) {
|
||||||
globalEventBus.publishEvent(new OptionSelected(option.index));
|
globalEventBus.publishEvent(new OptionSelected(option.index));
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -150,10 +148,13 @@ class Game extends hxd.App {
|
|||||||
return g;
|
return g;
|
||||||
}
|
}
|
||||||
|
|
||||||
function addOption(o: String, callback: () -> Void) {
|
function addOption(o:String, enabled:Bool, callback:() -> Void) {
|
||||||
var spr = newPanel(Const.W, 60);
|
var spr = newPanel(Const.W, 60);
|
||||||
curDialogue.addChild(spr);
|
curDialogue.addChild(spr);
|
||||||
var tf = new h2d.Text(font, spr);
|
var tf = new h2d.Text(font, spr);
|
||||||
|
if (!enabled) {
|
||||||
|
tf.color = new Vector4(0.5, 0.5, 0.5, 1);
|
||||||
|
}
|
||||||
tf.text = o;
|
tf.text = o;
|
||||||
tf.x = 10;
|
tf.x = 10;
|
||||||
tf.y = 10;
|
tf.y = 10;
|
||||||
|
@ -1,17 +1,16 @@
|
|||||||
import h2d.col.Point;
|
import h2d.col.Point;
|
||||||
import h2d.Object;
|
import h2d.Object;
|
||||||
import h2d.SpriteBatch;
|
import h2d.SpriteBatch;
|
||||||
|
|
||||||
import tiled.types.TmxLayer;
|
import tiled.types.TmxLayer;
|
||||||
import tiled.types.TmxMap;
|
import tiled.types.TmxMap;
|
||||||
|
|
||||||
using tiled.TiledTools;
|
using tiled.TiledTools;
|
||||||
|
|
||||||
class TilemapLayer extends h2d.TileGroup {
|
class TilemapLayer extends h2d.TileGroup {
|
||||||
|
|
||||||
public var map:TmxMap;
|
public var map:TmxMap;
|
||||||
public var layer:TmxLayer;
|
public var layer:TmxLayer;
|
||||||
|
|
||||||
public function new (map:TmxMap, layer:TmxLayer, ?parent:Object) {
|
public function new(map:TmxMap, layer:TmxLayer, ?parent:Object) {
|
||||||
this.map = map;
|
this.map = map;
|
||||||
this.layer = layer;
|
this.layer = layer;
|
||||||
super(parent);
|
super(parent);
|
||||||
@ -41,12 +40,19 @@ class TilemapLayer extends h2d.TileGroup {
|
|||||||
var t = tsets.getImage(gid);
|
var t = tsets.getImage(gid);
|
||||||
var x = cx + ix * tw;
|
var x = cx + ix * tw;
|
||||||
var y = cy + iy * th + th - t.height;
|
var y = cy + iy * th + th - t.height;
|
||||||
if (gid.flippedHorizontally) addTransform(x + t.width, y, -1, 1, 0, t);
|
if (gid.flippedHorizontally)
|
||||||
else if (gid.flippedVertically) addTransform(x, y + t.height, 1, -1, 0, t);
|
addTransform(x + t.width, y, -1, 1, 0, t);
|
||||||
else if (gid.flippedDiagonally) addTransform(x + t.width, y + t.height, -1, -1, 0, t);
|
else if (gid.flippedVertically)
|
||||||
else add(x, y, t);
|
addTransform(x, y + t.height, 1, -1, 0, t);
|
||||||
|
else if (gid.flippedDiagonally)
|
||||||
|
addTransform(x + t.width, y + t.height, -1, -1, 0, t);
|
||||||
|
else
|
||||||
|
add(x, y, t);
|
||||||
|
}
|
||||||
|
if (++ix == chunk.width) {
|
||||||
|
iy++;
|
||||||
|
ix = 0;
|
||||||
}
|
}
|
||||||
if (++ix == chunk.width) { iy++; ix = 0; }
|
|
||||||
}
|
}
|
||||||
case Isometric:
|
case Isometric:
|
||||||
var isoW = tw >> 1;
|
var isoW = tw >> 1;
|
||||||
@ -60,15 +66,25 @@ class TilemapLayer extends h2d.TileGroup {
|
|||||||
var t = tsets.getImage(gid);
|
var t = tsets.getImage(gid);
|
||||||
var x = cx + (ix - iy) * isoW;
|
var x = cx + (ix - iy) * isoW;
|
||||||
var y = cy + (ix + iy) * isoH + th - t.height;
|
var y = cy + (ix + iy) * isoH + th - t.height;
|
||||||
if (gid.flippedHorizontally) addTransform(x + t.width, y, -1, 1, 0, t);
|
if (gid.flippedHorizontally)
|
||||||
else if (gid.flippedVertically) addTransform(x, y + t.height, 1, -1, 0, t);
|
addTransform(x + t.width, y, -1, 1, 0, t);
|
||||||
else if (gid.flippedDiagonally) addTransform(x + t.width, y + t.height, -1, -1, 0, t);
|
else if (gid.flippedVertically)
|
||||||
else add(x, y, t);
|
addTransform(x, y + t.height, 1, -1, 0, t);
|
||||||
|
else if (gid.flippedDiagonally)
|
||||||
|
addTransform(x + t.width, y + t.height, -1, -1, 0, t);
|
||||||
|
else
|
||||||
|
add(x, y, t);
|
||||||
|
}
|
||||||
|
if (++ix == chunk.width) {
|
||||||
|
iy++;
|
||||||
|
ix = 0;
|
||||||
}
|
}
|
||||||
if (++ix == chunk.width) { iy++; ix = 0; }
|
|
||||||
}
|
}
|
||||||
case Staggered(staggerYAxis, staggerIndexOdd):
|
case Staggered(staggerYAxis, staggerIndexOdd):
|
||||||
var staggerX = 0, staggerY = 0, stepX = tw >> 1, stepY = th >> 1;
|
var staggerX = 0,
|
||||||
|
staggerY = 0,
|
||||||
|
stepX = tw >> 1,
|
||||||
|
stepY = th >> 1;
|
||||||
var cx = chunk.x * stepX + layer.offsetX;
|
var cx = chunk.x * stepX + layer.offsetX;
|
||||||
var cy = chunk.y * stepY + layer.offsetY;
|
var cy = chunk.y * stepY + layer.offsetY;
|
||||||
if (staggerYAxis) {
|
if (staggerYAxis) {
|
||||||
@ -94,12 +110,19 @@ class TilemapLayer extends h2d.TileGroup {
|
|||||||
var t = tsets.getImage(gid);
|
var t = tsets.getImage(gid);
|
||||||
var x = cx + ix * stepX + staggerX * (ix % 1);
|
var x = cx + ix * stepX + staggerX * (ix % 1);
|
||||||
var y = cy + iy * stepY + th - t.height;
|
var y = cy + iy * stepY + th - t.height;
|
||||||
if (gid.flippedHorizontally) addTransform(x + t.width, y, -1, 1, 0, t);
|
if (gid.flippedHorizontally)
|
||||||
else if (gid.flippedVertically) addTransform(x, y + t.height, 1, -1, 0, t);
|
addTransform(x + t.width, y, -1, 1, 0, t);
|
||||||
else if (gid.flippedDiagonally) addTransform(x + t.width, y + t.height, -1, -1, 0, t);
|
else if (gid.flippedVertically)
|
||||||
else add(x, y, t);
|
addTransform(x, y + t.height, 1, -1, 0, t);
|
||||||
|
else if (gid.flippedDiagonally)
|
||||||
|
addTransform(x + t.width, y + t.height, -1, -1, 0, t);
|
||||||
|
else
|
||||||
|
add(x, y, t);
|
||||||
|
}
|
||||||
|
if (++ix == chunk.width) {
|
||||||
|
iy++;
|
||||||
|
ix = 0;
|
||||||
}
|
}
|
||||||
if (++ix == chunk.width) { iy++; ix = 0; }
|
|
||||||
}
|
}
|
||||||
case Hexagonal(sideLength, staggerYAxis, staggerIndexOdd):
|
case Hexagonal(sideLength, staggerYAxis, staggerIndexOdd):
|
||||||
// TODO: Fix
|
// TODO: Fix
|
||||||
@ -134,19 +157,26 @@ class TilemapLayer extends h2d.TileGroup {
|
|||||||
var t = tsets.getImage(gid);
|
var t = tsets.getImage(gid);
|
||||||
var x = cx + ix * stepX;
|
var x = cx + ix * stepX;
|
||||||
var y = cy + iy * stepY + th - t.height;
|
var y = cy + iy * stepY + th - t.height;
|
||||||
if (gid.flippedHorizontally) addTransform(x + t.width, y, -1, 1, 0, t);
|
if (gid.flippedHorizontally)
|
||||||
else if (gid.flippedVertically) addTransform(x, y + t.height, 1, -1, 0, t);
|
addTransform(x + t.width, y, -1, 1, 0, t);
|
||||||
else if (gid.flippedDiagonally) addTransform(x + t.width, y + t.height, -1, -1, 0, t);
|
else if (gid.flippedVertically)
|
||||||
else add(x, y, t);
|
addTransform(x, y + t.height, 1, -1, 0, t);
|
||||||
|
else if (gid.flippedDiagonally)
|
||||||
|
addTransform(x + t.width, y + t.height, -1, -1, 0, t);
|
||||||
|
else
|
||||||
|
add(x, y, t);
|
||||||
|
}
|
||||||
|
if (++ix == chunk.width) {
|
||||||
|
iy++;
|
||||||
|
ix = 0;
|
||||||
}
|
}
|
||||||
if (++ix == chunk.width) { iy++; ix = 0; }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function addTile(tx:Int, ty:Int, ox:Float, oy:Float, gid:TmxTileIndex) {
|
public function addTile(tx:Int, ty:Int, ox:Float, oy:Float, gid:TmxTileIndex) {
|
||||||
if (gid == 0) return;
|
if (gid == 0)
|
||||||
|
return;
|
||||||
var t = map.tilesets.getImage(gid);
|
var t = map.tilesets.getImage(gid);
|
||||||
if (t != null) {
|
if (t != null) {
|
||||||
var x, y;
|
var x, y;
|
||||||
@ -186,12 +216,14 @@ class TilemapLayer extends h2d.TileGroup {
|
|||||||
y = ty * map.tileHeight + ((tx + 1) % 2) * (map.tileHeight >> 1);
|
y = ty * map.tileHeight + ((tx + 1) % 2) * (map.tileHeight >> 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (gid.flippedHorizontally) addTransform(x + t.width, y, -1, 1, 0, t);
|
if (gid.flippedHorizontally)
|
||||||
else if (gid.flippedVertically) addTransform(x, y + t.height, 1, -1, 0, t);
|
addTransform(x + t.width, y, -1, 1, 0, t);
|
||||||
else if (gid.flippedDiagonally) addTransform(x + t.width, y + t.height, -1, -1, 0, t);
|
else if (gid.flippedVertically)
|
||||||
else add(x, y, t);
|
addTransform(x, y + t.height, 1, -1, 0, t);
|
||||||
|
else if (gid.flippedDiagonally)
|
||||||
|
addTransform(x + t.width, y + t.height, -1, -1, 0, t);
|
||||||
|
else
|
||||||
|
add(x, y, t);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -10,7 +10,6 @@ import hxyarn.dialogue.OptionSet;
|
|||||||
import hxyarn.dialogue.markup.MarkupParseResult;
|
import hxyarn.dialogue.markup.MarkupParseResult;
|
||||||
import hxyarn.compiler.Compiler;
|
import hxyarn.compiler.Compiler;
|
||||||
import hxyarn.compiler.CompilationJob;
|
import hxyarn.compiler.CompilationJob;
|
||||||
|
|
||||||
import event.EventBus;
|
import event.EventBus;
|
||||||
import dialogue.command.ICommandHandler;
|
import dialogue.command.ICommandHandler;
|
||||||
import dialogue.event.LineShown;
|
import dialogue.event.LineShown;
|
||||||
@ -72,11 +71,9 @@ class DialogueManager {
|
|||||||
dialogue.resume();
|
dialogue.resume();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function logDebugMessage(message:String):Void {
|
public function logDebugMessage(message:String):Void {}
|
||||||
}
|
|
||||||
|
|
||||||
public function logErrorMessage(message:String):Void {
|
public function logErrorMessage(message:String):Void {}
|
||||||
}
|
|
||||||
|
|
||||||
public function nextLine(event:NextLine) {
|
public function nextLine(event:NextLine) {
|
||||||
if ((dialogue.isActive()) && (!waitingForOption))
|
if ((dialogue.isActive()) && (!waitingForOption))
|
||||||
|
@ -1,9 +1,7 @@
|
|||||||
package scene;
|
package scene;
|
||||||
|
|
||||||
import scene.WorldMapScene;
|
import scene.WorldMapScene;
|
||||||
|
|
||||||
import event.ChangeSceneEvent;
|
import event.ChangeSceneEvent;
|
||||||
|
|
||||||
import components.MenubuttonComponent;
|
import components.MenubuttonComponent;
|
||||||
|
|
||||||
@:uiComp("heading")
|
@:uiComp("heading")
|
||||||
@ -46,7 +44,6 @@ class TitleScene extends h2d.Flow implements GameScene implements h2d.domkit.Obj
|
|||||||
#else
|
#else
|
||||||
btnQuit.remove();
|
btnQuit.remove();
|
||||||
#end
|
#end
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getH2dObject() {
|
public function getH2dObject() {
|
||||||
|
@ -15,7 +15,7 @@ class WorldMapScene extends h2d.Flow implements GameScene implements h2d.domkit.
|
|||||||
public var width:Int;
|
public var width:Int;
|
||||||
public var height:Int;
|
public var height:Int;
|
||||||
|
|
||||||
var rooms:Map<String,Room> = new Map<String,Room>();
|
var rooms:Map<String, Room> = new Map<String, Room>();
|
||||||
|
|
||||||
public function new(?parent) {
|
public function new(?parent) {
|
||||||
super(parent);
|
super(parent);
|
||||||
@ -28,7 +28,7 @@ class WorldMapScene extends h2d.Flow implements GameScene implements h2d.domkit.
|
|||||||
Game.current.globalEventBus.subscribe(OpenRoomEvent, openRoom);
|
Game.current.globalEventBus.subscribe(OpenRoomEvent, openRoom);
|
||||||
|
|
||||||
for (layer in (map.layers)) {
|
for (layer in (map.layers)) {
|
||||||
switch(layer.kind) {
|
switch (layer.kind) {
|
||||||
case TTileLayer:
|
case TTileLayer:
|
||||||
var l = new TilemapLayer(map, layer, root);
|
var l = new TilemapLayer(map, layer, root);
|
||||||
case TObjectGroup:
|
case TObjectGroup:
|
||||||
@ -42,7 +42,6 @@ class WorldMapScene extends h2d.Flow implements GameScene implements h2d.domkit.
|
|||||||
area.x = obj.x;
|
area.x = obj.x;
|
||||||
area.y = obj.y;
|
area.y = obj.y;
|
||||||
area.onClick = function(_) {
|
area.onClick = function(_) {
|
||||||
trace("Room:" + obj.name);
|
|
||||||
var room = rooms.get(obj.name);
|
var room = rooms.get(obj.name);
|
||||||
if (room.isOpen) {
|
if (room.isOpen) {
|
||||||
Game.current.globalEventBus.publishEvent(new StartDialogueNode("Room:" + obj.name));
|
Game.current.globalEventBus.publishEvent(new StartDialogueNode("Room:" + obj.name));
|
||||||
|
Reference in New Issue
Block a user