habit puzzle game beta
This commit is contained in:
@@ -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)
|
||||
|
@@ -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();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user