Skip to content

Commit

Permalink
2.2 release merge.
Browse files Browse the repository at this point in the history
2.2 release merge.
  • Loading branch information
bog4d authored Nov 17, 2021
2 parents 9c478d8 + 73f5fc9 commit 41b41b0
Show file tree
Hide file tree
Showing 9 changed files with 34 additions and 15 deletions.
2 changes: 1 addition & 1 deletion Project.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<!-- _________________________ Application Settings _________________________ -->

<app title="Dash OVERLORD" file="DashOVERLORD" main="Main" version="2.1" company="Bogdan2D" />
<app title="Dash OVERLORD" file="DashOVERLORD" main="Main" version="2.2" company="Bogdan2D" />

<!--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"-->
Expand Down
2 changes: 2 additions & 0 deletions assets/data/levels/levelData.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
9
0.2
1 change: 0 additions & 1 deletion assets/data/levels/levels.txt

This file was deleted.

2 changes: 0 additions & 2 deletions source/LevelButton.hx
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ class LevelButton extends FlxSpriteGroup
{
case 'Level 0':
daText.text = 'TUTORIAL';
case 'Level 10':
daText.text = 'ESCAPE';
}

add(daText);
Expand Down
4 changes: 4 additions & 0 deletions source/LostSoul.hx
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ class LostSoul extends FlxSprite
flipX = false;
hitboxFix();
}
if (isTouching(FlxObject.UP) && isTouching(FlxObject.FLOOR))
{
velocity.y = -PlayState.GRAVITY / 3;
}

super.update(elapsed);
}
Expand Down
6 changes: 6 additions & 0 deletions source/states/IntroState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ class IntroState extends FlxState

override public function create()
{
MainMenuState.firstPlay = true;
FlxG.mouse.visible = false;
new NGio(SecretHA.ID, SecretHA.ENC_KEY);

FlxG.fixedTimestep = false;
Expand All @@ -29,6 +31,7 @@ class IntroState extends FlxState
myName = new FlxText(0, 0, FlxG.width, Application.current.meta.get('company'));
myName.setFormat('assets/data/fonts/karma.TTF', 80, FlxColor.WHITE, CENTER);
myName.setBorderStyle(FlxTextBorderStyle.OUTLINE, FlxColor.BLACK, 5);
myName.antialiasing = true;

myName.screenCenter();
myName.bold = true;
Expand All @@ -46,6 +49,9 @@ class IntroState extends FlxState
override public function update(elapsed)
{
super.update(elapsed);

if (FlxG.keys.justPressed.F)
FlxG.fullscreen = !FlxG.fullscreen;
}

function rollIntro()
Expand Down
4 changes: 2 additions & 2 deletions source/states/LevelSelectState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class LevelSelectState extends FlxState
var fade:FlxSprite;
var title:FlxText;
var lvGroup:FlxTypedGroup<LevelButton>;
var levels:Int = Std.parseInt(Assets.getText('assets/data/levels/levels.txt')); // if you put a letter in that text file you sinned >:(
var levels:Int = Std.parseInt(TextUtil.arrayifyTextFile('assets/data/levels/levelData.txt')[0]); // if you put a letter in that text file you sinned >:(

override public function create()
{
Expand Down Expand Up @@ -100,7 +100,7 @@ class LevelSelectState extends FlxState

function changeSelectedLv(skips:Int)
{
var moveBy:Float = 0.2;
var moveBy:Float = Std.parseFloat(TextUtil.arrayifyTextFile('assets/data/levels/levelData.txt')[1]); // Higher number means it scrolls more
if (UIusable)
{
curSelected += skips;
Expand Down
23 changes: 17 additions & 6 deletions source/states/MainMenuState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ import lime.app.Application;

class MainMenuState extends FlxState
{
public static var firstPlay:Bool;

var UIusable:Bool;
var fade:FlxSprite;
var daG:FlxSprite;
Expand Down Expand Up @@ -102,14 +104,23 @@ class MainMenuState extends FlxState
PlayState.deaths = 0;
PlayState.fromLvSelect = false;
PlayState.LevelID = 0;
FlxG.sound.play('assets/sounds/CUT.ogg');
camera.bgColor = FlxColor.BLACK;
forEach(function(spr) remove(spr));

camera.flash(FlxColor.WHITE, 5, function()
if (firstPlay)
{
FlxG.switchState(new PlayState());
});
firstPlay = false;
FlxG.sound.play('assets/sounds/CUT.ogg');
camera.bgColor = FlxColor.BLACK;
forEach(function(spr) remove(spr));
camera.flash(FlxColor.WHITE, 5, function()
{
FlxG.switchState(new PlayState());
});
}
else
{
FlxG.sound.play('assets/sounds/confirm.ogg');
camera.fade(FlxColor.BLACK, 0.5, false, function() FlxG.switchState(new PlayState()));
}

case 'level select':
FlxG.sound.play('assets/sounds/confirm.ogg');
Expand Down
5 changes: 2 additions & 3 deletions source/states/PlayState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class PlayState extends FlxState
// public static var hasDied:Bool;
public static var fromLvSelect:Bool;

var maxLevels:Int = Std.parseInt(Assets.getText('assets/data/levels/levels.txt'));
var maxLevels:Int = Std.parseInt(TextUtil.arrayifyTextFile('assets/data/levels/levelData.txt')[0]);
var canTP:Bool;
var exitDoorDebounce:Bool;

Expand Down Expand Up @@ -349,8 +349,7 @@ class PlayState extends FlxState
player.animation.play('wake', true);
GameCam.zoom = 2;
GameCam.y -= 100;
GameCam.scroll.x += 100;
// new FlxTimer().start(0.01, function(tmr:FlxTimer) FlxG.sound.play('assets/sounds/wakeUp.ogg', 0.5));

FlxG.sound.play('assets/sounds/wakeUp.ogg', 0.5);

FlxTween.tween(GameCam, {zoom: 1, y: 0, x: 0}, 7, {
Expand Down

0 comments on commit 41b41b0

Please sign in to comment.