habit puzzle game beta

This commit is contained in:
2022-07-09 22:14:30 +00:00
parent 31a2f60719
commit 15245c4707
3 changed files with 10 additions and 5 deletions

View File

@@ -2,7 +2,7 @@
<project>
<!-- _________________________ Application Settings _________________________ -->
<app title="FlxProject" file="FlxProject" main="Main" version="0.0.1" company="HaxeFlixel" />
<app title="Habit Puzzles" file="HabitPuzzles" 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"-->
@@ -40,6 +40,8 @@
<haxelib name="kiss-flixel" />
<haxelib name="datetime" />
<haxeflag name="--macro" value="kiss.Kiss.setup()" />
<assets path="habits" />
<assets path="puzzles" />
<!--In case you want to use the addons package-->
<!--<haxelib name="flixel-addons" />-->

View File

@@ -102,9 +102,7 @@
(let [rewardSprite
(new FlxSprite 0 0
(BitmapData.fromFile
(joinPath
(Path.directory m.textFile)
currentRewardFile.path)))]
currentRewardFile.path))]
(when rewardSprites
(remove rewardSprites))
(rewardSprite.setGraphicSize FlxG.width 0)

View File

@@ -11,7 +11,12 @@ class Main extends Sprite
super();
addChild(new FlxGame(0, 0, HabitState, 1, 60, 60, true));
var t:HabitState = cast FlxG.state;
t.setModel(new HabitModel(Sys.args()[0]));
var habitFile = if (Sys.args().length > 0 && Sys.args()[0].length > 0) {
Sys.args()[0];
} else {
"habits/default.txt";
};
t.setModel(new HabitModel(habitFile));
t.model.save();
}
}