diff --git a/projects/hollywoo-flixel/src/hollywoo_flixel/FlxDirector.kiss b/projects/hollywoo-flixel/src/hollywoo_flixel/FlxDirector.kiss index b84e1d2b..a1d3322e 100644 --- a/projects/hollywoo-flixel/src/hollywoo_flixel/FlxDirector.kiss +++ b/projects/hollywoo-flixel/src/hollywoo_flixel/FlxDirector.kiss @@ -42,6 +42,10 @@ (currentState.add character.actor) (cc)) +(method :Void hideCharacter [:Character character :Continuation cc] + (currentState.remove character.actor) + (cc)) + (prop &mut :Null nextCC) (method onContinue [:FlxActionDigital continueAction] (whenLet [cc nextCC] diff --git a/projects/hollywoo/src/hollywoo/Director.hx b/projects/hollywoo/src/hollywoo/Director.hx index 6686bb75..972068a6 100644 --- a/projects/hollywoo/src/hollywoo/Director.hx +++ b/projects/hollywoo/src/hollywoo/Director.hx @@ -13,6 +13,7 @@ interface Director; function showScene(scene:Scene, appearance:Appearance, cc:Continuation):Void; function showCharacter(character:Character, appearance:Appearance, cc:Continuation):Void; + function hideCharacter(character:Character, 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 stopSong():Void; diff --git a/projects/hollywoo/src/hollywoo/Movie.kiss b/projects/hollywoo/src/hollywoo/Movie.kiss index e236df5e..723d650b 100644 --- a/projects/hollywoo/src/hollywoo/Movie.kiss +++ b/projects/hollywoo/src/hollywoo/Movie.kiss @@ -134,11 +134,10 @@ cc) )) -/* TODO -(method removeCharacter [ - -]) -*/ +(method removeCharacter [actorName :Continuation cc] + (let [c (dictGet .characters (_currentScene) actorName)] + (.remove .characters (_currentScene) actorName) + (director.hideCharacter c cc))) // TODO moveCharacter remove them, add them to another 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)) (director.showPropOnScreen (dictGet props name) position cc)) -(method removePropFromScrene [name :Continuation cc] +(method removeProp [name :Continuation cc] (director.hideProp (dictGet props name) cc)) // TODO removeProp