Overhaul hollywoo & hollywoo-flixel. Close #178
This commit is contained in:
@@ -3,12 +3,13 @@ package hollywoo_flixel;
|
||||
import flixel.FlxState;
|
||||
import flixel.FlxSprite;
|
||||
import flixel.system.FlxSound;
|
||||
import hollywoo.Director;
|
||||
import hollywoo.Movie;
|
||||
import hollywoo_flixel.ActorFlxSprite;
|
||||
import hollywoo_flixel.SceneFlxState;
|
||||
import kiss_flixel.SpriteTools;
|
||||
import openfl.Assets;
|
||||
|
||||
/*
|
||||
enum FlxStagePosition {
|
||||
Left;
|
||||
Right;
|
||||
@@ -19,11 +20,7 @@ enum FlxStagePosition {
|
||||
// AND don't move the object automatically for any reason
|
||||
FullControl(layer:Int, pos:RelativePosition);
|
||||
}
|
||||
|
||||
enum FlxStageFacing {
|
||||
Left;
|
||||
Right;
|
||||
}
|
||||
*/
|
||||
|
||||
enum FlxScreenPosition {
|
||||
// Shortcuts
|
||||
@@ -42,7 +39,7 @@ enum FlxScreenPosition {
|
||||
/**
|
||||
* Model/controller of a Hollywoo-Flixel film, and main execution script
|
||||
*/
|
||||
class FlxMovie extends Movie<String, FlxStagePosition, FlxStageFacing, FlxScreenPosition, ActorFlxSprite, FlxSound, String, FlxSprite, FlxSound> {
|
||||
class FlxMovie extends Movie<FlxSprite, FlxScreenPosition, ActorFlxSprite, FlxSound, String, FlxSprite, FlxSound> {
|
||||
// Think of HollywooFlixelDSL.kiss as the corresponding Kiss file for this class!
|
||||
|
||||
public function new(director:FlxDirector, ?voiceLinesAssetPath:String) {
|
||||
@@ -50,6 +47,28 @@ class FlxMovie extends Movie<String, FlxStagePosition, FlxStageFacing, FlxScreen
|
||||
if (voiceLinesAssetPath != null) {
|
||||
voiceLinesJson = Assets.getText(voiceLinesAssetPath);
|
||||
}
|
||||
|
||||
super(director, voiceLinesJson);
|
||||
|
||||
stagePositions["Left"] = {
|
||||
x: FlxDirector.STAGE_LEFT_X,
|
||||
y: FlxDirector.ACTOR_Y,
|
||||
z: 0.0
|
||||
};
|
||||
stagePositions["Right"] = {
|
||||
x: FlxDirector.STAGE_RIGHT_X,
|
||||
y: FlxDirector.ACTOR_Y,
|
||||
z: 0.0
|
||||
};
|
||||
stagePositions["Left2"] = {
|
||||
x: FlxDirector.STAGE_LEFT_X,
|
||||
y: FlxDirector.ACTOR_Y,
|
||||
z: FlxDirector.STAGE_BEHIND_DY
|
||||
};
|
||||
stagePositions["Right2"] = {
|
||||
x: FlxDirector.STAGE_RIGHT_X,
|
||||
y: FlxDirector.ACTOR_Y,
|
||||
z: FlxDirector.STAGE_BEHIND_DY
|
||||
};
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user