Make stagePositions a JsonMap
This commit is contained in:
@@ -44,13 +44,13 @@ enum FlxScreenPosition {
|
|||||||
class FlxMovie extends Movie<FlxSprite, FlxScreenPosition, ActorFlxSprite, FlxSound, String, FlxSprite, FlxSound, FlxCamera, FlxLightSource> {
|
class FlxMovie extends Movie<FlxSprite, FlxScreenPosition, ActorFlxSprite, FlxSound, String, FlxSprite, FlxSound, FlxCamera, FlxLightSource> {
|
||||||
// Think of HollywooFlixelDSL.kiss as the corresponding Kiss file for this class!
|
// Think of HollywooFlixelDSL.kiss as the corresponding Kiss file for this class!
|
||||||
|
|
||||||
public function new(director:FlxDirector, lightSourceJsonFile:String, ?voiceLinesAssetPath:String, ?positionsJson:String) {
|
public function new(director:FlxDirector, lightSourceJsonFile:String, positionsJson:String, ?voiceLinesAssetPath:String) {
|
||||||
var voiceLinesJson = null;
|
var voiceLinesJson = null;
|
||||||
if (voiceLinesAssetPath != null) {
|
if (voiceLinesAssetPath != null) {
|
||||||
voiceLinesJson = Assets.getText(voiceLinesAssetPath);
|
voiceLinesJson = Assets.getText(voiceLinesAssetPath);
|
||||||
}
|
}
|
||||||
|
|
||||||
super(director, lightSourceJsonFile, new FlxLightSource([], FlxColor.TRANSPARENT), voiceLinesJson, positionsJson);
|
super(director, lightSourceJsonFile, new FlxLightSource([], FlxColor.TRANSPARENT), positionsJson, voiceLinesJson);
|
||||||
}
|
}
|
||||||
public var uiCamera:FlxCamera;
|
public var uiCamera:FlxCamera;
|
||||||
public var screenCamera:FlxCamera;
|
public var screenCamera:FlxCamera;
|
||||||
|
|||||||
@@ -85,24 +85,24 @@
|
|||||||
(set DIALOG_WIDTH (- FlxG.width ACTOR_WIDTH ACTOR_WIDTH))
|
(set DIALOG_WIDTH (- FlxG.width ACTOR_WIDTH ACTOR_WIDTH))
|
||||||
(set DIALOG_HEIGHT (- FlxG.height DIALOG_Y))
|
(set DIALOG_HEIGHT (- FlxG.height DIALOG_Y))
|
||||||
#{
|
#{
|
||||||
stagePositions["Left"] = {
|
stagePositions.put("Left", new StagePosition(
|
||||||
x: STAGE_LEFT_X,
|
STAGE_LEFT_X,
|
||||||
y: ACTOR_Y,
|
ACTOR_Y,
|
||||||
z: 0.0
|
0.0
|
||||||
};
|
));
|
||||||
stagePositions["Right"] = {
|
stagePositions.put("Right", new StagePosition(
|
||||||
x: STAGE_RIGHT_X,
|
STAGE_RIGHT_X,
|
||||||
y: ACTOR_Y,
|
ACTOR_Y,
|
||||||
z: 0.0
|
0.0
|
||||||
};
|
));
|
||||||
stagePositions["Left2"] = {
|
stagePositions.put("Left2", new StagePosition(
|
||||||
x: STAGE_LEFT_X,
|
STAGE_LEFT_X,
|
||||||
y: ACTOR_Y,
|
ACTOR_Y,
|
||||||
z: STAGE_BEHIND_DY
|
STAGE_BEHIND_DY
|
||||||
};
|
));
|
||||||
stagePositions["Right2"] = {
|
stagePositions.put("Right2", new StagePosition(
|
||||||
x: STAGE_RIGHT_X,
|
STAGE_RIGHT_X,
|
||||||
y: ACTOR_Y,
|
ACTOR_Y,
|
||||||
z: STAGE_BEHIND_DY
|
STAGE_BEHIND_DY
|
||||||
};
|
));
|
||||||
}#)
|
}#)
|
||||||
Reference in New Issue
Block a user