MusicPlayer
| Kind | class |
| Package | music |
| Full name | music.MusicPlayer |
| Source | source/music/MusicPlayer.hx |
| Extends | FlxGroup |
| Metadata | @:access(states.FreeplayState) |
Public fields
| Name | Type | Static | Default | Notes |
|---|---|---|---|---|
instance | FreeplayState | no | — | — |
controls | Controls | no | — | — |
playing | Bool | no | — | property (get, never) |
playingMusic | Bool | no | false | — |
curTime | Float | no | — | — |
Public methods
new (constructor)
function new(instance:FreeplayState)
| Parameter | Type | Default |
|---|---|---|
instance | FreeplayState | — |
pauseOrResume
function pauseOrResume(resume:Bool = false)
| Parameter | Type | Default |
|---|---|---|
resume (optional) | Bool | false |
switchPlayMusic
function switchPlayMusic()
onViewportResize
function onViewportResize():Void
Internals
Private / internal members
| Field | Type | Static |
|---|---|---|
songBG | FlxSprite | no |
songTxt | FlxText | no |
timeTxt | FlxText | no |
progressBar | FlxBar | no |
playbackBG | FlxSprite | no |
playbackSymbols | Array<FlxText> | no |
playbackTxt | FlxText | no |
wasPlaying | Bool | no |
holdPitchTime | Float | no |
playbackRate | Float | no |
| Method |
|---|
override function update(elapsed:Float) |
function setVocalsTime(time:Float) |
function updatePlaybackTxt() |
function positionSong() |
function updateTimeTxt() |
function setPlaybackRate() |
function get_playing():Bool |
function set_playbackRate(value:Float):Float |