Merge pull request #11 from BrandyBuizel/master
Switch works Pre-Faxe YOLO COMMIT LETS GOOOO
|
@ -27,6 +27,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
- Story mode scores not properly resetting, leading to VERY inflated highscores on the leaderboards. This also requires me to clear the scores that are on the leaderboard right now, sorry!
|
||||
- Difficulty on storymode and in freeplay scores
|
||||
- Hard mode difficulty on campaign levels have been fixed
|
||||
|
||||
## [0.2.1.1] - 2020-11-06
|
||||
### Fixed
|
||||
- Week 2 not unlocking properly
|
||||
|
|
57
Preloader.hx
Normal file
|
@ -0,0 +1,57 @@
|
|||
package ;
|
||||
|
||||
import flixel.system.FlxBasePreloader;
|
||||
import openfl.display.Sprite;
|
||||
import flash.display.Bitmap;
|
||||
import flash.display.BitmapData;
|
||||
import flash.display.BlendMode;
|
||||
import flash.display.Sprite;
|
||||
import flash.Lib;
|
||||
import flixel.FlxG;
|
||||
|
||||
@:bitmap("art/preloaderArt.png") class LogoImage extends BitmapData { }
|
||||
|
||||
class Preloader extends FlxBasePreloader
|
||||
{
|
||||
public function new(MinDisplayTime:Float=3, ?AllowedURLs:Array<String>)
|
||||
{
|
||||
super(MinDisplayTime, AllowedURLs);
|
||||
}
|
||||
|
||||
var logo:Sprite;
|
||||
|
||||
override function create():Void
|
||||
{
|
||||
this._width = Lib.current.stage.stageWidth;
|
||||
this._height = Lib.current.stage.stageHeight;
|
||||
|
||||
var ratio:Float = this._width / 2560; //This allows us to scale assets depending on the size of the screen.
|
||||
|
||||
logo = new Sprite();
|
||||
logo.addChild(new Bitmap(new LogoImage(0,0))); //Sets the graphic of the sprite to a Bitmap object, which uses our embedded BitmapData class.
|
||||
logo.scaleX = logo.scaleY = ratio;
|
||||
logo.x = ((this._width) / 2) - ((logo.width) / 2);
|
||||
logo.y = (this._height / 2) - ((logo.height) / 2);
|
||||
addChild(logo); //Adds the graphic to the NMEPreloader's buffer.
|
||||
|
||||
super.create();
|
||||
}
|
||||
|
||||
override function update(Percent:Float):Void
|
||||
{
|
||||
if(Percent < 69)
|
||||
{
|
||||
logo.scaleX += Percent / 1920;
|
||||
logo.scaleY += Percent / 1920;
|
||||
logo.x -= Percent * 0.6;
|
||||
logo.y -= Percent / 2;
|
||||
}else{
|
||||
logo.scaleX = this._width / 1280;
|
||||
logo.scaleY = this._width / 1280;
|
||||
logo.x = ((this._width) / 2) - ((logo.width) / 2);
|
||||
logo.y = (this._height / 2) - ((logo.height) / 2);
|
||||
}
|
||||
|
||||
super.update(Percent);
|
||||
}
|
||||
}
|
19
Project.xml
|
@ -4,9 +4,12 @@
|
|||
|
||||
<app title="Friday Night Funkin" file="Funkin" packageName="com.ninjamuffin99.funkin" main="Main" version="0.2.2" company="ninjamuffin99" />
|
||||
|
||||
<!--Switch Export with Unique ApplicationID and Icon-->
|
||||
<set name="APP_ID" value="0x0100f6c013bbc000" />
|
||||
|
||||
<!--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"-->
|
||||
<app preloader="flixel.system.FlxPreloader" />
|
||||
<app preloader="Preloader" resizable="true" />
|
||||
|
||||
<!--Minimum without FLX_NO_GAMEPAD: 11.8, without FLX_NO_NATIVE_CURSOR: 11.2-->
|
||||
<set name="SWF_VERSION" value="11.8" />
|
||||
|
@ -36,8 +39,8 @@
|
|||
|
||||
<classpath name="source" />
|
||||
|
||||
<assets path="assets/images"/>
|
||||
<assets path="assets/data"/>
|
||||
<assets path="assets/images" />
|
||||
<assets path="assets/data" />
|
||||
|
||||
<!-- <library name="noPreload" preload='false'/> -->
|
||||
<!-- <library name="noPreload"/> -->
|
||||
|
@ -48,8 +51,8 @@
|
|||
|
||||
<assets path="CHANGELOG.md"/>
|
||||
|
||||
<assets path="assets/fonts/vcr.ttf" embed="true" />
|
||||
|
||||
<assets path="assets/fonts/vcr.ttf" embed="true" />
|
||||
|
||||
<!-- _______________________________ Libraries ______________________________ -->
|
||||
|
||||
|
@ -62,6 +65,8 @@
|
|||
<!--In case you want to use the ui package-->
|
||||
<haxelib name="flixel-ui" />
|
||||
<haxelib name="newgrounds" />
|
||||
<haxelib name="faxe" if='switch'/>
|
||||
|
||||
<!-- <haxelib name="markdown" /> -->
|
||||
<!-- <haxelib name="HtmlParser" /> -->
|
||||
|
||||
|
@ -103,10 +108,10 @@
|
|||
<!-- _________________________________ Custom _______________________________ -->
|
||||
|
||||
<!--Place custom nodes like icons here (higher priority to override the HaxeFlixel icon)-->
|
||||
|
||||
<icon path="art/icon.png" />
|
||||
|
||||
|
||||
<!-- <haxedef name="SKIP_TO_PLAYSTATE" if="debug" /> -->
|
||||
<haxedef name="NG_LOGIN" if="newgrounds" />
|
||||
|
||||
|
||||
|
||||
</project>
|
||||
|
|
|
@ -4,3 +4,5 @@ This is the repository for Friday Night Funkin, a game originally made for Ludum
|
|||
|
||||
Play the Ludum Dare prototype here: https://ninja-muffin24.itch.io/friday-night-funkin
|
||||
Play the Newgrounds one here: https://www.newgrounds.com/portal/view/770371
|
||||
|
||||
## BrandyBuizel porting this shit like a G to Nintendo Switch
|
BIN
art/FMOD Logo Black - White Background.png
Normal file
After Width: | Height: | Size: 9.5 KiB |
BIN
art/FMOD Logo White - Black Background.png
Normal file
After Width: | Height: | Size: 8.6 KiB |
BIN
art/Funkin.bmp
Normal file
After Width: | Height: | Size: 3 MiB |
Before Width: | Height: | Size: 3 MiB After Width: | Height: | Size: 3 MiB |
|
@ -19,7 +19,7 @@ echo HOPE AND PRAY...
|
|||
color 0a
|
||||
@echo on
|
||||
echo BUILDING GAME
|
||||
lime build switch -final -v
|
||||
lime build switch -final -clean -v
|
||||
@echo off
|
||||
color 0b
|
||||
@echo on
|
||||
|
|
Before Width: | Height: | Size: 582 KiB |
BIN
art/lucky_guitar_assets.fla
Normal file
BIN
art/lucky_plays_guitar/lucky_plays_guitar_00000.png
Normal file
After Width: | Height: | Size: 70 KiB |
BIN
art/lucky_plays_guitar/lucky_plays_guitar_00001.png
Normal file
After Width: | Height: | Size: 70 KiB |
BIN
art/lucky_plays_guitar/lucky_plays_guitar_00002.png
Normal file
After Width: | Height: | Size: 70 KiB |
BIN
art/lucky_plays_guitar/lucky_plays_guitar_00003.png
Normal file
After Width: | Height: | Size: 66 KiB |
BIN
art/lucky_plays_guitar/lucky_plays_guitar_00004.png
Normal file
After Width: | Height: | Size: 67 KiB |
BIN
art/lucky_plays_guitar/lucky_plays_guitar_00005.png
Normal file
After Width: | Height: | Size: 67 KiB |
BIN
art/lucky_plays_guitar/lucky_plays_guitar_00006.png
Normal file
After Width: | Height: | Size: 67 KiB |
BIN
art/lucky_plays_guitar/lucky_plays_guitar_00007.png
Normal file
After Width: | Height: | Size: 70 KiB |
BIN
art/lucky_plays_guitar/lucky_plays_guitar_00008.png
Normal file
After Width: | Height: | Size: 70 KiB |
BIN
art/lucky_plays_guitar/lucky_plays_guitar_00009.png
Normal file
After Width: | Height: | Size: 66 KiB |
BIN
art/lucky_plays_guitar/lucky_plays_guitar_00010.png
Normal file
After Width: | Height: | Size: 67 KiB |
BIN
art/lucky_plays_guitar/lucky_plays_guitar_00011.png
Normal file
After Width: | Height: | Size: 67 KiB |
BIN
art/lucky_plays_guitar/lucky_plays_guitar_00012.png
Normal file
After Width: | Height: | Size: 67 KiB |
BIN
art/lucky_plays_guitar/lucky_plays_guitar_00013.png
Normal file
After Width: | Height: | Size: 70 KiB |
BIN
art/lucky_plays_guitar/lucky_plays_guitar_00014.png
Normal file
After Width: | Height: | Size: 70 KiB |
BIN
art/lucky_plays_guitar/lucky_plays_guitar_00015.png
Normal file
After Width: | Height: | Size: 66 KiB |
BIN
art/lucky_plays_guitar/lucky_plays_guitar_00016.png
Normal file
After Width: | Height: | Size: 67 KiB |
BIN
art/lucky_plays_guitar/lucky_plays_guitar_00017.png
Normal file
After Width: | Height: | Size: 67 KiB |
BIN
art/lucky_plays_guitar/lucky_plays_guitar_00018.png
Normal file
After Width: | Height: | Size: 67 KiB |
BIN
art/lucky_plays_guitar/lucky_plays_guitar_00019.png
Normal file
After Width: | Height: | Size: 68 KiB |
BIN
art/lucky_plays_guitar/lucky_plays_guitar_00020.png
Normal file
After Width: | Height: | Size: 67 KiB |
BIN
art/lucky_plays_guitar/lucky_plays_guitar_00021.png
Normal file
After Width: | Height: | Size: 69 KiB |
BIN
art/lucky_plays_guitar/lucky_plays_guitar_00022.png
Normal file
After Width: | Height: | Size: 68 KiB |
BIN
art/lucky_plays_guitar/lucky_plays_guitar_00023.png
Normal file
After Width: | Height: | Size: 71 KiB |
BIN
art/lucky_plays_guitar/lucky_plays_guitar_00024.png
Normal file
After Width: | Height: | Size: 71 KiB |
BIN
art/lucky_plays_guitar/lucky_plays_guitar_00025.png
Normal file
After Width: | Height: | Size: 73 KiB |
BIN
art/lucky_plays_guitar/lucky_plays_guitar_00026.png
Normal file
After Width: | Height: | Size: 74 KiB |
BIN
art/lucky_plays_guitar/lucky_plays_guitar_00027.png
Normal file
After Width: | Height: | Size: 71 KiB |
BIN
art/lucky_plays_guitar/lucky_plays_guitar_00028.png
Normal file
After Width: | Height: | Size: 73 KiB |
BIN
art/lucky_plays_guitar/lucky_plays_guitar_00029.png
Normal file
After Width: | Height: | Size: 74 KiB |
BIN
art/lucky_plays_guitar/lucky_plays_guitar_00030.png
Normal file
After Width: | Height: | Size: 68 KiB |
BIN
art/lucky_plays_guitar/lucky_plays_guitar_00031.png
Normal file
After Width: | Height: | Size: 59 KiB |
BIN
art/lucky_plays_guitar/lucky_plays_guitar_00032.png
Normal file
After Width: | Height: | Size: 59 KiB |
BIN
art/lucky_plays_guitar/lucky_tumble_10.png
Normal file
After Width: | Height: | Size: 42 KiB |
BIN
art/lucky_plays_guitar/lucky_tumble_11.png
Normal file
After Width: | Height: | Size: 48 KiB |
BIN
art/lucky_plays_guitar/lucky_tumble_13.png
Normal file
After Width: | Height: | Size: 46 KiB |
BIN
art/lucky_plays_guitar/lucky_tumble_14.png
Normal file
After Width: | Height: | Size: 42 KiB |
BIN
art/lucky_plays_guitar/lucky_tumble_15.png
Normal file
After Width: | Height: | Size: 42 KiB |
BIN
art/lucky_plays_guitar/lucky_tumble_16.png
Normal file
After Width: | Height: | Size: 58 KiB |
BIN
art/lucky_plays_guitar/lucky_tumble_17.png
Normal file
After Width: | Height: | Size: 43 KiB |
BIN
art/lucky_plays_guitar/lucky_tumble_18.png
Normal file
After Width: | Height: | Size: 43 KiB |
BIN
art/preloaderArt.png
Normal file
After Width: | Height: | Size: 530 KiB |
|
@ -21,4 +21,5 @@ kiddbrute for president--vote now
|
|||
play dead estate--on newgrounds
|
||||
this is a god damn prototype--we workin on it okay
|
||||
women are real--this is official
|
||||
too over exposed--newgrounds cant handle us
|
||||
too over exposed--newgrounds cant handle us
|
||||
Nintendo Switch--pre-orders now available
|
0
assets/fonts/fonts-go-here.txt
Normal file
BIN
assets/images/lucky_guitar_assets.png
Normal file
After Width: | Height: | Size: 622 KiB |
123
assets/images/lucky_guitar_assets.xml
Normal file
|
@ -0,0 +1,123 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<TextureAtlas imagePath="lucky_guitar_assets.png">
|
||||
<!-- Created with Adobe Animate version 20.0.1.19255 -->
|
||||
<!-- http://www.adobe.com/products/animate.html -->
|
||||
<SubTexture name="lucky DOWN note0000" x="0" y="0" width="654" height="489" frameX="-258" frameY="-87" frameWidth="912" frameHeight="579"/>
|
||||
<SubTexture name="lucky DOWN note0001" x="654" y="0" width="811" height="573" frameX="0" frameY="-6" frameWidth="912" frameHeight="579"/>
|
||||
<SubTexture name="lucky DOWN note0002" x="654" y="0" width="811" height="573" frameX="0" frameY="-6" frameWidth="912" frameHeight="579"/>
|
||||
<SubTexture name="lucky DOWN note0003" x="1465" y="0" width="664" height="533" frameX="-217" frameY="-42" frameWidth="912" frameHeight="579"/>
|
||||
<SubTexture name="lucky DOWN note0004" x="1465" y="0" width="664" height="533" frameX="-217" frameY="-42" frameWidth="912" frameHeight="579"/>
|
||||
<SubTexture name="lucky DOWN note0005" x="1465" y="0" width="664" height="533" frameX="-217" frameY="-42" frameWidth="912" frameHeight="579"/>
|
||||
<SubTexture name="lucky DOWN note0006" x="2129" y="0" width="754" height="544" frameX="-136" frameY="-30" frameWidth="912" frameHeight="579"/>
|
||||
<SubTexture name="lucky DOWN note0007" x="2129" y="0" width="754" height="544" frameX="-136" frameY="-30" frameWidth="912" frameHeight="579"/>
|
||||
<SubTexture name="lucky DOWN note0008" x="2129" y="0" width="754" height="544" frameX="-136" frameY="-30" frameWidth="912" frameHeight="579"/>
|
||||
<SubTexture name="lucky DOWN note0009" x="2883" y="0" width="667" height="519" frameX="-216" frameY="-55" frameWidth="912" frameHeight="579"/>
|
||||
<SubTexture name="lucky DOWN note0010" x="2883" y="0" width="667" height="519" frameX="-216" frameY="-55" frameWidth="912" frameHeight="579"/>
|
||||
<SubTexture name="lucky DOWN note0011" x="2883" y="0" width="667" height="519" frameX="-216" frameY="-55" frameWidth="912" frameHeight="579"/>
|
||||
<SubTexture name="lucky DOWN note0012" x="0" y="573" width="736" height="575" frameX="-145" frameY="0" frameWidth="912" frameHeight="579"/>
|
||||
<SubTexture name="lucky DOWN note0013" x="0" y="573" width="736" height="575" frameX="-145" frameY="0" frameWidth="912" frameHeight="579"/>
|
||||
<SubTexture name="lucky DOWN note0014" x="0" y="573" width="736" height="575" frameX="-145" frameY="0" frameWidth="912" frameHeight="579"/>
|
||||
<SubTexture name="lucky DOWN note0015" x="1465" y="0" width="664" height="533" frameX="-217" frameY="-42" frameWidth="912" frameHeight="579"/>
|
||||
<SubTexture name="lucky DOWN note0016" x="1465" y="0" width="664" height="533" frameX="-217" frameY="-42" frameWidth="912" frameHeight="579"/>
|
||||
<SubTexture name="lucky DOWN note0017" x="1465" y="0" width="664" height="533" frameX="-217" frameY="-42" frameWidth="912" frameHeight="579"/>
|
||||
<SubTexture name="lucky DOWN note0018" x="0" y="573" width="736" height="575" frameX="-145" frameY="0" frameWidth="912" frameHeight="579"/>
|
||||
<SubTexture name="lucky DOWN note0019" x="0" y="573" width="736" height="575" frameX="-145" frameY="0" frameWidth="912" frameHeight="579"/>
|
||||
<SubTexture name="lucky DOWN note0020" x="0" y="573" width="736" height="575" frameX="-145" frameY="0" frameWidth="912" frameHeight="579"/>
|
||||
<SubTexture name="lucky DOWN note0021" x="0" y="573" width="736" height="575" frameX="-145" frameY="0" frameWidth="912" frameHeight="579"/>
|
||||
<SubTexture name="lucky DOWN note0022" x="0" y="573" width="736" height="575" frameX="-145" frameY="0" frameWidth="912" frameHeight="579"/>
|
||||
<SubTexture name="lucky DOWN note0023" x="0" y="573" width="736" height="575" frameX="-145" frameY="0" frameWidth="912" frameHeight="579"/>
|
||||
<SubTexture name="lucky DOWN note0024" x="0" y="573" width="736" height="575" frameX="-145" frameY="0" frameWidth="912" frameHeight="579"/>
|
||||
<SubTexture name="lucky UP NOTE0000" x="3049" y="1721" width="767" height="575" frameX="-173" frameY="-9" frameWidth="953" frameHeight="625"/>
|
||||
<SubTexture name="lucky UP NOTE0001" x="3049" y="1721" width="767" height="575" frameX="-173" frameY="-9" frameWidth="953" frameHeight="625"/>
|
||||
<SubTexture name="lucky UP NOTE0002" x="0" y="2307" width="654" height="489" frameX="-286" frameY="-95" frameWidth="953" frameHeight="625"/>
|
||||
<SubTexture name="lucky UP NOTE0003" x="0" y="2307" width="654" height="489" frameX="-286" frameY="-95" frameWidth="953" frameHeight="625"/>
|
||||
<SubTexture name="lucky UP NOTE0004" x="654" y="2307" width="792" height="589" frameX="-40" frameY="0" frameWidth="953" frameHeight="625"/>
|
||||
<SubTexture name="lucky UP NOTE0005" x="654" y="2307" width="792" height="589" frameX="-40" frameY="0" frameWidth="953" frameHeight="625"/>
|
||||
<SubTexture name="lucky UP NOTE0006" x="1446" y="2307" width="878" height="572" frameX="0" frameY="-12" frameWidth="953" frameHeight="625"/>
|
||||
<SubTexture name="lucky UP NOTE0007" x="1446" y="2307" width="878" height="572" frameX="0" frameY="-12" frameWidth="953" frameHeight="625"/>
|
||||
<SubTexture name="lucky UP NOTE0008" x="2324" y="2307" width="847" height="572" frameX="-22" frameY="-14" frameWidth="953" frameHeight="625"/>
|
||||
<SubTexture name="lucky UP NOTE0009" x="2324" y="2307" width="847" height="572" frameX="-22" frameY="-14" frameWidth="953" frameHeight="625"/>
|
||||
<SubTexture name="lucky UP NOTE0010" x="3171" y="2307" width="811" height="574" frameX="-28" frameY="-14" frameWidth="953" frameHeight="625"/>
|
||||
<SubTexture name="lucky UP NOTE0011" x="3171" y="2307" width="811" height="574" frameX="-28" frameY="-14" frameWidth="953" frameHeight="625"/>
|
||||
<SubTexture name="lucky UP NOTE0012" x="0" y="2896" width="953" height="610" frameX="0" frameY="-15" frameWidth="953" frameHeight="625"/>
|
||||
<SubTexture name="lucky UP NOTE0013" x="0" y="2896" width="953" height="610" frameX="0" frameY="-15" frameWidth="953" frameHeight="625"/>
|
||||
<SubTexture name="lucky UP NOTE0014" x="953" y="2896" width="931" height="611" frameX="-22" frameY="-14" frameWidth="953" frameHeight="625"/>
|
||||
<SubTexture name="lucky UP NOTE0015" x="953" y="2896" width="931" height="611" frameX="-22" frameY="-14" frameWidth="953" frameHeight="625"/>
|
||||
<SubTexture name="lucky UP NOTE0016" x="953" y="2896" width="931" height="611" frameX="-22" frameY="-14" frameWidth="953" frameHeight="625"/>
|
||||
<SubTexture name="lucky UP NOTE0017" x="953" y="2896" width="931" height="611" frameX="-22" frameY="-14" frameWidth="953" frameHeight="625"/>
|
||||
<SubTexture name="lucky UP NOTE0018" x="953" y="2896" width="931" height="611" frameX="-22" frameY="-14" frameWidth="953" frameHeight="625"/>
|
||||
<SubTexture name="lucky guitar idle0000" x="736" y="573" width="664" height="533" frameX="-72" frameY="-42" frameWidth="751" frameHeight="575"/>
|
||||
<SubTexture name="lucky guitar idle0001" x="736" y="573" width="664" height="533" frameX="-72" frameY="-42" frameWidth="751" frameHeight="575"/>
|
||||
<SubTexture name="lucky guitar idle0002" x="1400" y="573" width="736" height="575" frameX="0" frameY="0" frameWidth="751" frameHeight="575"/>
|
||||
<SubTexture name="lucky guitar idle0003" x="1400" y="573" width="736" height="575" frameX="0" frameY="0" frameWidth="751" frameHeight="575"/>
|
||||
<SubTexture name="lucky guitar idle0004" x="2136" y="573" width="638" height="482" frameX="-113" frameY="-87" frameWidth="751" frameHeight="575"/>
|
||||
<SubTexture name="lucky guitar idle0005" x="2136" y="573" width="638" height="482" frameX="-113" frameY="-87" frameWidth="751" frameHeight="575"/>
|
||||
<SubTexture name="lucky guitar idle0006" x="2774" y="573" width="679" height="527" frameX="-72" frameY="-42" frameWidth="751" frameHeight="575"/>
|
||||
<SubTexture name="lucky guitar idle0007" x="2774" y="573" width="679" height="527" frameX="-72" frameY="-42" frameWidth="751" frameHeight="575"/>
|
||||
<SubTexture name="lucky guitar idle0008" x="0" y="1148" width="730" height="573" frameX="0" frameY="0" frameWidth="751" frameHeight="575"/>
|
||||
<SubTexture name="lucky guitar idle0009" x="0" y="1148" width="730" height="573" frameX="0" frameY="0" frameWidth="751" frameHeight="575"/>
|
||||
<SubTexture name="lucky guitar idle0010" x="730" y="1148" width="617" height="486" frameX="-113" frameY="-87" frameWidth="751" frameHeight="575"/>
|
||||
<SubTexture name="lucky guitar idle0011" x="730" y="1148" width="617" height="486" frameX="-113" frameY="-87" frameWidth="751" frameHeight="575"/>
|
||||
<SubTexture name="lucky guitar idle0012" x="736" y="573" width="664" height="533" frameX="-72" frameY="-42" frameWidth="751" frameHeight="575"/>
|
||||
<SubTexture name="lucky guitar idle0013" x="736" y="573" width="664" height="533" frameX="-72" frameY="-42" frameWidth="751" frameHeight="575"/>
|
||||
<SubTexture name="lucky guitar idle0014" x="1400" y="573" width="736" height="575" frameX="0" frameY="0" frameWidth="751" frameHeight="575"/>
|
||||
<SubTexture name="lucky guitar idle0015" x="1400" y="573" width="736" height="575" frameX="0" frameY="0" frameWidth="751" frameHeight="575"/>
|
||||
<SubTexture name="lucky guitar idle0016" x="2136" y="573" width="638" height="482" frameX="-113" frameY="-87" frameWidth="751" frameHeight="575"/>
|
||||
<SubTexture name="lucky guitar idle0017" x="2136" y="573" width="638" height="482" frameX="-113" frameY="-87" frameWidth="751" frameHeight="575"/>
|
||||
<SubTexture name="lucky guitar idle0018" x="2774" y="573" width="679" height="527" frameX="-72" frameY="-42" frameWidth="751" frameHeight="575"/>
|
||||
<SubTexture name="lucky guitar idle0019" x="2774" y="573" width="679" height="527" frameX="-72" frameY="-42" frameWidth="751" frameHeight="575"/>
|
||||
<SubTexture name="lucky guitar idle0020" x="0" y="1148" width="730" height="573" frameX="0" frameY="0" frameWidth="751" frameHeight="575"/>
|
||||
<SubTexture name="lucky guitar idle0021" x="0" y="1148" width="730" height="573" frameX="0" frameY="0" frameWidth="751" frameHeight="575"/>
|
||||
<SubTexture name="lucky guitar idle0022" x="1347" y="1148" width="617" height="486" frameX="-113" frameY="-87" frameWidth="751" frameHeight="575"/>
|
||||
<SubTexture name="lucky guitar idle0023" x="1347" y="1148" width="617" height="486" frameX="-113" frameY="-87" frameWidth="751" frameHeight="575"/>
|
||||
<SubTexture name="lucky guitar idle0024" x="736" y="573" width="664" height="533" frameX="-72" frameY="-42" frameWidth="751" frameHeight="575"/>
|
||||
<SubTexture name="lucky guitar idle0025" x="736" y="573" width="664" height="533" frameX="-72" frameY="-42" frameWidth="751" frameHeight="575"/>
|
||||
<SubTexture name="lucky guitar idle0026" x="1400" y="573" width="736" height="575" frameX="0" frameY="0" frameWidth="751" frameHeight="575"/>
|
||||
<SubTexture name="lucky guitar idle0027" x="1400" y="573" width="736" height="575" frameX="0" frameY="0" frameWidth="751" frameHeight="575"/>
|
||||
<SubTexture name="lucky guitar idle0028" x="2136" y="573" width="638" height="482" frameX="-113" frameY="-87" frameWidth="751" frameHeight="575"/>
|
||||
<SubTexture name="lucky guitar idle0029" x="2136" y="573" width="638" height="482" frameX="-113" frameY="-87" frameWidth="751" frameHeight="575"/>
|
||||
<SubTexture name="lucky guitar idle0030" x="2774" y="573" width="679" height="527" frameX="-72" frameY="-42" frameWidth="751" frameHeight="575"/>
|
||||
<SubTexture name="lucky guitar idle0031" x="2774" y="573" width="679" height="527" frameX="-72" frameY="-42" frameWidth="751" frameHeight="575"/>
|
||||
<SubTexture name="lucky guitar idle0032" x="1964" y="1148" width="730" height="573" frameX="0" frameY="0" frameWidth="751" frameHeight="575"/>
|
||||
<SubTexture name="lucky guitar idle0033" x="1964" y="1148" width="730" height="573" frameX="0" frameY="0" frameWidth="751" frameHeight="575"/>
|
||||
<SubTexture name="lucky guitar idle0034" x="2694" y="1148" width="617" height="486" frameX="-113" frameY="-87" frameWidth="751" frameHeight="575"/>
|
||||
<SubTexture name="lucky guitar idle0035" x="2694" y="1148" width="617" height="486" frameX="-113" frameY="-87" frameWidth="751" frameHeight="575"/>
|
||||
<SubTexture name="lucky sing left0000" x="3049" y="1721" width="767" height="575" frameX="-173" frameY="-9" frameWidth="953" frameHeight="625"/>
|
||||
<SubTexture name="lucky sing left0001" x="3049" y="1721" width="767" height="575" frameX="-173" frameY="-9" frameWidth="953" frameHeight="625"/>
|
||||
<SubTexture name="lucky sing left0002" x="0" y="2307" width="654" height="489" frameX="-286" frameY="-95" frameWidth="953" frameHeight="625"/>
|
||||
<SubTexture name="lucky sing left0003" x="0" y="2307" width="654" height="489" frameX="-286" frameY="-95" frameWidth="953" frameHeight="625"/>
|
||||
<SubTexture name="lucky sing left0004" x="654" y="2307" width="792" height="589" frameX="-40" frameY="0" frameWidth="953" frameHeight="625"/>
|
||||
<SubTexture name="lucky sing left0005" x="654" y="2307" width="792" height="589" frameX="-40" frameY="0" frameWidth="953" frameHeight="625"/>
|
||||
<SubTexture name="lucky sing left0006" x="1446" y="2307" width="878" height="572" frameX="0" frameY="-12" frameWidth="953" frameHeight="625"/>
|
||||
<SubTexture name="lucky sing left0007" x="1446" y="2307" width="878" height="572" frameX="0" frameY="-12" frameWidth="953" frameHeight="625"/>
|
||||
<SubTexture name="lucky sing left0008" x="2324" y="2307" width="847" height="572" frameX="-22" frameY="-14" frameWidth="953" frameHeight="625"/>
|
||||
<SubTexture name="lucky sing left0009" x="2324" y="2307" width="847" height="572" frameX="-22" frameY="-14" frameWidth="953" frameHeight="625"/>
|
||||
<SubTexture name="lucky sing left0010" x="3171" y="2307" width="811" height="574" frameX="-28" frameY="-14" frameWidth="953" frameHeight="625"/>
|
||||
<SubTexture name="lucky sing left0011" x="3171" y="2307" width="811" height="574" frameX="-28" frameY="-14" frameWidth="953" frameHeight="625"/>
|
||||
<SubTexture name="lucky sing left0012" x="0" y="2896" width="953" height="610" frameX="0" frameY="-15" frameWidth="953" frameHeight="625"/>
|
||||
<SubTexture name="lucky sing left0013" x="0" y="2896" width="953" height="610" frameX="0" frameY="-15" frameWidth="953" frameHeight="625"/>
|
||||
<SubTexture name="lucky sing left0014" x="953" y="2896" width="931" height="611" frameX="-22" frameY="-14" frameWidth="953" frameHeight="625"/>
|
||||
<SubTexture name="lucky sing left0015" x="953" y="2896" width="931" height="611" frameX="-22" frameY="-14" frameWidth="953" frameHeight="625"/>
|
||||
<SubTexture name="lucky sing left0016" x="953" y="2896" width="931" height="611" frameX="-22" frameY="-14" frameWidth="953" frameHeight="625"/>
|
||||
<SubTexture name="lucky sing left0017" x="953" y="2896" width="931" height="611" frameX="-22" frameY="-14" frameWidth="953" frameHeight="625"/>
|
||||
<SubTexture name="lucky sing left0018" x="953" y="2896" width="931" height="611" frameX="-22" frameY="-14" frameWidth="953" frameHeight="625"/>
|
||||
<SubTexture name="lucky sing right0000" x="3049" y="1721" width="767" height="575" frameX="-173" frameY="-9" frameWidth="953" frameHeight="625"/>
|
||||
<SubTexture name="lucky sing right0001" x="3049" y="1721" width="767" height="575" frameX="-173" frameY="-9" frameWidth="953" frameHeight="625"/>
|
||||
<SubTexture name="lucky sing right0002" x="0" y="2307" width="654" height="489" frameX="-286" frameY="-95" frameWidth="953" frameHeight="625"/>
|
||||
<SubTexture name="lucky sing right0003" x="0" y="2307" width="654" height="489" frameX="-286" frameY="-95" frameWidth="953" frameHeight="625"/>
|
||||
<SubTexture name="lucky sing right0004" x="654" y="2307" width="792" height="589" frameX="-40" frameY="0" frameWidth="953" frameHeight="625"/>
|
||||
<SubTexture name="lucky sing right0005" x="654" y="2307" width="792" height="589" frameX="-40" frameY="0" frameWidth="953" frameHeight="625"/>
|
||||
<SubTexture name="lucky sing right0006" x="1446" y="2307" width="878" height="572" frameX="0" frameY="-12" frameWidth="953" frameHeight="625"/>
|
||||
<SubTexture name="lucky sing right0007" x="1446" y="2307" width="878" height="572" frameX="0" frameY="-12" frameWidth="953" frameHeight="625"/>
|
||||
<SubTexture name="lucky sing right0008" x="2324" y="2307" width="847" height="572" frameX="-22" frameY="-14" frameWidth="953" frameHeight="625"/>
|
||||
<SubTexture name="lucky sing right0009" x="2324" y="2307" width="847" height="572" frameX="-22" frameY="-14" frameWidth="953" frameHeight="625"/>
|
||||
<SubTexture name="lucky sing right0010" x="3171" y="2307" width="811" height="574" frameX="-28" frameY="-14" frameWidth="953" frameHeight="625"/>
|
||||
<SubTexture name="lucky sing right0011" x="3171" y="2307" width="811" height="574" frameX="-28" frameY="-14" frameWidth="953" frameHeight="625"/>
|
||||
<SubTexture name="lucky sing right0012" x="0" y="2896" width="953" height="610" frameX="0" frameY="-15" frameWidth="953" frameHeight="625"/>
|
||||
<SubTexture name="lucky sing right0013" x="0" y="2896" width="953" height="610" frameX="0" frameY="-15" frameWidth="953" frameHeight="625"/>
|
||||
<SubTexture name="lucky sing right0014" x="953" y="2896" width="931" height="611" frameX="-22" frameY="-14" frameWidth="953" frameHeight="625"/>
|
||||
<SubTexture name="lucky sing right0015" x="953" y="2896" width="931" height="611" frameX="-22" frameY="-14" frameWidth="953" frameHeight="625"/>
|
||||
<SubTexture name="lucky sing right0016" x="953" y="2896" width="931" height="611" frameX="-22" frameY="-14" frameWidth="953" frameHeight="625"/>
|
||||
<SubTexture name="lucky sing right0017" x="953" y="2896" width="931" height="611" frameX="-22" frameY="-14" frameWidth="953" frameHeight="625"/>
|
||||
<SubTexture name="lucky sing right0018" x="953" y="2896" width="931" height="611" frameX="-22" frameY="-14" frameWidth="953" frameHeight="625"/>
|
||||
</TextureAtlas>
|
BIN
assets/music/vidyagames.mp3
Normal file
BIN
assets/music/vidyagames.ogg
Normal file
|
@ -107,6 +107,21 @@ class Character extends FlxSprite
|
|||
addOffset("singLEFT", -30);
|
||||
addOffset("singDOWN", -30, -40);
|
||||
playAnim('idle');
|
||||
case 'lucky':
|
||||
tex = FlxAtlasFrames.fromSparrow(AssetPaths.lucky_guitar_assets__png, AssetPaths.lucky_guitar_assets__xml);
|
||||
frames = tex;
|
||||
animation.addByPrefix('idle', 'lucky guitar idle', 24, false);
|
||||
animation.addByPrefix('singUP', 'lucky UP NOTE', 24, false);
|
||||
animation.addByPrefix('singRIGHT', 'lucky sing right', 24, false);
|
||||
animation.addByPrefix('singDOWN', 'lucky DOWN note', 24, false);
|
||||
animation.addByPrefix('singLEFT', 'lucky sing left', 24, false);
|
||||
|
||||
addOffset('idle', 0, -180);
|
||||
addOffset("singUP", 200, -180);
|
||||
addOffset("singRIGHT", 200, -180);
|
||||
addOffset("singLEFT", 200, -180);
|
||||
addOffset("singDOWN", 200, -180);
|
||||
playAnim('idle');
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -162,6 +177,8 @@ class Character extends FlxSprite
|
|||
playAnim('idle');
|
||||
case 'monster':
|
||||
playAnim('idle');
|
||||
case 'lucky':
|
||||
playAnim('idle');
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -30,6 +30,7 @@ enum abstract Action(String) to String from String
|
|||
var BACK = "back";
|
||||
var PAUSE = "pause";
|
||||
var RESET = "reset";
|
||||
var CHEAT = "cheat";
|
||||
}
|
||||
#else
|
||||
@:enum
|
||||
|
@ -51,6 +52,7 @@ abstract Action(String) to String from String
|
|||
var BACK = "back";
|
||||
var PAUSE = "pause";
|
||||
var RESET = "reset";
|
||||
var CHEAT = "cheat";
|
||||
}
|
||||
#end
|
||||
|
||||
|
@ -75,6 +77,7 @@ enum Control
|
|||
ACCEPT;
|
||||
BACK;
|
||||
PAUSE;
|
||||
CHEAT;
|
||||
}
|
||||
|
||||
enum KeyboardScheme
|
||||
|
@ -107,6 +110,7 @@ class Controls extends FlxActionSet
|
|||
var _back = new FlxActionDigital(Action.BACK);
|
||||
var _pause = new FlxActionDigital(Action.PAUSE);
|
||||
var _reset = new FlxActionDigital(Action.RESET);
|
||||
var _cheat = new FlxActionDigital(Action.CHEAT);
|
||||
|
||||
#if (haxe >= "4.0.0")
|
||||
var byName:Map<String, FlxActionDigital> = [];
|
||||
|
@ -197,6 +201,11 @@ class Controls extends FlxActionSet
|
|||
inline function get_RESET()
|
||||
return _reset.check();
|
||||
|
||||
public var CHEAT(get, never):Bool;
|
||||
|
||||
inline function get_CHEAT()
|
||||
return _cheat.check();
|
||||
|
||||
#if (haxe >= "4.0.0")
|
||||
public function new(name, scheme = None)
|
||||
{
|
||||
|
@ -218,6 +227,7 @@ class Controls extends FlxActionSet
|
|||
add(_back);
|
||||
add(_pause);
|
||||
add(_reset);
|
||||
add(_cheat);
|
||||
|
||||
for (action in digitalActions)
|
||||
byName[action.name] = action;
|
||||
|
@ -245,6 +255,7 @@ class Controls extends FlxActionSet
|
|||
add(_back);
|
||||
add(_pause);
|
||||
add(_reset);
|
||||
add(_cheat);
|
||||
|
||||
for (action in digitalActions)
|
||||
byName[action.name] = action;
|
||||
|
@ -298,6 +309,7 @@ class Controls extends FlxActionSet
|
|||
case BACK: _back;
|
||||
case PAUSE: _pause;
|
||||
case RESET: _reset;
|
||||
case CHEAT: _cheat;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -341,6 +353,8 @@ class Controls extends FlxActionSet
|
|||
func(_pause, JUST_PRESSED);
|
||||
case RESET:
|
||||
func(_reset, JUST_PRESSED);
|
||||
case CHEAT:
|
||||
func(_cheat, JUST_PRESSED);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -623,12 +637,14 @@ class Controls extends FlxActionSet
|
|||
//Swap A and B for switch
|
||||
Control.ACCEPT => [B],
|
||||
Control.BACK => [A],
|
||||
Control.UP => [DPAD_UP, LEFT_STICK_DIGITAL_UP],
|
||||
Control.DOWN => [DPAD_DOWN, LEFT_STICK_DIGITAL_DOWN],
|
||||
Control.LEFT => [DPAD_LEFT, LEFT_STICK_DIGITAL_LEFT],
|
||||
Control.RIGHT => [DPAD_RIGHT, LEFT_STICK_DIGITAL_RIGHT],
|
||||
Control.UP => [DPAD_UP, LEFT_STICK_DIGITAL_UP, RIGHT_STICK_DIGITAL_UP],
|
||||
Control.DOWN => [DPAD_DOWN, LEFT_STICK_DIGITAL_DOWN, RIGHT_STICK_DIGITAL_DOWN],
|
||||
Control.LEFT => [DPAD_LEFT, LEFT_STICK_DIGITAL_LEFT, RIGHT_STICK_DIGITAL_LEFT],
|
||||
Control.RIGHT => [DPAD_RIGHT, LEFT_STICK_DIGITAL_RIGHT, RIGHT_STICK_DIGITAL_RIGHT],
|
||||
Control.PAUSE => [START],
|
||||
Control.RESET => [Y]
|
||||
//Swap Y and X for switch
|
||||
Control.RESET => [Y],
|
||||
Control.CHEAT => [X]
|
||||
]);
|
||||
#end
|
||||
}
|
||||
|
|
|
@ -180,7 +180,11 @@ class FreeplayState extends MusicBeatState
|
|||
if (curDifficulty > 2)
|
||||
curDifficulty = 0;
|
||||
|
||||
|
||||
#if !switch
|
||||
intendedScore = Highscore.getScore(songs[curSelected], curDifficulty);
|
||||
#end
|
||||
|
||||
|
||||
switch (curDifficulty)
|
||||
{
|
||||
|
@ -195,6 +199,11 @@ class FreeplayState extends MusicBeatState
|
|||
|
||||
function changeSelection(change:Int = 0)
|
||||
{
|
||||
|
||||
#if !switch
|
||||
NGio.logEvent('Fresh');
|
||||
#end
|
||||
|
||||
// NGio.logEvent('Fresh');
|
||||
FlxG.sound.play('assets/sounds/scrollMenu' + TitleState.soundExt, 0.4);
|
||||
|
||||
|
@ -207,8 +216,12 @@ class FreeplayState extends MusicBeatState
|
|||
|
||||
// selector.y = (70 * curSelected) + 30;
|
||||
|
||||
|
||||
#if !switch
|
||||
intendedScore = Highscore.getScore(songs[curSelected], curDifficulty);
|
||||
// lerpScore = 0;
|
||||
#end
|
||||
|
||||
|
||||
FlxG.sound.playMusic('assets/music/' + songs[curSelected] + "_Inst" + TitleState.soundExt, 0);
|
||||
|
||||
|
|
|
@ -4,13 +4,22 @@ import flixel.FlxG;
|
|||
|
||||
class Highscore
|
||||
{
|
||||
#if (haxe >= "4.0.0")
|
||||
public static var songScores:Map<String, Int> = new Map();
|
||||
#else
|
||||
public static var songScores:Map<String, Int> = new Map<String, Int>();
|
||||
#end
|
||||
|
||||
|
||||
public static function saveScore(song:String, score:Int = 0, ?diff:Int = 0):Void
|
||||
{
|
||||
var daSong:String = formatSong(song, diff);
|
||||
|
||||
|
||||
#if !switch
|
||||
NGio.postScore(score, song);
|
||||
#end
|
||||
|
||||
|
||||
if (songScores.exists(daSong))
|
||||
{
|
||||
|
@ -23,7 +32,11 @@ class Highscore
|
|||
|
||||
public static function saveWeekScore(week:Int = 1, score:Int = 0, ?diff:Int = 0):Void
|
||||
{
|
||||
|
||||
#if !switch
|
||||
NGio.postScore(score, "Week " + week);
|
||||
#end
|
||||
|
||||
|
||||
var daWeek:String = formatSong('week' + week, diff);
|
||||
|
||||
|
|
|
@ -18,7 +18,11 @@ class MainMenuState extends MusicBeatState
|
|||
|
||||
var menuItems:FlxTypedGroup<FlxSprite>;
|
||||
|
||||
#if !switch
|
||||
var optionShit:Array<String> = ['story mode', 'freeplay', 'donate'];
|
||||
#else
|
||||
var optionShit:Array<String> = ['story mode', 'freeplay'];
|
||||
#end
|
||||
|
||||
var magenta:FlxSprite;
|
||||
var camFollow:FlxObject;
|
||||
|
@ -112,7 +116,6 @@ class MainMenuState extends MusicBeatState
|
|||
#if linux
|
||||
Sys.command('/usr/bin/xdg-open', ["https://ninja-muffin24.itch.io/funkin", "&"]);
|
||||
#else
|
||||
|
||||
|
||||
FlxG.openURL('https://ninja-muffin24.itch.io/funkin');
|
||||
#end
|
||||
|
@ -147,8 +150,12 @@ class MainMenuState extends MusicBeatState
|
|||
{
|
||||
case 'story mode':
|
||||
FlxG.switchState(new StoryMenuState());
|
||||
trace("Story Menu Selected");
|
||||
case 'freeplay':
|
||||
FlxG.switchState(new FreeplayState());
|
||||
|
||||
trace("Freeplay Menu Selected");
|
||||
|
||||
case 'options':
|
||||
FlxG.switchState(new OptionsMenu());
|
||||
}
|
||||
|
|
|
@ -292,6 +292,10 @@ class PlayState extends MusicBeatState
|
|||
|
||||
// cameras = [FlxG.cameras.list[1]];
|
||||
|
||||
#if lime
|
||||
trace("IT'S LIME");
|
||||
#end
|
||||
|
||||
super.create();
|
||||
}
|
||||
|
||||
|
@ -644,7 +648,8 @@ class PlayState extends MusicBeatState
|
|||
}
|
||||
else
|
||||
{
|
||||
Conductor.songPosition = FlxG.sound.music.time;
|
||||
//Conductor.songPosition = FlxG.sound.music.time;
|
||||
Conductor.songPosition += FlxG.elapsed * 1000;
|
||||
|
||||
if (!paused)
|
||||
{
|
||||
|
@ -674,6 +679,7 @@ class PlayState extends MusicBeatState
|
|||
if (camFollow.x != dad.getMidpoint().x + 150 && !PlayState.SONG.notes[Std.int(curStep / 16)].mustHitSection)
|
||||
{
|
||||
camFollow.setPosition(dad.getMidpoint().x + 150, dad.getMidpoint().y - 100);
|
||||
//camFollow.setPosition(lucky.getMidpoint().x - 120, lucky.getMidpoint().y + 210);
|
||||
vocals.volume = 1;
|
||||
|
||||
if (SONG.song.toLowerCase() == 'tutorial')
|
||||
|
@ -733,6 +739,18 @@ class PlayState extends MusicBeatState
|
|||
}
|
||||
// better streaming of shit
|
||||
|
||||
//RESET = Quick Game Over Screen
|
||||
if (controls.RESET){
|
||||
health = 0;
|
||||
trace("RESET = True");
|
||||
}
|
||||
|
||||
//CHEAT = brandon's a pussy
|
||||
if (controls.CHEAT){
|
||||
health += 1;
|
||||
trace("User is cheating!");
|
||||
}
|
||||
|
||||
if (health <= 0)
|
||||
{
|
||||
boyfriend.stunned = true;
|
||||
|
@ -833,7 +851,10 @@ class PlayState extends MusicBeatState
|
|||
{
|
||||
canPause = false;
|
||||
|
||||
|
||||
#if !switch
|
||||
Highscore.saveScore(SONG.song, songScore, storyDifficulty);
|
||||
#end
|
||||
|
||||
if (isStoryMode)
|
||||
{
|
||||
|
@ -852,6 +873,7 @@ class PlayState extends MusicBeatState
|
|||
NGio.unlockMedal(60961);
|
||||
Highscore.saveWeekScore(storyWeek, campaignScore, storyDifficulty);
|
||||
|
||||
|
||||
FlxG.save.data.weekUnlocked = StoryMenuState.weekUnlocked;
|
||||
FlxG.save.flush();
|
||||
}
|
||||
|
|
1288
source/Snd.hx
Normal file
332
source/SndTV.hx
Normal file
|
@ -0,0 +1,332 @@
|
|||
import h2d.Tweenie.TType;
|
||||
|
||||
//praise delahee, i'll figure out what this shit means later!
|
||||
|
||||
enum TVVar{
|
||||
TVVVolume;
|
||||
TVVPan;
|
||||
}
|
||||
|
||||
@:publicFields
|
||||
class TweenV {
|
||||
static var GUID = 0;
|
||||
var uid = 0;
|
||||
|
||||
var man : SndTV;
|
||||
var parent : Snd;
|
||||
var n : Float;
|
||||
var ln : Float;
|
||||
var speed : Float;
|
||||
var from : Float;
|
||||
var to : Float;
|
||||
var type : TType;
|
||||
var plays : Int; // -1 = infini, 1 et plus = nombre d'exécutions (1 par défaut)
|
||||
var varType : TVVar;
|
||||
var onUpdate : Null<TweenV->Void>;
|
||||
var onEnd : Null<TweenV->Void>;
|
||||
var isDebug = false;
|
||||
|
||||
public inline function new (
|
||||
parent:Snd ,
|
||||
n:Float ,
|
||||
ln:Float ,
|
||||
varType:TVVar,
|
||||
speed:Float ,
|
||||
from:Float ,
|
||||
to:Float ,
|
||||
type:h2d.Tweenie.TType ,
|
||||
plays ,
|
||||
onUpdate ,
|
||||
onEnd
|
||||
) {
|
||||
this.parent = parent ;
|
||||
this.n = n ;
|
||||
this.ln = ln ;
|
||||
this.varType = varType ;
|
||||
this.speed = speed ;
|
||||
this.from = from ;
|
||||
this.to = to ;
|
||||
this.type = type ;
|
||||
this.plays = plays ;
|
||||
this.onUpdate = onUpdate ;
|
||||
this.onEnd = onEnd ;
|
||||
}
|
||||
|
||||
public inline function reset(
|
||||
parent:Snd ,
|
||||
n:Float ,
|
||||
ln:Float ,
|
||||
varType:TVVar,
|
||||
speed:Float ,
|
||||
from:Float ,
|
||||
to:Float ,
|
||||
type:TType ,
|
||||
plays:Int ,
|
||||
onUpdate ,
|
||||
onEnd
|
||||
) {
|
||||
this.parent = parent ;
|
||||
this.n = n ;
|
||||
this.ln = ln ;
|
||||
this.speed = speed ;
|
||||
this.from = from ;
|
||||
this.to = to ;
|
||||
this.type = type ;
|
||||
this.plays = plays ;
|
||||
this.onUpdate = onUpdate ;
|
||||
this.onEnd = onEnd ;
|
||||
this.varType = varType ;
|
||||
isDebug = false;
|
||||
uid = GUID++;
|
||||
}
|
||||
|
||||
public function clear(){
|
||||
n = 0.0;
|
||||
ln = 0.0;
|
||||
speed = 0.0;
|
||||
plays = 0;
|
||||
from = 0.0;
|
||||
to = 0.0;
|
||||
parent = null;
|
||||
onEnd = null;
|
||||
onUpdate = null;
|
||||
isDebug = false;
|
||||
uid = GUID++;
|
||||
}
|
||||
|
||||
|
||||
public
|
||||
inline
|
||||
function apply( val ) {
|
||||
switch(varType){
|
||||
case TVVVolume: {
|
||||
parent.volume = val;
|
||||
#if debug
|
||||
if( isDebug )
|
||||
trace("tv:" + val);
|
||||
#end
|
||||
}
|
||||
case TVVPan: parent.pan = val;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public inline function kill( withCbk = true ) {
|
||||
if ( withCbk )
|
||||
man.terminateTween( this );
|
||||
else
|
||||
man.forceTerminateTween( this) ;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* tween order is not respected
|
||||
*/
|
||||
class SndTV {
|
||||
static var DEFAULT_DURATION = DateTools.seconds(1);
|
||||
public var fps = 60.0;
|
||||
public var isDebug = false;
|
||||
|
||||
var tlist : hxd.Stack<TweenV>;
|
||||
|
||||
public function new() {
|
||||
tlist = new hxd.Stack<TweenV>();
|
||||
tlist.reserve(8);
|
||||
}
|
||||
|
||||
function onError(e) {
|
||||
trace(e);
|
||||
}
|
||||
|
||||
public function count() {
|
||||
return tlist.length;
|
||||
}
|
||||
|
||||
public inline function create(parent:Snd, vartype:TVVar, to:Float, ?tp:h2d.Tweenie.TType, ?duration_ms:Float) : TweenV{
|
||||
return create_(parent, vartype, to, tp, duration_ms);
|
||||
}
|
||||
|
||||
public function exists(p:Snd) {
|
||||
for (t in tlist)
|
||||
if (t.parent == p )
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
public var pool : hxd.Stack<TweenV> = new hxd.Stack();
|
||||
|
||||
function create_(p:Snd, vartype:TVVar,to:Float, ?tp:h2d.Tweenie.TType, ?duration_ms:Float) : TweenV{
|
||||
if ( duration_ms==null )
|
||||
duration_ms = DEFAULT_DURATION;
|
||||
|
||||
#if debug
|
||||
if ( p == null ) trace("tween2 creation failed to:"+to+" tp:"+tp);
|
||||
#end
|
||||
|
||||
if ( tp==null ) tp = TEase;
|
||||
|
||||
{
|
||||
// on supprime les tweens précédents appliqués à la même variable
|
||||
for(t in tlist.backWardIterator())
|
||||
if(t.parent==p && t.varType == vartype) {
|
||||
forceTerminateTween(t);
|
||||
}
|
||||
}
|
||||
|
||||
var from = switch( vartype ){
|
||||
case TVVVolume : p.volume;
|
||||
case TVVPan : p.pan;
|
||||
}
|
||||
var t : TweenV;
|
||||
if (pool.length == 0){
|
||||
t = new TweenV(
|
||||
p,
|
||||
0.0,
|
||||
0.0,
|
||||
vartype,
|
||||
1 / ( duration_ms*fps/1000 ), // une seconde
|
||||
from,
|
||||
to,
|
||||
tp,
|
||||
1,
|
||||
null,
|
||||
null
|
||||
);
|
||||
}
|
||||
else {
|
||||
t = pool.pop();
|
||||
t.reset(
|
||||
p,
|
||||
0.0,
|
||||
0.0,
|
||||
vartype,
|
||||
1 / ( duration_ms*fps/1000 ), // une seconde
|
||||
from,
|
||||
to,
|
||||
tp,
|
||||
1,
|
||||
null,
|
||||
null
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
if( t.from==t.to )
|
||||
t.ln = 1; // tweening inutile : mais on s'assure ainsi qu'un update() et un end() seront bien appelés
|
||||
|
||||
t.man = this;
|
||||
tlist.push(t);
|
||||
|
||||
return t;
|
||||
}
|
||||
|
||||
public static inline
|
||||
function fastPow2(n:Float):Float {
|
||||
return n*n;
|
||||
}
|
||||
|
||||
public static inline
|
||||
function fastPow3(n:Float):Float {
|
||||
return n*n*n;
|
||||
}
|
||||
|
||||
public static inline
|
||||
function bezier(t:Float, p0:Float, p1:Float,p2:Float, p3:Float) {
|
||||
return
|
||||
fastPow3(1-t)*p0 +
|
||||
3*( t*fastPow2(1-t)*p1 + fastPow2(t)*(1-t)*p2 ) +
|
||||
fastPow3(t)*p3;
|
||||
}
|
||||
|
||||
// suppression du tween sans aucun appel aux callbacks onUpdate, onUpdateT et onEnd (!)
|
||||
public function killWithoutCallbacks(parent:Snd) {
|
||||
for (t in tlist.backWardIterator())
|
||||
if (t.parent==parent ){
|
||||
forceTerminateTween(t);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public function terminate(parent:Snd) {
|
||||
for (t in tlist.backWardIterator())
|
||||
if (t.parent==parent){
|
||||
forceTerminateTween(t);
|
||||
}
|
||||
}
|
||||
|
||||
public function forceTerminateTween(t:TweenV) {
|
||||
var tOk = tlist.remove(t);
|
||||
if( tOk ){
|
||||
t.clear();
|
||||
pool.push(t);
|
||||
}
|
||||
}
|
||||
|
||||
public function terminateTween(t:TweenV, ?fl_allowLoop=false) {
|
||||
var v = t.from + (t.to - t.from) * h2d.Tweenie.interp(t.type, 1);
|
||||
t.apply(v);
|
||||
onUpdate(t, 1);
|
||||
|
||||
var ouid = t.uid;
|
||||
|
||||
onEnd(t);
|
||||
|
||||
if( ouid == t.uid ){
|
||||
if( fl_allowLoop && (t.plays==-1 || t.plays>1) ) {
|
||||
if( t.plays!=-1 )
|
||||
t.plays--;
|
||||
t.n = t.ln = 0;
|
||||
}
|
||||
else {
|
||||
forceTerminateTween(t);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function terminateAll() {
|
||||
for(t in tlist)
|
||||
t.ln = 1;
|
||||
update();
|
||||
}
|
||||
|
||||
inline
|
||||
function onUpdate(t:TweenV, n:Float) {
|
||||
if ( t.onUpdate!=null )
|
||||
t.onUpdate(t);
|
||||
}
|
||||
|
||||
inline
|
||||
function onEnd(t:TweenV) {
|
||||
if ( t.onEnd!=null )
|
||||
t.onEnd(t);
|
||||
}
|
||||
|
||||
public function update(?tmod = 1.0) {
|
||||
if ( tlist.length > 0 ) {
|
||||
for (t in tlist.backWardIterator() ) {
|
||||
var dist = t.to-t.from;
|
||||
if (t.type==TRand)
|
||||
t.ln+=if(Std.random(100)<33) t.speed * tmod else 0;
|
||||
else
|
||||
t.ln += t.speed * tmod;
|
||||
|
||||
t.n = h2d.Tweenie.interp(t.type, t.ln);
|
||||
|
||||
if ( t.ln<1 ) {
|
||||
// en cours...
|
||||
var val = t.from + t.n*dist;
|
||||
|
||||
t.apply(val);
|
||||
|
||||
onUpdate(t, t.ln);
|
||||
}
|
||||
else // fini !
|
||||
{
|
||||
terminateTween(t, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -67,6 +67,8 @@ class StoryMenuState extends MusicBeatState
|
|||
grpLocks = new FlxTypedGroup<FlxSprite>();
|
||||
add(grpLocks);
|
||||
|
||||
trace("Line 70");
|
||||
|
||||
for (i in 0...weekData.length)
|
||||
{
|
||||
var weekThing:MenuItem = new MenuItem(0, yellowBG.y + yellowBG.height + 10, i);
|
||||
|
@ -91,6 +93,8 @@ class StoryMenuState extends MusicBeatState
|
|||
}
|
||||
}
|
||||
|
||||
trace("Line 96");
|
||||
|
||||
for (char in 0...3)
|
||||
{
|
||||
var weekCharacterThing:MenuCharacter = new MenuCharacter((FlxG.width * 0.25) * (1 + char) - 150, weekCharacters[curWeek][char]);
|
||||
|
@ -117,6 +121,8 @@ class StoryMenuState extends MusicBeatState
|
|||
difficultySelectors = new FlxGroup();
|
||||
add(difficultySelectors);
|
||||
|
||||
trace("Line 124");
|
||||
|
||||
leftArrow = new FlxSprite(grpWeekText.members[0].x + grpWeekText.members[0].width + 10, grpWeekText.members[0].y + 10);
|
||||
leftArrow.frames = ui_tex;
|
||||
leftArrow.animation.addByPrefix('idle', "arrow left");
|
||||
|
@ -141,6 +147,8 @@ class StoryMenuState extends MusicBeatState
|
|||
rightArrow.animation.play('idle');
|
||||
difficultySelectors.add(rightArrow);
|
||||
|
||||
trace("Line 150");
|
||||
|
||||
add(yellowBG);
|
||||
add(grpWeekCharacters);
|
||||
|
||||
|
@ -154,6 +162,8 @@ class StoryMenuState extends MusicBeatState
|
|||
|
||||
updateText();
|
||||
|
||||
trace("Line 165");
|
||||
|
||||
super.create();
|
||||
}
|
||||
|
||||
|
@ -288,6 +298,10 @@ class StoryMenuState extends MusicBeatState
|
|||
sprDifficulty.y = leftArrow.y - 15;
|
||||
intendedScore = Highscore.getWeekScore(curWeek, curDifficulty);
|
||||
|
||||
#if !switch
|
||||
intendedScore = Highscore.getWeekScore(curWeek, curDifficulty);
|
||||
#end
|
||||
|
||||
FlxTween.tween(sprDifficulty, {y: leftArrow.y + 15, alpha: 1}, 0.07);
|
||||
}
|
||||
|
||||
|
@ -338,7 +352,10 @@ class StoryMenuState extends MusicBeatState
|
|||
|
||||
txtTracklist.screenCenter(X);
|
||||
txtTracklist.x -= FlxG.width * 0.35;
|
||||
|
||||
|
||||
#if !switch
|
||||
intendedScore = Highscore.getWeekScore(curWeek, curDifficulty);
|
||||
#end
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -52,6 +52,7 @@ class TitleState extends MusicBeatState
|
|||
super.create();
|
||||
|
||||
#if (!switch && !debug && NG_LOGIN)
|
||||
|
||||
var ng:NGio = new NGio(APIStuff.API, APIStuff.EncKey);
|
||||
#end
|
||||
|
||||
|
@ -220,6 +221,11 @@ class TitleState extends MusicBeatState
|
|||
{
|
||||
if (gamepad.justPressed.START)
|
||||
pressedEnter = true;
|
||||
|
||||
#if switch
|
||||
if (gamepad.justPressed.B)
|
||||
pressedEnter = true;
|
||||
#end
|
||||
}
|
||||
|
||||
if (pressedEnter && !transitioning && skippedIntro)
|
||||
|
|