From 44cf18d061b9b2c055f6352b8fd39e5c05b2943a Mon Sep 17 00:00:00 2001 From: Nat Quayle Nelson Date: Thu, 25 May 2023 16:00:40 -0600 Subject: [PATCH] use assetPath instead of AssetPaths --- src/test/source/AssetPaths.hx | 4 ---- src/test/source/Test.hollywoo | 18 +++++++++++------- 2 files changed, 11 insertions(+), 11 deletions(-) delete mode 100644 src/test/source/AssetPaths.hx diff --git a/src/test/source/AssetPaths.hx b/src/test/source/AssetPaths.hx deleted file mode 100644 index db7ef44..0000000 --- a/src/test/source/AssetPaths.hx +++ /dev/null @@ -1,4 +0,0 @@ -package; - -@:build(flixel.system.FlxAssets.buildFileReferences("assets", true)) -class AssetPaths {} diff --git a/src/test/source/Test.hollywoo b/src/test/source/Test.hollywoo index 81f28d3..c3b3dd6 100644 --- a/src/test/source/Test.hollywoo +++ b/src/test/source/Test.hollywoo @@ -1,8 +1,10 @@ +{(indexAssetPaths "assets")(cc)} + // When the sound device is non-functional, the FlxSound finish callback won't be called. // Don't let that stop Hollywoo: {(prop &mut soundPlayed false)(cc)} (preload - (newFlxSound "pageFlip" AssetPaths.pageTurn__wav)) + (newFlxSound "pageFlip" (assetPath "assets" "pageTurn.wav"))) {(delay 1 ->:Void (assert soundPlayed)) (cc)} AWAITPLAYSOUND "pageFlip" {(set soundPlayed true) (cc)} @@ -40,14 +42,14 @@ AWAITPLAYSOUND "pageFlip" (withSceneSet sk set (assert (and (= firstWidth set.width) (= firstHeight set.height)))))) -(testSetBackground AssetPaths.grayBackground1280x720__png) -(testSetBackground AssetPaths.grayBackground1000x720__png) -(testSetBackground AssetPaths.grayBackground1280x580__png) +(testSetBackground (assetPath "assets" "grayBackground1280x720.png")) +(testSetBackground (assetPath "assets" "grayBackground1000x720.png")) +(testSetBackground (assetPath "assets" "grayBackground1280x580.png")) // Characters on stage right not appearing for some reason: (preload - (newActor "white" (new ActorFlxSprite AssetPaths.whiteSquare__png)) - (newActor "black" (new ActorFlxSprite AssetPaths.blackSquare__png))) + (newActor "white" (new ActorFlxSprite (assetPath "assets" "whiteSquare.png"))) + (newActor "black" (new ActorFlxSprite (assetPath "assets" "blackSquare.png")))) SETSCENE basicSceneKey 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: (preload - (newFlxSet "intercutSet" AssetPaths.whiteBackground1280x720__png) + (newFlxSet "intercutSet" (assetPath "assets" "whiteBackground1280x720.png")) (newSceneFromSet "intercutScene" "intercutSet" Day Exterior (new FlxCamera))) SETSCENE "intercutScene" @@ -77,4 +79,6 @@ ONPHONESPEECH "black" "" "Testing line two" ENDINTERCUT +// TODO test credits + (Sys.exit 0) \ No newline at end of file