Module

Graphics.Phaser.Sprite

Package
purescript-phaser
Repository
lfarroco/purescript-phaser

#FrameNumber Source

type FrameNumber = { frame :: Int, key :: String }

#create Source

create :: { x :: Number, y :: Number } -> String -> PhaserScene -> Effect PhaserSprite

https://photonstorm.github.io/phaser3-docs/Phaser.GameObjects.Sprite.html A PhaserSprite also implements the PhaserGameObject typeclass

#createAnimation Source

createAnimation :: String -> Array FrameNumber -> Number -> Int -> PhaserScene -> Effect PhaserAnimation

Besides having a PhaserScene parameter, animations created with createAnimation are in fact global and can be accessed from other scenes. Because of that you need to create the animations only once in your application.

#Sprite Source

class Sprite :: forall k. k -> Constraintclass Sprite a 

Instances

#playAnimation Source

playAnimation :: forall a. Sprite a => { ignoreIfPlaying :: Boolean, key :: String } -> a -> Effect a

#FrameNamesConfig Source

type FrameNamesConfig = { end :: Int, key :: String, prefix :: String, start :: Int, zeroPad :: Int }