tankmen foreground in progress

This commit is contained in:
Cameron Taylor 2021-03-08 18:38:58 -05:00
parent d5e6985024
commit 8e95e79c3b
16 changed files with 202 additions and 12 deletions

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 160 KiB

View File

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<TextureAtlas imagePath="tank0.png">
<!-- Created with Adobe Animate version 21.0.0.35450 -->
<!-- http://www.adobe.com/products/animate.html -->
<SubTexture name="fg tankhead far right instance 10000" x="631" y="457" width="311" height="437" frameX="-3" frameY="-13" frameWidth="314" frameHeight="450"/>
<SubTexture name="fg tankhead far right instance 10001" x="631" y="457" width="311" height="437" frameX="-3" frameY="-13" frameWidth="314" frameHeight="450"/>
<SubTexture name="fg tankhead far right instance 10002" x="0" y="460" width="306" height="440" frameX="-3" frameY="-10" frameWidth="314" frameHeight="450"/>
<SubTexture name="fg tankhead far right instance 10003" x="0" y="460" width="306" height="440" frameX="-3" frameY="-10" frameWidth="314" frameHeight="450"/>
<SubTexture name="fg tankhead far right instance 10004" x="631" y="0" width="305" height="447" frameX="-2" frameY="-3" frameWidth="314" frameHeight="450"/>
<SubTexture name="fg tankhead far right instance 10005" x="631" y="0" width="305" height="447" frameX="-2" frameY="-3" frameWidth="314" frameHeight="450"/>
<SubTexture name="fg tankhead far right instance 10006" x="0" y="0" width="306" height="450" frameX="-1" frameY="0" frameWidth="314" frameHeight="450"/>
<SubTexture name="fg tankhead far right instance 10007" x="0" y="0" width="306" height="450" frameX="-1" frameY="0" frameWidth="314" frameHeight="450"/>
<SubTexture name="fg tankhead far right instance 10008" x="316" y="0" width="305" height="450" frameX="0" frameY="0" frameWidth="314" frameHeight="450"/>
<SubTexture name="fg tankhead far right instance 10009" x="316" y="0" width="305" height="450" frameX="0" frameY="0" frameWidth="314" frameHeight="450"/>
<SubTexture name="fg tankhead far right instance 10010" x="316" y="0" width="305" height="450" frameX="0" frameY="0" frameWidth="314" frameHeight="450"/>
<SubTexture name="fg tankhead far right instance 10011" x="316" y="0" width="305" height="450" frameX="0" frameY="0" frameWidth="314" frameHeight="450"/>
<SubTexture name="fg tankhead far right instance 10012" x="316" y="0" width="305" height="450" frameX="0" frameY="0" frameWidth="314" frameHeight="450"/>
<SubTexture name="fg tankhead far right instance 10013" x="316" y="0" width="305" height="450" frameX="0" frameY="0" frameWidth="314" frameHeight="450"/>
</TextureAtlas>

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

View File

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<TextureAtlas imagePath="tank1.png">
<!-- Created with Adobe Animate version 21.0.0.35450 -->
<!-- http://www.adobe.com/products/animate.html -->
<SubTexture name="fg tankhead 5 instance 10000" x="0" y="388" width="472" height="113" frameX="0" frameY="-9" frameWidth="472" frameHeight="122"/>
<SubTexture name="fg tankhead 5 instance 10001" x="0" y="388" width="472" height="113" frameX="0" frameY="-9" frameWidth="472" frameHeight="122"/>
<SubTexture name="fg tankhead 5 instance 10002" x="0" y="262" width="468" height="116" frameX="-2" frameY="-6" frameWidth="472" frameHeight="122"/>
<SubTexture name="fg tankhead 5 instance 10003" x="0" y="262" width="468" height="116" frameX="-2" frameY="-6" frameWidth="472" frameHeight="122"/>
<SubTexture name="fg tankhead 5 instance 10004" x="0" y="132" width="460" height="120" frameX="-6" frameY="-2" frameWidth="472" frameHeight="122"/>
<SubTexture name="fg tankhead 5 instance 10005" x="0" y="132" width="460" height="120" frameX="-6" frameY="-2" frameWidth="472" frameHeight="122"/>
<SubTexture name="fg tankhead 5 instance 10006" x="0" y="0" width="459" height="122" frameX="-6" frameY="0" frameWidth="472" frameHeight="122"/>
<SubTexture name="fg tankhead 5 instance 10007" x="0" y="0" width="459" height="122" frameX="-6" frameY="0" frameWidth="472" frameHeight="122"/>
<SubTexture name="fg tankhead 5 instance 10008" x="0" y="0" width="459" height="122" frameX="-6" frameY="0" frameWidth="472" frameHeight="122"/>
<SubTexture name="fg tankhead 5 instance 10009" x="0" y="0" width="459" height="122" frameX="-6" frameY="0" frameWidth="472" frameHeight="122"/>
<SubTexture name="fg tankhead 5 instance 10010" x="0" y="0" width="459" height="122" frameX="-6" frameY="0" frameWidth="472" frameHeight="122"/>
<SubTexture name="fg tankhead 5 instance 10011" x="0" y="0" width="459" height="122" frameX="-6" frameY="0" frameWidth="472" frameHeight="122"/>
<SubTexture name="fg tankhead 5 instance 10012" x="0" y="0" width="459" height="122" frameX="-6" frameY="0" frameWidth="472" frameHeight="122"/>
<SubTexture name="fg tankhead 5 instance 10013" x="0" y="0" width="459" height="122" frameX="-6" frameY="0" frameWidth="472" frameHeight="122"/>
<SubTexture name="fg tankhead 5 instance 10014" x="0" y="0" width="459" height="122" frameX="-6" frameY="0" frameWidth="472" frameHeight="122"/>
</TextureAtlas>

Binary file not shown.

After

Width:  |  Height:  |  Size: 128 KiB

View File

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<TextureAtlas imagePath="tank2.png">
<!-- Created with Adobe Animate version 21.0.0.35450 -->
<!-- http://www.adobe.com/products/animate.html -->
<SubTexture name="foreground man 3 instance 10000" x="595" y="327" width="293" height="305" frameX="-2" frameY="-17" frameWidth="295" frameHeight="322"/>
<SubTexture name="foreground man 3 instance 10001" x="595" y="327" width="293" height="305" frameX="-2" frameY="-17" frameWidth="295" frameHeight="322"/>
<SubTexture name="foreground man 3 instance 10002" x="0" y="331" width="288" height="310" frameX="-4" frameY="-12" frameWidth="295" frameHeight="322"/>
<SubTexture name="foreground man 3 instance 10003" x="0" y="331" width="288" height="310" frameX="-4" frameY="-12" frameWidth="295" frameHeight="322"/>
<SubTexture name="foreground man 3 instance 10004" x="595" y="0" width="288" height="317" frameX="-1" frameY="-5" frameWidth="295" frameHeight="322"/>
<SubTexture name="foreground man 3 instance 10005" x="595" y="0" width="288" height="317" frameX="-1" frameY="-5" frameWidth="295" frameHeight="322"/>
<SubTexture name="foreground man 3 instance 10006" x="0" y="0" width="288" height="321" frameX="0" frameY="-1" frameWidth="295" frameHeight="322"/>
<SubTexture name="foreground man 3 instance 10007" x="0" y="0" width="288" height="321" frameX="0" frameY="-1" frameWidth="295" frameHeight="322"/>
<SubTexture name="foreground man 3 instance 10008" x="298" y="0" width="287" height="322" frameX="0" frameY="0" frameWidth="295" frameHeight="322"/>
<SubTexture name="foreground man 3 instance 10009" x="298" y="0" width="287" height="322" frameX="0" frameY="0" frameWidth="295" frameHeight="322"/>
<SubTexture name="foreground man 3 instance 10010" x="298" y="0" width="287" height="322" frameX="0" frameY="0" frameWidth="295" frameHeight="322"/>
<SubTexture name="foreground man 3 instance 10011" x="298" y="0" width="287" height="322" frameX="0" frameY="0" frameWidth="295" frameHeight="322"/>
<SubTexture name="foreground man 3 instance 10012" x="298" y="0" width="287" height="322" frameX="0" frameY="0" frameWidth="295" frameHeight="322"/>
<SubTexture name="foreground man 3 instance 10013" x="298" y="0" width="287" height="322" frameX="0" frameY="0" frameWidth="295" frameHeight="322"/>
</TextureAtlas>

Binary file not shown.

After

Width:  |  Height:  |  Size: 81 KiB

View File

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<TextureAtlas imagePath="tank3.png">
<!-- Created with Adobe Animate version 21.0.0.35450 -->
<!-- http://www.adobe.com/products/animate.html -->
<SubTexture name="fg tankhead 4 instance 10000" x="0" y="422" width="590" height="124" frameX="0" frameY="-11" frameWidth="590" frameHeight="135"/>
<SubTexture name="fg tankhead 4 instance 10001" x="0" y="422" width="590" height="124" frameX="0" frameY="-11" frameWidth="590" frameHeight="135"/>
<SubTexture name="fg tankhead 4 instance 10002" x="0" y="286" width="585" height="126" frameX="-2" frameY="-9" frameWidth="590" frameHeight="135"/>
<SubTexture name="fg tankhead 4 instance 10003" x="0" y="286" width="585" height="126" frameX="-2" frameY="-9" frameWidth="590" frameHeight="135"/>
<SubTexture name="fg tankhead 4 instance 10004" x="0" y="145" width="580" height="131" frameX="-5" frameY="-4" frameWidth="590" frameHeight="135"/>
<SubTexture name="fg tankhead 4 instance 10005" x="0" y="145" width="580" height="131" frameX="-5" frameY="-4" frameWidth="590" frameHeight="135"/>
<SubTexture name="fg tankhead 4 instance 10006" x="0" y="0" width="574" height="135" frameX="-9" frameY="0" frameWidth="590" frameHeight="135"/>
<SubTexture name="fg tankhead 4 instance 10007" x="0" y="0" width="574" height="135" frameX="-9" frameY="0" frameWidth="590" frameHeight="135"/>
<SubTexture name="fg tankhead 4 instance 10008" x="0" y="0" width="574" height="135" frameX="-9" frameY="0" frameWidth="590" frameHeight="135"/>
<SubTexture name="fg tankhead 4 instance 10009" x="0" y="0" width="574" height="135" frameX="-9" frameY="0" frameWidth="590" frameHeight="135"/>
<SubTexture name="fg tankhead 4 instance 10010" x="0" y="0" width="574" height="135" frameX="-9" frameY="0" frameWidth="590" frameHeight="135"/>
<SubTexture name="fg tankhead 4 instance 10011" x="0" y="0" width="574" height="135" frameX="-9" frameY="0" frameWidth="590" frameHeight="135"/>
<SubTexture name="fg tankhead 4 instance 10012" x="0" y="0" width="574" height="135" frameX="-9" frameY="0" frameWidth="590" frameHeight="135"/>
<SubTexture name="fg tankhead 4 instance 10013" x="0" y="0" width="574" height="135" frameX="-9" frameY="0" frameWidth="590" frameHeight="135"/>
<SubTexture name="fg tankhead 4 instance 10014" x="0" y="0" width="574" height="135" frameX="-9" frameY="0" frameWidth="590" frameHeight="135"/>
</TextureAtlas>

Binary file not shown.

After

Width:  |  Height:  |  Size: 205 KiB

View File

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<TextureAtlas imagePath="tank4.png">
<!-- Created with Adobe Animate version 21.0.0.35450 -->
<!-- http://www.adobe.com/products/animate.html -->
<SubTexture name="fg tankman bobbin 3 instance 10000" x="0" y="0" width="399" height="319" frameX="0" frameY="-11" frameWidth="401" frameHeight="330"/>
<SubTexture name="fg tankman bobbin 3 instance 10001" x="0" y="0" width="399" height="319" frameX="0" frameY="-11" frameWidth="401" frameHeight="330"/>
<SubTexture name="fg tankman bobbin 3 instance 10002" x="0" y="329" width="393" height="322" frameX="-4" frameY="-8" frameWidth="401" frameHeight="330"/>
<SubTexture name="fg tankman bobbin 3 instance 10003" x="0" y="329" width="393" height="322" frameX="-4" frameY="-8" frameWidth="401" frameHeight="330"/>
<SubTexture name="fg tankman bobbin 3 instance 10004" x="403" y="329" width="391" height="320" frameX="-8" frameY="-4" frameWidth="401" frameHeight="330"/>
<SubTexture name="fg tankman bobbin 3 instance 10005" x="403" y="329" width="391" height="320" frameX="-8" frameY="-4" frameWidth="401" frameHeight="330"/>
<SubTexture name="fg tankman bobbin 3 instance 10006" x="403" y="659" width="390" height="320" frameX="-10" frameY="-1" frameWidth="401" frameHeight="330"/>
<SubTexture name="fg tankman bobbin 3 instance 10007" x="403" y="659" width="390" height="320" frameX="-10" frameY="-1" frameWidth="401" frameHeight="330"/>
<SubTexture name="fg tankman bobbin 3 instance 10008" x="0" y="661" width="390" height="319" frameX="-11" frameY="0" frameWidth="401" frameHeight="330"/>
<SubTexture name="fg tankman bobbin 3 instance 10009" x="0" y="661" width="390" height="319" frameX="-11" frameY="0" frameWidth="401" frameHeight="330"/>
<SubTexture name="fg tankman bobbin 3 instance 10010" x="0" y="661" width="390" height="319" frameX="-11" frameY="0" frameWidth="401" frameHeight="330"/>
<SubTexture name="fg tankman bobbin 3 instance 10011" x="0" y="661" width="390" height="319" frameX="-11" frameY="0" frameWidth="401" frameHeight="330"/>
<SubTexture name="fg tankman bobbin 3 instance 10012" x="0" y="661" width="390" height="319" frameX="-11" frameY="0" frameWidth="401" frameHeight="330"/>
<SubTexture name="fg tankman bobbin 3 instance 10013" x="0" y="661" width="390" height="319" frameX="-11" frameY="0" frameWidth="401" frameHeight="330"/>
</TextureAtlas>

Binary file not shown.

After

Width:  |  Height:  |  Size: 159 KiB

View File

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<TextureAtlas imagePath="tank5.png">
<!-- Created with Adobe Animate version 21.0.0.35450 -->
<!-- http://www.adobe.com/products/animate.html -->
<SubTexture name="fg tankhead far right instance 10000" x="633" y="457" width="312" height="437" frameX="0" frameY="-13" frameWidth="315" frameHeight="450"/>
<SubTexture name="fg tankhead far right instance 10001" x="633" y="457" width="312" height="437" frameX="0" frameY="-13" frameWidth="315" frameHeight="450"/>
<SubTexture name="fg tankhead far right instance 10002" x="0" y="460" width="307" height="440" frameX="-5" frameY="-10" frameWidth="315" frameHeight="450"/>
<SubTexture name="fg tankhead far right instance 10003" x="0" y="460" width="307" height="440" frameX="-5" frameY="-10" frameWidth="315" frameHeight="450"/>
<SubTexture name="fg tankhead far right instance 10004" x="633" y="0" width="306" height="447" frameX="-7" frameY="-3" frameWidth="315" frameHeight="450"/>
<SubTexture name="fg tankhead far right instance 10005" x="633" y="0" width="306" height="447" frameX="-7" frameY="-3" frameWidth="315" frameHeight="450"/>
<SubTexture name="fg tankhead far right instance 10006" x="0" y="0" width="307" height="450" frameX="-7" frameY="0" frameWidth="315" frameHeight="450"/>
<SubTexture name="fg tankhead far right instance 10007" x="0" y="0" width="307" height="450" frameX="-7" frameY="0" frameWidth="315" frameHeight="450"/>
<SubTexture name="fg tankhead far right instance 10008" x="317" y="0" width="306" height="450" frameX="-9" frameY="0" frameWidth="315" frameHeight="450"/>
<SubTexture name="fg tankhead far right instance 10009" x="317" y="0" width="306" height="450" frameX="-9" frameY="0" frameWidth="315" frameHeight="450"/>
<SubTexture name="fg tankhead far right instance 10010" x="317" y="0" width="306" height="450" frameX="-9" frameY="0" frameWidth="315" frameHeight="450"/>
<SubTexture name="fg tankhead far right instance 10011" x="317" y="0" width="306" height="450" frameX="-9" frameY="0" frameWidth="315" frameHeight="450"/>
<SubTexture name="fg tankhead far right instance 10012" x="317" y="0" width="306" height="450" frameX="-9" frameY="0" frameWidth="315" frameHeight="450"/>
<SubTexture name="fg tankhead far right instance 10013" x="317" y="0" width="306" height="450" frameX="-9" frameY="0" frameWidth="315" frameHeight="450"/>
</TextureAtlas>

View File

@ -7,13 +7,37 @@ class BGSprite extends FlxSprite
/**
Cool lil utility thing just so that it can easy do antialiasing and scrollfactor bullshit
*/
public function new(image:String, x:Float = 0, y:Float = 0, parX:Float = 1, parY:Float = 1)
public var idleAnim:String;
public function new(image:String, x:Float = 0, y:Float = 0, parX:Float = 1, parY:Float = 1, ?daAnimations:Array<String>)
{
super(x, y);
loadGraphic(Paths.image(image));
if (daAnimations != null)
{
frames = Paths.getSparrowAtlas(image);
for (anims in daAnimations)
{
animation.addByPrefix(anims, anims, 24, false);
animation.play(anims);
if (idleAnim == null)
idleAnim = anims;
}
}
else
{
loadGraphic(Paths.image(image));
active = false;
}
scrollFactor.set(parX, parY);
antialiasing = true;
active = false;
}
public function dance():Void
{
if (idleAnim != null)
animation.play(idleAnim);
}
}

View File

@ -17,7 +17,13 @@ class PauseSubState extends MusicBeatSubstate
{
var grpMenuShit:FlxTypedGroup<Alphabet>;
var pauseOG:Array<String> = ['Resume', 'Restart Song', 'Change Difficulty', 'Exit to menu'];
var pauseOG:Array<String> = [
'Resume',
'Restart Song',
'Change Difficulty',
'Toggle Practice Mode',
'Exit to menu'
];
var difficultyChoices:Array<String> = ['EASY', 'NORMAL', 'HARD', 'BACK'];
var menuItems:Array<String> = [];
@ -25,6 +31,8 @@ class PauseSubState extends MusicBeatSubstate
var pauseMusic:FlxSound;
var practiceText:FlxText;
public function new(x:Float, y:Float)
{
super();
@ -63,6 +71,14 @@ class PauseSubState extends MusicBeatSubstate
deathCounter.updateHitbox();
add(deathCounter);
practiceText = new FlxText(20, 15 + 64 + 32, 0, "PRACTICE MODE", 32);
practiceText.scrollFactor.set();
practiceText.setFormat(Paths.font('vcr.ttf'), 32);
practiceText.updateHitbox();
practiceText.x = FlxG.width - (practiceText.width + 20);
practiceText.visible = PlayState.practiceMode;
add(practiceText);
levelDifficulty.alpha = 0;
levelInfo.alpha = 0;
deathCounter.alpha = 0;
@ -86,11 +102,10 @@ class PauseSubState extends MusicBeatSubstate
private function regenMenu():Void
{
grpMenuShit.forEachAlive(function(thing:Alphabet)
while (grpMenuShit.members.length > 0)
{
grpMenuShit.remove(thing);
thing.destroy();
});
grpMenuShit.remove(grpMenuShit.members[0], true);
}
for (i in 0...menuItems.length)
{
@ -140,6 +155,10 @@ class PauseSubState extends MusicBeatSubstate
FlxG.resetState();
case 'Toggle Practice Mode':
PlayState.practiceMode = !PlayState.practiceMode;
practiceText.visible = PlayState.practiceMode;
case 'Change Difficulty':
menuItems = difficultyChoices;
regenMenu();

View File

@ -50,6 +50,7 @@ class PlayState extends MusicBeatState
public static var storyPlaylist:Array<String> = [];
public static var storyDifficulty:Int = 1;
public static var deathCounter:Int = 0;
public static var practiceMode:Bool = false;
var halloweenLevel:Bool = false;
@ -99,6 +100,8 @@ class PlayState extends MusicBeatState
var phillyTrain:FlxSprite;
var trainSound:FlxSound;
var foregroundSprites:FlxTypedGroup<BGSprite>;
var limo:FlxSprite;
var grpLimoDancers:FlxTypedGroup<BackgroundDancer>;
var fastCar:FlxSprite;
@ -147,6 +150,8 @@ class PlayState extends MusicBeatState
Conductor.mapBPMChanges(SONG);
Conductor.changeBPM(SONG.bpm);
foregroundSprites = new FlxTypedGroup<BGSprite>();
switch (SONG.song.toLowerCase())
{
case 'tutorial':
@ -470,7 +475,7 @@ class PlayState extends MusicBeatState
*/
case 'guns' | 'stress' | 'ugh':
// defaultCamZoom = 0.9;
// defaultCamZoom = 0.95;
curStage = 'tank';
var bg:BGSprite = new BGSprite('tankSky', 0, -200, 0, 0);
@ -491,9 +496,28 @@ class PlayState extends MusicBeatState
var tankWatchtower:BGSprite = new BGSprite('tankWatchtower', 300, 50, 0.5, 0.5);
add(tankWatchtower);
var tankGround:BGSprite = new BGSprite('tankGround', -400, -20);
var tankGround:BGSprite = new BGSprite('tankGround', -200, -20);
add(tankGround);
var fgTank0:BGSprite = new BGSprite('tank0', -290, 400, 1.7, 1.5, ['fg']);
foregroundSprites.add(fgTank0);
var fgTank1:BGSprite = new BGSprite('tank1', -100, 680, 2, 0.2, ['fg']);
foregroundSprites.add(fgTank1);
// just called 'foreground' just cuz small inconsistency no bbiggei
var fgTank2:BGSprite = new BGSprite('tank2', 450, 840, 1.5, 1.5, ['foreground']);
foregroundSprites.add(fgTank2);
var fgTank4:BGSprite = new BGSprite('tank4', 1000, 880, 1.5, 1.5, ['fg']);
foregroundSprites.add(fgTank4);
var fgTank5:BGSprite = new BGSprite('tank5', 1400, 600, 1.5, 1.5, ['fg']);
foregroundSprites.add(fgTank5);
var fgTank3:BGSprite = new BGSprite('tank3', 1300, 1130, 3.5, 2.5, ['fg']);
foregroundSprites.add(fgTank3);
default:
defaultCamZoom = 0.9;
curStage = 'stage';
@ -630,6 +654,8 @@ class PlayState extends MusicBeatState
add(dad);
add(boyfriend);
add(foregroundSprites);
var doof:DialogueBox = new DialogueBox(false, dialogue);
// doof.x += 70;
// doof.y = FlxG.height * 0.5;
@ -1470,7 +1496,7 @@ class PlayState extends MusicBeatState
trace("User is cheating!");
}
if (health <= 0)
if (health <= 0 && !practiceMode)
{
boyfriend.stunned = true;
@ -2310,6 +2336,11 @@ class PlayState extends MusicBeatState
}
}
foregroundSprites.forEach(function(spr:BGSprite)
{
spr.dance();
});
switch (curStage)
{
case 'school':