Hollywoo-flixel do polygon-based lighting

This commit is contained in:
2023-03-29 10:49:42 -06:00
parent e400d6d558
commit b5245f927c
4 changed files with 58 additions and 1 deletions

View File

@@ -35,6 +35,8 @@ interface Director<Set:Cloneable<Set>, ScreenPosition, Actor, Sound, Song, Prop,
function autoZConfig():Option<AutoZConfig>;
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 showLighting(sceneTime:SceneTime, lightSources:Array<LightSource>, camera:Camera):Void;
function hideLighting():Void;
function showCharacter(character:Character<Actor>, appearance:Appearance, camera:Camera, cc:Continuation):Void;
function hideCharacter(character:Character<Actor>, camera:Camera, cc:Continuation):Void;
function playSound(sound:Sound, volumeMod:Float, waitForEnd:Bool, cc:Continuation):Void;

View File

@@ -105,6 +105,7 @@
(if sceneKey
// hide current scene background
(let [currentScene (dictGet scenes sceneKey)]
(director.hideLighting)
(director.hideSet currentScene.set currentScene.camera
(makeCC
// hide current scene characters
@@ -122,6 +123,7 @@
(cc)))
(method _showScene [:Scene<Set,ScreenPosition,Actor,Prop,Camera> scene :Appearance appearance :Camera camera :Continuation cc]
(director.showLighting scene.time .elements (lightSources.get sceneKey) camera)
// Show current scene background
(director.showSet scene.set scene.time scene.perspective appearance camera
(makeCC