class ScriptedStrumline
package funkin.play.notes
extends Strumline › FlxTypedSpriteGroup › FlxSprite › FlxObject › FlxBasic
implements HScriptedClass
Available on all platforms
A script that can be tied to a Strumline. Create a scripted class that extends Strumline to use this.
Static methods
staticinit(clsName:String, noteStyle:NoteStyle, isPlayer:Bool, ?scrollSpeed:Float):ScriptedStrumline
Initializes a scripted class instance using the given scripted class name and constructor arguments.
staticlistScriptClasses():Array<String>
Returns a list of all the scripted classes which extend this class.
staticscriptStaticCall(clsName:String, funcName:String):Dynamic
Call a custom static function on a scripted class, by the given name, with the given arguments.
staticscriptStaticGet(clsName:String, fieldName:String):Dynamic
Retrieves a custom static variable on a scripted class, by the given name.
staticscriptStaticSet(clsName:String, fieldName:String, ?fieldValue:Dynamic):Dynamic
Sets the value of a custom static variable on a scripted class, by the given name.
Constructor
Methods
add(Sprite:FlxSprite):FlxSprite
Polymod HScriptedClass override of add.
Adds a new FlxSprite subclass to the group.
Parameters:
Sprite | The sprite or sprite group you want to add to the group. |
|---|
Returns:
The same object that was passed in.
addNoteData(note:SongNoteData, sort:Bool = true):Void
Polymod HScriptedClass override of addNoteData.
Add a note data to the strumline.
This will not remove existing notes, so you should call applyNoteData if you want to reset the strumline.
Parameters:
note | The note data to add. |
|---|---|
sort | Whether to sort the note data after adding. |
applyNoteData(data:Array<SongNoteData>):Void
Polymod HScriptedClass override of applyNoteData.
Apply note data from a chart to this strumline. Note data should be valid and apply only to this strumline.
Parameters:
data | The note data to apply. |
|---|
buildHoldNoteSprite(note:SongNoteData):SustainTrail
Polymod HScriptedClass override of buildHoldNoteSprite.
Build a hold note sprite for a given note data.
Parameters:
note | The note data to build the hold note sprite for. |
|---|
Returns:
The hold note sprite. Will recycle a hold note sprite from the pool if available for performance.
buildNoteSprite(note:SongNoteData):NoteSprite
Polymod HScriptedClass override of buildNoteSprite.
Build a note sprite for a given note data.
Parameters:
note | The note data to build the note sprite for. |
|---|
Returns:
The note sprite. Will recycle a note sprite from the pool if available for performance.
centerOffsets(AdjustPosition:Bool = false):Void
Polymod HScriptedClass override of centerOffsets.
Helper function that adjusts the offset automatically to center the bounding box within the graphic.
Parameters:
AdjustPosition | Adjusts the actual X and Y position just once to match the offset change. |
|---|
clean():Void
Polymod HScriptedClass override of clean.
Called when the song is reset. Removes any special animations and the like. Doesn't reset the notes from the chart, that's handled by the PlayState.
clone():FlxTypedSpriteGroup<FlxSprite>
Polymod HScriptedClass override of clone.
Recursive cloning method: it will create a copy of this group which will hold copies of all sprites
Returns:
copy of this sprite group
destroy():Void
Polymod HScriptedClass override of destroy.
WARNING: A destroyed FlxBasic can't be used anymore.
It may even cause crashes if it is still part of a group or state.
You may want to use kill() instead if you want to disable the object temporarily only and revive() it later.
This function is usually not called manually (Flixel calls it automatically during state switches for all add()ed objects).
Override this function to null out variables manually or call destroy() on class members if necessary.
Don't forget to call super.destroy()!
drawFrame(Force:Bool = false):Void
Polymod HScriptedClass override of drawFrame.
Request (or force) that the sprite update the frame before rendering. Useful if you are doing procedural generation or other weirdness!
Parameters:
Force | Force the frame to redraw, even if its not flagged as necessary. |
|---|
enterMiniMode(scale:Float = 1):Void
Polymod HScriptedClass override of enterMiniMode.
Enter mini mode, which displays only small strumline notes
Parameters:
scale | scale of strumline |
|---|
fadeInArrows():Void
Polymod HScriptedClass override of fadeInArrows.
Play a fade in animation on all arrows in the strumline. Used when starting a song in Freeplay mode.
fadeOutArrow(index:Int, arrow:StrumlineNote):Void
Polymod HScriptedClass override of fadeOutArrow.
Apply a small animation which moves the arrow up and fades it out. Used when the song ends in Freeplay mode.
Parameters:
index | The index of the arrow in the strumline. |
|---|---|
arrow | The arrow to animate. |
fadeOutArrows():Void
Polymod HScriptedClass override of fadeOutArrows.
Play a fade out animation on all arrows in the strumline. Used when ending a song in Freeplay mode.
findMaxX():Float
Polymod HScriptedClass override of findMaxX.
Returns the right-most position of the right-most member. If there are no members, x is returned.
5.0.0
.findMaxY():Float
Polymod HScriptedClass override of findMaxY.
Returns the top-most position of the top-most member. If there are no members, y is returned.
5.0.0
.findMinX():Float
Polymod HScriptedClass override of findMinX.
Returns the left-most position of the left-most member. If there are no members, x is returned.
5.0.0
.findMinY():Float
Polymod HScriptedClass override of findMinY.
Returns the top-most position of the top-most member. If there are no members, y is returned.
5.0.0
.getByDirection(direction:NoteDirection):StrumlineNote
Polymod HScriptedClass override of getByDirection.
Get a strumline note sprite by its direction.
Parameters:
direction | The direction of the note to get. |
|---|
Returns:
The note.
getByIndex(index:Int):StrumlineNote
Polymod HScriptedClass override of getByIndex.
Get a strumline note sprite by its index.
Parameters:
index | The index of the note to get. |
|---|
Returns:
The note.
getCameras():Array<FlxCamera>
Polymod HScriptedClass override of getCameras.
The cameras that will draw this. Use this.cameras to set specific cameras for this object,
otherwise the container's cameras are used, or the container's container and so on. If there
is no container, say, if this is inside FlxGroups rather than a FlxContainer then the
default draw cameras are returned.
5.7.0
.getDefaultCamera():FlxCamera
Polymod HScriptedClass override of getDefaultCamera.
The main camera that will draw this. Use this.cameras to set specific cameras for this
object, otherwise the container's camera is used, or the container's container and so on.
If there is no container, say, if this is inside FlxGroups rather than a FlxContainer
then FlxG.camera is returned.
5.7.0
.getGraphicBounds(?rect:FlxRect):FlxRect
Polymod HScriptedClass override of getGraphicBounds.
Retrieves the world bounds of this sprite's graphic
Note: Ignores scrollFactor, to get the screen position of the graphic use
getScreenBounds
Parameters:
rect | The resulting rect, if |
|---|
5.9.0
.getGraphicMidpoint(?point:FlxPoint):FlxPoint
Polymod HScriptedClass override of getGraphicMidpoint.
Retrieve the midpoint of this sprite's graphic in world coordinates.
Parameters:
point | The resulting point, if |
|---|
getHoldNoteSprite(target:SongNoteData):SustainTrail
Polymod HScriptedClass override of getHoldNoteSprite.
Get a hold note sprite corresponding to the given note data.
Parameters:
target | The note data for the hold note. |
|---|
Returns:
The hold note sprite.
getHoldNotesHitOrMissed():Array<SustainTrail>
Polymod HScriptedClass override of getHoldNotesHitOrMissed.
Return hold notes that are within Constants.HIT_WINDOW ms of the strumline.
Returns:
An array of SustainTrail objects.
getMidpoint(?point:FlxPoint):FlxPoint
Polymod HScriptedClass override of getMidpoint.
Retrieve the midpoint of this object in world coordinates.
Parameters:
point | Allows you to pass in an existing |
|---|
Returns:
A FlxPoint object containing the midpoint of this object in world coordinates.
getNoteSprite(target:SongNoteData):NoteSprite
Polymod HScriptedClass override of getNoteSprite.
Get a note sprite corresponding to the given note data.
Parameters:
target | The note data for the note sprite. |
|---|
Returns:
The note sprite.
getNotesMayHit():Array<NoteSprite>
Polymod HScriptedClass override of getNotesMayHit.
Return notes that are within Constants.HIT_WINDOW ms of the strumline.
Returns:
An array of NoteSprite objects.
getNotesOnScreen():Array<NoteSprite>
Polymod HScriptedClass override of getNotesOnScreen.
Return notes that are within, or way after, Constants.HIT_WINDOW ms of the strumline.
Returns:
An array of NoteSprite objects.
getPixelAt(worldPoint:FlxPoint, ?camera:FlxCamera):Null<FlxColor>
Polymod HScriptedClass override of getPixelAt.
Determines which of this sprite's pixels are at the specified world coordinate, if any.
Factors in scale, angle, offset, origin, and scrollFactor.
Parameters:
worldPoint | The point in world space |
|---|---|
camera | The camera, used for |
Returns:
a FlxColor, if the point is in the sprite's graphic, otherwise null is returned.
5.0.0
.getPixelAtScreen(screenPoint:FlxPoint, ?camera:FlxCamera):Null<FlxColor>
Polymod HScriptedClass override of getPixelAtScreen.
Determines which of this sprite's pixels are at the specified screen coordinate, if any.
Factors in scale, angle, offset, origin, and scrollFactor.
Parameters:
screenPoint | The point in screen space |
|---|---|
camera | The desired "screen" space. If |
Returns:
a FlxColor, if the point is in the sprite's graphic, otherwise null is returned.
5.0.0
.getPosition(?result:FlxPoint):FlxPoint
Polymod HScriptedClass override of getPosition.
Returns the world position of this object.
Parameters:
result | Optional arg for the returning point. |
|---|
Returns:
The world position of this object.
getRotatedBounds(?newRect:FlxRect):FlxRect
Polymod HScriptedClass override of getRotatedBounds.
Calculates the smallest globally aligned bounding box that encompasses this
sprite's width and height, at its current rotation.
Note, if called on a FlxSprite, the origin is used, but scale and offset are ignored.
Use getScreenBounds to use these properties.
Parameters:
newRect | The optional output |
|---|
Returns:
A globally aligned FlxRect that fully contains the input object's width and height.
4.11.0
.getScreenBounds(?newRect:FlxRect, ?camera:FlxCamera):FlxRect
Polymod HScriptedClass override of getScreenBounds.
Calculates the smallest globally aligned bounding box that encompasses this sprite's graphic as it would be displayed. Honors scrollFactor, rotation, scale, offset and origin.
Parameters:
newRect | Optional output |
|---|---|
camera | Optional camera used for scrollFactor, if null |
Returns:
A globally aligned FlxRect that fully contains the input sprite.
4.11.0
.getScreenPosition(?result:FlxPoint, ?camera:FlxCamera):FlxPoint
Polymod HScriptedClass override of getScreenPosition.
Returns the screen position of this object.
Parameters:
result | Optional arg for the returning point |
|---|---|
camera | The desired "screen" coordinate space. If |
Returns:
The screen position of this object.
graphicLoaded():Void
Polymod HScriptedClass override of graphicLoaded.
Called whenever a new graphic is loaded for this sprite (after loadGraphic(), makeGraphic() etc).
handleSkippedNotes():Void
Polymod HScriptedClass override of handleSkippedNotes.
Called when the PlayState skips a large amount of time forward or backward.
hasColorTransform():Bool
Polymod HScriptedClass override of hasColorTransform.
Whether this sprite has a color transform, menaing any of the following: less than full
alpha, a color tint, or a colorTransform whos values are not the default.
hitNote(note:NoteSprite, removeNote:Bool = true):Void
Polymod HScriptedClass override of hitNote.
Hit a note.
Parameters:
note | The note to hit. |
|---|---|
removeNote | True to remove the note immediately, false to make it transparent and let it move offscreen. |
holdConfirm(direction:NoteDirection):Void
Polymod HScriptedClass override of holdConfirm.
Play a confirm animation for a hold note.
Parameters:
direction | The direction of the note to play the confirm animation for. |
|---|
hurt(damage:Float):Void
Polymod HScriptedClass override of hurt.
Reduces the health variable of this object by the amount specified in Damage.
Calls kill() if health drops to or below zero.
Parameters:
Damage | How much health to take away (use a negative number to give a health bonus). |
|---|
insert(Position:Int, Sprite:FlxSprite):FlxSprite
Polymod HScriptedClass override of insert.
Inserts a new FlxSprite subclass to the group at the specified position.
Parameters:
Position | The position that the new sprite or sprite group should be inserted at. |
|---|---|
Sprite | The sprite or sprite group you want to insert into the group. |
Returns:
The same object that was passed in.
4.3.0
.isConfirm(direction:NoteDirection):Bool
Polymod HScriptedClass override of isConfirm.
Check if a given direction is playing the confirm animation.
Parameters:
direction | The direction of the note to check. |
|---|
Returns:
true if the note is playing the confirm animation, false otherwise.
isKeyHeld(dir:NoteDirection):Bool
Polymod HScriptedClass override of isKeyHeld.
Check if a key is held down.
Parameters:
dir | The direction of the key to check. |
|---|
Returns:
true if the key is held down, false otherwise.
isOnScreen(?Camera:FlxCamera):Bool
Polymod HScriptedClass override of isOnScreen.
Check and see if any sprite in this group is currently on screen.
Parameters:
Camera | Specify which game camera you want. If |
|---|
Returns:
Whether the object is on screen or not.
isPixelPerfectRender(?camera:FlxCamera):Bool
Polymod HScriptedClass override of isPixelPerfectRender.
Check if object is rendered pixel perfect on a specific camera.
isSimpleRender(?camera:FlxCamera):Bool
Polymod HScriptedClass override of isSimpleRender.
Returns the result of isSimpleRenderBlit() if FlxG.renderBlit is
true, or false if FlxG.renderTile is true.
isSimpleRenderBlit(?camera:FlxCamera):Bool
Polymod HScriptedClass override of isSimpleRenderBlit.
Determines the function used for rendering in blitting:
copyPixels() for simple sprites, draw() for complex ones.
Sprites are considered simple when they have an angle of 0, a scale of 1,
don't use blend and pixelPerfectRender is true.
Parameters:
camera | If a camera is passed its |
|---|
kill():Void
Polymod HScriptedClass override of kill.
Calls kill() on the group's members and then on the group itself.
You can revive this group later via revive() after this.
killNote(note:NoteSprite):Void
Polymod HScriptedClass override of killNote.
Kill a note heading towards the strumline.
Parameters:
note | The note to kill. Gets recycled and reused for performance. |
|---|
loadGraphic(Graphic:FlxGraphicAsset, Animated:Bool = false, Width:Int = 0, Height:Int = 0, Unique:Bool = false, ?Key:String):FlxSprite
Polymod HScriptedClass override of loadGraphic.
This functionality isn't supported in SpriteGroup
Returns:
this sprite group
loadGraphicFromSprite(Sprite:FlxSprite):FlxSprite
Polymod HScriptedClass override of loadGraphicFromSprite.
This functionality isn't supported in SpriteGroup
Returns:
this sprite group
loadRotatedFrame(frame:FlxFrame, rotations:Int = 16, antiAliasing:Bool = false, autoBuffer:Bool = false):FlxSprite
Polymod HScriptedClass override of loadRotatedFrame.
Helper method which allows using FlxFrame as graphic source for sprite's loadRotatedGraphic() method.
Parameters:
frame | Frame to load into this sprite. |
|---|---|
rotations | The number of rotation frames the final sprite should have.
For small sprites this can be quite a large number ( |
antiAliasing | Whether to use high quality rotations when creating the graphic. Default is |
autoBuffer | Whether to automatically increase the image size to accommodate rotated corners. Will create frames that are 150% larger on each axis than the original frame or graphic. |
Returns:
this FlxSprite with loaded rotated graphic in it.
loadRotatedGraphic(Graphic:FlxGraphicAsset, Rotations:Int = 16, Frame:Int = -1, AntiAliasing:Bool = false, AutoBuffer:Bool = false, ?Key:String):FlxSprite
Polymod HScriptedClass override of loadRotatedGraphic.
This functionality isn't supported in SpriteGroup
Returns:
this sprite group
makeGraphic(Width:Int, Height:Int, Color:Int = -1, Unique:Bool = false, ?Key:String):FlxSprite
Polymod HScriptedClass override of makeGraphic.
This functionality isn't supported in SpriteGroup
Returns:
this sprite group
overlaps(objectOrGroup:FlxBasic, inScreenSpace:Bool = false, ?camera:FlxCamera):Bool
Polymod HScriptedClass override of overlaps.
Checks to see if some FlxObject overlaps this FlxObject or FlxGroup.
If the group has a LOT of things in it, it might be faster to use FlxG.overlap().
WARNING: Currently tilemaps do NOT support screen space overlap checks!
Parameters:
objectOrGroup | The object or group being tested. |
|---|---|
inScreenSpace | Whether to take scroll factors into account when checking for overlap.
Default is |
camera | The desired "screen" space. If |
Returns:
Whether or not the two objects overlap.
overlapsAt(x:Float, y:Float, objectOrGroup:FlxBasic, inScreenSpace:Bool = false, ?camera:FlxCamera):Bool
Polymod HScriptedClass override of overlapsAt.
Checks to see if this FlxObject were located at the given position,
would it overlap the FlxObject or FlxGroup?
This is distinct from overlapsPoint(), which just checks that point,
rather than taking the object's size into account.
WARNING: Currently tilemaps do NOT support screen space overlap checks!
Parameters:
x | The X position you want to check. Pretends this object (the caller, not the parameter) is located here. |
|---|---|
y | The Y position you want to check. Pretends this object (the caller, not the parameter) is located here. |
objectOrGroup | The object or group being tested. |
inScreenSpace | Whether to take scroll factors into account when checking for overlap.
Default is |
camera | The desired "screen" space. If |
Returns:
Whether or not the two objects overlap.
overlapsPoint(point:FlxPoint, InScreenSpace:Bool = false, ?Camera:FlxCamera):Bool
Polymod HScriptedClass override of overlapsPoint.
Checks to see if a point in 2D world space overlaps any FlxSprite object from this group.
Parameters:
Point | The point in world space you want to check. |
|---|---|
InScreenSpace | Whether to take scroll factors into account when checking for overlap. |
Camera | Specify which game camera you want. If |
Returns:
Whether or not the point overlaps this group.
pixelsOverlapPoint(point:FlxPoint, Mask:Int = 255, ?Camera:FlxCamera):Bool
Polymod HScriptedClass override of pixelsOverlapPoint.
Checks to see if a point in 2D world space overlaps any of FlxSprite object's current displayed pixels. This check is ALWAYS made in screen space, and always takes scroll factors into account.
Parameters:
Point | The point in world space you want to check. |
|---|---|
Mask | Used in the pixel hit test to determine what counts as solid. |
Camera | Specify which game camera you want. If |
Returns:
Whether or not the point overlaps this object.
playConfirm(direction:NoteDirection):Void
Polymod HScriptedClass override of playConfirm.
Play a confirm animation for a given direction.
Parameters:
direction | The direction of the note to play the confirm animation for. |
|---|
playNoteHoldCover(holdNote:SustainTrail):Void
Polymod HScriptedClass override of playNoteHoldCover.
Play a note hold cover for a given hold note.
Parameters:
holdNote | The hold note to play the cover animation for. |
|---|
playNoteSplash(direction:NoteDirection):Void
Polymod HScriptedClass override of playNoteSplash.
Play a note splash for a given direction.
Parameters:
direction | The direction of the note to play the splash animation for. |
|---|
playPress(direction:NoteDirection):Void
Polymod HScriptedClass override of playPress.
Play a press animation for a given direction.
Parameters:
direction | The direction of the note to play the press animation for. |
|---|
playStatic(direction:NoteDirection):Void
Polymod HScriptedClass override of playStatic.
Play a static animation for a given direction.
Parameters:
direction | The direction of the note to play the static animation for. |
|---|
pressKey(dir:NoteDirection, keyCode:Int):Void
Polymod HScriptedClass override of pressKey.
Called when a key is pressed.
Parameters:
dir | The direction of the key that was pressed. |
|---|---|
keyCode | The key input used to press the direction. Used to distinguish when two keys for the same direction are pressed. |
refresh():Void
Polymod HScriptedClass override of refresh.
Refresh the strumline, sorting its children by z-index.
releaseKey(dir:NoteDirection, ?keyCode:Int):Void
Polymod HScriptedClass override of releaseKey.
Called when a key is released.
Parameters:
dir | The direction of the key that was released. |
|---|---|
keyCode | The key input used to press the direction. Used to distinguish when two keys for the same direction are pressed. If null, all keys for the direction are released. |
remove(sprite:FlxSprite, splice:Bool = false):FlxSprite
Polymod HScriptedClass override of remove.
Removes the specified sprite from the group.
Parameters:
sprite | The |
|---|---|
splice | Whether the object should be cut from the array entirely or not. |
Returns:
The removed sprite.
replaceColor(Color:Int, NewColor:Int, FetchPositions:Bool = false):Array<FlxPoint>
Polymod HScriptedClass override of replaceColor.
Replaces all pixels with specified Color with NewColor pixels.
WARNING: very expensive (especially on big graphics) as it iterates over every single pixel.
Parameters:
Color | Color to replace |
|---|---|
NewColor | New color |
FetchPositions | Whether we need to store positions of pixels which colors were replaced. |
Returns:
Array with replaced pixels positions
resetScrollSpeed(?newScrollSpeed:Float):Void
Polymod HScriptedClass override of resetScrollSpeed.
Reset the scroll speed to the current chart's scroll speed.
scriptCall(funcName:String, ?funcArgs:Array<Dynamic>):Dynamic
Calls a function of the scripted class with the given name and arguments.
scriptSet(varName:String, ?varValue:Dynamic):Dynamic
Directly modifies the value of a local variable of a scripted class.
setColorTransform(redMultiplier:Float = 1.0, greenMultiplier:Float = 1.0, blueMultiplier:Float = 1.0, alphaMultiplier:Float = 1.0, redOffset:Float = 0.0, greenOffset:Float = 0.0, blueOffset:Float = 0.0, alphaOffset:Float = 0.0):Void
Polymod HScriptedClass override of setColorTransform.
Sets the sprite's color transformation with control over color offsets.
With FlxG.renderTile, offsets are only supported on OpenFL Next version 3.6.0 or higher.
Parameters:
redMultiplier | The value for the red multiplier, in the range from |
|---|---|
greenMultiplier | The value for the green multiplier, in the range from |
blueMultiplier | The value for the blue multiplier, in the range from |
alphaMultiplier | The value for the alpha transparency multiplier, in the range from |
redOffset | The offset value for the red color channel, in the range from |
greenOffset | The offset value for the green color channel, in the range from |
blueOffset | The offset for the blue color channel value, in the range from |
alphaOffset | The offset for alpha transparency channel value, in the range from |
setFrames(Frames:FlxFramesCollection, saveAnimations:Bool = true):FlxSprite
Polymod HScriptedClass override of setFrames.
Sets frames and allows you to save animations in sprite's animation controller
Parameters:
Frames | Frames collection to set for this sprite. |
|---|---|
saveAnimations | Whether to save animations in animation controller or not. |
Returns:
This sprite with loaded frames
setGraphicSize(width:Float = 0.0, height:Float = 0.0):Void
Polymod HScriptedClass override of setGraphicSize.
Helper function to set the graphic's dimensions by using scale, allowing you to keep the current aspect ratio
should one of the numbers be <= 0. It might make sense to call updateHitbox() afterwards!
Parameters:
width | How wide the graphic should be. If |
|---|---|
height | How high the graphic should be. If |
setNoteSpacing(multiplier:Float = 1):Void
Polymod HScriptedClass override of setNoteSpacing.
Set note spacing scale
Parameters:
multiplier | multiply x position |
|---|
setPosition(X:Float = 0, Y:Float = 0):Void
Polymod HScriptedClass override of setPosition.
Helper function to set the coordinates of this object. Handy since it only requires one line of code.
Parameters:
X | The new x position |
|---|---|
Y | The new y position |
setSize(width:Float, height:Float):Void
Polymod HScriptedClass override of setSize.
Shortcut for setting both width and Height.
Parameters:
width | The new hitbox width. |
|---|---|
height | The new hitbox height. |
transformScreenToPixels(screenPoint:FlxPoint, ?camera:FlxCamera, ?result:FlxPoint):FlxPoint
Polymod HScriptedClass override of transformScreenToPixels.
Converts the point from screen coordinates to this sprite's pixel coordinates where (0,0)
is the top left of the graphic.
Factors in scale, angle, offset, origin, and scrollFactor.
Parameters:
screenPoint | The screen coordinates |
|---|---|
camera | The desired "screen" space. If |
result | Optional arg for the returning point |
transformWorldToPixels(worldPoint:FlxPoint, ?camera:FlxCamera, ?result:FlxPoint):FlxPoint
Polymod HScriptedClass override of transformWorldToPixels.
Converts the point from world coordinates to this sprite's pixel coordinates where (0,0)
is the top left of the graphic.
Factors in scale, angle, offset, origin, and scrollFactor.
Parameters:
worldPoint | The world coordinates |
|---|---|
camera | The camera, used for |
result | Optional arg for the returning point |
transformWorldToPixelsSimple(worldPoint:FlxPoint, ?result:FlxPoint):FlxPoint
Polymod HScriptedClass override of transformWorldToPixelsSimple.
Converts the point from world coordinates to this sprite's pixel coordinates where (0,0)
is the top left of the graphic. Same as worldToPixels but never uses a camera,
therefore scrollFactor is ignored
Parameters:
worldPoint | The world coordinates. |
|---|---|
result | Optional arg for the returning point |
updateFramePixels():BitmapData
Polymod HScriptedClass override of updateFramePixels.
Retrieves the BitmapData of the current FlxFrame. Updates framePixels.
updateHitbox():Void
Polymod HScriptedClass override of updateHitbox.
Updates the sprite's hitbox (width, height, offset) according to the current scale.
Also calls centerOrigin().
updateNotes():Void
Polymod HScriptedClass override of updateNotes.
Called every frame to update the position and hitbox of each child note.
vwooshInNotes():Void
Polymod HScriptedClass override of vwooshInNotes.
For a note's strumTime, calculate its Y position relative to the strumline. NOTE: Assumes Conductor and PlayState are both initialized.
Parameters:
strumTime |
|---|
Returns:
Float Reverse of vwooshNotes, we bring the notes IN (by their offsets)
vwooshNotes():Void
Polymod HScriptedClass override of vwooshNotes.
Call this when resetting the playstate.