mirror of
https://github.com/FunkinCrew/Funkin.git
synced 2025-03-25 06:10:16 -04:00
pico in progress
This commit is contained in:
parent
00bfd26703
commit
bdb74d29bc
2 changed files with 45 additions and 3 deletions
source
|
@ -1,5 +1,6 @@
|
|||
package;
|
||||
|
||||
import Section.SwagSection;
|
||||
import flixel.FlxG;
|
||||
import flixel.FlxSprite;
|
||||
import flixel.animation.FlxBaseAnimation;
|
||||
|
@ -18,6 +19,8 @@ class Character extends FlxSprite
|
|||
|
||||
public var holdTimer:Float = 0;
|
||||
|
||||
public var animationNotes:Array<Dynamic> = [];
|
||||
|
||||
public function new(x:Float, y:Float, ?character:String = "bf", ?isPlayer:Bool = false)
|
||||
{
|
||||
super(x, y);
|
||||
|
@ -287,6 +290,8 @@ class Character extends FlxSprite
|
|||
loadOffsetFile(curCharacter);
|
||||
playAnim('shoot1');
|
||||
|
||||
loadMappedAnims();
|
||||
|
||||
case 'bf':
|
||||
var tex = Paths.getSparrowAtlas('characters/BOYFRIEND');
|
||||
frames = tex;
|
||||
|
@ -563,6 +568,23 @@ class Character extends FlxSprite
|
|||
}
|
||||
}
|
||||
|
||||
public function loadMappedAnims()
|
||||
{
|
||||
var swagshit = Song.loadFromJson('picospeaker', 'stress');
|
||||
|
||||
var notes = swagshit.notes;
|
||||
|
||||
for (section in notes)
|
||||
{
|
||||
for (idk in section.sectionNotes)
|
||||
{
|
||||
animationNotes.push(idk);
|
||||
}
|
||||
}
|
||||
|
||||
trace(animationNotes);
|
||||
}
|
||||
|
||||
function quickAnimAdd(name:String, prefix:String)
|
||||
{
|
||||
animation.addByPrefix(name, prefix, 24, false);
|
||||
|
@ -604,6 +626,25 @@ class Character extends FlxSprite
|
|||
case 'gf':
|
||||
if (animation.curAnim.name == 'hairFall' && animation.curAnim.finished)
|
||||
playAnim('danceRight');
|
||||
case "pico-speaker":
|
||||
// for pico??
|
||||
if (animationNotes.length > 0)
|
||||
{
|
||||
if (Conductor.songPosition > animationNotes[0][0])
|
||||
{
|
||||
trace('played shoot anim' + animationNotes[0][1]);
|
||||
|
||||
var shootAnim:Int = 1;
|
||||
|
||||
if (animationNotes[0][1] >= 2)
|
||||
shootAnim = 3;
|
||||
|
||||
shootAnim += FlxG.random.int(0, 1);
|
||||
|
||||
playAnim('shoot' + shootAnim, true);
|
||||
animationNotes.shift();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
super.update(elapsed);
|
||||
|
@ -663,7 +704,8 @@ class Character extends FlxSprite
|
|||
playAnim('danceLeft');
|
||||
}
|
||||
case 'pico-speaker':
|
||||
playAnim('shoot' + FlxG.random.int(1, 4), true);
|
||||
// lol weed
|
||||
// playAnim('shoot' + FlxG.random.int(1, 4), true);
|
||||
|
||||
case 'spooky':
|
||||
danced = !danced;
|
||||
|
|
|
@ -710,7 +710,7 @@ class PlayState extends MusicBeatState
|
|||
|
||||
// startCountdown();
|
||||
|
||||
generateSong(SONG.song);
|
||||
generateSong();
|
||||
|
||||
// add(strumLine);
|
||||
|
||||
|
@ -1084,7 +1084,7 @@ class PlayState extends MusicBeatState
|
|||
|
||||
var debugNum:Int = 0;
|
||||
|
||||
private function generateSong(dataPath:String):Void
|
||||
private function generateSong():Void
|
||||
{
|
||||
// FlxG.log.add(ChartParser.parse());
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue