use assetPath instead of AssetPaths

This commit is contained in:
2023-05-25 16:00:40 -06:00
parent e3ad9c1b44
commit 44cf18d061
2 changed files with 11 additions and 11 deletions

View File

@@ -1,4 +0,0 @@
package;
@:build(flixel.system.FlxAssets.buildFileReferences("assets", true))
class AssetPaths {}

View File

@@ -1,8 +1,10 @@
{(indexAssetPaths "assets")(cc)}
// When the sound device is non-functional, the FlxSound finish callback won't be called. // When the sound device is non-functional, the FlxSound finish callback won't be called.
// Don't let that stop Hollywoo: // Don't let that stop Hollywoo:
{(prop &mut soundPlayed false)(cc)} {(prop &mut soundPlayed false)(cc)}
(preload (preload
(newFlxSound "pageFlip" AssetPaths.pageTurn__wav)) (newFlxSound "pageFlip" (assetPath "assets" "pageTurn.wav")))
{(delay 1 ->:Void (assert soundPlayed)) (cc)} {(delay 1 ->:Void (assert soundPlayed)) (cc)}
AWAITPLAYSOUND "pageFlip" AWAITPLAYSOUND "pageFlip"
{(set soundPlayed true) (cc)} {(set soundPlayed true) (cc)}
@@ -40,14 +42,14 @@ AWAITPLAYSOUND "pageFlip"
(withSceneSet sk set (withSceneSet sk set
(assert (and (= firstWidth set.width) (= firstHeight set.height)))))) (assert (and (= firstWidth set.width) (= firstHeight set.height))))))
(testSetBackground AssetPaths.grayBackground1280x720__png) (testSetBackground (assetPath "assets" "grayBackground1280x720.png"))
(testSetBackground AssetPaths.grayBackground1000x720__png) (testSetBackground (assetPath "assets" "grayBackground1000x720.png"))
(testSetBackground AssetPaths.grayBackground1280x580__png) (testSetBackground (assetPath "assets" "grayBackground1280x580.png"))
// Characters on stage right not appearing for some reason: // Characters on stage right not appearing for some reason:
(preload (preload
(newActor "white" (new ActorFlxSprite AssetPaths.whiteSquare__png)) (newActor "white" (new ActorFlxSprite (assetPath "assets" "whiteSquare.png")))
(newActor "black" (new ActorFlxSprite AssetPaths.blackSquare__png))) (newActor "black" (new ActorFlxSprite (assetPath "assets" "blackSquare.png"))))
SETSCENE basicSceneKey SETSCENE basicSceneKey
ADDCHARACTER "white" Left FacingRight ADDCHARACTER "white" Left FacingRight
@@ -58,7 +60,7 @@ ADDCHARACTER "black" Right FacingLeft
// Speaker name not being bumped to right side for stage-right actors while intercutting: // Speaker name not being bumped to right side for stage-right actors while intercutting:
(preload (preload
(newFlxSet "intercutSet" AssetPaths.whiteBackground1280x720__png) (newFlxSet "intercutSet" (assetPath "assets" "whiteBackground1280x720.png"))
(newSceneFromSet "intercutScene" "intercutSet" Day Exterior (new FlxCamera))) (newSceneFromSet "intercutScene" "intercutSet" Day Exterior (new FlxCamera)))
SETSCENE "intercutScene" SETSCENE "intercutScene"
@@ -77,4 +79,6 @@ ONPHONESPEECH "black" "" "Testing line two"
ENDINTERCUT ENDINTERCUT
// TODO test credits
(Sys.exit 0) (Sys.exit 0)