more cludge on the cludge pile to fix getProp/ActorName
This commit is contained in:
@@ -64,6 +64,9 @@ interface Director<Set, Actor, Sound, Song, Prop, VoiceTrack, Camera, LightSourc
|
|||||||
function showCharacter(character:Character<Actor>, appearance:Appearance, camera:Camera, cc:Continuation):Void;
|
function showCharacter(character:Character<Actor>, appearance:Appearance, camera:Camera, cc:Continuation):Void;
|
||||||
function hideCharacter(character:Character<Actor>, camera:Camera, cc:Continuation):Void;
|
function hideCharacter(character:Character<Actor>, camera:Camera, cc:Continuation):Void;
|
||||||
|
|
||||||
|
function propEquals(propA:Prop, propB:Prop):Bool;
|
||||||
|
function actorEquals(propA:Actor, propB:Actor):Bool;
|
||||||
|
|
||||||
function loadSound(path:String):Sound;
|
function loadSound(path:String):Sound;
|
||||||
function playSound(sound:Sound, volumeMod:Float, ?cc:Continuation):Void;
|
function playSound(sound:Sound, volumeMod:Float, ?cc:Continuation):Void;
|
||||||
function getSoundLength(sound:Sound):Float;
|
function getSoundLength(sound:Sound):Float;
|
||||||
|
@@ -299,7 +299,9 @@
|
|||||||
(prop :Array<Array<Dynamic>> propNames [])
|
(prop :Array<Array<Dynamic>> propNames [])
|
||||||
(method :String getPropName [:Prop prop]
|
(method :String getPropName [:Prop prop]
|
||||||
(doFor [_prop name] propNames
|
(doFor [_prop name] propNames
|
||||||
(when (= prop _prop) (return name)))
|
(unless (.exists .props (_currentScene) name)
|
||||||
|
(continue))
|
||||||
|
(when (director.propEquals prop _prop) (return name)))
|
||||||
(throw "Couldn't get name of prop $prop in $propNames"))
|
(throw "Couldn't get name of prop $prop in $propNames"))
|
||||||
|
|
||||||
(method _addProp [name :Prop prop]
|
(method _addProp [name :Prop prop]
|
||||||
@@ -329,7 +331,9 @@
|
|||||||
(prop :Array<Array<Dynamic>> actorNames [])
|
(prop :Array<Array<Dynamic>> actorNames [])
|
||||||
(method :String getActorName [:Actor actor]
|
(method :String getActorName [:Actor actor]
|
||||||
(doFor [_actor name] actorNames
|
(doFor [_actor name] actorNames
|
||||||
(when (= actor _actor) (return name)))
|
(unless (.exists .characters (_currentScene) name)
|
||||||
|
(continue))
|
||||||
|
(when (director.actorEquals actor _actor) (return name)))
|
||||||
(throw "Couldn't get name of actor $actor in $actorNames"))
|
(throw "Couldn't get name of actor $actor in $actorNames"))
|
||||||
|
|
||||||
(method _addActor [name :Actor actor]
|
(method _addActor [name :Actor actor]
|
||||||
|
Reference in New Issue
Block a user