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

@@ -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();
}
}