Remove characters from scenes
This commit is contained in:
@@ -42,6 +42,10 @@
|
|||||||
(currentState.add character.actor)
|
(currentState.add character.actor)
|
||||||
(cc))
|
(cc))
|
||||||
|
|
||||||
|
(method :Void hideCharacter [:Character<FlxStagePosition,FlxStageFacing,ActorFlxSprite> character :Continuation cc]
|
||||||
|
(currentState.remove character.actor)
|
||||||
|
(cc))
|
||||||
|
|
||||||
(prop &mut :Null<Continuation> nextCC)
|
(prop &mut :Null<Continuation> nextCC)
|
||||||
(method onContinue [:FlxActionDigital continueAction]
|
(method onContinue [:FlxActionDigital continueAction]
|
||||||
(whenLet [cc nextCC]
|
(whenLet [cc nextCC]
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ interface Director<Set, StagePosition, StageFacing, ScreenPosition, Actor, Sound
|
|||||||
var movie(default, default):Movie<Set, StagePosition, StageFacing, ScreenPosition, Actor, Sound, Song, Prop>;
|
var movie(default, default):Movie<Set, StagePosition, StageFacing, ScreenPosition, Actor, Sound, Song, Prop>;
|
||||||
function showScene(scene:Scene<Set, StagePosition, StageFacing, ScreenPosition, Actor, Prop>, appearance:Appearance, cc:Continuation):Void;
|
function showScene(scene:Scene<Set, StagePosition, StageFacing, ScreenPosition, Actor, Prop>, appearance:Appearance, cc:Continuation):Void;
|
||||||
function showCharacter(character:Character<StagePosition, StageFacing, Actor>, appearance:Appearance, cc:Continuation):Void;
|
function showCharacter(character:Character<StagePosition, StageFacing, Actor>, appearance:Appearance, cc:Continuation):Void;
|
||||||
|
function hideCharacter(character:Character<StagePosition, StageFacing, Actor>, cc:Continuation):Void;
|
||||||
function playSound(sound:Sound, volumeMod:Float, waitForEnd:Bool, cc:Continuation):Void;
|
function playSound(sound:Sound, volumeMod:Float, waitForEnd:Bool, cc:Continuation):Void;
|
||||||
function playSong(song:Song, volumeMod:Float, loop:Bool, waitForEnd:Bool, cc:Continuation):Void;
|
function playSong(song:Song, volumeMod:Float, loop:Bool, waitForEnd:Bool, cc:Continuation):Void;
|
||||||
function stopSong():Void;
|
function stopSong():Void;
|
||||||
|
|||||||
@@ -134,11 +134,10 @@
|
|||||||
cc)
|
cc)
|
||||||
))
|
))
|
||||||
|
|
||||||
/* TODO
|
(method removeCharacter [actorName :Continuation cc]
|
||||||
(method removeCharacter [
|
(let [c (dictGet .characters (_currentScene) actorName)]
|
||||||
|
(.remove .characters (_currentScene) actorName)
|
||||||
])
|
(director.hideCharacter c cc)))
|
||||||
*/
|
|
||||||
|
|
||||||
// TODO moveCharacter remove them, add them to another scene
|
// TODO moveCharacter remove them, add them to another scene
|
||||||
// TODO moveCharacterAndFollow remove them, add them to another scene, set that the scene
|
// TODO moveCharacterAndFollow remove them, add them to another scene, set that the scene
|
||||||
@@ -151,7 +150,7 @@
|
|||||||
(dictSet .propsOnScreen (_currentScene) name (dictGet props name))
|
(dictSet .propsOnScreen (_currentScene) name (dictGet props name))
|
||||||
(director.showPropOnScreen (dictGet props name) position cc))
|
(director.showPropOnScreen (dictGet props name) position cc))
|
||||||
|
|
||||||
(method removePropFromScrene [name :Continuation cc]
|
(method removeProp [name :Continuation cc]
|
||||||
(director.hideProp (dictGet props name) cc))
|
(director.hideProp (dictGet props name) cc))
|
||||||
|
|
||||||
// TODO removeProp
|
// TODO removeProp
|
||||||
|
|||||||
Reference in New Issue
Block a user