fix hollywoo set sprites loading on the fly

This commit is contained in:
2021-11-02 18:58:59 -04:00
parent 1869591c93
commit a4e41aec1f
3 changed files with 20 additions and 15 deletions

View File

@@ -1,5 +1,10 @@
(loadFrom "hollywoo" "src/hollywoo/HollywooDSL.kiss")
(method newFlxScene [name set time perspective]
(let [setSprite (new FlxSprite 0 0)]
(setSprite.loadGraphic (dictGet sets set))
(newScene name (cast (new SceneFlxState setSprite time perspective)))))
(method newFlxSound [name path &opt :Float volume]
(set volume (or volume 1))
(assert (<= 0 volume 1))