Skip to content

Commit

Permalink
Pico Mechanic Part 2
Browse files Browse the repository at this point in the history
  • Loading branch information
poec987 committed Jun 26, 2024
1 parent 4de389c commit 997cfc8
Show file tree
Hide file tree
Showing 8 changed files with 70 additions and 4 deletions.
Binary file added assets/shared/images/customNotes/shield.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
53 changes: 53 additions & 0 deletions assets/shared/images/customNotes/shield.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<?xml version="1.0" encoding="utf-8"?>
<TextureAtlas imagePath="NOTE_assets.png">
<!-- Created with Adobe Animate version 20.0.0.17400 -->
<!-- http://www.adobe.com/products/animate.html -->
<SubTexture name="arrowDOWN0000" x="0" y="235" width="157" height="153"/>
<SubTexture name="arrowLEFT0000" x="310" y="235" width="153" height="157"/>
<SubTexture name="arrowRIGHT0000" x="157" y="235" width="153" height="157"/>
<SubTexture name="arrowUP0000" x="784" y="232" width="157" height="153"/>
<SubTexture name="blue0000" x="1850" y="154" width="157" height="154"/>
<SubTexture name="blue hold end0000" x="1170" y="447" width="50" height="64"/>
<SubTexture name="blue hold piece0000" x="1370" y="449" width="50" height="44"/>
<SubTexture name="down confirm0000" x="0" y="0" width="238" height="235"/>
<SubTexture name="down confirm0001" x="238" y="0" width="238" height="235"/>
<SubTexture name="down confirm0002" x="1176" y="230" width="219" height="208" frameX="-6" frameY="-12" frameWidth="238" frameHeight="235"/>
<SubTexture name="down confirm0003" x="1176" y="230" width="219" height="208" frameX="-6" frameY="-12" frameWidth="238" frameHeight="235"/>
<SubTexture name="down press0000" x="149" y="392" width="142" height="140" frameX="-4" frameY="-2" frameWidth="149" frameHeight="146"/>
<SubTexture name="down press0001" x="149" y="392" width="142" height="140" frameX="-4" frameY="-2" frameWidth="149" frameHeight="146"/>
<SubTexture name="down press0002" x="0" y="388" width="149" height="146"/>
<SubTexture name="down press0003" x="0" y="388" width="149" height="146"/>
<SubTexture name="green0000" x="1850" y="0" width="157" height="154"/>
<SubTexture name="green hold end0000" x="1120" y="442" width="50" height="64"/>
<SubTexture name="green hold piece0000" x="1320" y="447" width="50" height="44"/>
<SubTexture name="left confirm0000" x="948" y="0" width="228" height="231"/>
<SubTexture name="left confirm0001" x="1402" y="228" width="218" height="221" frameX="-5" frameY="-5" frameWidth="228" frameHeight="231"/>
<SubTexture name="left confirm0002" x="1402" y="0" width="225" height="221" frameX="-2" frameY="-1" frameWidth="228" frameHeight="231"/>
<SubTexture name="left confirm0003" x="1402" y="0" width="225" height="221" frameX="-2" frameY="-1" frameWidth="228" frameHeight="231"/>
<SubTexture name="left press0000" x="291" y="392" width="140" height="142" frameX="-3" frameY="-3" frameWidth="146" frameHeight="149"/>
<SubTexture name="left press0001" x="291" y="392" width="140" height="142" frameX="-3" frameY="-3" frameWidth="146" frameHeight="149"/>
<SubTexture name="left press0002" x="463" y="389" width="146" height="149"/>
<SubTexture name="left press0003" x="463" y="389" width="146" height="149"/>
<SubTexture name="pruple end hold0000" x="1220" y="447" width="50" height="64"/>
<SubTexture name="purple0000" x="630" y="232" width="154" height="157"/>
<SubTexture name="purple hold piece0000" x="1420" y="449" width="50" height="44"/>
<SubTexture name="red0000" x="476" y="232" width="154" height="157"/>
<SubTexture name="red hold end0000" x="1070" y="442" width="50" height="64"/>
<SubTexture name="red hold piece0000" x="1270" y="447" width="50" height="44"/>
<SubTexture name="right confirm0000" x="1627" y="0" width="223" height="226" frameX="-1" frameY="-3" frameWidth="226" frameHeight="230"/>
<SubTexture name="right confirm0001" x="1627" y="226" width="223" height="226" frameX="-1" frameY="-3" frameWidth="226" frameHeight="230"/>
<SubTexture name="right confirm0002" x="1176" y="0" width="226" height="230"/>
<SubTexture name="right confirm0003" x="1176" y="0" width="226" height="230"/>
<SubTexture name="right press0000" x="932" y="442" width="138" height="141" frameX="-3" frameY="-7" frameWidth="148" frameHeight="151"/>
<SubTexture name="right press0001" x="932" y="442" width="138" height="141" frameX="-3" frameY="-7" frameWidth="148" frameHeight="151"/>
<SubTexture name="right press0002" x="784" y="385" width="148" height="151"/>
<SubTexture name="right press0003" x="784" y="385" width="148" height="151"/>
<SubTexture name="up confirm0000" x="476" y="0" width="236" height="232"/>
<SubTexture name="up confirm0001" x="712" y="0" width="236" height="232"/>
<SubTexture name="up confirm0002" x="948" y="231" width="214" height="206" frameX="-11" frameY="-10" frameWidth="236" frameHeight="232"/>
<SubTexture name="up confirm0003" x="948" y="231" width="214" height="206" frameX="-11" frameY="-10" frameWidth="236" frameHeight="232"/>
<SubTexture name="up press0000" x="609" y="389" width="144" height="141" frameX="-5" frameY="-4" frameWidth="153" frameHeight="150"/>
<SubTexture name="up press0001" x="609" y="389" width="144" height="141" frameX="-5" frameY="-4" frameWidth="153" frameHeight="150"/>
<SubTexture name="up press0002" x="1850" y="308" width="153" height="150"/>
<SubTexture name="up press0003" x="1850" y="308" width="153" height="150"/>
</TextureAtlas>
Binary file added assets/shared/images/noteTypes/Shield Note.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/shared/sounds/shoot.mp3
Binary file not shown.
Binary file added assets/shared/sounds/shoot.ogg
Binary file not shown.
3 changes: 2 additions & 1 deletion source/ChartingState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,8 @@ class ChartingState extends MusicBeatState
"Laugh",
"Kill Santa",
"Kill",
"Pico Shoot"
"Pico Shoot",
"Shield Note"
];

var noteTypeDropDown:FlxUIDropDownMenu;
Expand Down
2 changes: 2 additions & 0 deletions source/Note.hx
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,8 @@ class Note extends FlxSprite
switch (noteType) {
case 'Kill':
frames = Paths.getSparrowAtlas('customNotes/kill');
case 'Shield Note':
frames = Paths.getSparrowAtlas('customNotes/shield');
default:
frames = Paths.getSparrowAtlas('NOTE_assets');
}
Expand Down
16 changes: 13 additions & 3 deletions source/PlayState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,8 @@ class PlayState extends MusicBeatState
var trainSound:FlxSound;

var picoShoot:FlxSprite;
var beefSafe:Bool = false;
var shootSound:FlxSound;

var limo:FlxSprite;
var grpLimoDancers:FlxTypedGroup<BackgroundDancer>;
Expand Down Expand Up @@ -342,6 +344,9 @@ class PlayState extends MusicBeatState
trainSound = new FlxSound().loadEmbedded(Paths.sound('train_passes'));
FlxG.sound.list.add(trainSound);

shootSound = new FlxSound().loadEmbedded(Paths.sound('shoot'));
FlxG.sound.list.add(shootSound);

// var cityLights:FlxSprite = new FlxSprite().loadGraphic(AssetPaths.win0.png);

var street:FlxSprite = new FlxSprite(-40, streetBehind.y).loadGraphic(Paths.image('philly/street'));
Expand Down Expand Up @@ -2524,8 +2529,8 @@ class PlayState extends MusicBeatState
switch (zeNoteType) {
case "Normal":
// trace("Normal Note Hit");
case "Test":
// trace("Test Note PRE HIT");
case "Shield Note":
beefSafe = true;
default:
// trace(zeNoteType + "was HITTTEEEEEEEEEEEEED");
}
Expand All @@ -2546,10 +2551,15 @@ class PlayState extends MusicBeatState
picoShoot.visible = true;
dad.visible = false;
picoShoot.animation.play('shoot', true);
if (curSong.toLowerCase() != "philly") {
shootSound.play(true);
}
new FlxTimer().start(0.05714285714, function(timer:FlxTimer) {
picoShoot.visible = false;
dad.visible = true;
health -= 0.5;
if (!beefSafe)
health -= 0.5;
beefSafe = false;
});
case "Kill Santa":
santa.animation.play('DIE', true);
Expand Down

0 comments on commit 997cfc8

Please sign in to comment.