-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
199 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package funkin.modding; | ||
|
||
/** | ||
* The basics for a modded script, both Lua AND HScript | ||
*/ | ||
class FunkinScript { | ||
|
||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,61 @@ | ||
package funkin.objects.notes; | ||
|
||
import funkin.objects.notes.NoteBasic; | ||
import funkin.objects.notes.NoteNew as Note; | ||
import funkin.objects.notes.SustainTrail; | ||
import flixel.util.FlxSort; | ||
|
||
class StrumLine extends FlxSpriteGroup { | ||
public var scrollSpeed:Float = 1.0; | ||
public var scrollSpeed:Float; | ||
public var playerStrum:Bool; | ||
public var downScroll:Bool; | ||
|
||
public var strumNotes:FlxTypedGroup<StrumNote>; | ||
public var notes:FlxTypedGroup<NoteBasic>; | ||
public var unspawnNotes:Array<NoteBasic>; | ||
|
||
public function new(scrollSpeed:Float = 1.0, playerStrum:Bool = false, ?downScroll:Bool) { | ||
this.scrollSpeed = scrollSpeed; | ||
this.playerStrum = playerStrum; | ||
this.downScroll = downScroll != null ? downScroll : FunkinData.data.get('downScroll'); | ||
|
||
unspawnNotes = new Array<NoteBasic>(); | ||
|
||
strumNotes = new FlxTypedGroup<StrumNote>(); | ||
add(strumNotes); | ||
|
||
notes = new FlxTypedGroup<NoteBasic>(); | ||
add(notes); | ||
} | ||
|
||
public function sortNotes() { | ||
notes.sort(sortNotesByTime, downScroll ? FlxSort.ASCENDING : FlxSort.DESCENDING); | ||
} | ||
|
||
public function addNotes(notes:Array<Note>) { | ||
for (note in notes) { // this is just to make sure none of the data is like fucked up or smth | ||
var strumTime:Float = note.strumTime; | ||
var noteDirection:Direction = note.noteDirection; | ||
var playerNote:Bool = note.playerNote; | ||
var hasSustain:Bool = note.hasSustain; | ||
var sustainLength:Float = note.sustainLength; | ||
var noteType:Int = note.noteType; | ||
|
||
// player note? in MY cpu strum? | ||
// im the old strum, i want normal notes! | ||
if (playerNote != playerStrum) playerNote = playerStrum; | ||
|
||
// cant have a sustain note with no length | ||
if (hasSustain && sustainLength == 0) hasSustain = false; | ||
sustainLength = sustainLength / Conductor.stepCrochet; | ||
|
||
// not sure if this causes like memory leaks or anything | ||
var newNote:Note = new Note(strumTime, noteDirection, hasSustain, noteType, this); | ||
newNote.scrollFactor.set(); | ||
unspawnNotes.push(newNote); | ||
} | ||
} | ||
|
||
function sortNotesByTime(order:Int = FlxSort.ASCENDING, Obj1:Note, Obj2:Note) | ||
return FlxSort.byValues(order, Obj1.strumTime, Obj2.strumTime); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
package funkin.sound; | ||
|
||
import flixel.sound.FlxSound; | ||
|
||
@:structInit | ||
class SoundParams { | ||
// Parameters | ||
var looped:Bool; | ||
var forceRestart:Bool; | ||
var partialParams:Array<Float>; | ||
var autoDestroy:Bool; | ||
var persist:Bool; | ||
|
||
// Callbacks | ||
var onComplete:Void->Void; | ||
var onStart:Void->Void; | ||
var onPause:Void->Void; | ||
var onResume:Void->Void; | ||
} | ||
|
||
/** | ||
* FlxSound with some extra features | ||
*/ | ||
@:access(flixel.sound.FlxSound) | ||
class FunkinSound { | ||
var _sound:FlxSound; | ||
|
||
public function play(path:String, params:SoundParams) { | ||
_sound = new FlxSound(); | ||
_sound.play(params.forceRestart); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package funkin.states.debug; | ||
|
||
import funkin.objects.Song.SwagSong; | ||
|
||
class TestPlayState extends MusicBeatState { | ||
public var strumLines:FlxTypedGroup<StrumLine>; | ||
public static var SONG:SwagSong; | ||
|
||
override function create() { | ||
|
||
} | ||
} |