Add Jsonable LightSource type param to Hollywoo
This commit is contained in:
@@ -23,4 +23,4 @@ import kiss_flixel.SpriteTools;
|
|||||||
import haxe.ds.Option;
|
import haxe.ds.Option;
|
||||||
|
|
||||||
@:build(kiss.Kiss.build())
|
@:build(kiss.Kiss.build())
|
||||||
class FlxDirector implements Director<FlxSprite, FlxScreenPosition, ActorFlxSprite, FlxSound, String, FlxSprite, FlxSound, FlxCamera> {}
|
class FlxDirector implements Director<FlxSprite, FlxScreenPosition, ActorFlxSprite, FlxSound, String, FlxSprite, FlxSound, FlxCamera, FlxLightSource> {}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
(prop :FlxActionDigital continueAction)
|
(prop :FlxActionDigital continueAction)
|
||||||
(prop actionManager (new FlxActionManager))
|
(prop actionManager (new FlxActionManager))
|
||||||
(prop &mut :Movie<FlxSprite,FlxScreenPosition,ActorFlxSprite,FlxSound,String,FlxSprite,FlxSound,FlxCamera> movie)
|
(prop &mut :Movie<FlxSprite,FlxScreenPosition,ActorFlxSprite,FlxSound,String,FlxSprite,FlxSound,FlxCamera,FlxLightSource> movie)
|
||||||
(defAlias &ident flxMovie (cast movie FlxMovie))
|
(defAlias &ident flxMovie (cast movie FlxMovie))
|
||||||
(loadFrom "hollywoo-flixel" "src/hollywoo_flixel/Aliases.kiss")
|
(loadFrom "hollywoo-flixel" "src/hollywoo_flixel/Aliases.kiss")
|
||||||
|
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ enum FlxScreenPosition {
|
|||||||
/**
|
/**
|
||||||
* Model/controller of a Hollywoo-Flixel film, and main execution script
|
* Model/controller of a Hollywoo-Flixel film, and main execution script
|
||||||
*/
|
*/
|
||||||
class FlxMovie extends Movie<FlxSprite, FlxScreenPosition, ActorFlxSprite, FlxSound, String, FlxSprite, FlxSound, FlxCamera> {
|
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, ?voiceLinesAssetPath:String) {
|
public function new(director:FlxDirector, ?voiceLinesAssetPath:String) {
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ package hollywoo;
|
|||||||
import hollywoo.Scene;
|
import hollywoo.Scene;
|
||||||
import hollywoo.Movie;
|
import hollywoo.Movie;
|
||||||
import haxe.ds.Option;
|
import haxe.ds.Option;
|
||||||
|
import kiss_tools.JsonMap;
|
||||||
|
|
||||||
enum Appearance {
|
enum Appearance {
|
||||||
FirstAppearance;
|
FirstAppearance;
|
||||||
@@ -29,8 +30,8 @@ typedef AutoZConfig = {
|
|||||||
frontLayer:Int
|
frontLayer:Int
|
||||||
};
|
};
|
||||||
|
|
||||||
interface Director<Set:Cloneable<Set>, ScreenPosition, Actor, Sound, Song, Prop, VoiceTrack, Camera> {
|
interface Director<Set:Cloneable<Set>, ScreenPosition, Actor, Sound, Song, Prop, VoiceTrack, Camera, LightSource:Jsonable<LightSource>> {
|
||||||
var movie(default, default):Movie<Set, ScreenPosition, Actor, Sound, Song, Prop, VoiceTrack, Camera>;
|
var movie(default, default):Movie<Set, ScreenPosition, Actor, Sound, Song, Prop, VoiceTrack, Camera, LightSource>;
|
||||||
function autoZConfig():Option<AutoZConfig>;
|
function autoZConfig():Option<AutoZConfig>;
|
||||||
function showSet(set:Set, time:SceneTime, perspective:ScenePerspective, appearance:Appearance, camera:Camera, cc:Continuation):Void;
|
function showSet(set:Set, time:SceneTime, perspective:ScenePerspective, appearance:Appearance, camera:Camera, cc:Continuation):Void;
|
||||||
function hideSet(set:Set, camera: Camera, cc:Continuation):Void;
|
function hideSet(set:Set, camera: Camera, cc:Continuation):Void;
|
||||||
|
|||||||
@@ -11,6 +11,8 @@ import hollywoo.Director;
|
|||||||
import haxe.Json;
|
import haxe.Json;
|
||||||
import uuid.Uuid;
|
import uuid.Uuid;
|
||||||
import haxe.ds.Option;
|
import haxe.ds.Option;
|
||||||
|
import kiss_tools.JsonMap;
|
||||||
|
import kiss_tools.JsonableArray;
|
||||||
|
|
||||||
using kiss.FuzzyMapTools;
|
using kiss.FuzzyMapTools;
|
||||||
|
|
||||||
@@ -42,4 +44,4 @@ enum CreditsLine {
|
|||||||
* Model/controller of a Hollywoo film, and main execution script
|
* Model/controller of a Hollywoo film, and main execution script
|
||||||
*/
|
*/
|
||||||
@:build(kiss.Kiss.build())
|
@:build(kiss.Kiss.build())
|
||||||
class Movie<Set:Cloneable<Set>, ScreenPosition, Actor, Sound, Song, Prop, VoiceTrack, Camera> extends AsyncEmbeddedScript {}
|
class Movie<Set:Cloneable<Set>, ScreenPosition, Actor, Sound, Song, Prop, VoiceTrack, Camera, LightSource:Jsonable<LightSource>> extends AsyncEmbeddedScript {}
|
||||||
|
|||||||
@@ -141,7 +141,7 @@
|
|||||||
(defNew
|
(defNew
|
||||||
[
|
[
|
||||||
// "View" in the Model-View-Controller architecture:
|
// "View" in the Model-View-Controller architecture:
|
||||||
&prop :Director<Set,ScreenPosition,Actor,Sound,Song,Prop,VoiceTrack,Camera> director
|
&prop :Director<Set,ScreenPosition,Actor,Sound,Song,Prop,VoiceTrack,Camera,LightSource> director
|
||||||
&opt :String voiceLinesJson
|
&opt :String voiceLinesJson
|
||||||
&opt :String positionsJson
|
&opt :String positionsJson
|
||||||
]
|
]
|
||||||
|
|||||||
Reference in New Issue
Block a user