Hollywoo-flixel local test project
This commit is contained in:
2
projects/kiss-flixel/src/test/.gitignore
vendored
Normal file
2
projects/kiss-flixel/src/test/.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
export/
|
||||||
|
release/
|
90
projects/kiss-flixel/src/test/Project.xml
Normal file
90
projects/kiss-flixel/src/test/Project.xml
Normal file
@@ -0,0 +1,90 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<project>
|
||||||
|
<!-- _________________________ Application Settings _________________________ -->
|
||||||
|
|
||||||
|
<app title="Test" file="Test" main="Main" version="0.0.1" company="NQNStudios" />
|
||||||
|
|
||||||
|
<!--The flixel preloader is not accurate in Chrome. You can use it regularly if you embed the swf into a html file
|
||||||
|
or you can set the actual size of your file manually at "FlxPreloaderBase-onUpdate-bytesTotal"-->
|
||||||
|
<app preloader="flixel.system.FlxPreloader" />
|
||||||
|
|
||||||
|
<!--Minimum without FLX_NO_GAMEPAD: 11.8, without FLX_NO_NATIVE_CURSOR: 11.2-->
|
||||||
|
<set name="SWF_VERSION" value="11.8" />
|
||||||
|
|
||||||
|
<!-- ____________________________ Window Settings ___________________________ -->
|
||||||
|
|
||||||
|
<!--These window settings apply to all targets-->
|
||||||
|
<window width="1280" height="720" fps="60" background="#000000" hardware="true" vsync="false" resizable="false" />
|
||||||
|
|
||||||
|
<!--Desktop-specific-->
|
||||||
|
<window if="desktop" orientation="landscape" fullscreen="false" />
|
||||||
|
|
||||||
|
<!--Mobile-specific-->
|
||||||
|
<window if="mobile" orientation="landscape" fullscreen="true" width="0" height="0" />
|
||||||
|
|
||||||
|
<!-- _____________________________ Path Settings ____________________________ -->
|
||||||
|
|
||||||
|
<set name="BUILD_DIR" value="export" />
|
||||||
|
<classpath name="source" />
|
||||||
|
<assets path="assets" />
|
||||||
|
|
||||||
|
<!-- _______________________________ Libraries ______________________________ -->
|
||||||
|
|
||||||
|
<haxelib name="flixel" />
|
||||||
|
|
||||||
|
<haxelib name="kiss" />
|
||||||
|
<haxelib name="kiss-flixel" />
|
||||||
|
|
||||||
|
<haxeflag name="--macro" value="kiss.Kiss.setup()" />
|
||||||
|
|
||||||
|
<haxelib name="hollywoo" />
|
||||||
|
<haxelib name="hollywoo-flixel" />
|
||||||
|
|
||||||
|
<!--In case you want to use the addons package-->
|
||||||
|
<haxelib name="flixel-addons" />
|
||||||
|
|
||||||
|
<!--In case you want to use the ui package-->
|
||||||
|
<haxelib name="flixel-ui" />
|
||||||
|
|
||||||
|
<!--In case you want to use nape with flixel-->
|
||||||
|
<!--<haxelib name="nape-haxe4" />-->
|
||||||
|
|
||||||
|
<!-- ______________________________ Haxedefines _____________________________ -->
|
||||||
|
|
||||||
|
<haxedef name="profileKiss" unless="release" />
|
||||||
|
<haxedef name="kissCache" />
|
||||||
|
|
||||||
|
<!--Enable the Flixel core recording system-->
|
||||||
|
<!--<haxedef name="FLX_RECORD" />-->
|
||||||
|
|
||||||
|
<!--Disable the right and middle mouse buttons-->
|
||||||
|
<!--<haxedef name="FLX_NO_MOUSE_ADVANCED" />-->
|
||||||
|
|
||||||
|
<!--Disable the native cursor API on Flash-->
|
||||||
|
<!--<haxedef name="FLX_NO_NATIVE_CURSOR" />-->
|
||||||
|
|
||||||
|
<!--Optimise inputs, be careful you will get null errors if you don't use conditionals in your game-->
|
||||||
|
<haxedef name="FLX_NO_MOUSE" if="mobile" />
|
||||||
|
<haxedef name="FLX_NO_KEYBOARD" if="mobile" />
|
||||||
|
<haxedef name="FLX_NO_TOUCH" if="desktop" />
|
||||||
|
<!--<haxedef name="FLX_NO_GAMEPAD" />-->
|
||||||
|
|
||||||
|
<!--Disable the Flixel core sound tray-->
|
||||||
|
<!--<haxedef name="FLX_NO_SOUND_TRAY" />-->
|
||||||
|
|
||||||
|
<!--Disable the Flixel sound management code-->
|
||||||
|
<!--<haxedef name="FLX_NO_SOUND_SYSTEM" />-->
|
||||||
|
|
||||||
|
<!--Disable the Flixel core focus lost screen-->
|
||||||
|
<!--<haxedef name="FLX_NO_FOCUS_LOST_SCREEN" />-->
|
||||||
|
|
||||||
|
<!--Disable the Flixel core debugger. Automatically gets set whenever you compile in release mode!-->
|
||||||
|
<haxedef name="FLX_NO_DEBUG" unless="debug" />
|
||||||
|
|
||||||
|
<!--Enable this for Nape release builds for a serious peformance improvement-->
|
||||||
|
<haxedef name="NAPE_RELEASE_BUILD" unless="debug" />
|
||||||
|
|
||||||
|
<!-- _________________________________ Custom _______________________________ -->
|
||||||
|
|
||||||
|
<!--Place custom nodes like icons here (higher priority to override the HaxeFlixel icon)-->
|
||||||
|
</project>
|
BIN
projects/kiss-flixel/src/test/assets/pageTurn.wav
Normal file
BIN
projects/kiss-flixel/src/test/assets/pageTurn.wav
Normal file
Binary file not shown.
4
projects/kiss-flixel/src/test/source/AssetPaths.hx
Normal file
4
projects/kiss-flixel/src/test/source/AssetPaths.hx
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
package;
|
||||||
|
|
||||||
|
@:build(flixel.system.FlxAssets.buildFileReferences("assets", true))
|
||||||
|
class AssetPaths {}
|
7
projects/kiss-flixel/src/test/source/Main.hx
Normal file
7
projects/kiss-flixel/src/test/source/Main.hx
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
package;
|
||||||
|
|
||||||
|
import flixel.FlxGame;
|
||||||
|
import openfl.display.Sprite;
|
||||||
|
|
||||||
|
@:build(kiss.Kiss.build())
|
||||||
|
class Main extends Sprite {}
|
3
projects/kiss-flixel/src/test/source/Main.kiss
Normal file
3
projects/kiss-flixel/src/test/source/Main.kiss
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
(method new []
|
||||||
|
(super)
|
||||||
|
(addChild (new FlxGame 0 0 TestState 60 60 true false)))
|
8
projects/kiss-flixel/src/test/source/Test.hollywoo
Normal file
8
projects/kiss-flixel/src/test/source/Test.hollywoo
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
{(prop &mut soundPlayed false)(cc)}
|
||||||
|
(preload
|
||||||
|
(newFlxSound "pageFlip" AssetPaths.pageTurn__wav))
|
||||||
|
{(delay 1 ->:Void (assert soundPlayed)) (cc)}
|
||||||
|
AWAITPLAYSOUND "pageFlip"
|
||||||
|
{(set soundPlayed true) (cc)}
|
||||||
|
|
||||||
|
(Sys.exit 0)
|
41
projects/kiss-flixel/src/test/source/TestState.hx
Normal file
41
projects/kiss-flixel/src/test/source/TestState.hx
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
package;
|
||||||
|
|
||||||
|
import kiss.Prelude;
|
||||||
|
import kiss.List;
|
||||||
|
import hollywoo_flixel.FlxDirector;
|
||||||
|
import hollywoo_flixel.FlxMovie;
|
||||||
|
import hollywoo_flixel.MovieFlxState;
|
||||||
|
import hollywoo_flixel.ActorFlxSprite;
|
||||||
|
import kiss_flixel.SpriteTools;
|
||||||
|
import flixel.FlxG;
|
||||||
|
import flixel.FlxSprite;
|
||||||
|
import flixel.FlxSubState;
|
||||||
|
import flixel.util.FlxColor;
|
||||||
|
import flixel.tweens.FlxTween;
|
||||||
|
|
||||||
|
@:build(kiss.AsyncEmbeddedScript.build("hollywoo-flixel", "src/hollywoo_flixel/HollywooFlixelDSL.kiss", "Test.hollywoo"))
|
||||||
|
class Test extends FlxMovie {
|
||||||
|
public function new(director:FlxDirector) {
|
||||||
|
super(director);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class TestState extends MovieFlxState {
|
||||||
|
var t:Test;
|
||||||
|
|
||||||
|
public override function create() {
|
||||||
|
super.create();
|
||||||
|
t = new Test(director);
|
||||||
|
t.run();
|
||||||
|
}
|
||||||
|
|
||||||
|
public override function destroy() {
|
||||||
|
t.doCleanup();
|
||||||
|
super.destroy();
|
||||||
|
}
|
||||||
|
|
||||||
|
public override function update(elapsed:Float) {
|
||||||
|
super.update(elapsed);
|
||||||
|
t.update(elapsed);
|
||||||
|
}
|
||||||
|
}
|
Reference in New Issue
Block a user