phaser

package
v0.0.0-...-d169b41 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 5, 2017 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package phaser Automatic generation for PIXI.AbstractFilter generated file AbstractFilter.go

Package phaser Automatic generation for Phaser.Animation generated file Animation.go

Package phaser Automatic generation for Phaser.AnimationManager generated file AnimationManager.go

Package phaser Automatic generation for Phaser.AnimationParser generated file AnimationParser.go

Package phaser Automatic generation for Phaser.ArraySet generated file ArraySet.go

Package phaser Automatic generation for Phaser.ArrayUtils generated file ArrayUtils.go

Package phaser Automatic generation for Phaser.AudioSprite generated file AudioSprite.go

Package phaser Automatic generation for PIXI.BaseTexture generated file BaseTexture.go

Package phaser Automatic generation for Phaser.BitmapData generated file BitmapData.go

Package phaser Automatic generation for Phaser.BitmapText generated file BitmapText.go

Package phaser Automatic generation for Phaser.Button generated file Button.go

Package phaser Automatic generation for Phaser.Cache generated file Cache.go

Package phaser Automatic generation for Phaser.Camera generated file Camera.go

Package phaser Automatic generation for Phaser.Canvas generated file Canvas.go

Package phaser Automatic generation for PIXI.CanvasBuffer generated file CanvasBuffer.go

Package phaser Automatic generation for PIXI.CanvasGraphics generated file CanvasGraphics.go

Package phaser Automatic generation for PIXI.CanvasMaskManager generated file CanvasMaskManager.go

Package phaser Automatic generation for PIXI.CanvasPool generated file CanvasPool.go

Package phaser Automatic generation for PIXI.CanvasRenderer generated file CanvasRenderer.go

Package phaser Automatic generation for PIXI.CanvasTinter generated file CanvasTinter.go

Package phaser Automatic generation for Phaser.Circle generated file Circle.go

Package phaser Automatic generation for Phaser.Color generated file Color.go

Package phaser Automatic generation for PIXI.ComplexPrimitiveShader generated file ComplexPrimitiveShader.go

Package phaser Automatic generation for Phaser.Component.Angle generated file ComponentAngle.go

Package phaser Automatic generation for Phaser.Component.Animation generated file ComponentAnimation.go

Package phaser Automatic generation for Phaser.Component.AutoCull generated file ComponentAutoCull.go

Package phaser Automatic generation for Phaser.Component.Bounds generated file ComponentBounds.go

Package phaser Automatic generation for Phaser.Component.BringToTop generated file ComponentBringToTop.go

Package phaser Automatic generation for Phaser.Component.Core generated file ComponentCore.go

Package phaser Automatic generation for Phaser.Component.Crop generated file ComponentCrop.go

Package phaser Automatic generation for Phaser.Component.Delta generated file ComponentDelta.go

Package phaser Automatic generation for Phaser.Component.Destroy generated file ComponentDestroy.go

Package phaser Automatic generation for Phaser.Component.FixedToCamera generated file ComponentFixedToCamera.go

Package phaser Automatic generation for Phaser.Component.Health generated file ComponentHealth.go

Package phaser Automatic generation for Phaser.Component.InCamera generated file ComponentInCamera.go

Package phaser Automatic generation for Phaser.Component.InWorld generated file ComponentInWorld.go

Package phaser Automatic generation for Phaser.Component.InputEnabled generated file ComponentInputEnabled.go

Package phaser Automatic generation for Phaser.Component.LifeSpan generated file ComponentLifeSpan.go

Package phaser Automatic generation for Phaser.Component.LoadTexture generated file ComponentLoadTexture.go

Package phaser Automatic generation for Phaser.Component.Overlap generated file ComponentOverlap.go

Package phaser Automatic generation for Phaser.Component.PhysicsBody generated file ComponentPhysicsBody.go

Package phaser Automatic generation for Phaser.Component.Reset generated file ComponentReset.go

Package phaser Automatic generation for Phaser.Component.ScaleMinMax generated file ComponentScaleMinMax.go

Package phaser Automatic generation for Phaser.Component.Smoothed generated file ComponentSmoothed.go

Package phaser Automatic generation for Phaser.Create generated file Create.go

Package phaser Automatic generation for Phaser.Creature generated file Creature.go

Package phaser Automatic generation for Phaser.DOM generated file DOM.go

Package phaser Automatic generation for Phaser.Device generated file Device.go

Package phaser Automatic generation for Phaser.DeviceButton generated file DeviceButton.go

Package phaser Automatic generation for PIXI.PIXI.DisplayObject generated file DisplayObject.go

Package phaser Automatic generation for PIXI.DisplayObjectContainer generated file DisplayObjectContainer.go

Package phaser Automatic generation for PIXI.EarCut generated file EarCut.go

Package phaser Automatic generation for Phaser.Easing generated file Easing.go

Package phaser Automatic generation for Phaser.Easing.Back generated file EasingBack.go

Package phaser Automatic generation for Phaser.Easing.Bounce generated file EasingBounce.go

Package phaser Automatic generation for Phaser.Easing.Circular generated file EasingCircular.go

Package phaser Automatic generation for Phaser.Easing.Cubic generated file EasingCubic.go

Package phaser Automatic generation for Phaser.Easing.Elastic generated file EasingElastic.go

Package phaser Automatic generation for Phaser.Easing.Exponential generated file EasingExponential.go

Package phaser Automatic generation for Phaser.Easing.Linear generated file EasingLinear.go

Package phaser Automatic generation for Phaser.Easing.Quadratic generated file EasingQuadratic.go

Package phaser Automatic generation for Phaser.Easing.Quartic generated file EasingQuartic.go

Package phaser Automatic generation for Phaser.Easing.Quintic generated file EasingQuintic.go

Package phaser Automatic generation for Phaser.Easing.Sinusoidal generated file EasingSinusoidal.go

Package phaser Automatic generation for Phaser.Ellipse generated file Ellipse.go

Package phaser Automatic generation for PIXI.Event generated file Event.go

Package phaser Automatic generation for PIXI.EventTarget generated file EventTarget.go

Package phaser Automatic generation for Phaser.Events generated file Events.go

Package phaser Automatic generation for Phaser.Filter generated file Filter.go

Package phaser Automatic generation for PIXI.FilterTexture generated file FilterTexture.go

Package phaser Automatic generation for Phaser.FlexGrid generated file FlexGrid.go

Package phaser Automatic generation for Phaser.FlexLayer generated file FlexLayer.go

Package phaser Automatic generation for Phaser.Frame generated file Frame.go

Package phaser Automatic generation for Phaser.FrameData generated file FrameData.go

Package phaser Automatic generation for Phaser.Game generated file Game.go

Package phaser Automatic generation for Phaser.GameObjectCreator generated file GameObjectCreator.go

Package phaser Automatic generation for Phaser.GameObjectFactory generated file GameObjectFactory.go

Package phaser Automatic generation for Phaser.Gamepad generated file Gamepad.go

Package phaser Automatic generation for glMatrix generated file GlMatrix.go

Package phaser Automatic generation for Phaser.Graphics generated file Graphics.go

Package phaser Automatic generation for PIXI.GraphicsData generated file GraphicsData.go

Package phaser Automatic generation for Phaser.Group generated file Group.go

Package phaser Automatic generation for Phaser.Hermite generated file Hermite.go

Package phaser Automatic generation for Phaser.Image generated file Image.go

Package phaser Automatic generation for Phaser.ImageCollection generated file ImageCollection.go

Package phaser Automatic generation for Phaser.Input generated file Input.go

Package phaser Automatic generation for Phaser.InputHandler generated file InputHandler.go

Package phaser Automatic generation for Phaser.Key generated file Key.go

Package phaser Automatic generation for Phaser.KeyCode generated file KeyCode.go

Package phaser Automatic generation for Phaser.Keyboard generated file Keyboard.go

Package phaser Automatic generation for Phaser.Line generated file Line.go

Package phaser Automatic generation for Phaser.LinkedList generated file LinkedList.go

Package phaser Automatic generation for Phaser.Loader generated file Loader.go

Package phaser Automatic generation for Phaser.LoaderParser generated file LoaderParser.go

Package phaser Automatic generation for Phaser.MSPointer generated file MSPointer.go

Package phaser Automatic generation for mat2 generated file Mat2.go

Package phaser Automatic generation for mat2d generated file Mat2d.go

Package phaser Automatic generation for mat3 generated file Mat3.go

Package phaser Automatic generation for mat4 generated file Mat4.go

Package phaser Automatic generation for Phaser.Math generated file Math.go

Package phaser Automatic generation for Phaser.Matrix generated file Matrix.go

Package phaser Automatic generation for Phaser.Mouse generated file Mouse.go

Package phaser Automatic generation for Phaser.Net generated file Net.go

Package phaser Automatic generation for PIXI.PIXI generated file PIXI.go

Package phaser Automatic generation for Phaser.Particle generated file Particle.go

Package phaser Automatic generation for Phaser.Particles generated file Particles.go

Package phaser Automatic generation for Phaser.Particles.Arcade generated file ParticlesArcade.go

Package phaser Automatic generation for Phaser.Particles.Arcade.Emitter generated file ParticlesArcadeEmitter.go

Package phaser Automatic generation for Phaser.Physics generated file Physics.go

Package phaser Automatic generation for Phaser.Physics.Arcade generated file PhysicsArcade.go

Package phaser Automatic generation for Phaser.Physics.Arcade.Body generated file PhysicsArcadeBody.go

Package phaser Automatic generation for Phaser.Physics.Arcade.TilemapCollision generated file PhysicsArcadeTilemapCollision.go

Package phaser Automatic generation for Phaser.Physics.Ninja generated file PhysicsNinja.go

Package phaser Automatic generation for Phaser.Physics.Ninja.AABB generated file PhysicsNinjaAABB.go

Package phaser Automatic generation for Phaser.Physics.Ninja.Body generated file PhysicsNinjaBody.go

Package phaser Automatic generation for Phaser.Physics.Ninja.Circle generated file PhysicsNinjaCircle.go

Package phaser Automatic generation for Phaser.Physics.Ninja.Tile generated file PhysicsNinjaTile.go

Package phaser Automatic generation for Phaser.Physics.P2 generated file PhysicsP2.go

Package phaser Automatic generation for Phaser.Physics.P2.Body generated file PhysicsP2Body.go

Package phaser Automatic generation for Phaser.Physics.P2.BodyDebug generated file PhysicsP2BodyDebug.go

Package phaser Automatic generation for Phaser.Physics.P2.CollisionGroup generated file PhysicsP2CollisionGroup.go

Package phaser Automatic generation for Phaser.Physics.P2.ContactMaterial generated file PhysicsP2ContactMaterial.go

Package phaser Automatic generation for Phaser.Physics.P2.DistanceConstraint generated file PhysicsP2DistanceConstraint.go

Package phaser Automatic generation for Phaser.Physics.P2.FixtureList generated file PhysicsP2FixtureList.go

Package phaser Automatic generation for Phaser.Physics.P2.GearConstraint generated file PhysicsP2GearConstraint.go

Package phaser Automatic generation for Phaser.Physics.P2.InversePointProxy generated file PhysicsP2InversePointProxy.go

Package phaser Automatic generation for Phaser.Physics.P2.LockConstraint generated file PhysicsP2LockConstraint.go

Package phaser Automatic generation for Phaser.Physics.P2.Material generated file PhysicsP2Material.go

Package phaser Automatic generation for Phaser.Physics.P2.PointProxy generated file PhysicsP2PointProxy.go

Package phaser Automatic generation for Phaser.Physics.P2.PrismaticConstraint generated file PhysicsP2PrismaticConstraint.go

Package phaser Automatic generation for Phaser.Physics.P2.RevoluteConstraint generated file PhysicsP2RevoluteConstraint.go

Package phaser Automatic generation for Phaser.Physics.P2.RotationalSpring generated file PhysicsP2RotationalSpring.go

Package phaser Automatic generation for Phaser.Physics.P2.Spring generated file PhysicsP2Spring.go

Package phaser Automatic generation for PIXI.PixiFastShader generated file PixiFastShader.go

Package phaser Automatic generation for PIXI.PixiShader generated file PixiShader.go

Package phaser Automatic generation for Phaser.Plugin generated file Plugin.go

Package phaser Automatic generation for Phaser.PluginManager generated file PluginManager.go

Package phaser Automatic generation for Phaser.Point generated file Point.go

Package phaser Automatic generation for Phaser.Pointer generated file Pointer.go

Package phaser Automatic generation for Phaser.PointerMode generated file PointerMode.go

Package phaser Automatic generation for Phaser.Polygon generated file Polygon.go

Package phaser Automatic generation for PIXI.PrimitiveShader generated file PrimitiveShader.go

Package phaser Automatic generation for Phaser.QuadTree generated file QuadTree.go

Package phaser Automatic generation for quat generated file Quat.go

Package phaser Automatic generation for Phaser.RandomDataGenerator generated file RandomDataGenerator.go

Package phaser Automatic generation for Phaser.Rectangle generated file Rectangle.go

Package phaser Automatic generation for Phaser.RenderTexture generated file RenderTexture.go

Package phaser Automatic generation for Phaser.RequestAnimationFrame generated file RequestAnimationFrame.go

Package phaser Automatic generation for Phaser.RetroFont generated file RetroFont.go

Package phaser Automatic generation for Phaser.Rope generated file Rope.go

Package phaser Automatic generation for Phaser.RoundedRectangle generated file RoundedRectangle.go

Package phaser Automatic generation for Phaser.ScaleManager generated file ScaleManager.go

Package phaser Automatic generation for Phaser.Signal generated file Signal.go

Package phaser Automatic generation for Phaser.SignalBinding generated file SignalBinding.go

Package phaser Automatic generation for Phaser.SinglePad generated file SinglePad.go

Package phaser Automatic generation for Phaser.Sound generated file Sound.go

Package phaser Automatic generation for Phaser.SoundManager generated file SoundManager.go

Package phaser Automatic generation for Phaser.Sprite generated file Sprite.go

Package phaser Automatic generation for Phaser.SpriteBatch generated file SpriteBatch.go

Package phaser Automatic generation for Phaser.Stage generated file Stage.go

Package phaser Automatic generation for Phaser.State generated file State.go

Package phaser Automatic generation for Phaser.StateManager generated file StateManager.go

Package phaser Automatic generation for PIXI.Strip generated file Strip.go

Package phaser Automatic generation for PIXI.StripShader generated file StripShader.go

Package phaser Automatic generation for Phaser.Text generated file Text.go

Package phaser Automatic generation for PIXI.Texture generated file Texture.go

Package phaser Automatic generation for Phaser.Tile generated file Tile.go

Package phaser Automatic generation for Phaser.TileSprite generated file TileSprite.go

Package phaser Automatic generation for Phaser.Tilemap generated file Tilemap.go

Package phaser Automatic generation for Phaser.TilemapLayer generated file TilemapLayer.go

Package phaser Automatic generation for Phaser.TilemapParser generated file TilemapParser.go

Package phaser Automatic generation for Phaser.Tileset generated file Tileset.go

Package phaser Automatic generation for PIXI.TilingSprite generated file TilingSprite.go

Package phaser Automatic generation for Phaser.Time generated file Time.go

Package phaser Automatic generation for Phaser.Timer generated file Timer.go

Package phaser Automatic generation for Phaser.TimerEvent generated file TimerEvent.go

Package phaser Automatic generation for Phaser.Touch generated file Touch.go

Package phaser Automatic generation for Phaser.Tween generated file Tween.go

Package phaser Automatic generation for Phaser.TweenData generated file TweenData.go

Package phaser Automatic generation for Phaser.TweenManager generated file TweenManager.go

Package phaser Automatic generation for Phaser.Utils generated file Utils.go

Package phaser Automatic generation for Phaser.Utils.Debug generated file UtilsDebug.go

Package phaser Automatic generation for vec2 generated file Vec2.go

Package phaser Automatic generation for vec3 generated file Vec3.go

Package phaser Automatic generation for vec4 generated file Vec4.go

Package phaser Automatic generation for Phaser.Video generated file Video.go

Package phaser Automatic generation for PIXI.WebGLBlendModeManager generated file WebGLBlendModeManager.go

Package phaser Automatic generation for PIXI.WebGLFastSpriteBatch generated file WebGLFastSpriteBatch.go

Package phaser Automatic generation for PIXI.WebGLFilterManager generated file WebGLFilterManager.go

Package phaser Automatic generation for PIXI.WebGLGraphics generated file WebGLGraphics.go

Package phaser Automatic generation for PIXI.WebGLGraphicsData generated file WebGLGraphicsData.go

Package phaser Automatic generation for PIXI.WebGLMaskManager generated file WebGLMaskManager.go

Package phaser Automatic generation for PIXI.WebGLRenderer generated file WebGLRenderer.go

Package phaser Automatic generation for PIXI.WebGLShaderManager generated file WebGLShaderManager.go

Package phaser Automatic generation for PIXI.WebGLSpriteBatch generated file WebGLSpriteBatch.go

Package phaser Automatic generation for PIXI.WebGLStencilManager generated file WebGLStencilManager.go

Package phaser Automatic generation for Phaser.World generated file World.go

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetGlobalConst

func GetGlobalConst(key string) int

func GetKeyboardKey

func GetKeyboardKey(key string) int

func WrapCanvasRenderingContext2D

func WrapCanvasRenderingContext2D(o *js.Object) dom.CanvasRenderingContext2D

func WrapHTMLCanvasElement

func WrapHTMLCanvasElement(o *js.Object) dom.HTMLCanvasElement

func WrapHTMLVideoElement

func WrapHTMLVideoElement(o *js.Object) dom.HTMLVideoElement

Types

type AbstractFilter

type AbstractFilter struct {
	*js.Object
}

AbstractFilter This is the base class for creating a PIXI filter. Currently only webGL supports filters.

If you want to make a custom filter this should be your base class.

func NewAbstractFilter

func NewAbstractFilter(fragmentSrc []interface{}, uniforms interface{}) *AbstractFilter

NewAbstractFilter This is the base class for creating a PIXI filter. Currently only webGL supports filters.

If you want to make a custom filter this should be your base class.

func NewAbstractFilterI

func NewAbstractFilterI(args ...interface{}) *AbstractFilter

NewAbstractFilterI This is the base class for creating a PIXI filter. Currently only webGL supports filters.

If you want to make a custom filter this should be your base class.

func ToAbstractFilter

func ToAbstractFilter(jsStruct interface{}) *AbstractFilter

AbstractFilter Binding conversion method to AbstractFilter point

func (*AbstractFilter) Dirty

func (self *AbstractFilter) Dirty() bool

Dirty empty description

func (*AbstractFilter) Padding

func (self *AbstractFilter) Padding() int

Padding empty description

func (*AbstractFilter) SetDirtyA

func (self *AbstractFilter) SetDirtyA(member bool)

SetDirtyA empty description

func (*AbstractFilter) SetPaddingA

func (self *AbstractFilter) SetPaddingA(member int)

SetPaddingA empty description

func (*AbstractFilter) SyncUniforms

func (self *AbstractFilter) SyncUniforms()

SyncUniforms Syncs the uniforms between the class object and the shaders.

func (*AbstractFilter) SyncUniformsI

func (self *AbstractFilter) SyncUniformsI(args ...interface{})

SyncUniformsI Syncs the uniforms between the class object and the shaders.

type Animation

type Animation struct {
	*js.Object
}

Animation An Animation instance contains a single animation and the controls to play it.

It is created by the AnimationManager, consists of Animation.Frame objects and belongs to a single Game Object such as a Sprite.

func NewAnimation

func NewAnimation(game *Game, parent *Sprite, name string, frameData *FrameData, frames interface{}) *Animation

NewAnimation An Animation instance contains a single animation and the controls to play it.

It is created by the AnimationManager, consists of Animation.Frame objects and belongs to a single Game Object such as a Sprite.

func NewAnimation1O

func NewAnimation1O(game *Game, parent *Sprite, name string, frameData *FrameData, frames interface{}, frameRate int) *Animation

NewAnimation1O An Animation instance contains a single animation and the controls to play it.

It is created by the AnimationManager, consists of Animation.Frame objects and belongs to a single Game Object such as a Sprite.

func NewAnimation2O

func NewAnimation2O(game *Game, parent *Sprite, name string, frameData *FrameData, frames interface{}, frameRate int, loop bool) *Animation

NewAnimation2O An Animation instance contains a single animation and the controls to play it.

It is created by the AnimationManager, consists of Animation.Frame objects and belongs to a single Game Object such as a Sprite.

func NewAnimationI

func NewAnimationI(args ...interface{}) *Animation

NewAnimationI An Animation instance contains a single animation and the controls to play it.

It is created by the AnimationManager, consists of Animation.Frame objects and belongs to a single Game Object such as a Sprite.

func ToAnimation

func ToAnimation(jsStruct interface{}) *Animation

Animation Binding conversion method to Animation point

func (*Animation) Complete

func (self *Animation) Complete()

Complete Called internally when the animation finishes playback. Sets the isPlaying and isFinished states and dispatches the onAnimationComplete event if it exists on the parent and local onComplete event.

func (*Animation) CompleteI

func (self *Animation) CompleteI(args ...interface{})

CompleteI Called internally when the animation finishes playback. Sets the isPlaying and isFinished states and dispatches the onAnimationComplete event if it exists on the parent and local onComplete event.

func (*Animation) CurrentFrame

func (self *Animation) CurrentFrame() *Frame

CurrentFrame The currently displayed frame of the Animation.

func (*Animation) Delay

func (self *Animation) Delay() int

Delay The delay in ms between each frame of the Animation, based on the given frameRate.

func (*Animation) Destroy

func (self *Animation) Destroy()

Destroy Cleans up this animation ready for deletion. Nulls all values and references.

func (*Animation) DestroyI

func (self *Animation) DestroyI(args ...interface{})

DestroyI Cleans up this animation ready for deletion. Nulls all values and references.

func (*Animation) EnableUpdate

func (self *Animation) EnableUpdate() bool

EnableUpdate Gets or sets if this animation will dispatch the onUpdate events upon changing frame.

func (*Animation) Frame

func (self *Animation) Frame() int

Frame Gets or sets the current frame index and updates the Texture Cache for display.

func (*Animation) FrameTotal

func (self *Animation) FrameTotal() int

FrameTotal The total number of frames in the currently loaded FrameData, or -1 if no FrameData is loaded.

func (*Animation) Game

func (self *Animation) Game() *Game

Game A reference to the currently running Game.

func (*Animation) GenerateFrameNames

func (self *Animation) GenerateFrameNames(prefix string, start int, stop int) []string

GenerateFrameNames Really handy function for when you are creating arrays of animation data but it's using frame names and not numbers. For example imagine you've got 30 frames named: 'explosion_0001-large' to 'explosion_0030-large' You could use this function to generate those by doing: Phaser.Animation.generateFrameNames('explosion_', 1, 30, '-large', 4);

func (*Animation) GenerateFrameNames1O

func (self *Animation) GenerateFrameNames1O(prefix string, start int, stop int, suffix string) []string

GenerateFrameNames1O Really handy function for when you are creating arrays of animation data but it's using frame names and not numbers. For example imagine you've got 30 frames named: 'explosion_0001-large' to 'explosion_0030-large' You could use this function to generate those by doing: Phaser.Animation.generateFrameNames('explosion_', 1, 30, '-large', 4);

func (*Animation) GenerateFrameNames2O

func (self *Animation) GenerateFrameNames2O(prefix string, start int, stop int, suffix string, zeroPad int) []string

GenerateFrameNames2O Really handy function for when you are creating arrays of animation data but it's using frame names and not numbers. For example imagine you've got 30 frames named: 'explosion_0001-large' to 'explosion_0030-large' You could use this function to generate those by doing: Phaser.Animation.generateFrameNames('explosion_', 1, 30, '-large', 4);

func (*Animation) GenerateFrameNamesI

func (self *Animation) GenerateFrameNamesI(args ...interface{}) []string

GenerateFrameNamesI Really handy function for when you are creating arrays of animation data but it's using frame names and not numbers. For example imagine you've got 30 frames named: 'explosion_0001-large' to 'explosion_0030-large' You could use this function to generate those by doing: Phaser.Animation.generateFrameNames('explosion_', 1, 30, '-large', 4);

func (*Animation) IsFinished

func (self *Animation) IsFinished() bool

IsFinished The finished state of the Animation. Set to true once playback completes, false during playback.

func (*Animation) IsPaused

func (self *Animation) IsPaused() bool

IsPaused The paused state of the Animation.

func (*Animation) IsPlaying

func (self *Animation) IsPlaying() bool

IsPlaying The playing state of the Animation. Set to false once playback completes, true during playback.

func (*Animation) IsReversed

func (self *Animation) IsReversed() bool

IsReversed Indicates if the animation will play backwards.

func (*Animation) KillOnComplete

func (self *Animation) KillOnComplete() bool

KillOnComplete Should the parent of this Animation be killed when the animation completes?

func (*Animation) Loop

func (self *Animation) Loop() bool

Loop The loop state of the Animation.

func (*Animation) LoopCount

func (self *Animation) LoopCount() int

LoopCount The number of times the animation has looped since it was last started.

func (*Animation) Name

func (self *Animation) Name() string

Name The user defined name given to this Animation.

func (*Animation) Next

func (self *Animation) Next()

Next Advances by the given number of frames in the Animation, taking the loop value into consideration.

func (*Animation) Next1O

func (self *Animation) Next1O(quantity int)

Next1O Advances by the given number of frames in the Animation, taking the loop value into consideration.

func (*Animation) NextI

func (self *Animation) NextI(args ...interface{})

NextI Advances by the given number of frames in the Animation, taking the loop value into consideration.

func (*Animation) OnComplete

func (self *Animation) OnComplete() *Signal

OnComplete This event is dispatched when this Animation completes playback. If the animation is set to loop this is never fired, listen for onLoop instead.

func (*Animation) OnLoop

func (self *Animation) OnLoop() *Signal

OnLoop This event is dispatched when this Animation loops.

func (*Animation) OnPause

func (self *Animation) OnPause()

OnPause Called when the Game enters a paused state.

func (*Animation) OnPauseI

func (self *Animation) OnPauseI(args ...interface{})

OnPauseI Called when the Game enters a paused state.

func (*Animation) OnResume

func (self *Animation) OnResume()

OnResume Called when the Game resumes from a paused state.

func (*Animation) OnResumeI

func (self *Animation) OnResumeI(args ...interface{})

OnResumeI Called when the Game resumes from a paused state.

func (*Animation) OnStart

func (self *Animation) OnStart() *Signal

OnStart This event is dispatched when this Animation starts playback.

func (*Animation) OnUpdate

func (self *Animation) OnUpdate() interface{}

OnUpdate This event is dispatched when the Animation changes frame. By default this event is disabled due to its intensive nature. Enable it with: `Animation.enableUpdate = true`. Note that the event is only dispatched with the current frame. In a low-FPS environment Animations will automatically frame-skip to try and claw back time, so do not base your code on expecting to receive a perfectly sequential set of frames from this event.

func (*Animation) Paused

func (self *Animation) Paused() bool

Paused Gets and sets the paused state of this Animation.

func (*Animation) Play

func (self *Animation) Play() *Animation

Play Plays this animation.

func (*Animation) Play1O

func (self *Animation) Play1O(frameRate int) *Animation

Play1O Plays this animation.

func (*Animation) Play2O

func (self *Animation) Play2O(frameRate int, loop bool) *Animation

Play2O Plays this animation.

func (*Animation) Play3O

func (self *Animation) Play3O(frameRate int, loop bool, killOnComplete bool) *Animation

Play3O Plays this animation.

func (*Animation) PlayI

func (self *Animation) PlayI(args ...interface{}) *Animation

PlayI Plays this animation.

func (*Animation) Previous

func (self *Animation) Previous()

Previous Moves backwards the given number of frames in the Animation, taking the loop value into consideration.

func (*Animation) Previous1O

func (self *Animation) Previous1O(quantity int)

Previous1O Moves backwards the given number of frames in the Animation, taking the loop value into consideration.

func (*Animation) PreviousI

func (self *Animation) PreviousI(args ...interface{})

PreviousI Moves backwards the given number of frames in the Animation, taking the loop value into consideration.

func (*Animation) Restart

func (self *Animation) Restart()

Restart Sets this animation back to the first frame and restarts the animation.

func (*Animation) RestartI

func (self *Animation) RestartI(args ...interface{})

RestartI Sets this animation back to the first frame and restarts the animation.

func (*Animation) Reverse

func (self *Animation) Reverse() *Animation

Reverse Reverses the animation direction.

func (*Animation) ReverseI

func (self *Animation) ReverseI(args ...interface{}) *Animation

ReverseI Reverses the animation direction.

func (*Animation) ReverseOnce

func (self *Animation) ReverseOnce() *Animation

ReverseOnce Reverses the animation direction for the current/next animation only Once the onComplete event is called this method will be called again and revert the reversed state.

func (*Animation) ReverseOnceI

func (self *Animation) ReverseOnceI(args ...interface{}) *Animation

ReverseOnceI Reverses the animation direction for the current/next animation only Once the onComplete event is called this method will be called again and revert the reversed state.

func (*Animation) Reversed

func (self *Animation) Reversed() bool

Reversed Gets and sets the isReversed state of this Animation.

func (*Animation) SetCurrentFrameA

func (self *Animation) SetCurrentFrameA(member *Frame)

SetCurrentFrameA The currently displayed frame of the Animation.

func (*Animation) SetDelayA

func (self *Animation) SetDelayA(member int)

SetDelayA The delay in ms between each frame of the Animation, based on the given frameRate.

func (*Animation) SetEnableUpdateA

func (self *Animation) SetEnableUpdateA(member bool)

SetEnableUpdateA Gets or sets if this animation will dispatch the onUpdate events upon changing frame.

func (*Animation) SetFrame

func (self *Animation) SetFrame()

SetFrame Sets this animations playback to a given frame with the given ID.

func (*Animation) SetFrame1O

func (self *Animation) SetFrame1O(frameId interface{})

SetFrame1O Sets this animations playback to a given frame with the given ID.

func (*Animation) SetFrame2O

func (self *Animation) SetFrame2O(frameId interface{}, useLocalFrameIndex bool)

SetFrame2O Sets this animations playback to a given frame with the given ID.

func (*Animation) SetFrameA

func (self *Animation) SetFrameA(member int)

SetFrameA Gets or sets the current frame index and updates the Texture Cache for display.

func (*Animation) SetFrameI

func (self *Animation) SetFrameI(args ...interface{})

SetFrameI Sets this animations playback to a given frame with the given ID.

func (*Animation) SetFrameTotalA

func (self *Animation) SetFrameTotalA(member int)

SetFrameTotalA The total number of frames in the currently loaded FrameData, or -1 if no FrameData is loaded.

func (*Animation) SetGameA

func (self *Animation) SetGameA(member *Game)

SetGameA A reference to the currently running Game.

func (*Animation) SetIsFinishedA

func (self *Animation) SetIsFinishedA(member bool)

SetIsFinishedA The finished state of the Animation. Set to true once playback completes, false during playback.

func (*Animation) SetIsPausedA

func (self *Animation) SetIsPausedA(member bool)

SetIsPausedA The paused state of the Animation.

func (*Animation) SetIsPlayingA

func (self *Animation) SetIsPlayingA(member bool)

SetIsPlayingA The playing state of the Animation. Set to false once playback completes, true during playback.

func (*Animation) SetIsReversedA

func (self *Animation) SetIsReversedA(member bool)

SetIsReversedA Indicates if the animation will play backwards.

func (*Animation) SetKillOnCompleteA

func (self *Animation) SetKillOnCompleteA(member bool)

SetKillOnCompleteA Should the parent of this Animation be killed when the animation completes?

func (*Animation) SetLoopA

func (self *Animation) SetLoopA(member bool)

SetLoopA The loop state of the Animation.

func (*Animation) SetLoopCountA

func (self *Animation) SetLoopCountA(member int)

SetLoopCountA The number of times the animation has looped since it was last started.

func (*Animation) SetNameA

func (self *Animation) SetNameA(member string)

SetNameA The user defined name given to this Animation.

func (*Animation) SetOnCompleteA

func (self *Animation) SetOnCompleteA(member *Signal)

SetOnCompleteA This event is dispatched when this Animation completes playback. If the animation is set to loop this is never fired, listen for onLoop instead.

func (*Animation) SetOnLoopA

func (self *Animation) SetOnLoopA(member *Signal)

SetOnLoopA This event is dispatched when this Animation loops.

func (*Animation) SetOnStartA

func (self *Animation) SetOnStartA(member *Signal)

SetOnStartA This event is dispatched when this Animation starts playback.

func (*Animation) SetOnUpdateA

func (self *Animation) SetOnUpdateA(member interface{})

SetOnUpdateA This event is dispatched when the Animation changes frame. By default this event is disabled due to its intensive nature. Enable it with: `Animation.enableUpdate = true`. Note that the event is only dispatched with the current frame. In a low-FPS environment Animations will automatically frame-skip to try and claw back time, so do not base your code on expecting to receive a perfectly sequential set of frames from this event.

func (*Animation) SetPausedA

func (self *Animation) SetPausedA(member bool)

SetPausedA Gets and sets the paused state of this Animation.

func (*Animation) SetReversedA

func (self *Animation) SetReversedA(member bool)

SetReversedA Gets and sets the isReversed state of this Animation.

func (*Animation) SetSpeedA

func (self *Animation) SetSpeedA(member int)

SetSpeedA Gets or sets the current speed of the animation in frames per second. Changing this in a playing animation will take effect from the next frame. Value must be greater than 0.

func (*Animation) Speed

func (self *Animation) Speed() int

Speed Gets or sets the current speed of the animation in frames per second. Changing this in a playing animation will take effect from the next frame. Value must be greater than 0.

func (*Animation) Stop

func (self *Animation) Stop()

Stop Stops playback of this animation and set it to a finished state. If a resetFrame is provided it will stop playback and set frame to the first in the animation. If `dispatchComplete` is true it will dispatch the complete events, otherwise they'll be ignored.

func (*Animation) Stop1O

func (self *Animation) Stop1O(resetFrame bool)

Stop1O Stops playback of this animation and set it to a finished state. If a resetFrame is provided it will stop playback and set frame to the first in the animation. If `dispatchComplete` is true it will dispatch the complete events, otherwise they'll be ignored.

func (*Animation) Stop2O

func (self *Animation) Stop2O(resetFrame bool, dispatchComplete bool)

Stop2O Stops playback of this animation and set it to a finished state. If a resetFrame is provided it will stop playback and set frame to the first in the animation. If `dispatchComplete` is true it will dispatch the complete events, otherwise they'll be ignored.

func (*Animation) StopI

func (self *Animation) StopI(args ...interface{})

StopI Stops playback of this animation and set it to a finished state. If a resetFrame is provided it will stop playback and set frame to the first in the animation. If `dispatchComplete` is true it will dispatch the complete events, otherwise they'll be ignored.

func (*Animation) Update

func (self *Animation) Update()

Update Updates this animation. Called automatically by the AnimationManager.

func (*Animation) UpdateCurrentFrame

func (self *Animation) UpdateCurrentFrame(signalUpdate bool, fromPlay bool) bool

UpdateCurrentFrame Changes the currentFrame per the _frameIndex, updates the display state, and triggers the update signal.

Returns true if the current frame update was 'successful', false otherwise.

func (*Animation) UpdateCurrentFrameI

func (self *Animation) UpdateCurrentFrameI(args ...interface{}) bool

UpdateCurrentFrameI Changes the currentFrame per the _frameIndex, updates the display state, and triggers the update signal.

Returns true if the current frame update was 'successful', false otherwise.

func (*Animation) UpdateFrameData

func (self *Animation) UpdateFrameData(frameData *FrameData)

UpdateFrameData Changes the FrameData object this Animation is using.

func (*Animation) UpdateFrameDataI

func (self *Animation) UpdateFrameDataI(args ...interface{})

UpdateFrameDataI Changes the FrameData object this Animation is using.

func (*Animation) UpdateI

func (self *Animation) UpdateI(args ...interface{})

UpdateI Updates this animation. Called automatically by the AnimationManager.

type AnimationManager

type AnimationManager struct {
	*js.Object
}

AnimationManager The Animation Manager is used to add, play and update Phaser Animations. Any Game Object such as Phaser.Sprite that supports animation contains a single AnimationManager instance.

func NewAnimationManager

func NewAnimationManager(sprite *Sprite) *AnimationManager

NewAnimationManager The Animation Manager is used to add, play and update Phaser Animations. Any Game Object such as Phaser.Sprite that supports animation contains a single AnimationManager instance.

func NewAnimationManagerI

func NewAnimationManagerI(args ...interface{}) *AnimationManager

NewAnimationManagerI The Animation Manager is used to add, play and update Phaser Animations. Any Game Object such as Phaser.Sprite that supports animation contains a single AnimationManager instance.

func ToAnimationManager

func ToAnimationManager(jsStruct interface{}) *AnimationManager

AnimationManager Binding conversion method to AnimationManager point

func (*AnimationManager) Add

func (self *AnimationManager) Add(name string) *Animation

Add Adds a new animation under the given key. Optionally set the frames, frame rate and loop. Animations added in this way are played back with the play function.

func (*AnimationManager) Add1O

func (self *AnimationManager) Add1O(name string, frames []interface{}) *Animation

Add1O Adds a new animation under the given key. Optionally set the frames, frame rate and loop. Animations added in this way are played back with the play function.

func (*AnimationManager) Add2O

func (self *AnimationManager) Add2O(name string, frames []interface{}, frameRate int) *Animation

Add2O Adds a new animation under the given key. Optionally set the frames, frame rate and loop. Animations added in this way are played back with the play function.

func (*AnimationManager) Add3O

func (self *AnimationManager) Add3O(name string, frames []interface{}, frameRate int, loop bool) *Animation

Add3O Adds a new animation under the given key. Optionally set the frames, frame rate and loop. Animations added in this way are played back with the play function.

func (*AnimationManager) Add4O

func (self *AnimationManager) Add4O(name string, frames []interface{}, frameRate int, loop bool, useNumericIndex bool) *Animation

Add4O Adds a new animation under the given key. Optionally set the frames, frame rate and loop. Animations added in this way are played back with the play function.

func (*AnimationManager) AddI

func (self *AnimationManager) AddI(args ...interface{}) *Animation

AddI Adds a new animation under the given key. Optionally set the frames, frame rate and loop. Animations added in this way are played back with the play function.

func (*AnimationManager) CopyFrameData

func (self *AnimationManager) CopyFrameData(frameData *FrameData, frame interface{}) bool

CopyFrameData Loads FrameData into the internal temporary vars and resets the frame index to zero. This is called automatically when a new Sprite is created.

func (*AnimationManager) CopyFrameDataI

func (self *AnimationManager) CopyFrameDataI(args ...interface{}) bool

CopyFrameDataI Loads FrameData into the internal temporary vars and resets the frame index to zero. This is called automatically when a new Sprite is created.

func (*AnimationManager) CurrentAnim

func (self *AnimationManager) CurrentAnim() *Animation

CurrentAnim The currently displayed animation, if any.

func (*AnimationManager) CurrentFrame

func (self *AnimationManager) CurrentFrame() *Frame

CurrentFrame The currently displayed Frame of animation, if any. This property is only set once an Animation starts playing. Until that point it remains set as `null`.

func (*AnimationManager) Destroy

func (self *AnimationManager) Destroy()

Destroy Destroys all references this AnimationManager contains. Iterates through the list of animations stored in this manager and calls destroy on each of them.

func (*AnimationManager) DestroyI

func (self *AnimationManager) DestroyI(args ...interface{})

DestroyI Destroys all references this AnimationManager contains. Iterates through the list of animations stored in this manager and calls destroy on each of them.

func (*AnimationManager) Frame

func (self *AnimationManager) Frame() int

Frame Gets or sets the current frame index and updates the Texture Cache for display.

func (*AnimationManager) FrameData

func (self *AnimationManager) FrameData() *FrameData

FrameData The current animations FrameData.

func (*AnimationManager) FrameName

func (self *AnimationManager) FrameName() string

FrameName Gets or sets the current frame name and updates the Texture Cache for display.

func (*AnimationManager) FrameTotal

func (self *AnimationManager) FrameTotal() int

FrameTotal The total number of frames in the currently loaded FrameData, or -1 if no FrameData is loaded.

func (*AnimationManager) Game

func (self *AnimationManager) Game() *Game

Game A reference to the currently running Game.

func (*AnimationManager) GetAnimation

func (self *AnimationManager) GetAnimation(name string) *Animation

GetAnimation Returns an animation that was previously added by name.

func (*AnimationManager) GetAnimationI

func (self *AnimationManager) GetAnimationI(args ...interface{}) *Animation

GetAnimationI Returns an animation that was previously added by name.

func (*AnimationManager) IsLoaded

func (self *AnimationManager) IsLoaded() bool

IsLoaded Set to true once animation data has been loaded.

func (*AnimationManager) LoadFrameData

func (self *AnimationManager) LoadFrameData(frameData *FrameData, frame interface{}) bool

LoadFrameData Loads FrameData into the internal temporary vars and resets the frame index to zero. This is called automatically when a new Sprite is created.

func (*AnimationManager) LoadFrameDataI

func (self *AnimationManager) LoadFrameDataI(args ...interface{}) bool

LoadFrameDataI Loads FrameData into the internal temporary vars and resets the frame index to zero. This is called automatically when a new Sprite is created.

func (*AnimationManager) Name

func (self *AnimationManager) Name() string

Name Gets the current animation name, if set.

func (*AnimationManager) Next

func (self *AnimationManager) Next()

Next Advances by the given number of frames in the current animation, taking the loop value into consideration.

func (*AnimationManager) Next1O

func (self *AnimationManager) Next1O(quantity int)

Next1O Advances by the given number of frames in the current animation, taking the loop value into consideration.

func (*AnimationManager) NextI

func (self *AnimationManager) NextI(args ...interface{})

NextI Advances by the given number of frames in the current animation, taking the loop value into consideration.

func (*AnimationManager) Paused

func (self *AnimationManager) Paused() bool

Paused Gets and sets the paused state of the current animation.

func (*AnimationManager) Play

func (self *AnimationManager) Play(name string) *Animation

Play Play an animation based on the given key. The animation should previously have been added via `animations.add`

If the requested animation is already playing this request will be ignored. If you need to reset an already running animation do so directly on the Animation object itself.

func (*AnimationManager) Play1O

func (self *AnimationManager) Play1O(name string, frameRate int) *Animation

Play1O Play an animation based on the given key. The animation should previously have been added via `animations.add`

If the requested animation is already playing this request will be ignored. If you need to reset an already running animation do so directly on the Animation object itself.

func (*AnimationManager) Play2O

func (self *AnimationManager) Play2O(name string, frameRate int, loop bool) *Animation

Play2O Play an animation based on the given key. The animation should previously have been added via `animations.add`

If the requested animation is already playing this request will be ignored. If you need to reset an already running animation do so directly on the Animation object itself.

func (*AnimationManager) Play3O

func (self *AnimationManager) Play3O(name string, frameRate int, loop bool, killOnComplete bool) *Animation

Play3O Play an animation based on the given key. The animation should previously have been added via `animations.add`

If the requested animation is already playing this request will be ignored. If you need to reset an already running animation do so directly on the Animation object itself.

func (*AnimationManager) PlayI

func (self *AnimationManager) PlayI(args ...interface{}) *Animation

PlayI Play an animation based on the given key. The animation should previously have been added via `animations.add`

If the requested animation is already playing this request will be ignored. If you need to reset an already running animation do so directly on the Animation object itself.

func (*AnimationManager) Previous

func (self *AnimationManager) Previous()

Previous Moves backwards the given number of frames in the current animation, taking the loop value into consideration.

func (*AnimationManager) Previous1O

func (self *AnimationManager) Previous1O(quantity int)

Previous1O Moves backwards the given number of frames in the current animation, taking the loop value into consideration.

func (*AnimationManager) PreviousI

func (self *AnimationManager) PreviousI(args ...interface{})

PreviousI Moves backwards the given number of frames in the current animation, taking the loop value into consideration.

func (*AnimationManager) RefreshFrame

func (self *AnimationManager) RefreshFrame()

RefreshFrame Refreshes the current frame data back to the parent Sprite and also resets the texture data.

func (*AnimationManager) RefreshFrameI

func (self *AnimationManager) RefreshFrameI(args ...interface{})

RefreshFrameI Refreshes the current frame data back to the parent Sprite and also resets the texture data.

func (*AnimationManager) SetCurrentAnimA

func (self *AnimationManager) SetCurrentAnimA(member *Animation)

SetCurrentAnimA The currently displayed animation, if any.

func (*AnimationManager) SetCurrentFrameA

func (self *AnimationManager) SetCurrentFrameA(member *Frame)

SetCurrentFrameA The currently displayed Frame of animation, if any. This property is only set once an Animation starts playing. Until that point it remains set as `null`.

func (*AnimationManager) SetFrameA

func (self *AnimationManager) SetFrameA(member int)

SetFrameA Gets or sets the current frame index and updates the Texture Cache for display.

func (*AnimationManager) SetFrameDataA

func (self *AnimationManager) SetFrameDataA(member *FrameData)

SetFrameDataA The current animations FrameData.

func (*AnimationManager) SetFrameNameA

func (self *AnimationManager) SetFrameNameA(member string)

SetFrameNameA Gets or sets the current frame name and updates the Texture Cache for display.

func (*AnimationManager) SetFrameTotalA

func (self *AnimationManager) SetFrameTotalA(member int)

SetFrameTotalA The total number of frames in the currently loaded FrameData, or -1 if no FrameData is loaded.

func (*AnimationManager) SetGameA

func (self *AnimationManager) SetGameA(member *Game)

SetGameA A reference to the currently running Game.

func (*AnimationManager) SetIsLoadedA

func (self *AnimationManager) SetIsLoadedA(member bool)

SetIsLoadedA Set to true once animation data has been loaded.

func (*AnimationManager) SetNameA

func (self *AnimationManager) SetNameA(member string)

SetNameA Gets the current animation name, if set.

func (*AnimationManager) SetPausedA

func (self *AnimationManager) SetPausedA(member bool)

SetPausedA Gets and sets the paused state of the current animation.

func (*AnimationManager) SetSpriteA

func (self *AnimationManager) SetSpriteA(member *Sprite)

SetSpriteA A reference to the parent Sprite that owns this AnimationManager.

func (*AnimationManager) SetUpdateIfVisibleA

func (self *AnimationManager) SetUpdateIfVisibleA(member bool)

SetUpdateIfVisibleA Should the animation data continue to update even if the Sprite.visible is set to false.

func (*AnimationManager) Sprite

func (self *AnimationManager) Sprite() *Sprite

Sprite A reference to the parent Sprite that owns this AnimationManager.

func (*AnimationManager) Stop

func (self *AnimationManager) Stop()

Stop Stop playback of an animation. If a name is given that specific animation is stopped, otherwise the current animation is stopped. The currentAnim property of the AnimationManager is automatically set to the animation given.

func (*AnimationManager) Stop1O

func (self *AnimationManager) Stop1O(name string)

Stop1O Stop playback of an animation. If a name is given that specific animation is stopped, otherwise the current animation is stopped. The currentAnim property of the AnimationManager is automatically set to the animation given.

func (*AnimationManager) Stop2O

func (self *AnimationManager) Stop2O(name string, resetFrame bool)

Stop2O Stop playback of an animation. If a name is given that specific animation is stopped, otherwise the current animation is stopped. The currentAnim property of the AnimationManager is automatically set to the animation given.

func (*AnimationManager) StopI

func (self *AnimationManager) StopI(args ...interface{})

StopI Stop playback of an animation. If a name is given that specific animation is stopped, otherwise the current animation is stopped. The currentAnim property of the AnimationManager is automatically set to the animation given.

func (*AnimationManager) Update

func (self *AnimationManager) Update() bool

Update The main update function is called by the Sprites update loop. It's responsible for updating animation frames and firing related events.

func (*AnimationManager) UpdateI

func (self *AnimationManager) UpdateI(args ...interface{}) bool

UpdateI The main update function is called by the Sprites update loop. It's responsible for updating animation frames and firing related events.

func (*AnimationManager) UpdateIfVisible

func (self *AnimationManager) UpdateIfVisible() bool

UpdateIfVisible Should the animation data continue to update even if the Sprite.visible is set to false.

func (*AnimationManager) ValidateFrames

func (self *AnimationManager) ValidateFrames(frames []interface{}) bool

ValidateFrames Check whether the frames in the given array are valid and exist.

func (*AnimationManager) ValidateFrames1O

func (self *AnimationManager) ValidateFrames1O(frames []interface{}, useNumericIndex bool) bool

ValidateFrames1O Check whether the frames in the given array are valid and exist.

func (*AnimationManager) ValidateFramesI

func (self *AnimationManager) ValidateFramesI(args ...interface{}) bool

ValidateFramesI Check whether the frames in the given array are valid and exist.

type AnimationParser

type AnimationParser struct {
	*js.Object
}

AnimationParser Responsible for parsing sprite sheet and JSON data into the internal FrameData format that Phaser uses for animations.

func NewAnimationParser

func NewAnimationParser() *AnimationParser

NewAnimationParser Responsible for parsing sprite sheet and JSON data into the internal FrameData format that Phaser uses for animations.

func NewAnimationParserI

func NewAnimationParserI(args ...interface{}) *AnimationParser

NewAnimationParserI Responsible for parsing sprite sheet and JSON data into the internal FrameData format that Phaser uses for animations.

func ToAnimationParser

func ToAnimationParser(jsStruct interface{}) *AnimationParser

AnimationParser Binding conversion method to AnimationParser point

func (*AnimationParser) JSONData

func (self *AnimationParser) JSONData(game *Game, json interface{}) *FrameData

JSONData Parse the JSON data and extract the animation frame data from it.

func (*AnimationParser) JSONDataHash

func (self *AnimationParser) JSONDataHash(game *Game, json interface{}) *FrameData

JSONDataHash Parse the JSON data and extract the animation frame data from it.

func (*AnimationParser) JSONDataHashI

func (self *AnimationParser) JSONDataHashI(args ...interface{}) *FrameData

JSONDataHashI Parse the JSON data and extract the animation frame data from it.

func (*AnimationParser) JSONDataI

func (self *AnimationParser) JSONDataI(args ...interface{}) *FrameData

JSONDataI Parse the JSON data and extract the animation frame data from it.

func (*AnimationParser) JSONDataPyxel

func (self *AnimationParser) JSONDataPyxel(game *Game, json interface{}) *FrameData

JSONDataPyxel Parse the JSON data and extract the animation frame data from it.

func (*AnimationParser) JSONDataPyxelI

func (self *AnimationParser) JSONDataPyxelI(args ...interface{}) *FrameData

JSONDataPyxelI Parse the JSON data and extract the animation frame data from it.

func (*AnimationParser) SpriteSheet

func (self *AnimationParser) SpriteSheet(game *Game, key interface{}, frameWidth int, frameHeight int) *FrameData

SpriteSheet Parse a Sprite Sheet and extract the animation frame data from it.

func (*AnimationParser) SpriteSheet1O

func (self *AnimationParser) SpriteSheet1O(game *Game, key interface{}, frameWidth int, frameHeight int, frameMax int) *FrameData

SpriteSheet1O Parse a Sprite Sheet and extract the animation frame data from it.

func (*AnimationParser) SpriteSheet2O

func (self *AnimationParser) SpriteSheet2O(game *Game, key interface{}, frameWidth int, frameHeight int, frameMax int, margin int) *FrameData

SpriteSheet2O Parse a Sprite Sheet and extract the animation frame data from it.

func (*AnimationParser) SpriteSheet3O

func (self *AnimationParser) SpriteSheet3O(game *Game, key interface{}, frameWidth int, frameHeight int, frameMax int, margin int, spacing int) *FrameData

SpriteSheet3O Parse a Sprite Sheet and extract the animation frame data from it.

func (*AnimationParser) SpriteSheetI

func (self *AnimationParser) SpriteSheetI(args ...interface{}) *FrameData

SpriteSheetI Parse a Sprite Sheet and extract the animation frame data from it.

func (*AnimationParser) XMLData

func (self *AnimationParser) XMLData(game *Game, xml interface{}) *FrameData

XMLData Parse the XML data and extract the animation frame data from it.

func (*AnimationParser) XMLDataI

func (self *AnimationParser) XMLDataI(args ...interface{}) *FrameData

XMLDataI Parse the XML data and extract the animation frame data from it.

type ArrayBuffer

type ArrayBuffer struct{ *js.Object }

type ArraySet

type ArraySet struct {
	*js.Object
}

ArraySet ArraySet is a Set data structure (items must be unique within the set) that also maintains order. This allows specific items to be easily added or removed from the Set.

Item equality (and uniqueness) is determined by the behavior of `Array.indexOf`.

This used primarily by the Input subsystem.

func NewArraySet

func NewArraySet() *ArraySet

NewArraySet ArraySet is a Set data structure (items must be unique within the set) that also maintains order. This allows specific items to be easily added or removed from the Set.

Item equality (and uniqueness) is determined by the behavior of `Array.indexOf`.

This used primarily by the Input subsystem.

func NewArraySet1O

func NewArraySet1O(list []interface{}) *ArraySet

NewArraySet1O ArraySet is a Set data structure (items must be unique within the set) that also maintains order. This allows specific items to be easily added or removed from the Set.

Item equality (and uniqueness) is determined by the behavior of `Array.indexOf`.

This used primarily by the Input subsystem.

func NewArraySetI

func NewArraySetI(args ...interface{}) *ArraySet

NewArraySetI ArraySet is a Set data structure (items must be unique within the set) that also maintains order. This allows specific items to be easily added or removed from the Set.

Item equality (and uniqueness) is determined by the behavior of `Array.indexOf`.

This used primarily by the Input subsystem.

func ToArraySet

func ToArraySet(jsStruct interface{}) *ArraySet

ArraySet Binding conversion method to ArraySet point

func (*ArraySet) Add

func (self *ArraySet) Add(item interface{}) interface{}

Add Adds a new element to the end of the list. If the item already exists in the list it is not moved.

func (*ArraySet) AddI

func (self *ArraySet) AddI(args ...interface{}) interface{}

AddI Adds a new element to the end of the list. If the item already exists in the list it is not moved.

func (*ArraySet) CallAll

func (self *ArraySet) CallAll(key string, parameter interface{})

CallAll Calls a function on all members of this list, using the member as the context for the callback.

If the `key` property is present it must be a function. The function is invoked using the item as the context.

func (*ArraySet) CallAllI

func (self *ArraySet) CallAllI(args ...interface{})

CallAllI Calls a function on all members of this list, using the member as the context for the callback.

If the `key` property is present it must be a function. The function is invoked using the item as the context.

func (*ArraySet) Exists

func (self *ArraySet) Exists(item interface{}) bool

Exists Checks for the item within this list.

func (*ArraySet) ExistsI

func (self *ArraySet) ExistsI(args ...interface{}) bool

ExistsI Checks for the item within this list.

func (*ArraySet) First

func (self *ArraySet) First() interface{}

First Returns the first item and resets the cursor to the start.

func (*ArraySet) GetByKey

func (self *ArraySet) GetByKey(property string, value interface{}) interface{}

GetByKey Gets an item from the set based on the property strictly equaling the value given. Returns null if not found.

func (*ArraySet) GetByKeyI

func (self *ArraySet) GetByKeyI(args ...interface{}) interface{}

GetByKeyI Gets an item from the set based on the property strictly equaling the value given. Returns null if not found.

func (*ArraySet) GetIndex

func (self *ArraySet) GetIndex(item interface{}) int

GetIndex Gets the index of the item in the list, or -1 if it isn't in the list.

func (*ArraySet) GetIndexI

func (self *ArraySet) GetIndexI(args ...interface{}) int

GetIndexI Gets the index of the item in the list, or -1 if it isn't in the list.

func (*ArraySet) List

func (self *ArraySet) List() []interface{}

List The backing array.

func (*ArraySet) Next

func (self *ArraySet) Next() interface{}

Next Returns the the next item (based on the cursor) and advances the cursor.

func (*ArraySet) Position

func (self *ArraySet) Position() int

Position Current cursor position as established by `first` and `next`.

func (*ArraySet) Remove

func (self *ArraySet) Remove(item interface{}) interface{}

Remove Removes the given element from this list if it exists.

func (*ArraySet) RemoveAll

func (self *ArraySet) RemoveAll()

RemoveAll Removes every member from this ArraySet and optionally destroys it.

func (*ArraySet) RemoveAll1O

func (self *ArraySet) RemoveAll1O(destroy bool)

RemoveAll1O Removes every member from this ArraySet and optionally destroys it.

func (*ArraySet) RemoveAllI

func (self *ArraySet) RemoveAllI(args ...interface{})

RemoveAllI Removes every member from this ArraySet and optionally destroys it.

func (*ArraySet) RemoveI

func (self *ArraySet) RemoveI(args ...interface{}) interface{}

RemoveI Removes the given element from this list if it exists.

func (*ArraySet) Reset

func (self *ArraySet) Reset()

Reset Removes all the items.

func (*ArraySet) ResetI

func (self *ArraySet) ResetI(args ...interface{})

ResetI Removes all the items.

func (*ArraySet) SetAll

func (self *ArraySet) SetAll(key interface{}, value interface{})

SetAll Sets the property `key` to the given value on all members of this list.

func (*ArraySet) SetAllI

func (self *ArraySet) SetAllI(args ...interface{})

SetAllI Sets the property `key` to the given value on all members of this list.

func (*ArraySet) SetFirstA

func (self *ArraySet) SetFirstA(member interface{})

SetFirstA Returns the first item and resets the cursor to the start.

func (*ArraySet) SetListA

func (self *ArraySet) SetListA(member []interface{})

SetListA The backing array.

func (*ArraySet) SetNextA

func (self *ArraySet) SetNextA(member interface{})

SetNextA Returns the the next item (based on the cursor) and advances the cursor.

func (*ArraySet) SetPositionA

func (self *ArraySet) SetPositionA(member int)

SetPositionA Current cursor position as established by `first` and `next`.

func (*ArraySet) SetTotalA

func (self *ArraySet) SetTotalA(member int)

SetTotalA Number of items in the ArraySet. Same as `list.length`.

func (*ArraySet) Total

func (self *ArraySet) Total() int

Total Number of items in the ArraySet. Same as `list.length`.

type ArrayUtils

type ArrayUtils struct {
	*js.Object
}

ArrayUtils Utility functions for dealing with Arrays.

func NewArrayUtils

func NewArrayUtils() *ArrayUtils

NewArrayUtils Utility functions for dealing with Arrays.

func NewArrayUtilsI

func NewArrayUtilsI(args ...interface{}) *ArrayUtils

NewArrayUtilsI Utility functions for dealing with Arrays.

func ToArrayUtils

func ToArrayUtils(jsStruct interface{}) *ArrayUtils

ArrayUtils Binding conversion method to ArrayUtils point

func (*ArrayUtils) FindClosest

func (self *ArrayUtils) FindClosest(value int, arr []int) int

FindClosest Snaps a value to the nearest value in an array. The result will always be in the range `[first_value, last_value]`.

func (*ArrayUtils) FindClosestI

func (self *ArrayUtils) FindClosestI(args ...interface{}) int

FindClosestI Snaps a value to the nearest value in an array. The result will always be in the range `[first_value, last_value]`.

func (*ArrayUtils) GetRandomItem

func (self *ArrayUtils) GetRandomItem(objects []interface{}, startIndex int, length int) interface{}

GetRandomItem Fetch a random entry from the given array.

Will return null if there are no array items that fall within the specified range or if there is no item for the randomly chosen index.

func (*ArrayUtils) GetRandomItemI

func (self *ArrayUtils) GetRandomItemI(args ...interface{}) interface{}

GetRandomItemI Fetch a random entry from the given array.

Will return null if there are no array items that fall within the specified range or if there is no item for the randomly chosen index.

func (*ArrayUtils) NumberArray

func (self *ArrayUtils) NumberArray(start int, end int) []int

NumberArray Create an array representing the inclusive range of numbers (usually integers) in `[start, end]`. This is equivalent to `numberArrayStep(start, end, 1)`.

func (*ArrayUtils) NumberArrayI

func (self *ArrayUtils) NumberArrayI(args ...interface{}) []int

NumberArrayI Create an array representing the inclusive range of numbers (usually integers) in `[start, end]`. This is equivalent to `numberArrayStep(start, end, 1)`.

func (*ArrayUtils) NumberArrayStep

func (self *ArrayUtils) NumberArrayStep(start int) []interface{}

NumberArrayStep Create an array of numbers (positive and/or negative) progressing from `start` up to but not including `end` by advancing by `step`.

If `start` is less than `end` a zero-length range is created unless a negative `step` is specified.

Certain values for `start` and `end` (eg. NaN/undefined/null) are currently coerced to 0; for forward compatibility make sure to pass in actual numbers.

func (*ArrayUtils) NumberArrayStep1O

func (self *ArrayUtils) NumberArrayStep1O(start int, end int) []interface{}

NumberArrayStep1O Create an array of numbers (positive and/or negative) progressing from `start` up to but not including `end` by advancing by `step`.

If `start` is less than `end` a zero-length range is created unless a negative `step` is specified.

Certain values for `start` and `end` (eg. NaN/undefined/null) are currently coerced to 0; for forward compatibility make sure to pass in actual numbers.

func (*ArrayUtils) NumberArrayStep2O

func (self *ArrayUtils) NumberArrayStep2O(start int, end int, step int) []interface{}

NumberArrayStep2O Create an array of numbers (positive and/or negative) progressing from `start` up to but not including `end` by advancing by `step`.

If `start` is less than `end` a zero-length range is created unless a negative `step` is specified.

Certain values for `start` and `end` (eg. NaN/undefined/null) are currently coerced to 0; for forward compatibility make sure to pass in actual numbers.

func (*ArrayUtils) NumberArrayStepI

func (self *ArrayUtils) NumberArrayStepI(args ...interface{}) []interface{}

NumberArrayStepI Create an array of numbers (positive and/or negative) progressing from `start` up to but not including `end` by advancing by `step`.

If `start` is less than `end` a zero-length range is created unless a negative `step` is specified.

Certain values for `start` and `end` (eg. NaN/undefined/null) are currently coerced to 0; for forward compatibility make sure to pass in actual numbers.

func (*ArrayUtils) RemoveRandomItem

func (self *ArrayUtils) RemoveRandomItem(objects []interface{}, startIndex int, length int) interface{}

RemoveRandomItem Removes a random object from the given array and returns it.

Will return null if there are no array items that fall within the specified range or if there is no item for the randomly chosen index.

func (*ArrayUtils) RemoveRandomItemI

func (self *ArrayUtils) RemoveRandomItemI(args ...interface{}) interface{}

RemoveRandomItemI Removes a random object from the given array and returns it.

Will return null if there are no array items that fall within the specified range or if there is no item for the randomly chosen index.

func (*ArrayUtils) Rotate

func (self *ArrayUtils) Rotate(array []interface{}) interface{}

Rotate Moves the element from the start of the array to the end, shifting all items in the process. The "rotation" happens to the left.

Before: `[ A, B, C, D, E, F ]` After: `[ B, C, D, E, F, A ]`

See also Phaser.ArrayUtils.rotateRight

func (*ArrayUtils) RotateI

func (self *ArrayUtils) RotateI(args ...interface{}) interface{}

RotateI Moves the element from the start of the array to the end, shifting all items in the process. The "rotation" happens to the left.

Before: `[ A, B, C, D, E, F ]` After: `[ B, C, D, E, F, A ]`

See also Phaser.ArrayUtils.rotateRight

func (*ArrayUtils) RotateLeft

func (self *ArrayUtils) RotateLeft(array []interface{}) interface{}

RotateLeft Moves the element from the start of the array to the end, shifting all items in the process. The "rotation" happens to the left.

Before: `[ A, B, C, D, E, F ]` After: `[ B, C, D, E, F, A ]`

See also Phaser.ArrayUtils.rotateRight

func (*ArrayUtils) RotateLeftI

func (self *ArrayUtils) RotateLeftI(args ...interface{}) interface{}

RotateLeftI Moves the element from the start of the array to the end, shifting all items in the process. The "rotation" happens to the left.

Before: `[ A, B, C, D, E, F ]` After: `[ B, C, D, E, F, A ]`

See also Phaser.ArrayUtils.rotateRight

func (*ArrayUtils) RotateMatrix

func (self *ArrayUtils) RotateMatrix(matrix [][]interface{}, direction interface{}) [][]interface{}

RotateMatrix Rotates the given matrix (array of arrays).

Based on the routine from {@link http://jsfiddle.net/MrPolywhirl/NH42z/}.

func (*ArrayUtils) RotateMatrixI

func (self *ArrayUtils) RotateMatrixI(args ...interface{}) [][]interface{}

RotateMatrixI Rotates the given matrix (array of arrays).

Based on the routine from {@link http://jsfiddle.net/MrPolywhirl/NH42z/}.

func (*ArrayUtils) RotateRight

func (self *ArrayUtils) RotateRight(array []interface{}) interface{}

RotateRight Moves the element from the end of the array to the start, shifting all items in the process. The "rotation" happens to the right.

Before: `[ A, B, C, D, E, F ]` After: `[ F, A, B, C, D, E ]`

See also Phaser.ArrayUtils.rotateLeft.

func (*ArrayUtils) RotateRightI

func (self *ArrayUtils) RotateRightI(args ...interface{}) interface{}

RotateRightI Moves the element from the end of the array to the start, shifting all items in the process. The "rotation" happens to the right.

Before: `[ A, B, C, D, E, F ]` After: `[ F, A, B, C, D, E ]`

See also Phaser.ArrayUtils.rotateLeft.

func (*ArrayUtils) Shuffle

func (self *ArrayUtils) Shuffle(array []interface{}) []interface{}

Shuffle A standard Fisher-Yates Array shuffle implementation which modifies the array in place.

func (*ArrayUtils) ShuffleI

func (self *ArrayUtils) ShuffleI(args ...interface{}) []interface{}

ShuffleI A standard Fisher-Yates Array shuffle implementation which modifies the array in place.

func (*ArrayUtils) TransposeMatrix

func (self *ArrayUtils) TransposeMatrix(array [][]interface{}) [][]interface{}

TransposeMatrix Transposes the elements of the given matrix (array of arrays).

func (*ArrayUtils) TransposeMatrixI

func (self *ArrayUtils) TransposeMatrixI(args ...interface{}) [][]interface{}

TransposeMatrixI Transposes the elements of the given matrix (array of arrays).

type AudioContext

type AudioContext struct{ *js.Object }

type AudioSprite

type AudioSprite struct {
	*js.Object
}

AudioSprite Audio Sprites are a combination of audio files and a JSON configuration. The JSON follows the format of that created by https://github.com/tonistiigi/audiosprite

func NewAudioSprite

func NewAudioSprite(game *Game, key string) *AudioSprite

NewAudioSprite Audio Sprites are a combination of audio files and a JSON configuration. The JSON follows the format of that created by https://github.com/tonistiigi/audiosprite

func NewAudioSpriteI

func NewAudioSpriteI(args ...interface{}) *AudioSprite

NewAudioSpriteI Audio Sprites are a combination of audio files and a JSON configuration. The JSON follows the format of that created by https://github.com/tonistiigi/audiosprite

func ToAudioSprite

func ToAudioSprite(jsStruct interface{}) *AudioSprite

AudioSprite Binding conversion method to AudioSprite point

func (*AudioSprite) Autoplay

func (self *AudioSprite) Autoplay() bool

Autoplay Is a sound set to autoplay or not?

func (*AudioSprite) AutoplayKey

func (self *AudioSprite) AutoplayKey() string

AutoplayKey If a sound is set to auto play, this holds the marker key of it.

func (*AudioSprite) Config

func (self *AudioSprite) Config() interface{}

Config JSON audio atlas object.

func (*AudioSprite) Game

func (self *AudioSprite) Game() *Game

Game A reference to the currently running Game.

func (*AudioSprite) Get

func (self *AudioSprite) Get(marker string) *Sound

Get Get a sound with the given name.

func (*AudioSprite) GetI

func (self *AudioSprite) GetI(args ...interface{}) *Sound

GetI Get a sound with the given name.

func (*AudioSprite) Key

func (self *AudioSprite) Key() string

Key Asset key for the Audio Sprite.

func (*AudioSprite) Play

func (self *AudioSprite) Play() *Sound

Play Play a sound with the given name.

func (*AudioSprite) Play1O

func (self *AudioSprite) Play1O(marker string) *Sound

Play1O Play a sound with the given name.

func (*AudioSprite) Play2O

func (self *AudioSprite) Play2O(marker string, volume int) *Sound

Play2O Play a sound with the given name.

func (*AudioSprite) PlayI

func (self *AudioSprite) PlayI(args ...interface{}) *Sound

PlayI Play a sound with the given name.

func (*AudioSprite) SetAutoplayA

func (self *AudioSprite) SetAutoplayA(member bool)

SetAutoplayA Is a sound set to autoplay or not?

func (*AudioSprite) SetAutoplayKeyA

func (self *AudioSprite) SetAutoplayKeyA(member string)

SetAutoplayKeyA If a sound is set to auto play, this holds the marker key of it.

func (*AudioSprite) SetConfigA

func (self *AudioSprite) SetConfigA(member interface{})

SetConfigA JSON audio atlas object.

func (*AudioSprite) SetGameA

func (self *AudioSprite) SetGameA(member *Game)

SetGameA A reference to the currently running Game.

func (*AudioSprite) SetKeyA

func (self *AudioSprite) SetKeyA(member string)

SetKeyA Asset key for the Audio Sprite.

func (*AudioSprite) SetSoundsA

func (self *AudioSprite) SetSoundsA(member interface{})

SetSoundsA An object containing the Phaser.Sound objects for the Audio Sprite.

func (*AudioSprite) Sounds

func (self *AudioSprite) Sounds() interface{}

Sounds An object containing the Phaser.Sound objects for the Audio Sprite.

func (*AudioSprite) Stop

func (self *AudioSprite) Stop()

Stop Stop a sound with the given name.

func (*AudioSprite) Stop1O

func (self *AudioSprite) Stop1O(marker string)

Stop1O Stop a sound with the given name.

func (*AudioSprite) StopI

func (self *AudioSprite) StopI(args ...interface{})

StopI Stop a sound with the given name.

type BaseTexture

type BaseTexture struct {
	*js.Object
}

BaseTexture A texture stores the information that represents an image. All textures have a base texture.

func NewBaseTexture

func NewBaseTexture(source interface{}, scaleMode int) *BaseTexture

NewBaseTexture A texture stores the information that represents an image. All textures have a base texture.

func NewBaseTextureI

func NewBaseTextureI(args ...interface{}) *BaseTexture

NewBaseTextureI A texture stores the information that represents an image. All textures have a base texture.

func ToBaseTexture

func ToBaseTexture(jsStruct interface{}) *BaseTexture

BaseTexture Binding conversion method to BaseTexture point

func (*BaseTexture) Destroy

func (self *BaseTexture) Destroy()

Destroy Destroys this base texture

func (*BaseTexture) DestroyI

func (self *BaseTexture) DestroyI(args ...interface{})

DestroyI Destroys this base texture

func (*BaseTexture) Dirty

func (self *BaseTexture) Dirty()

Dirty Sets all glTextures to be dirty.

func (*BaseTexture) DirtyI

func (self *BaseTexture) DirtyI(args ...interface{})

DirtyI Sets all glTextures to be dirty.

func (*BaseTexture) ForceLoaded

func (self *BaseTexture) ForceLoaded(width int, height int)

ForceLoaded Forces this BaseTexture to be set as loaded, with the given width and height.

Then calls BaseTexture.dirty.

Important for when you don't want to modify the source object by forcing in `complete` or dimension properties it may not have.

func (*BaseTexture) ForceLoadedI

func (self *BaseTexture) ForceLoadedI(args ...interface{})

ForceLoadedI Forces this BaseTexture to be set as loaded, with the given width and height.

Then calls BaseTexture.dirty.

Important for when you don't want to modify the source object by forcing in `complete` or dimension properties it may not have.

func (*BaseTexture) FromCanvas

func (self *BaseTexture) FromCanvas(canvas *Canvas, scaleMode int) *BaseTexture

FromCanvas Helper function that creates a base texture from the given canvas element.

func (*BaseTexture) FromCanvasI

func (self *BaseTexture) FromCanvasI(args ...interface{}) *BaseTexture

FromCanvasI Helper function that creates a base texture from the given canvas element.

func (*BaseTexture) HasLoaded

func (self *BaseTexture) HasLoaded() bool

HasLoaded [read-only] Set to true once the base texture has loaded

func (*BaseTexture) Height

func (self *BaseTexture) Height() int

Height [read-only] The height of the base texture set when the image has loaded

func (*BaseTexture) Mipmap

func (self *BaseTexture) Mipmap() bool

Mipmap Set this to true if a mipmap of this texture needs to be generated. This value needs to be set before the texture is used

Also the texture must be a power of two size to work

func (*BaseTexture) PremultipliedAlpha

func (self *BaseTexture) PremultipliedAlpha() bool

PremultipliedAlpha Controls if RGB channels should be pre-multiplied by Alpha (WebGL only)

func (*BaseTexture) Resolution

func (self *BaseTexture) Resolution() int

Resolution The Resolution of the texture.

func (*BaseTexture) ScaleMode

func (self *BaseTexture) ScaleMode() int

ScaleMode The scale mode to apply when scaling this texture

func (*BaseTexture) SetHasLoadedA

func (self *BaseTexture) SetHasLoadedA(member bool)

SetHasLoadedA [read-only] Set to true once the base texture has loaded

func (*BaseTexture) SetHeightA

func (self *BaseTexture) SetHeightA(member int)

SetHeightA [read-only] The height of the base texture set when the image has loaded

func (*BaseTexture) SetMipmapA

func (self *BaseTexture) SetMipmapA(member bool)

SetMipmapA Set this to true if a mipmap of this texture needs to be generated. This value needs to be set before the texture is used

Also the texture must be a power of two size to work

func (*BaseTexture) SetPremultipliedAlphaA

func (self *BaseTexture) SetPremultipliedAlphaA(member bool)

SetPremultipliedAlphaA Controls if RGB channels should be pre-multiplied by Alpha (WebGL only)

func (*BaseTexture) SetResolutionA

func (self *BaseTexture) SetResolutionA(member int)

SetResolutionA The Resolution of the texture.

func (*BaseTexture) SetScaleModeA

func (self *BaseTexture) SetScaleModeA(member int)

SetScaleModeA The scale mode to apply when scaling this texture

func (*BaseTexture) SetSkipRenderA

func (self *BaseTexture) SetSkipRenderA(member bool)

SetSkipRenderA A BaseTexture can be set to skip the rendering phase in the WebGL Sprite Batch.

You may want to do this if you have a parent Sprite with no visible texture (i.e. uses the internal `__default` texture)

that has children that you do want to render, without causing a batch flush in the process.

func (*BaseTexture) SetSourceA

func (self *BaseTexture) SetSourceA(member *Image)

SetSourceA The image source that is used to create the texture.

func (*BaseTexture) SetWidthA

func (self *BaseTexture) SetWidthA(member int)

SetWidthA [read-only] The width of the base texture set when the image has loaded

func (*BaseTexture) SkipRender

func (self *BaseTexture) SkipRender() bool

SkipRender A BaseTexture can be set to skip the rendering phase in the WebGL Sprite Batch.

You may want to do this if you have a parent Sprite with no visible texture (i.e. uses the internal `__default` texture)

that has children that you do want to render, without causing a batch flush in the process.

func (*BaseTexture) Source

func (self *BaseTexture) Source() *Image

Source The image source that is used to create the texture.

func (*BaseTexture) UnloadFromGPU

func (self *BaseTexture) UnloadFromGPU()

UnloadFromGPU Removes the base texture from the GPU, useful for managing resources on the GPU.

Atexture is still 100% usable and will simply be reuploaded if there is a sprite on screen that is using it.

func (*BaseTexture) UnloadFromGPUI

func (self *BaseTexture) UnloadFromGPUI(args ...interface{})

UnloadFromGPUI Removes the base texture from the GPU, useful for managing resources on the GPU.

Atexture is still 100% usable and will simply be reuploaded if there is a sprite on screen that is using it.

func (*BaseTexture) UpdateSourceImage

func (self *BaseTexture) UpdateSourceImage(newSrc string)

UpdateSourceImage Changes the source image of the texture

func (*BaseTexture) UpdateSourceImageI

func (self *BaseTexture) UpdateSourceImageI(args ...interface{})

UpdateSourceImageI Changes the source image of the texture

func (*BaseTexture) Width

func (self *BaseTexture) Width() int

Width [read-only] The width of the base texture set when the image has loaded

type BitmapData

type BitmapData struct {
	*js.Object
}

BitmapData A BitmapData object contains a Canvas element to which you can draw anything you like via normal Canvas context operations. A single BitmapData can be used as the texture for one or many Images / Sprites. So if you need to dynamically create a Sprite texture then they are a good choice.

Important note: Every BitmapData creates its own Canvas element. Because BitmapData's are now Game Objects themselves, and don't live on the display list, they are NOT automatically cleared when you change State. Therefore you _must_ call BitmapData.destroy in your State's shutdown method if you wish to free-up the resources the BitmapData used, it will not happen for you.

func NewBitmapData

func NewBitmapData(game *Game, key string) *BitmapData

NewBitmapData A BitmapData object contains a Canvas element to which you can draw anything you like via normal Canvas context operations. A single BitmapData can be used as the texture for one or many Images / Sprites. So if you need to dynamically create a Sprite texture then they are a good choice.

Important note: Every BitmapData creates its own Canvas element. Because BitmapData's are now Game Objects themselves, and don't live on the display list, they are NOT automatically cleared when you change State. Therefore you _must_ call BitmapData.destroy in your State's shutdown method if you wish to free-up the resources the BitmapData used, it will not happen for you.

func NewBitmapData1O

func NewBitmapData1O(game *Game, key string, width int) *BitmapData

NewBitmapData1O A BitmapData object contains a Canvas element to which you can draw anything you like via normal Canvas context operations. A single BitmapData can be used as the texture for one or many Images / Sprites. So if you need to dynamically create a Sprite texture then they are a good choice.

Important note: Every BitmapData creates its own Canvas element. Because BitmapData's are now Game Objects themselves, and don't live on the display list, they are NOT automatically cleared when you change State. Therefore you _must_ call BitmapData.destroy in your State's shutdown method if you wish to free-up the resources the BitmapData used, it will not happen for you.

func NewBitmapData2O

func NewBitmapData2O(game *Game, key string, width int, height int) *BitmapData

NewBitmapData2O A BitmapData object contains a Canvas element to which you can draw anything you like via normal Canvas context operations. A single BitmapData can be used as the texture for one or many Images / Sprites. So if you need to dynamically create a Sprite texture then they are a good choice.

Important note: Every BitmapData creates its own Canvas element. Because BitmapData's are now Game Objects themselves, and don't live on the display list, they are NOT automatically cleared when you change State. Therefore you _must_ call BitmapData.destroy in your State's shutdown method if you wish to free-up the resources the BitmapData used, it will not happen for you.

func NewBitmapData3O

func NewBitmapData3O(game *Game, key string, width int, height int, skipPool bool) *BitmapData

NewBitmapData3O A BitmapData object contains a Canvas element to which you can draw anything you like via normal Canvas context operations. A single BitmapData can be used as the texture for one or many Images / Sprites. So if you need to dynamically create a Sprite texture then they are a good choice.

Important note: Every BitmapData creates its own Canvas element. Because BitmapData's are now Game Objects themselves, and don't live on the display list, they are NOT automatically cleared when you change State. Therefore you _must_ call BitmapData.destroy in your State's shutdown method if you wish to free-up the resources the BitmapData used, it will not happen for you.

func NewBitmapDataI

func NewBitmapDataI(args ...interface{}) *BitmapData

NewBitmapDataI A BitmapData object contains a Canvas element to which you can draw anything you like via normal Canvas context operations. A single BitmapData can be used as the texture for one or many Images / Sprites. So if you need to dynamically create a Sprite texture then they are a good choice.

Important note: Every BitmapData creates its own Canvas element. Because BitmapData's are now Game Objects themselves, and don't live on the display list, they are NOT automatically cleared when you change State. Therefore you _must_ call BitmapData.destroy in your State's shutdown method if you wish to free-up the resources the BitmapData used, it will not happen for you.

func ToBitmapData

func ToBitmapData(jsStruct interface{}) *BitmapData

BitmapData Binding conversion method to BitmapData point

func (*BitmapData) Add

func (self *BitmapData) Add(object interface{}) *BitmapData

Add Updates the given objects so that they use this BitmapData as their texture. This will replace any texture they will currently have set.

func (*BitmapData) AddI

func (self *BitmapData) AddI(args ...interface{}) *BitmapData

AddI Updates the given objects so that they use this BitmapData as their texture. This will replace any texture they will currently have set.

func (*BitmapData) AddToWorld

func (self *BitmapData) AddToWorld() *Image

AddToWorld Creates a new Phaser.Image object, assigns this BitmapData to be its texture, adds it to the world then returns it.

func (*BitmapData) AddToWorld1O

func (self *BitmapData) AddToWorld1O(x int) *Image

AddToWorld1O Creates a new Phaser.Image object, assigns this BitmapData to be its texture, adds it to the world then returns it.

func (*BitmapData) AddToWorld2O

func (self *BitmapData) AddToWorld2O(x int, y int) *Image

AddToWorld2O Creates a new Phaser.Image object, assigns this BitmapData to be its texture, adds it to the world then returns it.

func (*BitmapData) AddToWorld3O

func (self *BitmapData) AddToWorld3O(x int, y int, anchorX int) *Image

AddToWorld3O Creates a new Phaser.Image object, assigns this BitmapData to be its texture, adds it to the world then returns it.

func (*BitmapData) AddToWorld4O

func (self *BitmapData) AddToWorld4O(x int, y int, anchorX int, anchorY int) *Image

AddToWorld4O Creates a new Phaser.Image object, assigns this BitmapData to be its texture, adds it to the world then returns it.

func (*BitmapData) AddToWorld5O

func (self *BitmapData) AddToWorld5O(x int, y int, anchorX int, anchorY int, scaleX int) *Image

AddToWorld5O Creates a new Phaser.Image object, assigns this BitmapData to be its texture, adds it to the world then returns it.

func (*BitmapData) AddToWorld6O

func (self *BitmapData) AddToWorld6O(x int, y int, anchorX int, anchorY int, scaleX int, scaleY int) *Image

AddToWorld6O Creates a new Phaser.Image object, assigns this BitmapData to be its texture, adds it to the world then returns it.

func (*BitmapData) AddToWorldI

func (self *BitmapData) AddToWorldI(args ...interface{}) *Image

AddToWorldI Creates a new Phaser.Image object, assigns this BitmapData to be its texture, adds it to the world then returns it.

func (*BitmapData) AlphaMask

func (self *BitmapData) AlphaMask(source interface{}) *BitmapData

AlphaMask Draws the image onto this BitmapData using an image as an alpha mask.

func (*BitmapData) AlphaMask1O

func (self *BitmapData) AlphaMask1O(source interface{}, mask interface{}) *BitmapData

AlphaMask1O Draws the image onto this BitmapData using an image as an alpha mask.

func (*BitmapData) AlphaMask2O

func (self *BitmapData) AlphaMask2O(source interface{}, mask interface{}, sourceRect *Rectangle) *BitmapData

AlphaMask2O Draws the image onto this BitmapData using an image as an alpha mask.

func (*BitmapData) AlphaMask3O

func (self *BitmapData) AlphaMask3O(source interface{}, mask interface{}, sourceRect *Rectangle, maskRect *Rectangle) *BitmapData

AlphaMask3O Draws the image onto this BitmapData using an image as an alpha mask.

func (*BitmapData) AlphaMaskI

func (self *BitmapData) AlphaMaskI(args ...interface{}) *BitmapData

AlphaMaskI Draws the image onto this BitmapData using an image as an alpha mask.

func (*BitmapData) BaseTexture

func (self *BitmapData) BaseTexture() *BaseTexture

BaseTexture The PIXI.BaseTexture.

func (*BitmapData) BlendAdd

func (self *BitmapData) BlendAdd() *BitmapData

BlendAdd Sets the blend mode to 'lighter'

func (*BitmapData) BlendAddI

func (self *BitmapData) BlendAddI(args ...interface{}) *BitmapData

BlendAddI Sets the blend mode to 'lighter'

func (*BitmapData) BlendColor

func (self *BitmapData) BlendColor() *BitmapData

BlendColor Sets the blend mode to 'color'

func (*BitmapData) BlendColorBurn

func (self *BitmapData) BlendColorBurn() *BitmapData

BlendColorBurn Sets the blend mode to 'color-burn'

func (*BitmapData) BlendColorBurnI

func (self *BitmapData) BlendColorBurnI(args ...interface{}) *BitmapData

BlendColorBurnI Sets the blend mode to 'color-burn'

func (*BitmapData) BlendColorDodge

func (self *BitmapData) BlendColorDodge() *BitmapData

BlendColorDodge Sets the blend mode to 'color-dodge'

func (*BitmapData) BlendColorDodgeI

func (self *BitmapData) BlendColorDodgeI(args ...interface{}) *BitmapData

BlendColorDodgeI Sets the blend mode to 'color-dodge'

func (*BitmapData) BlendColorI

func (self *BitmapData) BlendColorI(args ...interface{}) *BitmapData

BlendColorI Sets the blend mode to 'color'

func (*BitmapData) BlendDarken

func (self *BitmapData) BlendDarken() *BitmapData

BlendDarken Sets the blend mode to 'darken'

func (*BitmapData) BlendDarkenI

func (self *BitmapData) BlendDarkenI(args ...interface{}) *BitmapData

BlendDarkenI Sets the blend mode to 'darken'

func (*BitmapData) BlendDestinationAtop

func (self *BitmapData) BlendDestinationAtop() *BitmapData

BlendDestinationAtop Sets the blend mode to 'destination-atop'

func (*BitmapData) BlendDestinationAtopI

func (self *BitmapData) BlendDestinationAtopI(args ...interface{}) *BitmapData

BlendDestinationAtopI Sets the blend mode to 'destination-atop'

func (*BitmapData) BlendDestinationIn

func (self *BitmapData) BlendDestinationIn() *BitmapData

BlendDestinationIn Sets the blend mode to 'destination-in'

func (*BitmapData) BlendDestinationInI

func (self *BitmapData) BlendDestinationInI(args ...interface{}) *BitmapData

BlendDestinationInI Sets the blend mode to 'destination-in'

func (*BitmapData) BlendDestinationOut

func (self *BitmapData) BlendDestinationOut() *BitmapData

BlendDestinationOut Sets the blend mode to 'destination-out'

func (*BitmapData) BlendDestinationOutI

func (self *BitmapData) BlendDestinationOutI(args ...interface{}) *BitmapData

BlendDestinationOutI Sets the blend mode to 'destination-out'

func (*BitmapData) BlendDestinationOver

func (self *BitmapData) BlendDestinationOver() *BitmapData

BlendDestinationOver Sets the blend mode to 'destination-over'

func (*BitmapData) BlendDestinationOverI

func (self *BitmapData) BlendDestinationOverI(args ...interface{}) *BitmapData

BlendDestinationOverI Sets the blend mode to 'destination-over'

func (*BitmapData) BlendDifference

func (self *BitmapData) BlendDifference() *BitmapData

BlendDifference Sets the blend mode to 'difference'

func (*BitmapData) BlendDifferenceI

func (self *BitmapData) BlendDifferenceI(args ...interface{}) *BitmapData

BlendDifferenceI Sets the blend mode to 'difference'

func (*BitmapData) BlendExclusion

func (self *BitmapData) BlendExclusion() *BitmapData

BlendExclusion Sets the blend mode to 'exclusion'

func (*BitmapData) BlendExclusionI

func (self *BitmapData) BlendExclusionI(args ...interface{}) *BitmapData

BlendExclusionI Sets the blend mode to 'exclusion'

func (*BitmapData) BlendHardLight

func (self *BitmapData) BlendHardLight() *BitmapData

BlendHardLight Sets the blend mode to 'hard-light'

func (*BitmapData) BlendHardLightI

func (self *BitmapData) BlendHardLightI(args ...interface{}) *BitmapData

BlendHardLightI Sets the blend mode to 'hard-light'

func (*BitmapData) BlendHue

func (self *BitmapData) BlendHue() *BitmapData

BlendHue Sets the blend mode to 'hue'

func (*BitmapData) BlendHueI

func (self *BitmapData) BlendHueI(args ...interface{}) *BitmapData

BlendHueI Sets the blend mode to 'hue'

func (*BitmapData) BlendLighten

func (self *BitmapData) BlendLighten() *BitmapData

BlendLighten Sets the blend mode to 'lighten'

func (*BitmapData) BlendLightenI

func (self *BitmapData) BlendLightenI(args ...interface{}) *BitmapData

BlendLightenI Sets the blend mode to 'lighten'

func (*BitmapData) BlendLuminosity

func (self *BitmapData) BlendLuminosity() *BitmapData

BlendLuminosity Sets the blend mode to 'luminosity'

func (*BitmapData) BlendLuminosityI

func (self *BitmapData) BlendLuminosityI(args ...interface{}) *BitmapData

BlendLuminosityI Sets the blend mode to 'luminosity'

func (*BitmapData) BlendMultiply

func (self *BitmapData) BlendMultiply() *BitmapData

BlendMultiply Sets the blend mode to 'multiply'

func (*BitmapData) BlendMultiplyI

func (self *BitmapData) BlendMultiplyI(args ...interface{}) *BitmapData

BlendMultiplyI Sets the blend mode to 'multiply'

func (*BitmapData) BlendOverlay

func (self *BitmapData) BlendOverlay() *BitmapData

BlendOverlay Sets the blend mode to 'overlay'

func (*BitmapData) BlendOverlayI

func (self *BitmapData) BlendOverlayI(args ...interface{}) *BitmapData

BlendOverlayI Sets the blend mode to 'overlay'

func (*BitmapData) BlendReset

func (self *BitmapData) BlendReset() *BitmapData

BlendReset Resets the blend mode (effectively sets it to 'source-over')

func (*BitmapData) BlendResetI

func (self *BitmapData) BlendResetI(args ...interface{}) *BitmapData

BlendResetI Resets the blend mode (effectively sets it to 'source-over')

func (*BitmapData) BlendSaturation

func (self *BitmapData) BlendSaturation() *BitmapData

BlendSaturation Sets the blend mode to 'saturation'

func (*BitmapData) BlendSaturationI

func (self *BitmapData) BlendSaturationI(args ...interface{}) *BitmapData

BlendSaturationI Sets the blend mode to 'saturation'

func (*BitmapData) BlendScreen

func (self *BitmapData) BlendScreen() *BitmapData

BlendScreen Sets the blend mode to 'screen'

func (*BitmapData) BlendScreenI

func (self *BitmapData) BlendScreenI(args ...interface{}) *BitmapData

BlendScreenI Sets the blend mode to 'screen'

func (*BitmapData) BlendSoftLight

func (self *BitmapData) BlendSoftLight() *BitmapData

BlendSoftLight Sets the blend mode to 'soft-light'

func (*BitmapData) BlendSoftLightI

func (self *BitmapData) BlendSoftLightI(args ...interface{}) *BitmapData

BlendSoftLightI Sets the blend mode to 'soft-light'

func (*BitmapData) BlendSourceAtop

func (self *BitmapData) BlendSourceAtop() *BitmapData

BlendSourceAtop Sets the blend mode to 'source-atop'

func (*BitmapData) BlendSourceAtopI

func (self *BitmapData) BlendSourceAtopI(args ...interface{}) *BitmapData

BlendSourceAtopI Sets the blend mode to 'source-atop'

func (*BitmapData) BlendSourceIn

func (self *BitmapData) BlendSourceIn() *BitmapData

BlendSourceIn Sets the blend mode to 'source-in'

func (*BitmapData) BlendSourceInI

func (self *BitmapData) BlendSourceInI(args ...interface{}) *BitmapData

BlendSourceInI Sets the blend mode to 'source-in'

func (*BitmapData) BlendSourceOut

func (self *BitmapData) BlendSourceOut() *BitmapData

BlendSourceOut Sets the blend mode to 'source-out'

func (*BitmapData) BlendSourceOutI

func (self *BitmapData) BlendSourceOutI(args ...interface{}) *BitmapData

BlendSourceOutI Sets the blend mode to 'source-out'

func (*BitmapData) BlendSourceOver

func (self *BitmapData) BlendSourceOver() *BitmapData

BlendSourceOver Sets the blend mode to 'source-over'

func (*BitmapData) BlendSourceOverI

func (self *BitmapData) BlendSourceOverI(args ...interface{}) *BitmapData

BlendSourceOverI Sets the blend mode to 'source-over'

func (*BitmapData) BlendXor

func (self *BitmapData) BlendXor() *BitmapData

BlendXor Sets the blend mode to 'xor'

func (*BitmapData) BlendXorI

func (self *BitmapData) BlendXorI(args ...interface{}) *BitmapData

BlendXorI Sets the blend mode to 'xor'

func (*BitmapData) Canvas

func (self *BitmapData) Canvas() dom.HTMLCanvasElement

Canvas The canvas to which this BitmapData draws.

func (*BitmapData) Circle

func (self *BitmapData) Circle(x int, y int, radius int) *BitmapData

Circle Draws a filled Circle to the BitmapData at the given x, y coordinates and radius in size.

func (*BitmapData) Circle1O

func (self *BitmapData) Circle1O(x int, y int, radius int, fillStyle string) *BitmapData

Circle1O Draws a filled Circle to the BitmapData at the given x, y coordinates and radius in size.

func (*BitmapData) CircleI

func (self *BitmapData) CircleI(args ...interface{}) *BitmapData

CircleI Draws a filled Circle to the BitmapData at the given x, y coordinates and radius in size.

func (*BitmapData) Clear

func (self *BitmapData) Clear() *BitmapData

Clear Clears the BitmapData context using a clearRect.

You can optionally define the area to clear. If the arguments are left empty it will clear the entire canvas.

You may need to call BitmapData.update after this in order to clear out the pixel data, but Phaser will not do this automatically for you.

func (*BitmapData) Clear1O

func (self *BitmapData) Clear1O(x int) *BitmapData

Clear1O Clears the BitmapData context using a clearRect.

You can optionally define the area to clear. If the arguments are left empty it will clear the entire canvas.

You may need to call BitmapData.update after this in order to clear out the pixel data, but Phaser will not do this automatically for you.

func (*BitmapData) Clear2O

func (self *BitmapData) Clear2O(x int, y int) *BitmapData

Clear2O Clears the BitmapData context using a clearRect.

You can optionally define the area to clear. If the arguments are left empty it will clear the entire canvas.

You may need to call BitmapData.update after this in order to clear out the pixel data, but Phaser will not do this automatically for you.

func (*BitmapData) Clear3O

func (self *BitmapData) Clear3O(x int, y int, width int) *BitmapData

Clear3O Clears the BitmapData context using a clearRect.

You can optionally define the area to clear. If the arguments are left empty it will clear the entire canvas.

You may need to call BitmapData.update after this in order to clear out the pixel data, but Phaser will not do this automatically for you.

func (*BitmapData) Clear4O

func (self *BitmapData) Clear4O(x int, y int, width int, height int) *BitmapData

Clear4O Clears the BitmapData context using a clearRect.

You can optionally define the area to clear. If the arguments are left empty it will clear the entire canvas.

You may need to call BitmapData.update after this in order to clear out the pixel data, but Phaser will not do this automatically for you.

func (*BitmapData) ClearI

func (self *BitmapData) ClearI(args ...interface{}) *BitmapData

ClearI Clears the BitmapData context using a clearRect.

You can optionally define the area to clear. If the arguments are left empty it will clear the entire canvas.

You may need to call BitmapData.update after this in order to clear out the pixel data, but Phaser will not do this automatically for you.

func (*BitmapData) Cls

func (self *BitmapData) Cls()

Cls Clears the BitmapData context using a clearRect.

func (*BitmapData) ClsI

func (self *BitmapData) ClsI(args ...interface{})

ClsI Clears the BitmapData context using a clearRect.

func (*BitmapData) Context

func (self *BitmapData) Context() dom.CanvasRenderingContext2D

Context The 2d context of the canvas.

func (*BitmapData) Copy

func (self *BitmapData) Copy() *BitmapData

Copy Copies a rectangular area from the source object to this BitmapData. If you give `null` as the source it will copy from itself.

You can optionally resize, translate, rotate, scale, alpha or blend as it's drawn.

All rotation, scaling and drawing takes place around the regions center point by default, but can be changed with the anchor parameters.

Note that the source image can also be this BitmapData, which can create some interesting effects.

This method has a lot of parameters for maximum control. You can use the more friendly methods like `copyRect` and `draw` to avoid having to remember them all.

You may prefer to use `copyTransform` if you're simply trying to draw a Sprite to this BitmapData, and don't wish to translate, scale or rotate it from its original values.

func (*BitmapData) Copy10O

func (self *BitmapData) Copy10O(source interface{}, x int, y int, width int, height int, tx int, ty int, newWidth int, newHeight int, rotate int) *BitmapData

Copy10O Copies a rectangular area from the source object to this BitmapData. If you give `null` as the source it will copy from itself.

You can optionally resize, translate, rotate, scale, alpha or blend as it's drawn.

All rotation, scaling and drawing takes place around the regions center point by default, but can be changed with the anchor parameters.

Note that the source image can also be this BitmapData, which can create some interesting effects.

This method has a lot of parameters for maximum control. You can use the more friendly methods like `copyRect` and `draw` to avoid having to remember them all.

You may prefer to use `copyTransform` if you're simply trying to draw a Sprite to this BitmapData, and don't wish to translate, scale or rotate it from its original values.

func (*BitmapData) Copy11O

func (self *BitmapData) Copy11O(source interface{}, x int, y int, width int, height int, tx int, ty int, newWidth int, newHeight int, rotate int, anchorX int) *BitmapData

Copy11O Copies a rectangular area from the source object to this BitmapData. If you give `null` as the source it will copy from itself.

You can optionally resize, translate, rotate, scale, alpha or blend as it's drawn.

All rotation, scaling and drawing takes place around the regions center point by default, but can be changed with the anchor parameters.

Note that the source image can also be this BitmapData, which can create some interesting effects.

This method has a lot of parameters for maximum control. You can use the more friendly methods like `copyRect` and `draw` to avoid having to remember them all.

You may prefer to use `copyTransform` if you're simply trying to draw a Sprite to this BitmapData, and don't wish to translate, scale or rotate it from its original values.

func (*BitmapData) Copy12O

func (self *BitmapData) Copy12O(source interface{}, x int, y int, width int, height int, tx int, ty int, newWidth int, newHeight int, rotate int, anchorX int, anchorY int) *BitmapData

Copy12O Copies a rectangular area from the source object to this BitmapData. If you give `null` as the source it will copy from itself.

You can optionally resize, translate, rotate, scale, alpha or blend as it's drawn.

All rotation, scaling and drawing takes place around the regions center point by default, but can be changed with the anchor parameters.

Note that the source image can also be this BitmapData, which can create some interesting effects.

This method has a lot of parameters for maximum control. You can use the more friendly methods like `copyRect` and `draw` to avoid having to remember them all.

You may prefer to use `copyTransform` if you're simply trying to draw a Sprite to this BitmapData, and don't wish to translate, scale or rotate it from its original values.

func (*BitmapData) Copy13O

func (self *BitmapData) Copy13O(source interface{}, x int, y int, width int, height int, tx int, ty int, newWidth int, newHeight int, rotate int, anchorX int, anchorY int, scaleX int) *BitmapData

Copy13O Copies a rectangular area from the source object to this BitmapData. If you give `null` as the source it will copy from itself.

You can optionally resize, translate, rotate, scale, alpha or blend as it's drawn.

All rotation, scaling and drawing takes place around the regions center point by default, but can be changed with the anchor parameters.

Note that the source image can also be this BitmapData, which can create some interesting effects.

This method has a lot of parameters for maximum control. You can use the more friendly methods like `copyRect` and `draw` to avoid having to remember them all.

You may prefer to use `copyTransform` if you're simply trying to draw a Sprite to this BitmapData, and don't wish to translate, scale or rotate it from its original values.

func (*BitmapData) Copy14O

func (self *BitmapData) Copy14O(source interface{}, x int, y int, width int, height int, tx int, ty int, newWidth int, newHeight int, rotate int, anchorX int, anchorY int, scaleX int, scaleY int) *BitmapData

Copy14O Copies a rectangular area from the source object to this BitmapData. If you give `null` as the source it will copy from itself.

You can optionally resize, translate, rotate, scale, alpha or blend as it's drawn.

All rotation, scaling and drawing takes place around the regions center point by default, but can be changed with the anchor parameters.

Note that the source image can also be this BitmapData, which can create some interesting effects.

This method has a lot of parameters for maximum control. You can use the more friendly methods like `copyRect` and `draw` to avoid having to remember them all.

You may prefer to use `copyTransform` if you're simply trying to draw a Sprite to this BitmapData, and don't wish to translate, scale or rotate it from its original values.

func (*BitmapData) Copy15O

func (self *BitmapData) Copy15O(source interface{}, x int, y int, width int, height int, tx int, ty int, newWidth int, newHeight int, rotate int, anchorX int, anchorY int, scaleX int, scaleY int, alpha int) *BitmapData

Copy15O Copies a rectangular area from the source object to this BitmapData. If you give `null` as the source it will copy from itself.

You can optionally resize, translate, rotate, scale, alpha or blend as it's drawn.

All rotation, scaling and drawing takes place around the regions center point by default, but can be changed with the anchor parameters.

Note that the source image can also be this BitmapData, which can create some interesting effects.

This method has a lot of parameters for maximum control. You can use the more friendly methods like `copyRect` and `draw` to avoid having to remember them all.

You may prefer to use `copyTransform` if you're simply trying to draw a Sprite to this BitmapData, and don't wish to translate, scale or rotate it from its original values.

func (*BitmapData) Copy16O

func (self *BitmapData) Copy16O(source interface{}, x int, y int, width int, height int, tx int, ty int, newWidth int, newHeight int, rotate int, anchorX int, anchorY int, scaleX int, scaleY int, alpha int, blendMode string) *BitmapData

Copy16O Copies a rectangular area from the source object to this BitmapData. If you give `null` as the source it will copy from itself.

You can optionally resize, translate, rotate, scale, alpha or blend as it's drawn.

All rotation, scaling and drawing takes place around the regions center point by default, but can be changed with the anchor parameters.

Note that the source image can also be this BitmapData, which can create some interesting effects.

This method has a lot of parameters for maximum control. You can use the more friendly methods like `copyRect` and `draw` to avoid having to remember them all.

You may prefer to use `copyTransform` if you're simply trying to draw a Sprite to this BitmapData, and don't wish to translate, scale or rotate it from its original values.

func (*BitmapData) Copy17O

func (self *BitmapData) Copy17O(source interface{}, x int, y int, width int, height int, tx int, ty int, newWidth int, newHeight int, rotate int, anchorX int, anchorY int, scaleX int, scaleY int, alpha int, blendMode string, roundPx bool) *BitmapData

Copy17O Copies a rectangular area from the source object to this BitmapData. If you give `null` as the source it will copy from itself.

You can optionally resize, translate, rotate, scale, alpha or blend as it's drawn.

All rotation, scaling and drawing takes place around the regions center point by default, but can be changed with the anchor parameters.

Note that the source image can also be this BitmapData, which can create some interesting effects.

This method has a lot of parameters for maximum control. You can use the more friendly methods like `copyRect` and `draw` to avoid having to remember them all.

You may prefer to use `copyTransform` if you're simply trying to draw a Sprite to this BitmapData, and don't wish to translate, scale or rotate it from its original values.

func (*BitmapData) Copy1O

func (self *BitmapData) Copy1O(source interface{}) *BitmapData

Copy1O Copies a rectangular area from the source object to this BitmapData. If you give `null` as the source it will copy from itself.

You can optionally resize, translate, rotate, scale, alpha or blend as it's drawn.

All rotation, scaling and drawing takes place around the regions center point by default, but can be changed with the anchor parameters.

Note that the source image can also be this BitmapData, which can create some interesting effects.

This method has a lot of parameters for maximum control. You can use the more friendly methods like `copyRect` and `draw` to avoid having to remember them all.

You may prefer to use `copyTransform` if you're simply trying to draw a Sprite to this BitmapData, and don't wish to translate, scale or rotate it from its original values.

func (*BitmapData) Copy2O

func (self *BitmapData) Copy2O(source interface{}, x int) *BitmapData

Copy2O Copies a rectangular area from the source object to this BitmapData. If you give `null` as the source it will copy from itself.

You can optionally resize, translate, rotate, scale, alpha or blend as it's drawn.

All rotation, scaling and drawing takes place around the regions center point by default, but can be changed with the anchor parameters.

Note that the source image can also be this BitmapData, which can create some interesting effects.

This method has a lot of parameters for maximum control. You can use the more friendly methods like `copyRect` and `draw` to avoid having to remember them all.

You may prefer to use `copyTransform` if you're simply trying to draw a Sprite to this BitmapData, and don't wish to translate, scale or rotate it from its original values.

func (*BitmapData) Copy3O

func (self *BitmapData) Copy3O(source interface{}, x int, y int) *BitmapData

Copy3O Copies a rectangular area from the source object to this BitmapData. If you give `null` as the source it will copy from itself.

You can optionally resize, translate, rotate, scale, alpha or blend as it's drawn.

All rotation, scaling and drawing takes place around the regions center point by default, but can be changed with the anchor parameters.

Note that the source image can also be this BitmapData, which can create some interesting effects.

This method has a lot of parameters for maximum control. You can use the more friendly methods like `copyRect` and `draw` to avoid having to remember them all.

You may prefer to use `copyTransform` if you're simply trying to draw a Sprite to this BitmapData, and don't wish to translate, scale or rotate it from its original values.

func (*BitmapData) Copy4O

func (self *BitmapData) Copy4O(source interface{}, x int, y int, width int) *BitmapData

Copy4O Copies a rectangular area from the source object to this BitmapData. If you give `null` as the source it will copy from itself.

You can optionally resize, translate, rotate, scale, alpha or blend as it's drawn.

All rotation, scaling and drawing takes place around the regions center point by default, but can be changed with the anchor parameters.

Note that the source image can also be this BitmapData, which can create some interesting effects.

This method has a lot of parameters for maximum control. You can use the more friendly methods like `copyRect` and `draw` to avoid having to remember them all.

You may prefer to use `copyTransform` if you're simply trying to draw a Sprite to this BitmapData, and don't wish to translate, scale or rotate it from its original values.

func (*BitmapData) Copy5O

func (self *BitmapData) Copy5O(source interface{}, x int, y int, width int, height int) *BitmapData

Copy5O Copies a rectangular area from the source object to this BitmapData. If you give `null` as the source it will copy from itself.

You can optionally resize, translate, rotate, scale, alpha or blend as it's drawn.

All rotation, scaling and drawing takes place around the regions center point by default, but can be changed with the anchor parameters.

Note that the source image can also be this BitmapData, which can create some interesting effects.

This method has a lot of parameters for maximum control. You can use the more friendly methods like `copyRect` and `draw` to avoid having to remember them all.

You may prefer to use `copyTransform` if you're simply trying to draw a Sprite to this BitmapData, and don't wish to translate, scale or rotate it from its original values.

func (*BitmapData) Copy6O

func (self *BitmapData) Copy6O(source interface{}, x int, y int, width int, height int, tx int) *BitmapData

Copy6O Copies a rectangular area from the source object to this BitmapData. If you give `null` as the source it will copy from itself.

You can optionally resize, translate, rotate, scale, alpha or blend as it's drawn.

All rotation, scaling and drawing takes place around the regions center point by default, but can be changed with the anchor parameters.

Note that the source image can also be this BitmapData, which can create some interesting effects.

This method has a lot of parameters for maximum control. You can use the more friendly methods like `copyRect` and `draw` to avoid having to remember them all.

You may prefer to use `copyTransform` if you're simply trying to draw a Sprite to this BitmapData, and don't wish to translate, scale or rotate it from its original values.

func (*BitmapData) Copy7O

func (self *BitmapData) Copy7O(source interface{}, x int, y int, width int, height int, tx int, ty int) *BitmapData

Copy7O Copies a rectangular area from the source object to this BitmapData. If you give `null` as the source it will copy from itself.

You can optionally resize, translate, rotate, scale, alpha or blend as it's drawn.

All rotation, scaling and drawing takes place around the regions center point by default, but can be changed with the anchor parameters.

Note that the source image can also be this BitmapData, which can create some interesting effects.

This method has a lot of parameters for maximum control. You can use the more friendly methods like `copyRect` and `draw` to avoid having to remember them all.

You may prefer to use `copyTransform` if you're simply trying to draw a Sprite to this BitmapData, and don't wish to translate, scale or rotate it from its original values.

func (*BitmapData) Copy8O

func (self *BitmapData) Copy8O(source interface{}, x int, y int, width int, height int, tx int, ty int, newWidth int) *BitmapData

Copy8O Copies a rectangular area from the source object to this BitmapData. If you give `null` as the source it will copy from itself.

You can optionally resize, translate, rotate, scale, alpha or blend as it's drawn.

All rotation, scaling and drawing takes place around the regions center point by default, but can be changed with the anchor parameters.

Note that the source image can also be this BitmapData, which can create some interesting effects.

This method has a lot of parameters for maximum control. You can use the more friendly methods like `copyRect` and `draw` to avoid having to remember them all.

You may prefer to use `copyTransform` if you're simply trying to draw a Sprite to this BitmapData, and don't wish to translate, scale or rotate it from its original values.

func (*BitmapData) Copy9O

func (self *BitmapData) Copy9O(source interface{}, x int, y int, width int, height int, tx int, ty int, newWidth int, newHeight int) *BitmapData

Copy9O Copies a rectangular area from the source object to this BitmapData. If you give `null` as the source it will copy from itself.

You can optionally resize, translate, rotate, scale, alpha or blend as it's drawn.

All rotation, scaling and drawing takes place around the regions center point by default, but can be changed with the anchor parameters.

Note that the source image can also be this BitmapData, which can create some interesting effects.

This method has a lot of parameters for maximum control. You can use the more friendly methods like `copyRect` and `draw` to avoid having to remember them all.

You may prefer to use `copyTransform` if you're simply trying to draw a Sprite to this BitmapData, and don't wish to translate, scale or rotate it from its original values.

func (*BitmapData) CopyI

func (self *BitmapData) CopyI(args ...interface{}) *BitmapData

CopyI Copies a rectangular area from the source object to this BitmapData. If you give `null` as the source it will copy from itself.

You can optionally resize, translate, rotate, scale, alpha or blend as it's drawn.

All rotation, scaling and drawing takes place around the regions center point by default, but can be changed with the anchor parameters.

Note that the source image can also be this BitmapData, which can create some interesting effects.

This method has a lot of parameters for maximum control. You can use the more friendly methods like `copyRect` and `draw` to avoid having to remember them all.

You may prefer to use `copyTransform` if you're simply trying to draw a Sprite to this BitmapData, and don't wish to translate, scale or rotate it from its original values.

func (*BitmapData) CopyRect

func (self *BitmapData) CopyRect(source interface{}, area *Rectangle, x int, y int) *BitmapData

CopyRect Copies the area defined by the Rectangle parameter from the source image to this BitmapData at the given location.

func (*BitmapData) CopyRect1O

func (self *BitmapData) CopyRect1O(source interface{}, area *Rectangle, x int, y int, alpha int) *BitmapData

CopyRect1O Copies the area defined by the Rectangle parameter from the source image to this BitmapData at the given location.

func (*BitmapData) CopyRect2O

func (self *BitmapData) CopyRect2O(source interface{}, area *Rectangle, x int, y int, alpha int, blendMode string) *BitmapData

CopyRect2O Copies the area defined by the Rectangle parameter from the source image to this BitmapData at the given location.

func (*BitmapData) CopyRect3O

func (self *BitmapData) CopyRect3O(source interface{}, area *Rectangle, x int, y int, alpha int, blendMode string, roundPx bool) *BitmapData

CopyRect3O Copies the area defined by the Rectangle parameter from the source image to this BitmapData at the given location.

func (*BitmapData) CopyRectI

func (self *BitmapData) CopyRectI(args ...interface{}) *BitmapData

CopyRectI Copies the area defined by the Rectangle parameter from the source image to this BitmapData at the given location.

func (*BitmapData) CopyTransform

func (self *BitmapData) CopyTransform() *BitmapData

CopyTransform Draws the given `source` Game Object to this BitmapData, using its `worldTransform` property to set the position, scale and rotation of where it is drawn. This function is used internally by `drawGroup`. It takes the objects tint and scale mode into consideration before drawing.

You can optionally specify Blend Mode and Round Pixels arguments.

func (*BitmapData) CopyTransform1O

func (self *BitmapData) CopyTransform1O(source interface{}) *BitmapData

CopyTransform1O Draws the given `source` Game Object to this BitmapData, using its `worldTransform` property to set the position, scale and rotation of where it is drawn. This function is used internally by `drawGroup`. It takes the objects tint and scale mode into consideration before drawing.

You can optionally specify Blend Mode and Round Pixels arguments.

func (*BitmapData) CopyTransform2O

func (self *BitmapData) CopyTransform2O(source interface{}, blendMode string) *BitmapData

CopyTransform2O Draws the given `source` Game Object to this BitmapData, using its `worldTransform` property to set the position, scale and rotation of where it is drawn. This function is used internally by `drawGroup`. It takes the objects tint and scale mode into consideration before drawing.

You can optionally specify Blend Mode and Round Pixels arguments.

func (*BitmapData) CopyTransform3O

func (self *BitmapData) CopyTransform3O(source interface{}, blendMode string, roundPx bool) *BitmapData

CopyTransform3O Draws the given `source` Game Object to this BitmapData, using its `worldTransform` property to set the position, scale and rotation of where it is drawn. This function is used internally by `drawGroup`. It takes the objects tint and scale mode into consideration before drawing.

You can optionally specify Blend Mode and Round Pixels arguments.

func (*BitmapData) CopyTransformI

func (self *BitmapData) CopyTransformI(args ...interface{}) *BitmapData

CopyTransformI Draws the given `source` Game Object to this BitmapData, using its `worldTransform` property to set the position, scale and rotation of where it is drawn. This function is used internally by `drawGroup`. It takes the objects tint and scale mode into consideration before drawing.

You can optionally specify Blend Mode and Round Pixels arguments.

func (*BitmapData) Ctx

Ctx A reference to BitmapData.context.

func (*BitmapData) Data

func (self *BitmapData) Data() *Uint8ClampedArray

Data A Uint8ClampedArray view into BitmapData.buffer. Note that this is unavailable in some browsers (such as Epic Browser due to its security restrictions)

func (*BitmapData) Destroy

func (self *BitmapData) Destroy()

Destroy Destroys this BitmapData and puts the canvas it was using back into the canvas pool for re-use.

func (*BitmapData) DestroyI

func (self *BitmapData) DestroyI(args ...interface{})

DestroyI Destroys this BitmapData and puts the canvas it was using back into the canvas pool for re-use.

func (*BitmapData) Dirty

func (self *BitmapData) Dirty() bool

Dirty If dirty this BitmapData will be re-rendered.

func (*BitmapData) DisableTextureUpload

func (self *BitmapData) DisableTextureUpload() bool

DisableTextureUpload If disableTextureUpload is true this BitmapData will never send its image data to the GPU when its dirty flag is true.

func (*BitmapData) Draw

func (self *BitmapData) Draw(source interface{}) *BitmapData

Draw Draws the given Phaser.Sprite, Phaser.Image or Phaser.Text to this BitmapData at the coordinates specified. You can use the optional width and height values to 'stretch' the sprite as it is drawn. This uses drawImage stretching, not scaling.

The children will be drawn at their `x` and `y` world space coordinates. If this is outside the bounds of the BitmapData they won't be visible. When drawing it will take into account the rotation, scale, scaleMode, alpha and tint values.

Note: You should ensure that at least 1 full update has taken place before calling this, otherwise the objects are likely to render incorrectly, if at all. You can trigger an update yourself by calling `stage.updateTransform()` before calling `draw`.

func (*BitmapData) Draw1O

func (self *BitmapData) Draw1O(source interface{}, x int) *BitmapData

Draw1O Draws the given Phaser.Sprite, Phaser.Image or Phaser.Text to this BitmapData at the coordinates specified. You can use the optional width and height values to 'stretch' the sprite as it is drawn. This uses drawImage stretching, not scaling.

The children will be drawn at their `x` and `y` world space coordinates. If this is outside the bounds of the BitmapData they won't be visible. When drawing it will take into account the rotation, scale, scaleMode, alpha and tint values.

Note: You should ensure that at least 1 full update has taken place before calling this, otherwise the objects are likely to render incorrectly, if at all. You can trigger an update yourself by calling `stage.updateTransform()` before calling `draw`.

func (*BitmapData) Draw2O

func (self *BitmapData) Draw2O(source interface{}, x int, y int) *BitmapData

Draw2O Draws the given Phaser.Sprite, Phaser.Image or Phaser.Text to this BitmapData at the coordinates specified. You can use the optional width and height values to 'stretch' the sprite as it is drawn. This uses drawImage stretching, not scaling.

The children will be drawn at their `x` and `y` world space coordinates. If this is outside the bounds of the BitmapData they won't be visible. When drawing it will take into account the rotation, scale, scaleMode, alpha and tint values.

Note: You should ensure that at least 1 full update has taken place before calling this, otherwise the objects are likely to render incorrectly, if at all. You can trigger an update yourself by calling `stage.updateTransform()` before calling `draw`.

func (*BitmapData) Draw3O

func (self *BitmapData) Draw3O(source interface{}, x int, y int, width int) *BitmapData

Draw3O Draws the given Phaser.Sprite, Phaser.Image or Phaser.Text to this BitmapData at the coordinates specified. You can use the optional width and height values to 'stretch' the sprite as it is drawn. This uses drawImage stretching, not scaling.

The children will be drawn at their `x` and `y` world space coordinates. If this is outside the bounds of the BitmapData they won't be visible. When drawing it will take into account the rotation, scale, scaleMode, alpha and tint values.

Note: You should ensure that at least 1 full update has taken place before calling this, otherwise the objects are likely to render incorrectly, if at all. You can trigger an update yourself by calling `stage.updateTransform()` before calling `draw`.

func (*BitmapData) Draw4O

func (self *BitmapData) Draw4O(source interface{}, x int, y int, width int, height int) *BitmapData

Draw4O Draws the given Phaser.Sprite, Phaser.Image or Phaser.Text to this BitmapData at the coordinates specified. You can use the optional width and height values to 'stretch' the sprite as it is drawn. This uses drawImage stretching, not scaling.

The children will be drawn at their `x` and `y` world space coordinates. If this is outside the bounds of the BitmapData they won't be visible. When drawing it will take into account the rotation, scale, scaleMode, alpha and tint values.

Note: You should ensure that at least 1 full update has taken place before calling this, otherwise the objects are likely to render incorrectly, if at all. You can trigger an update yourself by calling `stage.updateTransform()` before calling `draw`.

func (*BitmapData) Draw5O

func (self *BitmapData) Draw5O(source interface{}, x int, y int, width int, height int, blendMode string) *BitmapData

Draw5O Draws the given Phaser.Sprite, Phaser.Image or Phaser.Text to this BitmapData at the coordinates specified. You can use the optional width and height values to 'stretch' the sprite as it is drawn. This uses drawImage stretching, not scaling.

The children will be drawn at their `x` and `y` world space coordinates. If this is outside the bounds of the BitmapData they won't be visible. When drawing it will take into account the rotation, scale, scaleMode, alpha and tint values.

Note: You should ensure that at least 1 full update has taken place before calling this, otherwise the objects are likely to render incorrectly, if at all. You can trigger an update yourself by calling `stage.updateTransform()` before calling `draw`.

func (*BitmapData) Draw6O

func (self *BitmapData) Draw6O(source interface{}, x int, y int, width int, height int, blendMode string, roundPx bool) *BitmapData

Draw6O Draws the given Phaser.Sprite, Phaser.Image or Phaser.Text to this BitmapData at the coordinates specified. You can use the optional width and height values to 'stretch' the sprite as it is drawn. This uses drawImage stretching, not scaling.

The children will be drawn at their `x` and `y` world space coordinates. If this is outside the bounds of the BitmapData they won't be visible. When drawing it will take into account the rotation, scale, scaleMode, alpha and tint values.

Note: You should ensure that at least 1 full update has taken place before calling this, otherwise the objects are likely to render incorrectly, if at all. You can trigger an update yourself by calling `stage.updateTransform()` before calling `draw`.

func (*BitmapData) DrawFull

func (self *BitmapData) DrawFull(parent interface{}) *BitmapData

DrawFull Draws the Game Object or Group to this BitmapData and then recursively iterates through all of its children.

If a child has an `exists` property then it (and its children) will be only be drawn if exists is `true`.

The children will be drawn at their `x` and `y` world space coordinates. If this is outside the bounds of the BitmapData they won't be drawn. Depending on your requirements you may need to resize the BitmapData in advance to match the bounds of the top-level Game Object.

When drawing it will take into account the child's world rotation, scale and alpha values.

It's perfectly valid to pass in `game.world` as the parent object, and it will iterate through the entire display list.

Note: If you are trying to grab your entire game at the start of a State then you should ensure that at least 1 full update has taken place before doing so, otherwise all of the objects will render with incorrect positions and scales. You can trigger an update yourself by calling `stage.updateTransform()` before calling `drawFull`.

func (*BitmapData) DrawFull1O

func (self *BitmapData) DrawFull1O(parent interface{}, blendMode string) *BitmapData

DrawFull1O Draws the Game Object or Group to this BitmapData and then recursively iterates through all of its children.

If a child has an `exists` property then it (and its children) will be only be drawn if exists is `true`.

The children will be drawn at their `x` and `y` world space coordinates. If this is outside the bounds of the BitmapData they won't be drawn. Depending on your requirements you may need to resize the BitmapData in advance to match the bounds of the top-level Game Object.

When drawing it will take into account the child's world rotation, scale and alpha values.

It's perfectly valid to pass in `game.world` as the parent object, and it will iterate through the entire display list.

Note: If you are trying to grab your entire game at the start of a State then you should ensure that at least 1 full update has taken place before doing so, otherwise all of the objects will render with incorrect positions and scales. You can trigger an update yourself by calling `stage.updateTransform()` before calling `drawFull`.

func (*BitmapData) DrawFull2O

func (self *BitmapData) DrawFull2O(parent interface{}, blendMode string, roundPx bool) *BitmapData

DrawFull2O Draws the Game Object or Group to this BitmapData and then recursively iterates through all of its children.

If a child has an `exists` property then it (and its children) will be only be drawn if exists is `true`.

The children will be drawn at their `x` and `y` world space coordinates. If this is outside the bounds of the BitmapData they won't be drawn. Depending on your requirements you may need to resize the BitmapData in advance to match the bounds of the top-level Game Object.

When drawing it will take into account the child's world rotation, scale and alpha values.

It's perfectly valid to pass in `game.world` as the parent object, and it will iterate through the entire display list.

Note: If you are trying to grab your entire game at the start of a State then you should ensure that at least 1 full update has taken place before doing so, otherwise all of the objects will render with incorrect positions and scales. You can trigger an update yourself by calling `stage.updateTransform()` before calling `drawFull`.

func (*BitmapData) DrawFullI

func (self *BitmapData) DrawFullI(args ...interface{}) *BitmapData

DrawFullI Draws the Game Object or Group to this BitmapData and then recursively iterates through all of its children.

If a child has an `exists` property then it (and its children) will be only be drawn if exists is `true`.

The children will be drawn at their `x` and `y` world space coordinates. If this is outside the bounds of the BitmapData they won't be drawn. Depending on your requirements you may need to resize the BitmapData in advance to match the bounds of the top-level Game Object.

When drawing it will take into account the child's world rotation, scale and alpha values.

It's perfectly valid to pass in `game.world` as the parent object, and it will iterate through the entire display list.

Note: If you are trying to grab your entire game at the start of a State then you should ensure that at least 1 full update has taken place before doing so, otherwise all of the objects will render with incorrect positions and scales. You can trigger an update yourself by calling `stage.updateTransform()` before calling `drawFull`.

func (*BitmapData) DrawGroup

func (self *BitmapData) DrawGroup(group *Group) *BitmapData

DrawGroup Draws the immediate children of a Phaser.Group to this BitmapData.

It's perfectly valid to pass in `game.world` as the Group, and it will iterate through the entire display list.

Children are drawn _only_ if they have their `exists` property set to `true`, and have image, or RenderTexture, based Textures.

The children will be drawn at their `x` and `y` world space coordinates. If this is outside the bounds of the BitmapData they won't be visible. When drawing it will take into account the rotation, scale, scaleMode, alpha and tint values.

Note: You should ensure that at least 1 full update has taken place before calling this, otherwise the objects are likely to render incorrectly, if at all. You can trigger an update yourself by calling `stage.updateTransform()` before calling `drawGroup`.

func (*BitmapData) DrawGroup1O

func (self *BitmapData) DrawGroup1O(group *Group, blendMode string) *BitmapData

DrawGroup1O Draws the immediate children of a Phaser.Group to this BitmapData.

It's perfectly valid to pass in `game.world` as the Group, and it will iterate through the entire display list.

Children are drawn _only_ if they have their `exists` property set to `true`, and have image, or RenderTexture, based Textures.

The children will be drawn at their `x` and `y` world space coordinates. If this is outside the bounds of the BitmapData they won't be visible. When drawing it will take into account the rotation, scale, scaleMode, alpha and tint values.

Note: You should ensure that at least 1 full update has taken place before calling this, otherwise the objects are likely to render incorrectly, if at all. You can trigger an update yourself by calling `stage.updateTransform()` before calling `drawGroup`.

func (*BitmapData) DrawGroup2O

func (self *BitmapData) DrawGroup2O(group *Group, blendMode string, roundPx bool) *BitmapData

DrawGroup2O Draws the immediate children of a Phaser.Group to this BitmapData.

It's perfectly valid to pass in `game.world` as the Group, and it will iterate through the entire display list.

Children are drawn _only_ if they have their `exists` property set to `true`, and have image, or RenderTexture, based Textures.

The children will be drawn at their `x` and `y` world space coordinates. If this is outside the bounds of the BitmapData they won't be visible. When drawing it will take into account the rotation, scale, scaleMode, alpha and tint values.

Note: You should ensure that at least 1 full update has taken place before calling this, otherwise the objects are likely to render incorrectly, if at all. You can trigger an update yourself by calling `stage.updateTransform()` before calling `drawGroup`.

func (*BitmapData) DrawGroupI

func (self *BitmapData) DrawGroupI(args ...interface{}) *BitmapData

DrawGroupI Draws the immediate children of a Phaser.Group to this BitmapData.

It's perfectly valid to pass in `game.world` as the Group, and it will iterate through the entire display list.

Children are drawn _only_ if they have their `exists` property set to `true`, and have image, or RenderTexture, based Textures.

The children will be drawn at their `x` and `y` world space coordinates. If this is outside the bounds of the BitmapData they won't be visible. When drawing it will take into account the rotation, scale, scaleMode, alpha and tint values.

Note: You should ensure that at least 1 full update has taken place before calling this, otherwise the objects are likely to render incorrectly, if at all. You can trigger an update yourself by calling `stage.updateTransform()` before calling `drawGroup`.

func (*BitmapData) DrawGroupProxy

func (self *BitmapData) DrawGroupProxy(child interface{})

DrawGroupProxy A proxy for drawGroup that handles child iteration for more complex Game Objects.

func (*BitmapData) DrawGroupProxy1O

func (self *BitmapData) DrawGroupProxy1O(child interface{}, blendMode string)

DrawGroupProxy1O A proxy for drawGroup that handles child iteration for more complex Game Objects.

func (*BitmapData) DrawGroupProxy2O

func (self *BitmapData) DrawGroupProxy2O(child interface{}, blendMode string, roundPx bool)

DrawGroupProxy2O A proxy for drawGroup that handles child iteration for more complex Game Objects.

func (*BitmapData) DrawGroupProxyI

func (self *BitmapData) DrawGroupProxyI(args ...interface{})

DrawGroupProxyI A proxy for drawGroup that handles child iteration for more complex Game Objects.

func (*BitmapData) DrawI

func (self *BitmapData) DrawI(args ...interface{}) *BitmapData

DrawI Draws the given Phaser.Sprite, Phaser.Image or Phaser.Text to this BitmapData at the coordinates specified. You can use the optional width and height values to 'stretch' the sprite as it is drawn. This uses drawImage stretching, not scaling.

The children will be drawn at their `x` and `y` world space coordinates. If this is outside the bounds of the BitmapData they won't be visible. When drawing it will take into account the rotation, scale, scaleMode, alpha and tint values.

Note: You should ensure that at least 1 full update has taken place before calling this, otherwise the objects are likely to render incorrectly, if at all. You can trigger an update yourself by calling `stage.updateTransform()` before calling `draw`.

func (*BitmapData) Extract

func (self *BitmapData) Extract(destination *BitmapData, r int, g int, b int) *BitmapData

Extract Scans this BitmapData for all pixels matching the given r,g,b values and then draws them into the given destination BitmapData. The original BitmapData remains unchanged. The destination BitmapData must be large enough to receive all of the pixels that are scanned unless the 'resize' parameter is true. Although the destination BitmapData is returned from this method, it's actually modified directly in place, meaning this call is perfectly valid: `picture.extract(mask, r, g, b)` You can specify optional r2, g2, b2 color values. If given the pixel written to the destination bitmap will be of the r2, g2, b2 color. If not given it will be written as the same color it was extracted. You can provide one or more alternative colors, allowing you to tint the color during extraction.

func (*BitmapData) Extract1O

func (self *BitmapData) Extract1O(destination *BitmapData, r int, g int, b int, a int) *BitmapData

Extract1O Scans this BitmapData for all pixels matching the given r,g,b values and then draws them into the given destination BitmapData. The original BitmapData remains unchanged. The destination BitmapData must be large enough to receive all of the pixels that are scanned unless the 'resize' parameter is true. Although the destination BitmapData is returned from this method, it's actually modified directly in place, meaning this call is perfectly valid: `picture.extract(mask, r, g, b)` You can specify optional r2, g2, b2 color values. If given the pixel written to the destination bitmap will be of the r2, g2, b2 color. If not given it will be written as the same color it was extracted. You can provide one or more alternative colors, allowing you to tint the color during extraction.

func (*BitmapData) Extract2O

func (self *BitmapData) Extract2O(destination *BitmapData, r int, g int, b int, a int, resize bool) *BitmapData

Extract2O Scans this BitmapData for all pixels matching the given r,g,b values and then draws them into the given destination BitmapData. The original BitmapData remains unchanged. The destination BitmapData must be large enough to receive all of the pixels that are scanned unless the 'resize' parameter is true. Although the destination BitmapData is returned from this method, it's actually modified directly in place, meaning this call is perfectly valid: `picture.extract(mask, r, g, b)` You can specify optional r2, g2, b2 color values. If given the pixel written to the destination bitmap will be of the r2, g2, b2 color. If not given it will be written as the same color it was extracted. You can provide one or more alternative colors, allowing you to tint the color during extraction.

func (*BitmapData) Extract3O

func (self *BitmapData) Extract3O(destination *BitmapData, r int, g int, b int, a int, resize bool, r2 int) *BitmapData

Extract3O Scans this BitmapData for all pixels matching the given r,g,b values and then draws them into the given destination BitmapData. The original BitmapData remains unchanged. The destination BitmapData must be large enough to receive all of the pixels that are scanned unless the 'resize' parameter is true. Although the destination BitmapData is returned from this method, it's actually modified directly in place, meaning this call is perfectly valid: `picture.extract(mask, r, g, b)` You can specify optional r2, g2, b2 color values. If given the pixel written to the destination bitmap will be of the r2, g2, b2 color. If not given it will be written as the same color it was extracted. You can provide one or more alternative colors, allowing you to tint the color during extraction.

func (*BitmapData) Extract4O

func (self *BitmapData) Extract4O(destination *BitmapData, r int, g int, b int, a int, resize bool, r2 int, g2 int) *BitmapData

Extract4O Scans this BitmapData for all pixels matching the given r,g,b values and then draws them into the given destination BitmapData. The original BitmapData remains unchanged. The destination BitmapData must be large enough to receive all of the pixels that are scanned unless the 'resize' parameter is true. Although the destination BitmapData is returned from this method, it's actually modified directly in place, meaning this call is perfectly valid: `picture.extract(mask, r, g, b)` You can specify optional r2, g2, b2 color values. If given the pixel written to the destination bitmap will be of the r2, g2, b2 color. If not given it will be written as the same color it was extracted. You can provide one or more alternative colors, allowing you to tint the color during extraction.

func (*BitmapData) Extract5O

func (self *BitmapData) Extract5O(destination *BitmapData, r int, g int, b int, a int, resize bool, r2 int, g2 int, b2 int) *BitmapData

Extract5O Scans this BitmapData for all pixels matching the given r,g,b values and then draws them into the given destination BitmapData. The original BitmapData remains unchanged. The destination BitmapData must be large enough to receive all of the pixels that are scanned unless the 'resize' parameter is true. Although the destination BitmapData is returned from this method, it's actually modified directly in place, meaning this call is perfectly valid: `picture.extract(mask, r, g, b)` You can specify optional r2, g2, b2 color values. If given the pixel written to the destination bitmap will be of the r2, g2, b2 color. If not given it will be written as the same color it was extracted. You can provide one or more alternative colors, allowing you to tint the color during extraction.

func (*BitmapData) ExtractI

func (self *BitmapData) ExtractI(args ...interface{}) *BitmapData

ExtractI Scans this BitmapData for all pixels matching the given r,g,b values and then draws them into the given destination BitmapData. The original BitmapData remains unchanged. The destination BitmapData must be large enough to receive all of the pixels that are scanned unless the 'resize' parameter is true. Although the destination BitmapData is returned from this method, it's actually modified directly in place, meaning this call is perfectly valid: `picture.extract(mask, r, g, b)` You can specify optional r2, g2, b2 color values. If given the pixel written to the destination bitmap will be of the r2, g2, b2 color. If not given it will be written as the same color it was extracted. You can provide one or more alternative colors, allowing you to tint the color during extraction.

func (*BitmapData) Fill

func (self *BitmapData) Fill(r int, g int, b int) *BitmapData

Fill Fills the BitmapData with the given color.

func (*BitmapData) Fill1O

func (self *BitmapData) Fill1O(r int, g int, b int, a int) *BitmapData

Fill1O Fills the BitmapData with the given color.

func (*BitmapData) FillI

func (self *BitmapData) FillI(args ...interface{}) *BitmapData

FillI Fills the BitmapData with the given color.

func (*BitmapData) FrameData

func (self *BitmapData) FrameData() *FrameData

FrameData The FrameData container this BitmapData uses for rendering.

func (*BitmapData) Game

func (self *BitmapData) Game() *Game

Game A reference to the currently running game.

func (*BitmapData) GenerateTexture

func (self *BitmapData) GenerateTexture(key string) *Texture

GenerateTexture Creates a new Image element by converting this BitmapDatas canvas into a dataURL.

The image is then stored in the image Cache using the key given.

Finally a PIXI.Texture is created based on the image and returned.

You can apply the texture to a sprite or any other supporting object by using either the key or the texture. First call generateTexture:

`var texture = bitmapdata.generateTexture('ball');`

Then you can either apply the texture to a sprite:

`game.add.sprite(0, 0, texture);`

or by using the string based key:

`game.add.sprite(0, 0, 'ball');`

func (*BitmapData) GenerateTextureI

func (self *BitmapData) GenerateTextureI(args ...interface{}) *Texture

GenerateTextureI Creates a new Image element by converting this BitmapDatas canvas into a dataURL.

The image is then stored in the image Cache using the key given.

Finally a PIXI.Texture is created based on the image and returned.

You can apply the texture to a sprite or any other supporting object by using either the key or the texture. First call generateTexture:

`var texture = bitmapdata.generateTexture('ball');`

Then you can either apply the texture to a sprite:

`game.add.sprite(0, 0, texture);`

or by using the string based key:

`game.add.sprite(0, 0, 'ball');`

func (*BitmapData) GetBounds

func (self *BitmapData) GetBounds() *Rectangle

GetBounds Scans the BitmapData and calculates the bounds. This is a rectangle that defines the extent of all non-transparent pixels. The rectangle returned will extend from the top-left of the image to the bottom-right, excluding transparent pixels.

func (*BitmapData) GetBounds1O

func (self *BitmapData) GetBounds1O(rect *Rectangle) *Rectangle

GetBounds1O Scans the BitmapData and calculates the bounds. This is a rectangle that defines the extent of all non-transparent pixels. The rectangle returned will extend from the top-left of the image to the bottom-right, excluding transparent pixels.

func (*BitmapData) GetBoundsI

func (self *BitmapData) GetBoundsI(args ...interface{}) *Rectangle

GetBoundsI Scans the BitmapData and calculates the bounds. This is a rectangle that defines the extent of all non-transparent pixels. The rectangle returned will extend from the top-left of the image to the bottom-right, excluding transparent pixels.

func (*BitmapData) GetFirstPixel

func (self *BitmapData) GetFirstPixel() interface{}

GetFirstPixel Scans the BitmapData, pixel by pixel, until it encounters a pixel that isn't transparent (i.e. has an alpha value > 0). It then stops scanning and returns an object containing the color of the pixel in r, g and b properties and the location in the x and y properties.

The direction parameter controls from which direction it should start the scan:

0 = top to bottom 1 = bottom to top 2 = left to right 3 = right to left

func (*BitmapData) GetFirstPixel1O

func (self *BitmapData) GetFirstPixel1O(direction int) interface{}

GetFirstPixel1O Scans the BitmapData, pixel by pixel, until it encounters a pixel that isn't transparent (i.e. has an alpha value > 0). It then stops scanning and returns an object containing the color of the pixel in r, g and b properties and the location in the x and y properties.

The direction parameter controls from which direction it should start the scan:

0 = top to bottom 1 = bottom to top 2 = left to right 3 = right to left

func (*BitmapData) GetFirstPixelI

func (self *BitmapData) GetFirstPixelI(args ...interface{}) interface{}

GetFirstPixelI Scans the BitmapData, pixel by pixel, until it encounters a pixel that isn't transparent (i.e. has an alpha value > 0). It then stops scanning and returns an object containing the color of the pixel in r, g and b properties and the location in the x and y properties.

The direction parameter controls from which direction it should start the scan:

0 = top to bottom 1 = bottom to top 2 = left to right 3 = right to left

func (*BitmapData) GetPixel

func (self *BitmapData) GetPixel(x int, y int) interface{}

GetPixel Get the color of a specific pixel in the context into a color object. If you have drawn anything to the BitmapData since it was created you must call BitmapData.update to refresh the array buffer, otherwise this may return out of date color values, or worse - throw a run-time error as it tries to access an array element that doesn't exist.

func (*BitmapData) GetPixel1O

func (self *BitmapData) GetPixel1O(x int, y int, out interface{}) interface{}

GetPixel1O Get the color of a specific pixel in the context into a color object. If you have drawn anything to the BitmapData since it was created you must call BitmapData.update to refresh the array buffer, otherwise this may return out of date color values, or worse - throw a run-time error as it tries to access an array element that doesn't exist.

func (*BitmapData) GetPixel32

func (self *BitmapData) GetPixel32(x int, y int) int

GetPixel32 Get the color of a specific pixel including its alpha value. If you have drawn anything to the BitmapData since it was created you must call BitmapData.update to refresh the array buffer, otherwise this may return out of date color values, or worse - throw a run-time error as it tries to access an array element that doesn't exist. Note that on little-endian systems the format is 0xAABBGGRR and on big-endian the format is 0xRRGGBBAA.

func (*BitmapData) GetPixel32I

func (self *BitmapData) GetPixel32I(args ...interface{}) int

GetPixel32I Get the color of a specific pixel including its alpha value. If you have drawn anything to the BitmapData since it was created you must call BitmapData.update to refresh the array buffer, otherwise this may return out of date color values, or worse - throw a run-time error as it tries to access an array element that doesn't exist. Note that on little-endian systems the format is 0xAABBGGRR and on big-endian the format is 0xRRGGBBAA.

func (*BitmapData) GetPixelI

func (self *BitmapData) GetPixelI(args ...interface{}) interface{}

GetPixelI Get the color of a specific pixel in the context into a color object. If you have drawn anything to the BitmapData since it was created you must call BitmapData.update to refresh the array buffer, otherwise this may return out of date color values, or worse - throw a run-time error as it tries to access an array element that doesn't exist.

func (*BitmapData) GetPixelRGB

func (self *BitmapData) GetPixelRGB(x int, y int) interface{}

GetPixelRGB Get the color of a specific pixel including its alpha value as a color object containing r,g,b,a and rgba properties. If you have drawn anything to the BitmapData since it was created you must call BitmapData.update to refresh the array buffer, otherwise this may return out of date color values, or worse - throw a run-time error as it tries to access an array element that doesn't exist.

func (*BitmapData) GetPixelRGB1O

func (self *BitmapData) GetPixelRGB1O(x int, y int, out interface{}) interface{}

GetPixelRGB1O Get the color of a specific pixel including its alpha value as a color object containing r,g,b,a and rgba properties. If you have drawn anything to the BitmapData since it was created you must call BitmapData.update to refresh the array buffer, otherwise this may return out of date color values, or worse - throw a run-time error as it tries to access an array element that doesn't exist.

func (*BitmapData) GetPixelRGB2O

func (self *BitmapData) GetPixelRGB2O(x int, y int, out interface{}, hsl bool) interface{}

GetPixelRGB2O Get the color of a specific pixel including its alpha value as a color object containing r,g,b,a and rgba properties. If you have drawn anything to the BitmapData since it was created you must call BitmapData.update to refresh the array buffer, otherwise this may return out of date color values, or worse - throw a run-time error as it tries to access an array element that doesn't exist.

func (*BitmapData) GetPixelRGB3O

func (self *BitmapData) GetPixelRGB3O(x int, y int, out interface{}, hsl bool, hsv bool) interface{}

GetPixelRGB3O Get the color of a specific pixel including its alpha value as a color object containing r,g,b,a and rgba properties. If you have drawn anything to the BitmapData since it was created you must call BitmapData.update to refresh the array buffer, otherwise this may return out of date color values, or worse - throw a run-time error as it tries to access an array element that doesn't exist.

func (*BitmapData) GetPixelRGBI

func (self *BitmapData) GetPixelRGBI(args ...interface{}) interface{}

GetPixelRGBI Get the color of a specific pixel including its alpha value as a color object containing r,g,b,a and rgba properties. If you have drawn anything to the BitmapData since it was created you must call BitmapData.update to refresh the array buffer, otherwise this may return out of date color values, or worse - throw a run-time error as it tries to access an array element that doesn't exist.

func (*BitmapData) GetPixels

func (self *BitmapData) GetPixels(rect *Rectangle) *ImageData

GetPixels Gets all the pixels from the region specified by the given Rectangle object.

func (*BitmapData) GetPixelsI

func (self *BitmapData) GetPixelsI(args ...interface{}) *ImageData

GetPixelsI Gets all the pixels from the region specified by the given Rectangle object.

func (*BitmapData) GetTransform

func (self *BitmapData) GetTransform(translateX int, translateY int, scaleX int, scaleY int, skewX int, skewY int) interface{}

GetTransform Gets a JavaScript object that has 6 properties set that are used by BitmapData in a transform.

func (*BitmapData) GetTransformI

func (self *BitmapData) GetTransformI(args ...interface{}) interface{}

GetTransformI Gets a JavaScript object that has 6 properties set that are used by BitmapData in a transform.

func (*BitmapData) Height

func (self *BitmapData) Height() int

Height The height of the BitmapData in pixels.

func (*BitmapData) ImageData

func (self *BitmapData) ImageData() *ImageData

ImageData The context image data. Please note that a call to BitmapData.draw() or BitmapData.copy() does not update immediately this property for performance reason. Use BitmapData.update() to do so. This property is updated automatically after the first game loop, according to the dirty flag property.

func (*BitmapData) Key

func (self *BitmapData) Key() string

Key The key of the BitmapData in the Cache, if stored there.

func (*BitmapData) Line

func (self *BitmapData) Line(x1 int, y1 int, x2 int, y2 int) *BitmapData

Line Draws a line between the coordinates given in the color and thickness specified.

func (*BitmapData) Line1O

func (self *BitmapData) Line1O(x1 int, y1 int, x2 int, y2 int, color string) *BitmapData

Line1O Draws a line between the coordinates given in the color and thickness specified.

func (*BitmapData) Line2O

func (self *BitmapData) Line2O(x1 int, y1 int, x2 int, y2 int, color string, width int) *BitmapData

Line2O Draws a line between the coordinates given in the color and thickness specified.

func (*BitmapData) LineI

func (self *BitmapData) LineI(args ...interface{}) *BitmapData

LineI Draws a line between the coordinates given in the color and thickness specified.

func (*BitmapData) Load

func (self *BitmapData) Load(source interface{}) *BitmapData

Load Takes the given Game Object, resizes this BitmapData to match it and then draws it into this BitmapDatas canvas, ready for further processing. The source game object is not modified by this operation. If the source object uses a texture as part of a Texture Atlas or Sprite Sheet, only the current frame will be used for sizing. If a string is given it will assume it's a cache key and look in Phaser.Cache for an image key matching the string.

func (*BitmapData) LoadI

func (self *BitmapData) LoadI(args ...interface{}) *BitmapData

LoadI Takes the given Game Object, resizes this BitmapData to match it and then draws it into this BitmapDatas canvas, ready for further processing. The source game object is not modified by this operation. If the source object uses a texture as part of a Texture Atlas or Sprite Sheet, only the current frame will be used for sizing. If a string is given it will assume it's a cache key and look in Phaser.Cache for an image key matching the string.

func (*BitmapData) Move

func (self *BitmapData) Move(x int, y int) *BitmapData

Move Shifts the contents of this BitmapData by the distances given.

The image will wrap-around the edges on all sides if the wrap argument is true (the default).

func (*BitmapData) Move1O

func (self *BitmapData) Move1O(x int, y int, wrap bool) *BitmapData

Move1O Shifts the contents of this BitmapData by the distances given.

The image will wrap-around the edges on all sides if the wrap argument is true (the default).

func (*BitmapData) MoveH

func (self *BitmapData) MoveH(distance int) *BitmapData

MoveH Shifts the contents of this BitmapData horizontally.

The image will wrap-around the sides if the wrap argument is true (the default).

func (*BitmapData) MoveH1O

func (self *BitmapData) MoveH1O(distance int, wrap bool) *BitmapData

MoveH1O Shifts the contents of this BitmapData horizontally.

The image will wrap-around the sides if the wrap argument is true (the default).

func (*BitmapData) MoveHI

func (self *BitmapData) MoveHI(args ...interface{}) *BitmapData

MoveHI Shifts the contents of this BitmapData horizontally.

The image will wrap-around the sides if the wrap argument is true (the default).

func (*BitmapData) MoveI

func (self *BitmapData) MoveI(args ...interface{}) *BitmapData

MoveI Shifts the contents of this BitmapData by the distances given.

The image will wrap-around the edges on all sides if the wrap argument is true (the default).

func (*BitmapData) MoveV

func (self *BitmapData) MoveV(distance int) *BitmapData

MoveV Shifts the contents of this BitmapData vertically.

The image will wrap-around the sides if the wrap argument is true (the default).

func (*BitmapData) MoveV1O

func (self *BitmapData) MoveV1O(distance int, wrap bool) *BitmapData

MoveV1O Shifts the contents of this BitmapData vertically.

The image will wrap-around the sides if the wrap argument is true (the default).

func (*BitmapData) MoveVI

func (self *BitmapData) MoveVI(args ...interface{}) *BitmapData

MoveVI Shifts the contents of this BitmapData vertically.

The image will wrap-around the sides if the wrap argument is true (the default).

func (*BitmapData) Pixels

func (self *BitmapData) Pixels() *Uint32Array

Pixels An Uint32Array view into BitmapData.buffer.

func (*BitmapData) ProcessPixel

func (self *BitmapData) ProcessPixel(callback interface{}, callbackContext interface{}) *BitmapData

ProcessPixel Scans through the area specified in this BitmapData and sends the color for every pixel to the given callback along with its x and y coordinates. Whatever value the callback returns is set as the new color for that pixel, unless it returns the same color, in which case it's skipped. Note that the format of the color received will be different depending on if the system is big or little endian. It is expected that your callback will deal with endianess. If you'd rather Phaser did it then use processPixelRGB instead. The callback will also be sent the pixels x and y coordinates respectively.

func (*BitmapData) ProcessPixel1O

func (self *BitmapData) ProcessPixel1O(callback interface{}, callbackContext interface{}, x int) *BitmapData

ProcessPixel1O Scans through the area specified in this BitmapData and sends the color for every pixel to the given callback along with its x and y coordinates. Whatever value the callback returns is set as the new color for that pixel, unless it returns the same color, in which case it's skipped. Note that the format of the color received will be different depending on if the system is big or little endian. It is expected that your callback will deal with endianess. If you'd rather Phaser did it then use processPixelRGB instead. The callback will also be sent the pixels x and y coordinates respectively.

func (*BitmapData) ProcessPixel2O

func (self *BitmapData) ProcessPixel2O(callback interface{}, callbackContext interface{}, x int, y int) *BitmapData

ProcessPixel2O Scans through the area specified in this BitmapData and sends the color for every pixel to the given callback along with its x and y coordinates. Whatever value the callback returns is set as the new color for that pixel, unless it returns the same color, in which case it's skipped. Note that the format of the color received will be different depending on if the system is big or little endian. It is expected that your callback will deal with endianess. If you'd rather Phaser did it then use processPixelRGB instead. The callback will also be sent the pixels x and y coordinates respectively.

func (*BitmapData) ProcessPixel3O

func (self *BitmapData) ProcessPixel3O(callback interface{}, callbackContext interface{}, x int, y int, width int) *BitmapData

ProcessPixel3O Scans through the area specified in this BitmapData and sends the color for every pixel to the given callback along with its x and y coordinates. Whatever value the callback returns is set as the new color for that pixel, unless it returns the same color, in which case it's skipped. Note that the format of the color received will be different depending on if the system is big or little endian. It is expected that your callback will deal with endianess. If you'd rather Phaser did it then use processPixelRGB instead. The callback will also be sent the pixels x and y coordinates respectively.

func (*BitmapData) ProcessPixel4O

func (self *BitmapData) ProcessPixel4O(callback interface{}, callbackContext interface{}, x int, y int, width int, height int) *BitmapData

ProcessPixel4O Scans through the area specified in this BitmapData and sends the color for every pixel to the given callback along with its x and y coordinates. Whatever value the callback returns is set as the new color for that pixel, unless it returns the same color, in which case it's skipped. Note that the format of the color received will be different depending on if the system is big or little endian. It is expected that your callback will deal with endianess. If you'd rather Phaser did it then use processPixelRGB instead. The callback will also be sent the pixels x and y coordinates respectively.

func (*BitmapData) ProcessPixelI

func (self *BitmapData) ProcessPixelI(args ...interface{}) *BitmapData

ProcessPixelI Scans through the area specified in this BitmapData and sends the color for every pixel to the given callback along with its x and y coordinates. Whatever value the callback returns is set as the new color for that pixel, unless it returns the same color, in which case it's skipped. Note that the format of the color received will be different depending on if the system is big or little endian. It is expected that your callback will deal with endianess. If you'd rather Phaser did it then use processPixelRGB instead. The callback will also be sent the pixels x and y coordinates respectively.

func (*BitmapData) ProcessPixelRGB

func (self *BitmapData) ProcessPixelRGB(callback interface{}, callbackContext interface{}) *BitmapData

ProcessPixelRGB Scans through the area specified in this BitmapData and sends a color object for every pixel to the given callback. The callback will be sent a color object with 6 properties: `{ r: number, g: number, b: number, a: number, color: number, rgba: string }`. Where r, g, b and a are integers between 0 and 255 representing the color component values for red, green, blue and alpha. The `color` property is an Int32 of the full color. Note the endianess of this will change per system. The `rgba` property is a CSS style rgba() string which can be used with context.fillStyle calls, among others. The callback will also be sent the pixels x and y coordinates respectively. The callback must return either `false`, in which case no change will be made to the pixel, or a new color object. If a new color object is returned the pixel will be set to the r, g, b and a color values given within it.

func (*BitmapData) ProcessPixelRGB1O

func (self *BitmapData) ProcessPixelRGB1O(callback interface{}, callbackContext interface{}, x int) *BitmapData

ProcessPixelRGB1O Scans through the area specified in this BitmapData and sends a color object for every pixel to the given callback. The callback will be sent a color object with 6 properties: `{ r: number, g: number, b: number, a: number, color: number, rgba: string }`. Where r, g, b and a are integers between 0 and 255 representing the color component values for red, green, blue and alpha. The `color` property is an Int32 of the full color. Note the endianess of this will change per system. The `rgba` property is a CSS style rgba() string which can be used with context.fillStyle calls, among others. The callback will also be sent the pixels x and y coordinates respectively. The callback must return either `false`, in which case no change will be made to the pixel, or a new color object. If a new color object is returned the pixel will be set to the r, g, b and a color values given within it.

func (*BitmapData) ProcessPixelRGB2O

func (self *BitmapData) ProcessPixelRGB2O(callback interface{}, callbackContext interface{}, x int, y int) *BitmapData

ProcessPixelRGB2O Scans through the area specified in this BitmapData and sends a color object for every pixel to the given callback. The callback will be sent a color object with 6 properties: `{ r: number, g: number, b: number, a: number, color: number, rgba: string }`. Where r, g, b and a are integers between 0 and 255 representing the color component values for red, green, blue and alpha. The `color` property is an Int32 of the full color. Note the endianess of this will change per system. The `rgba` property is a CSS style rgba() string which can be used with context.fillStyle calls, among others. The callback will also be sent the pixels x and y coordinates respectively. The callback must return either `false`, in which case no change will be made to the pixel, or a new color object. If a new color object is returned the pixel will be set to the r, g, b and a color values given within it.

func (*BitmapData) ProcessPixelRGB3O

func (self *BitmapData) ProcessPixelRGB3O(callback interface{}, callbackContext interface{}, x int, y int, width int) *BitmapData

ProcessPixelRGB3O Scans through the area specified in this BitmapData and sends a color object for every pixel to the given callback. The callback will be sent a color object with 6 properties: `{ r: number, g: number, b: number, a: number, color: number, rgba: string }`. Where r, g, b and a are integers between 0 and 255 representing the color component values for red, green, blue and alpha. The `color` property is an Int32 of the full color. Note the endianess of this will change per system. The `rgba` property is a CSS style rgba() string which can be used with context.fillStyle calls, among others. The callback will also be sent the pixels x and y coordinates respectively. The callback must return either `false`, in which case no change will be made to the pixel, or a new color object. If a new color object is returned the pixel will be set to the r, g, b and a color values given within it.

func (*BitmapData) ProcessPixelRGB4O

func (self *BitmapData) ProcessPixelRGB4O(callback interface{}, callbackContext interface{}, x int, y int, width int, height int) *BitmapData

ProcessPixelRGB4O Scans through the area specified in this BitmapData and sends a color object for every pixel to the given callback. The callback will be sent a color object with 6 properties: `{ r: number, g: number, b: number, a: number, color: number, rgba: string }`. Where r, g, b and a are integers between 0 and 255 representing the color component values for red, green, blue and alpha. The `color` property is an Int32 of the full color. Note the endianess of this will change per system. The `rgba` property is a CSS style rgba() string which can be used with context.fillStyle calls, among others. The callback will also be sent the pixels x and y coordinates respectively. The callback must return either `false`, in which case no change will be made to the pixel, or a new color object. If a new color object is returned the pixel will be set to the r, g, b and a color values given within it.

func (*BitmapData) ProcessPixelRGBI

func (self *BitmapData) ProcessPixelRGBI(args ...interface{}) *BitmapData

ProcessPixelRGBI Scans through the area specified in this BitmapData and sends a color object for every pixel to the given callback. The callback will be sent a color object with 6 properties: `{ r: number, g: number, b: number, a: number, color: number, rgba: string }`. Where r, g, b and a are integers between 0 and 255 representing the color component values for red, green, blue and alpha. The `color` property is an Int32 of the full color. Note the endianess of this will change per system. The `rgba` property is a CSS style rgba() string which can be used with context.fillStyle calls, among others. The callback will also be sent the pixels x and y coordinates respectively. The callback must return either `false`, in which case no change will be made to the pixel, or a new color object. If a new color object is returned the pixel will be set to the r, g, b and a color values given within it.

func (*BitmapData) Rect

func (self *BitmapData) Rect(x int, y int, width int, height int) *BitmapData

Rect Draws a filled Rectangle to the BitmapData at the given x, y coordinates and width / height in size.

func (*BitmapData) Rect1O

func (self *BitmapData) Rect1O(x int, y int, width int, height int, fillStyle string) *BitmapData

Rect1O Draws a filled Rectangle to the BitmapData at the given x, y coordinates and width / height in size.

func (*BitmapData) RectI

func (self *BitmapData) RectI(args ...interface{}) *BitmapData

RectI Draws a filled Rectangle to the BitmapData at the given x, y coordinates and width / height in size.

func (*BitmapData) Render

func (self *BitmapData) Render() *BitmapData

Render If the game is running in WebGL this will push the texture up to the GPU if it's dirty. This is called automatically if the BitmapData is being used by a Sprite, otherwise you need to remember to call it in your render function. If you wish to suppress this functionality set BitmapData.disableTextureUpload to `true`.

func (*BitmapData) RenderI

func (self *BitmapData) RenderI(args ...interface{}) *BitmapData

RenderI If the game is running in WebGL this will push the texture up to the GPU if it's dirty. This is called automatically if the BitmapData is being used by a Sprite, otherwise you need to remember to call it in your render function. If you wish to suppress this functionality set BitmapData.disableTextureUpload to `true`.

func (*BitmapData) ReplaceRGB

func (self *BitmapData) ReplaceRGB(r1 int, g1 int, b1 int, a1 int, r2 int, g2 int, b2 int, a2 int) *BitmapData

ReplaceRGB Replaces all pixels matching one color with another. The color values are given as two sets of RGBA values. An optional region parameter controls if the replacement happens in just a specific area of the BitmapData or the entire thing.

func (*BitmapData) ReplaceRGB1O

func (self *BitmapData) ReplaceRGB1O(r1 int, g1 int, b1 int, a1 int, r2 int, g2 int, b2 int, a2 int, region *Rectangle) *BitmapData

ReplaceRGB1O Replaces all pixels matching one color with another. The color values are given as two sets of RGBA values. An optional region parameter controls if the replacement happens in just a specific area of the BitmapData or the entire thing.

func (*BitmapData) ReplaceRGBI

func (self *BitmapData) ReplaceRGBI(args ...interface{}) *BitmapData

ReplaceRGBI Replaces all pixels matching one color with another. The color values are given as two sets of RGBA values. An optional region parameter controls if the replacement happens in just a specific area of the BitmapData or the entire thing.

func (*BitmapData) Resize

func (self *BitmapData) Resize(width int, height int) *BitmapData

Resize Resizes the BitmapData. This changes the size of the underlying canvas and refreshes the buffer.

func (*BitmapData) ResizeI

func (self *BitmapData) ResizeI(args ...interface{}) *BitmapData

ResizeI Resizes the BitmapData. This changes the size of the underlying canvas and refreshes the buffer.

func (*BitmapData) SetBaseTextureA

func (self *BitmapData) SetBaseTextureA(member *BaseTexture)

SetBaseTextureA The PIXI.BaseTexture.

func (*BitmapData) SetCanvasA

func (self *BitmapData) SetCanvasA(member dom.HTMLCanvasElement)

SetCanvasA The canvas to which this BitmapData draws.

func (*BitmapData) SetContextA

func (self *BitmapData) SetContextA(member dom.CanvasRenderingContext2D)

SetContextA The 2d context of the canvas.

func (*BitmapData) SetCtxA

func (self *BitmapData) SetCtxA(member dom.CanvasRenderingContext2D)

SetCtxA A reference to BitmapData.context.

func (*BitmapData) SetDataA

func (self *BitmapData) SetDataA(member *Uint8ClampedArray)

SetDataA A Uint8ClampedArray view into BitmapData.buffer. Note that this is unavailable in some browsers (such as Epic Browser due to its security restrictions)

func (*BitmapData) SetDirtyA

func (self *BitmapData) SetDirtyA(member bool)

SetDirtyA If dirty this BitmapData will be re-rendered.

func (*BitmapData) SetDisableTextureUploadA

func (self *BitmapData) SetDisableTextureUploadA(member bool)

SetDisableTextureUploadA If disableTextureUpload is true this BitmapData will never send its image data to the GPU when its dirty flag is true.

func (*BitmapData) SetFrameDataA

func (self *BitmapData) SetFrameDataA(member *FrameData)

SetFrameDataA The FrameData container this BitmapData uses for rendering.

func (*BitmapData) SetGameA

func (self *BitmapData) SetGameA(member *Game)

SetGameA A reference to the currently running game.

func (*BitmapData) SetHSL

func (self *BitmapData) SetHSL() *BitmapData

SetHSL Sets the hue, saturation and lightness values on every pixel in the given region, or the whole BitmapData if no region was specified.

func (*BitmapData) SetHSL1O

func (self *BitmapData) SetHSL1O(h int) *BitmapData

SetHSL1O Sets the hue, saturation and lightness values on every pixel in the given region, or the whole BitmapData if no region was specified.

func (*BitmapData) SetHSL2O

func (self *BitmapData) SetHSL2O(h int, s int) *BitmapData

SetHSL2O Sets the hue, saturation and lightness values on every pixel in the given region, or the whole BitmapData if no region was specified.

func (*BitmapData) SetHSL3O

func (self *BitmapData) SetHSL3O(h int, s int, l int) *BitmapData

SetHSL3O Sets the hue, saturation and lightness values on every pixel in the given region, or the whole BitmapData if no region was specified.

func (*BitmapData) SetHSL4O

func (self *BitmapData) SetHSL4O(h int, s int, l int, region *Rectangle) *BitmapData

SetHSL4O Sets the hue, saturation and lightness values on every pixel in the given region, or the whole BitmapData if no region was specified.

func (*BitmapData) SetHSLI

func (self *BitmapData) SetHSLI(args ...interface{}) *BitmapData

SetHSLI Sets the hue, saturation and lightness values on every pixel in the given region, or the whole BitmapData if no region was specified.

func (*BitmapData) SetHeightA

func (self *BitmapData) SetHeightA(member int)

SetHeightA The height of the BitmapData in pixels.

func (*BitmapData) SetImageDataA

func (self *BitmapData) SetImageDataA(member *ImageData)

SetImageDataA The context image data. Please note that a call to BitmapData.draw() or BitmapData.copy() does not update immediately this property for performance reason. Use BitmapData.update() to do so. This property is updated automatically after the first game loop, according to the dirty flag property.

func (*BitmapData) SetKeyA

func (self *BitmapData) SetKeyA(member string)

SetKeyA The key of the BitmapData in the Cache, if stored there.

func (*BitmapData) SetPixel

func (self *BitmapData) SetPixel(x int, y int, red int, green int, blue int) *BitmapData

SetPixel Sets the color of the given pixel to the specified red, green and blue values.

func (*BitmapData) SetPixel1O

func (self *BitmapData) SetPixel1O(x int, y int, red int, green int, blue int, immediate bool) *BitmapData

SetPixel1O Sets the color of the given pixel to the specified red, green and blue values.

func (*BitmapData) SetPixel32

func (self *BitmapData) SetPixel32(x int, y int, red int, green int, blue int, alpha int) *BitmapData

SetPixel32 Sets the color of the given pixel to the specified red, green, blue and alpha values.

func (*BitmapData) SetPixel321O

func (self *BitmapData) SetPixel321O(x int, y int, red int, green int, blue int, alpha int, immediate bool) *BitmapData

SetPixel321O Sets the color of the given pixel to the specified red, green, blue and alpha values.

func (*BitmapData) SetPixel32I

func (self *BitmapData) SetPixel32I(args ...interface{}) *BitmapData

SetPixel32I Sets the color of the given pixel to the specified red, green, blue and alpha values.

func (*BitmapData) SetPixelI

func (self *BitmapData) SetPixelI(args ...interface{}) *BitmapData

SetPixelI Sets the color of the given pixel to the specified red, green and blue values.

func (*BitmapData) SetPixelsA

func (self *BitmapData) SetPixelsA(member *Uint32Array)

SetPixelsA An Uint32Array view into BitmapData.buffer.

func (*BitmapData) SetSmoothPropertyA

func (self *BitmapData) SetSmoothPropertyA(member string)

SetSmoothPropertyA The context property needed for smoothing this Canvas.

func (*BitmapData) SetTextureA

func (self *BitmapData) SetTextureA(member *Texture)

SetTextureA The PIXI.Texture.

func (*BitmapData) SetTextureFrameA

func (self *BitmapData) SetTextureFrameA(member *Frame)

SetTextureFrameA The Frame this BitmapData uses for rendering.

func (*BitmapData) SetTypeA

func (self *BitmapData) SetTypeA(member int)

SetTypeA The const type of this object.

func (*BitmapData) SetWidthA

func (self *BitmapData) SetWidthA(member int)

SetWidthA The width of the BitmapData in pixels.

func (*BitmapData) Shadow

func (self *BitmapData) Shadow(color string) *BitmapData

Shadow Sets the shadow properties of this BitmapDatas context which will affect all draw operations made to it. You can cancel an existing shadow by calling this method and passing no parameters. Note: At the time of writing (October 2014) Chrome still doesn't support shadowBlur used with drawImage.

func (*BitmapData) Shadow1O

func (self *BitmapData) Shadow1O(color string, blur int) *BitmapData

Shadow1O Sets the shadow properties of this BitmapDatas context which will affect all draw operations made to it. You can cancel an existing shadow by calling this method and passing no parameters. Note: At the time of writing (October 2014) Chrome still doesn't support shadowBlur used with drawImage.

func (*BitmapData) Shadow2O

func (self *BitmapData) Shadow2O(color string, blur int, x int) *BitmapData

Shadow2O Sets the shadow properties of this BitmapDatas context which will affect all draw operations made to it. You can cancel an existing shadow by calling this method and passing no parameters. Note: At the time of writing (October 2014) Chrome still doesn't support shadowBlur used with drawImage.

func (*BitmapData) Shadow3O

func (self *BitmapData) Shadow3O(color string, blur int, x int, y int) *BitmapData

Shadow3O Sets the shadow properties of this BitmapDatas context which will affect all draw operations made to it. You can cancel an existing shadow by calling this method and passing no parameters. Note: At the time of writing (October 2014) Chrome still doesn't support shadowBlur used with drawImage.

func (*BitmapData) ShadowI

func (self *BitmapData) ShadowI(args ...interface{}) *BitmapData

ShadowI Sets the shadow properties of this BitmapDatas context which will affect all draw operations made to it. You can cancel an existing shadow by calling this method and passing no parameters. Note: At the time of writing (October 2014) Chrome still doesn't support shadowBlur used with drawImage.

func (*BitmapData) ShiftHSL

func (self *BitmapData) ShiftHSL() *BitmapData

ShiftHSL Shifts any or all of the hue, saturation and lightness values on every pixel in the given region, or the whole BitmapData if no region was specified. Shifting will add the given value onto the current h, s and l values, not replace them. The hue is wrapped to keep it within the range 0 to 1. Saturation and lightness are clamped to not exceed 1.

func (*BitmapData) ShiftHSL1O

func (self *BitmapData) ShiftHSL1O(h int) *BitmapData

ShiftHSL1O Shifts any or all of the hue, saturation and lightness values on every pixel in the given region, or the whole BitmapData if no region was specified. Shifting will add the given value onto the current h, s and l values, not replace them. The hue is wrapped to keep it within the range 0 to 1. Saturation and lightness are clamped to not exceed 1.

func (*BitmapData) ShiftHSL2O

func (self *BitmapData) ShiftHSL2O(h int, s int) *BitmapData

ShiftHSL2O Shifts any or all of the hue, saturation and lightness values on every pixel in the given region, or the whole BitmapData if no region was specified. Shifting will add the given value onto the current h, s and l values, not replace them. The hue is wrapped to keep it within the range 0 to 1. Saturation and lightness are clamped to not exceed 1.

func (*BitmapData) ShiftHSL3O

func (self *BitmapData) ShiftHSL3O(h int, s int, l int) *BitmapData

ShiftHSL3O Shifts any or all of the hue, saturation and lightness values on every pixel in the given region, or the whole BitmapData if no region was specified. Shifting will add the given value onto the current h, s and l values, not replace them. The hue is wrapped to keep it within the range 0 to 1. Saturation and lightness are clamped to not exceed 1.

func (*BitmapData) ShiftHSL4O

func (self *BitmapData) ShiftHSL4O(h int, s int, l int, region *Rectangle) *BitmapData

ShiftHSL4O Shifts any or all of the hue, saturation and lightness values on every pixel in the given region, or the whole BitmapData if no region was specified. Shifting will add the given value onto the current h, s and l values, not replace them. The hue is wrapped to keep it within the range 0 to 1. Saturation and lightness are clamped to not exceed 1.

func (*BitmapData) ShiftHSLI

func (self *BitmapData) ShiftHSLI(args ...interface{}) *BitmapData

ShiftHSLI Shifts any or all of the hue, saturation and lightness values on every pixel in the given region, or the whole BitmapData if no region was specified. Shifting will add the given value onto the current h, s and l values, not replace them. The hue is wrapped to keep it within the range 0 to 1. Saturation and lightness are clamped to not exceed 1.

func (*BitmapData) SmoothProperty

func (self *BitmapData) SmoothProperty() string

SmoothProperty The context property needed for smoothing this Canvas.

func (*BitmapData) Text

func (self *BitmapData) Text(text string, x int, y int) *BitmapData

Text Draws text to the BitmapData in the given font and color. The default font is 14px Courier, so useful for quickly drawing debug text. If you need to do a lot of font work to this BitmapData we'd recommend implementing your own text draw method.

func (*BitmapData) Text1O

func (self *BitmapData) Text1O(text string, x int, y int, font string) *BitmapData

Text1O Draws text to the BitmapData in the given font and color. The default font is 14px Courier, so useful for quickly drawing debug text. If you need to do a lot of font work to this BitmapData we'd recommend implementing your own text draw method.

func (*BitmapData) Text2O

func (self *BitmapData) Text2O(text string, x int, y int, font string, color string) *BitmapData

Text2O Draws text to the BitmapData in the given font and color. The default font is 14px Courier, so useful for quickly drawing debug text. If you need to do a lot of font work to this BitmapData we'd recommend implementing your own text draw method.

func (*BitmapData) Text3O

func (self *BitmapData) Text3O(text string, x int, y int, font string, color string, shadow bool) *BitmapData

Text3O Draws text to the BitmapData in the given font and color. The default font is 14px Courier, so useful for quickly drawing debug text. If you need to do a lot of font work to this BitmapData we'd recommend implementing your own text draw method.

func (*BitmapData) TextI

func (self *BitmapData) TextI(args ...interface{}) *BitmapData

TextI Draws text to the BitmapData in the given font and color. The default font is 14px Courier, so useful for quickly drawing debug text. If you need to do a lot of font work to this BitmapData we'd recommend implementing your own text draw method.

func (*BitmapData) Texture

func (self *BitmapData) Texture() *Texture

Texture The PIXI.Texture.

func (*BitmapData) TextureFrame

func (self *BitmapData) TextureFrame() *Frame

TextureFrame The Frame this BitmapData uses for rendering.

func (*BitmapData) TextureLine

func (self *BitmapData) TextureLine(line *Line, image interface{}) *BitmapData

TextureLine Takes the given Line object and image and renders it to this BitmapData as a repeating texture line.

func (*BitmapData) TextureLine1O

func (self *BitmapData) TextureLine1O(line *Line, image interface{}, repeat string) *BitmapData

TextureLine1O Takes the given Line object and image and renders it to this BitmapData as a repeating texture line.

func (*BitmapData) TextureLineI

func (self *BitmapData) TextureLineI(args ...interface{}) *BitmapData

TextureLineI Takes the given Line object and image and renders it to this BitmapData as a repeating texture line.

func (*BitmapData) Type

func (self *BitmapData) Type() int

Type The const type of this object.

func (*BitmapData) Update

func (self *BitmapData) Update() *BitmapData

Update This re-creates the BitmapData.imageData from the current context. It then re-builds the ArrayBuffer, the data Uint8ClampedArray reference and the pixels Int32Array. If not given the dimensions defaults to the full size of the context.

Warning: This is a very expensive operation, so use it sparingly.

func (*BitmapData) Update1O

func (self *BitmapData) Update1O(x int) *BitmapData

Update1O This re-creates the BitmapData.imageData from the current context. It then re-builds the ArrayBuffer, the data Uint8ClampedArray reference and the pixels Int32Array. If not given the dimensions defaults to the full size of the context.

Warning: This is a very expensive operation, so use it sparingly.

func (*BitmapData) Update2O

func (self *BitmapData) Update2O(x int, y int) *BitmapData

Update2O This re-creates the BitmapData.imageData from the current context. It then re-builds the ArrayBuffer, the data Uint8ClampedArray reference and the pixels Int32Array. If not given the dimensions defaults to the full size of the context.

Warning: This is a very expensive operation, so use it sparingly.

func (*BitmapData) Update3O

func (self *BitmapData) Update3O(x int, y int, width int) *BitmapData

Update3O This re-creates the BitmapData.imageData from the current context. It then re-builds the ArrayBuffer, the data Uint8ClampedArray reference and the pixels Int32Array. If not given the dimensions defaults to the full size of the context.

Warning: This is a very expensive operation, so use it sparingly.

func (*BitmapData) Update4O

func (self *BitmapData) Update4O(x int, y int, width int, height int) *BitmapData

Update4O This re-creates the BitmapData.imageData from the current context. It then re-builds the ArrayBuffer, the data Uint8ClampedArray reference and the pixels Int32Array. If not given the dimensions defaults to the full size of the context.

Warning: This is a very expensive operation, so use it sparingly.

func (*BitmapData) UpdateI

func (self *BitmapData) UpdateI(args ...interface{}) *BitmapData

UpdateI This re-creates the BitmapData.imageData from the current context. It then re-builds the ArrayBuffer, the data Uint8ClampedArray reference and the pixels Int32Array. If not given the dimensions defaults to the full size of the context.

Warning: This is a very expensive operation, so use it sparingly.

func (*BitmapData) Width

func (self *BitmapData) Width() int

Width The width of the BitmapData in pixels.

type BitmapFont

type BitmapFont struct{ *js.Object }

type BitmapText

type BitmapText struct {
	*js.Object
}

BitmapText BitmapText objects work by taking a texture file and an XML or JSON file that describes the font structure. It then generates a new Sprite object for each letter of the text, proportionally spaced out and aligned to match the font structure.

BitmapText objects are less flexible than Text objects, in that they have less features such as shadows, fills and the ability to use Web Fonts, however you trade this flexibility for rendering speed. You can also create visually compelling BitmapTexts by processing the font texture in an image editor, applying fills and any other effects required.

To create multi-line text insert \r, \n or \r\n escape codes into the text string.

If you are having performance issues due to the volume of sprites being rendered, and do not require the text to be constantly updating, you can use BitmapText.generateTexture to create a static texture from this BitmapText.

To create a BitmapText data files you can use:

BMFont (Windows, free): http://www.angelcode.com/products/bmfont/ Glyph Designer (OS X, commercial): http://www.71squared.com/en/glyphdesigner Littera (Web-based, free): http://kvazars.com/littera/

For most use cases it is recommended to use XML. If you wish to use JSON, the formatting should be equal to the result of converting a valid XML file through the popular X2JS library. An online tool for conversion can be found here: http://codebeautify.org/xmltojson

If you were using an older version of Phaser (< 2.4) and using the DOMish parser hack, please remove this. It isn't required any longer.

func NewBitmapText

func NewBitmapText(game *Game, x int, y int, font string) *BitmapText

NewBitmapText BitmapText objects work by taking a texture file and an XML or JSON file that describes the font structure. It then generates a new Sprite object for each letter of the text, proportionally spaced out and aligned to match the font structure.

BitmapText objects are less flexible than Text objects, in that they have less features such as shadows, fills and the ability to use Web Fonts, however you trade this flexibility for rendering speed. You can also create visually compelling BitmapTexts by processing the font texture in an image editor, applying fills and any other effects required.

To create multi-line text insert \r, \n or \r\n escape codes into the text string.

If you are having performance issues due to the volume of sprites being rendered, and do not require the text to be constantly updating, you can use BitmapText.generateTexture to create a static texture from this BitmapText.

To create a BitmapText data files you can use:

BMFont (Windows, free): http://www.angelcode.com/products/bmfont/ Glyph Designer (OS X, commercial): http://www.71squared.com/en/glyphdesigner Littera (Web-based, free): http://kvazars.com/littera/

For most use cases it is recommended to use XML. If you wish to use JSON, the formatting should be equal to the result of converting a valid XML file through the popular X2JS library. An online tool for conversion can be found here: http://codebeautify.org/xmltojson

If you were using an older version of Phaser (< 2.4) and using the DOMish parser hack, please remove this. It isn't required any longer.

func NewBitmapText1O

func NewBitmapText1O(game *Game, x int, y int, font string, text string) *BitmapText

NewBitmapText1O BitmapText objects work by taking a texture file and an XML or JSON file that describes the font structure. It then generates a new Sprite object for each letter of the text, proportionally spaced out and aligned to match the font structure.

BitmapText objects are less flexible than Text objects, in that they have less features such as shadows, fills and the ability to use Web Fonts, however you trade this flexibility for rendering speed. You can also create visually compelling BitmapTexts by processing the font texture in an image editor, applying fills and any other effects required.

To create multi-line text insert \r, \n or \r\n escape codes into the text string.

If you are having performance issues due to the volume of sprites being rendered, and do not require the text to be constantly updating, you can use BitmapText.generateTexture to create a static texture from this BitmapText.

To create a BitmapText data files you can use:

BMFont (Windows, free): http://www.angelcode.com/products/bmfont/ Glyph Designer (OS X, commercial): http://www.71squared.com/en/glyphdesigner Littera (Web-based, free): http://kvazars.com/littera/

For most use cases it is recommended to use XML. If you wish to use JSON, the formatting should be equal to the result of converting a valid XML file through the popular X2JS library. An online tool for conversion can be found here: http://codebeautify.org/xmltojson

If you were using an older version of Phaser (< 2.4) and using the DOMish parser hack, please remove this. It isn't required any longer.

func NewBitmapText2O

func NewBitmapText2O(game *Game, x int, y int, font string, text string, size int) *BitmapText

NewBitmapText2O BitmapText objects work by taking a texture file and an XML or JSON file that describes the font structure. It then generates a new Sprite object for each letter of the text, proportionally spaced out and aligned to match the font structure.

BitmapText objects are less flexible than Text objects, in that they have less features such as shadows, fills and the ability to use Web Fonts, however you trade this flexibility for rendering speed. You can also create visually compelling BitmapTexts by processing the font texture in an image editor, applying fills and any other effects required.

To create multi-line text insert \r, \n or \r\n escape codes into the text string.

If you are having performance issues due to the volume of sprites being rendered, and do not require the text to be constantly updating, you can use BitmapText.generateTexture to create a static texture from this BitmapText.

To create a BitmapText data files you can use:

BMFont (Windows, free): http://www.angelcode.com/products/bmfont/ Glyph Designer (OS X, commercial): http://www.71squared.com/en/glyphdesigner Littera (Web-based, free): http://kvazars.com/littera/

For most use cases it is recommended to use XML. If you wish to use JSON, the formatting should be equal to the result of converting a valid XML file through the popular X2JS library. An online tool for conversion can be found here: http://codebeautify.org/xmltojson

If you were using an older version of Phaser (< 2.4) and using the DOMish parser hack, please remove this. It isn't required any longer.

func NewBitmapText3O

func NewBitmapText3O(game *Game, x int, y int, font string, text string, size int, align string) *BitmapText

NewBitmapText3O BitmapText objects work by taking a texture file and an XML or JSON file that describes the font structure. It then generates a new Sprite object for each letter of the text, proportionally spaced out and aligned to match the font structure.

BitmapText objects are less flexible than Text objects, in that they have less features such as shadows, fills and the ability to use Web Fonts, however you trade this flexibility for rendering speed. You can also create visually compelling BitmapTexts by processing the font texture in an image editor, applying fills and any other effects required.

To create multi-line text insert \r, \n or \r\n escape codes into the text string.

If you are having performance issues due to the volume of sprites being rendered, and do not require the text to be constantly updating, you can use BitmapText.generateTexture to create a static texture from this BitmapText.

To create a BitmapText data files you can use:

BMFont (Windows, free): http://www.angelcode.com/products/bmfont/ Glyph Designer (OS X, commercial): http://www.71squared.com/en/glyphdesigner Littera (Web-based, free): http://kvazars.com/littera/

For most use cases it is recommended to use XML. If you wish to use JSON, the formatting should be equal to the result of converting a valid XML file through the popular X2JS library. An online tool for conversion can be found here: http://codebeautify.org/xmltojson

If you were using an older version of Phaser (< 2.4) and using the DOMish parser hack, please remove this. It isn't required any longer.

func NewBitmapTextI

func NewBitmapTextI(args ...interface{}) *BitmapText

NewBitmapTextI BitmapText objects work by taking a texture file and an XML or JSON file that describes the font structure. It then generates a new Sprite object for each letter of the text, proportionally spaced out and aligned to match the font structure.

BitmapText objects are less flexible than Text objects, in that they have less features such as shadows, fills and the ability to use Web Fonts, however you trade this flexibility for rendering speed. You can also create visually compelling BitmapTexts by processing the font texture in an image editor, applying fills and any other effects required.

To create multi-line text insert \r, \n or \r\n escape codes into the text string.

If you are having performance issues due to the volume of sprites being rendered, and do not require the text to be constantly updating, you can use BitmapText.generateTexture to create a static texture from this BitmapText.

To create a BitmapText data files you can use:

BMFont (Windows, free): http://www.angelcode.com/products/bmfont/ Glyph Designer (OS X, commercial): http://www.71squared.com/en/glyphdesigner Littera (Web-based, free): http://kvazars.com/littera/

For most use cases it is recommended to use XML. If you wish to use JSON, the formatting should be equal to the result of converting a valid XML file through the popular X2JS library. An online tool for conversion can be found here: http://codebeautify.org/xmltojson

If you were using an older version of Phaser (< 2.4) and using the DOMish parser hack, please remove this. It isn't required any longer.

func ToBitmapText

func ToBitmapText(jsStruct interface{}) *BitmapText

BitmapText Binding conversion method to BitmapText point

func (*BitmapText) AddChild

func (self *BitmapText) AddChild(child *DisplayObject) *DisplayObject

AddChild Adds a child to the container.

func (*BitmapText) AddChildAt

func (self *BitmapText) AddChildAt(child *DisplayObject, index int) *DisplayObject

AddChildAt Adds a child to the container at a specified index. If the index is out of bounds an error will be thrown

func (*BitmapText) AddChildAtI

func (self *BitmapText) AddChildAtI(args ...interface{}) *DisplayObject

AddChildAtI Adds a child to the container at a specified index. If the index is out of bounds an error will be thrown

func (*BitmapText) AddChildI

func (self *BitmapText) AddChildI(args ...interface{}) *DisplayObject

AddChildI Adds a child to the container.

func (*BitmapText) Align

func (self *BitmapText) Align() string

Align Alignment for multi-line text ('left', 'center' or 'right'), does not affect single lines of text.

func (*BitmapText) AlignIn

func (self *BitmapText) AlignIn(container interface{}) interface{}

AlignIn Aligns this Game Object within another Game Object, or Rectangle, known as the 'container', to one of 9 possible positions.

The container must be a Game Object, or Phaser.Rectangle object. This can include properties such as `World.bounds` or `Camera.view`, for aligning Game Objects within the world and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText, TileSprites or Buttons.

Please note that aligning a Sprite to another Game Object does **not** make it a child of the container. It simply modifies its position coordinates so it aligns with it.

The position constants you can use are:

`Phaser.TOP_LEFT`, `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

The Game Objects are placed in such a way that their _bounds_ align with the container, taking into consideration rotation, scale and the anchor property. This allows you to neatly align Game Objects, irrespective of their position value.

The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final aligned position of the Game Object. For example:

`sprite.alignIn(background, Phaser.BOTTOM_RIGHT, -20, -20)`

Would align the `sprite` to the bottom-right, but moved 20 pixels in from the corner. Think of the offsets as applying an adjustment to the containers bounds before the alignment takes place. So providing a negative offset will 'shrink' the container bounds by that amount, and providing a positive one expands it.

func (*BitmapText) AlignIn1O

func (self *BitmapText) AlignIn1O(container interface{}, position int) interface{}

AlignIn1O Aligns this Game Object within another Game Object, or Rectangle, known as the 'container', to one of 9 possible positions.

The container must be a Game Object, or Phaser.Rectangle object. This can include properties such as `World.bounds` or `Camera.view`, for aligning Game Objects within the world and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText, TileSprites or Buttons.

Please note that aligning a Sprite to another Game Object does **not** make it a child of the container. It simply modifies its position coordinates so it aligns with it.

The position constants you can use are:

`Phaser.TOP_LEFT`, `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

The Game Objects are placed in such a way that their _bounds_ align with the container, taking into consideration rotation, scale and the anchor property. This allows you to neatly align Game Objects, irrespective of their position value.

The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final aligned position of the Game Object. For example:

`sprite.alignIn(background, Phaser.BOTTOM_RIGHT, -20, -20)`

Would align the `sprite` to the bottom-right, but moved 20 pixels in from the corner. Think of the offsets as applying an adjustment to the containers bounds before the alignment takes place. So providing a negative offset will 'shrink' the container bounds by that amount, and providing a positive one expands it.

func (*BitmapText) AlignIn2O

func (self *BitmapText) AlignIn2O(container interface{}, position int, offsetX int) interface{}

AlignIn2O Aligns this Game Object within another Game Object, or Rectangle, known as the 'container', to one of 9 possible positions.

The container must be a Game Object, or Phaser.Rectangle object. This can include properties such as `World.bounds` or `Camera.view`, for aligning Game Objects within the world and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText, TileSprites or Buttons.

Please note that aligning a Sprite to another Game Object does **not** make it a child of the container. It simply modifies its position coordinates so it aligns with it.

The position constants you can use are:

`Phaser.TOP_LEFT`, `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

The Game Objects are placed in such a way that their _bounds_ align with the container, taking into consideration rotation, scale and the anchor property. This allows you to neatly align Game Objects, irrespective of their position value.

The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final aligned position of the Game Object. For example:

`sprite.alignIn(background, Phaser.BOTTOM_RIGHT, -20, -20)`

Would align the `sprite` to the bottom-right, but moved 20 pixels in from the corner. Think of the offsets as applying an adjustment to the containers bounds before the alignment takes place. So providing a negative offset will 'shrink' the container bounds by that amount, and providing a positive one expands it.

func (*BitmapText) AlignIn3O

func (self *BitmapText) AlignIn3O(container interface{}, position int, offsetX int, offsetY int) interface{}

AlignIn3O Aligns this Game Object within another Game Object, or Rectangle, known as the 'container', to one of 9 possible positions.

The container must be a Game Object, or Phaser.Rectangle object. This can include properties such as `World.bounds` or `Camera.view`, for aligning Game Objects within the world and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText, TileSprites or Buttons.

Please note that aligning a Sprite to another Game Object does **not** make it a child of the container. It simply modifies its position coordinates so it aligns with it.

The position constants you can use are:

`Phaser.TOP_LEFT`, `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

The Game Objects are placed in such a way that their _bounds_ align with the container, taking into consideration rotation, scale and the anchor property. This allows you to neatly align Game Objects, irrespective of their position value.

The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final aligned position of the Game Object. For example:

`sprite.alignIn(background, Phaser.BOTTOM_RIGHT, -20, -20)`

Would align the `sprite` to the bottom-right, but moved 20 pixels in from the corner. Think of the offsets as applying an adjustment to the containers bounds before the alignment takes place. So providing a negative offset will 'shrink' the container bounds by that amount, and providing a positive one expands it.

func (*BitmapText) AlignInI

func (self *BitmapText) AlignInI(args ...interface{}) interface{}

AlignInI Aligns this Game Object within another Game Object, or Rectangle, known as the 'container', to one of 9 possible positions.

The container must be a Game Object, or Phaser.Rectangle object. This can include properties such as `World.bounds` or `Camera.view`, for aligning Game Objects within the world and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText, TileSprites or Buttons.

Please note that aligning a Sprite to another Game Object does **not** make it a child of the container. It simply modifies its position coordinates so it aligns with it.

The position constants you can use are:

`Phaser.TOP_LEFT`, `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

The Game Objects are placed in such a way that their _bounds_ align with the container, taking into consideration rotation, scale and the anchor property. This allows you to neatly align Game Objects, irrespective of their position value.

The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final aligned position of the Game Object. For example:

`sprite.alignIn(background, Phaser.BOTTOM_RIGHT, -20, -20)`

Would align the `sprite` to the bottom-right, but moved 20 pixels in from the corner. Think of the offsets as applying an adjustment to the containers bounds before the alignment takes place. So providing a negative offset will 'shrink' the container bounds by that amount, and providing a positive one expands it.

func (*BitmapText) AlignTo

func (self *BitmapText) AlignTo(parent interface{}) interface{}

AlignTo Aligns this Game Object to the side of another Game Object, or Rectangle, known as the 'parent', in one of 11 possible positions.

The parent must be a Game Object, or Phaser.Rectangle object. This can include properties such as `World.bounds` or `Camera.view`, for aligning Game Objects within the world and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText, TileSprites or Buttons.

Please note that aligning a Sprite to another Game Object does **not** make it a child of the parent. It simply modifies its position coordinates so it aligns with it.

The position constants you can use are:

`Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_TOP`, `Phaser.LEFT_CENTER`, `Phaser.LEFT_BOTTOM`, `Phaser.RIGHT_TOP`, `Phaser.RIGHT_CENTER`, `Phaser.RIGHT_BOTTOM`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

The Game Objects are placed in such a way that their _bounds_ align with the parent, taking into consideration rotation, scale and the anchor property. This allows you to neatly align Game Objects, irrespective of their position value.

The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final aligned position of the Game Object. For example:

`sprite.alignTo(background, Phaser.BOTTOM_RIGHT, -20, -20)`

Would align the `sprite` to the bottom-right, but moved 20 pixels in from the corner. Think of the offsets as applying an adjustment to the parents bounds before the alignment takes place. So providing a negative offset will 'shrink' the parent bounds by that amount, and providing a positive one expands it.

func (*BitmapText) AlignTo1O

func (self *BitmapText) AlignTo1O(parent interface{}, position int) interface{}

AlignTo1O Aligns this Game Object to the side of another Game Object, or Rectangle, known as the 'parent', in one of 11 possible positions.

The parent must be a Game Object, or Phaser.Rectangle object. This can include properties such as `World.bounds` or `Camera.view`, for aligning Game Objects within the world and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText, TileSprites or Buttons.

Please note that aligning a Sprite to another Game Object does **not** make it a child of the parent. It simply modifies its position coordinates so it aligns with it.

The position constants you can use are:

`Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_TOP`, `Phaser.LEFT_CENTER`, `Phaser.LEFT_BOTTOM`, `Phaser.RIGHT_TOP`, `Phaser.RIGHT_CENTER`, `Phaser.RIGHT_BOTTOM`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

The Game Objects are placed in such a way that their _bounds_ align with the parent, taking into consideration rotation, scale and the anchor property. This allows you to neatly align Game Objects, irrespective of their position value.

The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final aligned position of the Game Object. For example:

`sprite.alignTo(background, Phaser.BOTTOM_RIGHT, -20, -20)`

Would align the `sprite` to the bottom-right, but moved 20 pixels in from the corner. Think of the offsets as applying an adjustment to the parents bounds before the alignment takes place. So providing a negative offset will 'shrink' the parent bounds by that amount, and providing a positive one expands it.

func (*BitmapText) AlignTo2O

func (self *BitmapText) AlignTo2O(parent interface{}, position int, offsetX int) interface{}

AlignTo2O Aligns this Game Object to the side of another Game Object, or Rectangle, known as the 'parent', in one of 11 possible positions.

The parent must be a Game Object, or Phaser.Rectangle object. This can include properties such as `World.bounds` or `Camera.view`, for aligning Game Objects within the world and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText, TileSprites or Buttons.

Please note that aligning a Sprite to another Game Object does **not** make it a child of the parent. It simply modifies its position coordinates so it aligns with it.

The position constants you can use are:

`Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_TOP`, `Phaser.LEFT_CENTER`, `Phaser.LEFT_BOTTOM`, `Phaser.RIGHT_TOP`, `Phaser.RIGHT_CENTER`, `Phaser.RIGHT_BOTTOM`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

The Game Objects are placed in such a way that their _bounds_ align with the parent, taking into consideration rotation, scale and the anchor property. This allows you to neatly align Game Objects, irrespective of their position value.

The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final aligned position of the Game Object. For example:

`sprite.alignTo(background, Phaser.BOTTOM_RIGHT, -20, -20)`

Would align the `sprite` to the bottom-right, but moved 20 pixels in from the corner. Think of the offsets as applying an adjustment to the parents bounds before the alignment takes place. So providing a negative offset will 'shrink' the parent bounds by that amount, and providing a positive one expands it.

func (*BitmapText) AlignTo3O

func (self *BitmapText) AlignTo3O(parent interface{}, position int, offsetX int, offsetY int) interface{}

AlignTo3O Aligns this Game Object to the side of another Game Object, or Rectangle, known as the 'parent', in one of 11 possible positions.

The parent must be a Game Object, or Phaser.Rectangle object. This can include properties such as `World.bounds` or `Camera.view`, for aligning Game Objects within the world and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText, TileSprites or Buttons.

Please note that aligning a Sprite to another Game Object does **not** make it a child of the parent. It simply modifies its position coordinates so it aligns with it.

The position constants you can use are:

`Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_TOP`, `Phaser.LEFT_CENTER`, `Phaser.LEFT_BOTTOM`, `Phaser.RIGHT_TOP`, `Phaser.RIGHT_CENTER`, `Phaser.RIGHT_BOTTOM`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

The Game Objects are placed in such a way that their _bounds_ align with the parent, taking into consideration rotation, scale and the anchor property. This allows you to neatly align Game Objects, irrespective of their position value.

The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final aligned position of the Game Object. For example:

`sprite.alignTo(background, Phaser.BOTTOM_RIGHT, -20, -20)`

Would align the `sprite` to the bottom-right, but moved 20 pixels in from the corner. Think of the offsets as applying an adjustment to the parents bounds before the alignment takes place. So providing a negative offset will 'shrink' the parent bounds by that amount, and providing a positive one expands it.

func (*BitmapText) AlignToI

func (self *BitmapText) AlignToI(args ...interface{}) interface{}

AlignToI Aligns this Game Object to the side of another Game Object, or Rectangle, known as the 'parent', in one of 11 possible positions.

The parent must be a Game Object, or Phaser.Rectangle object. This can include properties such as `World.bounds` or `Camera.view`, for aligning Game Objects within the world and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText, TileSprites or Buttons.

Please note that aligning a Sprite to another Game Object does **not** make it a child of the parent. It simply modifies its position coordinates so it aligns with it.

The position constants you can use are:

`Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_TOP`, `Phaser.LEFT_CENTER`, `Phaser.LEFT_BOTTOM`, `Phaser.RIGHT_TOP`, `Phaser.RIGHT_CENTER`, `Phaser.RIGHT_BOTTOM`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

The Game Objects are placed in such a way that their _bounds_ align with the parent, taking into consideration rotation, scale and the anchor property. This allows you to neatly align Game Objects, irrespective of their position value.

The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final aligned position of the Game Object. For example:

`sprite.alignTo(background, Phaser.BOTTOM_RIGHT, -20, -20)`

Would align the `sprite` to the bottom-right, but moved 20 pixels in from the corner. Think of the offsets as applying an adjustment to the parents bounds before the alignment takes place. So providing a negative offset will 'shrink' the parent bounds by that amount, and providing a positive one expands it.

func (*BitmapText) Alive

func (self *BitmapText) Alive() bool

Alive A useful flag to control if the Game Object is alive or dead.

This is set automatically by the Health components `damage` method should the object run out of health. Or you can toggle it via your game code.

This property is mostly just provided to be used by your game - it doesn't effect rendering or logic updates. However you can use `Group.getFirstAlive` in conjunction with this property for fast object pooling and recycling.

func (*BitmapText) Anchor

func (self *BitmapText) Anchor() *Point

Anchor The anchor value of this BitmapText.

func (*BitmapText) Angle

func (self *BitmapText) Angle() int

Angle The angle property is the rotation of the Game Object in *degrees* from its original orientation.

Values from 0 to 180 represent clockwise rotation; values from 0 to -180 represent counterclockwise rotation.

Values outside this range are added to or subtracted from 360 to obtain a value within the range. For example, the statement player.angle = 450 is the same as player.angle = 90.

If you wish to work in radians instead of degrees you can use the property `rotation` instead. Working in radians is slightly faster as it doesn't have to perform any calculations.

func (*BitmapText) Animations

func (self *BitmapText) Animations() *AnimationManager

Animations If the Game Object is enabled for animation (such as a Phaser.Sprite) this is a reference to its AnimationManager instance. Through it you can create, play, pause and stop animations.

func (*BitmapText) AutoCull

func (self *BitmapText) AutoCull() bool

AutoCull A Game Object with `autoCull` set to true will check its bounds against the World Camera every frame. If it is not intersecting the Camera bounds at any point then it has its `renderable` property set to `false`. This keeps the Game Object alive and still processing updates, but forces it to skip the render step entirely.

This is a relatively expensive operation, especially if enabled on hundreds of Game Objects. So enable it only if you know it's required, or you have tested performance and find it acceptable.

func (*BitmapText) Body

func (self *BitmapText) Body() interface{}

Body `body` is the Game Objects physics body. Once a Game Object is enabled for physics you access all associated properties and methods via it.

By default Game Objects won't add themselves to any physics system and their `body` property will be `null`.

To enable this Game Object for physics you need to call `game.physics.enable(object, system)` where `object` is this object and `system` is the Physics system you are using. If none is given it defaults to `Phaser.Physics.Arcade`.

You can alternatively call `game.physics.arcade.enable(object)`, or add this Game Object to a physics enabled Group.

Important: Enabling a Game Object for P2 or Ninja physics will automatically set its `anchor` property to 0.5, so the physics body is centered on the Game Object.

If you need a different result then adjust or re-create the Body shape offsets manually or reset the anchor after enabling physics.

func (*BitmapText) Bottom

func (self *BitmapText) Bottom() int

Bottom The sum of the y and height properties. This is the same as `y + height - offsetY`.

func (*BitmapText) CameraOffset

func (self *BitmapText) CameraOffset() *Point

CameraOffset The x/y coordinate offset applied to the top-left of the camera that this Game Object will be drawn at if `fixedToCamera` is true.

The values are relative to the top-left of the camera view and in addition to any parent of the Game Object on the display list.

func (*BitmapText) CenterX

func (self *BitmapText) CenterX() int

CenterX The center x coordinate of the Game Object. This is the same as `(x - offsetX) + (width / 2)`.

func (*BitmapText) CenterY

func (self *BitmapText) CenterY() int

CenterY The center y coordinate of the Game Object. This is the same as `(y - offsetY) + (height / 2)`.

func (*BitmapText) CheckWorldBounds

func (self *BitmapText) CheckWorldBounds() bool

CheckWorldBounds If this is set to `true` the Game Object checks if it is within the World bounds each frame.

When it is no longer intersecting the world bounds it dispatches the `onOutOfBounds` event.

If it was *previously* out of bounds but is now intersecting the world bounds again it dispatches the `onEnterBounds` event.

It also optionally kills the Game Object if `outOfBoundsKill` is `true`.

When `checkWorldBounds` is enabled it forces the Game Object to calculate its full bounds every frame.

This is a relatively expensive operation, especially if enabled on hundreds of Game Objects. So enable it only if you know it's required, or you have tested performance and find it acceptable.

func (*BitmapText) Children

func (self *BitmapText) Children() []DisplayObject

Children [read-only] The array of children of this container.

func (*BitmapText) CleanText

func (self *BitmapText) CleanText(text string) string

CleanText Given a text string this will scan each character in the string to ensure it exists in the BitmapText font data. If it doesn't the character is removed, or replaced with the `replace` argument.

If no font data has been loaded at all this returns an empty string, as nothing can be rendered.

func (*BitmapText) CleanText1O

func (self *BitmapText) CleanText1O(text string, replace string) string

CleanText1O Given a text string this will scan each character in the string to ensure it exists in the BitmapText font data. If it doesn't the character is removed, or replaced with the `replace` argument.

If no font data has been loaded at all this returns an empty string, as nothing can be rendered.

func (*BitmapText) CleanTextI

func (self *BitmapText) CleanTextI(args ...interface{}) string

CleanTextI Given a text string this will scan each character in the string to ensure it exists in the BitmapText font data. If it doesn't the character is removed, or replaced with the `replace` argument.

If no font data has been loaded at all this returns an empty string, as nothing can be rendered.

func (*BitmapText) Components

func (self *BitmapText) Components() interface{}

Components The components this Game Object has installed.

func (*BitmapText) Contains

func (self *BitmapText) Contains(child *DisplayObject) bool

Contains Determines whether the specified display object is a child of the DisplayObjectContainer instance or the instance itself.

func (*BitmapText) ContainsI

func (self *BitmapText) ContainsI(args ...interface{}) bool

ContainsI Determines whether the specified display object is a child of the DisplayObjectContainer instance or the instance itself.

func (*BitmapText) Data

func (self *BitmapText) Data() interface{}

Data An empty Object that belongs to this Game Object. This value isn't ever used internally by Phaser, but may be used by your own code, or by Phaser Plugins, to store data that needs to be associated with the Game Object, without polluting the Game Object directly.

func (*BitmapText) Debug

func (self *BitmapText) Debug() bool

Debug A debug flag designed for use with `Game.enableStep`.

func (*BitmapText) Destroy

func (self *BitmapText) Destroy()

Destroy Destroys the Game Object. This removes it from its parent group, destroys the input, event and animation handlers if present and nulls its reference to `game`, freeing it up for garbage collection.

If this Game Object has the Events component it will also dispatch the `onDestroy` event.

You can optionally also destroy the BaseTexture this Game Object is using. Be careful if you've more than one Game Object sharing the same BaseTexture.

func (*BitmapText) Destroy1O

func (self *BitmapText) Destroy1O(destroyChildren bool)

Destroy1O Destroys the Game Object. This removes it from its parent group, destroys the input, event and animation handlers if present and nulls its reference to `game`, freeing it up for garbage collection.

If this Game Object has the Events component it will also dispatch the `onDestroy` event.

You can optionally also destroy the BaseTexture this Game Object is using. Be careful if you've more than one Game Object sharing the same BaseTexture.

func (*BitmapText) Destroy2O

func (self *BitmapText) Destroy2O(destroyChildren bool, destroyTexture bool)

Destroy2O Destroys the Game Object. This removes it from its parent group, destroys the input, event and animation handlers if present and nulls its reference to `game`, freeing it up for garbage collection.

If this Game Object has the Events component it will also dispatch the `onDestroy` event.

You can optionally also destroy the BaseTexture this Game Object is using. Be careful if you've more than one Game Object sharing the same BaseTexture.

func (*BitmapText) DestroyI

func (self *BitmapText) DestroyI(args ...interface{})

DestroyI Destroys the Game Object. This removes it from its parent group, destroys the input, event and animation handlers if present and nulls its reference to `game`, freeing it up for garbage collection.

If this Game Object has the Events component it will also dispatch the `onDestroy` event.

You can optionally also destroy the BaseTexture this Game Object is using. Be careful if you've more than one Game Object sharing the same BaseTexture.

func (*BitmapText) DestroyPhase

func (self *BitmapText) DestroyPhase() bool

DestroyPhase As a Game Object runs through its destroy method this flag is set to true, and can be checked in any sub-systems or plugins it is being destroyed from.

func (*BitmapText) Dirty

func (self *BitmapText) Dirty() bool

Dirty The dirty state of this object.

func (*BitmapText) Events

func (self *BitmapText) Events() *Events

Events All Phaser Game Objects have an Events class which contains all of the events that are dispatched when certain things happen to this Game Object, or any of its components.

func (*BitmapText) Exists

func (self *BitmapText) Exists() bool

Exists Controls if this Game Object is processed by the core game loop. If this Game Object has a physics body it also controls if its physics body is updated or not. When `exists` is set to `false` it will remove its physics body from the physics world if it has one. It also toggles the `visible` property to false as well.

Setting `exists` to true will add its physics body back in to the physics world, if it has one. It will also set the `visible` property to `true`.

func (*BitmapText) FixedToCamera

func (self *BitmapText) FixedToCamera() bool

FixedToCamera A Game Object that is "fixed" to the camera uses its x/y coordinates as offsets from the top left of the camera during rendering.

The values are adjusted at the rendering stage, overriding the Game Objects actual world position.

The end result is that the Game Object will appear to be 'fixed' to the camera, regardless of where in the game world the camera is viewing. This is useful if for example this Game Object is a UI item that you wish to be visible at all times regardless where in the world the camera is.

The offsets are stored in the `cameraOffset` property.

Note that the `cameraOffset` values are in addition to any parent of this Game Object on the display list.

Be careful not to set `fixedToCamera` on Game Objects which are in Groups that already have `fixedToCamera` enabled on them.

func (*BitmapText) Font

func (self *BitmapText) Font() string

Font The font the text will be rendered in, i.e. 'Arial'. Must be loaded in the browser before use.

func (*BitmapText) FontSize

func (self *BitmapText) FontSize() int

FontSize The size of the font in pixels.

func (*BitmapText) Fresh

func (self *BitmapText) Fresh() bool

Fresh A Game Object is considered `fresh` if it has just been created or reset and is yet to receive a renderer transform update. This property is mostly used internally by the physics systems, but is exposed for the use of plugins.

func (*BitmapText) Game

func (self *BitmapText) Game() *Game

Game A reference to the currently running Game.

func (*BitmapText) GetBounds

func (self *BitmapText) GetBounds() *Rectangle

GetBounds Retrieves the global bounds of the displayObjectContainer as a rectangle. The bounds calculation takes all visible children into consideration.

func (*BitmapText) GetBounds1O

func (self *BitmapText) GetBounds1O(targetCoordinateSpace interface{}) *Rectangle

GetBounds1O Retrieves the global bounds of the displayObjectContainer as a rectangle. The bounds calculation takes all visible children into consideration.

func (*BitmapText) GetBoundsI

func (self *BitmapText) GetBoundsI(args ...interface{}) *Rectangle

GetBoundsI Retrieves the global bounds of the displayObjectContainer as a rectangle. The bounds calculation takes all visible children into consideration.

func (*BitmapText) GetChildAt

func (self *BitmapText) GetChildAt(index int) *DisplayObject

GetChildAt Returns the child at the specified index

func (*BitmapText) GetChildAtI

func (self *BitmapText) GetChildAtI(args ...interface{}) *DisplayObject

GetChildAtI Returns the child at the specified index

func (*BitmapText) GetChildIndex

func (self *BitmapText) GetChildIndex(child *DisplayObject) int

GetChildIndex Returns the index position of a child DisplayObject instance

func (*BitmapText) GetChildIndexI

func (self *BitmapText) GetChildIndexI(args ...interface{}) int

GetChildIndexI Returns the index position of a child DisplayObject instance

func (*BitmapText) GetLocalBounds

func (self *BitmapText) GetLocalBounds() *Rectangle

GetLocalBounds Retrieves the non-global local bounds of the displayObjectContainer as a rectangle without any transformations. The calculation takes all visible children into consideration.

func (*BitmapText) GetLocalBoundsI

func (self *BitmapText) GetLocalBoundsI(args ...interface{}) *Rectangle

GetLocalBoundsI Retrieves the non-global local bounds of the displayObjectContainer as a rectangle without any transformations. The calculation takes all visible children into consideration.

func (*BitmapText) Height

func (self *BitmapText) Height() int

Height The height of the displayObjectContainer, setting this will actually modify the scale to achieve the value set

func (*BitmapText) IgnoreChildInput

func (self *BitmapText) IgnoreChildInput() bool

IgnoreChildInput If `ignoreChildInput` is `false` it will allow this objects _children_ to be considered as valid for Input events.

If this property is `true` then the children will _not_ be considered as valid for Input events.

Note that this property isn't recursive: only immediate children are influenced, it doesn't scan further down.

func (*BitmapText) InCamera

func (self *BitmapText) InCamera() bool

InCamera Checks if the Game Objects bounds intersect with the Game Camera bounds. Returns `true` if they do, otherwise `false` if fully outside of the Cameras bounds.

func (*BitmapText) InWorld

func (self *BitmapText) InWorld() bool

InWorld Checks if the Game Objects bounds are within, or intersect at any point with the Game World bounds.

func (*BitmapText) Input

func (self *BitmapText) Input() interface{}

Input The Input Handler for this Game Object.

By default it is disabled. If you wish this Game Object to process input events you should enable it with: `inputEnabled = true`.

After you have done this, this property will be a reference to the Phaser InputHandler.

func (*BitmapText) InputEnabled

func (self *BitmapText) InputEnabled() bool

InputEnabled By default a Game Object won't process any input events. By setting `inputEnabled` to true a Phaser.InputHandler is created for this Game Object and it will then start to process click / touch events and more.

You can then access the Input Handler via `this.input`.

Note that Input related events are dispatched from `this.events`, i.e.: `events.onInputDown`.

If you set this property to false it will stop the Input Handler from processing any more input events.

If you want to _temporarily_ disable input for a Game Object, then it's better to set `input.enabled = false`, as it won't reset any of the Input Handlers internal properties. You can then toggle this back on as needed.

func (*BitmapText) Key

func (self *BitmapText) Key() interface{}

Key The key of the image or texture used by this Game Object during rendering. If it is a string it's the string used to retrieve the texture from the Phaser Image Cache. It can also be an instance of a RenderTexture, BitmapData, Video or PIXI.Texture. If a Game Object is created without a key it is automatically assigned the key `__default` which is a 32x32 transparent PNG stored within the Cache. If a Game Object is given a key which doesn't exist in the Image Cache it is re-assigned the key `__missing` which is a 32x32 PNG of a green box with a line through it.

func (*BitmapText) Kill

func (self *BitmapText) Kill() *DisplayObject

Kill Kills a Game Object. A killed Game Object has its `alive`, `exists` and `visible` properties all set to false.

It will dispatch the `onKilled` event. You can listen to `events.onKilled` for the signal.

Note that killing a Game Object is a way for you to quickly recycle it in an object pool, it doesn't destroy the object or free it up from memory.

If you don't need this Game Object any more you should call `destroy` instead.

func (*BitmapText) KillI

func (self *BitmapText) KillI(args ...interface{}) *DisplayObject

KillI Kills a Game Object. A killed Game Object has its `alive`, `exists` and `visible` properties all set to false.

It will dispatch the `onKilled` event. You can listen to `events.onKilled` for the signal.

Note that killing a Game Object is a way for you to quickly recycle it in an object pool, it doesn't destroy the object or free it up from memory.

If you don't need this Game Object any more you should call `destroy` instead.

func (*BitmapText) Left

func (self *BitmapText) Left() int

Left The left coordinate of the Game Object. This is the same as `x - offsetX`.

func (*BitmapText) Lifespan

func (self *BitmapText) Lifespan() int

Lifespan The lifespan allows you to give a Game Object a lifespan in milliseconds.

Once the Game Object is 'born' you can set this to a positive value.

It is automatically decremented by the millisecond equivalent of `game.time.physicsElapsed` each frame. When it reaches zero it will call the `kill` method.

Very handy for particles, bullets, collectibles, or any other short-lived entity.

func (*BitmapText) MaxWidth

func (self *BitmapText) MaxWidth() int

MaxWidth The maximum display width of this BitmapText in pixels.

If BitmapText.text is longer than maxWidth then the lines will be automatically wrapped based on the last whitespace character found in the line.

If no whitespace was found then no wrapping will take place and consequently the maxWidth value will not be honored.

Disable maxWidth by setting the value to 0. The maximum width of this BitmapText in pixels.

func (*BitmapText) Name

func (self *BitmapText) Name() string

Name A user defined name given to this Game Object. This value isn't ever used internally by Phaser, it is meant as a game level property.

func (*BitmapText) OffsetX

func (self *BitmapText) OffsetX() int

OffsetX The amount the Game Object is visually offset from its x coordinate. This is the same as `width * anchor.x`. It will only be > 0 if anchor.x is not equal to zero.

func (*BitmapText) OffsetY

func (self *BitmapText) OffsetY() int

OffsetY The amount the Game Object is visually offset from its y coordinate. This is the same as `height * anchor.y`. It will only be > 0 if anchor.y is not equal to zero.

func (*BitmapText) OutOfBoundsKill

func (self *BitmapText) OutOfBoundsKill() bool

OutOfBoundsKill If this and the `checkWorldBounds` property are both set to `true` then the `kill` method is called as soon as `inWorld` returns false.

func (*BitmapText) OutOfCameraBoundsKill

func (self *BitmapText) OutOfCameraBoundsKill() bool

OutOfCameraBoundsKill If this and the `autoCull` property are both set to `true`, then the `kill` method is called as soon as the Game Object leaves the camera bounds.

func (*BitmapText) PendingDestroy

func (self *BitmapText) PendingDestroy() bool

PendingDestroy A Game Object is that is pendingDestroy is flagged to have its destroy method called on the next logic update. You can set it directly to allow you to flag an object to be destroyed on its next update.

This is extremely useful if you wish to destroy an object from within one of its own callbacks such as with Buttons or other Input events.

func (*BitmapText) PhysicsType

func (self *BitmapText) PhysicsType() int

PhysicsType The const physics body type of this object.

func (*BitmapText) PostUpdate

func (self *BitmapText) PostUpdate()

PostUpdate Automatically called by World.preUpdate.

func (*BitmapText) PostUpdateI

func (self *BitmapText) PostUpdateI(args ...interface{})

PostUpdateI Automatically called by World.preUpdate.

func (*BitmapText) PreUpdate

func (self *BitmapText) PreUpdate() bool

PreUpdate Automatically called by World.preUpdate.

func (*BitmapText) PreUpdateI

func (self *BitmapText) PreUpdateI(args ...interface{}) bool

PreUpdateI Automatically called by World.preUpdate.

func (*BitmapText) PreviousPosition

func (self *BitmapText) PreviousPosition() *Point

PreviousPosition The position the Game Object was located in the previous frame.

func (*BitmapText) PreviousRotation

func (self *BitmapText) PreviousRotation() int

PreviousRotation The rotation the Game Object was in set to in the previous frame. Value is in radians.

func (*BitmapText) PurgeGlyphs

func (self *BitmapText) PurgeGlyphs() int

PurgeGlyphs If a BitmapText changes from having a large number of characters to having very few characters it will cause lots of Sprites to be retained in the BitmapText._glyphs array. Although they are not attached to the display list they still take up memory while sat in the glyphs pool waiting to be re-used in the future.

If you know that the BitmapText will not grow any larger then you can purge out the excess glyphs from the pool by calling this method.

Calling this doesn't prevent you from increasing the length of the text again in the future.

func (*BitmapText) PurgeGlyphsI

func (self *BitmapText) PurgeGlyphsI(args ...interface{}) int

PurgeGlyphsI If a BitmapText changes from having a large number of characters to having very few characters it will cause lots of Sprites to be retained in the BitmapText._glyphs array. Although they are not attached to the display list they still take up memory while sat in the glyphs pool waiting to be re-used in the future.

If you know that the BitmapText will not grow any larger then you can purge out the excess glyphs from the pool by calling this method.

Calling this doesn't prevent you from increasing the length of the text again in the future.

func (*BitmapText) RemoveChild

func (self *BitmapText) RemoveChild(child *DisplayObject) *DisplayObject

RemoveChild Removes a child from the container.

func (*BitmapText) RemoveChildAt

func (self *BitmapText) RemoveChildAt(index int) *DisplayObject

RemoveChildAt Removes a child from the specified index position.

func (*BitmapText) RemoveChildAtI

func (self *BitmapText) RemoveChildAtI(args ...interface{}) *DisplayObject

RemoveChildAtI Removes a child from the specified index position.

func (*BitmapText) RemoveChildI

func (self *BitmapText) RemoveChildI(args ...interface{}) *DisplayObject

RemoveChildI Removes a child from the container.

func (*BitmapText) RemoveChildren

func (self *BitmapText) RemoveChildren(beginIndex int, endIndex int)

RemoveChildren Removes all children from this container that are within the begin and end indexes.

func (*BitmapText) RemoveChildrenI

func (self *BitmapText) RemoveChildrenI(args ...interface{})

RemoveChildrenI Removes all children from this container that are within the begin and end indexes.

func (*BitmapText) RenderOrderID

func (self *BitmapText) RenderOrderID() int

RenderOrderID The render order ID is used internally by the renderer and Input Manager and should not be modified. This property is mostly used internally by the renderers, but is exposed for the use of plugins.

func (*BitmapText) Reset

func (self *BitmapText) Reset(x int, y int) *DisplayObject

Reset Resets the Game Object.

This moves the Game Object to the given x/y world coordinates and sets `fresh`, `exists`, `visible` and `renderable` to true.

If this Game Object has the LifeSpan component it will also set `alive` to true and `health` to the given value.

If this Game Object has a Physics Body it will reset the Body.

func (*BitmapText) Reset1O

func (self *BitmapText) Reset1O(x int, y int, health int) *DisplayObject

Reset1O Resets the Game Object.

This moves the Game Object to the given x/y world coordinates and sets `fresh`, `exists`, `visible` and `renderable` to true.

If this Game Object has the LifeSpan component it will also set `alive` to true and `health` to the given value.

If this Game Object has a Physics Body it will reset the Body.

func (*BitmapText) ResetI

func (self *BitmapText) ResetI(args ...interface{}) *DisplayObject

ResetI Resets the Game Object.

This moves the Game Object to the given x/y world coordinates and sets `fresh`, `exists`, `visible` and `renderable` to true.

If this Game Object has the LifeSpan component it will also set `alive` to true and `health` to the given value.

If this Game Object has a Physics Body it will reset the Body.

func (*BitmapText) Revive

func (self *BitmapText) Revive() *DisplayObject

Revive Brings a 'dead' Game Object back to life, optionally resetting its health value in the process.

A resurrected Game Object has its `alive`, `exists` and `visible` properties all set to true.

It will dispatch the `onRevived` event. Listen to `events.onRevived` for the signal.

func (*BitmapText) Revive1O

func (self *BitmapText) Revive1O(health int) *DisplayObject

Revive1O Brings a 'dead' Game Object back to life, optionally resetting its health value in the process.

A resurrected Game Object has its `alive`, `exists` and `visible` properties all set to true.

It will dispatch the `onRevived` event. Listen to `events.onRevived` for the signal.

func (*BitmapText) ReviveI

func (self *BitmapText) ReviveI(args ...interface{}) *DisplayObject

ReviveI Brings a 'dead' Game Object back to life, optionally resetting its health value in the process.

A resurrected Game Object has its `alive`, `exists` and `visible` properties all set to true.

It will dispatch the `onRevived` event. Listen to `events.onRevived` for the signal.

func (*BitmapText) Right

func (self *BitmapText) Right() int

Right The right coordinate of the Game Object. This is the same as `x + width - offsetX`.

func (*BitmapText) ScanLine

func (self *BitmapText) ScanLine(data interface{}, scale float64, text string) interface{}

ScanLine Given the input text this will scan the characters until either a newline is encountered, or the line exceeds maxWidth, taking into account kerning, character widths and scaling.

func (*BitmapText) ScanLineI

func (self *BitmapText) ScanLineI(args ...interface{}) interface{}

ScanLineI Given the input text this will scan the characters until either a newline is encountered, or the line exceeds maxWidth, taking into account kerning, character widths and scaling.

func (*BitmapText) SetAlignA

func (self *BitmapText) SetAlignA(member string)

SetAlignA Alignment for multi-line text ('left', 'center' or 'right'), does not affect single lines of text.

func (*BitmapText) SetAliveA

func (self *BitmapText) SetAliveA(member bool)

SetAliveA A useful flag to control if the Game Object is alive or dead.

This is set automatically by the Health components `damage` method should the object run out of health. Or you can toggle it via your game code.

This property is mostly just provided to be used by your game - it doesn't effect rendering or logic updates. However you can use `Group.getFirstAlive` in conjunction with this property for fast object pooling and recycling.

func (*BitmapText) SetAnchorA

func (self *BitmapText) SetAnchorA(member *Point)

SetAnchorA The anchor value of this BitmapText.

func (*BitmapText) SetAngleA

func (self *BitmapText) SetAngleA(member int)

SetAngleA The angle property is the rotation of the Game Object in *degrees* from its original orientation.

Values from 0 to 180 represent clockwise rotation; values from 0 to -180 represent counterclockwise rotation.

Values outside this range are added to or subtracted from 360 to obtain a value within the range. For example, the statement player.angle = 450 is the same as player.angle = 90.

If you wish to work in radians instead of degrees you can use the property `rotation` instead. Working in radians is slightly faster as it doesn't have to perform any calculations.

func (*BitmapText) SetAnimationsA

func (self *BitmapText) SetAnimationsA(member *AnimationManager)

SetAnimationsA If the Game Object is enabled for animation (such as a Phaser.Sprite) this is a reference to its AnimationManager instance. Through it you can create, play, pause and stop animations.

func (*BitmapText) SetAutoCullA

func (self *BitmapText) SetAutoCullA(member bool)

SetAutoCullA A Game Object with `autoCull` set to true will check its bounds against the World Camera every frame. If it is not intersecting the Camera bounds at any point then it has its `renderable` property set to `false`. This keeps the Game Object alive and still processing updates, but forces it to skip the render step entirely.

This is a relatively expensive operation, especially if enabled on hundreds of Game Objects. So enable it only if you know it's required, or you have tested performance and find it acceptable.

func (*BitmapText) SetBodyA

func (self *BitmapText) SetBodyA(member interface{})

SetBodyA `body` is the Game Objects physics body. Once a Game Object is enabled for physics you access all associated properties and methods via it.

By default Game Objects won't add themselves to any physics system and their `body` property will be `null`.

To enable this Game Object for physics you need to call `game.physics.enable(object, system)` where `object` is this object and `system` is the Physics system you are using. If none is given it defaults to `Phaser.Physics.Arcade`.

You can alternatively call `game.physics.arcade.enable(object)`, or add this Game Object to a physics enabled Group.

Important: Enabling a Game Object for P2 or Ninja physics will automatically set its `anchor` property to 0.5, so the physics body is centered on the Game Object.

If you need a different result then adjust or re-create the Body shape offsets manually or reset the anchor after enabling physics.

func (*BitmapText) SetBottomA

func (self *BitmapText) SetBottomA(member int)

SetBottomA The sum of the y and height properties. This is the same as `y + height - offsetY`.

func (*BitmapText) SetCameraOffsetA

func (self *BitmapText) SetCameraOffsetA(member *Point)

SetCameraOffsetA The x/y coordinate offset applied to the top-left of the camera that this Game Object will be drawn at if `fixedToCamera` is true.

The values are relative to the top-left of the camera view and in addition to any parent of the Game Object on the display list.

func (*BitmapText) SetCenterXA

func (self *BitmapText) SetCenterXA(member int)

SetCenterXA The center x coordinate of the Game Object. This is the same as `(x - offsetX) + (width / 2)`.

func (*BitmapText) SetCenterYA

func (self *BitmapText) SetCenterYA(member int)

SetCenterYA The center y coordinate of the Game Object. This is the same as `(y - offsetY) + (height / 2)`.

func (*BitmapText) SetCheckWorldBoundsA

func (self *BitmapText) SetCheckWorldBoundsA(member bool)

SetCheckWorldBoundsA If this is set to `true` the Game Object checks if it is within the World bounds each frame.

When it is no longer intersecting the world bounds it dispatches the `onOutOfBounds` event.

If it was *previously* out of bounds but is now intersecting the world bounds again it dispatches the `onEnterBounds` event.

It also optionally kills the Game Object if `outOfBoundsKill` is `true`.

When `checkWorldBounds` is enabled it forces the Game Object to calculate its full bounds every frame.

This is a relatively expensive operation, especially if enabled on hundreds of Game Objects. So enable it only if you know it's required, or you have tested performance and find it acceptable.

func (*BitmapText) SetChildIndex

func (self *BitmapText) SetChildIndex(child *DisplayObject, index int)

SetChildIndex Changes the position of an existing child in the display object container

func (*BitmapText) SetChildIndexI

func (self *BitmapText) SetChildIndexI(args ...interface{})

SetChildIndexI Changes the position of an existing child in the display object container

func (*BitmapText) SetChildrenA

func (self *BitmapText) SetChildrenA(member []DisplayObject)

SetChildrenA [read-only] The array of children of this container.

func (*BitmapText) SetComponentsA

func (self *BitmapText) SetComponentsA(member interface{})

SetComponentsA The components this Game Object has installed.

func (*BitmapText) SetDataA

func (self *BitmapText) SetDataA(member interface{})

SetDataA An empty Object that belongs to this Game Object. This value isn't ever used internally by Phaser, but may be used by your own code, or by Phaser Plugins, to store data that needs to be associated with the Game Object, without polluting the Game Object directly.

func (*BitmapText) SetDebugA

func (self *BitmapText) SetDebugA(member bool)

SetDebugA A debug flag designed for use with `Game.enableStep`.

func (*BitmapText) SetDestroyPhaseA

func (self *BitmapText) SetDestroyPhaseA(member bool)

SetDestroyPhaseA As a Game Object runs through its destroy method this flag is set to true, and can be checked in any sub-systems or plugins it is being destroyed from.

func (*BitmapText) SetDirtyA

func (self *BitmapText) SetDirtyA(member bool)

SetDirtyA The dirty state of this object.

func (*BitmapText) SetEventsA

func (self *BitmapText) SetEventsA(member *Events)

SetEventsA All Phaser Game Objects have an Events class which contains all of the events that are dispatched when certain things happen to this Game Object, or any of its components.

func (*BitmapText) SetExistsA

func (self *BitmapText) SetExistsA(member bool)

SetExistsA Controls if this Game Object is processed by the core game loop. If this Game Object has a physics body it also controls if its physics body is updated or not. When `exists` is set to `false` it will remove its physics body from the physics world if it has one. It also toggles the `visible` property to false as well.

Setting `exists` to true will add its physics body back in to the physics world, if it has one. It will also set the `visible` property to `true`.

func (*BitmapText) SetFixedToCameraA

func (self *BitmapText) SetFixedToCameraA(member bool)

SetFixedToCameraA A Game Object that is "fixed" to the camera uses its x/y coordinates as offsets from the top left of the camera during rendering.

The values are adjusted at the rendering stage, overriding the Game Objects actual world position.

The end result is that the Game Object will appear to be 'fixed' to the camera, regardless of where in the game world the camera is viewing. This is useful if for example this Game Object is a UI item that you wish to be visible at all times regardless where in the world the camera is.

The offsets are stored in the `cameraOffset` property.

Note that the `cameraOffset` values are in addition to any parent of this Game Object on the display list.

Be careful not to set `fixedToCamera` on Game Objects which are in Groups that already have `fixedToCamera` enabled on them.

func (*BitmapText) SetFontA

func (self *BitmapText) SetFontA(member string)

SetFontA The font the text will be rendered in, i.e. 'Arial'. Must be loaded in the browser before use.

func (*BitmapText) SetFontSizeA

func (self *BitmapText) SetFontSizeA(member int)

SetFontSizeA The size of the font in pixels.

func (*BitmapText) SetFreshA

func (self *BitmapText) SetFreshA(member bool)

SetFreshA A Game Object is considered `fresh` if it has just been created or reset and is yet to receive a renderer transform update. This property is mostly used internally by the physics systems, but is exposed for the use of plugins.

func (*BitmapText) SetGameA

func (self *BitmapText) SetGameA(member *Game)

SetGameA A reference to the currently running Game.

func (*BitmapText) SetHeightA

func (self *BitmapText) SetHeightA(member int)

SetHeightA The height of the displayObjectContainer, setting this will actually modify the scale to achieve the value set

func (*BitmapText) SetIgnoreChildInputA

func (self *BitmapText) SetIgnoreChildInputA(member bool)

SetIgnoreChildInputA If `ignoreChildInput` is `false` it will allow this objects _children_ to be considered as valid for Input events.

If this property is `true` then the children will _not_ be considered as valid for Input events.

Note that this property isn't recursive: only immediate children are influenced, it doesn't scan further down.

func (*BitmapText) SetInCameraA

func (self *BitmapText) SetInCameraA(member bool)

SetInCameraA Checks if the Game Objects bounds intersect with the Game Camera bounds. Returns `true` if they do, otherwise `false` if fully outside of the Cameras bounds.

func (*BitmapText) SetInWorldA

func (self *BitmapText) SetInWorldA(member bool)

SetInWorldA Checks if the Game Objects bounds are within, or intersect at any point with the Game World bounds.

func (*BitmapText) SetInputA

func (self *BitmapText) SetInputA(member interface{})

SetInputA The Input Handler for this Game Object.

By default it is disabled. If you wish this Game Object to process input events you should enable it with: `inputEnabled = true`.

After you have done this, this property will be a reference to the Phaser InputHandler.

func (*BitmapText) SetInputEnabledA

func (self *BitmapText) SetInputEnabledA(member bool)

SetInputEnabledA By default a Game Object won't process any input events. By setting `inputEnabled` to true a Phaser.InputHandler is created for this Game Object and it will then start to process click / touch events and more.

You can then access the Input Handler via `this.input`.

Note that Input related events are dispatched from `this.events`, i.e.: `events.onInputDown`.

If you set this property to false it will stop the Input Handler from processing any more input events.

If you want to _temporarily_ disable input for a Game Object, then it's better to set `input.enabled = false`, as it won't reset any of the Input Handlers internal properties. You can then toggle this back on as needed.

func (*BitmapText) SetKeyA

func (self *BitmapText) SetKeyA(member interface{})

SetKeyA The key of the image or texture used by this Game Object during rendering. If it is a string it's the string used to retrieve the texture from the Phaser Image Cache. It can also be an instance of a RenderTexture, BitmapData, Video or PIXI.Texture. If a Game Object is created without a key it is automatically assigned the key `__default` which is a 32x32 transparent PNG stored within the Cache. If a Game Object is given a key which doesn't exist in the Image Cache it is re-assigned the key `__missing` which is a 32x32 PNG of a green box with a line through it.

func (*BitmapText) SetLeftA

func (self *BitmapText) SetLeftA(member int)

SetLeftA The left coordinate of the Game Object. This is the same as `x - offsetX`.

func (*BitmapText) SetLifespanA

func (self *BitmapText) SetLifespanA(member int)

SetLifespanA The lifespan allows you to give a Game Object a lifespan in milliseconds.

Once the Game Object is 'born' you can set this to a positive value.

It is automatically decremented by the millisecond equivalent of `game.time.physicsElapsed` each frame. When it reaches zero it will call the `kill` method.

Very handy for particles, bullets, collectibles, or any other short-lived entity.

func (*BitmapText) SetMaxWidthA

func (self *BitmapText) SetMaxWidthA(member int)

SetMaxWidthA The maximum display width of this BitmapText in pixels.

If BitmapText.text is longer than maxWidth then the lines will be automatically wrapped based on the last whitespace character found in the line.

If no whitespace was found then no wrapping will take place and consequently the maxWidth value will not be honored.

Disable maxWidth by setting the value to 0. The maximum width of this BitmapText in pixels.

func (*BitmapText) SetNameA

func (self *BitmapText) SetNameA(member string)

SetNameA A user defined name given to this Game Object. This value isn't ever used internally by Phaser, it is meant as a game level property.

func (*BitmapText) SetOffsetXA

func (self *BitmapText) SetOffsetXA(member int)

SetOffsetXA The amount the Game Object is visually offset from its x coordinate. This is the same as `width * anchor.x`. It will only be > 0 if anchor.x is not equal to zero.

func (*BitmapText) SetOffsetYA

func (self *BitmapText) SetOffsetYA(member int)

SetOffsetYA The amount the Game Object is visually offset from its y coordinate. This is the same as `height * anchor.y`. It will only be > 0 if anchor.y is not equal to zero.

func (*BitmapText) SetOutOfBoundsKillA

func (self *BitmapText) SetOutOfBoundsKillA(member bool)

SetOutOfBoundsKillA If this and the `checkWorldBounds` property are both set to `true` then the `kill` method is called as soon as `inWorld` returns false.

func (*BitmapText) SetOutOfCameraBoundsKillA

func (self *BitmapText) SetOutOfCameraBoundsKillA(member bool)

SetOutOfCameraBoundsKillA If this and the `autoCull` property are both set to `true`, then the `kill` method is called as soon as the Game Object leaves the camera bounds.

func (*BitmapText) SetPendingDestroyA

func (self *BitmapText) SetPendingDestroyA(member bool)

SetPendingDestroyA A Game Object is that is pendingDestroy is flagged to have its destroy method called on the next logic update. You can set it directly to allow you to flag an object to be destroyed on its next update.

This is extremely useful if you wish to destroy an object from within one of its own callbacks such as with Buttons or other Input events.

func (*BitmapText) SetPhysicsTypeA

func (self *BitmapText) SetPhysicsTypeA(member int)

SetPhysicsTypeA The const physics body type of this object.

func (*BitmapText) SetPreviousPositionA

func (self *BitmapText) SetPreviousPositionA(member *Point)

SetPreviousPositionA The position the Game Object was located in the previous frame.

func (*BitmapText) SetPreviousRotationA

func (self *BitmapText) SetPreviousRotationA(member int)

SetPreviousRotationA The rotation the Game Object was in set to in the previous frame. Value is in radians.

func (*BitmapText) SetRenderOrderIDA

func (self *BitmapText) SetRenderOrderIDA(member int)

SetRenderOrderIDA The render order ID is used internally by the renderer and Input Manager and should not be modified. This property is mostly used internally by the renderers, but is exposed for the use of plugins.

func (*BitmapText) SetRightA

func (self *BitmapText) SetRightA(member int)

SetRightA The right coordinate of the Game Object. This is the same as `x + width - offsetX`.

func (*BitmapText) SetSmoothedA

func (self *BitmapText) SetSmoothedA(member bool)

SetSmoothedA Enable or disable texture smoothing for this BitmapText.

The smoothing is applied to the BaseTexture of this font, which all letters of the text reference.

Smoothing is enabled by default.

func (*BitmapText) SetText

func (self *BitmapText) SetText(text string)

SetText The text to be displayed by this BitmapText object.

It's faster to use `BitmapText.text = string`, but this is kept for backwards compatibility.

func (*BitmapText) SetTextA

func (self *BitmapText) SetTextA(member string)

SetTextA The text to be displayed by this BitmapText object.

func (*BitmapText) SetTextHeightA

func (self *BitmapText) SetTextHeightA(member int)

SetTextHeightA The height in pixels of the overall text area, taking into consideration multi-line text.

func (*BitmapText) SetTextI

func (self *BitmapText) SetTextI(args ...interface{})

SetTextI The text to be displayed by this BitmapText object.

It's faster to use `BitmapText.text = string`, but this is kept for backwards compatibility.

func (*BitmapText) SetTextWidthA

func (self *BitmapText) SetTextWidthA(member int)

SetTextWidthA The width in pixels of the overall text area, taking into consideration multi-line text.

func (*BitmapText) SetTintA

func (self *BitmapText) SetTintA(member int)

SetTintA The tint applied to the BitmapText. This is a hex value. Set to white to disable (0xFFFFFF)

func (*BitmapText) SetTopA

func (self *BitmapText) SetTopA(member int)

SetTopA The y coordinate of the Game Object. This is the same as `y - offsetY`.

func (*BitmapText) SetTypeA

func (self *BitmapText) SetTypeA(member int)

SetTypeA The const type of this object.

func (*BitmapText) SetWidthA

func (self *BitmapText) SetWidthA(member int)

SetWidthA The width of the displayObjectContainer, setting this will actually modify the scale to achieve the value set

func (*BitmapText) SetWorldA

func (self *BitmapText) SetWorldA(member *Point)

SetWorldA The world coordinates of this Game Object in pixels. Depending on where in the display list this Game Object is placed this value can differ from `position`, which contains the x/y coordinates relative to the Game Objects parent.

func (*BitmapText) SetXA

func (self *BitmapText) SetXA(member int)

SetXA The position of the Game Object on the x axis relative to the local coordinates of the parent.

func (*BitmapText) SetYA

func (self *BitmapText) SetYA(member int)

SetYA The position of the Game Object on the y axis relative to the local coordinates of the parent.

func (*BitmapText) SetZA

func (self *BitmapText) SetZA(member int)

SetZA The z depth of this Game Object within its parent Group. No two objects in a Group can have the same z value. This value is adjusted automatically whenever the Group hierarchy changes. If you wish to re-order the layering of a Game Object then see methods like Group.moveUp or Group.bringToTop.

func (*BitmapText) Smoothed

func (self *BitmapText) Smoothed() bool

Smoothed Enable or disable texture smoothing for this BitmapText.

The smoothing is applied to the BaseTexture of this font, which all letters of the text reference.

Smoothing is enabled by default.

func (*BitmapText) SwapChildren

func (self *BitmapText) SwapChildren(child *DisplayObject, child2 *DisplayObject)

SwapChildren Swaps the position of 2 Display Objects within this container.

func (*BitmapText) SwapChildrenI

func (self *BitmapText) SwapChildrenI(args ...interface{})

SwapChildrenI Swaps the position of 2 Display Objects within this container.

func (*BitmapText) Text

func (self *BitmapText) Text() string

Text The text to be displayed by this BitmapText object.

func (*BitmapText) TextHeight

func (self *BitmapText) TextHeight() int

TextHeight The height in pixels of the overall text area, taking into consideration multi-line text.

func (*BitmapText) TextWidth

func (self *BitmapText) TextWidth() int

TextWidth The width in pixels of the overall text area, taking into consideration multi-line text.

func (*BitmapText) Tint

func (self *BitmapText) Tint() int

Tint The tint applied to the BitmapText. This is a hex value. Set to white to disable (0xFFFFFF)

func (*BitmapText) Top

func (self *BitmapText) Top() int

Top The y coordinate of the Game Object. This is the same as `y - offsetY`.

func (*BitmapText) Type

func (self *BitmapText) Type() int

Type The const type of this object.

func (*BitmapText) Update

func (self *BitmapText) Update()

Update Override this method in your own custom objects to handle any update requirements. It is called immediately after `preUpdate` and before `postUpdate`. Remember if this Game Object has any children you should call update on those too.

func (*BitmapText) UpdateI

func (self *BitmapText) UpdateI(args ...interface{})

UpdateI Override this method in your own custom objects to handle any update requirements. It is called immediately after `preUpdate` and before `postUpdate`. Remember if this Game Object has any children you should call update on those too.

func (*BitmapText) UpdateText

func (self *BitmapText) UpdateText()

UpdateText Renders text and updates it when needed.

func (*BitmapText) UpdateTextI

func (self *BitmapText) UpdateTextI(args ...interface{})

UpdateTextI Renders text and updates it when needed.

func (*BitmapText) UpdateTransform

func (self *BitmapText) UpdateTransform()

UpdateTransform Updates the transform of this object.

func (*BitmapText) UpdateTransformI

func (self *BitmapText) UpdateTransformI(args ...interface{})

UpdateTransformI Updates the transform of this object.

func (*BitmapText) Width

func (self *BitmapText) Width() int

Width The width of the displayObjectContainer, setting this will actually modify the scale to achieve the value set

func (*BitmapText) World

func (self *BitmapText) World() *Point

World The world coordinates of this Game Object in pixels. Depending on where in the display list this Game Object is placed this value can differ from `position`, which contains the x/y coordinates relative to the Game Objects parent.

func (*BitmapText) X

func (self *BitmapText) X() int

X The position of the Game Object on the x axis relative to the local coordinates of the parent.

func (*BitmapText) Y

func (self *BitmapText) Y() int

Y The position of the Game Object on the y axis relative to the local coordinates of the parent.

func (*BitmapText) Z

func (self *BitmapText) Z() int

Z The z depth of this Game Object within its parent Group. No two objects in a Group can have the same z value. This value is adjusted automatically whenever the Group hierarchy changes. If you wish to re-order the layering of a Game Object then see methods like Group.moveUp or Group.bringToTop.

type Blob

type Blob struct{ *js.Object }

type Button

type Button struct {
	*js.Object
}

Button Create a new `Button` object. A Button is a special type of Sprite that is set-up to handle Pointer events automatically.

The four states a Button responds to are:

* 'Over' - when the Pointer moves over the Button. This is also commonly known as 'hover'. * 'Out' - when the Pointer that was previously over the Button moves out of it. * 'Down' - when the Pointer is pressed down on the Button. I.e. touched on a touch enabled device or clicked with the mouse. * 'Up' - when the Pointer that was pressed down on the Button is released again.

A different texture/frame and activation sound can be specified for any of the states.

Frames can be specified as either an integer (the frame ID) or a string (the frame name); the same values that can be used with a Sprite constructor.

func NewButton

func NewButton(game *Game) *Button

NewButton Create a new `Button` object. A Button is a special type of Sprite that is set-up to handle Pointer events automatically.

The four states a Button responds to are:

* 'Over' - when the Pointer moves over the Button. This is also commonly known as 'hover'. * 'Out' - when the Pointer that was previously over the Button moves out of it. * 'Down' - when the Pointer is pressed down on the Button. I.e. touched on a touch enabled device or clicked with the mouse. * 'Up' - when the Pointer that was pressed down on the Button is released again.

A different texture/frame and activation sound can be specified for any of the states.

Frames can be specified as either an integer (the frame ID) or a string (the frame name); the same values that can be used with a Sprite constructor.

func NewButton1O

func NewButton1O(game *Game, x int) *Button

NewButton1O Create a new `Button` object. A Button is a special type of Sprite that is set-up to handle Pointer events automatically.

The four states a Button responds to are:

* 'Over' - when the Pointer moves over the Button. This is also commonly known as 'hover'. * 'Out' - when the Pointer that was previously over the Button moves out of it. * 'Down' - when the Pointer is pressed down on the Button. I.e. touched on a touch enabled device or clicked with the mouse. * 'Up' - when the Pointer that was pressed down on the Button is released again.

A different texture/frame and activation sound can be specified for any of the states.

Frames can be specified as either an integer (the frame ID) or a string (the frame name); the same values that can be used with a Sprite constructor.

func NewButton2O

func NewButton2O(game *Game, x int, y int) *Button

NewButton2O Create a new `Button` object. A Button is a special type of Sprite that is set-up to handle Pointer events automatically.

The four states a Button responds to are:

* 'Over' - when the Pointer moves over the Button. This is also commonly known as 'hover'. * 'Out' - when the Pointer that was previously over the Button moves out of it. * 'Down' - when the Pointer is pressed down on the Button. I.e. touched on a touch enabled device or clicked with the mouse. * 'Up' - when the Pointer that was pressed down on the Button is released again.

A different texture/frame and activation sound can be specified for any of the states.

Frames can be specified as either an integer (the frame ID) or a string (the frame name); the same values that can be used with a Sprite constructor.

func NewButton3O

func NewButton3O(game *Game, x int, y int, key string) *Button

NewButton3O Create a new `Button` object. A Button is a special type of Sprite that is set-up to handle Pointer events automatically.

The four states a Button responds to are:

* 'Over' - when the Pointer moves over the Button. This is also commonly known as 'hover'. * 'Out' - when the Pointer that was previously over the Button moves out of it. * 'Down' - when the Pointer is pressed down on the Button. I.e. touched on a touch enabled device or clicked with the mouse. * 'Up' - when the Pointer that was pressed down on the Button is released again.

A different texture/frame and activation sound can be specified for any of the states.

Frames can be specified as either an integer (the frame ID) or a string (the frame name); the same values that can be used with a Sprite constructor.

func NewButton4O

func NewButton4O(game *Game, x int, y int, key string, callback interface{}) *Button

NewButton4O Create a new `Button` object. A Button is a special type of Sprite that is set-up to handle Pointer events automatically.

The four states a Button responds to are:

* 'Over' - when the Pointer moves over the Button. This is also commonly known as 'hover'. * 'Out' - when the Pointer that was previously over the Button moves out of it. * 'Down' - when the Pointer is pressed down on the Button. I.e. touched on a touch enabled device or clicked with the mouse. * 'Up' - when the Pointer that was pressed down on the Button is released again.

A different texture/frame and activation sound can be specified for any of the states.

Frames can be specified as either an integer (the frame ID) or a string (the frame name); the same values that can be used with a Sprite constructor.

func NewButton5O

func NewButton5O(game *Game, x int, y int, key string, callback interface{}, callbackContext interface{}) *Button

NewButton5O Create a new `Button` object. A Button is a special type of Sprite that is set-up to handle Pointer events automatically.

The four states a Button responds to are:

* 'Over' - when the Pointer moves over the Button. This is also commonly known as 'hover'. * 'Out' - when the Pointer that was previously over the Button moves out of it. * 'Down' - when the Pointer is pressed down on the Button. I.e. touched on a touch enabled device or clicked with the mouse. * 'Up' - when the Pointer that was pressed down on the Button is released again.

A different texture/frame and activation sound can be specified for any of the states.

Frames can be specified as either an integer (the frame ID) or a string (the frame name); the same values that can be used with a Sprite constructor.

func NewButton6O

func NewButton6O(game *Game, x int, y int, key string, callback interface{}, callbackContext interface{}, overFrame interface{}) *Button

NewButton6O Create a new `Button` object. A Button is a special type of Sprite that is set-up to handle Pointer events automatically.

The four states a Button responds to are:

* 'Over' - when the Pointer moves over the Button. This is also commonly known as 'hover'. * 'Out' - when the Pointer that was previously over the Button moves out of it. * 'Down' - when the Pointer is pressed down on the Button. I.e. touched on a touch enabled device or clicked with the mouse. * 'Up' - when the Pointer that was pressed down on the Button is released again.

A different texture/frame and activation sound can be specified for any of the states.

Frames can be specified as either an integer (the frame ID) or a string (the frame name); the same values that can be used with a Sprite constructor.

func NewButton7O

func NewButton7O(game *Game, x int, y int, key string, callback interface{}, callbackContext interface{}, overFrame interface{}, outFrame interface{}) *Button

NewButton7O Create a new `Button` object. A Button is a special type of Sprite that is set-up to handle Pointer events automatically.

The four states a Button responds to are:

* 'Over' - when the Pointer moves over the Button. This is also commonly known as 'hover'. * 'Out' - when the Pointer that was previously over the Button moves out of it. * 'Down' - when the Pointer is pressed down on the Button. I.e. touched on a touch enabled device or clicked with the mouse. * 'Up' - when the Pointer that was pressed down on the Button is released again.

A different texture/frame and activation sound can be specified for any of the states.

Frames can be specified as either an integer (the frame ID) or a string (the frame name); the same values that can be used with a Sprite constructor.

func NewButton8O

func NewButton8O(game *Game, x int, y int, key string, callback interface{}, callbackContext interface{}, overFrame interface{}, outFrame interface{}, downFrame interface{}) *Button

NewButton8O Create a new `Button` object. A Button is a special type of Sprite that is set-up to handle Pointer events automatically.

The four states a Button responds to are:

* 'Over' - when the Pointer moves over the Button. This is also commonly known as 'hover'. * 'Out' - when the Pointer that was previously over the Button moves out of it. * 'Down' - when the Pointer is pressed down on the Button. I.e. touched on a touch enabled device or clicked with the mouse. * 'Up' - when the Pointer that was pressed down on the Button is released again.

A different texture/frame and activation sound can be specified for any of the states.

Frames can be specified as either an integer (the frame ID) or a string (the frame name); the same values that can be used with a Sprite constructor.

func NewButton9O

func NewButton9O(game *Game, x int, y int, key string, callback interface{}, callbackContext interface{}, overFrame interface{}, outFrame interface{}, downFrame interface{}, upFrame interface{}) *Button

NewButton9O Create a new `Button` object. A Button is a special type of Sprite that is set-up to handle Pointer events automatically.

The four states a Button responds to are:

* 'Over' - when the Pointer moves over the Button. This is also commonly known as 'hover'. * 'Out' - when the Pointer that was previously over the Button moves out of it. * 'Down' - when the Pointer is pressed down on the Button. I.e. touched on a touch enabled device or clicked with the mouse. * 'Up' - when the Pointer that was pressed down on the Button is released again.

A different texture/frame and activation sound can be specified for any of the states.

Frames can be specified as either an integer (the frame ID) or a string (the frame name); the same values that can be used with a Sprite constructor.

func NewButtonI

func NewButtonI(args ...interface{}) *Button

NewButtonI Create a new `Button` object. A Button is a special type of Sprite that is set-up to handle Pointer events automatically.

The four states a Button responds to are:

* 'Over' - when the Pointer moves over the Button. This is also commonly known as 'hover'. * 'Out' - when the Pointer that was previously over the Button moves out of it. * 'Down' - when the Pointer is pressed down on the Button. I.e. touched on a touch enabled device or clicked with the mouse. * 'Up' - when the Pointer that was pressed down on the Button is released again.

A different texture/frame and activation sound can be specified for any of the states.

Frames can be specified as either an integer (the frame ID) or a string (the frame name); the same values that can be used with a Sprite constructor.

func ToButton

func ToButton(jsStruct interface{}) *Button

Button Binding conversion method to Button point

func (*Button) AddChild

func (self *Button) AddChild(child *DisplayObject) *DisplayObject

AddChild Adds a child to the container.

func (*Button) AddChildAt

func (self *Button) AddChildAt(child *DisplayObject, index int) *DisplayObject

AddChildAt Adds a child to the container at a specified index. If the index is out of bounds an error will be thrown

func (*Button) AddChildAtI

func (self *Button) AddChildAtI(args ...interface{}) *DisplayObject

AddChildAtI Adds a child to the container at a specified index. If the index is out of bounds an error will be thrown

func (*Button) AddChildI

func (self *Button) AddChildI(args ...interface{}) *DisplayObject

AddChildI Adds a child to the container.

func (*Button) AlignIn

func (self *Button) AlignIn(container interface{}) interface{}

AlignIn Aligns this Game Object within another Game Object, or Rectangle, known as the 'container', to one of 9 possible positions.

The container must be a Game Object, or Phaser.Rectangle object. This can include properties such as `World.bounds` or `Camera.view`, for aligning Game Objects within the world and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText, TileSprites or Buttons.

Please note that aligning a Sprite to another Game Object does **not** make it a child of the container. It simply modifies its position coordinates so it aligns with it.

The position constants you can use are:

`Phaser.TOP_LEFT`, `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

The Game Objects are placed in such a way that their _bounds_ align with the container, taking into consideration rotation, scale and the anchor property. This allows you to neatly align Game Objects, irrespective of their position value.

The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final aligned position of the Game Object. For example:

`sprite.alignIn(background, Phaser.BOTTOM_RIGHT, -20, -20)`

Would align the `sprite` to the bottom-right, but moved 20 pixels in from the corner. Think of the offsets as applying an adjustment to the containers bounds before the alignment takes place. So providing a negative offset will 'shrink' the container bounds by that amount, and providing a positive one expands it.

func (*Button) AlignIn1O

func (self *Button) AlignIn1O(container interface{}, position int) interface{}

AlignIn1O Aligns this Game Object within another Game Object, or Rectangle, known as the 'container', to one of 9 possible positions.

The container must be a Game Object, or Phaser.Rectangle object. This can include properties such as `World.bounds` or `Camera.view`, for aligning Game Objects within the world and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText, TileSprites or Buttons.

Please note that aligning a Sprite to another Game Object does **not** make it a child of the container. It simply modifies its position coordinates so it aligns with it.

The position constants you can use are:

`Phaser.TOP_LEFT`, `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

The Game Objects are placed in such a way that their _bounds_ align with the container, taking into consideration rotation, scale and the anchor property. This allows you to neatly align Game Objects, irrespective of their position value.

The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final aligned position of the Game Object. For example:

`sprite.alignIn(background, Phaser.BOTTOM_RIGHT, -20, -20)`

Would align the `sprite` to the bottom-right, but moved 20 pixels in from the corner. Think of the offsets as applying an adjustment to the containers bounds before the alignment takes place. So providing a negative offset will 'shrink' the container bounds by that amount, and providing a positive one expands it.

func (*Button) AlignIn2O

func (self *Button) AlignIn2O(container interface{}, position int, offsetX int) interface{}

AlignIn2O Aligns this Game Object within another Game Object, or Rectangle, known as the 'container', to one of 9 possible positions.

The container must be a Game Object, or Phaser.Rectangle object. This can include properties such as `World.bounds` or `Camera.view`, for aligning Game Objects within the world and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText, TileSprites or Buttons.

Please note that aligning a Sprite to another Game Object does **not** make it a child of the container. It simply modifies its position coordinates so it aligns with it.

The position constants you can use are:

`Phaser.TOP_LEFT`, `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

The Game Objects are placed in such a way that their _bounds_ align with the container, taking into consideration rotation, scale and the anchor property. This allows you to neatly align Game Objects, irrespective of their position value.

The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final aligned position of the Game Object. For example:

`sprite.alignIn(background, Phaser.BOTTOM_RIGHT, -20, -20)`

Would align the `sprite` to the bottom-right, but moved 20 pixels in from the corner. Think of the offsets as applying an adjustment to the containers bounds before the alignment takes place. So providing a negative offset will 'shrink' the container bounds by that amount, and providing a positive one expands it.

func (*Button) AlignIn3O

func (self *Button) AlignIn3O(container interface{}, position int, offsetX int, offsetY int) interface{}

AlignIn3O Aligns this Game Object within another Game Object, or Rectangle, known as the 'container', to one of 9 possible positions.

The container must be a Game Object, or Phaser.Rectangle object. This can include properties such as `World.bounds` or `Camera.view`, for aligning Game Objects within the world and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText, TileSprites or Buttons.

Please note that aligning a Sprite to another Game Object does **not** make it a child of the container. It simply modifies its position coordinates so it aligns with it.

The position constants you can use are:

`Phaser.TOP_LEFT`, `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

The Game Objects are placed in such a way that their _bounds_ align with the container, taking into consideration rotation, scale and the anchor property. This allows you to neatly align Game Objects, irrespective of their position value.

The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final aligned position of the Game Object. For example:

`sprite.alignIn(background, Phaser.BOTTOM_RIGHT, -20, -20)`

Would align the `sprite` to the bottom-right, but moved 20 pixels in from the corner. Think of the offsets as applying an adjustment to the containers bounds before the alignment takes place. So providing a negative offset will 'shrink' the container bounds by that amount, and providing a positive one expands it.

func (*Button) AlignInI

func (self *Button) AlignInI(args ...interface{}) interface{}

AlignInI Aligns this Game Object within another Game Object, or Rectangle, known as the 'container', to one of 9 possible positions.

The container must be a Game Object, or Phaser.Rectangle object. This can include properties such as `World.bounds` or `Camera.view`, for aligning Game Objects within the world and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText, TileSprites or Buttons.

Please note that aligning a Sprite to another Game Object does **not** make it a child of the container. It simply modifies its position coordinates so it aligns with it.

The position constants you can use are:

`Phaser.TOP_LEFT`, `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

The Game Objects are placed in such a way that their _bounds_ align with the container, taking into consideration rotation, scale and the anchor property. This allows you to neatly align Game Objects, irrespective of their position value.

The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final aligned position of the Game Object. For example:

`sprite.alignIn(background, Phaser.BOTTOM_RIGHT, -20, -20)`

Would align the `sprite` to the bottom-right, but moved 20 pixels in from the corner. Think of the offsets as applying an adjustment to the containers bounds before the alignment takes place. So providing a negative offset will 'shrink' the container bounds by that amount, and providing a positive one expands it.

func (*Button) AlignTo

func (self *Button) AlignTo(parent interface{}) interface{}

AlignTo Aligns this Game Object to the side of another Game Object, or Rectangle, known as the 'parent', in one of 11 possible positions.

The parent must be a Game Object, or Phaser.Rectangle object. This can include properties such as `World.bounds` or `Camera.view`, for aligning Game Objects within the world and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText, TileSprites or Buttons.

Please note that aligning a Sprite to another Game Object does **not** make it a child of the parent. It simply modifies its position coordinates so it aligns with it.

The position constants you can use are:

`Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_TOP`, `Phaser.LEFT_CENTER`, `Phaser.LEFT_BOTTOM`, `Phaser.RIGHT_TOP`, `Phaser.RIGHT_CENTER`, `Phaser.RIGHT_BOTTOM`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

The Game Objects are placed in such a way that their _bounds_ align with the parent, taking into consideration rotation, scale and the anchor property. This allows you to neatly align Game Objects, irrespective of their position value.

The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final aligned position of the Game Object. For example:

`sprite.alignTo(background, Phaser.BOTTOM_RIGHT, -20, -20)`

Would align the `sprite` to the bottom-right, but moved 20 pixels in from the corner. Think of the offsets as applying an adjustment to the parents bounds before the alignment takes place. So providing a negative offset will 'shrink' the parent bounds by that amount, and providing a positive one expands it.

func (*Button) AlignTo1O

func (self *Button) AlignTo1O(parent interface{}, position int) interface{}

AlignTo1O Aligns this Game Object to the side of another Game Object, or Rectangle, known as the 'parent', in one of 11 possible positions.

The parent must be a Game Object, or Phaser.Rectangle object. This can include properties such as `World.bounds` or `Camera.view`, for aligning Game Objects within the world and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText, TileSprites or Buttons.

Please note that aligning a Sprite to another Game Object does **not** make it a child of the parent. It simply modifies its position coordinates so it aligns with it.

The position constants you can use are:

`Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_TOP`, `Phaser.LEFT_CENTER`, `Phaser.LEFT_BOTTOM`, `Phaser.RIGHT_TOP`, `Phaser.RIGHT_CENTER`, `Phaser.RIGHT_BOTTOM`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

The Game Objects are placed in such a way that their _bounds_ align with the parent, taking into consideration rotation, scale and the anchor property. This allows you to neatly align Game Objects, irrespective of their position value.

The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final aligned position of the Game Object. For example:

`sprite.alignTo(background, Phaser.BOTTOM_RIGHT, -20, -20)`

Would align the `sprite` to the bottom-right, but moved 20 pixels in from the corner. Think of the offsets as applying an adjustment to the parents bounds before the alignment takes place. So providing a negative offset will 'shrink' the parent bounds by that amount, and providing a positive one expands it.

func (*Button) AlignTo2O

func (self *Button) AlignTo2O(parent interface{}, position int, offsetX int) interface{}

AlignTo2O Aligns this Game Object to the side of another Game Object, or Rectangle, known as the 'parent', in one of 11 possible positions.

The parent must be a Game Object, or Phaser.Rectangle object. This can include properties such as `World.bounds` or `Camera.view`, for aligning Game Objects within the world and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText, TileSprites or Buttons.

Please note that aligning a Sprite to another Game Object does **not** make it a child of the parent. It simply modifies its position coordinates so it aligns with it.

The position constants you can use are:

`Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_TOP`, `Phaser.LEFT_CENTER`, `Phaser.LEFT_BOTTOM`, `Phaser.RIGHT_TOP`, `Phaser.RIGHT_CENTER`, `Phaser.RIGHT_BOTTOM`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

The Game Objects are placed in such a way that their _bounds_ align with the parent, taking into consideration rotation, scale and the anchor property. This allows you to neatly align Game Objects, irrespective of their position value.

The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final aligned position of the Game Object. For example:

`sprite.alignTo(background, Phaser.BOTTOM_RIGHT, -20, -20)`

Would align the `sprite` to the bottom-right, but moved 20 pixels in from the corner. Think of the offsets as applying an adjustment to the parents bounds before the alignment takes place. So providing a negative offset will 'shrink' the parent bounds by that amount, and providing a positive one expands it.

func (*Button) AlignTo3O

func (self *Button) AlignTo3O(parent interface{}, position int, offsetX int, offsetY int) interface{}

AlignTo3O Aligns this Game Object to the side of another Game Object, or Rectangle, known as the 'parent', in one of 11 possible positions.

The parent must be a Game Object, or Phaser.Rectangle object. This can include properties such as `World.bounds` or `Camera.view`, for aligning Game Objects within the world and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText, TileSprites or Buttons.

Please note that aligning a Sprite to another Game Object does **not** make it a child of the parent. It simply modifies its position coordinates so it aligns with it.

The position constants you can use are:

`Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_TOP`, `Phaser.LEFT_CENTER`, `Phaser.LEFT_BOTTOM`, `Phaser.RIGHT_TOP`, `Phaser.RIGHT_CENTER`, `Phaser.RIGHT_BOTTOM`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

The Game Objects are placed in such a way that their _bounds_ align with the parent, taking into consideration rotation, scale and the anchor property. This allows you to neatly align Game Objects, irrespective of their position value.

The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final aligned position of the Game Object. For example:

`sprite.alignTo(background, Phaser.BOTTOM_RIGHT, -20, -20)`

Would align the `sprite` to the bottom-right, but moved 20 pixels in from the corner. Think of the offsets as applying an adjustment to the parents bounds before the alignment takes place. So providing a negative offset will 'shrink' the parent bounds by that amount, and providing a positive one expands it.

func (*Button) AlignToI

func (self *Button) AlignToI(args ...interface{}) interface{}

AlignToI Aligns this Game Object to the side of another Game Object, or Rectangle, known as the 'parent', in one of 11 possible positions.

The parent must be a Game Object, or Phaser.Rectangle object. This can include properties such as `World.bounds` or `Camera.view`, for aligning Game Objects within the world and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText, TileSprites or Buttons.

Please note that aligning a Sprite to another Game Object does **not** make it a child of the parent. It simply modifies its position coordinates so it aligns with it.

The position constants you can use are:

`Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_TOP`, `Phaser.LEFT_CENTER`, `Phaser.LEFT_BOTTOM`, `Phaser.RIGHT_TOP`, `Phaser.RIGHT_CENTER`, `Phaser.RIGHT_BOTTOM`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

The Game Objects are placed in such a way that their _bounds_ align with the parent, taking into consideration rotation, scale and the anchor property. This allows you to neatly align Game Objects, irrespective of their position value.

The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final aligned position of the Game Object. For example:

`sprite.alignTo(background, Phaser.BOTTOM_RIGHT, -20, -20)`

Would align the `sprite` to the bottom-right, but moved 20 pixels in from the corner. Think of the offsets as applying an adjustment to the parents bounds before the alignment takes place. So providing a negative offset will 'shrink' the parent bounds by that amount, and providing a positive one expands it.

func (*Button) Alive

func (self *Button) Alive() bool

Alive A useful flag to control if the Game Object is alive or dead.

This is set automatically by the Health components `damage` method should the object run out of health. Or you can toggle it via your game code.

This property is mostly just provided to be used by your game - it doesn't effect rendering or logic updates. However you can use `Group.getFirstAlive` in conjunction with this property for fast object pooling and recycling.

func (*Button) Anchor

func (self *Button) Anchor() *Point

Anchor The anchor sets the origin point of the texture.

The default is 0,0 this means the texture's origin is the top left

Setting than anchor to 0.5,0.5 means the textures origin is centered

Setting the anchor to 1,1 would mean the textures origin points will be the bottom right corner

func (*Button) Angle

func (self *Button) Angle() int

Angle The angle property is the rotation of the Game Object in *degrees* from its original orientation.

Values from 0 to 180 represent clockwise rotation; values from 0 to -180 represent counterclockwise rotation.

Values outside this range are added to or subtracted from 360 to obtain a value within the range. For example, the statement player.angle = 450 is the same as player.angle = 90.

If you wish to work in radians instead of degrees you can use the property `rotation` instead. Working in radians is slightly faster as it doesn't have to perform any calculations.

func (*Button) Animations

func (self *Button) Animations() *AnimationManager

Animations If the Game Object is enabled for animation (such as a Phaser.Sprite) this is a reference to its AnimationManager instance. Through it you can create, play, pause and stop animations.

func (*Button) AutoCull

func (self *Button) AutoCull() bool

AutoCull A Game Object with `autoCull` set to true will check its bounds against the World Camera every frame. If it is not intersecting the Camera bounds at any point then it has its `renderable` property set to `false`. This keeps the Game Object alive and still processing updates, but forces it to skip the render step entirely.

This is a relatively expensive operation, especially if enabled on hundreds of Game Objects. So enable it only if you know it's required, or you have tested performance and find it acceptable.

func (*Button) BlendMode

func (self *Button) BlendMode() int

BlendMode The blend mode to be applied to the sprite. Set to PIXI.blendModes.NORMAL to remove any blend mode.

Warning: You cannot have a blend mode and a filter active on the same Sprite. Doing so will render the sprite invisible.

func (*Button) Bottom

func (self *Button) Bottom() int

Bottom The sum of the y and height properties. This is the same as `y + height - offsetY`.

func (*Button) BringToTop

func (self *Button) BringToTop() *DisplayObject

BringToTop Brings this Game Object to the top of its parents display list. Visually this means it will render over the top of any old child in the same Group.

If this Game Object hasn't been added to a custom Group then this method will bring it to the top of the Game World, because the World is the root Group from which all Game Objects descend.

func (*Button) BringToTopI

func (self *Button) BringToTopI(args ...interface{}) *DisplayObject

BringToTopI Brings this Game Object to the top of its parents display list. Visually this means it will render over the top of any old child in the same Group.

If this Game Object hasn't been added to a custom Group then this method will bring it to the top of the Game World, because the World is the root Group from which all Game Objects descend.

func (*Button) CameraOffset

func (self *Button) CameraOffset() *Point

CameraOffset The x/y coordinate offset applied to the top-left of the camera that this Game Object will be drawn at if `fixedToCamera` is true.

The values are relative to the top-left of the camera view and in addition to any parent of the Game Object on the display list.

func (*Button) CenterX

func (self *Button) CenterX() int

CenterX The center x coordinate of the Game Object. This is the same as `(x - offsetX) + (width / 2)`.

func (*Button) CenterY

func (self *Button) CenterY() int

CenterY The center y coordinate of the Game Object. This is the same as `(y - offsetY) + (height / 2)`.

func (*Button) ChangeStateFrame

func (self *Button) ChangeStateFrame(state interface{}) bool

ChangeStateFrame Change the frame to that of the given state, _if_ the state has a frame assigned _and_ if the frames are not currently "frozen".

func (*Button) ChangeStateFrameI

func (self *Button) ChangeStateFrameI(args ...interface{}) bool

ChangeStateFrameI Change the frame to that of the given state, _if_ the state has a frame assigned _and_ if the frames are not currently "frozen".

func (*Button) CheckTransform

func (self *Button) CheckTransform(wt *Matrix)

CheckTransform Adjust scaling limits, if set, to this Game Object.

func (*Button) CheckTransformI

func (self *Button) CheckTransformI(args ...interface{})

CheckTransformI Adjust scaling limits, if set, to this Game Object.

func (*Button) Children

func (self *Button) Children() []DisplayObject

Children [read-only] The array of children of this container.

func (*Button) ClearFrames

func (self *Button) ClearFrames()

ClearFrames Clears all of the frames set on this Button.

func (*Button) ClearFramesI

func (self *Button) ClearFramesI(args ...interface{})

ClearFramesI Clears all of the frames set on this Button.

func (*Button) Components

func (self *Button) Components() interface{}

Components The components this Game Object has installed.

func (*Button) Contains

func (self *Button) Contains(child *DisplayObject) bool

Contains Determines whether the specified display object is a child of the DisplayObjectContainer instance or the instance itself.

func (*Button) ContainsI

func (self *Button) ContainsI(args ...interface{}) bool

ContainsI Determines whether the specified display object is a child of the DisplayObjectContainer instance or the instance itself.

func (*Button) Crop

func (self *Button) Crop(rect *Rectangle)

Crop Crop allows you to crop the texture being used to display this Game Object. Setting a crop rectangle modifies the core texture frame. The Game Object width and height properties will be adjusted accordingly.

Cropping takes place from the top-left and can be modified in real-time either by providing an updated rectangle object to this method, or by modifying `cropRect` property directly and then calling `updateCrop`.

The rectangle object given to this method can be either a `Phaser.Rectangle` or any other object so long as it has public `x`, `y`, `width`, `height`, `right` and `bottom` properties.

A reference to the rectangle is stored in `cropRect` unless the `copy` parameter is `true`, in which case the values are duplicated to a local object.

func (*Button) Crop1O

func (self *Button) Crop1O(rect *Rectangle, copy bool)

Crop1O Crop allows you to crop the texture being used to display this Game Object. Setting a crop rectangle modifies the core texture frame. The Game Object width and height properties will be adjusted accordingly.

Cropping takes place from the top-left and can be modified in real-time either by providing an updated rectangle object to this method, or by modifying `cropRect` property directly and then calling `updateCrop`.

The rectangle object given to this method can be either a `Phaser.Rectangle` or any other object so long as it has public `x`, `y`, `width`, `height`, `right` and `bottom` properties.

A reference to the rectangle is stored in `cropRect` unless the `copy` parameter is `true`, in which case the values are duplicated to a local object.

func (*Button) CropI

func (self *Button) CropI(args ...interface{})

CropI Crop allows you to crop the texture being used to display this Game Object. Setting a crop rectangle modifies the core texture frame. The Game Object width and height properties will be adjusted accordingly.

Cropping takes place from the top-left and can be modified in real-time either by providing an updated rectangle object to this method, or by modifying `cropRect` property directly and then calling `updateCrop`.

The rectangle object given to this method can be either a `Phaser.Rectangle` or any other object so long as it has public `x`, `y`, `width`, `height`, `right` and `bottom` properties.

A reference to the rectangle is stored in `cropRect` unless the `copy` parameter is `true`, in which case the values are duplicated to a local object.

func (*Button) CropRect

func (self *Button) CropRect() *Rectangle

CropRect The Rectangle used to crop the texture this Game Object uses. Set this property via `crop`. If you modify this property directly you must call `updateCrop` in order to have the change take effect.

func (*Button) Data

func (self *Button) Data() interface{}

Data An empty Object that belongs to this Game Object. This value isn't ever used internally by Phaser, but may be used by your own code, or by Phaser Plugins, to store data that needs to be associated with the Game Object, without polluting the Game Object directly.

func (*Button) Debug

func (self *Button) Debug() bool

Debug A debug flag designed for use with `Game.enableStep`.

func (*Button) Destroy

func (self *Button) Destroy()

Destroy Destroys the Game Object. This removes it from its parent group, destroys the input, event and animation handlers if present and nulls its reference to `game`, freeing it up for garbage collection.

If this Game Object has the Events component it will also dispatch the `onDestroy` event.

You can optionally also destroy the BaseTexture this Game Object is using. Be careful if you've more than one Game Object sharing the same BaseTexture.

func (*Button) Destroy1O

func (self *Button) Destroy1O(destroyChildren bool)

Destroy1O Destroys the Game Object. This removes it from its parent group, destroys the input, event and animation handlers if present and nulls its reference to `game`, freeing it up for garbage collection.

If this Game Object has the Events component it will also dispatch the `onDestroy` event.

You can optionally also destroy the BaseTexture this Game Object is using. Be careful if you've more than one Game Object sharing the same BaseTexture.

func (*Button) Destroy2O

func (self *Button) Destroy2O(destroyChildren bool, destroyTexture bool)

Destroy2O Destroys the Game Object. This removes it from its parent group, destroys the input, event and animation handlers if present and nulls its reference to `game`, freeing it up for garbage collection.

If this Game Object has the Events component it will also dispatch the `onDestroy` event.

You can optionally also destroy the BaseTexture this Game Object is using. Be careful if you've more than one Game Object sharing the same BaseTexture.

func (*Button) DestroyI

func (self *Button) DestroyI(args ...interface{})

DestroyI Destroys the Game Object. This removes it from its parent group, destroys the input, event and animation handlers if present and nulls its reference to `game`, freeing it up for garbage collection.

If this Game Object has the Events component it will also dispatch the `onDestroy` event.

You can optionally also destroy the BaseTexture this Game Object is using. Be careful if you've more than one Game Object sharing the same BaseTexture.

func (*Button) DestroyPhase

func (self *Button) DestroyPhase() bool

DestroyPhase As a Game Object runs through its destroy method this flag is set to true, and can be checked in any sub-systems or plugins it is being destroyed from.

func (*Button) Events

func (self *Button) Events() *Events

Events All Phaser Game Objects have an Events class which contains all of the events that are dispatched when certain things happen to this Game Object, or any of its components.

func (*Button) Exists

func (self *Button) Exists() bool

Exists Controls if this Sprite is processed by the core Phaser game loops and Group loops.

func (*Button) FixedToCamera

func (self *Button) FixedToCamera() bool

FixedToCamera A Game Object that is "fixed" to the camera uses its x/y coordinates as offsets from the top left of the camera during rendering.

The values are adjusted at the rendering stage, overriding the Game Objects actual world position.

The end result is that the Game Object will appear to be 'fixed' to the camera, regardless of where in the game world the camera is viewing. This is useful if for example this Game Object is a UI item that you wish to be visible at all times regardless where in the world the camera is.

The offsets are stored in the `cameraOffset` property.

Note that the `cameraOffset` values are in addition to any parent of this Game Object on the display list.

Be careful not to set `fixedToCamera` on Game Objects which are in Groups that already have `fixedToCamera` enabled on them.

func (*Button) ForceOut

func (self *Button) ForceOut() interface{}

ForceOut When the Button is touched / clicked and then released you can force it to enter a state of "out" instead of "up".

This can also accept a {@link Phaser.PointerModer pointer mode bitmask} for more refined control.

func (*Button) Frame

func (self *Button) Frame() int

Frame Gets or sets the current frame index of the texture being used to render this Game Object.

To change the frame set `frame` to the index of the new frame in the sprite sheet you wish this Game Object to use, for example: `player.frame = 4`.

If the frame index given doesn't exist it will revert to the first frame found in the texture.

If you are using a texture atlas then you should use the `frameName` property instead.

If you wish to fully replace the texture being used see `loadTexture`.

func (*Button) FrameName

func (self *Button) FrameName() string

FrameName Gets or sets the current frame name of the texture being used to render this Game Object.

To change the frame set `frameName` to the name of the new frame in the texture atlas you wish this Game Object to use, for example: `player.frameName = "idle"`.

If the frame name given doesn't exist it will revert to the first frame found in the texture and throw a console warning.

If you are using a sprite sheet then you should use the `frame` property instead.

If you wish to fully replace the texture being used see `loadTexture`.

func (*Button) FreezeFrames

func (self *Button) FreezeFrames() bool

FreezeFrames When true the the texture frame will not be automatically switched on up/down/over/out events.

func (*Button) Fresh

func (self *Button) Fresh() bool

Fresh A Game Object is considered `fresh` if it has just been created or reset and is yet to receive a renderer transform update. This property is mostly used internally by the physics systems, but is exposed for the use of plugins.

func (*Button) Game

func (self *Button) Game() *Game

Game A reference to the currently running Game.

func (*Button) GetBounds

func (self *Button) GetBounds(matrix *Matrix) *Rectangle

GetBounds Returns the bounds of the Sprite as a rectangle.

The bounds calculation takes the worldTransform into account.

It is important to note that the transform is not updated when you call this method.

So if this Sprite is the child of a Display Object which has had its transform

updated since the last render pass, those changes will not yet have been applied

to this Sprites worldTransform. If you need to ensure that all parent transforms

are factored into this getBounds operation then you should call `updateTransform`

on the root most object in this Sprites display list first.

func (*Button) GetBoundsI

func (self *Button) GetBoundsI(args ...interface{}) *Rectangle

GetBoundsI Returns the bounds of the Sprite as a rectangle.

The bounds calculation takes the worldTransform into account.

It is important to note that the transform is not updated when you call this method.

So if this Sprite is the child of a Display Object which has had its transform

updated since the last render pass, those changes will not yet have been applied

to this Sprites worldTransform. If you need to ensure that all parent transforms

are factored into this getBounds operation then you should call `updateTransform`

on the root most object in this Sprites display list first.

func (*Button) GetChildAt

func (self *Button) GetChildAt(index int) *DisplayObject

GetChildAt Returns the child at the specified index

func (*Button) GetChildAtI

func (self *Button) GetChildAtI(args ...interface{}) *DisplayObject

GetChildAtI Returns the child at the specified index

func (*Button) GetChildIndex

func (self *Button) GetChildIndex(child *DisplayObject) int

GetChildIndex Returns the index position of a child DisplayObject instance

func (*Button) GetChildIndexI

func (self *Button) GetChildIndexI(args ...interface{}) int

GetChildIndexI Returns the index position of a child DisplayObject instance

func (*Button) GetLocalBounds

func (self *Button) GetLocalBounds() *Rectangle

GetLocalBounds Retrieves the non-global local bounds of the Sprite as a rectangle. The calculation takes all visible children into consideration.

func (*Button) GetLocalBoundsI

func (self *Button) GetLocalBoundsI(args ...interface{}) *Rectangle

GetLocalBoundsI Retrieves the non-global local bounds of the Sprite as a rectangle. The calculation takes all visible children into consideration.

func (*Button) Height

func (self *Button) Height() int

Height The height of the sprite, setting this will actually modify the scale to achieve the value set

func (*Button) IgnoreChildInput

func (self *Button) IgnoreChildInput() bool

IgnoreChildInput If `ignoreChildInput` is `false` it will allow this objects _children_ to be considered as valid for Input events.

If this property is `true` then the children will _not_ be considered as valid for Input events.

Note that this property isn't recursive: only immediate children are influenced, it doesn't scan further down.

func (*Button) InCamera

func (self *Button) InCamera() bool

InCamera Checks if the Game Objects bounds intersect with the Game Camera bounds. Returns `true` if they do, otherwise `false` if fully outside of the Cameras bounds.

func (*Button) Input

func (self *Button) Input() interface{}

Input The Input Handler for this Game Object.

By default it is disabled. If you wish this Game Object to process input events you should enable it with: `inputEnabled = true`.

After you have done this, this property will be a reference to the Phaser InputHandler.

func (*Button) InputEnabled

func (self *Button) InputEnabled() bool

InputEnabled By default a Game Object won't process any input events. By setting `inputEnabled` to true a Phaser.InputHandler is created for this Game Object and it will then start to process click / touch events and more.

You can then access the Input Handler via `this.input`.

Note that Input related events are dispatched from `this.events`, i.e.: `events.onInputDown`.

If you set this property to false it will stop the Input Handler from processing any more input events.

If you want to _temporarily_ disable input for a Game Object, then it's better to set `input.enabled = false`, as it won't reset any of the Input Handlers internal properties. You can then toggle this back on as needed.

func (*Button) JustReleasedPreventsOver

func (self *Button) JustReleasedPreventsOver() *PointerMode

JustReleasedPreventsOver Suppress the over event if a pointer was just released and it matches the given {@link Phaser.PointerModer pointer mode bitmask}.

This behavior was introduced in Phaser 2.3.1; this property is a soft-revert of the change.

func (*Button) Key

func (self *Button) Key() interface{}

Key The key of the image or texture used by this Game Object during rendering. If it is a string it's the string used to retrieve the texture from the Phaser Image Cache. It can also be an instance of a RenderTexture, BitmapData, Video or PIXI.Texture. If a Game Object is created without a key it is automatically assigned the key `__default` which is a 32x32 transparent PNG stored within the Cache. If a Game Object is given a key which doesn't exist in the Image Cache it is re-assigned the key `__missing` which is a 32x32 PNG of a green box with a line through it.

func (*Button) Kill

func (self *Button) Kill() *DisplayObject

Kill Kills a Game Object. A killed Game Object has its `alive`, `exists` and `visible` properties all set to false.

It will dispatch the `onKilled` event. You can listen to `events.onKilled` for the signal.

Note that killing a Game Object is a way for you to quickly recycle it in an object pool, it doesn't destroy the object or free it up from memory.

If you don't need this Game Object any more you should call `destroy` instead.

func (*Button) KillI

func (self *Button) KillI(args ...interface{}) *DisplayObject

KillI Kills a Game Object. A killed Game Object has its `alive`, `exists` and `visible` properties all set to false.

It will dispatch the `onKilled` event. You can listen to `events.onKilled` for the signal.

Note that killing a Game Object is a way for you to quickly recycle it in an object pool, it doesn't destroy the object or free it up from memory.

If you don't need this Game Object any more you should call `destroy` instead.

func (*Button) Left

func (self *Button) Left() int

Left The left coordinate of the Game Object. This is the same as `x - offsetX`.

func (*Button) Lifespan

func (self *Button) Lifespan() int

Lifespan The lifespan allows you to give a Game Object a lifespan in milliseconds.

Once the Game Object is 'born' you can set this to a positive value.

It is automatically decremented by the millisecond equivalent of `game.time.physicsElapsed` each frame. When it reaches zero it will call the `kill` method.

Very handy for particles, bullets, collectibles, or any other short-lived entity.

func (*Button) LoadTexture

func (self *Button) LoadTexture(key interface{})

LoadTexture Changes the base texture the Game Object is using. The old texture is removed and the new one is referenced or fetched from the Cache.

If your Game Object is using a frame from a texture atlas and you just wish to change to another frame, then see the `frame` or `frameName` properties instead.

You should only use `loadTexture` if you want to replace the base texture entirely.

Calling this method causes a WebGL texture update, so use sparingly or in low-intensity portions of your game, or if you know the new texture is already on the GPU.

You can use the new const `Phaser.PENDING_ATLAS` as the texture key for any sprite. Doing this then sets the key to be the `frame` argument (the frame is set to zero).

This allows you to create sprites using `load.image` during development, and then change them to use a Texture Atlas later in development by simply searching your code for 'PENDING_ATLAS' and swapping it to be the key of the atlas data.

Note: You cannot use a RenderTexture as a texture for a TileSprite.

func (*Button) LoadTexture1O

func (self *Button) LoadTexture1O(key interface{}, frame interface{})

LoadTexture1O Changes the base texture the Game Object is using. The old texture is removed and the new one is referenced or fetched from the Cache.

If your Game Object is using a frame from a texture atlas and you just wish to change to another frame, then see the `frame` or `frameName` properties instead.

You should only use `loadTexture` if you want to replace the base texture entirely.

Calling this method causes a WebGL texture update, so use sparingly or in low-intensity portions of your game, or if you know the new texture is already on the GPU.

You can use the new const `Phaser.PENDING_ATLAS` as the texture key for any sprite. Doing this then sets the key to be the `frame` argument (the frame is set to zero).

This allows you to create sprites using `load.image` during development, and then change them to use a Texture Atlas later in development by simply searching your code for 'PENDING_ATLAS' and swapping it to be the key of the atlas data.

Note: You cannot use a RenderTexture as a texture for a TileSprite.

func (*Button) LoadTexture2O

func (self *Button) LoadTexture2O(key interface{}, frame interface{}, stopAnimation bool)

LoadTexture2O Changes the base texture the Game Object is using. The old texture is removed and the new one is referenced or fetched from the Cache.

If your Game Object is using a frame from a texture atlas and you just wish to change to another frame, then see the `frame` or `frameName` properties instead.

You should only use `loadTexture` if you want to replace the base texture entirely.

Calling this method causes a WebGL texture update, so use sparingly or in low-intensity portions of your game, or if you know the new texture is already on the GPU.

You can use the new const `Phaser.PENDING_ATLAS` as the texture key for any sprite. Doing this then sets the key to be the `frame` argument (the frame is set to zero).

This allows you to create sprites using `load.image` during development, and then change them to use a Texture Atlas later in development by simply searching your code for 'PENDING_ATLAS' and swapping it to be the key of the atlas data.

Note: You cannot use a RenderTexture as a texture for a TileSprite.

func (*Button) LoadTextureI

func (self *Button) LoadTextureI(args ...interface{})

LoadTextureI Changes the base texture the Game Object is using. The old texture is removed and the new one is referenced or fetched from the Cache.

If your Game Object is using a frame from a texture atlas and you just wish to change to another frame, then see the `frame` or `frameName` properties instead.

You should only use `loadTexture` if you want to replace the base texture entirely.

Calling this method causes a WebGL texture update, so use sparingly or in low-intensity portions of your game, or if you know the new texture is already on the GPU.

You can use the new const `Phaser.PENDING_ATLAS` as the texture key for any sprite. Doing this then sets the key to be the `frame` argument (the frame is set to zero).

This allows you to create sprites using `load.image` during development, and then change them to use a Texture Atlas later in development by simply searching your code for 'PENDING_ATLAS' and swapping it to be the key of the atlas data.

Note: You cannot use a RenderTexture as a texture for a TileSprite.

func (*Button) MoveDown

func (self *Button) MoveDown() *DisplayObject

MoveDown Moves this Game Object down one place in its parents display list. This call has no effect if the Game Object is already at the bottom of the display list.

If this Game Object hasn't been added to a custom Group then this method will move it one object down within the Game World, because the World is the root Group from which all Game Objects descend.

func (*Button) MoveDownI

func (self *Button) MoveDownI(args ...interface{}) *DisplayObject

MoveDownI Moves this Game Object down one place in its parents display list. This call has no effect if the Game Object is already at the bottom of the display list.

If this Game Object hasn't been added to a custom Group then this method will move it one object down within the Game World, because the World is the root Group from which all Game Objects descend.

func (*Button) MoveUp

func (self *Button) MoveUp() *DisplayObject

MoveUp Moves this Game Object up one place in its parents display list. This call has no effect if the Game Object is already at the top of the display list.

If this Game Object hasn't been added to a custom Group then this method will move it one object up within the Game World, because the World is the root Group from which all Game Objects descend.

func (*Button) MoveUpI

func (self *Button) MoveUpI(args ...interface{}) *DisplayObject

MoveUpI Moves this Game Object up one place in its parents display list. This call has no effect if the Game Object is already at the top of the display list.

If this Game Object hasn't been added to a custom Group then this method will move it one object up within the Game World, because the World is the root Group from which all Game Objects descend.

func (*Button) Name

func (self *Button) Name() string

Name A user defined name given to this Game Object. This value isn't ever used internally by Phaser, it is meant as a game level property.

func (*Button) OffsetX

func (self *Button) OffsetX() int

OffsetX The amount the Game Object is visually offset from its x coordinate. This is the same as `width * anchor.x`. It will only be > 0 if anchor.x is not equal to zero.

func (*Button) OffsetY

func (self *Button) OffsetY() int

OffsetY The amount the Game Object is visually offset from its y coordinate. This is the same as `height * anchor.y`. It will only be > 0 if anchor.y is not equal to zero.

func (*Button) OnDownSound

func (self *Button) OnDownSound() interface{}

OnDownSound The Sound to be played when this Buttons Down state is activated.

func (*Button) OnDownSoundMarker

func (self *Button) OnDownSoundMarker() string

OnDownSoundMarker The Sound Marker used in conjunction with the onDownSound.

func (*Button) OnInputDown

func (self *Button) OnInputDown() *Signal

OnInputDown The Signal (or event) dispatched when this Button is in an Down state.

func (*Button) OnInputDownHandler

func (self *Button) OnInputDownHandler(sprite *Button, pointer *Pointer)

OnInputDownHandler Internal function that handles input events.

func (*Button) OnInputDownHandlerI

func (self *Button) OnInputDownHandlerI(args ...interface{})

OnInputDownHandlerI Internal function that handles input events.

func (*Button) OnInputOut

func (self *Button) OnInputOut() *Signal

OnInputOut The Signal (or event) dispatched when this Button is in an Out state.

func (*Button) OnInputOutHandler

func (self *Button) OnInputOutHandler(sprite *Button, pointer *Pointer)

OnInputOutHandler Internal function that handles input events.

func (*Button) OnInputOutHandlerI

func (self *Button) OnInputOutHandlerI(args ...interface{})

OnInputOutHandlerI Internal function that handles input events.

func (*Button) OnInputOver

func (self *Button) OnInputOver() *Signal

OnInputOver The Signal (or event) dispatched when this Button is in an Over state.

func (*Button) OnInputOverHandler

func (self *Button) OnInputOverHandler(sprite *Button, pointer *Pointer)

OnInputOverHandler Internal function that handles input events.

func (*Button) OnInputOverHandlerI

func (self *Button) OnInputOverHandlerI(args ...interface{})

OnInputOverHandlerI Internal function that handles input events.

func (*Button) OnInputUp

func (self *Button) OnInputUp() *Signal

OnInputUp The Signal (or event) dispatched when this Button is in an Up state.

func (*Button) OnInputUpHandler

func (self *Button) OnInputUpHandler(sprite *Button, pointer *Pointer)

OnInputUpHandler Internal function that handles input events.

func (*Button) OnInputUpHandlerI

func (self *Button) OnInputUpHandlerI(args ...interface{})

OnInputUpHandlerI Internal function that handles input events.

func (*Button) OnOutSound

func (self *Button) OnOutSound() interface{}

OnOutSound The Sound to be played when this Buttons Out state is activated.

func (*Button) OnOutSoundMarker

func (self *Button) OnOutSoundMarker() string

OnOutSoundMarker The Sound Marker used in conjunction with the onOutSound.

func (*Button) OnOverMouseOnly

func (self *Button) OnOverMouseOnly() bool

OnOverMouseOnly If true then onOver events (such as onOverSound) will only be triggered if the Pointer object causing them was the Mouse Pointer. The frame will still be changed as applicable.

func (*Button) OnOverSound

func (self *Button) OnOverSound() interface{}

OnOverSound The Sound to be played when this Buttons Over state is activated.

func (*Button) OnOverSoundMarker

func (self *Button) OnOverSoundMarker() string

OnOverSoundMarker The Sound Marker used in conjunction with the onOverSound.

func (*Button) OnTextureUpdate

func (self *Button) OnTextureUpdate(event interface{})

OnTextureUpdate When the texture is updated, this event will fire to update the scale and frame

func (*Button) OnTextureUpdateI

func (self *Button) OnTextureUpdateI(args ...interface{})

OnTextureUpdateI When the texture is updated, this event will fire to update the scale and frame

func (*Button) OnUpSound

func (self *Button) OnUpSound() interface{}

OnUpSound The Sound to be played when this Buttons Up state is activated.

func (*Button) OnUpSoundMarker

func (self *Button) OnUpSoundMarker() string

OnUpSoundMarker The Sound Marker used in conjunction with the onUpSound.

func (*Button) Overlap

func (self *Button) Overlap(displayObject interface{}) bool

Overlap Checks to see if the bounds of this Game Object overlaps with the bounds of the given Display Object, which can be a Sprite, Image, TileSprite or anything that extends those such as Button or provides a `getBounds` method and result.

This check ignores the `hitArea` property if set and runs a `getBounds` comparison on both objects to determine the result.

Therefore it's relatively expensive to use in large quantities, i.e. with lots of Sprites at a high frequency. It should be fine for low-volume testing where physics isn't required.

func (*Button) OverlapI

func (self *Button) OverlapI(args ...interface{}) bool

OverlapI Checks to see if the bounds of this Game Object overlaps with the bounds of the given Display Object, which can be a Sprite, Image, TileSprite or anything that extends those such as Button or provides a `getBounds` method and result.

This check ignores the `hitArea` property if set and runs a `getBounds` comparison on both objects to determine the result.

Therefore it's relatively expensive to use in large quantities, i.e. with lots of Sprites at a high frequency. It should be fine for low-volume testing where physics isn't required.

func (*Button) PendingDestroy

func (self *Button) PendingDestroy() bool

PendingDestroy A Game Object is that is pendingDestroy is flagged to have its destroy method called on the next logic update. You can set it directly to allow you to flag an object to be destroyed on its next update.

This is extremely useful if you wish to destroy an object from within one of its own callbacks such as with Buttons or other Input events.

func (*Button) PhysicsType

func (self *Button) PhysicsType() int

PhysicsType The const physics body type of this object.

func (*Button) Play

func (self *Button) Play(name string) *Animation

Play Plays an Animation.

The animation should have previously been created via `animations.add`.

If the animation is already playing calling this again won't do anything. If you need to reset an already running animation do so directly on the Animation object itself or via `AnimationManager.stop`.

func (*Button) Play1O

func (self *Button) Play1O(name string, frameRate int) *Animation

Play1O Plays an Animation.

The animation should have previously been created via `animations.add`.

If the animation is already playing calling this again won't do anything. If you need to reset an already running animation do so directly on the Animation object itself or via `AnimationManager.stop`.

func (*Button) Play2O

func (self *Button) Play2O(name string, frameRate int, loop bool) *Animation

Play2O Plays an Animation.

The animation should have previously been created via `animations.add`.

If the animation is already playing calling this again won't do anything. If you need to reset an already running animation do so directly on the Animation object itself or via `AnimationManager.stop`.

func (*Button) Play3O

func (self *Button) Play3O(name string, frameRate int, loop bool, killOnComplete bool) *Animation

Play3O Plays an Animation.

The animation should have previously been created via `animations.add`.

If the animation is already playing calling this again won't do anything. If you need to reset an already running animation do so directly on the Animation object itself or via `AnimationManager.stop`.

func (*Button) PlayI

func (self *Button) PlayI(args ...interface{}) *Animation

PlayI Plays an Animation.

The animation should have previously been created via `animations.add`.

If the animation is already playing calling this again won't do anything. If you need to reset an already running animation do so directly on the Animation object itself or via `AnimationManager.stop`.

func (*Button) PlayStateSound

func (self *Button) PlayStateSound(state interface{}) bool

PlayStateSound Play the sound for the given state, _if_ the state has a sound assigned.

func (*Button) PlayStateSoundI

func (self *Button) PlayStateSoundI(args ...interface{}) bool

PlayStateSoundI Play the sound for the given state, _if_ the state has a sound assigned.

func (*Button) PostUpdate

func (self *Button) PostUpdate()

PostUpdate Internal method called by the World postUpdate cycle.

func (*Button) PostUpdateI

func (self *Button) PostUpdateI(args ...interface{})

PostUpdateI Internal method called by the World postUpdate cycle.

func (*Button) PreUpdate

func (self *Button) PreUpdate()

PreUpdate Automatically called by World.preUpdate.

func (*Button) PreUpdateI

func (self *Button) PreUpdateI(args ...interface{})

PreUpdateI Automatically called by World.preUpdate.

func (*Button) PreviousPosition

func (self *Button) PreviousPosition() *Point

PreviousPosition The position the Game Object was located in the previous frame.

func (*Button) PreviousRotation

func (self *Button) PreviousRotation() int

PreviousRotation The rotation the Game Object was in set to in the previous frame. Value is in radians.

func (*Button) RemoveChild

func (self *Button) RemoveChild(child *DisplayObject) *DisplayObject

RemoveChild Removes a child from the container.

func (*Button) RemoveChildAt

func (self *Button) RemoveChildAt(index int) *DisplayObject

RemoveChildAt Removes a child from the specified index position.

func (*Button) RemoveChildAtI

func (self *Button) RemoveChildAtI(args ...interface{}) *DisplayObject

RemoveChildAtI Removes a child from the specified index position.

func (*Button) RemoveChildI

func (self *Button) RemoveChildI(args ...interface{}) *DisplayObject

RemoveChildI Removes a child from the container.

func (*Button) RemoveChildren

func (self *Button) RemoveChildren(beginIndex int, endIndex int)

RemoveChildren Removes all children from this container that are within the begin and end indexes.

func (*Button) RemoveChildrenI

func (self *Button) RemoveChildrenI(args ...interface{})

RemoveChildrenI Removes all children from this container that are within the begin and end indexes.

func (*Button) RemovedFromWorld

func (self *Button) RemovedFromWorld()

RemovedFromWorld Called when this Button is removed from the World.

func (*Button) RemovedFromWorldI

func (self *Button) RemovedFromWorldI(args ...interface{})

RemovedFromWorldI Called when this Button is removed from the World.

func (*Button) RenderOrderID

func (self *Button) RenderOrderID() int

RenderOrderID The render order ID is used internally by the renderer and Input Manager and should not be modified. This property is mostly used internally by the renderers, but is exposed for the use of plugins.

func (*Button) Reset

func (self *Button) Reset(x int, y int) *DisplayObject

Reset Resets the Game Object.

This moves the Game Object to the given x/y world coordinates and sets `fresh`, `exists`, `visible` and `renderable` to true.

If this Game Object has the LifeSpan component it will also set `alive` to true and `health` to the given value.

If this Game Object has a Physics Body it will reset the Body.

func (*Button) Reset1O

func (self *Button) Reset1O(x int, y int, health int) *DisplayObject

Reset1O Resets the Game Object.

This moves the Game Object to the given x/y world coordinates and sets `fresh`, `exists`, `visible` and `renderable` to true.

If this Game Object has the LifeSpan component it will also set `alive` to true and `health` to the given value.

If this Game Object has a Physics Body it will reset the Body.

func (*Button) ResetFrame

func (self *Button) ResetFrame()

ResetFrame Resets the texture frame dimensions that the Game Object uses for rendering.

func (*Button) ResetFrameI

func (self *Button) ResetFrameI(args ...interface{})

ResetFrameI Resets the texture frame dimensions that the Game Object uses for rendering.

func (*Button) ResetI

func (self *Button) ResetI(args ...interface{}) *DisplayObject

ResetI Resets the Game Object.

This moves the Game Object to the given x/y world coordinates and sets `fresh`, `exists`, `visible` and `renderable` to true.

If this Game Object has the LifeSpan component it will also set `alive` to true and `health` to the given value.

If this Game Object has a Physics Body it will reset the Body.

func (*Button) ResizeFrame

func (self *Button) ResizeFrame(parent interface{}, width int, height int)

ResizeFrame Resizes the Frame dimensions that the Game Object uses for rendering.

You shouldn't normally need to ever call this, but in the case of special texture types such as Video or BitmapData it can be useful to adjust the dimensions directly in this way.

func (*Button) ResizeFrameI

func (self *Button) ResizeFrameI(args ...interface{})

ResizeFrameI Resizes the Frame dimensions that the Game Object uses for rendering.

You shouldn't normally need to ever call this, but in the case of special texture types such as Video or BitmapData it can be useful to adjust the dimensions directly in this way.

func (*Button) Revive

func (self *Button) Revive() *DisplayObject

Revive Brings a 'dead' Game Object back to life, optionally resetting its health value in the process.

A resurrected Game Object has its `alive`, `exists` and `visible` properties all set to true.

It will dispatch the `onRevived` event. Listen to `events.onRevived` for the signal.

func (*Button) Revive1O

func (self *Button) Revive1O(health int) *DisplayObject

Revive1O Brings a 'dead' Game Object back to life, optionally resetting its health value in the process.

A resurrected Game Object has its `alive`, `exists` and `visible` properties all set to true.

It will dispatch the `onRevived` event. Listen to `events.onRevived` for the signal.

func (*Button) ReviveI

func (self *Button) ReviveI(args ...interface{}) *DisplayObject

ReviveI Brings a 'dead' Game Object back to life, optionally resetting its health value in the process.

A resurrected Game Object has its `alive`, `exists` and `visible` properties all set to true.

It will dispatch the `onRevived` event. Listen to `events.onRevived` for the signal.

func (*Button) Right

func (self *Button) Right() int

Right The right coordinate of the Game Object. This is the same as `x + width - offsetX`.

func (*Button) ScaleMax

func (self *Button) ScaleMax() *Point

ScaleMax The maximum scale this Game Object will scale up to.

It allows you to prevent a parent from scaling this Game Object higher than the given value.

Set it to `null` to remove the limit.

func (*Button) ScaleMin

func (self *Button) ScaleMin() *Point

ScaleMin The minimum scale this Game Object will scale down to.

It allows you to prevent a parent from scaling this Game Object lower than the given value.

Set it to `null` to remove the limit.

func (*Button) SendToBack

func (self *Button) SendToBack() *DisplayObject

SendToBack Sends this Game Object to the bottom of its parents display list. Visually this means it will render below all other children in the same Group.

If this Game Object hasn't been added to a custom Group then this method will send it to the bottom of the Game World, because the World is the root Group from which all Game Objects descend.

func (*Button) SendToBackI

func (self *Button) SendToBackI(args ...interface{}) *DisplayObject

SendToBackI Sends this Game Object to the bottom of its parents display list. Visually this means it will render below all other children in the same Group.

If this Game Object hasn't been added to a custom Group then this method will send it to the bottom of the Game World, because the World is the root Group from which all Game Objects descend.

func (*Button) SetAliveA

func (self *Button) SetAliveA(member bool)

SetAliveA A useful flag to control if the Game Object is alive or dead.

This is set automatically by the Health components `damage` method should the object run out of health. Or you can toggle it via your game code.

This property is mostly just provided to be used by your game - it doesn't effect rendering or logic updates. However you can use `Group.getFirstAlive` in conjunction with this property for fast object pooling and recycling.

func (*Button) SetAnchorA

func (self *Button) SetAnchorA(member *Point)

SetAnchorA The anchor sets the origin point of the texture.

The default is 0,0 this means the texture's origin is the top left

Setting than anchor to 0.5,0.5 means the textures origin is centered

Setting the anchor to 1,1 would mean the textures origin points will be the bottom right corner

func (*Button) SetAngleA

func (self *Button) SetAngleA(member int)

SetAngleA The angle property is the rotation of the Game Object in *degrees* from its original orientation.

Values from 0 to 180 represent clockwise rotation; values from 0 to -180 represent counterclockwise rotation.

Values outside this range are added to or subtracted from 360 to obtain a value within the range. For example, the statement player.angle = 450 is the same as player.angle = 90.

If you wish to work in radians instead of degrees you can use the property `rotation` instead. Working in radians is slightly faster as it doesn't have to perform any calculations.

func (*Button) SetAnimationsA

func (self *Button) SetAnimationsA(member *AnimationManager)

SetAnimationsA If the Game Object is enabled for animation (such as a Phaser.Sprite) this is a reference to its AnimationManager instance. Through it you can create, play, pause and stop animations.

func (*Button) SetAutoCullA

func (self *Button) SetAutoCullA(member bool)

SetAutoCullA A Game Object with `autoCull` set to true will check its bounds against the World Camera every frame. If it is not intersecting the Camera bounds at any point then it has its `renderable` property set to `false`. This keeps the Game Object alive and still processing updates, but forces it to skip the render step entirely.

This is a relatively expensive operation, especially if enabled on hundreds of Game Objects. So enable it only if you know it's required, or you have tested performance and find it acceptable.

func (*Button) SetBlendModeA

func (self *Button) SetBlendModeA(member int)

SetBlendModeA The blend mode to be applied to the sprite. Set to PIXI.blendModes.NORMAL to remove any blend mode.

Warning: You cannot have a blend mode and a filter active on the same Sprite. Doing so will render the sprite invisible.

func (*Button) SetBottomA

func (self *Button) SetBottomA(member int)

SetBottomA The sum of the y and height properties. This is the same as `y + height - offsetY`.

func (*Button) SetCameraOffsetA

func (self *Button) SetCameraOffsetA(member *Point)

SetCameraOffsetA The x/y coordinate offset applied to the top-left of the camera that this Game Object will be drawn at if `fixedToCamera` is true.

The values are relative to the top-left of the camera view and in addition to any parent of the Game Object on the display list.

func (*Button) SetCenterXA

func (self *Button) SetCenterXA(member int)

SetCenterXA The center x coordinate of the Game Object. This is the same as `(x - offsetX) + (width / 2)`.

func (*Button) SetCenterYA

func (self *Button) SetCenterYA(member int)

SetCenterYA The center y coordinate of the Game Object. This is the same as `(y - offsetY) + (height / 2)`.

func (*Button) SetChildIndex

func (self *Button) SetChildIndex(child *DisplayObject, index int)

SetChildIndex Changes the position of an existing child in the display object container

func (*Button) SetChildIndexI

func (self *Button) SetChildIndexI(args ...interface{})

SetChildIndexI Changes the position of an existing child in the display object container

func (*Button) SetChildrenA

func (self *Button) SetChildrenA(member []DisplayObject)

SetChildrenA [read-only] The array of children of this container.

func (*Button) SetComponentsA

func (self *Button) SetComponentsA(member interface{})

SetComponentsA The components this Game Object has installed.

func (*Button) SetCropRectA

func (self *Button) SetCropRectA(member *Rectangle)

SetCropRectA The Rectangle used to crop the texture this Game Object uses. Set this property via `crop`. If you modify this property directly you must call `updateCrop` in order to have the change take effect.

func (*Button) SetDataA

func (self *Button) SetDataA(member interface{})

SetDataA An empty Object that belongs to this Game Object. This value isn't ever used internally by Phaser, but may be used by your own code, or by Phaser Plugins, to store data that needs to be associated with the Game Object, without polluting the Game Object directly.

func (*Button) SetDebugA

func (self *Button) SetDebugA(member bool)

SetDebugA A debug flag designed for use with `Game.enableStep`.

func (*Button) SetDestroyPhaseA

func (self *Button) SetDestroyPhaseA(member bool)

SetDestroyPhaseA As a Game Object runs through its destroy method this flag is set to true, and can be checked in any sub-systems or plugins it is being destroyed from.

func (*Button) SetDownSound

func (self *Button) SetDownSound(sound interface{})

SetDownSound The Sound to be played when a Pointer presses down on this Button.

func (*Button) SetDownSound1O

func (self *Button) SetDownSound1O(sound interface{}, marker string)

SetDownSound1O The Sound to be played when a Pointer presses down on this Button.

func (*Button) SetDownSoundI

func (self *Button) SetDownSoundI(args ...interface{})

SetDownSoundI The Sound to be played when a Pointer presses down on this Button.

func (*Button) SetEventsA

func (self *Button) SetEventsA(member *Events)

SetEventsA All Phaser Game Objects have an Events class which contains all of the events that are dispatched when certain things happen to this Game Object, or any of its components.

func (*Button) SetExistsA

func (self *Button) SetExistsA(member bool)

SetExistsA Controls if this Sprite is processed by the core Phaser game loops and Group loops.

func (*Button) SetFixedToCameraA

func (self *Button) SetFixedToCameraA(member bool)

SetFixedToCameraA A Game Object that is "fixed" to the camera uses its x/y coordinates as offsets from the top left of the camera during rendering.

The values are adjusted at the rendering stage, overriding the Game Objects actual world position.

The end result is that the Game Object will appear to be 'fixed' to the camera, regardless of where in the game world the camera is viewing. This is useful if for example this Game Object is a UI item that you wish to be visible at all times regardless where in the world the camera is.

The offsets are stored in the `cameraOffset` property.

Note that the `cameraOffset` values are in addition to any parent of this Game Object on the display list.

Be careful not to set `fixedToCamera` on Game Objects which are in Groups that already have `fixedToCamera` enabled on them.

func (*Button) SetForceOutA

func (self *Button) SetForceOutA(member interface{})

SetForceOutA When the Button is touched / clicked and then released you can force it to enter a state of "out" instead of "up".

This can also accept a {@link Phaser.PointerModer pointer mode bitmask} for more refined control.

func (*Button) SetFrame

func (self *Button) SetFrame(frame *Frame)

SetFrame Sets the texture frame the Game Object uses for rendering.

This is primarily an internal method used by `loadTexture`, but is exposed for the use of plugins and custom classes.

func (*Button) SetFrameA

func (self *Button) SetFrameA(member int)

SetFrameA Gets or sets the current frame index of the texture being used to render this Game Object.

To change the frame set `frame` to the index of the new frame in the sprite sheet you wish this Game Object to use, for example: `player.frame = 4`.

If the frame index given doesn't exist it will revert to the first frame found in the texture.

If you are using a texture atlas then you should use the `frameName` property instead.

If you wish to fully replace the texture being used see `loadTexture`.

func (*Button) SetFrameI

func (self *Button) SetFrameI(args ...interface{})

SetFrameI Sets the texture frame the Game Object uses for rendering.

This is primarily an internal method used by `loadTexture`, but is exposed for the use of plugins and custom classes.

func (*Button) SetFrameNameA

func (self *Button) SetFrameNameA(member string)

SetFrameNameA Gets or sets the current frame name of the texture being used to render this Game Object.

To change the frame set `frameName` to the name of the new frame in the texture atlas you wish this Game Object to use, for example: `player.frameName = "idle"`.

If the frame name given doesn't exist it will revert to the first frame found in the texture and throw a console warning.

If you are using a sprite sheet then you should use the `frame` property instead.

If you wish to fully replace the texture being used see `loadTexture`.

func (*Button) SetFrames

func (self *Button) SetFrames()

SetFrames Used to manually set the frames that will be used for the different states of the Button.

Frames can be specified as either an integer (the frame ID) or a string (the frame name); these are the same values that can be used with a Sprite constructor.

func (*Button) SetFrames1O

func (self *Button) SetFrames1O(overFrame interface{})

SetFrames1O Used to manually set the frames that will be used for the different states of the Button.

Frames can be specified as either an integer (the frame ID) or a string (the frame name); these are the same values that can be used with a Sprite constructor.

func (*Button) SetFrames2O

func (self *Button) SetFrames2O(overFrame interface{}, outFrame interface{})

SetFrames2O Used to manually set the frames that will be used for the different states of the Button.

Frames can be specified as either an integer (the frame ID) or a string (the frame name); these are the same values that can be used with a Sprite constructor.

func (*Button) SetFrames3O

func (self *Button) SetFrames3O(overFrame interface{}, outFrame interface{}, downFrame interface{})

SetFrames3O Used to manually set the frames that will be used for the different states of the Button.

Frames can be specified as either an integer (the frame ID) or a string (the frame name); these are the same values that can be used with a Sprite constructor.

func (*Button) SetFrames4O

func (self *Button) SetFrames4O(overFrame interface{}, outFrame interface{}, downFrame interface{}, upFrame interface{})

SetFrames4O Used to manually set the frames that will be used for the different states of the Button.

Frames can be specified as either an integer (the frame ID) or a string (the frame name); these are the same values that can be used with a Sprite constructor.

func (*Button) SetFramesI

func (self *Button) SetFramesI(args ...interface{})

SetFramesI Used to manually set the frames that will be used for the different states of the Button.

Frames can be specified as either an integer (the frame ID) or a string (the frame name); these are the same values that can be used with a Sprite constructor.

func (*Button) SetFreezeFramesA

func (self *Button) SetFreezeFramesA(member bool)

SetFreezeFramesA When true the the texture frame will not be automatically switched on up/down/over/out events.

func (*Button) SetFreshA

func (self *Button) SetFreshA(member bool)

SetFreshA A Game Object is considered `fresh` if it has just been created or reset and is yet to receive a renderer transform update. This property is mostly used internally by the physics systems, but is exposed for the use of plugins.

func (*Button) SetGameA

func (self *Button) SetGameA(member *Game)

SetGameA A reference to the currently running Game.

func (*Button) SetHeightA

func (self *Button) SetHeightA(member int)

SetHeightA The height of the sprite, setting this will actually modify the scale to achieve the value set

func (*Button) SetIgnoreChildInputA

func (self *Button) SetIgnoreChildInputA(member bool)

SetIgnoreChildInputA If `ignoreChildInput` is `false` it will allow this objects _children_ to be considered as valid for Input events.

If this property is `true` then the children will _not_ be considered as valid for Input events.

Note that this property isn't recursive: only immediate children are influenced, it doesn't scan further down.

func (*Button) SetInCameraA

func (self *Button) SetInCameraA(member bool)

SetInCameraA Checks if the Game Objects bounds intersect with the Game Camera bounds. Returns `true` if they do, otherwise `false` if fully outside of the Cameras bounds.

func (*Button) SetInputA

func (self *Button) SetInputA(member interface{})

SetInputA The Input Handler for this Game Object.

By default it is disabled. If you wish this Game Object to process input events you should enable it with: `inputEnabled = true`.

After you have done this, this property will be a reference to the Phaser InputHandler.

func (*Button) SetInputEnabledA

func (self *Button) SetInputEnabledA(member bool)

SetInputEnabledA By default a Game Object won't process any input events. By setting `inputEnabled` to true a Phaser.InputHandler is created for this Game Object and it will then start to process click / touch events and more.

You can then access the Input Handler via `this.input`.

Note that Input related events are dispatched from `this.events`, i.e.: `events.onInputDown`.

If you set this property to false it will stop the Input Handler from processing any more input events.

If you want to _temporarily_ disable input for a Game Object, then it's better to set `input.enabled = false`, as it won't reset any of the Input Handlers internal properties. You can then toggle this back on as needed.

func (*Button) SetJustReleasedPreventsOverA

func (self *Button) SetJustReleasedPreventsOverA(member *PointerMode)

SetJustReleasedPreventsOverA Suppress the over event if a pointer was just released and it matches the given {@link Phaser.PointerModer pointer mode bitmask}.

This behavior was introduced in Phaser 2.3.1; this property is a soft-revert of the change.

func (*Button) SetKeyA

func (self *Button) SetKeyA(member interface{})

SetKeyA The key of the image or texture used by this Game Object during rendering. If it is a string it's the string used to retrieve the texture from the Phaser Image Cache. It can also be an instance of a RenderTexture, BitmapData, Video or PIXI.Texture. If a Game Object is created without a key it is automatically assigned the key `__default` which is a 32x32 transparent PNG stored within the Cache. If a Game Object is given a key which doesn't exist in the Image Cache it is re-assigned the key `__missing` which is a 32x32 PNG of a green box with a line through it.

func (*Button) SetLeftA

func (self *Button) SetLeftA(member int)

SetLeftA The left coordinate of the Game Object. This is the same as `x - offsetX`.

func (*Button) SetLifespanA

func (self *Button) SetLifespanA(member int)

SetLifespanA The lifespan allows you to give a Game Object a lifespan in milliseconds.

Once the Game Object is 'born' you can set this to a positive value.

It is automatically decremented by the millisecond equivalent of `game.time.physicsElapsed` each frame. When it reaches zero it will call the `kill` method.

Very handy for particles, bullets, collectibles, or any other short-lived entity.

func (*Button) SetNameA

func (self *Button) SetNameA(member string)

SetNameA A user defined name given to this Game Object. This value isn't ever used internally by Phaser, it is meant as a game level property.

func (*Button) SetOffsetXA

func (self *Button) SetOffsetXA(member int)

SetOffsetXA The amount the Game Object is visually offset from its x coordinate. This is the same as `width * anchor.x`. It will only be > 0 if anchor.x is not equal to zero.

func (*Button) SetOffsetYA

func (self *Button) SetOffsetYA(member int)

SetOffsetYA The amount the Game Object is visually offset from its y coordinate. This is the same as `height * anchor.y`. It will only be > 0 if anchor.y is not equal to zero.

func (*Button) SetOnDownSoundA

func (self *Button) SetOnDownSoundA(member interface{})

SetOnDownSoundA The Sound to be played when this Buttons Down state is activated.

func (*Button) SetOnDownSoundMarkerA

func (self *Button) SetOnDownSoundMarkerA(member string)

SetOnDownSoundMarkerA The Sound Marker used in conjunction with the onDownSound.

func (*Button) SetOnInputDownA

func (self *Button) SetOnInputDownA(member *Signal)

SetOnInputDownA The Signal (or event) dispatched when this Button is in an Down state.

func (*Button) SetOnInputOutA

func (self *Button) SetOnInputOutA(member *Signal)

SetOnInputOutA The Signal (or event) dispatched when this Button is in an Out state.

func (*Button) SetOnInputOverA

func (self *Button) SetOnInputOverA(member *Signal)

SetOnInputOverA The Signal (or event) dispatched when this Button is in an Over state.

func (*Button) SetOnInputUpA

func (self *Button) SetOnInputUpA(member *Signal)

SetOnInputUpA The Signal (or event) dispatched when this Button is in an Up state.

func (*Button) SetOnOutSoundA

func (self *Button) SetOnOutSoundA(member interface{})

SetOnOutSoundA The Sound to be played when this Buttons Out state is activated.

func (*Button) SetOnOutSoundMarkerA

func (self *Button) SetOnOutSoundMarkerA(member string)

SetOnOutSoundMarkerA The Sound Marker used in conjunction with the onOutSound.

func (*Button) SetOnOverMouseOnlyA

func (self *Button) SetOnOverMouseOnlyA(member bool)

SetOnOverMouseOnlyA If true then onOver events (such as onOverSound) will only be triggered if the Pointer object causing them was the Mouse Pointer. The frame will still be changed as applicable.

func (*Button) SetOnOverSoundA

func (self *Button) SetOnOverSoundA(member interface{})

SetOnOverSoundA The Sound to be played when this Buttons Over state is activated.

func (*Button) SetOnOverSoundMarkerA

func (self *Button) SetOnOverSoundMarkerA(member string)

SetOnOverSoundMarkerA The Sound Marker used in conjunction with the onOverSound.

func (*Button) SetOnUpSoundA

func (self *Button) SetOnUpSoundA(member interface{})

SetOnUpSoundA The Sound to be played when this Buttons Up state is activated.

func (*Button) SetOnUpSoundMarkerA

func (self *Button) SetOnUpSoundMarkerA(member string)

SetOnUpSoundMarkerA The Sound Marker used in conjunction with the onUpSound.

func (*Button) SetOutSound

func (self *Button) SetOutSound(sound interface{})

SetOutSound The Sound to be played when a Pointer moves out of this Button.

func (*Button) SetOutSound1O

func (self *Button) SetOutSound1O(sound interface{}, marker string)

SetOutSound1O The Sound to be played when a Pointer moves out of this Button.

func (*Button) SetOutSoundI

func (self *Button) SetOutSoundI(args ...interface{})

SetOutSoundI The Sound to be played when a Pointer moves out of this Button.

func (*Button) SetOverSound

func (self *Button) SetOverSound(sound interface{})

SetOverSound The Sound to be played when a Pointer moves over this Button.

func (*Button) SetOverSound1O

func (self *Button) SetOverSound1O(sound interface{}, marker string)

SetOverSound1O The Sound to be played when a Pointer moves over this Button.

func (*Button) SetOverSoundI

func (self *Button) SetOverSoundI(args ...interface{})

SetOverSoundI The Sound to be played when a Pointer moves over this Button.

func (*Button) SetPendingDestroyA

func (self *Button) SetPendingDestroyA(member bool)

SetPendingDestroyA A Game Object is that is pendingDestroy is flagged to have its destroy method called on the next logic update. You can set it directly to allow you to flag an object to be destroyed on its next update.

This is extremely useful if you wish to destroy an object from within one of its own callbacks such as with Buttons or other Input events.

func (*Button) SetPhysicsTypeA

func (self *Button) SetPhysicsTypeA(member int)

SetPhysicsTypeA The const physics body type of this object.

func (*Button) SetPreviousPositionA

func (self *Button) SetPreviousPositionA(member *Point)

SetPreviousPositionA The position the Game Object was located in the previous frame.

func (*Button) SetPreviousRotationA

func (self *Button) SetPreviousRotationA(member int)

SetPreviousRotationA The rotation the Game Object was in set to in the previous frame. Value is in radians.

func (*Button) SetRenderOrderIDA

func (self *Button) SetRenderOrderIDA(member int)

SetRenderOrderIDA The render order ID is used internally by the renderer and Input Manager and should not be modified. This property is mostly used internally by the renderers, but is exposed for the use of plugins.

func (*Button) SetRightA

func (self *Button) SetRightA(member int)

SetRightA The right coordinate of the Game Object. This is the same as `x + width - offsetX`.

func (*Button) SetScaleMaxA

func (self *Button) SetScaleMaxA(member *Point)

SetScaleMaxA The maximum scale this Game Object will scale up to.

It allows you to prevent a parent from scaling this Game Object higher than the given value.

Set it to `null` to remove the limit.

func (*Button) SetScaleMinA

func (self *Button) SetScaleMinA(member *Point)

SetScaleMinA The minimum scale this Game Object will scale down to.

It allows you to prevent a parent from scaling this Game Object lower than the given value.

Set it to `null` to remove the limit.

func (*Button) SetScaleMinMax

func (self *Button) SetScaleMinMax(minX interface{}, minY interface{}, maxX interface{}, maxY interface{})

SetScaleMinMax Sets the scaleMin and scaleMax values. These values are used to limit how far this Game Object will scale based on its parent.

For example if this Game Object has a `minScale` value of 1 and its parent has a `scale` value of 0.5, the 0.5 will be ignored and the scale value of 1 will be used, as the parents scale is lower than the minimum scale this Game Object should adhere to.

By setting these values you can carefully control how Game Objects deal with responsive scaling.

If only one parameter is given then that value will be used for both scaleMin and scaleMax: `setScaleMinMax(1)` = scaleMin.x, scaleMin.y, scaleMax.x and scaleMax.y all = 1

If only two parameters are given the first is set as scaleMin.x and y and the second as scaleMax.x and y: `setScaleMinMax(0.5, 2)` = scaleMin.x and y = 0.5 and scaleMax.x and y = 2

If you wish to set `scaleMin` with different values for x and y then either modify Game Object.scaleMin directly, or pass `null` for the `maxX` and `maxY` parameters.

Call `setScaleMinMax(null)` to clear all previously set values.

func (*Button) SetScaleMinMaxI

func (self *Button) SetScaleMinMaxI(args ...interface{})

SetScaleMinMaxI Sets the scaleMin and scaleMax values. These values are used to limit how far this Game Object will scale based on its parent.

For example if this Game Object has a `minScale` value of 1 and its parent has a `scale` value of 0.5, the 0.5 will be ignored and the scale value of 1 will be used, as the parents scale is lower than the minimum scale this Game Object should adhere to.

By setting these values you can carefully control how Game Objects deal with responsive scaling.

If only one parameter is given then that value will be used for both scaleMin and scaleMax: `setScaleMinMax(1)` = scaleMin.x, scaleMin.y, scaleMax.x and scaleMax.y all = 1

If only two parameters are given the first is set as scaleMin.x and y and the second as scaleMax.x and y: `setScaleMinMax(0.5, 2)` = scaleMin.x and y = 0.5 and scaleMax.x and y = 2

If you wish to set `scaleMin` with different values for x and y then either modify Game Object.scaleMin directly, or pass `null` for the `maxX` and `maxY` parameters.

Call `setScaleMinMax(null)` to clear all previously set values.

func (*Button) SetShaderA

func (self *Button) SetShaderA(member *AbstractFilter)

SetShaderA The shader that will be used to render this Sprite.

Set to null to remove a current shader.

func (*Button) SetSmoothedA

func (self *Button) SetSmoothedA(member bool)

SetSmoothedA Enable or disable texture smoothing for this Game Object.

It only takes effect if the Game Object is using an image based texture.

Smoothing is enabled by default.

func (*Button) SetSounds

func (self *Button) SetSounds()

SetSounds Sets the sounds to be played whenever this Button is interacted with. Sounds can be either full Sound objects, or markers pointing to a section of a Sound object. The most common forms of sounds are 'hover' effects and 'click' effects, which is why the order of the parameters is overSound then downSound.

Call this function with no parameters to reset all sounds on this Button.

func (*Button) SetSounds1O

func (self *Button) SetSounds1O(overSound interface{})

SetSounds1O Sets the sounds to be played whenever this Button is interacted with. Sounds can be either full Sound objects, or markers pointing to a section of a Sound object. The most common forms of sounds are 'hover' effects and 'click' effects, which is why the order of the parameters is overSound then downSound.

Call this function with no parameters to reset all sounds on this Button.

func (*Button) SetSounds2O

func (self *Button) SetSounds2O(overSound interface{}, overMarker string)

SetSounds2O Sets the sounds to be played whenever this Button is interacted with. Sounds can be either full Sound objects, or markers pointing to a section of a Sound object. The most common forms of sounds are 'hover' effects and 'click' effects, which is why the order of the parameters is overSound then downSound.

Call this function with no parameters to reset all sounds on this Button.

func (*Button) SetSounds3O

func (self *Button) SetSounds3O(overSound interface{}, overMarker string, downSound interface{})

SetSounds3O Sets the sounds to be played whenever this Button is interacted with. Sounds can be either full Sound objects, or markers pointing to a section of a Sound object. The most common forms of sounds are 'hover' effects and 'click' effects, which is why the order of the parameters is overSound then downSound.

Call this function with no parameters to reset all sounds on this Button.

func (*Button) SetSounds4O

func (self *Button) SetSounds4O(overSound interface{}, overMarker string, downSound interface{}, downMarker string)

SetSounds4O Sets the sounds to be played whenever this Button is interacted with. Sounds can be either full Sound objects, or markers pointing to a section of a Sound object. The most common forms of sounds are 'hover' effects and 'click' effects, which is why the order of the parameters is overSound then downSound.

Call this function with no parameters to reset all sounds on this Button.

func (*Button) SetSounds5O

func (self *Button) SetSounds5O(overSound interface{}, overMarker string, downSound interface{}, downMarker string, outSound interface{})

SetSounds5O Sets the sounds to be played whenever this Button is interacted with. Sounds can be either full Sound objects, or markers pointing to a section of a Sound object. The most common forms of sounds are 'hover' effects and 'click' effects, which is why the order of the parameters is overSound then downSound.

Call this function with no parameters to reset all sounds on this Button.

func (*Button) SetSounds6O

func (self *Button) SetSounds6O(overSound interface{}, overMarker string, downSound interface{}, downMarker string, outSound interface{}, outMarker string)

SetSounds6O Sets the sounds to be played whenever this Button is interacted with. Sounds can be either full Sound objects, or markers pointing to a section of a Sound object. The most common forms of sounds are 'hover' effects and 'click' effects, which is why the order of the parameters is overSound then downSound.

Call this function with no parameters to reset all sounds on this Button.

func (*Button) SetSounds7O

func (self *Button) SetSounds7O(overSound interface{}, overMarker string, downSound interface{}, downMarker string, outSound interface{}, outMarker string, upSound interface{})

SetSounds7O Sets the sounds to be played whenever this Button is interacted with. Sounds can be either full Sound objects, or markers pointing to a section of a Sound object. The most common forms of sounds are 'hover' effects and 'click' effects, which is why the order of the parameters is overSound then downSound.

Call this function with no parameters to reset all sounds on this Button.

func (*Button) SetSounds8O

func (self *Button) SetSounds8O(overSound interface{}, overMarker string, downSound interface{}, downMarker string, outSound interface{}, outMarker string, upSound interface{}, upMarker string)

SetSounds8O Sets the sounds to be played whenever this Button is interacted with. Sounds can be either full Sound objects, or markers pointing to a section of a Sound object. The most common forms of sounds are 'hover' effects and 'click' effects, which is why the order of the parameters is overSound then downSound.

Call this function with no parameters to reset all sounds on this Button.

func (*Button) SetSoundsI

func (self *Button) SetSoundsI(args ...interface{})

SetSoundsI Sets the sounds to be played whenever this Button is interacted with. Sounds can be either full Sound objects, or markers pointing to a section of a Sound object. The most common forms of sounds are 'hover' effects and 'click' effects, which is why the order of the parameters is overSound then downSound.

Call this function with no parameters to reset all sounds on this Button.

func (*Button) SetStateFrame

func (self *Button) SetStateFrame(state interface{}, frame interface{}, switchImmediately bool)

SetStateFrame Set the frame name/ID for the given state.

func (*Button) SetStateFrameI

func (self *Button) SetStateFrameI(args ...interface{})

SetStateFrameI Set the frame name/ID for the given state.

func (*Button) SetStateSound

func (self *Button) SetStateSound(state interface{})

SetStateSound Set the sound/marker for the given state.

func (*Button) SetStateSound1O

func (self *Button) SetStateSound1O(state interface{}, sound interface{})

SetStateSound1O Set the sound/marker for the given state.

func (*Button) SetStateSound2O

func (self *Button) SetStateSound2O(state interface{}, sound interface{}, marker string)

SetStateSound2O Set the sound/marker for the given state.

func (*Button) SetStateSoundI

func (self *Button) SetStateSoundI(args ...interface{})

SetStateSoundI Set the sound/marker for the given state.

func (*Button) SetTexture

func (self *Button) SetTexture(texture *Texture)

SetTexture Sets the texture of the sprite. Be warned that this doesn't remove or destroy the previous

texture this Sprite was using.

func (*Button) SetTexture1O

func (self *Button) SetTexture1O(texture *Texture, destroy bool)

SetTexture1O Sets the texture of the sprite. Be warned that this doesn't remove or destroy the previous

texture this Sprite was using.

func (*Button) SetTextureA

func (self *Button) SetTextureA(member *Texture)

SetTextureA The texture that the sprite is using

func (*Button) SetTextureI

func (self *Button) SetTextureI(args ...interface{})

SetTextureI Sets the texture of the sprite. Be warned that this doesn't remove or destroy the previous

texture this Sprite was using.

func (*Button) SetTintA

func (self *Button) SetTintA(member int)

SetTintA The tint applied to the sprite. This is a hex value. A value of 0xFFFFFF will remove any tint effect.

func (*Button) SetTintedTextureA

func (self *Button) SetTintedTextureA(member *Canvas)

SetTintedTextureA A canvas that contains the tinted version of the Sprite (in Canvas mode, WebGL doesn't populate this)

func (*Button) SetTopA

func (self *Button) SetTopA(member int)

SetTopA The y coordinate of the Game Object. This is the same as `y - offsetY`.

func (*Button) SetTransformCallbackA

func (self *Button) SetTransformCallbackA(member interface{})

SetTransformCallbackA The callback that will apply any scale limiting to the worldTransform.

func (*Button) SetTransformCallbackContextA

func (self *Button) SetTransformCallbackContextA(member interface{})

SetTransformCallbackContextA The context under which `transformCallback` is called.

func (*Button) SetTypeA

func (self *Button) SetTypeA(member int)

SetTypeA The Phaser Object Type.

func (*Button) SetUpSound

func (self *Button) SetUpSound(sound interface{})

SetUpSound The Sound to be played when a Pointer has pressed down and is released from this Button.

func (*Button) SetUpSound1O

func (self *Button) SetUpSound1O(sound interface{}, marker string)

SetUpSound1O The Sound to be played when a Pointer has pressed down and is released from this Button.

func (*Button) SetUpSoundI

func (self *Button) SetUpSoundI(args ...interface{})

SetUpSoundI The Sound to be played when a Pointer has pressed down and is released from this Button.

func (*Button) SetWidthA

func (self *Button) SetWidthA(member int)

SetWidthA The width of the sprite, setting this will actually modify the scale to achieve the value set

func (*Button) SetWorldA

func (self *Button) SetWorldA(member *Point)

SetWorldA The world coordinates of this Game Object in pixels. Depending on where in the display list this Game Object is placed this value can differ from `position`, which contains the x/y coordinates relative to the Game Objects parent.

func (*Button) SetZA

func (self *Button) SetZA(member int)

SetZA The z depth of this Game Object within its parent Group. No two objects in a Group can have the same z value. This value is adjusted automatically whenever the Group hierarchy changes. If you wish to re-order the layering of a Game Object then see methods like Group.moveUp or Group.bringToTop.

func (*Button) Shader

func (self *Button) Shader() *AbstractFilter

Shader The shader that will be used to render this Sprite.

Set to null to remove a current shader.

func (*Button) Smoothed

func (self *Button) Smoothed() bool

Smoothed Enable or disable texture smoothing for this Game Object.

It only takes effect if the Game Object is using an image based texture.

Smoothing is enabled by default.

func (*Button) SwapChildren

func (self *Button) SwapChildren(child *DisplayObject, child2 *DisplayObject)

SwapChildren Swaps the position of 2 Display Objects within this container.

func (*Button) SwapChildrenI

func (self *Button) SwapChildrenI(args ...interface{})

SwapChildrenI Swaps the position of 2 Display Objects within this container.

func (*Button) Texture

func (self *Button) Texture() *Texture

Texture The texture that the sprite is using

func (*Button) Tint

func (self *Button) Tint() int

Tint The tint applied to the sprite. This is a hex value. A value of 0xFFFFFF will remove any tint effect.

func (*Button) TintedTexture

func (self *Button) TintedTexture() *Canvas

TintedTexture A canvas that contains the tinted version of the Sprite (in Canvas mode, WebGL doesn't populate this)

func (*Button) Top

func (self *Button) Top() int

Top The y coordinate of the Game Object. This is the same as `y - offsetY`.

func (*Button) TransformCallback

func (self *Button) TransformCallback() interface{}

TransformCallback The callback that will apply any scale limiting to the worldTransform.

func (*Button) TransformCallbackContext

func (self *Button) TransformCallbackContext() interface{}

TransformCallbackContext The context under which `transformCallback` is called.

func (*Button) Type

func (self *Button) Type() int

Type The Phaser Object Type.

func (*Button) Update

func (self *Button) Update()

Update Override this method in your own custom objects to handle any update requirements. It is called immediately after `preUpdate` and before `postUpdate`. Remember if this Game Object has any children you should call update on those too.

func (*Button) UpdateCrop

func (self *Button) UpdateCrop()

UpdateCrop If you have set a crop rectangle on this Game Object via `crop` and since modified the `cropRect` property, or the rectangle it references, then you need to update the crop frame by calling this method.

func (*Button) UpdateCropI

func (self *Button) UpdateCropI(args ...interface{})

UpdateCropI If you have set a crop rectangle on this Game Object via `crop` and since modified the `cropRect` property, or the rectangle it references, then you need to update the crop frame by calling this method.

func (*Button) UpdateI

func (self *Button) UpdateI(args ...interface{})

UpdateI Override this method in your own custom objects to handle any update requirements. It is called immediately after `preUpdate` and before `postUpdate`. Remember if this Game Object has any children you should call update on those too.

func (*Button) Width

func (self *Button) Width() int

Width The width of the sprite, setting this will actually modify the scale to achieve the value set

func (*Button) World

func (self *Button) World() *Point

World The world coordinates of this Game Object in pixels. Depending on where in the display list this Game Object is placed this value can differ from `position`, which contains the x/y coordinates relative to the Game Objects parent.

func (*Button) Z

func (self *Button) Z() int

Z The z depth of this Game Object within its parent Group. No two objects in a Group can have the same z value. This value is adjusted automatically whenever the Group hierarchy changes. If you wish to re-order the layering of a Game Object then see methods like Group.moveUp or Group.bringToTop.

type Cache

type Cache struct {
	*js.Object
}

Cache Phaser has one single cache in which it stores all assets.

The cache is split up into sections, such as images, sounds, video, json, etc. All assets are stored using a unique string-based key as their identifier. Assets stored in different areas of the cache can have the same key, for example 'playerWalking' could be used as the key for both a sprite sheet and an audio file, because they are unique data types.

The cache is automatically populated by the Phaser.Loader. When you use the loader to pull in external assets such as images they are automatically placed into their respective cache. Most common Game Objects, such as Sprites and Videos automatically query the cache to extract the assets they need on instantiation.

You can access the cache from within a State via `this.cache`. From here you can call any public method it has, including adding new entries to it, deleting them or querying them.

Understand that almost without exception when you get an item from the cache it will return a reference to the item stored in the cache, not a copy of it. Therefore if you retrieve an item and then modify it, the original object in the cache will also be updated, even if you don't put it back into the cache again.

By default when you change State the cache is _not_ cleared, although there is an option to clear it should your game require it. In a typical game set-up the cache is populated once after the main game has loaded and then used as an asset store.

func NewCache

func NewCache(game *Game) *Cache

NewCache Phaser has one single cache in which it stores all assets.

The cache is split up into sections, such as images, sounds, video, json, etc. All assets are stored using a unique string-based key as their identifier. Assets stored in different areas of the cache can have the same key, for example 'playerWalking' could be used as the key for both a sprite sheet and an audio file, because they are unique data types.

The cache is automatically populated by the Phaser.Loader. When you use the loader to pull in external assets such as images they are automatically placed into their respective cache. Most common Game Objects, such as Sprites and Videos automatically query the cache to extract the assets they need on instantiation.

You can access the cache from within a State via `this.cache`. From here you can call any public method it has, including adding new entries to it, deleting them or querying them.

Understand that almost without exception when you get an item from the cache it will return a reference to the item stored in the cache, not a copy of it. Therefore if you retrieve an item and then modify it, the original object in the cache will also be updated, even if you don't put it back into the cache again.

By default when you change State the cache is _not_ cleared, although there is an option to clear it should your game require it. In a typical game set-up the cache is populated once after the main game has loaded and then used as an asset store.

func NewCacheI

func NewCacheI(args ...interface{}) *Cache

NewCacheI Phaser has one single cache in which it stores all assets.

The cache is split up into sections, such as images, sounds, video, json, etc. All assets are stored using a unique string-based key as their identifier. Assets stored in different areas of the cache can have the same key, for example 'playerWalking' could be used as the key for both a sprite sheet and an audio file, because they are unique data types.

The cache is automatically populated by the Phaser.Loader. When you use the loader to pull in external assets such as images they are automatically placed into their respective cache. Most common Game Objects, such as Sprites and Videos automatically query the cache to extract the assets they need on instantiation.

You can access the cache from within a State via `this.cache`. From here you can call any public method it has, including adding new entries to it, deleting them or querying them.

Understand that almost without exception when you get an item from the cache it will return a reference to the item stored in the cache, not a copy of it. Therefore if you retrieve an item and then modify it, the original object in the cache will also be updated, even if you don't put it back into the cache again.

By default when you change State the cache is _not_ cleared, although there is an option to clear it should your game require it. In a typical game set-up the cache is populated once after the main game has loaded and then used as an asset store.

func ToCache

func ToCache(jsStruct interface{}) *Cache

Cache Binding conversion method to Cache point

func (*Cache) AddBinary

func (self *Cache) AddBinary(key string, binaryData interface{})

AddBinary Add a binary object in to the cache.

func (*Cache) AddBinaryI

func (self *Cache) AddBinaryI(args ...interface{})

AddBinaryI Add a binary object in to the cache.

func (*Cache) AddBitmapData

func (self *Cache) AddBitmapData(key string, bitmapData *BitmapData) *BitmapData

AddBitmapData Add a BitmapData object to the cache.

func (*Cache) AddBitmapData1O

func (self *Cache) AddBitmapData1O(key string, bitmapData *BitmapData, frameData interface{}) *BitmapData

AddBitmapData1O Add a BitmapData object to the cache.

func (*Cache) AddBitmapDataI

func (self *Cache) AddBitmapDataI(args ...interface{}) *BitmapData

AddBitmapDataI Add a BitmapData object to the cache.

func (*Cache) AddBitmapFont

func (self *Cache) AddBitmapFont(key string, url string, data interface{}, atlasData interface{})

AddBitmapFont Add a new Bitmap Font to the Cache.

func (*Cache) AddBitmapFont1O

func (self *Cache) AddBitmapFont1O(key string, url string, data interface{}, atlasData interface{}, atlasType string)

AddBitmapFont1O Add a new Bitmap Font to the Cache.

func (*Cache) AddBitmapFont2O

func (self *Cache) AddBitmapFont2O(key string, url string, data interface{}, atlasData interface{}, atlasType string, xSpacing int)

AddBitmapFont2O Add a new Bitmap Font to the Cache.

func (*Cache) AddBitmapFont3O

func (self *Cache) AddBitmapFont3O(key string, url string, data interface{}, atlasData interface{}, atlasType string, xSpacing int, ySpacing int)

AddBitmapFont3O Add a new Bitmap Font to the Cache.

func (*Cache) AddBitmapFontI

func (self *Cache) AddBitmapFontI(args ...interface{})

AddBitmapFontI Add a new Bitmap Font to the Cache.

func (*Cache) AddCanvas

func (self *Cache) AddCanvas(key string, canvas *dom.HTMLCanvasElement)

AddCanvas Add a new canvas object in to the cache.

func (*Cache) AddCanvas1O

func (self *Cache) AddCanvas1O(key string, canvas *dom.HTMLCanvasElement, context *dom.CanvasRenderingContext2D)

AddCanvas1O Add a new canvas object in to the cache.

func (*Cache) AddCanvasI

func (self *Cache) AddCanvasI(args ...interface{})

AddCanvasI Add a new canvas object in to the cache.

func (*Cache) AddDefaultImage

func (self *Cache) AddDefaultImage()

AddDefaultImage Adds a default image to be used in special cases such as WebGL Filters. It uses the special reserved key of `__default`. This method is called automatically when the Cache is created. This image is skipped when `Cache.destroy` is called due to its internal requirements.

func (*Cache) AddDefaultImageI

func (self *Cache) AddDefaultImageI(args ...interface{})

AddDefaultImageI Adds a default image to be used in special cases such as WebGL Filters. It uses the special reserved key of `__default`. This method is called automatically when the Cache is created. This image is skipped when `Cache.destroy` is called due to its internal requirements.

func (*Cache) AddImage

func (self *Cache) AddImage(key string, url string, data interface{}) interface{}

AddImage Adds an Image file into the Cache. The file must have already been loaded, typically via Phaser.Loader, but can also have been loaded into the DOM. If an image already exists in the cache with the same key then it is removed and destroyed, and the new image inserted in its place.

func (*Cache) AddImageI

func (self *Cache) AddImageI(args ...interface{}) interface{}

AddImageI Adds an Image file into the Cache. The file must have already been loaded, typically via Phaser.Loader, but can also have been loaded into the DOM. If an image already exists in the cache with the same key then it is removed and destroyed, and the new image inserted in its place.

func (*Cache) AddJSON

func (self *Cache) AddJSON(key string, url string, data interface{})

AddJSON Add a new json object into the cache.

func (*Cache) AddJSONI

func (self *Cache) AddJSONI(args ...interface{})

AddJSONI Add a new json object into the cache.

func (*Cache) AddMissingImage

func (self *Cache) AddMissingImage()

AddMissingImage Adds an image to be used when a key is wrong / missing. It uses the special reserved key of `__missing`. This method is called automatically when the Cache is created. This image is skipped when `Cache.destroy` is called due to its internal requirements.

func (*Cache) AddMissingImageI

func (self *Cache) AddMissingImageI(args ...interface{})

AddMissingImageI Adds an image to be used when a key is wrong / missing. It uses the special reserved key of `__missing`. This method is called automatically when the Cache is created. This image is skipped when `Cache.destroy` is called due to its internal requirements.

func (*Cache) AddPhysicsData

func (self *Cache) AddPhysicsData(key string, url string, JSONData interface{}, format int)

AddPhysicsData Add a new physics data object to the Cache.

func (*Cache) AddPhysicsDataI

func (self *Cache) AddPhysicsDataI(args ...interface{})

AddPhysicsDataI Add a new physics data object to the Cache.

func (*Cache) AddRenderTexture

func (self *Cache) AddRenderTexture(key string, texture *RenderTexture)

AddRenderTexture Add a new Phaser.RenderTexture in to the cache.

func (*Cache) AddRenderTextureI

func (self *Cache) AddRenderTextureI(args ...interface{})

AddRenderTextureI Add a new Phaser.RenderTexture in to the cache.

func (*Cache) AddShader

func (self *Cache) AddShader(key string, url string, data interface{})

AddShader Adds a Fragment Shader in to the Cache. The file must have already been loaded, typically via Phaser.Loader.

func (*Cache) AddShaderI

func (self *Cache) AddShaderI(args ...interface{})

AddShaderI Adds a Fragment Shader in to the Cache. The file must have already been loaded, typically via Phaser.Loader.

func (*Cache) AddSound

func (self *Cache) AddSound(key string, url string, data interface{}, webAudio bool, audioTag bool)

AddSound Adds a Sound file into the Cache. The file must have already been loaded, typically via Phaser.Loader.

func (*Cache) AddSoundI

func (self *Cache) AddSoundI(args ...interface{})

AddSoundI Adds a Sound file into the Cache. The file must have already been loaded, typically via Phaser.Loader.

func (*Cache) AddSpriteSheet

func (self *Cache) AddSpriteSheet(key string, url string, data interface{}, frameWidth int, frameHeight int)

AddSpriteSheet Add a new sprite sheet in to the cache.

func (*Cache) AddSpriteSheet1O

func (self *Cache) AddSpriteSheet1O(key string, url string, data interface{}, frameWidth int, frameHeight int, frameMax int)

AddSpriteSheet1O Add a new sprite sheet in to the cache.

func (*Cache) AddSpriteSheet2O

func (self *Cache) AddSpriteSheet2O(key string, url string, data interface{}, frameWidth int, frameHeight int, frameMax int, margin int)

AddSpriteSheet2O Add a new sprite sheet in to the cache.

func (*Cache) AddSpriteSheet3O

func (self *Cache) AddSpriteSheet3O(key string, url string, data interface{}, frameWidth int, frameHeight int, frameMax int, margin int, spacing int)

AddSpriteSheet3O Add a new sprite sheet in to the cache.

func (*Cache) AddSpriteSheetI

func (self *Cache) AddSpriteSheetI(args ...interface{})

AddSpriteSheetI Add a new sprite sheet in to the cache.

func (*Cache) AddText

func (self *Cache) AddText(key string, url string, data interface{})

AddText Add a new text data.

func (*Cache) AddTextI

func (self *Cache) AddTextI(args ...interface{})

AddTextI Add a new text data.

func (*Cache) AddTextureAtlas

func (self *Cache) AddTextureAtlas(key string, url string, data interface{}, atlasData interface{}, format int)

AddTextureAtlas Add a new texture atlas to the Cache.

func (*Cache) AddTextureAtlasI

func (self *Cache) AddTextureAtlasI(args ...interface{})

AddTextureAtlasI Add a new texture atlas to the Cache.

func (*Cache) AddTilemap

func (self *Cache) AddTilemap(key string, url string, mapData interface{}, format int)

AddTilemap Add a new tilemap to the Cache.

func (*Cache) AddTilemapI

func (self *Cache) AddTilemapI(args ...interface{})

AddTilemapI Add a new tilemap to the Cache.

func (*Cache) AddVideo

func (self *Cache) AddVideo(key string, url string, data interface{}, isBlob bool)

AddVideo Adds a Video file into the Cache. The file must have already been loaded, typically via Phaser.Loader.

func (*Cache) AddVideoI

func (self *Cache) AddVideoI(args ...interface{})

AddVideoI Adds a Video file into the Cache. The file must have already been loaded, typically via Phaser.Loader.

func (*Cache) AddXML

func (self *Cache) AddXML(key string, url string, data interface{})

AddXML Add a new xml object into the cache.

func (*Cache) AddXMLI

func (self *Cache) AddXMLI(args ...interface{})

AddXMLI Add a new xml object into the cache.

func (*Cache) AutoResolveURL

func (self *Cache) AutoResolveURL() bool

AutoResolveURL Automatically resolve resource URLs to absolute paths for use with the Cache.getURL method.

func (*Cache) BINARY

func (self *Cache) BINARY() int

BINARY empty description

func (*Cache) BITMAPDATA

func (self *Cache) BITMAPDATA() int

BITMAPDATA empty description

func (*Cache) BITMAPFONT

func (self *Cache) BITMAPFONT() int

BITMAPFONT empty description

func (*Cache) CANVAS

func (self *Cache) CANVAS() int

CANVAS empty description

func (*Cache) CheckBinaryKey

func (self *Cache) CheckBinaryKey(key string) bool

CheckBinaryKey Checks if the given key exists in the Binary Cache.

func (*Cache) CheckBinaryKeyI

func (self *Cache) CheckBinaryKeyI(args ...interface{}) bool

CheckBinaryKeyI Checks if the given key exists in the Binary Cache.

func (*Cache) CheckBitmapDataKey

func (self *Cache) CheckBitmapDataKey(key string) bool

CheckBitmapDataKey Checks if the given key exists in the BitmapData Cache.

func (*Cache) CheckBitmapDataKeyI

func (self *Cache) CheckBitmapDataKeyI(args ...interface{}) bool

CheckBitmapDataKeyI Checks if the given key exists in the BitmapData Cache.

func (*Cache) CheckBitmapFontKey

func (self *Cache) CheckBitmapFontKey(key string) bool

CheckBitmapFontKey Checks if the given key exists in the BitmapFont Cache.

func (*Cache) CheckBitmapFontKeyI

func (self *Cache) CheckBitmapFontKeyI(args ...interface{}) bool

CheckBitmapFontKeyI Checks if the given key exists in the BitmapFont Cache.

func (*Cache) CheckCanvasKey

func (self *Cache) CheckCanvasKey(key string) bool

CheckCanvasKey Checks if the given key exists in the Canvas Cache.

func (*Cache) CheckCanvasKeyI

func (self *Cache) CheckCanvasKeyI(args ...interface{}) bool

CheckCanvasKeyI Checks if the given key exists in the Canvas Cache.

func (*Cache) CheckImageKey

func (self *Cache) CheckImageKey(key string) bool

CheckImageKey Checks if the given key exists in the Image Cache. Note that this also includes Texture Atlases, Sprite Sheets and Retro Fonts.

func (*Cache) CheckImageKeyI

func (self *Cache) CheckImageKeyI(args ...interface{}) bool

CheckImageKeyI Checks if the given key exists in the Image Cache. Note that this also includes Texture Atlases, Sprite Sheets and Retro Fonts.

func (*Cache) CheckJSONKey

func (self *Cache) CheckJSONKey(key string) bool

CheckJSONKey Checks if the given key exists in the JSON Cache.

func (*Cache) CheckJSONKeyI

func (self *Cache) CheckJSONKeyI(args ...interface{}) bool

CheckJSONKeyI Checks if the given key exists in the JSON Cache.

func (*Cache) CheckKey

func (self *Cache) CheckKey(cache int, key string) bool

CheckKey Checks if a key for the given cache object type exists.

func (*Cache) CheckKeyI

func (self *Cache) CheckKeyI(args ...interface{}) bool

CheckKeyI Checks if a key for the given cache object type exists.

func (*Cache) CheckPhysicsKey

func (self *Cache) CheckPhysicsKey(key string) bool

CheckPhysicsKey Checks if the given key exists in the Physics Cache.

func (*Cache) CheckPhysicsKeyI

func (self *Cache) CheckPhysicsKeyI(args ...interface{}) bool

CheckPhysicsKeyI Checks if the given key exists in the Physics Cache.

func (*Cache) CheckRenderTextureKey

func (self *Cache) CheckRenderTextureKey(key string) bool

CheckRenderTextureKey Checks if the given key exists in the Render Texture Cache.

func (*Cache) CheckRenderTextureKeyI

func (self *Cache) CheckRenderTextureKeyI(args ...interface{}) bool

CheckRenderTextureKeyI Checks if the given key exists in the Render Texture Cache.

func (*Cache) CheckShaderKey

func (self *Cache) CheckShaderKey(key string) bool

CheckShaderKey Checks if the given key exists in the Fragment Shader Cache.

func (*Cache) CheckShaderKeyI

func (self *Cache) CheckShaderKeyI(args ...interface{}) bool

CheckShaderKeyI Checks if the given key exists in the Fragment Shader Cache.

func (*Cache) CheckSoundKey

func (self *Cache) CheckSoundKey(key string) bool

CheckSoundKey Checks if the given key exists in the Sound Cache.

func (*Cache) CheckSoundKeyI

func (self *Cache) CheckSoundKeyI(args ...interface{}) bool

CheckSoundKeyI Checks if the given key exists in the Sound Cache.

func (*Cache) CheckTextKey

func (self *Cache) CheckTextKey(key string) bool

CheckTextKey Checks if the given key exists in the Text Cache.

func (*Cache) CheckTextKeyI

func (self *Cache) CheckTextKeyI(args ...interface{}) bool

CheckTextKeyI Checks if the given key exists in the Text Cache.

func (*Cache) CheckTextureKey

func (self *Cache) CheckTextureKey(key string) bool

CheckTextureKey Checks if the given key exists in the Texture Cache.

func (*Cache) CheckTextureKeyI

func (self *Cache) CheckTextureKeyI(args ...interface{}) bool

CheckTextureKeyI Checks if the given key exists in the Texture Cache.

func (*Cache) CheckTilemapKey

func (self *Cache) CheckTilemapKey(key string) bool

CheckTilemapKey Checks if the given key exists in the Tilemap Cache.

func (*Cache) CheckTilemapKeyI

func (self *Cache) CheckTilemapKeyI(args ...interface{}) bool

CheckTilemapKeyI Checks if the given key exists in the Tilemap Cache.

func (*Cache) CheckURL

func (self *Cache) CheckURL(url string) bool

CheckURL Checks if the given URL has been loaded into the Cache. This method will only work if Cache.autoResolveURL was set to `true` before any preloading took place. The method will make a DOM src call to the URL given, so please be aware of this for certain file types, such as Sound files on Firefox which may cause double-load instances.

func (*Cache) CheckURLI

func (self *Cache) CheckURLI(args ...interface{}) bool

CheckURLI Checks if the given URL has been loaded into the Cache. This method will only work if Cache.autoResolveURL was set to `true` before any preloading took place. The method will make a DOM src call to the URL given, so please be aware of this for certain file types, such as Sound files on Firefox which may cause double-load instances.

func (*Cache) CheckVideoKey

func (self *Cache) CheckVideoKey(key string) bool

CheckVideoKey Checks if the given key exists in the Video Cache.

func (*Cache) CheckVideoKeyI

func (self *Cache) CheckVideoKeyI(args ...interface{}) bool

CheckVideoKeyI Checks if the given key exists in the Video Cache.

func (*Cache) CheckXMLKey

func (self *Cache) CheckXMLKey(key string) bool

CheckXMLKey Checks if the given key exists in the XML Cache.

func (*Cache) CheckXMLKeyI

func (self *Cache) CheckXMLKeyI(args ...interface{}) bool

CheckXMLKeyI Checks if the given key exists in the XML Cache.

func (*Cache) ClearGLTextures

func (self *Cache) ClearGLTextures()

ClearGLTextures Empties out all of the GL Textures from Images stored in the cache. This is called automatically when the WebGL context is lost and then restored.

func (*Cache) ClearGLTexturesI

func (self *Cache) ClearGLTexturesI(args ...interface{})

ClearGLTexturesI Empties out all of the GL Textures from Images stored in the cache. This is called automatically when the WebGL context is lost and then restored.

func (*Cache) DEFAULT

func (self *Cache) DEFAULT() *Texture

DEFAULT The default image used for a texture when no other is specified.

func (*Cache) DecodedSound

func (self *Cache) DecodedSound(key string, data interface{})

DecodedSound Add a new decoded sound.

func (*Cache) DecodedSoundI

func (self *Cache) DecodedSoundI(args ...interface{})

DecodedSoundI Add a new decoded sound.

func (*Cache) Destroy

func (self *Cache) Destroy()

Destroy Clears the cache. Removes every local cache object reference. If an object in the cache has a `destroy` method it will also be called.

func (*Cache) DestroyI

func (self *Cache) DestroyI(args ...interface{})

DestroyI Clears the cache. Removes every local cache object reference. If an object in the cache has a `destroy` method it will also be called.

func (*Cache) Game

func (self *Cache) Game() *Game

Game Local reference to game.

func (*Cache) GetBaseTexture

func (self *Cache) GetBaseTexture(key string) *BaseTexture

GetBaseTexture Gets a PIXI.BaseTexture by key from the given Cache.

func (*Cache) GetBaseTexture1O

func (self *Cache) GetBaseTexture1O(key string, cache int) *BaseTexture

GetBaseTexture1O Gets a PIXI.BaseTexture by key from the given Cache.

func (*Cache) GetBaseTextureI

func (self *Cache) GetBaseTextureI(args ...interface{}) *BaseTexture

GetBaseTextureI Gets a PIXI.BaseTexture by key from the given Cache.

func (*Cache) GetBinary

func (self *Cache) GetBinary(key string) interface{}

GetBinary Gets a binary object from the cache.

The object is looked-up based on the key given.

Note: If the object cannot be found a `console.warn` message is displayed.

func (*Cache) GetBinaryI

func (self *Cache) GetBinaryI(args ...interface{}) interface{}

GetBinaryI Gets a binary object from the cache.

The object is looked-up based on the key given.

Note: If the object cannot be found a `console.warn` message is displayed.

func (*Cache) GetBitmapData

func (self *Cache) GetBitmapData(key string) *BitmapData

GetBitmapData Gets a BitmapData object from the cache.

The object is looked-up based on the key given.

Note: If the object cannot be found a `console.warn` message is displayed.

func (*Cache) GetBitmapDataI

func (self *Cache) GetBitmapDataI(args ...interface{}) *BitmapData

GetBitmapDataI Gets a BitmapData object from the cache.

The object is looked-up based on the key given.

Note: If the object cannot be found a `console.warn` message is displayed.

func (*Cache) GetBitmapFont

func (self *Cache) GetBitmapFont(key string) *BitmapFont

GetBitmapFont Gets a Bitmap Font object from the cache.

The object is looked-up based on the key given.

Note: If the object cannot be found a `console.warn` message is displayed.

func (*Cache) GetBitmapFontI

func (self *Cache) GetBitmapFontI(args ...interface{}) *BitmapFont

GetBitmapFontI Gets a Bitmap Font object from the cache.

The object is looked-up based on the key given.

Note: If the object cannot be found a `console.warn` message is displayed.

func (*Cache) GetCanvas

func (self *Cache) GetCanvas(key string) interface{}

GetCanvas Gets a Canvas object from the cache.

The object is looked-up based on the key given.

Note: If the object cannot be found a `console.warn` message is displayed.

func (*Cache) GetCanvasI

func (self *Cache) GetCanvasI(args ...interface{}) interface{}

GetCanvasI Gets a Canvas object from the cache.

The object is looked-up based on the key given.

Note: If the object cannot be found a `console.warn` message is displayed.

func (*Cache) GetFrame

func (self *Cache) GetFrame(key string) *Frame

GetFrame Get a single frame by key. You'd only do this to get the default Frame created for a non-atlas/spritesheet image.

func (*Cache) GetFrame1O

func (self *Cache) GetFrame1O(key string, cache int) *Frame

GetFrame1O Get a single frame by key. You'd only do this to get the default Frame created for a non-atlas/spritesheet image.

func (*Cache) GetFrameByIndex

func (self *Cache) GetFrameByIndex(key string, index int) *Frame

GetFrameByIndex Get a single frame out of a frameData set by key.

func (*Cache) GetFrameByIndex1O

func (self *Cache) GetFrameByIndex1O(key string, index int, cache int) *Frame

GetFrameByIndex1O Get a single frame out of a frameData set by key.

func (*Cache) GetFrameByIndexI

func (self *Cache) GetFrameByIndexI(args ...interface{}) *Frame

GetFrameByIndexI Get a single frame out of a frameData set by key.

func (*Cache) GetFrameByName

func (self *Cache) GetFrameByName(key string, name string) *Frame

GetFrameByName Get a single frame out of a frameData set by key.

func (*Cache) GetFrameByName1O

func (self *Cache) GetFrameByName1O(key string, name string, cache int) *Frame

GetFrameByName1O Get a single frame out of a frameData set by key.

func (*Cache) GetFrameByNameI

func (self *Cache) GetFrameByNameI(args ...interface{}) *Frame

GetFrameByNameI Get a single frame out of a frameData set by key.

func (*Cache) GetFrameCount

func (self *Cache) GetFrameCount(key string) int

GetFrameCount Get the total number of frames contained in the FrameData object specified by the given key.

func (*Cache) GetFrameCount1O

func (self *Cache) GetFrameCount1O(key string, cache int) int

GetFrameCount1O Get the total number of frames contained in the FrameData object specified by the given key.

func (*Cache) GetFrameCountI

func (self *Cache) GetFrameCountI(args ...interface{}) int

GetFrameCountI Get the total number of frames contained in the FrameData object specified by the given key.

func (*Cache) GetFrameData

func (self *Cache) GetFrameData(key string) *FrameData

GetFrameData Gets a Phaser.FrameData object from the Image Cache.

The object is looked-up based on the key given.

Note: If the object cannot be found a `console.warn` message is displayed.

func (*Cache) GetFrameData1O

func (self *Cache) GetFrameData1O(key string, cache int) *FrameData

GetFrameData1O Gets a Phaser.FrameData object from the Image Cache.

The object is looked-up based on the key given.

Note: If the object cannot be found a `console.warn` message is displayed.

func (*Cache) GetFrameDataI

func (self *Cache) GetFrameDataI(args ...interface{}) *FrameData

GetFrameDataI Gets a Phaser.FrameData object from the Image Cache.

The object is looked-up based on the key given.

Note: If the object cannot be found a `console.warn` message is displayed.

func (*Cache) GetFrameI

func (self *Cache) GetFrameI(args ...interface{}) *Frame

GetFrameI Get a single frame by key. You'd only do this to get the default Frame created for a non-atlas/spritesheet image.

func (*Cache) GetImage

func (self *Cache) GetImage() *Image

GetImage Gets a Image object from the cache. This returns a DOM Image object, not a Phaser.Image object.

The object is looked-up based on the key given.

Note: If the object cannot be found a `console.warn` message is displayed.

Only the Image cache is searched, which covers images loaded via Loader.image, Sprite Sheets and Texture Atlases.

If you need the image used by a bitmap font or similar then please use those respective 'get' methods.

func (*Cache) GetImage1O

func (self *Cache) GetImage1O(key string) *Image

GetImage1O Gets a Image object from the cache. This returns a DOM Image object, not a Phaser.Image object.

The object is looked-up based on the key given.

Note: If the object cannot be found a `console.warn` message is displayed.

Only the Image cache is searched, which covers images loaded via Loader.image, Sprite Sheets and Texture Atlases.

If you need the image used by a bitmap font or similar then please use those respective 'get' methods.

func (*Cache) GetImage2O

func (self *Cache) GetImage2O(key string, full bool) *Image

GetImage2O Gets a Image object from the cache. This returns a DOM Image object, not a Phaser.Image object.

The object is looked-up based on the key given.

Note: If the object cannot be found a `console.warn` message is displayed.

Only the Image cache is searched, which covers images loaded via Loader.image, Sprite Sheets and Texture Atlases.

If you need the image used by a bitmap font or similar then please use those respective 'get' methods.

func (*Cache) GetImageI

func (self *Cache) GetImageI(args ...interface{}) *Image

GetImageI Gets a Image object from the cache. This returns a DOM Image object, not a Phaser.Image object.

The object is looked-up based on the key given.

Note: If the object cannot be found a `console.warn` message is displayed.

Only the Image cache is searched, which covers images loaded via Loader.image, Sprite Sheets and Texture Atlases.

If you need the image used by a bitmap font or similar then please use those respective 'get' methods.

func (*Cache) GetItem

func (self *Cache) GetItem(key string, cache int) interface{}

GetItem Get an item from a cache based on the given key and property.

This method is mostly used internally by other Cache methods such as `getImage` but is exposed publicly for your own use as well.

func (*Cache) GetItem1O

func (self *Cache) GetItem1O(key string, cache int, method string) interface{}

GetItem1O Get an item from a cache based on the given key and property.

This method is mostly used internally by other Cache methods such as `getImage` but is exposed publicly for your own use as well.

func (*Cache) GetItem2O

func (self *Cache) GetItem2O(key string, cache int, method string, property string) interface{}

GetItem2O Get an item from a cache based on the given key and property.

This method is mostly used internally by other Cache methods such as `getImage` but is exposed publicly for your own use as well.

func (*Cache) GetItemI

func (self *Cache) GetItemI(args ...interface{}) interface{}

GetItemI Get an item from a cache based on the given key and property.

This method is mostly used internally by other Cache methods such as `getImage` but is exposed publicly for your own use as well.

func (*Cache) GetJSON

func (self *Cache) GetJSON(key string) interface{}

GetJSON Gets a JSON object from the cache.

The object is looked-up based on the key given.

Note: If the object cannot be found a `console.warn` message is displayed.

You can either return the object by reference (the default), or return a clone of it by setting the `clone` argument to `true`.

func (*Cache) GetJSON1O

func (self *Cache) GetJSON1O(key string, clone bool) interface{}

GetJSON1O Gets a JSON object from the cache.

The object is looked-up based on the key given.

Note: If the object cannot be found a `console.warn` message is displayed.

You can either return the object by reference (the default), or return a clone of it by setting the `clone` argument to `true`.

func (*Cache) GetJSONI

func (self *Cache) GetJSONI(args ...interface{}) interface{}

GetJSONI Gets a JSON object from the cache.

The object is looked-up based on the key given.

Note: If the object cannot be found a `console.warn` message is displayed.

You can either return the object by reference (the default), or return a clone of it by setting the `clone` argument to `true`.

func (*Cache) GetKeys

func (self *Cache) GetKeys() []interface{}

GetKeys Gets all keys used in the requested Cache.

func (*Cache) GetKeys1O

func (self *Cache) GetKeys1O(cache int) []interface{}

GetKeys1O Gets all keys used in the requested Cache.

func (*Cache) GetKeysI

func (self *Cache) GetKeysI(args ...interface{}) []interface{}

GetKeysI Gets all keys used in the requested Cache.

func (*Cache) GetPhysicsData

func (self *Cache) GetPhysicsData(key string, object string, fixtureKey string) interface{}

GetPhysicsData Gets a Physics Data object from the cache.

The object is looked-up based on the key given.

Note: If the object cannot be found a `console.warn` message is displayed.

You can get either the entire data set, a single object or a single fixture of an object from it.

func (*Cache) GetPhysicsDataI

func (self *Cache) GetPhysicsDataI(args ...interface{}) interface{}

GetPhysicsDataI Gets a Physics Data object from the cache.

The object is looked-up based on the key given.

Note: If the object cannot be found a `console.warn` message is displayed.

You can get either the entire data set, a single object or a single fixture of an object from it.

func (*Cache) GetRenderTexture

func (self *Cache) GetRenderTexture(key string) interface{}

GetRenderTexture Gets a RenderTexture object from the cache.

The object is looked-up based on the key given.

Note: If the object cannot be found a `console.warn` message is displayed.

func (*Cache) GetRenderTextureI

func (self *Cache) GetRenderTextureI(args ...interface{}) interface{}

GetRenderTextureI Gets a RenderTexture object from the cache.

The object is looked-up based on the key given.

Note: If the object cannot be found a `console.warn` message is displayed.

func (*Cache) GetShader

func (self *Cache) GetShader(key string) string

GetShader Gets a fragment shader object from the cache.

The object is looked-up based on the key given.

Note: If the object cannot be found a `console.warn` message is displayed.

func (*Cache) GetShaderI

func (self *Cache) GetShaderI(args ...interface{}) string

GetShaderI Gets a fragment shader object from the cache.

The object is looked-up based on the key given.

Note: If the object cannot be found a `console.warn` message is displayed.

func (*Cache) GetSound

func (self *Cache) GetSound(key string) *Sound

GetSound Gets a Phaser.Sound object from the cache.

The object is looked-up based on the key given.

Note: If the object cannot be found a `console.warn` message is displayed.

func (*Cache) GetSoundData

func (self *Cache) GetSoundData(key string) interface{}

GetSoundData Gets a raw Sound data object from the cache.

The object is looked-up based on the key given.

Note: If the object cannot be found a `console.warn` message is displayed.

func (*Cache) GetSoundDataI

func (self *Cache) GetSoundDataI(args ...interface{}) interface{}

GetSoundDataI Gets a raw Sound data object from the cache.

The object is looked-up based on the key given.

Note: If the object cannot be found a `console.warn` message is displayed.

func (*Cache) GetSoundI

func (self *Cache) GetSoundI(args ...interface{}) *Sound

GetSoundI Gets a Phaser.Sound object from the cache.

The object is looked-up based on the key given.

Note: If the object cannot be found a `console.warn` message is displayed.

func (*Cache) GetText

func (self *Cache) GetText(key string) interface{}

GetText Gets a Text object from the cache.

The object is looked-up based on the key given.

Note: If the object cannot be found a `console.warn` message is displayed.

func (*Cache) GetTextI

func (self *Cache) GetTextI(args ...interface{}) interface{}

GetTextI Gets a Text object from the cache.

The object is looked-up based on the key given.

Note: If the object cannot be found a `console.warn` message is displayed.

func (*Cache) GetTextureFrame

func (self *Cache) GetTextureFrame(key string) *Frame

GetTextureFrame Get a single texture frame by key.

You'd only do this to get the default Frame created for a non-atlas / spritesheet image.

func (*Cache) GetTextureFrameI

func (self *Cache) GetTextureFrameI(args ...interface{}) *Frame

GetTextureFrameI Get a single texture frame by key.

You'd only do this to get the default Frame created for a non-atlas / spritesheet image.

func (*Cache) GetTilemapData

func (self *Cache) GetTilemapData(key string) interface{}

GetTilemapData Gets a raw Tilemap data object from the cache. This will be in either CSV or JSON format.

The object is looked-up based on the key given.

Note: If the object cannot be found a `console.warn` message is displayed.

func (*Cache) GetTilemapDataI

func (self *Cache) GetTilemapDataI(args ...interface{}) interface{}

GetTilemapDataI Gets a raw Tilemap data object from the cache. This will be in either CSV or JSON format.

The object is looked-up based on the key given.

Note: If the object cannot be found a `console.warn` message is displayed.

func (*Cache) GetURL

func (self *Cache) GetURL(url string) interface{}

GetURL Get a cached object by the URL. This only returns a value if you set Cache.autoResolveURL to `true` *before* starting the preload of any assets. Be aware that every call to this function makes a DOM src query, so use carefully and double-check for implications in your target browsers/devices.

func (*Cache) GetURLI

func (self *Cache) GetURLI(args ...interface{}) interface{}

GetURLI Get a cached object by the URL. This only returns a value if you set Cache.autoResolveURL to `true` *before* starting the preload of any assets. Be aware that every call to this function makes a DOM src query, so use carefully and double-check for implications in your target browsers/devices.

func (*Cache) GetVideo

func (self *Cache) GetVideo(key string) *Video

GetVideo Gets a Phaser.Video object from the cache.

The object is looked-up based on the key given.

Note: If the object cannot be found a `console.warn` message is displayed.

func (*Cache) GetVideoI

func (self *Cache) GetVideoI(args ...interface{}) *Video

GetVideoI Gets a Phaser.Video object from the cache.

The object is looked-up based on the key given.

Note: If the object cannot be found a `console.warn` message is displayed.

func (*Cache) GetXML

func (self *Cache) GetXML(key string) interface{}

GetXML Gets an XML object from the cache.

The object is looked-up based on the key given.

Note: If the object cannot be found a `console.warn` message is displayed.

func (*Cache) GetXMLI

func (self *Cache) GetXMLI(args ...interface{}) interface{}

GetXMLI Gets an XML object from the cache.

The object is looked-up based on the key given.

Note: If the object cannot be found a `console.warn` message is displayed.

func (*Cache) HasFrameData

func (self *Cache) HasFrameData(key string) bool

HasFrameData Check if the FrameData for the given key exists in the Image Cache.

func (*Cache) HasFrameData1O

func (self *Cache) HasFrameData1O(key string, cache int) bool

HasFrameData1O Check if the FrameData for the given key exists in the Image Cache.

func (*Cache) HasFrameDataI

func (self *Cache) HasFrameDataI(args ...interface{}) bool

HasFrameDataI Check if the FrameData for the given key exists in the Image Cache.

func (*Cache) IMAGE

func (self *Cache) IMAGE() int

IMAGE empty description

func (*Cache) IsSoundDecoded

func (self *Cache) IsSoundDecoded(key string) bool

IsSoundDecoded Check if the given sound has finished decoding.

func (*Cache) IsSoundDecodedI

func (self *Cache) IsSoundDecodedI(args ...interface{}) bool

IsSoundDecodedI Check if the given sound has finished decoding.

func (*Cache) IsSoundReady

func (self *Cache) IsSoundReady(key string) bool

IsSoundReady Check if the given sound is ready for playback. A sound is considered ready when it has finished decoding and the device is no longer touch locked.

func (*Cache) IsSoundReadyI

func (self *Cache) IsSoundReadyI(args ...interface{}) bool

IsSoundReadyI Check if the given sound is ready for playback. A sound is considered ready when it has finished decoding and the device is no longer touch locked.

func (*Cache) JSON

func (self *Cache) JSON() int

JSON empty description

func (*Cache) MISSING

func (self *Cache) MISSING() *Texture

MISSING The default image used for a texture when the source image is missing.

func (*Cache) OnSoundUnlock

func (self *Cache) OnSoundUnlock() *Signal

OnSoundUnlock This event is dispatched when the sound system is unlocked via a touch event on cellular devices.

func (*Cache) PHYSICS

func (self *Cache) PHYSICS() int

PHYSICS empty description

func (*Cache) RENDER_TEXTURE

func (self *Cache) RENDER_TEXTURE() int

RENDER_TEXTURE empty description

func (*Cache) ReloadSound

func (self *Cache) ReloadSound(key string)

ReloadSound Reload a Sound file from the server.

func (*Cache) ReloadSoundComplete

func (self *Cache) ReloadSoundComplete(key string)

ReloadSoundComplete Fires the onSoundUnlock event when the sound has completed reloading.

func (*Cache) ReloadSoundCompleteI

func (self *Cache) ReloadSoundCompleteI(args ...interface{})

ReloadSoundCompleteI Fires the onSoundUnlock event when the sound has completed reloading.

func (*Cache) ReloadSoundI

func (self *Cache) ReloadSoundI(args ...interface{})

ReloadSoundI Reload a Sound file from the server.

func (*Cache) RemoveBinary

func (self *Cache) RemoveBinary(key string)

RemoveBinary Removes a binary file from the cache.

Note that this only removes it from the Phaser.Cache. If you still have references to the data elsewhere then it will persist in memory.

func (*Cache) RemoveBinaryI

func (self *Cache) RemoveBinaryI(args ...interface{})

RemoveBinaryI Removes a binary file from the cache.

Note that this only removes it from the Phaser.Cache. If you still have references to the data elsewhere then it will persist in memory.

func (*Cache) RemoveBitmapData

func (self *Cache) RemoveBitmapData(key string)

RemoveBitmapData Removes a bitmap data from the cache.

Note that this only removes it from the Phaser.Cache. If you still have references to the data elsewhere then it will persist in memory.

func (*Cache) RemoveBitmapDataI

func (self *Cache) RemoveBitmapDataI(args ...interface{})

RemoveBitmapDataI Removes a bitmap data from the cache.

Note that this only removes it from the Phaser.Cache. If you still have references to the data elsewhere then it will persist in memory.

func (*Cache) RemoveBitmapFont

func (self *Cache) RemoveBitmapFont(key string)

RemoveBitmapFont Removes a bitmap font from the cache.

Note that this only removes it from the Phaser.Cache. If you still have references to the data elsewhere then it will persist in memory.

func (*Cache) RemoveBitmapFontI

func (self *Cache) RemoveBitmapFontI(args ...interface{})

RemoveBitmapFontI Removes a bitmap font from the cache.

Note that this only removes it from the Phaser.Cache. If you still have references to the data elsewhere then it will persist in memory.

func (*Cache) RemoveCanvas

func (self *Cache) RemoveCanvas(key string)

RemoveCanvas Removes a canvas from the cache.

Note that this only removes it from the Phaser.Cache. If you still have references to the data elsewhere then it will persist in memory.

func (*Cache) RemoveCanvasI

func (self *Cache) RemoveCanvasI(args ...interface{})

RemoveCanvasI Removes a canvas from the cache.

Note that this only removes it from the Phaser.Cache. If you still have references to the data elsewhere then it will persist in memory.

func (*Cache) RemoveImage

func (self *Cache) RemoveImage(key string)

RemoveImage Removes an image from the cache.

You can optionally elect to destroy it as well. This calls BaseTexture.destroy on it.

Note that this only removes it from the Phaser Cache. If you still have references to the data elsewhere then it will persist in memory.

func (*Cache) RemoveImage1O

func (self *Cache) RemoveImage1O(key string, destroyBaseTexture bool)

RemoveImage1O Removes an image from the cache.

You can optionally elect to destroy it as well. This calls BaseTexture.destroy on it.

Note that this only removes it from the Phaser Cache. If you still have references to the data elsewhere then it will persist in memory.

func (*Cache) RemoveImageI

func (self *Cache) RemoveImageI(args ...interface{})

RemoveImageI Removes an image from the cache.

You can optionally elect to destroy it as well. This calls BaseTexture.destroy on it.

Note that this only removes it from the Phaser Cache. If you still have references to the data elsewhere then it will persist in memory.

func (*Cache) RemoveJSON

func (self *Cache) RemoveJSON(key string)

RemoveJSON Removes a json object from the cache.

Note that this only removes it from the Phaser.Cache. If you still have references to the data elsewhere then it will persist in memory.

func (*Cache) RemoveJSONI

func (self *Cache) RemoveJSONI(args ...interface{})

RemoveJSONI Removes a json object from the cache.

Note that this only removes it from the Phaser.Cache. If you still have references to the data elsewhere then it will persist in memory.

func (*Cache) RemovePhysics

func (self *Cache) RemovePhysics(key string)

RemovePhysics Removes a physics data file from the cache.

Note that this only removes it from the Phaser.Cache. If you still have references to the data elsewhere then it will persist in memory.

func (*Cache) RemovePhysicsI

func (self *Cache) RemovePhysicsI(args ...interface{})

RemovePhysicsI Removes a physics data file from the cache.

Note that this only removes it from the Phaser.Cache. If you still have references to the data elsewhere then it will persist in memory.

func (*Cache) RemoveRenderTexture

func (self *Cache) RemoveRenderTexture(key string)

RemoveRenderTexture Removes a Render Texture from the cache.

Note that this only removes it from the Phaser.Cache. If you still have references to the data elsewhere then it will persist in memory.

func (*Cache) RemoveRenderTextureI

func (self *Cache) RemoveRenderTextureI(args ...interface{})

RemoveRenderTextureI Removes a Render Texture from the cache.

Note that this only removes it from the Phaser.Cache. If you still have references to the data elsewhere then it will persist in memory.

func (*Cache) RemoveShader

func (self *Cache) RemoveShader(key string)

RemoveShader Removes a shader from the cache.

Note that this only removes it from the Phaser.Cache. If you still have references to the data elsewhere then it will persist in memory.

func (*Cache) RemoveShaderI

func (self *Cache) RemoveShaderI(args ...interface{})

RemoveShaderI Removes a shader from the cache.

Note that this only removes it from the Phaser.Cache. If you still have references to the data elsewhere then it will persist in memory.

func (*Cache) RemoveSound

func (self *Cache) RemoveSound(key string)

RemoveSound Removes a sound from the cache.

If any `Phaser.Sound` objects use the audio file in the cache that you remove with this method, they will _automatically_ destroy themselves. If you wish to have full control over when Sounds are destroyed then you must finish your house-keeping and destroy them all yourself first, before calling this method.

Note that this only removes it from the Phaser.Cache. If you still have references to the data elsewhere then it will persist in memory.

func (*Cache) RemoveSoundI

func (self *Cache) RemoveSoundI(args ...interface{})

RemoveSoundI Removes a sound from the cache.

If any `Phaser.Sound` objects use the audio file in the cache that you remove with this method, they will _automatically_ destroy themselves. If you wish to have full control over when Sounds are destroyed then you must finish your house-keeping and destroy them all yourself first, before calling this method.

Note that this only removes it from the Phaser.Cache. If you still have references to the data elsewhere then it will persist in memory.

func (*Cache) RemoveSpriteSheet

func (self *Cache) RemoveSpriteSheet(key string)

RemoveSpriteSheet Removes a Sprite Sheet from the cache.

Note that this only removes it from the Phaser.Cache. If you still have references to the data elsewhere then it will persist in memory.

func (*Cache) RemoveSpriteSheetI

func (self *Cache) RemoveSpriteSheetI(args ...interface{})

RemoveSpriteSheetI Removes a Sprite Sheet from the cache.

Note that this only removes it from the Phaser.Cache. If you still have references to the data elsewhere then it will persist in memory.

func (*Cache) RemoveText

func (self *Cache) RemoveText(key string)

RemoveText Removes a text file from the cache.

Note that this only removes it from the Phaser.Cache. If you still have references to the data elsewhere then it will persist in memory.

func (*Cache) RemoveTextI

func (self *Cache) RemoveTextI(args ...interface{})

RemoveTextI Removes a text file from the cache.

Note that this only removes it from the Phaser.Cache. If you still have references to the data elsewhere then it will persist in memory.

func (*Cache) RemoveTextureAtlas

func (self *Cache) RemoveTextureAtlas(key string)

RemoveTextureAtlas Removes a Texture Atlas from the cache.

Note that this only removes it from the Phaser.Cache. If you still have references to the data elsewhere then it will persist in memory.

func (*Cache) RemoveTextureAtlasI

func (self *Cache) RemoveTextureAtlasI(args ...interface{})

RemoveTextureAtlasI Removes a Texture Atlas from the cache.

Note that this only removes it from the Phaser.Cache. If you still have references to the data elsewhere then it will persist in memory.

func (*Cache) RemoveTilemap

func (self *Cache) RemoveTilemap(key string)

RemoveTilemap Removes a tilemap from the cache.

Note that this only removes it from the Phaser.Cache. If you still have references to the data elsewhere then it will persist in memory.

func (*Cache) RemoveTilemapI

func (self *Cache) RemoveTilemapI(args ...interface{})

RemoveTilemapI Removes a tilemap from the cache.

Note that this only removes it from the Phaser.Cache. If you still have references to the data elsewhere then it will persist in memory.

func (*Cache) RemoveVideo

func (self *Cache) RemoveVideo(key string)

RemoveVideo Removes a video from the cache.

Note that this only removes it from the Phaser.Cache. If you still have references to the data elsewhere then it will persist in memory.

func (*Cache) RemoveVideoI

func (self *Cache) RemoveVideoI(args ...interface{})

RemoveVideoI Removes a video from the cache.

Note that this only removes it from the Phaser.Cache. If you still have references to the data elsewhere then it will persist in memory.

func (*Cache) RemoveXML

func (self *Cache) RemoveXML(key string)

RemoveXML Removes a xml object from the cache.

Note that this only removes it from the Phaser.Cache. If you still have references to the data elsewhere then it will persist in memory.

func (*Cache) RemoveXMLI

func (self *Cache) RemoveXMLI(args ...interface{})

RemoveXMLI Removes a xml object from the cache.

Note that this only removes it from the Phaser.Cache. If you still have references to the data elsewhere then it will persist in memory.

func (*Cache) SHADER

func (self *Cache) SHADER() int

SHADER empty description

func (*Cache) SOUND

func (self *Cache) SOUND() int

SOUND empty description

func (*Cache) SetAutoResolveURLA

func (self *Cache) SetAutoResolveURLA(member bool)

SetAutoResolveURLA Automatically resolve resource URLs to absolute paths for use with the Cache.getURL method.

func (*Cache) SetBINARYA

func (self *Cache) SetBINARYA(member int)

SetBINARYA empty description

func (*Cache) SetBITMAPDATAA

func (self *Cache) SetBITMAPDATAA(member int)

SetBITMAPDATAA empty description

func (*Cache) SetBITMAPFONTA

func (self *Cache) SetBITMAPFONTA(member int)

SetBITMAPFONTA empty description

func (*Cache) SetCANVASA

func (self *Cache) SetCANVASA(member int)

SetCANVASA empty description

func (*Cache) SetDEFAULTA

func (self *Cache) SetDEFAULTA(member *Texture)

SetDEFAULTA The default image used for a texture when no other is specified.

func (*Cache) SetGameA

func (self *Cache) SetGameA(member *Game)

SetGameA Local reference to game.

func (*Cache) SetIMAGEA

func (self *Cache) SetIMAGEA(member int)

SetIMAGEA empty description

func (*Cache) SetJSONA

func (self *Cache) SetJSONA(member int)

SetJSONA empty description

func (*Cache) SetMISSINGA

func (self *Cache) SetMISSINGA(member *Texture)

SetMISSINGA The default image used for a texture when the source image is missing.

func (*Cache) SetOnSoundUnlockA

func (self *Cache) SetOnSoundUnlockA(member *Signal)

SetOnSoundUnlockA This event is dispatched when the sound system is unlocked via a touch event on cellular devices.

func (*Cache) SetPHYSICSA

func (self *Cache) SetPHYSICSA(member int)

SetPHYSICSA empty description

func (*Cache) SetRENDER_TEXTUREA

func (self *Cache) SetRENDER_TEXTUREA(member int)

SetRENDER_TEXTUREA empty description

func (*Cache) SetSHADERA

func (self *Cache) SetSHADERA(member int)

SetSHADERA empty description

func (*Cache) SetSOUNDA

func (self *Cache) SetSOUNDA(member int)

SetSOUNDA empty description

func (*Cache) SetTEXTA

func (self *Cache) SetTEXTA(member int)

SetTEXTA empty description

func (*Cache) SetTEXTUREA

func (self *Cache) SetTEXTUREA(member int)

SetTEXTUREA empty description

func (*Cache) SetTILEMAPA

func (self *Cache) SetTILEMAPA(member int)

SetTILEMAPA empty description

func (*Cache) SetVIDEOA

func (self *Cache) SetVIDEOA(member int)

SetVIDEOA empty description

func (*Cache) SetXMLA

func (self *Cache) SetXMLA(member int)

SetXMLA empty description

func (*Cache) TEXT

func (self *Cache) TEXT() int

TEXT empty description

func (*Cache) TEXTURE

func (self *Cache) TEXTURE() int

TEXTURE empty description

func (*Cache) TILEMAP

func (self *Cache) TILEMAP() int

TILEMAP empty description

func (*Cache) UpdateFrameData

func (self *Cache) UpdateFrameData(key string, frameData int)

UpdateFrameData Replaces a set of frameData with a new Phaser.FrameData object.

func (*Cache) UpdateFrameData1O

func (self *Cache) UpdateFrameData1O(key string, frameData int, cache int)

UpdateFrameData1O Replaces a set of frameData with a new Phaser.FrameData object.

func (*Cache) UpdateFrameDataI

func (self *Cache) UpdateFrameDataI(args ...interface{})

UpdateFrameDataI Replaces a set of frameData with a new Phaser.FrameData object.

func (*Cache) UpdateSound

func (self *Cache) UpdateSound(key string)

UpdateSound Updates the sound object in the cache.

func (*Cache) UpdateSoundI

func (self *Cache) UpdateSoundI(args ...interface{})

UpdateSoundI Updates the sound object in the cache.

func (*Cache) VIDEO

func (self *Cache) VIDEO() int

VIDEO empty description

func (*Cache) XML

func (self *Cache) XML() int

XML empty description

type Camera

type Camera struct {
	*js.Object
}

Camera A Camera is your view into the game world. It has a position and size and renders only those objects within its field of view. The game automatically creates a single Stage sized camera on boot. Move the camera around the world with Phaser.Camera.x/y

func NewCamera

func NewCamera(game *Game, id int, x int, y int, width int, height int) *Camera

NewCamera A Camera is your view into the game world. It has a position and size and renders only those objects within its field of view. The game automatically creates a single Stage sized camera on boot. Move the camera around the world with Phaser.Camera.x/y

func NewCameraI

func NewCameraI(args ...interface{}) *Camera

NewCameraI A Camera is your view into the game world. It has a position and size and renders only those objects within its field of view. The game automatically creates a single Stage sized camera on boot. Move the camera around the world with Phaser.Camera.x/y

func ToCamera

func ToCamera(jsStruct interface{}) *Camera

Camera Binding conversion method to Camera point

func (*Camera) AtLimit

func (self *Camera) AtLimit() bool

AtLimit Whether this camera is flush with the World Bounds or not.

func (*Camera) Boot

func (self *Camera) Boot()

Boot Called automatically by Phaser.World.

func (*Camera) BootI

func (self *Camera) BootI(args ...interface{})

BootI Called automatically by Phaser.World.

func (*Camera) Bounds

func (self *Camera) Bounds() *Rectangle

Bounds The Camera is bound to this Rectangle and cannot move outside of it. By default it is enabled and set to the size of the World. The Rectangle can be located anywhere in the world and updated as often as you like. If you don't wish the Camera to be bound at all then set this to null. The values can be anything and are in World coordinates, with 0,0 being the top-left of the world. The Rectangle in which the Camera is bounded. Set to null to allow for movement anywhere.

func (*Camera) CheckBounds

func (self *Camera) CheckBounds()

CheckBounds Method called to ensure the camera doesn't venture outside of the game world. Called automatically by Camera.update.

func (*Camera) CheckBoundsI

func (self *Camera) CheckBoundsI(args ...interface{})

CheckBoundsI Method called to ensure the camera doesn't venture outside of the game world. Called automatically by Camera.update.

func (*Camera) Deadzone

func (self *Camera) Deadzone() *Rectangle

Deadzone Moving inside this Rectangle will not cause the camera to move.

func (*Camera) DisplayObject

func (self *Camera) DisplayObject() *DisplayObject

DisplayObject The display object to which all game objects are added. Set by World.boot.

func (*Camera) ENABLE_FX

func (self *Camera) ENABLE_FX() bool

ENABLE_FX empty description

func (*Camera) FOLLOW_LOCKON

func (self *Camera) FOLLOW_LOCKON() int

FOLLOW_LOCKON empty description

func (*Camera) FOLLOW_PLATFORMER

func (self *Camera) FOLLOW_PLATFORMER() int

FOLLOW_PLATFORMER empty description

func (*Camera) FOLLOW_TOPDOWN

func (self *Camera) FOLLOW_TOPDOWN() int

FOLLOW_TOPDOWN empty description

func (*Camera) FOLLOW_TOPDOWN_TIGHT

func (self *Camera) FOLLOW_TOPDOWN_TIGHT() int

FOLLOW_TOPDOWN_TIGHT empty description

func (*Camera) Fade

func (self *Camera) Fade() bool

Fade This creates a camera fade effect. It works by filling the game with the color specified, over the duration given, ending with a solid fill.

You can use this for things such as transitioning to a new scene.

The game will be left 'filled' at the end of this effect, likely obscuring everything. In order to reset it you can call `Camera.resetFX` and it will clear the fade. Or you can call `Camera.flash` with the same color as the fade, and it will reverse the process, bringing the game back into view again.

When the effect ends the signal Camera.onFadeComplete is dispatched.

func (*Camera) Fade1O

func (self *Camera) Fade1O(color float64) bool

Fade1O This creates a camera fade effect. It works by filling the game with the color specified, over the duration given, ending with a solid fill.

You can use this for things such as transitioning to a new scene.

The game will be left 'filled' at the end of this effect, likely obscuring everything. In order to reset it you can call `Camera.resetFX` and it will clear the fade. Or you can call `Camera.flash` with the same color as the fade, and it will reverse the process, bringing the game back into view again.

When the effect ends the signal Camera.onFadeComplete is dispatched.

func (*Camera) Fade2O

func (self *Camera) Fade2O(color float64, duration int) bool

Fade2O This creates a camera fade effect. It works by filling the game with the color specified, over the duration given, ending with a solid fill.

You can use this for things such as transitioning to a new scene.

The game will be left 'filled' at the end of this effect, likely obscuring everything. In order to reset it you can call `Camera.resetFX` and it will clear the fade. Or you can call `Camera.flash` with the same color as the fade, and it will reverse the process, bringing the game back into view again.

When the effect ends the signal Camera.onFadeComplete is dispatched.

func (*Camera) Fade3O

func (self *Camera) Fade3O(color float64, duration int, force bool) bool

Fade3O This creates a camera fade effect. It works by filling the game with the color specified, over the duration given, ending with a solid fill.

You can use this for things such as transitioning to a new scene.

The game will be left 'filled' at the end of this effect, likely obscuring everything. In order to reset it you can call `Camera.resetFX` and it will clear the fade. Or you can call `Camera.flash` with the same color as the fade, and it will reverse the process, bringing the game back into view again.

When the effect ends the signal Camera.onFadeComplete is dispatched.

func (*Camera) FadeI

func (self *Camera) FadeI(args ...interface{}) bool

FadeI This creates a camera fade effect. It works by filling the game with the color specified, over the duration given, ending with a solid fill.

You can use this for things such as transitioning to a new scene.

The game will be left 'filled' at the end of this effect, likely obscuring everything. In order to reset it you can call `Camera.resetFX` and it will clear the fade. Or you can call `Camera.flash` with the same color as the fade, and it will reverse the process, bringing the game back into view again.

When the effect ends the signal Camera.onFadeComplete is dispatched.

func (*Camera) Flash

func (self *Camera) Flash() bool

Flash This creates a camera flash effect. It works by filling the game with the solid fill color specified, and then fading it away to alpha 0 over the duration given.

You can use this for things such as hit feedback effects.

When the effect ends the signal Camera.onFlashComplete is dispatched.

func (*Camera) Flash1O

func (self *Camera) Flash1O(color float64) bool

Flash1O This creates a camera flash effect. It works by filling the game with the solid fill color specified, and then fading it away to alpha 0 over the duration given.

You can use this for things such as hit feedback effects.

When the effect ends the signal Camera.onFlashComplete is dispatched.

func (*Camera) Flash2O

func (self *Camera) Flash2O(color float64, duration int) bool

Flash2O This creates a camera flash effect. It works by filling the game with the solid fill color specified, and then fading it away to alpha 0 over the duration given.

You can use this for things such as hit feedback effects.

When the effect ends the signal Camera.onFlashComplete is dispatched.

func (*Camera) Flash3O

func (self *Camera) Flash3O(color float64, duration int, force bool) bool

Flash3O This creates a camera flash effect. It works by filling the game with the solid fill color specified, and then fading it away to alpha 0 over the duration given.

You can use this for things such as hit feedback effects.

When the effect ends the signal Camera.onFlashComplete is dispatched.

func (*Camera) FlashI

func (self *Camera) FlashI(args ...interface{}) bool

FlashI This creates a camera flash effect. It works by filling the game with the solid fill color specified, and then fading it away to alpha 0 over the duration given.

You can use this for things such as hit feedback effects.

When the effect ends the signal Camera.onFlashComplete is dispatched.

func (*Camera) FocusOn

func (self *Camera) FocusOn(displayObject interface{})

FocusOn Move the camera focus on a display object instantly.

func (*Camera) FocusOnI

func (self *Camera) FocusOnI(args ...interface{})

FocusOnI Move the camera focus on a display object instantly.

func (*Camera) FocusOnXY

func (self *Camera) FocusOnXY(x int, y int)

FocusOnXY Move the camera focus on a location instantly.

func (*Camera) FocusOnXYI

func (self *Camera) FocusOnXYI(args ...interface{})

FocusOnXYI Move the camera focus on a location instantly.

func (*Camera) Follow

func (self *Camera) Follow(target interface{})

Follow Tell the camera which sprite to follow.

You can set the follow type and a linear interpolation value. Use low lerp values (such as 0.1) to automatically smooth the camera motion.

If you find you're getting a slight "jitter" effect when following a Sprite it's probably to do with sub-pixel rendering of the Sprite position. This can be disabled by setting `game.renderer.renderSession.roundPixels = true` to force full pixel rendering.

func (*Camera) Follow1O

func (self *Camera) Follow1O(target interface{}, style int)

Follow1O Tell the camera which sprite to follow.

You can set the follow type and a linear interpolation value. Use low lerp values (such as 0.1) to automatically smooth the camera motion.

If you find you're getting a slight "jitter" effect when following a Sprite it's probably to do with sub-pixel rendering of the Sprite position. This can be disabled by setting `game.renderer.renderSession.roundPixels = true` to force full pixel rendering.

func (*Camera) Follow2O

func (self *Camera) Follow2O(target interface{}, style int, lerpX float64)

Follow2O Tell the camera which sprite to follow.

You can set the follow type and a linear interpolation value. Use low lerp values (such as 0.1) to automatically smooth the camera motion.

If you find you're getting a slight "jitter" effect when following a Sprite it's probably to do with sub-pixel rendering of the Sprite position. This can be disabled by setting `game.renderer.renderSession.roundPixels = true` to force full pixel rendering.

func (*Camera) Follow3O

func (self *Camera) Follow3O(target interface{}, style int, lerpX float64, lerpY float64)

Follow3O Tell the camera which sprite to follow.

You can set the follow type and a linear interpolation value. Use low lerp values (such as 0.1) to automatically smooth the camera motion.

If you find you're getting a slight "jitter" effect when following a Sprite it's probably to do with sub-pixel rendering of the Sprite position. This can be disabled by setting `game.renderer.renderSession.roundPixels = true` to force full pixel rendering.

func (*Camera) FollowI

func (self *Camera) FollowI(args ...interface{})

FollowI Tell the camera which sprite to follow.

You can set the follow type and a linear interpolation value. Use low lerp values (such as 0.1) to automatically smooth the camera motion.

If you find you're getting a slight "jitter" effect when following a Sprite it's probably to do with sub-pixel rendering of the Sprite position. This can be disabled by setting `game.renderer.renderSession.roundPixels = true` to force full pixel rendering.

func (*Camera) Fx

func (self *Camera) Fx() *Graphics

Fx The Graphics object used to handle camera fx such as fade and flash.

func (*Camera) Game

func (self *Camera) Game() *Game

Game A reference to the currently running Game.

func (*Camera) Height

func (self *Camera) Height() int

Height The Cameras height. By default this is the same as the Game size and should not be adjusted for now. Gets or sets the cameras height.

func (*Camera) Id

func (self *Camera) Id() int

Id Reserved for future multiple camera set-ups.

func (*Camera) Lerp

func (self *Camera) Lerp() *Point

Lerp The linear interpolation value to use when following a target. The default values of 1 means the camera will instantly snap to the target coordinates. A lower value, such as 0.1 means the camera will more slowly track the target, giving a smooth transition. You can set the horizontal and vertical values independently, and also adjust this value in real-time during your game.

func (*Camera) OnFadeComplete

func (self *Camera) OnFadeComplete() *Signal

OnFadeComplete This signal is dispatched when the camera fade effect completes. When the fade effect completes you will be left with the screen black (or whatever color you faded to). In order to reset this call `Camera.resetFX`. This is called automatically when you change State.

func (*Camera) OnFlashComplete

func (self *Camera) OnFlashComplete() *Signal

OnFlashComplete This signal is dispatched when the camera flash effect completes.

func (*Camera) OnShakeComplete

func (self *Camera) OnShakeComplete() *Signal

OnShakeComplete This signal is dispatched when the camera shake effect completes.

func (*Camera) Position

func (self *Camera) Position() *Point

Position The Cameras position. This value is automatically clamped if it falls outside of the World bounds. Gets or sets the cameras xy position using Phaser.Point object.

func (*Camera) PreUpdate

func (self *Camera) PreUpdate()

PreUpdate Camera preUpdate. Sets the total view counter to zero.

func (*Camera) PreUpdateI

func (self *Camera) PreUpdateI(args ...interface{})

PreUpdateI Camera preUpdate. Sets the total view counter to zero.

func (*Camera) Reset

func (self *Camera) Reset()

Reset Resets the camera back to 0,0 and un-follows any object it may have been tracking. Also immediately resets any camera effects that may have been running such as shake, flash or fade.

func (*Camera) ResetFX

func (self *Camera) ResetFX()

ResetFX Resets any active FX, such as a fade or flash and immediately clears it. Useful to calling after a fade in order to remove the fade from the Stage.

func (*Camera) ResetFXI

func (self *Camera) ResetFXI(args ...interface{})

ResetFXI Resets any active FX, such as a fade or flash and immediately clears it. Useful to calling after a fade in order to remove the fade from the Stage.

func (*Camera) ResetI

func (self *Camera) ResetI(args ...interface{})

ResetI Resets the camera back to 0,0 and un-follows any object it may have been tracking. Also immediately resets any camera effects that may have been running such as shake, flash or fade.

func (*Camera) RoundPx

func (self *Camera) RoundPx() bool

RoundPx If a Camera has roundPx set to `true` it will call `view.floor` as part of its update loop, keeping its boundary to integer values. Set this to `false` to disable this from happening.

func (*Camera) SHAKE_BOTH

func (self *Camera) SHAKE_BOTH() int

SHAKE_BOTH empty description

func (*Camera) SHAKE_HORIZONTAL

func (self *Camera) SHAKE_HORIZONTAL() int

SHAKE_HORIZONTAL empty description

func (*Camera) SHAKE_VERTICAL

func (self *Camera) SHAKE_VERTICAL() int

SHAKE_VERTICAL empty description

func (*Camera) Scale

func (self *Camera) Scale() *Point

Scale The scale of the display object to which all game objects are added. Set by World.boot.

func (*Camera) SetAtLimitA

func (self *Camera) SetAtLimitA(member bool)

SetAtLimitA Whether this camera is flush with the World Bounds or not.

func (*Camera) SetBoundsA

func (self *Camera) SetBoundsA(member *Rectangle)

SetBoundsA The Camera is bound to this Rectangle and cannot move outside of it. By default it is enabled and set to the size of the World. The Rectangle can be located anywhere in the world and updated as often as you like. If you don't wish the Camera to be bound at all then set this to null. The values can be anything and are in World coordinates, with 0,0 being the top-left of the world. The Rectangle in which the Camera is bounded. Set to null to allow for movement anywhere.

func (*Camera) SetBoundsToWorld

func (self *Camera) SetBoundsToWorld()

SetBoundsToWorld Update the Camera bounds to match the game world.

func (*Camera) SetBoundsToWorldI

func (self *Camera) SetBoundsToWorldI(args ...interface{})

SetBoundsToWorldI Update the Camera bounds to match the game world.

func (*Camera) SetDeadzoneA

func (self *Camera) SetDeadzoneA(member *Rectangle)

SetDeadzoneA Moving inside this Rectangle will not cause the camera to move.

func (*Camera) SetDisplayObjectA

func (self *Camera) SetDisplayObjectA(member *DisplayObject)

SetDisplayObjectA The display object to which all game objects are added. Set by World.boot.

func (*Camera) SetENABLE_FXA

func (self *Camera) SetENABLE_FXA(member bool)

SetENABLE_FXA empty description

func (*Camera) SetFOLLOW_LOCKONA

func (self *Camera) SetFOLLOW_LOCKONA(member int)

SetFOLLOW_LOCKONA empty description

func (*Camera) SetFOLLOW_PLATFORMERA

func (self *Camera) SetFOLLOW_PLATFORMERA(member int)

SetFOLLOW_PLATFORMERA empty description

func (*Camera) SetFOLLOW_TOPDOWNA

func (self *Camera) SetFOLLOW_TOPDOWNA(member int)

SetFOLLOW_TOPDOWNA empty description

func (*Camera) SetFOLLOW_TOPDOWN_TIGHTA

func (self *Camera) SetFOLLOW_TOPDOWN_TIGHTA(member int)

SetFOLLOW_TOPDOWN_TIGHTA empty description

func (*Camera) SetFxA

func (self *Camera) SetFxA(member *Graphics)

SetFxA The Graphics object used to handle camera fx such as fade and flash.

func (*Camera) SetGameA

func (self *Camera) SetGameA(member *Game)

SetGameA A reference to the currently running Game.

func (*Camera) SetHeightA

func (self *Camera) SetHeightA(member int)

SetHeightA The Cameras height. By default this is the same as the Game size and should not be adjusted for now. Gets or sets the cameras height.

func (*Camera) SetIdA

func (self *Camera) SetIdA(member int)

SetIdA Reserved for future multiple camera set-ups.

func (*Camera) SetLerpA

func (self *Camera) SetLerpA(member *Point)

SetLerpA The linear interpolation value to use when following a target. The default values of 1 means the camera will instantly snap to the target coordinates. A lower value, such as 0.1 means the camera will more slowly track the target, giving a smooth transition. You can set the horizontal and vertical values independently, and also adjust this value in real-time during your game.

func (*Camera) SetOnFadeCompleteA

func (self *Camera) SetOnFadeCompleteA(member *Signal)

SetOnFadeCompleteA This signal is dispatched when the camera fade effect completes. When the fade effect completes you will be left with the screen black (or whatever color you faded to). In order to reset this call `Camera.resetFX`. This is called automatically when you change State.

func (*Camera) SetOnFlashCompleteA

func (self *Camera) SetOnFlashCompleteA(member *Signal)

SetOnFlashCompleteA This signal is dispatched when the camera flash effect completes.

func (*Camera) SetOnShakeCompleteA

func (self *Camera) SetOnShakeCompleteA(member *Signal)

SetOnShakeCompleteA This signal is dispatched when the camera shake effect completes.

func (*Camera) SetPosition

func (self *Camera) SetPosition(x int, y int)

SetPosition A helper function to set both the X and Y properties of the camera at once without having to use game.camera.x and game.camera.y.

func (*Camera) SetPositionA

func (self *Camera) SetPositionA(member *Point)

SetPositionA The Cameras position. This value is automatically clamped if it falls outside of the World bounds. Gets or sets the cameras xy position using Phaser.Point object.

func (*Camera) SetPositionI

func (self *Camera) SetPositionI(args ...interface{})

SetPositionI A helper function to set both the X and Y properties of the camera at once without having to use game.camera.x and game.camera.y.

func (*Camera) SetRoundPxA

func (self *Camera) SetRoundPxA(member bool)

SetRoundPxA If a Camera has roundPx set to `true` it will call `view.floor` as part of its update loop, keeping its boundary to integer values. Set this to `false` to disable this from happening.

func (*Camera) SetSHAKE_BOTHA

func (self *Camera) SetSHAKE_BOTHA(member int)

SetSHAKE_BOTHA empty description

func (*Camera) SetSHAKE_HORIZONTALA

func (self *Camera) SetSHAKE_HORIZONTALA(member int)

SetSHAKE_HORIZONTALA empty description

func (*Camera) SetSHAKE_VERTICALA

func (self *Camera) SetSHAKE_VERTICALA(member int)

SetSHAKE_VERTICALA empty description

func (*Camera) SetScaleA

func (self *Camera) SetScaleA(member *Point)

SetScaleA The scale of the display object to which all game objects are added. Set by World.boot.

func (*Camera) SetShakeIntensityA

func (self *Camera) SetShakeIntensityA(member int)

SetShakeIntensityA The Cameras shake intensity. Gets or sets the cameras shake intensity.

func (*Camera) SetSize

func (self *Camera) SetSize(width int, height int)

SetSize Sets the size of the view rectangle given the width and height in parameters.

func (*Camera) SetSizeI

func (self *Camera) SetSizeI(args ...interface{})

SetSizeI Sets the size of the view rectangle given the width and height in parameters.

func (*Camera) SetTargetA

func (self *Camera) SetTargetA(member *Sprite)

SetTargetA If the camera is tracking a Sprite, this is a reference to it, otherwise null.

func (*Camera) SetTotalInViewA

func (self *Camera) SetTotalInViewA(member int)

SetTotalInViewA The total number of Sprites with `autoCull` set to `true` that are visible by this Camera.

func (*Camera) SetViewA

func (self *Camera) SetViewA(member *Rectangle)

SetViewA Camera view. The view into the world we wish to render (by default the game dimensions). The x/y values are in world coordinates, not screen coordinates, the width/height is how many pixels to render. Sprites outside of this view are not rendered if Sprite.autoCull is set to `true`. Otherwise they are always rendered.

func (*Camera) SetVisibleA

func (self *Camera) SetVisibleA(member bool)

SetVisibleA Whether this camera is visible or not.

func (*Camera) SetWidthA

func (self *Camera) SetWidthA(member int)

SetWidthA The Cameras width. By default this is the same as the Game size and should not be adjusted for now. Gets or sets the cameras width.

func (*Camera) SetWorldA

func (self *Camera) SetWorldA(member *World)

SetWorldA A reference to the game world.

func (*Camera) SetXA

func (self *Camera) SetXA(member int)

SetXA The Cameras x coordinate. This value is automatically clamped if it falls outside of the World bounds. Gets or sets the cameras x position.

func (*Camera) SetYA

func (self *Camera) SetYA(member int)

SetYA The Cameras y coordinate. This value is automatically clamped if it falls outside of the World bounds. Gets or sets the cameras y position.

func (*Camera) Shake

func (self *Camera) Shake() bool

Shake This creates a camera shake effect. It works by applying a random amount of additional spacing on the x and y axis each frame. You can control the intensity and duration of the effect, and if it should effect both axis or just one.

When the shake effect ends the signal Camera.onShakeComplete is dispatched.

func (*Camera) Shake1O

func (self *Camera) Shake1O(intensity float64) bool

Shake1O This creates a camera shake effect. It works by applying a random amount of additional spacing on the x and y axis each frame. You can control the intensity and duration of the effect, and if it should effect both axis or just one.

When the shake effect ends the signal Camera.onShakeComplete is dispatched.

func (*Camera) Shake2O

func (self *Camera) Shake2O(intensity float64, duration int) bool

Shake2O This creates a camera shake effect. It works by applying a random amount of additional spacing on the x and y axis each frame. You can control the intensity and duration of the effect, and if it should effect both axis or just one.

When the shake effect ends the signal Camera.onShakeComplete is dispatched.

func (*Camera) Shake3O

func (self *Camera) Shake3O(intensity float64, duration int, force bool) bool

Shake3O This creates a camera shake effect. It works by applying a random amount of additional spacing on the x and y axis each frame. You can control the intensity and duration of the effect, and if it should effect both axis or just one.

When the shake effect ends the signal Camera.onShakeComplete is dispatched.

func (*Camera) Shake4O

func (self *Camera) Shake4O(intensity float64, duration int, force bool, direction int) bool

Shake4O This creates a camera shake effect. It works by applying a random amount of additional spacing on the x and y axis each frame. You can control the intensity and duration of the effect, and if it should effect both axis or just one.

When the shake effect ends the signal Camera.onShakeComplete is dispatched.

func (*Camera) Shake5O

func (self *Camera) Shake5O(intensity float64, duration int, force bool, direction int, shakeBounds bool) bool

Shake5O This creates a camera shake effect. It works by applying a random amount of additional spacing on the x and y axis each frame. You can control the intensity and duration of the effect, and if it should effect both axis or just one.

When the shake effect ends the signal Camera.onShakeComplete is dispatched.

func (*Camera) ShakeI

func (self *Camera) ShakeI(args ...interface{}) bool

ShakeI This creates a camera shake effect. It works by applying a random amount of additional spacing on the x and y axis each frame. You can control the intensity and duration of the effect, and if it should effect both axis or just one.

When the shake effect ends the signal Camera.onShakeComplete is dispatched.

func (*Camera) ShakeIntensity

func (self *Camera) ShakeIntensity() int

ShakeIntensity The Cameras shake intensity. Gets or sets the cameras shake intensity.

func (*Camera) Target

func (self *Camera) Target() *Sprite

Target If the camera is tracking a Sprite, this is a reference to it, otherwise null.

func (*Camera) TotalInView

func (self *Camera) TotalInView() int

TotalInView The total number of Sprites with `autoCull` set to `true` that are visible by this Camera.

func (*Camera) Unfollow

func (self *Camera) Unfollow()

Unfollow Sets the Camera follow target to null, stopping it from following an object if it's doing so.

func (*Camera) UnfollowI

func (self *Camera) UnfollowI(args ...interface{})

UnfollowI Sets the Camera follow target to null, stopping it from following an object if it's doing so.

func (*Camera) Update

func (self *Camera) Update()

Update The camera update loop. This is called automatically by the core game loop.

func (*Camera) UpdateFX

func (self *Camera) UpdateFX()

UpdateFX Update the camera flash and fade effects.

func (*Camera) UpdateFXI

func (self *Camera) UpdateFXI(args ...interface{})

UpdateFXI Update the camera flash and fade effects.

func (*Camera) UpdateI

func (self *Camera) UpdateI(args ...interface{})

UpdateI The camera update loop. This is called automatically by the core game loop.

func (*Camera) UpdateShake

func (self *Camera) UpdateShake()

UpdateShake Update the camera shake effect.

func (*Camera) UpdateShakeI

func (self *Camera) UpdateShakeI(args ...interface{})

UpdateShakeI Update the camera shake effect.

func (*Camera) UpdateTarget

func (self *Camera) UpdateTarget()

UpdateTarget Internal method that handles tracking a sprite.

func (*Camera) UpdateTargetI

func (self *Camera) UpdateTargetI(args ...interface{})

UpdateTargetI Internal method that handles tracking a sprite.

func (*Camera) View

func (self *Camera) View() *Rectangle

View Camera view. The view into the world we wish to render (by default the game dimensions). The x/y values are in world coordinates, not screen coordinates, the width/height is how many pixels to render. Sprites outside of this view are not rendered if Sprite.autoCull is set to `true`. Otherwise they are always rendered.

func (*Camera) Visible

func (self *Camera) Visible() bool

Visible Whether this camera is visible or not.

func (*Camera) Width

func (self *Camera) Width() int

Width The Cameras width. By default this is the same as the Game size and should not be adjusted for now. Gets or sets the cameras width.

func (*Camera) World

func (self *Camera) World() *World

World A reference to the game world.

func (*Camera) X

func (self *Camera) X() int

X The Cameras x coordinate. This value is automatically clamped if it falls outside of the World bounds. Gets or sets the cameras x position.

func (*Camera) Y

func (self *Camera) Y() int

Y The Cameras y coordinate. This value is automatically clamped if it falls outside of the World bounds. Gets or sets the cameras y position.

type Canvas

type Canvas struct {
	*js.Object
}

Canvas The Canvas class handles everything related to creating the `canvas` DOM tag that Phaser will use, including styles, offset and aspect ratio.

func NewCanvas

func NewCanvas() *Canvas

NewCanvas The Canvas class handles everything related to creating the `canvas` DOM tag that Phaser will use, including styles, offset and aspect ratio.

func NewCanvasI

func NewCanvasI(args ...interface{}) *Canvas

NewCanvasI The Canvas class handles everything related to creating the `canvas` DOM tag that Phaser will use, including styles, offset and aspect ratio.

func ToCanvas

func ToCanvas(jsStruct interface{}) *Canvas

Canvas Binding conversion method to Canvas point

func (*Canvas) AddToDOM

func (self *Canvas) AddToDOM(canvas *dom.HTMLCanvasElement, parent interface{}) dom.HTMLCanvasElement

AddToDOM Adds the given canvas element to the DOM. The canvas will be added as a child of the given parent. If no parent is given it will be added as a child of the document.body.

func (*Canvas) AddToDOM1O

func (self *Canvas) AddToDOM1O(canvas *dom.HTMLCanvasElement, parent interface{}, overflowHidden bool) dom.HTMLCanvasElement

AddToDOM1O Adds the given canvas element to the DOM. The canvas will be added as a child of the given parent. If no parent is given it will be added as a child of the document.body.

func (*Canvas) AddToDOMI

func (self *Canvas) AddToDOMI(args ...interface{}) dom.HTMLCanvasElement

AddToDOMI Adds the given canvas element to the DOM. The canvas will be added as a child of the given parent. If no parent is given it will be added as a child of the document.body.

func (*Canvas) Create

func (self *Canvas) Create(parent interface{}) dom.HTMLCanvasElement

Create Creates a `canvas` DOM element. The element is not automatically added to the document.

func (*Canvas) Create1O

func (self *Canvas) Create1O(parent interface{}, width int) dom.HTMLCanvasElement

Create1O Creates a `canvas` DOM element. The element is not automatically added to the document.

func (*Canvas) Create2O

func (self *Canvas) Create2O(parent interface{}, width int, height int) dom.HTMLCanvasElement

Create2O Creates a `canvas` DOM element. The element is not automatically added to the document.

func (*Canvas) Create3O

func (self *Canvas) Create3O(parent interface{}, width int, height int, id string) dom.HTMLCanvasElement

Create3O Creates a `canvas` DOM element. The element is not automatically added to the document.

func (*Canvas) Create4O

func (self *Canvas) Create4O(parent interface{}, width int, height int, id string, skipPool bool) dom.HTMLCanvasElement

Create4O Creates a `canvas` DOM element. The element is not automatically added to the document.

func (*Canvas) CreateI

func (self *Canvas) CreateI(args ...interface{}) dom.HTMLCanvasElement

CreateI Creates a `canvas` DOM element. The element is not automatically added to the document.

func (*Canvas) GetSmoothingEnabled

func (self *Canvas) GetSmoothingEnabled(context *dom.CanvasRenderingContext2D) bool

GetSmoothingEnabled Returns `true` if the given context has image smoothing enabled, otherwise returns `false`.

func (*Canvas) GetSmoothingEnabledI

func (self *Canvas) GetSmoothingEnabledI(args ...interface{}) bool

GetSmoothingEnabledI Returns `true` if the given context has image smoothing enabled, otherwise returns `false`.

func (*Canvas) GetSmoothingPrefix

func (self *Canvas) GetSmoothingPrefix(context *dom.CanvasRenderingContext2D) interface{}

GetSmoothingPrefix Gets the Smoothing Enabled vendor prefix being used on the given context, or null if not set.

func (*Canvas) GetSmoothingPrefixI

func (self *Canvas) GetSmoothingPrefixI(args ...interface{}) interface{}

GetSmoothingPrefixI Gets the Smoothing Enabled vendor prefix being used on the given context, or null if not set.

func (*Canvas) RemoveFromDOM

func (self *Canvas) RemoveFromDOM(canvas *dom.HTMLCanvasElement)

RemoveFromDOM Removes the given canvas element from the DOM.

func (*Canvas) RemoveFromDOMI

func (self *Canvas) RemoveFromDOMI(args ...interface{})

RemoveFromDOMI Removes the given canvas element from the DOM.

func (*Canvas) SetBackgroundColor

func (self *Canvas) SetBackgroundColor(canvas *dom.HTMLCanvasElement) dom.HTMLCanvasElement

SetBackgroundColor Sets the background color behind the canvas. This changes the canvas style property.

func (*Canvas) SetBackgroundColor1O

func (self *Canvas) SetBackgroundColor1O(canvas *dom.HTMLCanvasElement, color string) dom.HTMLCanvasElement

SetBackgroundColor1O Sets the background color behind the canvas. This changes the canvas style property.

func (*Canvas) SetBackgroundColorI

func (self *Canvas) SetBackgroundColorI(args ...interface{}) dom.HTMLCanvasElement

SetBackgroundColorI Sets the background color behind the canvas. This changes the canvas style property.

func (*Canvas) SetImageRenderingBicubic

func (self *Canvas) SetImageRenderingBicubic(canvas *dom.HTMLCanvasElement) dom.HTMLCanvasElement

SetImageRenderingBicubic Sets the CSS image-rendering property on the given canvas to be 'bicubic' (aka 'auto'). Note that if this doesn't given the desired result then see the CanvasUtils.setSmoothingEnabled method.

func (*Canvas) SetImageRenderingBicubicI

func (self *Canvas) SetImageRenderingBicubicI(args ...interface{}) dom.HTMLCanvasElement

SetImageRenderingBicubicI Sets the CSS image-rendering property on the given canvas to be 'bicubic' (aka 'auto'). Note that if this doesn't given the desired result then see the CanvasUtils.setSmoothingEnabled method.

func (*Canvas) SetImageRenderingCrisp

func (self *Canvas) SetImageRenderingCrisp(canvas *dom.HTMLCanvasElement) dom.HTMLCanvasElement

SetImageRenderingCrisp Sets the CSS image-rendering property on the given canvas to be 'crisp' (aka 'optimize contrast' on webkit). Note that if this doesn't given the desired result then see the setSmoothingEnabled.

func (*Canvas) SetImageRenderingCrispI

func (self *Canvas) SetImageRenderingCrispI(args ...interface{}) dom.HTMLCanvasElement

SetImageRenderingCrispI Sets the CSS image-rendering property on the given canvas to be 'crisp' (aka 'optimize contrast' on webkit). Note that if this doesn't given the desired result then see the setSmoothingEnabled.

func (*Canvas) SetSmoothingEnabled

func (self *Canvas) SetSmoothingEnabled(context *dom.CanvasRenderingContext2D, value bool) dom.CanvasRenderingContext2D

SetSmoothingEnabled Sets the Image Smoothing property on the given context. Set to false to disable image smoothing. By default browsers have image smoothing enabled, which isn't always what you visually want, especially when using pixel art in a game. Note that this sets the property on the context itself, so that any image drawn to the context will be affected. This sets the property across all current browsers but support is patchy on earlier browsers, especially on mobile.

func (*Canvas) SetSmoothingEnabledI

func (self *Canvas) SetSmoothingEnabledI(args ...interface{}) dom.CanvasRenderingContext2D

SetSmoothingEnabledI Sets the Image Smoothing property on the given context. Set to false to disable image smoothing. By default browsers have image smoothing enabled, which isn't always what you visually want, especially when using pixel art in a game. Note that this sets the property on the context itself, so that any image drawn to the context will be affected. This sets the property across all current browsers but support is patchy on earlier browsers, especially on mobile.

func (*Canvas) SetTouchAction

func (self *Canvas) SetTouchAction(canvas *dom.HTMLCanvasElement) dom.HTMLCanvasElement

SetTouchAction Sets the touch-action property on the canvas style. Can be used to disable default browser touch actions.

func (*Canvas) SetTouchAction1O

func (self *Canvas) SetTouchAction1O(canvas *dom.HTMLCanvasElement, value string) dom.HTMLCanvasElement

SetTouchAction1O Sets the touch-action property on the canvas style. Can be used to disable default browser touch actions.

func (*Canvas) SetTouchActionI

func (self *Canvas) SetTouchActionI(args ...interface{}) dom.HTMLCanvasElement

SetTouchActionI Sets the touch-action property on the canvas style. Can be used to disable default browser touch actions.

func (*Canvas) SetTransform

func (self *Canvas) SetTransform(context *dom.CanvasRenderingContext2D, translateX int, translateY int, scaleX int, scaleY int, skewX int, skewY int) dom.CanvasRenderingContext2D

SetTransform Sets the transform of the given canvas to the matrix values provided.

func (*Canvas) SetTransformI

func (self *Canvas) SetTransformI(args ...interface{}) dom.CanvasRenderingContext2D

SetTransformI Sets the transform of the given canvas to the matrix values provided.

func (*Canvas) SetUserSelect

func (self *Canvas) SetUserSelect(canvas *dom.HTMLCanvasElement) dom.HTMLCanvasElement

SetUserSelect Sets the user-select property on the canvas style. Can be used to disable default browser selection actions.

func (*Canvas) SetUserSelect1O

func (self *Canvas) SetUserSelect1O(canvas *dom.HTMLCanvasElement, value string) dom.HTMLCanvasElement

SetUserSelect1O Sets the user-select property on the canvas style. Can be used to disable default browser selection actions.

func (*Canvas) SetUserSelectI

func (self *Canvas) SetUserSelectI(args ...interface{}) dom.HTMLCanvasElement

SetUserSelectI Sets the user-select property on the canvas style. Can be used to disable default browser selection actions.

type CanvasBuffer

type CanvasBuffer struct {
	*js.Object
}

CanvasBuffer Creates a Canvas element of the given size.

func NewCanvasBuffer

func NewCanvasBuffer(width int, height int) *CanvasBuffer

NewCanvasBuffer Creates a Canvas element of the given size.

func NewCanvasBufferI

func NewCanvasBufferI(args ...interface{}) *CanvasBuffer

NewCanvasBufferI Creates a Canvas element of the given size.

func ToCanvasBuffer

func ToCanvasBuffer(jsStruct interface{}) *CanvasBuffer

CanvasBuffer Binding conversion method to CanvasBuffer point

func (*CanvasBuffer) Canvas

func (self *CanvasBuffer) Canvas() dom.HTMLCanvasElement

Canvas The Canvas object that belongs to this CanvasBuffer.

func (*CanvasBuffer) Clear

func (self *CanvasBuffer) Clear()

Clear Clears the canvas that was created by the CanvasBuffer class.

func (*CanvasBuffer) ClearI

func (self *CanvasBuffer) ClearI(args ...interface{})

ClearI Clears the canvas that was created by the CanvasBuffer class.

func (*CanvasBuffer) Context

func (self *CanvasBuffer) Context() dom.CanvasRenderingContext2D

Context A CanvasRenderingContext2D object representing a two-dimensional rendering context.

func (*CanvasBuffer) Destroy

func (self *CanvasBuffer) Destroy()

Destroy Frees the canvas up for use again.

func (*CanvasBuffer) DestroyI

func (self *CanvasBuffer) DestroyI(args ...interface{})

DestroyI Frees the canvas up for use again.

func (*CanvasBuffer) Height

func (self *CanvasBuffer) Height() int

Height The height of the Canvas in pixels.

func (*CanvasBuffer) Resize

func (self *CanvasBuffer) Resize(width int, height int)

Resize Resizes the canvas to the specified width and height.

func (*CanvasBuffer) ResizeI

func (self *CanvasBuffer) ResizeI(args ...interface{})

ResizeI Resizes the canvas to the specified width and height.

func (*CanvasBuffer) SetCanvasA

func (self *CanvasBuffer) SetCanvasA(member dom.HTMLCanvasElement)

SetCanvasA The Canvas object that belongs to this CanvasBuffer.

func (*CanvasBuffer) SetContextA

func (self *CanvasBuffer) SetContextA(member dom.CanvasRenderingContext2D)

SetContextA A CanvasRenderingContext2D object representing a two-dimensional rendering context.

func (*CanvasBuffer) SetHeightA

func (self *CanvasBuffer) SetHeightA(member int)

SetHeightA The height of the Canvas in pixels.

func (*CanvasBuffer) SetWidthA

func (self *CanvasBuffer) SetWidthA(member int)

SetWidthA The width of the Canvas in pixels.

func (*CanvasBuffer) Width

func (self *CanvasBuffer) Width() int

Width The width of the Canvas in pixels.

type CanvasGraphics

type CanvasGraphics struct {
	*js.Object
}

CanvasGraphics A set of functions used by the canvas renderer to draw the primitive graphics data.

func NewCanvasGraphics

func NewCanvasGraphics() *CanvasGraphics

NewCanvasGraphics A set of functions used by the canvas renderer to draw the primitive graphics data.

func NewCanvasGraphicsI

func NewCanvasGraphicsI(args ...interface{}) *CanvasGraphics

NewCanvasGraphicsI A set of functions used by the canvas renderer to draw the primitive graphics data.

func ToCanvasGraphics

func ToCanvasGraphics(jsStruct interface{}) *CanvasGraphics

CanvasGraphics Binding conversion method to CanvasGraphics point

type CanvasMaskManager

type CanvasMaskManager struct {
	*js.Object
}

CanvasMaskManager A set of functions used to handle masking.

func NewCanvasMaskManager

func NewCanvasMaskManager() *CanvasMaskManager

NewCanvasMaskManager A set of functions used to handle masking.

func NewCanvasMaskManagerI

func NewCanvasMaskManagerI(args ...interface{}) *CanvasMaskManager

NewCanvasMaskManagerI A set of functions used to handle masking.

func ToCanvasMaskManager

func ToCanvasMaskManager(jsStruct interface{}) *CanvasMaskManager

CanvasMaskManager Binding conversion method to CanvasMaskManager point

func (*CanvasMaskManager) PopMask

func (self *CanvasMaskManager) PopMask(renderSession interface{})

PopMask Restores the current drawing context to the state it was before the mask was applied.

func (*CanvasMaskManager) PopMaskI

func (self *CanvasMaskManager) PopMaskI(args ...interface{})

PopMaskI Restores the current drawing context to the state it was before the mask was applied.

func (*CanvasMaskManager) PushMask

func (self *CanvasMaskManager) PushMask(maskData interface{}, renderSession interface{})

PushMask This method adds it to the current stack of masks.

func (*CanvasMaskManager) PushMaskI

func (self *CanvasMaskManager) PushMaskI(args ...interface{})

PushMaskI This method adds it to the current stack of masks.

type CanvasPool

type CanvasPool struct {
	*js.Object
}

CanvasPool The CanvasPool is a global static object that allows Pixi and Phaser to pool canvas DOM elements.

func NewCanvasPool

func NewCanvasPool() *CanvasPool

NewCanvasPool The CanvasPool is a global static object that allows Pixi and Phaser to pool canvas DOM elements.

func NewCanvasPoolI

func NewCanvasPoolI(args ...interface{}) *CanvasPool

NewCanvasPoolI The CanvasPool is a global static object that allows Pixi and Phaser to pool canvas DOM elements.

func ToCanvasPool

func ToCanvasPool(jsStruct interface{}) *CanvasPool

CanvasPool Binding conversion method to CanvasPool point

func (*CanvasPool) Create

func (self *CanvasPool) Create(parent interface{}, width int, height int) dom.HTMLCanvasElement

Create Creates a new Canvas DOM element, or pulls one from the pool if free.

func (*CanvasPool) CreateI

func (self *CanvasPool) CreateI(args ...interface{}) dom.HTMLCanvasElement

CreateI Creates a new Canvas DOM element, or pulls one from the pool if free.

func (*CanvasPool) GetFirst

func (self *CanvasPool) GetFirst() int

GetFirst Gets the first free canvas index from the pool.

func (*CanvasPool) GetFirstI

func (self *CanvasPool) GetFirstI(args ...interface{}) int

GetFirstI Gets the first free canvas index from the pool.

func (*CanvasPool) GetFree

func (self *CanvasPool) GetFree() int

GetFree Gets the total number of free canvas elements in the pool.

func (*CanvasPool) GetFreeI

func (self *CanvasPool) GetFreeI(args ...interface{}) int

GetFreeI Gets the total number of free canvas elements in the pool.

func (*CanvasPool) GetTotal

func (self *CanvasPool) GetTotal() int

GetTotal Gets the total number of used canvas elements in the pool.

func (*CanvasPool) GetTotalI

func (self *CanvasPool) GetTotalI(args ...interface{}) int

GetTotalI Gets the total number of used canvas elements in the pool.

func (*CanvasPool) Pool

func (self *CanvasPool) Pool() []interface{}

Pool The pool into which the canvas dom elements are placed.

func (*CanvasPool) Remove

func (self *CanvasPool) Remove(parent interface{})

Remove Removes the parent from a canvas element from the pool, freeing it up for re-use.

func (*CanvasPool) RemoveByCanvas

func (self *CanvasPool) RemoveByCanvas(canvas *dom.HTMLCanvasElement)

RemoveByCanvas Removes the parent from a canvas element from the pool, freeing it up for re-use.

func (*CanvasPool) RemoveByCanvasI

func (self *CanvasPool) RemoveByCanvasI(args ...interface{})

RemoveByCanvasI Removes the parent from a canvas element from the pool, freeing it up for re-use.

func (*CanvasPool) RemoveI

func (self *CanvasPool) RemoveI(args ...interface{})

RemoveI Removes the parent from a canvas element from the pool, freeing it up for re-use.

func (*CanvasPool) SetPoolA

func (self *CanvasPool) SetPoolA(member []interface{})

SetPoolA The pool into which the canvas dom elements are placed.

type CanvasRenderer

type CanvasRenderer struct {
	*js.Object
}

CanvasRenderer The CanvasRenderer draws the Stage and all its content onto a 2d canvas. This renderer should be used for browsers that do not support webGL.

Don't forget to add the CanvasRenderer.view to your DOM or you will not see anything :)

func NewCanvasRenderer

func NewCanvasRenderer(game *PhaserGame) *CanvasRenderer

NewCanvasRenderer The CanvasRenderer draws the Stage and all its content onto a 2d canvas. This renderer should be used for browsers that do not support webGL.

Don't forget to add the CanvasRenderer.view to your DOM or you will not see anything :)

func NewCanvasRendererI

func NewCanvasRendererI(args ...interface{}) *CanvasRenderer

NewCanvasRendererI The CanvasRenderer draws the Stage and all its content onto a 2d canvas. This renderer should be used for browsers that do not support webGL.

Don't forget to add the CanvasRenderer.view to your DOM or you will not see anything :)

func ToCanvasRenderer

func ToCanvasRenderer(jsStruct interface{}) *CanvasRenderer

CanvasRenderer Binding conversion method to CanvasRenderer point

func (*CanvasRenderer) AutoResize

func (self *CanvasRenderer) AutoResize() bool

AutoResize Whether the render view should be resized automatically

func (*CanvasRenderer) CanvasMaskManager

func (self *CanvasRenderer) CanvasMaskManager() *CanvasMaskManager

CanvasMaskManager Instance of a PIXI.CanvasMaskManager, handles masking when using the canvas renderer

func (*CanvasRenderer) ClearBeforeRender

func (self *CanvasRenderer) ClearBeforeRender() bool

ClearBeforeRender This sets if the CanvasRenderer will clear the canvas or not before the new render pass.

If the Stage is NOT transparent Pixi will use a canvas sized fillRect operation every frame to set the canvas background color.

If the Stage is transparent Pixi will use clearRect to clear the canvas every frame.

Disable this by setting this to false. For example if your game has a canvas filling background image you often don't need this set.

func (*CanvasRenderer) Context

Context The canvas 2d context that everything is drawn with

func (*CanvasRenderer) Count

func (self *CanvasRenderer) Count() int

Count Internal var.

func (*CanvasRenderer) Destroy

func (self *CanvasRenderer) Destroy()

Destroy Removes everything from the renderer and optionally removes the Canvas DOM element.

func (*CanvasRenderer) Destroy1O

func (self *CanvasRenderer) Destroy1O(removeView bool)

Destroy1O Removes everything from the renderer and optionally removes the Canvas DOM element.

func (*CanvasRenderer) DestroyI

func (self *CanvasRenderer) DestroyI(args ...interface{})

DestroyI Removes everything from the renderer and optionally removes the Canvas DOM element.

func (*CanvasRenderer) Game

func (self *CanvasRenderer) Game() *PhaserGame

Game empty description

func (*CanvasRenderer) Height

func (self *CanvasRenderer) Height() int

Height The height of the canvas view

func (*CanvasRenderer) MapBlendModes

func (self *CanvasRenderer) MapBlendModes()

MapBlendModes Maps Pixi blend modes to canvas blend modes.

func (*CanvasRenderer) MapBlendModesI

func (self *CanvasRenderer) MapBlendModesI(args ...interface{})

MapBlendModesI Maps Pixi blend modes to canvas blend modes.

func (*CanvasRenderer) Refresh

func (self *CanvasRenderer) Refresh() bool

Refresh Boolean flag controlling canvas refresh.

func (*CanvasRenderer) Render

func (self *CanvasRenderer) Render(root interface{})

Render Renders the DisplayObjectContainer, usually the Phaser.Stage, to this canvas view.

func (*CanvasRenderer) RenderDisplayObject

func (self *CanvasRenderer) RenderDisplayObject(displayObject *DisplayObject, context *dom.CanvasRenderingContext2D)

RenderDisplayObject Renders a display object

func (*CanvasRenderer) RenderDisplayObject1O

func (self *CanvasRenderer) RenderDisplayObject1O(displayObject *DisplayObject, context *dom.CanvasRenderingContext2D, matrix *Matrix)

RenderDisplayObject1O Renders a display object

func (*CanvasRenderer) RenderDisplayObjectI

func (self *CanvasRenderer) RenderDisplayObjectI(args ...interface{})

RenderDisplayObjectI Renders a display object

func (*CanvasRenderer) RenderI

func (self *CanvasRenderer) RenderI(args ...interface{})

RenderI Renders the DisplayObjectContainer, usually the Phaser.Stage, to this canvas view.

func (*CanvasRenderer) RenderSession

func (self *CanvasRenderer) RenderSession() interface{}

RenderSession The render session is just a bunch of parameter used for rendering

func (*CanvasRenderer) Resize

func (self *CanvasRenderer) Resize(width int, height int)

Resize Resizes the canvas view to the specified width and height

func (*CanvasRenderer) ResizeI

func (self *CanvasRenderer) ResizeI(args ...interface{})

ResizeI Resizes the canvas view to the specified width and height

func (*CanvasRenderer) Resolution

func (self *CanvasRenderer) Resolution() int

Resolution The resolution of the canvas.

func (*CanvasRenderer) SetAutoResizeA

func (self *CanvasRenderer) SetAutoResizeA(member bool)

SetAutoResizeA Whether the render view should be resized automatically

func (*CanvasRenderer) SetCanvasMaskManagerA

func (self *CanvasRenderer) SetCanvasMaskManagerA(member *CanvasMaskManager)

SetCanvasMaskManagerA Instance of a PIXI.CanvasMaskManager, handles masking when using the canvas renderer

func (*CanvasRenderer) SetClearBeforeRenderA

func (self *CanvasRenderer) SetClearBeforeRenderA(member bool)

SetClearBeforeRenderA This sets if the CanvasRenderer will clear the canvas or not before the new render pass.

If the Stage is NOT transparent Pixi will use a canvas sized fillRect operation every frame to set the canvas background color.

If the Stage is transparent Pixi will use clearRect to clear the canvas every frame.

Disable this by setting this to false. For example if your game has a canvas filling background image you often don't need this set.

func (*CanvasRenderer) SetContextA

func (self *CanvasRenderer) SetContextA(member dom.CanvasRenderingContext2D)

SetContextA The canvas 2d context that everything is drawn with

func (*CanvasRenderer) SetCountA

func (self *CanvasRenderer) SetCountA(member int)

SetCountA Internal var.

func (*CanvasRenderer) SetGameA

func (self *CanvasRenderer) SetGameA(member *PhaserGame)

SetGameA empty description

func (*CanvasRenderer) SetHeightA

func (self *CanvasRenderer) SetHeightA(member int)

SetHeightA The height of the canvas view

func (*CanvasRenderer) SetRefreshA

func (self *CanvasRenderer) SetRefreshA(member bool)

SetRefreshA Boolean flag controlling canvas refresh.

func (*CanvasRenderer) SetRenderSessionA

func (self *CanvasRenderer) SetRenderSessionA(member interface{})

SetRenderSessionA The render session is just a bunch of parameter used for rendering

func (*CanvasRenderer) SetResolutionA

func (self *CanvasRenderer) SetResolutionA(member int)

SetResolutionA The resolution of the canvas.

func (*CanvasRenderer) SetTransparentA

func (self *CanvasRenderer) SetTransparentA(member bool)

SetTransparentA Whether the render view is transparent

func (*CanvasRenderer) SetTypeA

func (self *CanvasRenderer) SetTypeA(member int)

SetTypeA The renderer type.

func (*CanvasRenderer) SetViewA

func (self *CanvasRenderer) SetViewA(member dom.HTMLCanvasElement)

SetViewA The canvas element that everything is drawn to.

func (*CanvasRenderer) SetWidthA

func (self *CanvasRenderer) SetWidthA(member int)

SetWidthA The width of the canvas view

func (*CanvasRenderer) Transparent

func (self *CanvasRenderer) Transparent() bool

Transparent Whether the render view is transparent

func (*CanvasRenderer) Type

func (self *CanvasRenderer) Type() int

Type The renderer type.

func (*CanvasRenderer) View

func (self *CanvasRenderer) View() dom.HTMLCanvasElement

View The canvas element that everything is drawn to.

func (*CanvasRenderer) Width

func (self *CanvasRenderer) Width() int

Width The width of the canvas view

type CanvasTinter

type CanvasTinter struct {
	*js.Object
}

CanvasTinter Utility methods for Sprite/Texture tinting.

func NewCanvasTinter

func NewCanvasTinter() *CanvasTinter

NewCanvasTinter Utility methods for Sprite/Texture tinting.

func NewCanvasTinterI

func NewCanvasTinterI(args ...interface{}) *CanvasTinter

NewCanvasTinterI Utility methods for Sprite/Texture tinting.

func ToCanvasTinter

func ToCanvasTinter(jsStruct interface{}) *CanvasTinter

CanvasTinter Binding conversion method to CanvasTinter point

func (*CanvasTinter) CanHandleAlpha

func (self *CanvasTinter) CanHandleAlpha() bool

CanHandleAlpha If the browser isn't capable of handling tinting with alpha this will be false.

This property is only applicable if using tintWithPerPixel.

func (*CanvasTinter) CanUseMultiply

func (self *CanvasTinter) CanUseMultiply() bool

CanUseMultiply Whether or not the Canvas BlendModes are supported, consequently the ability to tint using the multiply method.

func (*CanvasTinter) CheckInverseAlpha

func (self *CanvasTinter) CheckInverseAlpha()

CheckInverseAlpha Checks if the browser correctly supports putImageData alpha channels.

func (*CanvasTinter) CheckInverseAlphaI

func (self *CanvasTinter) CheckInverseAlphaI(args ...interface{})

CheckInverseAlphaI Checks if the browser correctly supports putImageData alpha channels.

func (*CanvasTinter) GetTintedTexture

func (self *CanvasTinter) GetTintedTexture(sprite *Sprite, color int) dom.HTMLCanvasElement

GetTintedTexture Basically this method just needs a sprite and a color and tints the sprite with the given color.

func (*CanvasTinter) GetTintedTextureI

func (self *CanvasTinter) GetTintedTextureI(args ...interface{}) dom.HTMLCanvasElement

GetTintedTextureI Basically this method just needs a sprite and a color and tints the sprite with the given color.

func (*CanvasTinter) SetCanHandleAlphaA

func (self *CanvasTinter) SetCanHandleAlphaA(member bool)

SetCanHandleAlphaA If the browser isn't capable of handling tinting with alpha this will be false.

This property is only applicable if using tintWithPerPixel.

func (*CanvasTinter) SetCanUseMultiplyA

func (self *CanvasTinter) SetCanUseMultiplyA(member bool)

SetCanUseMultiplyA Whether or not the Canvas BlendModes are supported, consequently the ability to tint using the multiply method.

func (*CanvasTinter) TintMethod

func (self *CanvasTinter) TintMethod()

TintMethod The tinting method that will be used.

func (*CanvasTinter) TintMethodI

func (self *CanvasTinter) TintMethodI(args ...interface{})

TintMethodI The tinting method that will be used.

func (*CanvasTinter) TintPerPixel

func (self *CanvasTinter) TintPerPixel(texture *Texture, color int, canvas *dom.HTMLCanvasElement)

TintPerPixel Tint a texture pixel per pixel.

func (*CanvasTinter) TintPerPixelI

func (self *CanvasTinter) TintPerPixelI(args ...interface{})

TintPerPixelI Tint a texture pixel per pixel.

func (*CanvasTinter) TintWithMultiply

func (self *CanvasTinter) TintWithMultiply(texture *Texture, color int, canvas *dom.HTMLCanvasElement)

TintWithMultiply Tint a texture using the "multiply" operation.

func (*CanvasTinter) TintWithMultiplyI

func (self *CanvasTinter) TintWithMultiplyI(args ...interface{})

TintWithMultiplyI Tint a texture using the "multiply" operation.

type Circle

type Circle struct {
	*js.Object
}

Circle Creates a new Circle object with the center coordinate specified by the x and y parameters and the diameter specified by the diameter parameter. If you call this function without parameters, a circle with x, y, diameter and radius properties set to 0 is created.

func NewCircle

func NewCircle() *Circle

NewCircle Creates a new Circle object with the center coordinate specified by the x and y parameters and the diameter specified by the diameter parameter. If you call this function without parameters, a circle with x, y, diameter and radius properties set to 0 is created.

func NewCircle1O

func NewCircle1O(x int) *Circle

NewCircle1O Creates a new Circle object with the center coordinate specified by the x and y parameters and the diameter specified by the diameter parameter. If you call this function without parameters, a circle with x, y, diameter and radius properties set to 0 is created.

func NewCircle2O

func NewCircle2O(x int, y int) *Circle

NewCircle2O Creates a new Circle object with the center coordinate specified by the x and y parameters and the diameter specified by the diameter parameter. If you call this function without parameters, a circle with x, y, diameter and radius properties set to 0 is created.

func NewCircle3O

func NewCircle3O(x int, y int, diameter int) *Circle

NewCircle3O Creates a new Circle object with the center coordinate specified by the x and y parameters and the diameter specified by the diameter parameter. If you call this function without parameters, a circle with x, y, diameter and radius properties set to 0 is created.

func NewCircleI

func NewCircleI(args ...interface{}) *Circle

NewCircleI Creates a new Circle object with the center coordinate specified by the x and y parameters and the diameter specified by the diameter parameter. If you call this function without parameters, a circle with x, y, diameter and radius properties set to 0 is created.

func ToCircle

func ToCircle(jsStruct interface{}) *Circle

Circle Binding conversion method to Circle point

func (*Circle) Area

func (self *Circle) Area() int

Area The area of this Circle.

func (*Circle) Bottom

func (self *Circle) Bottom() int

Bottom The sum of the y and radius properties. Changing the bottom property of a Circle object has no effect on the x and y properties, but does change the diameter. Gets or sets the bottom of the circle.

func (*Circle) Circumference

func (self *Circle) Circumference() int

Circumference The circumference of the circle.

func (*Circle) CircumferenceI

func (self *Circle) CircumferenceI(args ...interface{}) int

CircumferenceI The circumference of the circle.

func (*Circle) CircumferencePoint

func (self *Circle) CircumferencePoint(angle int) *Point

CircumferencePoint Returns a Point object containing the coordinates of a point on the circumference of the Circle based on the given angle.

func (*Circle) CircumferencePoint1O

func (self *Circle) CircumferencePoint1O(angle int, asDegrees bool) *Point

CircumferencePoint1O Returns a Point object containing the coordinates of a point on the circumference of the Circle based on the given angle.

func (*Circle) CircumferencePoint2O

func (self *Circle) CircumferencePoint2O(angle int, asDegrees bool, out *Point) *Point

CircumferencePoint2O Returns a Point object containing the coordinates of a point on the circumference of the Circle based on the given angle.

func (*Circle) CircumferencePointI

func (self *Circle) CircumferencePointI(args ...interface{}) *Point

CircumferencePointI Returns a Point object containing the coordinates of a point on the circumference of the Circle based on the given angle.

func (*Circle) Clone

func (self *Circle) Clone(output *Circle) *Circle

Clone Returns a new Circle object with the same values for the x, y, width, and height properties as this Circle object.

func (*Circle) CloneI

func (self *Circle) CloneI(args ...interface{}) *Circle

CloneI Returns a new Circle object with the same values for the x, y, width, and height properties as this Circle object.

func (*Circle) Contains

func (self *Circle) Contains(x int, y int) bool

Contains Return true if the given x/y coordinates are within this Circle object.

func (*Circle) ContainsI

func (self *Circle) ContainsI(args ...interface{}) bool

ContainsI Return true if the given x/y coordinates are within this Circle object.

func (*Circle) CopyFrom

func (self *Circle) CopyFrom(source interface{}) *Circle

CopyFrom Copies the x, y and diameter properties from any given object to this Circle.

func (*Circle) CopyFromI

func (self *Circle) CopyFromI(args ...interface{}) *Circle

CopyFromI Copies the x, y and diameter properties from any given object to this Circle.

func (*Circle) CopyTo

func (self *Circle) CopyTo(dest interface{}) interface{}

CopyTo Copies the x, y and diameter properties from this Circle to any given object.

func (*Circle) CopyToI

func (self *Circle) CopyToI(args ...interface{}) interface{}

CopyToI Copies the x, y and diameter properties from this Circle to any given object.

func (*Circle) Diameter

func (self *Circle) Diameter() int

Diameter The largest distance between any two points on the circle. The same as the radius * 2. Gets or sets the diameter of the circle.

func (*Circle) Distance

func (self *Circle) Distance(dest interface{}) int

Distance Returns the distance from the center of the Circle object to the given object (can be Circle, Point or anything with x/y properties)

func (*Circle) Distance1O

func (self *Circle) Distance1O(dest interface{}, round bool) int

Distance1O Returns the distance from the center of the Circle object to the given object (can be Circle, Point or anything with x/y properties)

func (*Circle) DistanceI

func (self *Circle) DistanceI(args ...interface{}) int

DistanceI Returns the distance from the center of the Circle object to the given object (can be Circle, Point or anything with x/y properties)

func (*Circle) Empty

func (self *Circle) Empty() bool

Empty Determines whether or not this Circle object is empty. Will return a value of true if the Circle objects diameter is less than or equal to 0; otherwise false. If set to true it will reset all of the Circle objects properties to 0. A Circle object is empty if its diameter is less than or equal to 0. Gets or sets the empty state of the circle.

func (*Circle) Equals

func (self *Circle) Equals(a *Circle, b *Circle) bool

Equals Determines whether the two Circle objects match. This method compares the x, y and diameter properties.

func (*Circle) EqualsI

func (self *Circle) EqualsI(args ...interface{}) bool

EqualsI Determines whether the two Circle objects match. This method compares the x, y and diameter properties.

func (*Circle) GetBounds

func (self *Circle) GetBounds() *Rectangle

GetBounds Returns the framing rectangle of the circle as a Phaser.Rectangle object.

func (*Circle) GetBoundsI

func (self *Circle) GetBoundsI(args ...interface{}) *Rectangle

GetBoundsI Returns the framing rectangle of the circle as a Phaser.Rectangle object.

func (*Circle) Intersects

func (self *Circle) Intersects(a *Circle, b *Circle) bool

Intersects Determines whether the two Circle objects intersect. This method checks the radius distances between the two Circle objects to see if they intersect.

func (*Circle) IntersectsI

func (self *Circle) IntersectsI(args ...interface{}) bool

IntersectsI Determines whether the two Circle objects intersect. This method checks the radius distances between the two Circle objects to see if they intersect.

func (*Circle) IntersectsRectangle

func (self *Circle) IntersectsRectangle(c *Circle, r *Rectangle) bool

IntersectsRectangle Checks if the given Circle and Rectangle objects intersect.

func (*Circle) IntersectsRectangleI

func (self *Circle) IntersectsRectangleI(args ...interface{}) bool

IntersectsRectangleI Checks if the given Circle and Rectangle objects intersect.

func (*Circle) Left

func (self *Circle) Left() interface{}

Left The x coordinate of the leftmost point of the circle. Changing the left property of a Circle object has no effect on the x and y properties. However it does affect the diameter, whereas changing the x value does not affect the diameter property.

func (*Circle) Offset

func (self *Circle) Offset(dx int, dy int) *Circle

Offset Adjusts the location of the Circle object, as determined by its center coordinate, by the specified amounts.

func (*Circle) OffsetI

func (self *Circle) OffsetI(args ...interface{}) *Circle

OffsetI Adjusts the location of the Circle object, as determined by its center coordinate, by the specified amounts.

func (*Circle) OffsetPoint

func (self *Circle) OffsetPoint(point *Point) *Circle

OffsetPoint Adjusts the location of the Circle object using a Point object as a parameter. This method is similar to the Circle.offset() method, except that it takes a Point object as a parameter.

func (*Circle) OffsetPointI

func (self *Circle) OffsetPointI(args ...interface{}) *Circle

OffsetPointI Adjusts the location of the Circle object using a Point object as a parameter. This method is similar to the Circle.offset() method, except that it takes a Point object as a parameter.

func (*Circle) Radius

func (self *Circle) Radius() int

Radius The length of a line extending from the center of the circle to any point on the circle itself. The same as half the diameter. Gets or sets the radius of the circle.

func (*Circle) Random

func (self *Circle) Random() *Point

Random Returns a uniformly distributed random point from anywhere within this Circle.

func (*Circle) Random1O

func (self *Circle) Random1O(out interface{}) *Point

Random1O Returns a uniformly distributed random point from anywhere within this Circle.

func (*Circle) RandomI

func (self *Circle) RandomI(args ...interface{}) *Point

RandomI Returns a uniformly distributed random point from anywhere within this Circle.

func (*Circle) Right

func (self *Circle) Right() int

Right The x coordinate of the rightmost point of the circle. Changing the right property of a Circle object has no effect on the x and y properties. However it does affect the diameter, whereas changing the x value does not affect the diameter property. Gets or sets the value of the rightmost point of the circle.

func (*Circle) SetAreaA

func (self *Circle) SetAreaA(member int)

SetAreaA The area of this Circle.

func (*Circle) SetBottomA

func (self *Circle) SetBottomA(member int)

SetBottomA The sum of the y and radius properties. Changing the bottom property of a Circle object has no effect on the x and y properties, but does change the diameter. Gets or sets the bottom of the circle.

func (*Circle) SetDiameterA

func (self *Circle) SetDiameterA(member int)

SetDiameterA The largest distance between any two points on the circle. The same as the radius * 2. Gets or sets the diameter of the circle.

func (*Circle) SetEmptyA

func (self *Circle) SetEmptyA(member bool)

SetEmptyA Determines whether or not this Circle object is empty. Will return a value of true if the Circle objects diameter is less than or equal to 0; otherwise false. If set to true it will reset all of the Circle objects properties to 0. A Circle object is empty if its diameter is less than or equal to 0. Gets or sets the empty state of the circle.

func (*Circle) SetLeftA

func (self *Circle) SetLeftA(member interface{})

SetLeftA The x coordinate of the leftmost point of the circle. Changing the left property of a Circle object has no effect on the x and y properties. However it does affect the diameter, whereas changing the x value does not affect the diameter property.

func (*Circle) SetRadiusA

func (self *Circle) SetRadiusA(member int)

SetRadiusA The length of a line extending from the center of the circle to any point on the circle itself. The same as half the diameter. Gets or sets the radius of the circle.

func (*Circle) SetRightA

func (self *Circle) SetRightA(member int)

SetRightA The x coordinate of the rightmost point of the circle. Changing the right property of a Circle object has no effect on the x and y properties. However it does affect the diameter, whereas changing the x value does not affect the diameter property. Gets or sets the value of the rightmost point of the circle.

func (*Circle) SetTo

func (self *Circle) SetTo(x int, y int, diameter int) *Circle

SetTo Sets the members of Circle to the specified values.

func (*Circle) SetToI

func (self *Circle) SetToI(args ...interface{}) *Circle

SetToI Sets the members of Circle to the specified values.

func (*Circle) SetTopA

func (self *Circle) SetTopA(member int)

SetTopA The sum of the y minus the radius property. Changing the top property of a Circle object has no effect on the x and y properties, but does change the diameter. Gets or sets the top of the circle.

func (*Circle) SetTypeA

func (self *Circle) SetTypeA(member int)

SetTypeA The const type of this object.

func (*Circle) SetXA

func (self *Circle) SetXA(member int)

SetXA The x coordinate of the center of the circle.

func (*Circle) SetYA

func (self *Circle) SetYA(member int)

SetYA The y coordinate of the center of the circle.

func (*Circle) ToString

func (self *Circle) ToString() string

ToString Returns a string representation of this object.

func (*Circle) ToStringI

func (self *Circle) ToStringI(args ...interface{}) string

ToStringI Returns a string representation of this object.

func (*Circle) Top

func (self *Circle) Top() int

Top The sum of the y minus the radius property. Changing the top property of a Circle object has no effect on the x and y properties, but does change the diameter. Gets or sets the top of the circle.

func (*Circle) Type

func (self *Circle) Type() int

Type The const type of this object.

func (*Circle) X

func (self *Circle) X() int

X The x coordinate of the center of the circle.

func (*Circle) Y

func (self *Circle) Y() int

Y The y coordinate of the center of the circle.

type Color

type Color struct {
	*js.Object
}

Color The Phaser.Color class is a set of static methods that assist in color manipulation and conversion.

func NewColor

func NewColor() *Color

NewColor The Phaser.Color class is a set of static methods that assist in color manipulation and conversion.

func NewColorI

func NewColorI(args ...interface{}) *Color

NewColorI The Phaser.Color class is a set of static methods that assist in color manipulation and conversion.

func ToColor

func ToColor(jsStruct interface{}) *Color

Color Binding conversion method to Color point

func (*Color) BlendAdd

func (self *Color) BlendAdd(a int, b int) int

BlendAdd Adds the source and backdrop colors together and returns the value, up to a maximum of 255.

func (*Color) BlendAddI

func (self *Color) BlendAddI(args ...interface{}) int

BlendAddI Adds the source and backdrop colors together and returns the value, up to a maximum of 255.

func (*Color) BlendAverage

func (self *Color) BlendAverage(a int, b int) int

BlendAverage Takes the average of the source and backdrop colors.

func (*Color) BlendAverageI

func (self *Color) BlendAverageI(args ...interface{}) int

BlendAverageI Takes the average of the source and backdrop colors.

func (*Color) BlendColorBurn

func (self *Color) BlendColorBurn(a int, b int) int

BlendColorBurn Darkens the backdrop color to reflect the source color. Painting with white produces no change.

func (*Color) BlendColorBurnI

func (self *Color) BlendColorBurnI(args ...interface{}) int

BlendColorBurnI Darkens the backdrop color to reflect the source color. Painting with white produces no change.

func (*Color) BlendColorDodge

func (self *Color) BlendColorDodge(a int, b int) int

BlendColorDodge Brightens the backdrop color to reflect the source color. Painting with black produces no change.

func (*Color) BlendColorDodgeI

func (self *Color) BlendColorDodgeI(args ...interface{}) int

BlendColorDodgeI Brightens the backdrop color to reflect the source color. Painting with black produces no change.

func (*Color) BlendDarken

func (self *Color) BlendDarken(a int, b int) int

BlendDarken Selects the darker of the backdrop and source colors.

func (*Color) BlendDarkenI

func (self *Color) BlendDarkenI(args ...interface{}) int

BlendDarkenI Selects the darker of the backdrop and source colors.

func (*Color) BlendDifference

func (self *Color) BlendDifference(a int, b int) int

BlendDifference Subtracts the darker of the two constituent colors from the lighter.

Painting with white inverts the backdrop color; painting with black produces no change.

func (*Color) BlendDifferenceI

func (self *Color) BlendDifferenceI(args ...interface{}) int

BlendDifferenceI Subtracts the darker of the two constituent colors from the lighter.

Painting with white inverts the backdrop color; painting with black produces no change.

func (*Color) BlendExclusion

func (self *Color) BlendExclusion(a int, b int) int

BlendExclusion Produces an effect similar to that of the Difference mode, but lower in contrast. Painting with white inverts the backdrop color; painting with black produces no change.

func (*Color) BlendExclusionI

func (self *Color) BlendExclusionI(args ...interface{}) int

BlendExclusionI Produces an effect similar to that of the Difference mode, but lower in contrast. Painting with white inverts the backdrop color; painting with black produces no change.

func (*Color) BlendGlow

func (self *Color) BlendGlow(a int, b int) int

BlendGlow Glow blend mode. This mode is a variation of reflect mode with the source and backdrop colors swapped.

func (*Color) BlendGlowI

func (self *Color) BlendGlowI(args ...interface{}) int

BlendGlowI Glow blend mode. This mode is a variation of reflect mode with the source and backdrop colors swapped.

func (*Color) BlendHardLight

func (self *Color) BlendHardLight(a int, b int) int

BlendHardLight Multiplies or screens the colors, depending on the source color value.

If the source color is lighter than 0.5, the backdrop is lightened, as if it were screened; this is useful for adding highlights to a scene.

If the source color is darker than 0.5, the backdrop is darkened, as if it were multiplied; this is useful for adding shadows to a scene.

The degree of lightening or darkening is proportional to the difference between the source color and 0.5; if it is equal to 0.5, the backdrop is unchanged.

Painting with pure black or white produces pure black or white. The effect is similar to shining a harsh spotlight on the backdrop.

func (*Color) BlendHardLightI

func (self *Color) BlendHardLightI(args ...interface{}) int

BlendHardLightI Multiplies or screens the colors, depending on the source color value.

If the source color is lighter than 0.5, the backdrop is lightened, as if it were screened; this is useful for adding highlights to a scene.

If the source color is darker than 0.5, the backdrop is darkened, as if it were multiplied; this is useful for adding shadows to a scene.

The degree of lightening or darkening is proportional to the difference between the source color and 0.5; if it is equal to 0.5, the backdrop is unchanged.

Painting with pure black or white produces pure black or white. The effect is similar to shining a harsh spotlight on the backdrop.

func (*Color) BlendHardMix

func (self *Color) BlendHardMix(a int, b int) int

BlendHardMix Runs blendVividLight on the source and backdrop colors. If the resulting color is 128 or more, it receives a value of 255; if less than 128, a value of 0. Therefore, all blended pixels have red, green, and blue channel values of either 0 or 255. This changes all pixels to primary additive colors (red, green, or blue), white, or black.

func (*Color) BlendHardMixI

func (self *Color) BlendHardMixI(args ...interface{}) int

BlendHardMixI Runs blendVividLight on the source and backdrop colors. If the resulting color is 128 or more, it receives a value of 255; if less than 128, a value of 0. Therefore, all blended pixels have red, green, and blue channel values of either 0 or 255. This changes all pixels to primary additive colors (red, green, or blue), white, or black.

func (*Color) BlendLighten

func (self *Color) BlendLighten(a int, b int) int

BlendLighten Selects the lighter of the backdrop and source colors.

func (*Color) BlendLightenI

func (self *Color) BlendLightenI(args ...interface{}) int

BlendLightenI Selects the lighter of the backdrop and source colors.

func (*Color) BlendLinearBurn

func (self *Color) BlendLinearBurn(a int, b int) int

BlendLinearBurn An alias for blendSubtract, it simply sums the values of the two colors and subtracts 255.

func (*Color) BlendLinearBurnI

func (self *Color) BlendLinearBurnI(args ...interface{}) int

BlendLinearBurnI An alias for blendSubtract, it simply sums the values of the two colors and subtracts 255.

func (*Color) BlendLinearDodge

func (self *Color) BlendLinearDodge(a int, b int) int

BlendLinearDodge An alias for blendAdd, it simply sums the values of the two colors.

func (*Color) BlendLinearDodgeI

func (self *Color) BlendLinearDodgeI(args ...interface{}) int

BlendLinearDodgeI An alias for blendAdd, it simply sums the values of the two colors.

func (*Color) BlendLinearLight

func (self *Color) BlendLinearLight(a int, b int) int

BlendLinearLight This blend mode combines Linear Dodge and Linear Burn (rescaled so that neutral colors become middle gray). Dodge applies to values of top layer lighter than middle gray, and burn to darker values. The calculation simplifies to the sum of bottom layer and twice the top layer, subtract 128. The contrast decreases.

func (*Color) BlendLinearLightI

func (self *Color) BlendLinearLightI(args ...interface{}) int

BlendLinearLightI This blend mode combines Linear Dodge and Linear Burn (rescaled so that neutral colors become middle gray). Dodge applies to values of top layer lighter than middle gray, and burn to darker values. The calculation simplifies to the sum of bottom layer and twice the top layer, subtract 128. The contrast decreases.

func (*Color) BlendMultiply

func (self *Color) BlendMultiply(a int, b int) int

BlendMultiply Multiplies the backdrop and source color values. The result color is always at least as dark as either of the two constituent colors. Multiplying any color with black produces black; multiplying with white leaves the original color unchanged.

func (*Color) BlendMultiplyI

func (self *Color) BlendMultiplyI(args ...interface{}) int

BlendMultiplyI Multiplies the backdrop and source color values. The result color is always at least as dark as either of the two constituent colors. Multiplying any color with black produces black; multiplying with white leaves the original color unchanged.

func (*Color) BlendNegation

func (self *Color) BlendNegation(a int, b int) int

BlendNegation Negation blend mode.

func (*Color) BlendNegationI

func (self *Color) BlendNegationI(args ...interface{}) int

BlendNegationI Negation blend mode.

func (*Color) BlendNormal

func (self *Color) BlendNormal(a int, b int) int

BlendNormal Blends the source color, ignoring the backdrop.

func (*Color) BlendNormalI

func (self *Color) BlendNormalI(args ...interface{}) int

BlendNormalI Blends the source color, ignoring the backdrop.

func (*Color) BlendOverlay

func (self *Color) BlendOverlay(a int, b int) int

BlendOverlay Multiplies or screens the colors, depending on the backdrop color. Source colors overlay the backdrop while preserving its highlights and shadows. The backdrop color is not replaced, but is mixed with the source color to reflect the lightness or darkness of the backdrop.

func (*Color) BlendOverlayI

func (self *Color) BlendOverlayI(args ...interface{}) int

BlendOverlayI Multiplies or screens the colors, depending on the backdrop color. Source colors overlay the backdrop while preserving its highlights and shadows. The backdrop color is not replaced, but is mixed with the source color to reflect the lightness or darkness of the backdrop.

func (*Color) BlendPhoenix

func (self *Color) BlendPhoenix(a int, b int) int

BlendPhoenix Phoenix blend mode. This subtracts the lighter color from the darker color, and adds 255, giving a bright result.

func (*Color) BlendPhoenixI

func (self *Color) BlendPhoenixI(args ...interface{}) int

BlendPhoenixI Phoenix blend mode. This subtracts the lighter color from the darker color, and adds 255, giving a bright result.

func (*Color) BlendPinLight

func (self *Color) BlendPinLight(a int, b int) int

BlendPinLight If the backdrop color (light source) is lighter than 50%, the blendDarken mode is used, and colors lighter than the backdrop color do not change. If the backdrop color is darker than 50% gray, colors lighter than the blend color are replaced, and colors darker than the blend color do not change.

func (*Color) BlendPinLightI

func (self *Color) BlendPinLightI(args ...interface{}) int

BlendPinLightI If the backdrop color (light source) is lighter than 50%, the blendDarken mode is used, and colors lighter than the backdrop color do not change. If the backdrop color is darker than 50% gray, colors lighter than the blend color are replaced, and colors darker than the blend color do not change.

func (*Color) BlendReflect

func (self *Color) BlendReflect(a int, b int) int

BlendReflect Reflect blend mode. This mode is useful when adding shining objects or light zones to images.

func (*Color) BlendReflectI

func (self *Color) BlendReflectI(args ...interface{}) int

BlendReflectI Reflect blend mode. This mode is useful when adding shining objects or light zones to images.

func (*Color) BlendScreen

func (self *Color) BlendScreen(a int, b int) int

BlendScreen Multiplies the complements of the backdrop and source color values, then complements the result. The result color is always at least as light as either of the two constituent colors. Screening any color with white produces white; screening with black leaves the original color unchanged.

func (*Color) BlendScreenI

func (self *Color) BlendScreenI(args ...interface{}) int

BlendScreenI Multiplies the complements of the backdrop and source color values, then complements the result. The result color is always at least as light as either of the two constituent colors. Screening any color with white produces white; screening with black leaves the original color unchanged.

func (*Color) BlendSoftLight

func (self *Color) BlendSoftLight(a int, b int) int

BlendSoftLight Darkens or lightens the colors, depending on the source color value.

If the source color is lighter than 0.5, the backdrop is lightened, as if it were dodged; this is useful for adding highlights to a scene.

If the source color is darker than 0.5, the backdrop is darkened, as if it were burned in. The degree of lightening or darkening is proportional to the difference between the source color and 0.5; if it is equal to 0.5, the backdrop is unchanged.

Painting with pure black or white produces a distinctly darker or lighter area, but does not result in pure black or white. The effect is similar to shining a diffused spotlight on the backdrop.

func (*Color) BlendSoftLightI

func (self *Color) BlendSoftLightI(args ...interface{}) int

BlendSoftLightI Darkens or lightens the colors, depending on the source color value.

If the source color is lighter than 0.5, the backdrop is lightened, as if it were dodged; this is useful for adding highlights to a scene.

If the source color is darker than 0.5, the backdrop is darkened, as if it were burned in. The degree of lightening or darkening is proportional to the difference between the source color and 0.5; if it is equal to 0.5, the backdrop is unchanged.

Painting with pure black or white produces a distinctly darker or lighter area, but does not result in pure black or white. The effect is similar to shining a diffused spotlight on the backdrop.

func (*Color) BlendSubtract

func (self *Color) BlendSubtract(a int, b int) int

BlendSubtract Combines the source and backdrop colors and returns their value minus 255.

func (*Color) BlendSubtractI

func (self *Color) BlendSubtractI(args ...interface{}) int

BlendSubtractI Combines the source and backdrop colors and returns their value minus 255.

func (*Color) BlendVividLight

func (self *Color) BlendVividLight(a int, b int) int

BlendVividLight This blend mode combines Color Dodge and Color Burn (rescaled so that neutral colors become middle gray). Dodge applies when values in the top layer are lighter than middle gray, and burn to darker values. The middle gray is the neutral color. When color is lighter than this, this effectively moves the white point of the bottom layer down by twice the difference; when it is darker, the black point is moved up by twice the difference. The perceived contrast increases.

func (*Color) BlendVividLightI

func (self *Color) BlendVividLightI(args ...interface{}) int

BlendVividLightI This blend mode combines Color Dodge and Color Burn (rescaled so that neutral colors become middle gray). Dodge applies when values in the top layer are lighter than middle gray, and burn to darker values. The middle gray is the neutral color. When color is lighter than this, this effectively moves the white point of the bottom layer down by twice the difference; when it is darker, the black point is moved up by twice the difference. The perceived contrast increases.

func (*Color) ComponentToHex

func (self *Color) ComponentToHex(color int) string

ComponentToHex Return a string containing a hex representation of the given color component.

func (*Color) ComponentToHexI

func (self *Color) ComponentToHexI(args ...interface{}) string

ComponentToHexI Return a string containing a hex representation of the given color component.

func (*Color) CreateColor

func (self *Color) CreateColor() interface{}

CreateColor A utility function to create a lightweight 'color' object with the default components. Any components that are not specified will default to zero.

This is useful when you want to use a shared color object for the getPixel and getPixelAt methods.

func (*Color) CreateColor1O

func (self *Color) CreateColor1O(r int) interface{}

CreateColor1O A utility function to create a lightweight 'color' object with the default components. Any components that are not specified will default to zero.

This is useful when you want to use a shared color object for the getPixel and getPixelAt methods.

func (*Color) CreateColor2O

func (self *Color) CreateColor2O(r int, g int) interface{}

CreateColor2O A utility function to create a lightweight 'color' object with the default components. Any components that are not specified will default to zero.

This is useful when you want to use a shared color object for the getPixel and getPixelAt methods.

func (*Color) CreateColor3O

func (self *Color) CreateColor3O(r int, g int, b int) interface{}

CreateColor3O A utility function to create a lightweight 'color' object with the default components. Any components that are not specified will default to zero.

This is useful when you want to use a shared color object for the getPixel and getPixelAt methods.

func (*Color) CreateColor4O

func (self *Color) CreateColor4O(r int, g int, b int, a int) interface{}

CreateColor4O A utility function to create a lightweight 'color' object with the default components. Any components that are not specified will default to zero.

This is useful when you want to use a shared color object for the getPixel and getPixelAt methods.

func (*Color) CreateColor5O

func (self *Color) CreateColor5O(r int, g int, b int, a int, h int) interface{}

CreateColor5O A utility function to create a lightweight 'color' object with the default components. Any components that are not specified will default to zero.

This is useful when you want to use a shared color object for the getPixel and getPixelAt methods.

func (*Color) CreateColor6O

func (self *Color) CreateColor6O(r int, g int, b int, a int, h int, s int) interface{}

CreateColor6O A utility function to create a lightweight 'color' object with the default components. Any components that are not specified will default to zero.

This is useful when you want to use a shared color object for the getPixel and getPixelAt methods.

func (*Color) CreateColor7O

func (self *Color) CreateColor7O(r int, g int, b int, a int, h int, s int, l int) interface{}

CreateColor7O A utility function to create a lightweight 'color' object with the default components. Any components that are not specified will default to zero.

This is useful when you want to use a shared color object for the getPixel and getPixelAt methods.

func (*Color) CreateColor8O

func (self *Color) CreateColor8O(r int, g int, b int, a int, h int, s int, l int, v int) interface{}

CreateColor8O A utility function to create a lightweight 'color' object with the default components. Any components that are not specified will default to zero.

This is useful when you want to use a shared color object for the getPixel and getPixelAt methods.

func (*Color) CreateColorI

func (self *Color) CreateColorI(args ...interface{}) interface{}

CreateColorI A utility function to create a lightweight 'color' object with the default components. Any components that are not specified will default to zero.

This is useful when you want to use a shared color object for the getPixel and getPixelAt methods.

func (*Color) FromRGBA

func (self *Color) FromRGBA(rgba int) interface{}

FromRGBA A utility to convert an integer in 0xRRGGBBAA format to a color object. This does not rely on endianness.

func (*Color) FromRGBA1O

func (self *Color) FromRGBA1O(rgba int, out interface{}) interface{}

FromRGBA1O A utility to convert an integer in 0xRRGGBBAA format to a color object. This does not rely on endianness.

func (*Color) FromRGBAI

func (self *Color) FromRGBAI(args ...interface{}) interface{}

FromRGBAI A utility to convert an integer in 0xRRGGBBAA format to a color object. This does not rely on endianness.

func (*Color) GetAlpha

func (self *Color) GetAlpha(color int) int

GetAlpha Given a native color value (in the format 0xAARRGGBB) this will return the Alpha component, as a value between 0 and 255.

func (*Color) GetAlphaFloat

func (self *Color) GetAlphaFloat(color int) int

GetAlphaFloat Given a native color value (in the format 0xAARRGGBB) this will return the Alpha component as a value between 0 and 1.

func (*Color) GetAlphaFloatI

func (self *Color) GetAlphaFloatI(args ...interface{}) int

GetAlphaFloatI Given a native color value (in the format 0xAARRGGBB) this will return the Alpha component as a value between 0 and 1.

func (*Color) GetAlphaI

func (self *Color) GetAlphaI(args ...interface{}) int

GetAlphaI Given a native color value (in the format 0xAARRGGBB) this will return the Alpha component, as a value between 0 and 255.

func (*Color) GetBlue

func (self *Color) GetBlue(color int) int

GetBlue Given a native color value (in the format 0xAARRGGBB) this will return the Blue component, as a value between 0 and 255.

func (*Color) GetBlueI

func (self *Color) GetBlueI(args ...interface{}) int

GetBlueI Given a native color value (in the format 0xAARRGGBB) this will return the Blue component, as a value between 0 and 255.

func (*Color) GetColor

func (self *Color) GetColor(r int, g int, b int) int

GetColor Given 3 color values this will return an integer representation of it.

func (*Color) GetColor32

func (self *Color) GetColor32(a int, r int, g int, b int) int

GetColor32 Given an alpha and 3 color values this will return an integer representation of it.

func (*Color) GetColor32I

func (self *Color) GetColor32I(args ...interface{}) int

GetColor32I Given an alpha and 3 color values this will return an integer representation of it.

func (*Color) GetColorI

func (self *Color) GetColorI(args ...interface{}) int

GetColorI Given 3 color values this will return an integer representation of it.

func (*Color) GetGreen

func (self *Color) GetGreen(color int) int

GetGreen Given a native color value (in the format 0xAARRGGBB) this will return the Green component, as a value between 0 and 255.

func (*Color) GetGreenI

func (self *Color) GetGreenI(args ...interface{}) int

GetGreenI Given a native color value (in the format 0xAARRGGBB) this will return the Green component, as a value between 0 and 255.

func (*Color) GetRGB

func (self *Color) GetRGB(color int) interface{}

GetRGB Return the component parts of a color as an Object with the properties alpha, red, green, blue.

Alpha will only be set if it exist in the given color (0xAARRGGBB)

func (*Color) GetRGBI

func (self *Color) GetRGBI(args ...interface{}) interface{}

GetRGBI Return the component parts of a color as an Object with the properties alpha, red, green, blue.

Alpha will only be set if it exist in the given color (0xAARRGGBB)

func (*Color) GetRandomColor

func (self *Color) GetRandomColor() int

GetRandomColor Returns a random color value between black and white Set the min value to start each channel from the given offset. Set the max value to restrict the maximum color used per channel.

func (*Color) GetRandomColor1O

func (self *Color) GetRandomColor1O(min int) int

GetRandomColor1O Returns a random color value between black and white Set the min value to start each channel from the given offset. Set the max value to restrict the maximum color used per channel.

func (*Color) GetRandomColor2O

func (self *Color) GetRandomColor2O(min int, max int) int

GetRandomColor2O Returns a random color value between black and white Set the min value to start each channel from the given offset. Set the max value to restrict the maximum color used per channel.

func (*Color) GetRandomColor3O

func (self *Color) GetRandomColor3O(min int, max int, alpha int) int

GetRandomColor3O Returns a random color value between black and white Set the min value to start each channel from the given offset. Set the max value to restrict the maximum color used per channel.

func (*Color) GetRandomColorI

func (self *Color) GetRandomColorI(args ...interface{}) int

GetRandomColorI Returns a random color value between black and white Set the min value to start each channel from the given offset. Set the max value to restrict the maximum color used per channel.

func (*Color) GetRed

func (self *Color) GetRed(color int) int

GetRed Given a native color value (in the format 0xAARRGGBB) this will return the Red component, as a value between 0 and 255.

func (*Color) GetRedI

func (self *Color) GetRedI(args ...interface{}) int

GetRedI Given a native color value (in the format 0xAARRGGBB) this will return the Red component, as a value between 0 and 255.

func (*Color) GetWebRGB

func (self *Color) GetWebRGB(color interface{}) string

GetWebRGB Returns a CSS friendly string value from the given color.

func (*Color) GetWebRGBI

func (self *Color) GetWebRGBI(args ...interface{}) string

GetWebRGBI Returns a CSS friendly string value from the given color.

func (*Color) HSLColorWheel

func (self *Color) HSLColorWheel() []interface{}

HSLColorWheel Get HSL color wheel values in an array which will be 360 elements in size.

func (*Color) HSLColorWheel1O

func (self *Color) HSLColorWheel1O(s int) []interface{}

HSLColorWheel1O Get HSL color wheel values in an array which will be 360 elements in size.

func (*Color) HSLColorWheel2O

func (self *Color) HSLColorWheel2O(s int, l int) []interface{}

HSLColorWheel2O Get HSL color wheel values in an array which will be 360 elements in size.

func (*Color) HSLColorWheelI

func (self *Color) HSLColorWheelI(args ...interface{}) []interface{}

HSLColorWheelI Get HSL color wheel values in an array which will be 360 elements in size.

func (*Color) HSLtoRGB

func (self *Color) HSLtoRGB(h int, s int, l int) interface{}

HSLtoRGB Converts an HSL (hue, saturation and lightness) color value to RGB. Conversion forumla from http://en.wikipedia.org/wiki/HSL_color_space. Assumes HSL values are contained in the set [0, 1] and returns r, g and b values in the set [0, 255]. Based on code by Michael Jackson (https://github.com/mjijackson)

func (*Color) HSLtoRGB1O

func (self *Color) HSLtoRGB1O(h int, s int, l int, out interface{}) interface{}

HSLtoRGB1O Converts an HSL (hue, saturation and lightness) color value to RGB. Conversion forumla from http://en.wikipedia.org/wiki/HSL_color_space. Assumes HSL values are contained in the set [0, 1] and returns r, g and b values in the set [0, 255]. Based on code by Michael Jackson (https://github.com/mjijackson)

func (*Color) HSLtoRGBI

func (self *Color) HSLtoRGBI(args ...interface{}) interface{}

HSLtoRGBI Converts an HSL (hue, saturation and lightness) color value to RGB. Conversion forumla from http://en.wikipedia.org/wiki/HSL_color_space. Assumes HSL values are contained in the set [0, 1] and returns r, g and b values in the set [0, 255]. Based on code by Michael Jackson (https://github.com/mjijackson)

func (*Color) HSVColorWheel

func (self *Color) HSVColorWheel() []interface{}

HSVColorWheel Get HSV color wheel values in an array which will be 360 elements in size.

func (*Color) HSVColorWheel1O

func (self *Color) HSVColorWheel1O(s int) []interface{}

HSVColorWheel1O Get HSV color wheel values in an array which will be 360 elements in size.

func (*Color) HSVColorWheel2O

func (self *Color) HSVColorWheel2O(s int, v int) []interface{}

HSVColorWheel2O Get HSV color wheel values in an array which will be 360 elements in size.

func (*Color) HSVColorWheelI

func (self *Color) HSVColorWheelI(args ...interface{}) []interface{}

HSVColorWheelI Get HSV color wheel values in an array which will be 360 elements in size.

func (*Color) HSVtoRGB

func (self *Color) HSVtoRGB(h int, s int, v int) interface{}

HSVtoRGB Converts an HSV (hue, saturation and value) color value to RGB. Conversion forumla from http://en.wikipedia.org/wiki/HSL_color_space. Assumes HSV values are contained in the set [0, 1] and returns r, g and b values in the set [0, 255]. Based on code by Michael Jackson (https://github.com/mjijackson)

func (*Color) HSVtoRGB1O

func (self *Color) HSVtoRGB1O(h int, s int, v int, out interface{}) interface{}

HSVtoRGB1O Converts an HSV (hue, saturation and value) color value to RGB. Conversion forumla from http://en.wikipedia.org/wiki/HSL_color_space. Assumes HSV values are contained in the set [0, 1] and returns r, g and b values in the set [0, 255]. Based on code by Michael Jackson (https://github.com/mjijackson)

func (*Color) HSVtoRGBI

func (self *Color) HSVtoRGBI(args ...interface{}) interface{}

HSVtoRGBI Converts an HSV (hue, saturation and value) color value to RGB. Conversion forumla from http://en.wikipedia.org/wiki/HSL_color_space. Assumes HSV values are contained in the set [0, 1] and returns r, g and b values in the set [0, 255]. Based on code by Michael Jackson (https://github.com/mjijackson)

func (*Color) HexToColor

func (self *Color) HexToColor(hex string) interface{}

HexToColor Converts a hex string into a Phaser Color object.

The hex string can supplied as `'#0033ff'` or the short-hand format of `'#03f'`; it can begin with an optional "#" or "0x", or be unprefixed.

An alpha channel is _not_ supported.

func (*Color) HexToColor1O

func (self *Color) HexToColor1O(hex string, out interface{}) interface{}

HexToColor1O Converts a hex string into a Phaser Color object.

The hex string can supplied as `'#0033ff'` or the short-hand format of `'#03f'`; it can begin with an optional "#" or "0x", or be unprefixed.

An alpha channel is _not_ supported.

func (*Color) HexToColorI

func (self *Color) HexToColorI(args ...interface{}) interface{}

HexToColorI Converts a hex string into a Phaser Color object.

The hex string can supplied as `'#0033ff'` or the short-hand format of `'#03f'`; it can begin with an optional "#" or "0x", or be unprefixed.

An alpha channel is _not_ supported.

func (*Color) HexToRGB

func (self *Color) HexToRGB(hex string) int

HexToRGB Converts a hex string into an integer color value.

func (*Color) HexToRGBI

func (self *Color) HexToRGBI(args ...interface{}) int

HexToRGBI Converts a hex string into an integer color value.

func (*Color) HueToColor

func (self *Color) HueToColor(p int, q int, t int) int

HueToColor Converts a hue to an RGB color. Based on code by Michael Jackson (https://github.com/mjijackson)

func (*Color) HueToColorI

func (self *Color) HueToColorI(args ...interface{}) int

HueToColorI Converts a hue to an RGB color. Based on code by Michael Jackson (https://github.com/mjijackson)

func (*Color) InterpolateColor

func (self *Color) InterpolateColor(color1 int, color2 int, steps int, currentStep int, alpha int) int

InterpolateColor Interpolates the two given colours based on the supplied step and currentStep properties.

func (*Color) InterpolateColorI

func (self *Color) InterpolateColorI(args ...interface{}) int

InterpolateColorI Interpolates the two given colours based on the supplied step and currentStep properties.

func (*Color) InterpolateColorWithRGB

func (self *Color) InterpolateColorWithRGB(color int, r int, g int, b int, steps int, currentStep int) int

InterpolateColorWithRGB Interpolates the two given colours based on the supplied step and currentStep properties.

func (*Color) InterpolateColorWithRGBI

func (self *Color) InterpolateColorWithRGBI(args ...interface{}) int

InterpolateColorWithRGBI Interpolates the two given colours based on the supplied step and currentStep properties.

func (*Color) InterpolateRGB

func (self *Color) InterpolateRGB(r1 int, g1 int, b1 int, r2 int, g2 int, b2 int, steps int, currentStep int) int

InterpolateRGB Interpolates the two given colours based on the supplied step and currentStep properties.

func (*Color) InterpolateRGBI

func (self *Color) InterpolateRGBI(args ...interface{}) int

InterpolateRGBI Interpolates the two given colours based on the supplied step and currentStep properties.

func (*Color) PackPixel

func (self *Color) PackPixel(r int, g int, b int, a int) int

PackPixel Packs the r, g, b, a components into a single integer, for use with Int32Array. If device is little endian then ABGR order is used. Otherwise RGBA order is used.

func (*Color) PackPixelI

func (self *Color) PackPixelI(args ...interface{}) int

PackPixelI Packs the r, g, b, a components into a single integer, for use with Int32Array. If device is little endian then ABGR order is used. Otherwise RGBA order is used.

func (*Color) RGBtoHSL

func (self *Color) RGBtoHSL(r int, g int, b int) interface{}

RGBtoHSL Converts an RGB color value to HSL (hue, saturation and lightness). Conversion forumla from http://en.wikipedia.org/wiki/HSL_color_space. Assumes RGB values are contained in the set [0, 255] and returns h, s and l in the set [0, 1]. Based on code by Michael Jackson (https://github.com/mjijackson)

func (*Color) RGBtoHSL1O

func (self *Color) RGBtoHSL1O(r int, g int, b int, out interface{}) interface{}

RGBtoHSL1O Converts an RGB color value to HSL (hue, saturation and lightness). Conversion forumla from http://en.wikipedia.org/wiki/HSL_color_space. Assumes RGB values are contained in the set [0, 255] and returns h, s and l in the set [0, 1]. Based on code by Michael Jackson (https://github.com/mjijackson)

func (*Color) RGBtoHSLI

func (self *Color) RGBtoHSLI(args ...interface{}) interface{}

RGBtoHSLI Converts an RGB color value to HSL (hue, saturation and lightness). Conversion forumla from http://en.wikipedia.org/wiki/HSL_color_space. Assumes RGB values are contained in the set [0, 255] and returns h, s and l in the set [0, 1]. Based on code by Michael Jackson (https://github.com/mjijackson)

func (*Color) RGBtoHSV

func (self *Color) RGBtoHSV(r int, g int, b int) interface{}

RGBtoHSV Converts an RGB color value to HSV (hue, saturation and value). Conversion forumla from http://en.wikipedia.org/wiki/HSL_color_space. Assumes RGB values are contained in the set [0, 255] and returns h, s and v in the set [0, 1]. Based on code by Michael Jackson (https://github.com/mjijackson)

func (*Color) RGBtoHSV1O

func (self *Color) RGBtoHSV1O(r int, g int, b int, out interface{}) interface{}

RGBtoHSV1O Converts an RGB color value to HSV (hue, saturation and value). Conversion forumla from http://en.wikipedia.org/wiki/HSL_color_space. Assumes RGB values are contained in the set [0, 255] and returns h, s and v in the set [0, 1]. Based on code by Michael Jackson (https://github.com/mjijackson)

func (*Color) RGBtoHSVI

func (self *Color) RGBtoHSVI(args ...interface{}) interface{}

RGBtoHSVI Converts an RGB color value to HSV (hue, saturation and value). Conversion forumla from http://en.wikipedia.org/wiki/HSL_color_space. Assumes RGB values are contained in the set [0, 255] and returns h, s and v in the set [0, 1]. Based on code by Michael Jackson (https://github.com/mjijackson)

func (*Color) RGBtoString

func (self *Color) RGBtoString(r int, g int, b int) string

RGBtoString Converts the given color values into a string. If prefix was '#' it will be in the format `#RRGGBB` otherwise `0xAARRGGBB`.

func (*Color) RGBtoString1O

func (self *Color) RGBtoString1O(r int, g int, b int, a int) string

RGBtoString1O Converts the given color values into a string. If prefix was '#' it will be in the format `#RRGGBB` otherwise `0xAARRGGBB`.

func (*Color) RGBtoString2O

func (self *Color) RGBtoString2O(r int, g int, b int, a int, prefix string) string

RGBtoString2O Converts the given color values into a string. If prefix was '#' it will be in the format `#RRGGBB` otherwise `0xAARRGGBB`.

func (*Color) RGBtoStringI

func (self *Color) RGBtoStringI(args ...interface{}) string

RGBtoStringI Converts the given color values into a string. If prefix was '#' it will be in the format `#RRGGBB` otherwise `0xAARRGGBB`.

func (*Color) ToABGR

func (self *Color) ToABGR(r int, g int, b int, a int) int

ToABGR Converts RGBA components to a 32 bit integer in AABBGGRR format.

func (*Color) ToABGRI

func (self *Color) ToABGRI(args ...interface{}) int

ToABGRI Converts RGBA components to a 32 bit integer in AABBGGRR format.

func (*Color) ToRGBA

func (self *Color) ToRGBA(r int, g int, b int, a int) int

ToRGBA A utility to convert RGBA components to a 32 bit integer in RRGGBBAA format.

func (*Color) ToRGBAI

func (self *Color) ToRGBAI(args ...interface{}) int

ToRGBAI A utility to convert RGBA components to a 32 bit integer in RRGGBBAA format.

func (*Color) UnpackPixel

func (self *Color) UnpackPixel(rgba int) interface{}

UnpackPixel Unpacks the r, g, b, a components into the specified color object, or a new object, for use with Int32Array. If little endian, then ABGR order is used when unpacking, otherwise, RGBA order is used. The resulting color object has the `r, g, b, a` properties which are unrelated to endianness.

Note that the integer is assumed to be packed in the correct endianness. On little-endian the format is 0xAABBGGRR and on big-endian the format is 0xRRGGBBAA. If you want a endian-independent method, use fromRGBA(rgba) and toRGBA(r, g, b, a).

func (*Color) UnpackPixel1O

func (self *Color) UnpackPixel1O(rgba int, out interface{}) interface{}

UnpackPixel1O Unpacks the r, g, b, a components into the specified color object, or a new object, for use with Int32Array. If little endian, then ABGR order is used when unpacking, otherwise, RGBA order is used. The resulting color object has the `r, g, b, a` properties which are unrelated to endianness.

Note that the integer is assumed to be packed in the correct endianness. On little-endian the format is 0xAABBGGRR and on big-endian the format is 0xRRGGBBAA. If you want a endian-independent method, use fromRGBA(rgba) and toRGBA(r, g, b, a).

func (*Color) UnpackPixel2O

func (self *Color) UnpackPixel2O(rgba int, out interface{}, hsl bool) interface{}

UnpackPixel2O Unpacks the r, g, b, a components into the specified color object, or a new object, for use with Int32Array. If little endian, then ABGR order is used when unpacking, otherwise, RGBA order is used. The resulting color object has the `r, g, b, a` properties which are unrelated to endianness.

Note that the integer is assumed to be packed in the correct endianness. On little-endian the format is 0xAABBGGRR and on big-endian the format is 0xRRGGBBAA. If you want a endian-independent method, use fromRGBA(rgba) and toRGBA(r, g, b, a).

func (*Color) UnpackPixel3O

func (self *Color) UnpackPixel3O(rgba int, out interface{}, hsl bool, hsv bool) interface{}

UnpackPixel3O Unpacks the r, g, b, a components into the specified color object, or a new object, for use with Int32Array. If little endian, then ABGR order is used when unpacking, otherwise, RGBA order is used. The resulting color object has the `r, g, b, a` properties which are unrelated to endianness.

Note that the integer is assumed to be packed in the correct endianness. On little-endian the format is 0xAABBGGRR and on big-endian the format is 0xRRGGBBAA. If you want a endian-independent method, use fromRGBA(rgba) and toRGBA(r, g, b, a).

func (*Color) UnpackPixelI

func (self *Color) UnpackPixelI(args ...interface{}) interface{}

UnpackPixelI Unpacks the r, g, b, a components into the specified color object, or a new object, for use with Int32Array. If little endian, then ABGR order is used when unpacking, otherwise, RGBA order is used. The resulting color object has the `r, g, b, a` properties which are unrelated to endianness.

Note that the integer is assumed to be packed in the correct endianness. On little-endian the format is 0xAABBGGRR and on big-endian the format is 0xRRGGBBAA. If you want a endian-independent method, use fromRGBA(rgba) and toRGBA(r, g, b, a).

func (*Color) UpdateColor

func (self *Color) UpdateColor(out interface{}) int

UpdateColor Takes a color object and updates the rgba, color and color32 properties.

func (*Color) UpdateColorI

func (self *Color) UpdateColorI(args ...interface{}) int

UpdateColorI Takes a color object and updates the rgba, color and color32 properties.

func (*Color) ValueToColor

func (self *Color) ValueToColor(value interface{}) interface{}

ValueToColor Converts a value - a "hex" string, a "CSS 'web' string", or a number - into red, green, blue, and alpha components.

The value can be a string (see `hexToColor` and `webToColor` for the supported formats) or a packed integer (see `getRGB`).

An alpha channel is _not_ supported when specifying a hex string.

func (*Color) ValueToColor1O

func (self *Color) ValueToColor1O(value interface{}, out interface{}) interface{}

ValueToColor1O Converts a value - a "hex" string, a "CSS 'web' string", or a number - into red, green, blue, and alpha components.

The value can be a string (see `hexToColor` and `webToColor` for the supported formats) or a packed integer (see `getRGB`).

An alpha channel is _not_ supported when specifying a hex string.

func (*Color) ValueToColorI

func (self *Color) ValueToColorI(args ...interface{}) interface{}

ValueToColorI Converts a value - a "hex" string, a "CSS 'web' string", or a number - into red, green, blue, and alpha components.

The value can be a string (see `hexToColor` and `webToColor` for the supported formats) or a packed integer (see `getRGB`).

An alpha channel is _not_ supported when specifying a hex string.

func (*Color) WebToColor

func (self *Color) WebToColor(web string) interface{}

WebToColor Converts a CSS 'web' string into a Phaser Color object.

The web string can be in the format `'rgb(r,g,b)'` or `'rgba(r,g,b,a)'` where r/g/b are in the range [0..255] and a is in the range [0..1].

func (*Color) WebToColor1O

func (self *Color) WebToColor1O(web string, out interface{}) interface{}

WebToColor1O Converts a CSS 'web' string into a Phaser Color object.

The web string can be in the format `'rgb(r,g,b)'` or `'rgba(r,g,b,a)'` where r/g/b are in the range [0..255] and a is in the range [0..1].

func (*Color) WebToColorI

func (self *Color) WebToColorI(args ...interface{}) interface{}

WebToColorI Converts a CSS 'web' string into a Phaser Color object.

The web string can be in the format `'rgb(r,g,b)'` or `'rgba(r,g,b,a)'` where r/g/b are in the range [0..255] and a is in the range [0..1].

type ComplexPrimitiveShader

type ComplexPrimitiveShader struct {
	*js.Object
}

ComplexPrimitiveShader empty description

func NewComplexPrimitiveShader

func NewComplexPrimitiveShader(gl *WebGLContext) *ComplexPrimitiveShader

NewComplexPrimitiveShader empty description

func NewComplexPrimitiveShaderI

func NewComplexPrimitiveShaderI(args ...interface{}) *ComplexPrimitiveShader

NewComplexPrimitiveShaderI empty description

func ToComplexPrimitiveShader

func ToComplexPrimitiveShader(jsStruct interface{}) *ComplexPrimitiveShader

ComplexPrimitiveShader Binding conversion method to ComplexPrimitiveShader point

func (*ComplexPrimitiveShader) Destroy

func (self *ComplexPrimitiveShader) Destroy()

Destroy Destroys the shader.

func (*ComplexPrimitiveShader) DestroyI

func (self *ComplexPrimitiveShader) DestroyI(args ...interface{})

DestroyI Destroys the shader.

func (*ComplexPrimitiveShader) FragmentSrc

func (self *ComplexPrimitiveShader) FragmentSrc() []interface{}

FragmentSrc The fragment shader.

func (*ComplexPrimitiveShader) Gl

Gl empty description

func (*ComplexPrimitiveShader) Init

func (self *ComplexPrimitiveShader) Init()

Init Initialises the shader.

func (*ComplexPrimitiveShader) InitI

func (self *ComplexPrimitiveShader) InitI(args ...interface{})

InitI Initialises the shader.

func (*ComplexPrimitiveShader) Program

func (self *ComplexPrimitiveShader) Program() interface{}

Program The WebGL program.

func (*ComplexPrimitiveShader) SetFragmentSrcA

func (self *ComplexPrimitiveShader) SetFragmentSrcA(member []interface{})

SetFragmentSrcA The fragment shader.

func (*ComplexPrimitiveShader) SetGlA

func (self *ComplexPrimitiveShader) SetGlA(member WebGLContext)

SetGlA empty description

func (*ComplexPrimitiveShader) SetProgramA

func (self *ComplexPrimitiveShader) SetProgramA(member interface{})

SetProgramA The WebGL program.

func (*ComplexPrimitiveShader) SetVertexSrcA

func (self *ComplexPrimitiveShader) SetVertexSrcA(member []interface{})

SetVertexSrcA The vertex shader.

func (*ComplexPrimitiveShader) VertexSrc

func (self *ComplexPrimitiveShader) VertexSrc() []interface{}

VertexSrc The vertex shader.

type ComponentAngle

type ComponentAngle struct {
	*js.Object
}

ComponentAngle The Angle Component provides access to an `angle` property; the rotation of a Game Object in degrees.

func NewComponentAngle

func NewComponentAngle() *ComponentAngle

NewComponentAngle The Angle Component provides access to an `angle` property; the rotation of a Game Object in degrees.

func NewComponentAngleI

func NewComponentAngleI(args ...interface{}) *ComponentAngle

NewComponentAngleI The Angle Component provides access to an `angle` property; the rotation of a Game Object in degrees.

func ToComponentAngle

func ToComponentAngle(jsStruct interface{}) *ComponentAngle

ComponentAngle Binding conversion method to ComponentAngle point

func (*ComponentAngle) Angle

func (self *ComponentAngle) Angle() int

Angle The angle property is the rotation of the Game Object in *degrees* from its original orientation.

Values from 0 to 180 represent clockwise rotation; values from 0 to -180 represent counterclockwise rotation.

Values outside this range are added to or subtracted from 360 to obtain a value within the range. For example, the statement player.angle = 450 is the same as player.angle = 90.

If you wish to work in radians instead of degrees you can use the property `rotation` instead. Working in radians is slightly faster as it doesn't have to perform any calculations.

func (*ComponentAngle) SetAngleA

func (self *ComponentAngle) SetAngleA(member int)

SetAngleA The angle property is the rotation of the Game Object in *degrees* from its original orientation.

Values from 0 to 180 represent clockwise rotation; values from 0 to -180 represent counterclockwise rotation.

Values outside this range are added to or subtracted from 360 to obtain a value within the range. For example, the statement player.angle = 450 is the same as player.angle = 90.

If you wish to work in radians instead of degrees you can use the property `rotation` instead. Working in radians is slightly faster as it doesn't have to perform any calculations.

type ComponentAnimation

type ComponentAnimation struct {
	*js.Object
}

ComponentAnimation The Animation Component provides a `play` method, which is a proxy to the `AnimationManager.play` method.

func NewComponentAnimation

func NewComponentAnimation() *ComponentAnimation

NewComponentAnimation The Animation Component provides a `play` method, which is a proxy to the `AnimationManager.play` method.

func NewComponentAnimationI

func NewComponentAnimationI(args ...interface{}) *ComponentAnimation

NewComponentAnimationI The Animation Component provides a `play` method, which is a proxy to the `AnimationManager.play` method.

func ToComponentAnimation

func ToComponentAnimation(jsStruct interface{}) *ComponentAnimation

ComponentAnimation Binding conversion method to ComponentAnimation point

func (*ComponentAnimation) Play

func (self *ComponentAnimation) Play(name string) *Animation

Play Plays an Animation.

The animation should have previously been created via `animations.add`.

If the animation is already playing calling this again won't do anything. If you need to reset an already running animation do so directly on the Animation object itself or via `AnimationManager.stop`.

func (*ComponentAnimation) Play1O

func (self *ComponentAnimation) Play1O(name string, frameRate int) *Animation

Play1O Plays an Animation.

The animation should have previously been created via `animations.add`.

If the animation is already playing calling this again won't do anything. If you need to reset an already running animation do so directly on the Animation object itself or via `AnimationManager.stop`.

func (*ComponentAnimation) Play2O

func (self *ComponentAnimation) Play2O(name string, frameRate int, loop bool) *Animation

Play2O Plays an Animation.

The animation should have previously been created via `animations.add`.

If the animation is already playing calling this again won't do anything. If you need to reset an already running animation do so directly on the Animation object itself or via `AnimationManager.stop`.

func (*ComponentAnimation) Play3O

func (self *ComponentAnimation) Play3O(name string, frameRate int, loop bool, killOnComplete bool) *Animation

Play3O Plays an Animation.

The animation should have previously been created via `animations.add`.

If the animation is already playing calling this again won't do anything. If you need to reset an already running animation do so directly on the Animation object itself or via `AnimationManager.stop`.

func (*ComponentAnimation) PlayI

func (self *ComponentAnimation) PlayI(args ...interface{}) *Animation

PlayI Plays an Animation.

The animation should have previously been created via `animations.add`.

If the animation is already playing calling this again won't do anything. If you need to reset an already running animation do so directly on the Animation object itself or via `AnimationManager.stop`.

type ComponentAutoCull

type ComponentAutoCull struct {
	*js.Object
}

ComponentAutoCull The AutoCull Component is responsible for providing methods that check if a Game Object is within the bounds of the World Camera. It is used by the InWorld component.

func NewComponentAutoCull

func NewComponentAutoCull() *ComponentAutoCull

NewComponentAutoCull The AutoCull Component is responsible for providing methods that check if a Game Object is within the bounds of the World Camera. It is used by the InWorld component.

func NewComponentAutoCullI

func NewComponentAutoCullI(args ...interface{}) *ComponentAutoCull

NewComponentAutoCullI The AutoCull Component is responsible for providing methods that check if a Game Object is within the bounds of the World Camera. It is used by the InWorld component.

func ToComponentAutoCull

func ToComponentAutoCull(jsStruct interface{}) *ComponentAutoCull

ComponentAutoCull Binding conversion method to ComponentAutoCull point

func (*ComponentAutoCull) AutoCull

func (self *ComponentAutoCull) AutoCull() bool

AutoCull A Game Object with `autoCull` set to true will check its bounds against the World Camera every frame. If it is not intersecting the Camera bounds at any point then it has its `renderable` property set to `false`. This keeps the Game Object alive and still processing updates, but forces it to skip the render step entirely.

This is a relatively expensive operation, especially if enabled on hundreds of Game Objects. So enable it only if you know it's required, or you have tested performance and find it acceptable.

func (*ComponentAutoCull) InCamera

func (self *ComponentAutoCull) InCamera() bool

InCamera Checks if the Game Objects bounds intersect with the Game Camera bounds. Returns `true` if they do, otherwise `false` if fully outside of the Cameras bounds.

func (*ComponentAutoCull) SetAutoCullA

func (self *ComponentAutoCull) SetAutoCullA(member bool)

SetAutoCullA A Game Object with `autoCull` set to true will check its bounds against the World Camera every frame. If it is not intersecting the Camera bounds at any point then it has its `renderable` property set to `false`. This keeps the Game Object alive and still processing updates, but forces it to skip the render step entirely.

This is a relatively expensive operation, especially if enabled on hundreds of Game Objects. So enable it only if you know it's required, or you have tested performance and find it acceptable.

func (*ComponentAutoCull) SetInCameraA

func (self *ComponentAutoCull) SetInCameraA(member bool)

SetInCameraA Checks if the Game Objects bounds intersect with the Game Camera bounds. Returns `true` if they do, otherwise `false` if fully outside of the Cameras bounds.

type ComponentBounds

type ComponentBounds struct {
	*js.Object
}

ComponentBounds The Bounds component contains properties related to the bounds of the Game Object.

func NewComponentBounds

func NewComponentBounds() *ComponentBounds

NewComponentBounds The Bounds component contains properties related to the bounds of the Game Object.

func NewComponentBoundsI

func NewComponentBoundsI(args ...interface{}) *ComponentBounds

NewComponentBoundsI The Bounds component contains properties related to the bounds of the Game Object.

func ToComponentBounds

func ToComponentBounds(jsStruct interface{}) *ComponentBounds

ComponentBounds Binding conversion method to ComponentBounds point

func (*ComponentBounds) AlignIn

func (self *ComponentBounds) AlignIn(container interface{}) interface{}

AlignIn Aligns this Game Object within another Game Object, or Rectangle, known as the 'container', to one of 9 possible positions.

The container must be a Game Object, or Phaser.Rectangle object. This can include properties such as `World.bounds` or `Camera.view`, for aligning Game Objects within the world and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText, TileSprites or Buttons.

Please note that aligning a Sprite to another Game Object does **not** make it a child of the container. It simply modifies its position coordinates so it aligns with it.

The position constants you can use are:

`Phaser.TOP_LEFT`, `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

The Game Objects are placed in such a way that their _bounds_ align with the container, taking into consideration rotation, scale and the anchor property. This allows you to neatly align Game Objects, irrespective of their position value.

The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final aligned position of the Game Object. For example:

`sprite.alignIn(background, Phaser.BOTTOM_RIGHT, -20, -20)`

Would align the `sprite` to the bottom-right, but moved 20 pixels in from the corner. Think of the offsets as applying an adjustment to the containers bounds before the alignment takes place. So providing a negative offset will 'shrink' the container bounds by that amount, and providing a positive one expands it.

func (*ComponentBounds) AlignIn1O

func (self *ComponentBounds) AlignIn1O(container interface{}, position int) interface{}

AlignIn1O Aligns this Game Object within another Game Object, or Rectangle, known as the 'container', to one of 9 possible positions.

The container must be a Game Object, or Phaser.Rectangle object. This can include properties such as `World.bounds` or `Camera.view`, for aligning Game Objects within the world and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText, TileSprites or Buttons.

Please note that aligning a Sprite to another Game Object does **not** make it a child of the container. It simply modifies its position coordinates so it aligns with it.

The position constants you can use are:

`Phaser.TOP_LEFT`, `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

The Game Objects are placed in such a way that their _bounds_ align with the container, taking into consideration rotation, scale and the anchor property. This allows you to neatly align Game Objects, irrespective of their position value.

The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final aligned position of the Game Object. For example:

`sprite.alignIn(background, Phaser.BOTTOM_RIGHT, -20, -20)`

Would align the `sprite` to the bottom-right, but moved 20 pixels in from the corner. Think of the offsets as applying an adjustment to the containers bounds before the alignment takes place. So providing a negative offset will 'shrink' the container bounds by that amount, and providing a positive one expands it.

func (*ComponentBounds) AlignIn2O

func (self *ComponentBounds) AlignIn2O(container interface{}, position int, offsetX int) interface{}

AlignIn2O Aligns this Game Object within another Game Object, or Rectangle, known as the 'container', to one of 9 possible positions.

The container must be a Game Object, or Phaser.Rectangle object. This can include properties such as `World.bounds` or `Camera.view`, for aligning Game Objects within the world and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText, TileSprites or Buttons.

Please note that aligning a Sprite to another Game Object does **not** make it a child of the container. It simply modifies its position coordinates so it aligns with it.

The position constants you can use are:

`Phaser.TOP_LEFT`, `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

The Game Objects are placed in such a way that their _bounds_ align with the container, taking into consideration rotation, scale and the anchor property. This allows you to neatly align Game Objects, irrespective of their position value.

The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final aligned position of the Game Object. For example:

`sprite.alignIn(background, Phaser.BOTTOM_RIGHT, -20, -20)`

Would align the `sprite` to the bottom-right, but moved 20 pixels in from the corner. Think of the offsets as applying an adjustment to the containers bounds before the alignment takes place. So providing a negative offset will 'shrink' the container bounds by that amount, and providing a positive one expands it.

func (*ComponentBounds) AlignIn3O

func (self *ComponentBounds) AlignIn3O(container interface{}, position int, offsetX int, offsetY int) interface{}

AlignIn3O Aligns this Game Object within another Game Object, or Rectangle, known as the 'container', to one of 9 possible positions.

The container must be a Game Object, or Phaser.Rectangle object. This can include properties such as `World.bounds` or `Camera.view`, for aligning Game Objects within the world and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText, TileSprites or Buttons.

Please note that aligning a Sprite to another Game Object does **not** make it a child of the container. It simply modifies its position coordinates so it aligns with it.

The position constants you can use are:

`Phaser.TOP_LEFT`, `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

The Game Objects are placed in such a way that their _bounds_ align with the container, taking into consideration rotation, scale and the anchor property. This allows you to neatly align Game Objects, irrespective of their position value.

The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final aligned position of the Game Object. For example:

`sprite.alignIn(background, Phaser.BOTTOM_RIGHT, -20, -20)`

Would align the `sprite` to the bottom-right, but moved 20 pixels in from the corner. Think of the offsets as applying an adjustment to the containers bounds before the alignment takes place. So providing a negative offset will 'shrink' the container bounds by that amount, and providing a positive one expands it.

func (*ComponentBounds) AlignInI

func (self *ComponentBounds) AlignInI(args ...interface{}) interface{}

AlignInI Aligns this Game Object within another Game Object, or Rectangle, known as the 'container', to one of 9 possible positions.

The container must be a Game Object, or Phaser.Rectangle object. This can include properties such as `World.bounds` or `Camera.view`, for aligning Game Objects within the world and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText, TileSprites or Buttons.

Please note that aligning a Sprite to another Game Object does **not** make it a child of the container. It simply modifies its position coordinates so it aligns with it.

The position constants you can use are:

`Phaser.TOP_LEFT`, `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

The Game Objects are placed in such a way that their _bounds_ align with the container, taking into consideration rotation, scale and the anchor property. This allows you to neatly align Game Objects, irrespective of their position value.

The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final aligned position of the Game Object. For example:

`sprite.alignIn(background, Phaser.BOTTOM_RIGHT, -20, -20)`

Would align the `sprite` to the bottom-right, but moved 20 pixels in from the corner. Think of the offsets as applying an adjustment to the containers bounds before the alignment takes place. So providing a negative offset will 'shrink' the container bounds by that amount, and providing a positive one expands it.

func (*ComponentBounds) AlignTo

func (self *ComponentBounds) AlignTo(parent interface{}) interface{}

AlignTo Aligns this Game Object to the side of another Game Object, or Rectangle, known as the 'parent', in one of 11 possible positions.

The parent must be a Game Object, or Phaser.Rectangle object. This can include properties such as `World.bounds` or `Camera.view`, for aligning Game Objects within the world and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText, TileSprites or Buttons.

Please note that aligning a Sprite to another Game Object does **not** make it a child of the parent. It simply modifies its position coordinates so it aligns with it.

The position constants you can use are:

`Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_TOP`, `Phaser.LEFT_CENTER`, `Phaser.LEFT_BOTTOM`, `Phaser.RIGHT_TOP`, `Phaser.RIGHT_CENTER`, `Phaser.RIGHT_BOTTOM`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

The Game Objects are placed in such a way that their _bounds_ align with the parent, taking into consideration rotation, scale and the anchor property. This allows you to neatly align Game Objects, irrespective of their position value.

The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final aligned position of the Game Object. For example:

`sprite.alignTo(background, Phaser.BOTTOM_RIGHT, -20, -20)`

Would align the `sprite` to the bottom-right, but moved 20 pixels in from the corner. Think of the offsets as applying an adjustment to the parents bounds before the alignment takes place. So providing a negative offset will 'shrink' the parent bounds by that amount, and providing a positive one expands it.

func (*ComponentBounds) AlignTo1O

func (self *ComponentBounds) AlignTo1O(parent interface{}, position int) interface{}

AlignTo1O Aligns this Game Object to the side of another Game Object, or Rectangle, known as the 'parent', in one of 11 possible positions.

The parent must be a Game Object, or Phaser.Rectangle object. This can include properties such as `World.bounds` or `Camera.view`, for aligning Game Objects within the world and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText, TileSprites or Buttons.

Please note that aligning a Sprite to another Game Object does **not** make it a child of the parent. It simply modifies its position coordinates so it aligns with it.

The position constants you can use are:

`Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_TOP`, `Phaser.LEFT_CENTER`, `Phaser.LEFT_BOTTOM`, `Phaser.RIGHT_TOP`, `Phaser.RIGHT_CENTER`, `Phaser.RIGHT_BOTTOM`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

The Game Objects are placed in such a way that their _bounds_ align with the parent, taking into consideration rotation, scale and the anchor property. This allows you to neatly align Game Objects, irrespective of their position value.

The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final aligned position of the Game Object. For example:

`sprite.alignTo(background, Phaser.BOTTOM_RIGHT, -20, -20)`

Would align the `sprite` to the bottom-right, but moved 20 pixels in from the corner. Think of the offsets as applying an adjustment to the parents bounds before the alignment takes place. So providing a negative offset will 'shrink' the parent bounds by that amount, and providing a positive one expands it.

func (*ComponentBounds) AlignTo2O

func (self *ComponentBounds) AlignTo2O(parent interface{}, position int, offsetX int) interface{}

AlignTo2O Aligns this Game Object to the side of another Game Object, or Rectangle, known as the 'parent', in one of 11 possible positions.

The parent must be a Game Object, or Phaser.Rectangle object. This can include properties such as `World.bounds` or `Camera.view`, for aligning Game Objects within the world and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText, TileSprites or Buttons.

Please note that aligning a Sprite to another Game Object does **not** make it a child of the parent. It simply modifies its position coordinates so it aligns with it.

The position constants you can use are:

`Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_TOP`, `Phaser.LEFT_CENTER`, `Phaser.LEFT_BOTTOM`, `Phaser.RIGHT_TOP`, `Phaser.RIGHT_CENTER`, `Phaser.RIGHT_BOTTOM`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

The Game Objects are placed in such a way that their _bounds_ align with the parent, taking into consideration rotation, scale and the anchor property. This allows you to neatly align Game Objects, irrespective of their position value.

The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final aligned position of the Game Object. For example:

`sprite.alignTo(background, Phaser.BOTTOM_RIGHT, -20, -20)`

Would align the `sprite` to the bottom-right, but moved 20 pixels in from the corner. Think of the offsets as applying an adjustment to the parents bounds before the alignment takes place. So providing a negative offset will 'shrink' the parent bounds by that amount, and providing a positive one expands it.

func (*ComponentBounds) AlignTo3O

func (self *ComponentBounds) AlignTo3O(parent interface{}, position int, offsetX int, offsetY int) interface{}

AlignTo3O Aligns this Game Object to the side of another Game Object, or Rectangle, known as the 'parent', in one of 11 possible positions.

The parent must be a Game Object, or Phaser.Rectangle object. This can include properties such as `World.bounds` or `Camera.view`, for aligning Game Objects within the world and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText, TileSprites or Buttons.

Please note that aligning a Sprite to another Game Object does **not** make it a child of the parent. It simply modifies its position coordinates so it aligns with it.

The position constants you can use are:

`Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_TOP`, `Phaser.LEFT_CENTER`, `Phaser.LEFT_BOTTOM`, `Phaser.RIGHT_TOP`, `Phaser.RIGHT_CENTER`, `Phaser.RIGHT_BOTTOM`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

The Game Objects are placed in such a way that their _bounds_ align with the parent, taking into consideration rotation, scale and the anchor property. This allows you to neatly align Game Objects, irrespective of their position value.

The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final aligned position of the Game Object. For example:

`sprite.alignTo(background, Phaser.BOTTOM_RIGHT, -20, -20)`

Would align the `sprite` to the bottom-right, but moved 20 pixels in from the corner. Think of the offsets as applying an adjustment to the parents bounds before the alignment takes place. So providing a negative offset will 'shrink' the parent bounds by that amount, and providing a positive one expands it.

func (*ComponentBounds) AlignToI

func (self *ComponentBounds) AlignToI(args ...interface{}) interface{}

AlignToI Aligns this Game Object to the side of another Game Object, or Rectangle, known as the 'parent', in one of 11 possible positions.

The parent must be a Game Object, or Phaser.Rectangle object. This can include properties such as `World.bounds` or `Camera.view`, for aligning Game Objects within the world and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText, TileSprites or Buttons.

Please note that aligning a Sprite to another Game Object does **not** make it a child of the parent. It simply modifies its position coordinates so it aligns with it.

The position constants you can use are:

`Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_TOP`, `Phaser.LEFT_CENTER`, `Phaser.LEFT_BOTTOM`, `Phaser.RIGHT_TOP`, `Phaser.RIGHT_CENTER`, `Phaser.RIGHT_BOTTOM`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

The Game Objects are placed in such a way that their _bounds_ align with the parent, taking into consideration rotation, scale and the anchor property. This allows you to neatly align Game Objects, irrespective of their position value.

The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final aligned position of the Game Object. For example:

`sprite.alignTo(background, Phaser.BOTTOM_RIGHT, -20, -20)`

Would align the `sprite` to the bottom-right, but moved 20 pixels in from the corner. Think of the offsets as applying an adjustment to the parents bounds before the alignment takes place. So providing a negative offset will 'shrink' the parent bounds by that amount, and providing a positive one expands it.

func (*ComponentBounds) Bottom

func (self *ComponentBounds) Bottom() int

Bottom The sum of the y and height properties. This is the same as `y + height - offsetY`.

func (*ComponentBounds) CenterX

func (self *ComponentBounds) CenterX() int

CenterX The center x coordinate of the Game Object. This is the same as `(x - offsetX) + (width / 2)`.

func (*ComponentBounds) CenterY

func (self *ComponentBounds) CenterY() int

CenterY The center y coordinate of the Game Object. This is the same as `(y - offsetY) + (height / 2)`.

func (*ComponentBounds) Left

func (self *ComponentBounds) Left() int

Left The left coordinate of the Game Object. This is the same as `x - offsetX`.

func (*ComponentBounds) OffsetX

func (self *ComponentBounds) OffsetX() int

OffsetX The amount the Game Object is visually offset from its x coordinate. This is the same as `width * anchor.x`. It will only be > 0 if anchor.x is not equal to zero.

func (*ComponentBounds) OffsetY

func (self *ComponentBounds) OffsetY() int

OffsetY The amount the Game Object is visually offset from its y coordinate. This is the same as `height * anchor.y`. It will only be > 0 if anchor.y is not equal to zero.

func (*ComponentBounds) Right

func (self *ComponentBounds) Right() int

Right The right coordinate of the Game Object. This is the same as `x + width - offsetX`.

func (*ComponentBounds) SetBottomA

func (self *ComponentBounds) SetBottomA(member int)

SetBottomA The sum of the y and height properties. This is the same as `y + height - offsetY`.

func (*ComponentBounds) SetCenterXA

func (self *ComponentBounds) SetCenterXA(member int)

SetCenterXA The center x coordinate of the Game Object. This is the same as `(x - offsetX) + (width / 2)`.

func (*ComponentBounds) SetCenterYA

func (self *ComponentBounds) SetCenterYA(member int)

SetCenterYA The center y coordinate of the Game Object. This is the same as `(y - offsetY) + (height / 2)`.

func (*ComponentBounds) SetLeftA

func (self *ComponentBounds) SetLeftA(member int)

SetLeftA The left coordinate of the Game Object. This is the same as `x - offsetX`.

func (*ComponentBounds) SetOffsetXA

func (self *ComponentBounds) SetOffsetXA(member int)

SetOffsetXA The amount the Game Object is visually offset from its x coordinate. This is the same as `width * anchor.x`. It will only be > 0 if anchor.x is not equal to zero.

func (*ComponentBounds) SetOffsetYA

func (self *ComponentBounds) SetOffsetYA(member int)

SetOffsetYA The amount the Game Object is visually offset from its y coordinate. This is the same as `height * anchor.y`. It will only be > 0 if anchor.y is not equal to zero.

func (*ComponentBounds) SetRightA

func (self *ComponentBounds) SetRightA(member int)

SetRightA The right coordinate of the Game Object. This is the same as `x + width - offsetX`.

func (*ComponentBounds) SetTopA

func (self *ComponentBounds) SetTopA(member int)

SetTopA The y coordinate of the Game Object. This is the same as `y - offsetY`.

func (*ComponentBounds) Top

func (self *ComponentBounds) Top() int

Top The y coordinate of the Game Object. This is the same as `y - offsetY`.

type ComponentBringToTop

type ComponentBringToTop struct {
	*js.Object
}

ComponentBringToTop The BringToTop Component features quick access to Group sorting related methods.

func NewComponentBringToTop

func NewComponentBringToTop() *ComponentBringToTop

NewComponentBringToTop The BringToTop Component features quick access to Group sorting related methods.

func NewComponentBringToTopI

func NewComponentBringToTopI(args ...interface{}) *ComponentBringToTop

NewComponentBringToTopI The BringToTop Component features quick access to Group sorting related methods.

func ToComponentBringToTop

func ToComponentBringToTop(jsStruct interface{}) *ComponentBringToTop

ComponentBringToTop Binding conversion method to ComponentBringToTop point

func (*ComponentBringToTop) BringToTop

func (self *ComponentBringToTop) BringToTop() *DisplayObject

BringToTop Brings this Game Object to the top of its parents display list. Visually this means it will render over the top of any old child in the same Group.

If this Game Object hasn't been added to a custom Group then this method will bring it to the top of the Game World, because the World is the root Group from which all Game Objects descend.

func (*ComponentBringToTop) BringToTopI

func (self *ComponentBringToTop) BringToTopI(args ...interface{}) *DisplayObject

BringToTopI Brings this Game Object to the top of its parents display list. Visually this means it will render over the top of any old child in the same Group.

If this Game Object hasn't been added to a custom Group then this method will bring it to the top of the Game World, because the World is the root Group from which all Game Objects descend.

func (*ComponentBringToTop) MoveDown

func (self *ComponentBringToTop) MoveDown() *DisplayObject

MoveDown Moves this Game Object down one place in its parents display list. This call has no effect if the Game Object is already at the bottom of the display list.

If this Game Object hasn't been added to a custom Group then this method will move it one object down within the Game World, because the World is the root Group from which all Game Objects descend.

func (*ComponentBringToTop) MoveDownI

func (self *ComponentBringToTop) MoveDownI(args ...interface{}) *DisplayObject

MoveDownI Moves this Game Object down one place in its parents display list. This call has no effect if the Game Object is already at the bottom of the display list.

If this Game Object hasn't been added to a custom Group then this method will move it one object down within the Game World, because the World is the root Group from which all Game Objects descend.

func (*ComponentBringToTop) MoveUp

func (self *ComponentBringToTop) MoveUp() *DisplayObject

MoveUp Moves this Game Object up one place in its parents display list. This call has no effect if the Game Object is already at the top of the display list.

If this Game Object hasn't been added to a custom Group then this method will move it one object up within the Game World, because the World is the root Group from which all Game Objects descend.

func (*ComponentBringToTop) MoveUpI

func (self *ComponentBringToTop) MoveUpI(args ...interface{}) *DisplayObject

MoveUpI Moves this Game Object up one place in its parents display list. This call has no effect if the Game Object is already at the top of the display list.

If this Game Object hasn't been added to a custom Group then this method will move it one object up within the Game World, because the World is the root Group from which all Game Objects descend.

func (*ComponentBringToTop) SendToBack

func (self *ComponentBringToTop) SendToBack() *DisplayObject

SendToBack Sends this Game Object to the bottom of its parents display list. Visually this means it will render below all other children in the same Group.

If this Game Object hasn't been added to a custom Group then this method will send it to the bottom of the Game World, because the World is the root Group from which all Game Objects descend.

func (*ComponentBringToTop) SendToBackI

func (self *ComponentBringToTop) SendToBackI(args ...interface{}) *DisplayObject

SendToBackI Sends this Game Object to the bottom of its parents display list. Visually this means it will render below all other children in the same Group.

If this Game Object hasn't been added to a custom Group then this method will send it to the bottom of the Game World, because the World is the root Group from which all Game Objects descend.

type ComponentCore

type ComponentCore struct {
	*js.Object
}

ComponentCore Core Component Features.

func NewComponentCore

func NewComponentCore() *ComponentCore

NewComponentCore Core Component Features.

func NewComponentCoreI

func NewComponentCoreI(args ...interface{}) *ComponentCore

NewComponentCoreI Core Component Features.

func ToComponentCore

func ToComponentCore(jsStruct interface{}) *ComponentCore

ComponentCore Binding conversion method to ComponentCore point

func (*ComponentCore) Animations

func (self *ComponentCore) Animations() *AnimationManager

Animations If the Game Object is enabled for animation (such as a Phaser.Sprite) this is a reference to its AnimationManager instance. Through it you can create, play, pause and stop animations.

func (*ComponentCore) Components

func (self *ComponentCore) Components() interface{}

Components The components this Game Object has installed.

func (*ComponentCore) Data

func (self *ComponentCore) Data() interface{}

Data An empty Object that belongs to this Game Object. This value isn't ever used internally by Phaser, but may be used by your own code, or by Phaser Plugins, to store data that needs to be associated with the Game Object, without polluting the Game Object directly.

func (*ComponentCore) Debug

func (self *ComponentCore) Debug() bool

Debug A debug flag designed for use with `Game.enableStep`.

func (*ComponentCore) Events

func (self *ComponentCore) Events() *Events

Events All Phaser Game Objects have an Events class which contains all of the events that are dispatched when certain things happen to this Game Object, or any of its components.

func (*ComponentCore) Exists

func (self *ComponentCore) Exists() bool

Exists Controls if this Game Object is processed by the core game loop. If this Game Object has a physics body it also controls if its physics body is updated or not. When `exists` is set to `false` it will remove its physics body from the physics world if it has one. It also toggles the `visible` property to false as well.

Setting `exists` to true will add its physics body back in to the physics world, if it has one. It will also set the `visible` property to `true`.

func (*ComponentCore) Fresh

func (self *ComponentCore) Fresh() bool

Fresh A Game Object is considered `fresh` if it has just been created or reset and is yet to receive a renderer transform update. This property is mostly used internally by the physics systems, but is exposed for the use of plugins.

func (*ComponentCore) Game

func (self *ComponentCore) Game() *Game

Game A reference to the currently running Game.

func (*ComponentCore) Init

func (self *ComponentCore) Init()

Init Initializes the mixin components.

The `this` context should be an instance of the component mixin target.

func (*ComponentCore) InitI

func (self *ComponentCore) InitI(args ...interface{})

InitI Initializes the mixin components.

The `this` context should be an instance of the component mixin target.

func (*ComponentCore) Install

func (self *ComponentCore) Install()

Install Installs / registers mixin components.

The `this` context should be that of the applicable object instance or prototype.

func (*ComponentCore) InstallI

func (self *ComponentCore) InstallI(args ...interface{})

InstallI Installs / registers mixin components.

The `this` context should be that of the applicable object instance or prototype.

func (*ComponentCore) Key

func (self *ComponentCore) Key() interface{}

Key The key of the image or texture used by this Game Object during rendering. If it is a string it's the string used to retrieve the texture from the Phaser Image Cache. It can also be an instance of a RenderTexture, BitmapData, Video or PIXI.Texture. If a Game Object is created without a key it is automatically assigned the key `__default` which is a 32x32 transparent PNG stored within the Cache. If a Game Object is given a key which doesn't exist in the Image Cache it is re-assigned the key `__missing` which is a 32x32 PNG of a green box with a line through it.

func (*ComponentCore) Name

func (self *ComponentCore) Name() string

Name A user defined name given to this Game Object. This value isn't ever used internally by Phaser, it is meant as a game level property.

func (*ComponentCore) PendingDestroy

func (self *ComponentCore) PendingDestroy() bool

PendingDestroy A Game Object is that is pendingDestroy is flagged to have its destroy method called on the next logic update. You can set it directly to allow you to flag an object to be destroyed on its next update.

This is extremely useful if you wish to destroy an object from within one of its own callbacks such as with Buttons or other Input events.

func (*ComponentCore) PostUpdate

func (self *ComponentCore) PostUpdate()

PostUpdate Internal method called by the World postUpdate cycle.

func (*ComponentCore) PostUpdateI

func (self *ComponentCore) PostUpdateI(args ...interface{})

PostUpdateI Internal method called by the World postUpdate cycle.

func (*ComponentCore) PreviousPosition

func (self *ComponentCore) PreviousPosition() *Point

PreviousPosition The position the Game Object was located in the previous frame.

func (*ComponentCore) PreviousRotation

func (self *ComponentCore) PreviousRotation() int

PreviousRotation The rotation the Game Object was in set to in the previous frame. Value is in radians.

func (*ComponentCore) RenderOrderID

func (self *ComponentCore) RenderOrderID() int

RenderOrderID The render order ID is used internally by the renderer and Input Manager and should not be modified. This property is mostly used internally by the renderers, but is exposed for the use of plugins.

func (*ComponentCore) SetAnimationsA

func (self *ComponentCore) SetAnimationsA(member *AnimationManager)

SetAnimationsA If the Game Object is enabled for animation (such as a Phaser.Sprite) this is a reference to its AnimationManager instance. Through it you can create, play, pause and stop animations.

func (*ComponentCore) SetComponentsA

func (self *ComponentCore) SetComponentsA(member interface{})

SetComponentsA The components this Game Object has installed.

func (*ComponentCore) SetDataA

func (self *ComponentCore) SetDataA(member interface{})

SetDataA An empty Object that belongs to this Game Object. This value isn't ever used internally by Phaser, but may be used by your own code, or by Phaser Plugins, to store data that needs to be associated with the Game Object, without polluting the Game Object directly.

func (*ComponentCore) SetDebugA

func (self *ComponentCore) SetDebugA(member bool)

SetDebugA A debug flag designed for use with `Game.enableStep`.

func (*ComponentCore) SetEventsA

func (self *ComponentCore) SetEventsA(member *Events)

SetEventsA All Phaser Game Objects have an Events class which contains all of the events that are dispatched when certain things happen to this Game Object, or any of its components.

func (*ComponentCore) SetExistsA

func (self *ComponentCore) SetExistsA(member bool)

SetExistsA Controls if this Game Object is processed by the core game loop. If this Game Object has a physics body it also controls if its physics body is updated or not. When `exists` is set to `false` it will remove its physics body from the physics world if it has one. It also toggles the `visible` property to false as well.

Setting `exists` to true will add its physics body back in to the physics world, if it has one. It will also set the `visible` property to `true`.

func (*ComponentCore) SetFreshA

func (self *ComponentCore) SetFreshA(member bool)

SetFreshA A Game Object is considered `fresh` if it has just been created or reset and is yet to receive a renderer transform update. This property is mostly used internally by the physics systems, but is exposed for the use of plugins.

func (*ComponentCore) SetGameA

func (self *ComponentCore) SetGameA(member *Game)

SetGameA A reference to the currently running Game.

func (*ComponentCore) SetKeyA

func (self *ComponentCore) SetKeyA(member interface{})

SetKeyA The key of the image or texture used by this Game Object during rendering. If it is a string it's the string used to retrieve the texture from the Phaser Image Cache. It can also be an instance of a RenderTexture, BitmapData, Video or PIXI.Texture. If a Game Object is created without a key it is automatically assigned the key `__default` which is a 32x32 transparent PNG stored within the Cache. If a Game Object is given a key which doesn't exist in the Image Cache it is re-assigned the key `__missing` which is a 32x32 PNG of a green box with a line through it.

func (*ComponentCore) SetNameA

func (self *ComponentCore) SetNameA(member string)

SetNameA A user defined name given to this Game Object. This value isn't ever used internally by Phaser, it is meant as a game level property.

func (*ComponentCore) SetPendingDestroyA

func (self *ComponentCore) SetPendingDestroyA(member bool)

SetPendingDestroyA A Game Object is that is pendingDestroy is flagged to have its destroy method called on the next logic update. You can set it directly to allow you to flag an object to be destroyed on its next update.

This is extremely useful if you wish to destroy an object from within one of its own callbacks such as with Buttons or other Input events.

func (*ComponentCore) SetPreviousPositionA

func (self *ComponentCore) SetPreviousPositionA(member *Point)

SetPreviousPositionA The position the Game Object was located in the previous frame.

func (*ComponentCore) SetPreviousRotationA

func (self *ComponentCore) SetPreviousRotationA(member int)

SetPreviousRotationA The rotation the Game Object was in set to in the previous frame. Value is in radians.

func (*ComponentCore) SetRenderOrderIDA

func (self *ComponentCore) SetRenderOrderIDA(member int)

SetRenderOrderIDA The render order ID is used internally by the renderer and Input Manager and should not be modified. This property is mostly used internally by the renderers, but is exposed for the use of plugins.

func (*ComponentCore) SetWorldA

func (self *ComponentCore) SetWorldA(member *Point)

SetWorldA The world coordinates of this Game Object in pixels. Depending on where in the display list this Game Object is placed this value can differ from `position`, which contains the x/y coordinates relative to the Game Objects parent.

func (*ComponentCore) SetZA

func (self *ComponentCore) SetZA(member int)

SetZA The z depth of this Game Object within its parent Group. No two objects in a Group can have the same z value. This value is adjusted automatically whenever the Group hierarchy changes. If you wish to re-order the layering of a Game Object then see methods like Group.moveUp or Group.bringToTop.

func (*ComponentCore) Update

func (self *ComponentCore) Update()

Update Override this method in your own custom objects to handle any update requirements. It is called immediately after `preUpdate` and before `postUpdate`. Remember if this Game Object has any children you should call update on those too.

func (*ComponentCore) UpdateI

func (self *ComponentCore) UpdateI(args ...interface{})

UpdateI Override this method in your own custom objects to handle any update requirements. It is called immediately after `preUpdate` and before `postUpdate`. Remember if this Game Object has any children you should call update on those too.

func (*ComponentCore) World

func (self *ComponentCore) World() *Point

World The world coordinates of this Game Object in pixels. Depending on where in the display list this Game Object is placed this value can differ from `position`, which contains the x/y coordinates relative to the Game Objects parent.

func (*ComponentCore) Z

func (self *ComponentCore) Z() int

Z The z depth of this Game Object within its parent Group. No two objects in a Group can have the same z value. This value is adjusted automatically whenever the Group hierarchy changes. If you wish to re-order the layering of a Game Object then see methods like Group.moveUp or Group.bringToTop.

type ComponentCrop

type ComponentCrop struct {
	*js.Object
}

ComponentCrop The Crop component provides the ability to crop a texture based Game Object to a defined rectangle, which can be updated in real-time.

func NewComponentCrop

func NewComponentCrop() *ComponentCrop

NewComponentCrop The Crop component provides the ability to crop a texture based Game Object to a defined rectangle, which can be updated in real-time.

func NewComponentCropI

func NewComponentCropI(args ...interface{}) *ComponentCrop

NewComponentCropI The Crop component provides the ability to crop a texture based Game Object to a defined rectangle, which can be updated in real-time.

func ToComponentCrop

func ToComponentCrop(jsStruct interface{}) *ComponentCrop

ComponentCrop Binding conversion method to ComponentCrop point

func (*ComponentCrop) Crop

func (self *ComponentCrop) Crop(rect *Rectangle)

Crop Crop allows you to crop the texture being used to display this Game Object. Setting a crop rectangle modifies the core texture frame. The Game Object width and height properties will be adjusted accordingly.

Cropping takes place from the top-left and can be modified in real-time either by providing an updated rectangle object to this method, or by modifying `cropRect` property directly and then calling `updateCrop`.

The rectangle object given to this method can be either a `Phaser.Rectangle` or any other object so long as it has public `x`, `y`, `width`, `height`, `right` and `bottom` properties.

A reference to the rectangle is stored in `cropRect` unless the `copy` parameter is `true`, in which case the values are duplicated to a local object.

func (*ComponentCrop) Crop1O

func (self *ComponentCrop) Crop1O(rect *Rectangle, copy bool)

Crop1O Crop allows you to crop the texture being used to display this Game Object. Setting a crop rectangle modifies the core texture frame. The Game Object width and height properties will be adjusted accordingly.

Cropping takes place from the top-left and can be modified in real-time either by providing an updated rectangle object to this method, or by modifying `cropRect` property directly and then calling `updateCrop`.

The rectangle object given to this method can be either a `Phaser.Rectangle` or any other object so long as it has public `x`, `y`, `width`, `height`, `right` and `bottom` properties.

A reference to the rectangle is stored in `cropRect` unless the `copy` parameter is `true`, in which case the values are duplicated to a local object.

func (*ComponentCrop) CropI

func (self *ComponentCrop) CropI(args ...interface{})

CropI Crop allows you to crop the texture being used to display this Game Object. Setting a crop rectangle modifies the core texture frame. The Game Object width and height properties will be adjusted accordingly.

Cropping takes place from the top-left and can be modified in real-time either by providing an updated rectangle object to this method, or by modifying `cropRect` property directly and then calling `updateCrop`.

The rectangle object given to this method can be either a `Phaser.Rectangle` or any other object so long as it has public `x`, `y`, `width`, `height`, `right` and `bottom` properties.

A reference to the rectangle is stored in `cropRect` unless the `copy` parameter is `true`, in which case the values are duplicated to a local object.

func (*ComponentCrop) CropRect

func (self *ComponentCrop) CropRect() *Rectangle

CropRect The Rectangle used to crop the texture this Game Object uses. Set this property via `crop`. If you modify this property directly you must call `updateCrop` in order to have the change take effect.

func (*ComponentCrop) SetCropRectA

func (self *ComponentCrop) SetCropRectA(member *Rectangle)

SetCropRectA The Rectangle used to crop the texture this Game Object uses. Set this property via `crop`. If you modify this property directly you must call `updateCrop` in order to have the change take effect.

func (*ComponentCrop) UpdateCrop

func (self *ComponentCrop) UpdateCrop()

UpdateCrop If you have set a crop rectangle on this Game Object via `crop` and since modified the `cropRect` property, or the rectangle it references, then you need to update the crop frame by calling this method.

func (*ComponentCrop) UpdateCropI

func (self *ComponentCrop) UpdateCropI(args ...interface{})

UpdateCropI If you have set a crop rectangle on this Game Object via `crop` and since modified the `cropRect` property, or the rectangle it references, then you need to update the crop frame by calling this method.

type ComponentDelta

type ComponentDelta struct {
	*js.Object
}

ComponentDelta The Delta component provides access to delta values between the Game Objects current and previous position.

func NewComponentDelta

func NewComponentDelta() *ComponentDelta

NewComponentDelta The Delta component provides access to delta values between the Game Objects current and previous position.

func NewComponentDeltaI

func NewComponentDeltaI(args ...interface{}) *ComponentDelta

NewComponentDeltaI The Delta component provides access to delta values between the Game Objects current and previous position.

func ToComponentDelta

func ToComponentDelta(jsStruct interface{}) *ComponentDelta

ComponentDelta Binding conversion method to ComponentDelta point

func (*ComponentDelta) DeltaX

func (self *ComponentDelta) DeltaX() int

DeltaX Returns the delta x value. The difference between world.x now and in the previous frame.

The value will be positive if the Game Object has moved to the right or negative if to the left.

func (*ComponentDelta) DeltaY

func (self *ComponentDelta) DeltaY() int

DeltaY Returns the delta y value. The difference between world.y now and in the previous frame.

The value will be positive if the Game Object has moved down or negative if up.

func (*ComponentDelta) DeltaZ

func (self *ComponentDelta) DeltaZ() int

DeltaZ Returns the delta z value. The difference between rotation now and in the previous frame. The delta value.

func (*ComponentDelta) SetDeltaXA

func (self *ComponentDelta) SetDeltaXA(member int)

SetDeltaXA Returns the delta x value. The difference between world.x now and in the previous frame.

The value will be positive if the Game Object has moved to the right or negative if to the left.

func (*ComponentDelta) SetDeltaYA

func (self *ComponentDelta) SetDeltaYA(member int)

SetDeltaYA Returns the delta y value. The difference between world.y now and in the previous frame.

The value will be positive if the Game Object has moved down or negative if up.

func (*ComponentDelta) SetDeltaZA

func (self *ComponentDelta) SetDeltaZA(member int)

SetDeltaZA Returns the delta z value. The difference between rotation now and in the previous frame. The delta value.

type ComponentDestroy

type ComponentDestroy struct {
	*js.Object
}

ComponentDestroy The Destroy component is responsible for destroying a Game Object.

func NewComponentDestroy

func NewComponentDestroy() *ComponentDestroy

NewComponentDestroy The Destroy component is responsible for destroying a Game Object.

func NewComponentDestroyI

func NewComponentDestroyI(args ...interface{}) *ComponentDestroy

NewComponentDestroyI The Destroy component is responsible for destroying a Game Object.

func ToComponentDestroy

func ToComponentDestroy(jsStruct interface{}) *ComponentDestroy

ComponentDestroy Binding conversion method to ComponentDestroy point

func (*ComponentDestroy) Destroy

func (self *ComponentDestroy) Destroy()

Destroy Destroys the Game Object. This removes it from its parent group, destroys the input, event and animation handlers if present and nulls its reference to `game`, freeing it up for garbage collection.

If this Game Object has the Events component it will also dispatch the `onDestroy` event.

You can optionally also destroy the BaseTexture this Game Object is using. Be careful if you've more than one Game Object sharing the same BaseTexture.

func (*ComponentDestroy) Destroy1O

func (self *ComponentDestroy) Destroy1O(destroyChildren bool)

Destroy1O Destroys the Game Object. This removes it from its parent group, destroys the input, event and animation handlers if present and nulls its reference to `game`, freeing it up for garbage collection.

If this Game Object has the Events component it will also dispatch the `onDestroy` event.

You can optionally also destroy the BaseTexture this Game Object is using. Be careful if you've more than one Game Object sharing the same BaseTexture.

func (*ComponentDestroy) Destroy2O

func (self *ComponentDestroy) Destroy2O(destroyChildren bool, destroyTexture bool)

Destroy2O Destroys the Game Object. This removes it from its parent group, destroys the input, event and animation handlers if present and nulls its reference to `game`, freeing it up for garbage collection.

If this Game Object has the Events component it will also dispatch the `onDestroy` event.

You can optionally also destroy the BaseTexture this Game Object is using. Be careful if you've more than one Game Object sharing the same BaseTexture.

func (*ComponentDestroy) DestroyI

func (self *ComponentDestroy) DestroyI(args ...interface{})

DestroyI Destroys the Game Object. This removes it from its parent group, destroys the input, event and animation handlers if present and nulls its reference to `game`, freeing it up for garbage collection.

If this Game Object has the Events component it will also dispatch the `onDestroy` event.

You can optionally also destroy the BaseTexture this Game Object is using. Be careful if you've more than one Game Object sharing the same BaseTexture.

func (*ComponentDestroy) DestroyPhase

func (self *ComponentDestroy) DestroyPhase() bool

DestroyPhase As a Game Object runs through its destroy method this flag is set to true, and can be checked in any sub-systems or plugins it is being destroyed from.

func (*ComponentDestroy) SetDestroyPhaseA

func (self *ComponentDestroy) SetDestroyPhaseA(member bool)

SetDestroyPhaseA As a Game Object runs through its destroy method this flag is set to true, and can be checked in any sub-systems or plugins it is being destroyed from.

type ComponentFixedToCamera

type ComponentFixedToCamera struct {
	*js.Object
}

ComponentFixedToCamera The FixedToCamera component enables a Game Object to be rendered relative to the game camera coordinates, regardless of where in the world the camera is. This is used for things like sticking game UI to the camera that scrolls as it moves around the world.

func NewComponentFixedToCamera

func NewComponentFixedToCamera() *ComponentFixedToCamera

NewComponentFixedToCamera The FixedToCamera component enables a Game Object to be rendered relative to the game camera coordinates, regardless of where in the world the camera is. This is used for things like sticking game UI to the camera that scrolls as it moves around the world.

func NewComponentFixedToCameraI

func NewComponentFixedToCameraI(args ...interface{}) *ComponentFixedToCamera

NewComponentFixedToCameraI The FixedToCamera component enables a Game Object to be rendered relative to the game camera coordinates, regardless of where in the world the camera is. This is used for things like sticking game UI to the camera that scrolls as it moves around the world.

func ToComponentFixedToCamera

func ToComponentFixedToCamera(jsStruct interface{}) *ComponentFixedToCamera

ComponentFixedToCamera Binding conversion method to ComponentFixedToCamera point

func (*ComponentFixedToCamera) CameraOffset

func (self *ComponentFixedToCamera) CameraOffset() *Point

CameraOffset The x/y coordinate offset applied to the top-left of the camera that this Game Object will be drawn at if `fixedToCamera` is true.

The values are relative to the top-left of the camera view and in addition to any parent of the Game Object on the display list.

func (*ComponentFixedToCamera) FixedToCamera

func (self *ComponentFixedToCamera) FixedToCamera() bool

FixedToCamera A Game Object that is "fixed" to the camera uses its x/y coordinates as offsets from the top left of the camera during rendering.

The values are adjusted at the rendering stage, overriding the Game Objects actual world position.

The end result is that the Game Object will appear to be 'fixed' to the camera, regardless of where in the game world the camera is viewing. This is useful if for example this Game Object is a UI item that you wish to be visible at all times regardless where in the world the camera is.

The offsets are stored in the `cameraOffset` property.

Note that the `cameraOffset` values are in addition to any parent of this Game Object on the display list.

Be careful not to set `fixedToCamera` on Game Objects which are in Groups that already have `fixedToCamera` enabled on them.

func (*ComponentFixedToCamera) PostUpdate

func (self *ComponentFixedToCamera) PostUpdate()

PostUpdate The FixedToCamera component postUpdate handler. Called automatically by the Game Object.

func (*ComponentFixedToCamera) PostUpdateI

func (self *ComponentFixedToCamera) PostUpdateI(args ...interface{})

PostUpdateI The FixedToCamera component postUpdate handler. Called automatically by the Game Object.

func (*ComponentFixedToCamera) SetCameraOffsetA

func (self *ComponentFixedToCamera) SetCameraOffsetA(member *Point)

SetCameraOffsetA The x/y coordinate offset applied to the top-left of the camera that this Game Object will be drawn at if `fixedToCamera` is true.

The values are relative to the top-left of the camera view and in addition to any parent of the Game Object on the display list.

func (*ComponentFixedToCamera) SetFixedToCameraA

func (self *ComponentFixedToCamera) SetFixedToCameraA(member bool)

SetFixedToCameraA A Game Object that is "fixed" to the camera uses its x/y coordinates as offsets from the top left of the camera during rendering.

The values are adjusted at the rendering stage, overriding the Game Objects actual world position.

The end result is that the Game Object will appear to be 'fixed' to the camera, regardless of where in the game world the camera is viewing. This is useful if for example this Game Object is a UI item that you wish to be visible at all times regardless where in the world the camera is.

The offsets are stored in the `cameraOffset` property.

Note that the `cameraOffset` values are in addition to any parent of this Game Object on the display list.

Be careful not to set `fixedToCamera` on Game Objects which are in Groups that already have `fixedToCamera` enabled on them.

type ComponentHealth

type ComponentHealth struct {
	*js.Object
}

ComponentHealth The Health component provides the ability for Game Objects to have a `health` property that can be damaged and reset through game code. Requires the LifeSpan component.

func NewComponentHealth

func NewComponentHealth() *ComponentHealth

NewComponentHealth The Health component provides the ability for Game Objects to have a `health` property that can be damaged and reset through game code. Requires the LifeSpan component.

func NewComponentHealthI

func NewComponentHealthI(args ...interface{}) *ComponentHealth

NewComponentHealthI The Health component provides the ability for Game Objects to have a `health` property that can be damaged and reset through game code. Requires the LifeSpan component.

func ToComponentHealth

func ToComponentHealth(jsStruct interface{}) *ComponentHealth

ComponentHealth Binding conversion method to ComponentHealth point

func (*ComponentHealth) Damage

func (self *ComponentHealth) Damage() interface{}

Damage Damages the Game Object. This removes the given amount of health from the `health` property.

If health is taken below or is equal to zero then the `kill` method is called.

func (*ComponentHealth) Heal

func (self *ComponentHealth) Heal() interface{}

Heal Heal the Game Object. This adds the given amount of health to the `health` property.

func (*ComponentHealth) Health

func (self *ComponentHealth) Health() int

Health The Game Objects health value. This is a handy property for setting and manipulating health on a Game Object.

It can be used in combination with the `damage` method or modified directly.

func (*ComponentHealth) MaxHealth

func (self *ComponentHealth) MaxHealth() int

MaxHealth The Game Objects maximum health value. This works in combination with the `heal` method to ensure the health value never exceeds the maximum.

func (*ComponentHealth) SetDamageA

func (self *ComponentHealth) SetDamageA(member interface{})

SetDamageA Damages the Game Object. This removes the given amount of health from the `health` property.

If health is taken below or is equal to zero then the `kill` method is called.

func (*ComponentHealth) SetHealA

func (self *ComponentHealth) SetHealA(member interface{})

SetHealA Heal the Game Object. This adds the given amount of health to the `health` property.

func (*ComponentHealth) SetHealth

func (self *ComponentHealth) SetHealth() interface{}

SetHealth Sets the health property of the Game Object to the given amount. Will never exceed the `maxHealth` value.

func (*ComponentHealth) SetHealthA

func (self *ComponentHealth) SetHealthA(member int)

SetHealthA The Game Objects health value. This is a handy property for setting and manipulating health on a Game Object.

It can be used in combination with the `damage` method or modified directly.

func (*ComponentHealth) SetMaxHealthA

func (self *ComponentHealth) SetMaxHealthA(member int)

SetMaxHealthA The Game Objects maximum health value. This works in combination with the `heal` method to ensure the health value never exceeds the maximum.

func (*ComponentHealth) SetSetHealthA

func (self *ComponentHealth) SetSetHealthA(member interface{})

SetSetHealthA Sets the health property of the Game Object to the given amount. Will never exceed the `maxHealth` value.

type ComponentInCamera

type ComponentInCamera struct {
	*js.Object
}

ComponentInCamera The InCamera component checks if the Game Object intersects with the Game Camera.

func NewComponentInCamera

func NewComponentInCamera() *ComponentInCamera

NewComponentInCamera The InCamera component checks if the Game Object intersects with the Game Camera.

func NewComponentInCameraI

func NewComponentInCameraI(args ...interface{}) *ComponentInCamera

NewComponentInCameraI The InCamera component checks if the Game Object intersects with the Game Camera.

func ToComponentInCamera

func ToComponentInCamera(jsStruct interface{}) *ComponentInCamera

ComponentInCamera Binding conversion method to ComponentInCamera point

func (*ComponentInCamera) InCamera

func (self *ComponentInCamera) InCamera() bool

InCamera Checks if this Game Objects bounds intersects with the Game Cameras bounds.

It will be `true` if they intersect, or `false` if the Game Object is fully outside of the Cameras bounds.

An object outside the bounds can be considered for camera culling if it has the AutoCull component.

func (*ComponentInCamera) SetInCameraA

func (self *ComponentInCamera) SetInCameraA(member bool)

SetInCameraA Checks if this Game Objects bounds intersects with the Game Cameras bounds.

It will be `true` if they intersect, or `false` if the Game Object is fully outside of the Cameras bounds.

An object outside the bounds can be considered for camera culling if it has the AutoCull component.

type ComponentInWorld

type ComponentInWorld struct {
	*js.Object
}

ComponentInWorld The InWorld component checks if a Game Object is within the Game World Bounds. An object is considered as being "in bounds" so long as its own bounds intersects at any point with the World bounds. If the AutoCull component is enabled on the Game Object then it will check the Game Object against the Camera bounds as well.

func NewComponentInWorld

func NewComponentInWorld() *ComponentInWorld

NewComponentInWorld The InWorld component checks if a Game Object is within the Game World Bounds. An object is considered as being "in bounds" so long as its own bounds intersects at any point with the World bounds. If the AutoCull component is enabled on the Game Object then it will check the Game Object against the Camera bounds as well.

func NewComponentInWorldI

func NewComponentInWorldI(args ...interface{}) *ComponentInWorld

NewComponentInWorldI The InWorld component checks if a Game Object is within the Game World Bounds. An object is considered as being "in bounds" so long as its own bounds intersects at any point with the World bounds. If the AutoCull component is enabled on the Game Object then it will check the Game Object against the Camera bounds as well.

func ToComponentInWorld

func ToComponentInWorld(jsStruct interface{}) *ComponentInWorld

ComponentInWorld Binding conversion method to ComponentInWorld point

func (*ComponentInWorld) CheckWorldBounds

func (self *ComponentInWorld) CheckWorldBounds() bool

CheckWorldBounds If this is set to `true` the Game Object checks if it is within the World bounds each frame.

When it is no longer intersecting the world bounds it dispatches the `onOutOfBounds` event.

If it was *previously* out of bounds but is now intersecting the world bounds again it dispatches the `onEnterBounds` event.

It also optionally kills the Game Object if `outOfBoundsKill` is `true`.

When `checkWorldBounds` is enabled it forces the Game Object to calculate its full bounds every frame.

This is a relatively expensive operation, especially if enabled on hundreds of Game Objects. So enable it only if you know it's required, or you have tested performance and find it acceptable.

func (*ComponentInWorld) InWorld

func (self *ComponentInWorld) InWorld() bool

InWorld Checks if the Game Objects bounds are within, or intersect at any point with the Game World bounds.

func (*ComponentInWorld) OutOfBoundsKill

func (self *ComponentInWorld) OutOfBoundsKill() bool

OutOfBoundsKill If this and the `checkWorldBounds` property are both set to `true` then the `kill` method is called as soon as `inWorld` returns false.

func (*ComponentInWorld) OutOfCameraBoundsKill

func (self *ComponentInWorld) OutOfCameraBoundsKill() bool

OutOfCameraBoundsKill If this and the `autoCull` property are both set to `true`, then the `kill` method is called as soon as the Game Object leaves the camera bounds.

func (*ComponentInWorld) PreUpdate

func (self *ComponentInWorld) PreUpdate()

PreUpdate The InWorld component preUpdate handler. Called automatically by the Game Object.

func (*ComponentInWorld) PreUpdateI

func (self *ComponentInWorld) PreUpdateI(args ...interface{})

PreUpdateI The InWorld component preUpdate handler. Called automatically by the Game Object.

func (*ComponentInWorld) SetCheckWorldBoundsA

func (self *ComponentInWorld) SetCheckWorldBoundsA(member bool)

SetCheckWorldBoundsA If this is set to `true` the Game Object checks if it is within the World bounds each frame.

When it is no longer intersecting the world bounds it dispatches the `onOutOfBounds` event.

If it was *previously* out of bounds but is now intersecting the world bounds again it dispatches the `onEnterBounds` event.

It also optionally kills the Game Object if `outOfBoundsKill` is `true`.

When `checkWorldBounds` is enabled it forces the Game Object to calculate its full bounds every frame.

This is a relatively expensive operation, especially if enabled on hundreds of Game Objects. So enable it only if you know it's required, or you have tested performance and find it acceptable.

func (*ComponentInWorld) SetInWorldA

func (self *ComponentInWorld) SetInWorldA(member bool)

SetInWorldA Checks if the Game Objects bounds are within, or intersect at any point with the Game World bounds.

func (*ComponentInWorld) SetOutOfBoundsKillA

func (self *ComponentInWorld) SetOutOfBoundsKillA(member bool)

SetOutOfBoundsKillA If this and the `checkWorldBounds` property are both set to `true` then the `kill` method is called as soon as `inWorld` returns false.

func (*ComponentInWorld) SetOutOfCameraBoundsKillA

func (self *ComponentInWorld) SetOutOfCameraBoundsKillA(member bool)

SetOutOfCameraBoundsKillA If this and the `autoCull` property are both set to `true`, then the `kill` method is called as soon as the Game Object leaves the camera bounds.

type ComponentInputEnabled

type ComponentInputEnabled struct {
	*js.Object
}

ComponentInputEnabled The InputEnabled component allows a Game Object to have its own InputHandler and process input related events.

func NewComponentInputEnabled

func NewComponentInputEnabled() *ComponentInputEnabled

NewComponentInputEnabled The InputEnabled component allows a Game Object to have its own InputHandler and process input related events.

func NewComponentInputEnabledI

func NewComponentInputEnabledI(args ...interface{}) *ComponentInputEnabled

NewComponentInputEnabledI The InputEnabled component allows a Game Object to have its own InputHandler and process input related events.

func ToComponentInputEnabled

func ToComponentInputEnabled(jsStruct interface{}) *ComponentInputEnabled

ComponentInputEnabled Binding conversion method to ComponentInputEnabled point

func (*ComponentInputEnabled) Input

func (self *ComponentInputEnabled) Input() interface{}

Input The Input Handler for this Game Object.

By default it is disabled. If you wish this Game Object to process input events you should enable it with: `inputEnabled = true`.

After you have done this, this property will be a reference to the Phaser InputHandler.

func (*ComponentInputEnabled) InputEnabled

func (self *ComponentInputEnabled) InputEnabled() bool

InputEnabled By default a Game Object won't process any input events. By setting `inputEnabled` to true a Phaser.InputHandler is created for this Game Object and it will then start to process click / touch events and more.

You can then access the Input Handler via `this.input`.

Note that Input related events are dispatched from `this.events`, i.e.: `events.onInputDown`.

If you set this property to false it will stop the Input Handler from processing any more input events.

If you want to _temporarily_ disable input for a Game Object, then it's better to set `input.enabled = false`, as it won't reset any of the Input Handlers internal properties. You can then toggle this back on as needed.

func (*ComponentInputEnabled) SetInputA

func (self *ComponentInputEnabled) SetInputA(member interface{})

SetInputA The Input Handler for this Game Object.

By default it is disabled. If you wish this Game Object to process input events you should enable it with: `inputEnabled = true`.

After you have done this, this property will be a reference to the Phaser InputHandler.

func (*ComponentInputEnabled) SetInputEnabledA

func (self *ComponentInputEnabled) SetInputEnabledA(member bool)

SetInputEnabledA By default a Game Object won't process any input events. By setting `inputEnabled` to true a Phaser.InputHandler is created for this Game Object and it will then start to process click / touch events and more.

You can then access the Input Handler via `this.input`.

Note that Input related events are dispatched from `this.events`, i.e.: `events.onInputDown`.

If you set this property to false it will stop the Input Handler from processing any more input events.

If you want to _temporarily_ disable input for a Game Object, then it's better to set `input.enabled = false`, as it won't reset any of the Input Handlers internal properties. You can then toggle this back on as needed.

type ComponentLifeSpan

type ComponentLifeSpan struct {
	*js.Object
}

ComponentLifeSpan LifeSpan Component Features.

func NewComponentLifeSpan

func NewComponentLifeSpan() *ComponentLifeSpan

NewComponentLifeSpan LifeSpan Component Features.

func NewComponentLifeSpanI

func NewComponentLifeSpanI(args ...interface{}) *ComponentLifeSpan

NewComponentLifeSpanI LifeSpan Component Features.

func ToComponentLifeSpan

func ToComponentLifeSpan(jsStruct interface{}) *ComponentLifeSpan

ComponentLifeSpan Binding conversion method to ComponentLifeSpan point

func (*ComponentLifeSpan) Alive

func (self *ComponentLifeSpan) Alive() bool

Alive A useful flag to control if the Game Object is alive or dead.

This is set automatically by the Health components `damage` method should the object run out of health. Or you can toggle it via your game code.

This property is mostly just provided to be used by your game - it doesn't effect rendering or logic updates. However you can use `Group.getFirstAlive` in conjunction with this property for fast object pooling and recycling.

func (*ComponentLifeSpan) Kill

func (self *ComponentLifeSpan) Kill() *DisplayObject

Kill Kills a Game Object. A killed Game Object has its `alive`, `exists` and `visible` properties all set to false.

It will dispatch the `onKilled` event. You can listen to `events.onKilled` for the signal.

Note that killing a Game Object is a way for you to quickly recycle it in an object pool, it doesn't destroy the object or free it up from memory.

If you don't need this Game Object any more you should call `destroy` instead.

func (*ComponentLifeSpan) KillI

func (self *ComponentLifeSpan) KillI(args ...interface{}) *DisplayObject

KillI Kills a Game Object. A killed Game Object has its `alive`, `exists` and `visible` properties all set to false.

It will dispatch the `onKilled` event. You can listen to `events.onKilled` for the signal.

Note that killing a Game Object is a way for you to quickly recycle it in an object pool, it doesn't destroy the object or free it up from memory.

If you don't need this Game Object any more you should call `destroy` instead.

func (*ComponentLifeSpan) Lifespan

func (self *ComponentLifeSpan) Lifespan() int

Lifespan The lifespan allows you to give a Game Object a lifespan in milliseconds.

Once the Game Object is 'born' you can set this to a positive value.

It is automatically decremented by the millisecond equivalent of `game.time.physicsElapsed` each frame. When it reaches zero it will call the `kill` method.

Very handy for particles, bullets, collectibles, or any other short-lived entity.

func (*ComponentLifeSpan) PreUpdate

func (self *ComponentLifeSpan) PreUpdate()

PreUpdate The LifeSpan component preUpdate handler. Called automatically by the Game Object.

func (*ComponentLifeSpan) PreUpdateI

func (self *ComponentLifeSpan) PreUpdateI(args ...interface{})

PreUpdateI The LifeSpan component preUpdate handler. Called automatically by the Game Object.

func (*ComponentLifeSpan) Revive

func (self *ComponentLifeSpan) Revive() *DisplayObject

Revive Brings a 'dead' Game Object back to life, optionally resetting its health value in the process.

A resurrected Game Object has its `alive`, `exists` and `visible` properties all set to true.

It will dispatch the `onRevived` event. Listen to `events.onRevived` for the signal.

func (*ComponentLifeSpan) Revive1O

func (self *ComponentLifeSpan) Revive1O(health int) *DisplayObject

Revive1O Brings a 'dead' Game Object back to life, optionally resetting its health value in the process.

A resurrected Game Object has its `alive`, `exists` and `visible` properties all set to true.

It will dispatch the `onRevived` event. Listen to `events.onRevived` for the signal.

func (*ComponentLifeSpan) ReviveI

func (self *ComponentLifeSpan) ReviveI(args ...interface{}) *DisplayObject

ReviveI Brings a 'dead' Game Object back to life, optionally resetting its health value in the process.

A resurrected Game Object has its `alive`, `exists` and `visible` properties all set to true.

It will dispatch the `onRevived` event. Listen to `events.onRevived` for the signal.

func (*ComponentLifeSpan) SetAliveA

func (self *ComponentLifeSpan) SetAliveA(member bool)

SetAliveA A useful flag to control if the Game Object is alive or dead.

This is set automatically by the Health components `damage` method should the object run out of health. Or you can toggle it via your game code.

This property is mostly just provided to be used by your game - it doesn't effect rendering or logic updates. However you can use `Group.getFirstAlive` in conjunction with this property for fast object pooling and recycling.

func (*ComponentLifeSpan) SetLifespanA

func (self *ComponentLifeSpan) SetLifespanA(member int)

SetLifespanA The lifespan allows you to give a Game Object a lifespan in milliseconds.

Once the Game Object is 'born' you can set this to a positive value.

It is automatically decremented by the millisecond equivalent of `game.time.physicsElapsed` each frame. When it reaches zero it will call the `kill` method.

Very handy for particles, bullets, collectibles, or any other short-lived entity.

type ComponentLoadTexture

type ComponentLoadTexture struct {
	*js.Object
}

ComponentLoadTexture The LoadTexture component manages the loading of a texture into the Game Object and the changing of frames.

func NewComponentLoadTexture

func NewComponentLoadTexture() *ComponentLoadTexture

NewComponentLoadTexture The LoadTexture component manages the loading of a texture into the Game Object and the changing of frames.

func NewComponentLoadTextureI

func NewComponentLoadTextureI(args ...interface{}) *ComponentLoadTexture

NewComponentLoadTextureI The LoadTexture component manages the loading of a texture into the Game Object and the changing of frames.

func ToComponentLoadTexture

func ToComponentLoadTexture(jsStruct interface{}) *ComponentLoadTexture

ComponentLoadTexture Binding conversion method to ComponentLoadTexture point

func (*ComponentLoadTexture) Frame

func (self *ComponentLoadTexture) Frame() int

Frame Gets or sets the current frame index of the texture being used to render this Game Object.

To change the frame set `frame` to the index of the new frame in the sprite sheet you wish this Game Object to use, for example: `player.frame = 4`.

If the frame index given doesn't exist it will revert to the first frame found in the texture.

If you are using a texture atlas then you should use the `frameName` property instead.

If you wish to fully replace the texture being used see `loadTexture`.

func (*ComponentLoadTexture) FrameName

func (self *ComponentLoadTexture) FrameName() string

FrameName Gets or sets the current frame name of the texture being used to render this Game Object.

To change the frame set `frameName` to the name of the new frame in the texture atlas you wish this Game Object to use, for example: `player.frameName = "idle"`.

If the frame name given doesn't exist it will revert to the first frame found in the texture and throw a console warning.

If you are using a sprite sheet then you should use the `frame` property instead.

If you wish to fully replace the texture being used see `loadTexture`.

func (*ComponentLoadTexture) LoadTexture

func (self *ComponentLoadTexture) LoadTexture(key interface{})

LoadTexture Changes the base texture the Game Object is using. The old texture is removed and the new one is referenced or fetched from the Cache.

If your Game Object is using a frame from a texture atlas and you just wish to change to another frame, then see the `frame` or `frameName` properties instead.

You should only use `loadTexture` if you want to replace the base texture entirely.

Calling this method causes a WebGL texture update, so use sparingly or in low-intensity portions of your game, or if you know the new texture is already on the GPU.

You can use the new const `Phaser.PENDING_ATLAS` as the texture key for any sprite. Doing this then sets the key to be the `frame` argument (the frame is set to zero).

This allows you to create sprites using `load.image` during development, and then change them to use a Texture Atlas later in development by simply searching your code for 'PENDING_ATLAS' and swapping it to be the key of the atlas data.

Note: You cannot use a RenderTexture as a texture for a TileSprite.

func (*ComponentLoadTexture) LoadTexture1O

func (self *ComponentLoadTexture) LoadTexture1O(key interface{}, frame interface{})

LoadTexture1O Changes the base texture the Game Object is using. The old texture is removed and the new one is referenced or fetched from the Cache.

If your Game Object is using a frame from a texture atlas and you just wish to change to another frame, then see the `frame` or `frameName` properties instead.

You should only use `loadTexture` if you want to replace the base texture entirely.

Calling this method causes a WebGL texture update, so use sparingly or in low-intensity portions of your game, or if you know the new texture is already on the GPU.

You can use the new const `Phaser.PENDING_ATLAS` as the texture key for any sprite. Doing this then sets the key to be the `frame` argument (the frame is set to zero).

This allows you to create sprites using `load.image` during development, and then change them to use a Texture Atlas later in development by simply searching your code for 'PENDING_ATLAS' and swapping it to be the key of the atlas data.

Note: You cannot use a RenderTexture as a texture for a TileSprite.

func (*ComponentLoadTexture) LoadTexture2O

func (self *ComponentLoadTexture) LoadTexture2O(key interface{}, frame interface{}, stopAnimation bool)

LoadTexture2O Changes the base texture the Game Object is using. The old texture is removed and the new one is referenced or fetched from the Cache.

If your Game Object is using a frame from a texture atlas and you just wish to change to another frame, then see the `frame` or `frameName` properties instead.

You should only use `loadTexture` if you want to replace the base texture entirely.

Calling this method causes a WebGL texture update, so use sparingly or in low-intensity portions of your game, or if you know the new texture is already on the GPU.

You can use the new const `Phaser.PENDING_ATLAS` as the texture key for any sprite. Doing this then sets the key to be the `frame` argument (the frame is set to zero).

This allows you to create sprites using `load.image` during development, and then change them to use a Texture Atlas later in development by simply searching your code for 'PENDING_ATLAS' and swapping it to be the key of the atlas data.

Note: You cannot use a RenderTexture as a texture for a TileSprite.

func (*ComponentLoadTexture) LoadTextureI

func (self *ComponentLoadTexture) LoadTextureI(args ...interface{})

LoadTextureI Changes the base texture the Game Object is using. The old texture is removed and the new one is referenced or fetched from the Cache.

If your Game Object is using a frame from a texture atlas and you just wish to change to another frame, then see the `frame` or `frameName` properties instead.

You should only use `loadTexture` if you want to replace the base texture entirely.

Calling this method causes a WebGL texture update, so use sparingly or in low-intensity portions of your game, or if you know the new texture is already on the GPU.

You can use the new const `Phaser.PENDING_ATLAS` as the texture key for any sprite. Doing this then sets the key to be the `frame` argument (the frame is set to zero).

This allows you to create sprites using `load.image` during development, and then change them to use a Texture Atlas later in development by simply searching your code for 'PENDING_ATLAS' and swapping it to be the key of the atlas data.

Note: You cannot use a RenderTexture as a texture for a TileSprite.

func (*ComponentLoadTexture) ResetFrame

func (self *ComponentLoadTexture) ResetFrame()

ResetFrame Resets the texture frame dimensions that the Game Object uses for rendering.

func (*ComponentLoadTexture) ResetFrameI

func (self *ComponentLoadTexture) ResetFrameI(args ...interface{})

ResetFrameI Resets the texture frame dimensions that the Game Object uses for rendering.

func (*ComponentLoadTexture) ResizeFrame

func (self *ComponentLoadTexture) ResizeFrame(parent interface{}, width int, height int)

ResizeFrame Resizes the Frame dimensions that the Game Object uses for rendering.

You shouldn't normally need to ever call this, but in the case of special texture types such as Video or BitmapData it can be useful to adjust the dimensions directly in this way.

func (*ComponentLoadTexture) ResizeFrameI

func (self *ComponentLoadTexture) ResizeFrameI(args ...interface{})

ResizeFrameI Resizes the Frame dimensions that the Game Object uses for rendering.

You shouldn't normally need to ever call this, but in the case of special texture types such as Video or BitmapData it can be useful to adjust the dimensions directly in this way.

func (*ComponentLoadTexture) SetFrame

func (self *ComponentLoadTexture) SetFrame(frame *Frame)

SetFrame Sets the texture frame the Game Object uses for rendering.

This is primarily an internal method used by `loadTexture`, but is exposed for the use of plugins and custom classes.

func (*ComponentLoadTexture) SetFrameA

func (self *ComponentLoadTexture) SetFrameA(member int)

SetFrameA Gets or sets the current frame index of the texture being used to render this Game Object.

To change the frame set `frame` to the index of the new frame in the sprite sheet you wish this Game Object to use, for example: `player.frame = 4`.

If the frame index given doesn't exist it will revert to the first frame found in the texture.

If you are using a texture atlas then you should use the `frameName` property instead.

If you wish to fully replace the texture being used see `loadTexture`.

func (*ComponentLoadTexture) SetFrameI

func (self *ComponentLoadTexture) SetFrameI(args ...interface{})

SetFrameI Sets the texture frame the Game Object uses for rendering.

This is primarily an internal method used by `loadTexture`, but is exposed for the use of plugins and custom classes.

func (*ComponentLoadTexture) SetFrameNameA

func (self *ComponentLoadTexture) SetFrameNameA(member string)

SetFrameNameA Gets or sets the current frame name of the texture being used to render this Game Object.

To change the frame set `frameName` to the name of the new frame in the texture atlas you wish this Game Object to use, for example: `player.frameName = "idle"`.

If the frame name given doesn't exist it will revert to the first frame found in the texture and throw a console warning.

If you are using a sprite sheet then you should use the `frame` property instead.

If you wish to fully replace the texture being used see `loadTexture`.

type ComponentOverlap

type ComponentOverlap struct {
	*js.Object
}

ComponentOverlap The Overlap component allows a Game Object to check if it overlaps with the bounds of another Game Object.

func NewComponentOverlap

func NewComponentOverlap() *ComponentOverlap

NewComponentOverlap The Overlap component allows a Game Object to check if it overlaps with the bounds of another Game Object.

func NewComponentOverlapI

func NewComponentOverlapI(args ...interface{}) *ComponentOverlap

NewComponentOverlapI The Overlap component allows a Game Object to check if it overlaps with the bounds of another Game Object.

func ToComponentOverlap

func ToComponentOverlap(jsStruct interface{}) *ComponentOverlap

ComponentOverlap Binding conversion method to ComponentOverlap point

func (*ComponentOverlap) Overlap

func (self *ComponentOverlap) Overlap(displayObject interface{}) bool

Overlap Checks to see if the bounds of this Game Object overlaps with the bounds of the given Display Object, which can be a Sprite, Image, TileSprite or anything that extends those such as Button or provides a `getBounds` method and result.

This check ignores the `hitArea` property if set and runs a `getBounds` comparison on both objects to determine the result.

Therefore it's relatively expensive to use in large quantities, i.e. with lots of Sprites at a high frequency. It should be fine for low-volume testing where physics isn't required.

func (*ComponentOverlap) OverlapI

func (self *ComponentOverlap) OverlapI(args ...interface{}) bool

OverlapI Checks to see if the bounds of this Game Object overlaps with the bounds of the given Display Object, which can be a Sprite, Image, TileSprite or anything that extends those such as Button or provides a `getBounds` method and result.

This check ignores the `hitArea` property if set and runs a `getBounds` comparison on both objects to determine the result.

Therefore it's relatively expensive to use in large quantities, i.e. with lots of Sprites at a high frequency. It should be fine for low-volume testing where physics isn't required.

type ComponentPhysicsBody

type ComponentPhysicsBody struct {
	*js.Object
}

ComponentPhysicsBody The PhysicsBody component manages the Game Objects physics body and physics enabling. It also overrides the x and y properties, ensuring that any manual adjustment of them is reflected in the physics body itself.

func NewComponentPhysicsBody

func NewComponentPhysicsBody() *ComponentPhysicsBody

NewComponentPhysicsBody The PhysicsBody component manages the Game Objects physics body and physics enabling. It also overrides the x and y properties, ensuring that any manual adjustment of them is reflected in the physics body itself.

func NewComponentPhysicsBodyI

func NewComponentPhysicsBodyI(args ...interface{}) *ComponentPhysicsBody

NewComponentPhysicsBodyI The PhysicsBody component manages the Game Objects physics body and physics enabling. It also overrides the x and y properties, ensuring that any manual adjustment of them is reflected in the physics body itself.

func ToComponentPhysicsBody

func ToComponentPhysicsBody(jsStruct interface{}) *ComponentPhysicsBody

ComponentPhysicsBody Binding conversion method to ComponentPhysicsBody point

func (*ComponentPhysicsBody) Body

func (self *ComponentPhysicsBody) Body() interface{}

Body `body` is the Game Objects physics body. Once a Game Object is enabled for physics you access all associated properties and methods via it.

By default Game Objects won't add themselves to any physics system and their `body` property will be `null`.

To enable this Game Object for physics you need to call `game.physics.enable(object, system)` where `object` is this object and `system` is the Physics system you are using. If none is given it defaults to `Phaser.Physics.Arcade`.

You can alternatively call `game.physics.arcade.enable(object)`, or add this Game Object to a physics enabled Group.

Important: Enabling a Game Object for P2 or Ninja physics will automatically set its `anchor` property to 0.5, so the physics body is centered on the Game Object.

If you need a different result then adjust or re-create the Body shape offsets manually or reset the anchor after enabling physics.

func (*ComponentPhysicsBody) PostUpdate

func (self *ComponentPhysicsBody) PostUpdate()

PostUpdate The PhysicsBody component postUpdate handler. Called automatically by the Game Object.

func (*ComponentPhysicsBody) PostUpdateI

func (self *ComponentPhysicsBody) PostUpdateI(args ...interface{})

PostUpdateI The PhysicsBody component postUpdate handler. Called automatically by the Game Object.

func (*ComponentPhysicsBody) PreUpdate

func (self *ComponentPhysicsBody) PreUpdate()

PreUpdate The PhysicsBody component preUpdate handler. Called automatically by the Game Object.

func (*ComponentPhysicsBody) PreUpdateI

func (self *ComponentPhysicsBody) PreUpdateI(args ...interface{})

PreUpdateI The PhysicsBody component preUpdate handler. Called automatically by the Game Object.

func (*ComponentPhysicsBody) SetBodyA

func (self *ComponentPhysicsBody) SetBodyA(member interface{})

SetBodyA `body` is the Game Objects physics body. Once a Game Object is enabled for physics you access all associated properties and methods via it.

By default Game Objects won't add themselves to any physics system and their `body` property will be `null`.

To enable this Game Object for physics you need to call `game.physics.enable(object, system)` where `object` is this object and `system` is the Physics system you are using. If none is given it defaults to `Phaser.Physics.Arcade`.

You can alternatively call `game.physics.arcade.enable(object)`, or add this Game Object to a physics enabled Group.

Important: Enabling a Game Object for P2 or Ninja physics will automatically set its `anchor` property to 0.5, so the physics body is centered on the Game Object.

If you need a different result then adjust or re-create the Body shape offsets manually or reset the anchor after enabling physics.

func (*ComponentPhysicsBody) SetXA

func (self *ComponentPhysicsBody) SetXA(member int)

SetXA The position of the Game Object on the x axis relative to the local coordinates of the parent.

func (*ComponentPhysicsBody) SetYA

func (self *ComponentPhysicsBody) SetYA(member int)

SetYA The position of the Game Object on the y axis relative to the local coordinates of the parent.

func (*ComponentPhysicsBody) X

func (self *ComponentPhysicsBody) X() int

X The position of the Game Object on the x axis relative to the local coordinates of the parent.

func (*ComponentPhysicsBody) Y

func (self *ComponentPhysicsBody) Y() int

Y The position of the Game Object on the y axis relative to the local coordinates of the parent.

type ComponentReset

type ComponentReset struct {
	*js.Object
}

ComponentReset The Reset component allows a Game Object to be reset and repositioned to a new location.

func NewComponentReset

func NewComponentReset() *ComponentReset

NewComponentReset The Reset component allows a Game Object to be reset and repositioned to a new location.

func NewComponentResetI

func NewComponentResetI(args ...interface{}) *ComponentReset

NewComponentResetI The Reset component allows a Game Object to be reset and repositioned to a new location.

func ToComponentReset

func ToComponentReset(jsStruct interface{}) *ComponentReset

ComponentReset Binding conversion method to ComponentReset point

func (*ComponentReset) Reset

func (self *ComponentReset) Reset(x int, y int) *DisplayObject

Reset Resets the Game Object.

This moves the Game Object to the given x/y world coordinates and sets `fresh`, `exists`, `visible` and `renderable` to true.

If this Game Object has the LifeSpan component it will also set `alive` to true and `health` to the given value.

If this Game Object has a Physics Body it will reset the Body.

func (*ComponentReset) Reset1O

func (self *ComponentReset) Reset1O(x int, y int, health int) *DisplayObject

Reset1O Resets the Game Object.

This moves the Game Object to the given x/y world coordinates and sets `fresh`, `exists`, `visible` and `renderable` to true.

If this Game Object has the LifeSpan component it will also set `alive` to true and `health` to the given value.

If this Game Object has a Physics Body it will reset the Body.

func (*ComponentReset) ResetI

func (self *ComponentReset) ResetI(args ...interface{}) *DisplayObject

ResetI Resets the Game Object.

This moves the Game Object to the given x/y world coordinates and sets `fresh`, `exists`, `visible` and `renderable` to true.

If this Game Object has the LifeSpan component it will also set `alive` to true and `health` to the given value.

If this Game Object has a Physics Body it will reset the Body.

type ComponentScaleMinMax

type ComponentScaleMinMax struct {
	*js.Object
}

ComponentScaleMinMax The ScaleMinMax component allows a Game Object to limit how far it can be scaled by its parent.

func NewComponentScaleMinMax

func NewComponentScaleMinMax() *ComponentScaleMinMax

NewComponentScaleMinMax The ScaleMinMax component allows a Game Object to limit how far it can be scaled by its parent.

func NewComponentScaleMinMaxI

func NewComponentScaleMinMaxI(args ...interface{}) *ComponentScaleMinMax

NewComponentScaleMinMaxI The ScaleMinMax component allows a Game Object to limit how far it can be scaled by its parent.

func ToComponentScaleMinMax

func ToComponentScaleMinMax(jsStruct interface{}) *ComponentScaleMinMax

ComponentScaleMinMax Binding conversion method to ComponentScaleMinMax point

func (*ComponentScaleMinMax) CheckTransform

func (self *ComponentScaleMinMax) CheckTransform(wt *Matrix)

CheckTransform Adjust scaling limits, if set, to this Game Object.

func (*ComponentScaleMinMax) CheckTransformI

func (self *ComponentScaleMinMax) CheckTransformI(args ...interface{})

CheckTransformI Adjust scaling limits, if set, to this Game Object.

func (*ComponentScaleMinMax) ScaleMax

func (self *ComponentScaleMinMax) ScaleMax() *Point

ScaleMax The maximum scale this Game Object will scale up to.

It allows you to prevent a parent from scaling this Game Object higher than the given value.

Set it to `null` to remove the limit.

func (*ComponentScaleMinMax) ScaleMin

func (self *ComponentScaleMinMax) ScaleMin() *Point

ScaleMin The minimum scale this Game Object will scale down to.

It allows you to prevent a parent from scaling this Game Object lower than the given value.

Set it to `null` to remove the limit.

func (*ComponentScaleMinMax) SetScaleMaxA

func (self *ComponentScaleMinMax) SetScaleMaxA(member *Point)

SetScaleMaxA The maximum scale this Game Object will scale up to.

It allows you to prevent a parent from scaling this Game Object higher than the given value.

Set it to `null` to remove the limit.

func (*ComponentScaleMinMax) SetScaleMinA

func (self *ComponentScaleMinMax) SetScaleMinA(member *Point)

SetScaleMinA The minimum scale this Game Object will scale down to.

It allows you to prevent a parent from scaling this Game Object lower than the given value.

Set it to `null` to remove the limit.

func (*ComponentScaleMinMax) SetScaleMinMax

func (self *ComponentScaleMinMax) SetScaleMinMax(minX interface{}, minY interface{}, maxX interface{}, maxY interface{})

SetScaleMinMax Sets the scaleMin and scaleMax values. These values are used to limit how far this Game Object will scale based on its parent.

For example if this Game Object has a `minScale` value of 1 and its parent has a `scale` value of 0.5, the 0.5 will be ignored and the scale value of 1 will be used, as the parents scale is lower than the minimum scale this Game Object should adhere to.

By setting these values you can carefully control how Game Objects deal with responsive scaling.

If only one parameter is given then that value will be used for both scaleMin and scaleMax: `setScaleMinMax(1)` = scaleMin.x, scaleMin.y, scaleMax.x and scaleMax.y all = 1

If only two parameters are given the first is set as scaleMin.x and y and the second as scaleMax.x and y: `setScaleMinMax(0.5, 2)` = scaleMin.x and y = 0.5 and scaleMax.x and y = 2

If you wish to set `scaleMin` with different values for x and y then either modify Game Object.scaleMin directly, or pass `null` for the `maxX` and `maxY` parameters.

Call `setScaleMinMax(null)` to clear all previously set values.

func (*ComponentScaleMinMax) SetScaleMinMaxI

func (self *ComponentScaleMinMax) SetScaleMinMaxI(args ...interface{})

SetScaleMinMaxI Sets the scaleMin and scaleMax values. These values are used to limit how far this Game Object will scale based on its parent.

For example if this Game Object has a `minScale` value of 1 and its parent has a `scale` value of 0.5, the 0.5 will be ignored and the scale value of 1 will be used, as the parents scale is lower than the minimum scale this Game Object should adhere to.

By setting these values you can carefully control how Game Objects deal with responsive scaling.

If only one parameter is given then that value will be used for both scaleMin and scaleMax: `setScaleMinMax(1)` = scaleMin.x, scaleMin.y, scaleMax.x and scaleMax.y all = 1

If only two parameters are given the first is set as scaleMin.x and y and the second as scaleMax.x and y: `setScaleMinMax(0.5, 2)` = scaleMin.x and y = 0.5 and scaleMax.x and y = 2

If you wish to set `scaleMin` with different values for x and y then either modify Game Object.scaleMin directly, or pass `null` for the `maxX` and `maxY` parameters.

Call `setScaleMinMax(null)` to clear all previously set values.

func (*ComponentScaleMinMax) SetTransformCallbackA

func (self *ComponentScaleMinMax) SetTransformCallbackA(member interface{})

SetTransformCallbackA The callback that will apply any scale limiting to the worldTransform.

func (*ComponentScaleMinMax) SetTransformCallbackContextA

func (self *ComponentScaleMinMax) SetTransformCallbackContextA(member interface{})

SetTransformCallbackContextA The context under which `transformCallback` is called.

func (*ComponentScaleMinMax) TransformCallback

func (self *ComponentScaleMinMax) TransformCallback() interface{}

TransformCallback The callback that will apply any scale limiting to the worldTransform.

func (*ComponentScaleMinMax) TransformCallbackContext

func (self *ComponentScaleMinMax) TransformCallbackContext() interface{}

TransformCallbackContext The context under which `transformCallback` is called.

type ComponentSmoothed

type ComponentSmoothed struct {
	*js.Object
}

ComponentSmoothed The Smoothed component allows a Game Object to control anti-aliasing of an image based texture.

func NewComponentSmoothed

func NewComponentSmoothed() *ComponentSmoothed

NewComponentSmoothed The Smoothed component allows a Game Object to control anti-aliasing of an image based texture.

func NewComponentSmoothedI

func NewComponentSmoothedI(args ...interface{}) *ComponentSmoothed

NewComponentSmoothedI The Smoothed component allows a Game Object to control anti-aliasing of an image based texture.

func ToComponentSmoothed

func ToComponentSmoothed(jsStruct interface{}) *ComponentSmoothed

ComponentSmoothed Binding conversion method to ComponentSmoothed point

func (*ComponentSmoothed) SetSmoothedA

func (self *ComponentSmoothed) SetSmoothedA(member bool)

SetSmoothedA Enable or disable texture smoothing for this Game Object.

It only takes effect if the Game Object is using an image based texture.

Smoothing is enabled by default.

func (*ComponentSmoothed) Smoothed

func (self *ComponentSmoothed) Smoothed() bool

Smoothed Enable or disable texture smoothing for this Game Object.

It only takes effect if the Game Object is using an image based texture.

Smoothing is enabled by default.

type Create

type Create struct {
	*js.Object
}

Create The Phaser.Create class is a collection of smaller helper methods that allow you to generate game content quickly and easily, without the need for any external files. You can create textures for sprites and in coming releases we'll add dynamic sound effect generation support as well (like sfxr).

Access this via `Game.create` (`this.game.create` from within a State object)

func NewCreate

func NewCreate(game *Game) *Create

NewCreate The Phaser.Create class is a collection of smaller helper methods that allow you to generate game content quickly and easily, without the need for any external files. You can create textures for sprites and in coming releases we'll add dynamic sound effect generation support as well (like sfxr).

Access this via `Game.create` (`this.game.create` from within a State object)

func NewCreateI

func NewCreateI(args ...interface{}) *Create

NewCreateI The Phaser.Create class is a collection of smaller helper methods that allow you to generate game content quickly and easily, without the need for any external files. You can create textures for sprites and in coming releases we'll add dynamic sound effect generation support as well (like sfxr).

Access this via `Game.create` (`this.game.create` from within a State object)

func ToCreate

func ToCreate(jsStruct interface{}) *Create

Create Binding conversion method to Create point

func (*Create) Bmd

func (self *Create) Bmd() *BitmapData

Bmd The internal BitmapData Create uses to generate textures from.

func (*Create) Canvas

func (self *Create) Canvas() dom.HTMLCanvasElement

Canvas The canvas the BitmapData uses.

func (*Create) Ctx

func (self *Create) Ctx() interface{}

Ctx The 2d context of the canvas.

func (*Create) Game

func (self *Create) Game() *Game

Game A reference to the currently running Game.

func (*Create) Grid

func (self *Create) Grid(key string, width int, height int, cellWidth int, cellHeight int, color string) *Texture

Grid Creates a grid texture based on the given dimensions.

func (*Create) GridI

func (self *Create) GridI(args ...interface{}) *Texture

GridI Creates a grid texture based on the given dimensions.

func (*Create) PALETTE_ARNE

func (self *Create) PALETTE_ARNE() int

PALETTE_ARNE A 16 color palette by [Arne](http://androidarts.com/palette/16pal.htm)

func (*Create) PALETTE_C64

func (self *Create) PALETTE_C64() int

PALETTE_C64 A 16 color C64 inspired palette.

func (*Create) PALETTE_CGA

func (self *Create) PALETTE_CGA() int

PALETTE_CGA A 16 color CGA inspired palette.

func (*Create) PALETTE_JAPANESE_MACHINE

func (self *Create) PALETTE_JAPANESE_MACHINE() int

PALETTE_JAPANESE_MACHINE A 16 color palette inspired by Japanese computers like the MSX.

func (*Create) PALETTE_JMP

func (self *Create) PALETTE_JMP() int

PALETTE_JMP A 16 color JMP inspired palette.

func (*Create) Palettes

func (self *Create) Palettes() []interface{}

Palettes A range of 16 color palettes for use with sprite generation.

func (*Create) SetBmdA

func (self *Create) SetBmdA(member *BitmapData)

SetBmdA The internal BitmapData Create uses to generate textures from.

func (*Create) SetCanvasA

func (self *Create) SetCanvasA(member dom.HTMLCanvasElement)

SetCanvasA The canvas the BitmapData uses.

func (*Create) SetCtxA

func (self *Create) SetCtxA(member interface{})

SetCtxA The 2d context of the canvas.

func (*Create) SetGameA

func (self *Create) SetGameA(member *Game)

SetGameA A reference to the currently running Game.

func (*Create) SetPALETTE_ARNEA

func (self *Create) SetPALETTE_ARNEA(member int)

SetPALETTE_ARNEA A 16 color palette by [Arne](http://androidarts.com/palette/16pal.htm)

func (*Create) SetPALETTE_C64A

func (self *Create) SetPALETTE_C64A(member int)

SetPALETTE_C64A A 16 color C64 inspired palette.

func (*Create) SetPALETTE_CGAA

func (self *Create) SetPALETTE_CGAA(member int)

SetPALETTE_CGAA A 16 color CGA inspired palette.

func (*Create) SetPALETTE_JAPANESE_MACHINEA

func (self *Create) SetPALETTE_JAPANESE_MACHINEA(member int)

SetPALETTE_JAPANESE_MACHINEA A 16 color palette inspired by Japanese computers like the MSX.

func (*Create) SetPALETTE_JMPA

func (self *Create) SetPALETTE_JMPA(member int)

SetPALETTE_JMPA A 16 color JMP inspired palette.

func (*Create) SetPalettesA

func (self *Create) SetPalettesA(member []interface{})

SetPalettesA A range of 16 color palettes for use with sprite generation.

func (*Create) Texture

func (self *Create) Texture(key string, data []interface{}) *Texture

Texture Generates a new PIXI.Texture from the given data, which can be applied to a Sprite.

This allows you to create game graphics quickly and easily, with no external files but that use actual proper images rather than Phaser.Graphics objects, which are expensive to render and limited in scope.

Each element of the array is a string holding the pixel color values, as mapped to one of the Phaser.Create PALETTE consts.

For example:

`var data = [

' 333 ',
' 777 ',
'E333E',
' 333 ',
' 3 3 '

];`

`game.create.texture('bob', data);`

The above will create a new texture called `bob`, which will look like a little man wearing a hat. You can then use it for sprites the same way you use any other texture: `game.add.sprite(0, 0, 'bob');`

func (*Create) Texture1O

func (self *Create) Texture1O(key string, data []interface{}, pixelWidth int) *Texture

Texture1O Generates a new PIXI.Texture from the given data, which can be applied to a Sprite.

This allows you to create game graphics quickly and easily, with no external files but that use actual proper images rather than Phaser.Graphics objects, which are expensive to render and limited in scope.

Each element of the array is a string holding the pixel color values, as mapped to one of the Phaser.Create PALETTE consts.

For example:

`var data = [

' 333 ',
' 777 ',
'E333E',
' 333 ',
' 3 3 '

];`

`game.create.texture('bob', data);`

The above will create a new texture called `bob`, which will look like a little man wearing a hat. You can then use it for sprites the same way you use any other texture: `game.add.sprite(0, 0, 'bob');`

func (*Create) Texture2O

func (self *Create) Texture2O(key string, data []interface{}, pixelWidth int, pixelHeight int) *Texture

Texture2O Generates a new PIXI.Texture from the given data, which can be applied to a Sprite.

This allows you to create game graphics quickly and easily, with no external files but that use actual proper images rather than Phaser.Graphics objects, which are expensive to render and limited in scope.

Each element of the array is a string holding the pixel color values, as mapped to one of the Phaser.Create PALETTE consts.

For example:

`var data = [

' 333 ',
' 777 ',
'E333E',
' 333 ',
' 3 3 '

];`

`game.create.texture('bob', data);`

The above will create a new texture called `bob`, which will look like a little man wearing a hat. You can then use it for sprites the same way you use any other texture: `game.add.sprite(0, 0, 'bob');`

func (*Create) Texture3O

func (self *Create) Texture3O(key string, data []interface{}, pixelWidth int, pixelHeight int, palette int) *Texture

Texture3O Generates a new PIXI.Texture from the given data, which can be applied to a Sprite.

This allows you to create game graphics quickly and easily, with no external files but that use actual proper images rather than Phaser.Graphics objects, which are expensive to render and limited in scope.

Each element of the array is a string holding the pixel color values, as mapped to one of the Phaser.Create PALETTE consts.

For example:

`var data = [

' 333 ',
' 777 ',
'E333E',
' 333 ',
' 3 3 '

];`

`game.create.texture('bob', data);`

The above will create a new texture called `bob`, which will look like a little man wearing a hat. You can then use it for sprites the same way you use any other texture: `game.add.sprite(0, 0, 'bob');`

func (*Create) TextureI

func (self *Create) TextureI(args ...interface{}) *Texture

TextureI Generates a new PIXI.Texture from the given data, which can be applied to a Sprite.

This allows you to create game graphics quickly and easily, with no external files but that use actual proper images rather than Phaser.Graphics objects, which are expensive to render and limited in scope.

Each element of the array is a string holding the pixel color values, as mapped to one of the Phaser.Create PALETTE consts.

For example:

`var data = [

' 333 ',
' 777 ',
'E333E',
' 333 ',
' 3 3 '

];`

`game.create.texture('bob', data);`

The above will create a new texture called `bob`, which will look like a little man wearing a hat. You can then use it for sprites the same way you use any other texture: `game.add.sprite(0, 0, 'bob');`

type Creature

type Creature struct {
	*js.Object
}

Creature Creature is a custom Game Object used in conjunction with the Creature Runtime libraries by Kestrel Moon Studios.

It allows you to display animated Game Objects that were created with the [Creature Automated Animation Tool](http://www.kestrelmoon.com/creature/).

Note 1: You can only use Phaser.Creature objects in WebGL enabled games. They do not work in Canvas mode games.

Note 2: You must use a build of Phaser that includes the CreatureMeshBone.js runtime and gl-matrix.js, or have them loaded before your Phaser game boots.

See the Phaser custom build process for more details.

By default the Creature runtimes are NOT included in any pre-configured version of Phaser.

So you'll need to do `grunt custom` to create a build that includes them.

func NewCreature

func NewCreature(game *Game, x int, y int, key interface{}, mesh string) *Creature

NewCreature Creature is a custom Game Object used in conjunction with the Creature Runtime libraries by Kestrel Moon Studios.

It allows you to display animated Game Objects that were created with the [Creature Automated Animation Tool](http://www.kestrelmoon.com/creature/).

Note 1: You can only use Phaser.Creature objects in WebGL enabled games. They do not work in Canvas mode games.

Note 2: You must use a build of Phaser that includes the CreatureMeshBone.js runtime and gl-matrix.js, or have them loaded before your Phaser game boots.

See the Phaser custom build process for more details.

By default the Creature runtimes are NOT included in any pre-configured version of Phaser.

So you'll need to do `grunt custom` to create a build that includes them.

func NewCreature1O

func NewCreature1O(game *Game, x int, y int, key interface{}, mesh string, animation string) *Creature

NewCreature1O Creature is a custom Game Object used in conjunction with the Creature Runtime libraries by Kestrel Moon Studios.

It allows you to display animated Game Objects that were created with the [Creature Automated Animation Tool](http://www.kestrelmoon.com/creature/).

Note 1: You can only use Phaser.Creature objects in WebGL enabled games. They do not work in Canvas mode games.

Note 2: You must use a build of Phaser that includes the CreatureMeshBone.js runtime and gl-matrix.js, or have them loaded before your Phaser game boots.

See the Phaser custom build process for more details.

By default the Creature runtimes are NOT included in any pre-configured version of Phaser.

So you'll need to do `grunt custom` to create a build that includes them.

func NewCreatureI

func NewCreatureI(args ...interface{}) *Creature

NewCreatureI Creature is a custom Game Object used in conjunction with the Creature Runtime libraries by Kestrel Moon Studios.

It allows you to display animated Game Objects that were created with the [Creature Automated Animation Tool](http://www.kestrelmoon.com/creature/).

Note 1: You can only use Phaser.Creature objects in WebGL enabled games. They do not work in Canvas mode games.

Note 2: You must use a build of Phaser that includes the CreatureMeshBone.js runtime and gl-matrix.js, or have them loaded before your Phaser game boots.

See the Phaser custom build process for more details.

By default the Creature runtimes are NOT included in any pre-configured version of Phaser.

So you'll need to do `grunt custom` to create a build that includes them.

func ToCreature

func ToCreature(jsStruct interface{}) *Creature

Creature Binding conversion method to Creature point

func (*Creature) AddChild

func (self *Creature) AddChild(child *DisplayObject) *DisplayObject

AddChild Adds a child to the container.

func (*Creature) AddChildAt

func (self *Creature) AddChildAt(child *DisplayObject, index int) *DisplayObject

AddChildAt Adds a child to the container at a specified index. If the index is out of bounds an error will be thrown

func (*Creature) AddChildAtI

func (self *Creature) AddChildAtI(args ...interface{}) *DisplayObject

AddChildAtI Adds a child to the container at a specified index. If the index is out of bounds an error will be thrown

func (*Creature) AddChildI

func (self *Creature) AddChildI(args ...interface{}) *DisplayObject

AddChildI Adds a child to the container.

func (*Creature) Alive

func (self *Creature) Alive() bool

Alive A useful flag to control if the Game Object is alive or dead.

This is set automatically by the Health components `damage` method should the object run out of health. Or you can toggle it via your game code.

This property is mostly just provided to be used by your game - it doesn't effect rendering or logic updates. However you can use `Group.getFirstAlive` in conjunction with this property for fast object pooling and recycling.

func (*Creature) Angle

func (self *Creature) Angle() int

Angle The angle property is the rotation of the Game Object in *degrees* from its original orientation.

Values from 0 to 180 represent clockwise rotation; values from 0 to -180 represent counterclockwise rotation.

Values outside this range are added to or subtracted from 360 to obtain a value within the range. For example, the statement player.angle = 450 is the same as player.angle = 90.

If you wish to work in radians instead of degrees you can use the property `rotation` instead. Working in radians is slightly faster as it doesn't have to perform any calculations.

func (*Creature) Animation

func (self *Creature) Animation() *CreatureAnimation

Animation The CreatureAnimation instance.

func (*Creature) Animations

func (self *Creature) Animations() *AnimationManager

Animations If the Game Object is enabled for animation (such as a Phaser.Sprite) this is a reference to its AnimationManager instance. Through it you can create, play, pause and stop animations.

func (*Creature) AutoCull

func (self *Creature) AutoCull() bool

AutoCull A Game Object with `autoCull` set to true will check its bounds against the World Camera every frame. If it is not intersecting the Camera bounds at any point then it has its `renderable` property set to `false`. This keeps the Game Object alive and still processing updates, but forces it to skip the render step entirely.

This is a relatively expensive operation, especially if enabled on hundreds of Game Objects. So enable it only if you know it's required, or you have tested performance and find it acceptable.

func (*Creature) BringToTop

func (self *Creature) BringToTop() *DisplayObject

BringToTop Brings this Game Object to the top of its parents display list. Visually this means it will render over the top of any old child in the same Group.

If this Game Object hasn't been added to a custom Group then this method will bring it to the top of the Game World, because the World is the root Group from which all Game Objects descend.

func (*Creature) BringToTopI

func (self *Creature) BringToTopI(args ...interface{}) *DisplayObject

BringToTopI Brings this Game Object to the top of its parents display list. Visually this means it will render over the top of any old child in the same Group.

If this Game Object hasn't been added to a custom Group then this method will bring it to the top of the Game World, because the World is the root Group from which all Game Objects descend.

func (*Creature) CameraOffset

func (self *Creature) CameraOffset() *Point

CameraOffset The x/y coordinate offset applied to the top-left of the camera that this Game Object will be drawn at if `fixedToCamera` is true.

The values are relative to the top-left of the camera view and in addition to any parent of the Game Object on the display list.

func (*Creature) Children

func (self *Creature) Children() []DisplayObject

Children [read-only] The array of children of this container.

func (*Creature) Colors

func (self *Creature) Colors() *Uint16Array

Colors The vertices colors

func (*Creature) Components

func (self *Creature) Components() interface{}

Components The components this Game Object has installed.

func (*Creature) Contains

func (self *Creature) Contains(child *DisplayObject) bool

Contains Determines whether the specified display object is a child of the DisplayObjectContainer instance or the instance itself.

func (*Creature) ContainsI

func (self *Creature) ContainsI(args ...interface{}) bool

ContainsI Determines whether the specified display object is a child of the DisplayObjectContainer instance or the instance itself.

func (*Creature) CreatureBoundsMax

func (self *Creature) CreatureBoundsMax() *Point

CreatureBoundsMax The maximum bounds point.

func (*Creature) CreatureBoundsMin

func (self *Creature) CreatureBoundsMin() *Point

CreatureBoundsMin The minimum bounds point.

func (*Creature) Data

func (self *Creature) Data() interface{}

Data An empty Object that belongs to this Game Object. This value isn't ever used internally by Phaser, but may be used by your own code, or by Phaser Plugins, to store data that needs to be associated with the Game Object, without polluting the Game Object directly.

func (*Creature) Debug

func (self *Creature) Debug() bool

Debug A debug flag designed for use with `Game.enableStep`.

func (*Creature) Destroy

func (self *Creature) Destroy()

Destroy Destroys the Game Object. This removes it from its parent group, destroys the input, event and animation handlers if present and nulls its reference to `game`, freeing it up for garbage collection.

If this Game Object has the Events component it will also dispatch the `onDestroy` event.

You can optionally also destroy the BaseTexture this Game Object is using. Be careful if you've more than one Game Object sharing the same BaseTexture.

func (*Creature) Destroy1O

func (self *Creature) Destroy1O(destroyChildren bool)

Destroy1O Destroys the Game Object. This removes it from its parent group, destroys the input, event and animation handlers if present and nulls its reference to `game`, freeing it up for garbage collection.

If this Game Object has the Events component it will also dispatch the `onDestroy` event.

You can optionally also destroy the BaseTexture this Game Object is using. Be careful if you've more than one Game Object sharing the same BaseTexture.

func (*Creature) Destroy2O

func (self *Creature) Destroy2O(destroyChildren bool, destroyTexture bool)

Destroy2O Destroys the Game Object. This removes it from its parent group, destroys the input, event and animation handlers if present and nulls its reference to `game`, freeing it up for garbage collection.

If this Game Object has the Events component it will also dispatch the `onDestroy` event.

You can optionally also destroy the BaseTexture this Game Object is using. Be careful if you've more than one Game Object sharing the same BaseTexture.

func (*Creature) DestroyI

func (self *Creature) DestroyI(args ...interface{})

DestroyI Destroys the Game Object. This removes it from its parent group, destroys the input, event and animation handlers if present and nulls its reference to `game`, freeing it up for garbage collection.

If this Game Object has the Events component it will also dispatch the `onDestroy` event.

You can optionally also destroy the BaseTexture this Game Object is using. Be careful if you've more than one Game Object sharing the same BaseTexture.

func (*Creature) DestroyPhase

func (self *Creature) DestroyPhase() bool

DestroyPhase As a Game Object runs through its destroy method this flag is set to true, and can be checked in any sub-systems or plugins it is being destroyed from.

func (*Creature) Events

func (self *Creature) Events() *Events

Events All Phaser Game Objects have an Events class which contains all of the events that are dispatched when certain things happen to this Game Object, or any of its components.

func (*Creature) Exists

func (self *Creature) Exists() bool

Exists Controls if this Game Object is processed by the core game loop. If this Game Object has a physics body it also controls if its physics body is updated or not. When `exists` is set to `false` it will remove its physics body from the physics world if it has one. It also toggles the `visible` property to false as well.

Setting `exists` to true will add its physics body back in to the physics world, if it has one. It will also set the `visible` property to `true`.

func (*Creature) FixedToCamera

func (self *Creature) FixedToCamera() bool

FixedToCamera A Game Object that is "fixed" to the camera uses its x/y coordinates as offsets from the top left of the camera during rendering.

The values are adjusted at the rendering stage, overriding the Game Objects actual world position.

The end result is that the Game Object will appear to be 'fixed' to the camera, regardless of where in the game world the camera is viewing. This is useful if for example this Game Object is a UI item that you wish to be visible at all times regardless where in the world the camera is.

The offsets are stored in the `cameraOffset` property.

Note that the `cameraOffset` values are in addition to any parent of this Game Object on the display list.

Be careful not to set `fixedToCamera` on Game Objects which are in Groups that already have `fixedToCamera` enabled on them.

func (*Creature) Fresh

func (self *Creature) Fresh() bool

Fresh A Game Object is considered `fresh` if it has just been created or reset and is yet to receive a renderer transform update. This property is mostly used internally by the physics systems, but is exposed for the use of plugins.

func (*Creature) Game

func (self *Creature) Game() *Game

Game A reference to the currently running Game.

func (*Creature) GetBounds

func (self *Creature) GetBounds() *Rectangle

GetBounds Retrieves the global bounds of the displayObjectContainer as a rectangle. The bounds calculation takes all visible children into consideration.

func (*Creature) GetBounds1O

func (self *Creature) GetBounds1O(targetCoordinateSpace interface{}) *Rectangle

GetBounds1O Retrieves the global bounds of the displayObjectContainer as a rectangle. The bounds calculation takes all visible children into consideration.

func (*Creature) GetBoundsI

func (self *Creature) GetBoundsI(args ...interface{}) *Rectangle

GetBoundsI Retrieves the global bounds of the displayObjectContainer as a rectangle. The bounds calculation takes all visible children into consideration.

func (*Creature) GetChildAt

func (self *Creature) GetChildAt(index int) *DisplayObject

GetChildAt Returns the child at the specified index

func (*Creature) GetChildAtI

func (self *Creature) GetChildAtI(args ...interface{}) *DisplayObject

GetChildAtI Returns the child at the specified index

func (*Creature) GetChildIndex

func (self *Creature) GetChildIndex(child *DisplayObject) int

GetChildIndex Returns the index position of a child DisplayObject instance

func (*Creature) GetChildIndexI

func (self *Creature) GetChildIndexI(args ...interface{}) int

GetChildIndexI Returns the index position of a child DisplayObject instance

func (*Creature) GetLocalBounds

func (self *Creature) GetLocalBounds() *Rectangle

GetLocalBounds Retrieves the non-global local bounds of the displayObjectContainer as a rectangle without any transformations. The calculation takes all visible children into consideration.

func (*Creature) GetLocalBoundsI

func (self *Creature) GetLocalBoundsI(args ...interface{}) *Rectangle

GetLocalBoundsI Retrieves the non-global local bounds of the displayObjectContainer as a rectangle without any transformations. The calculation takes all visible children into consideration.

func (*Creature) Height

func (self *Creature) Height() int

Height The height of the displayObjectContainer, setting this will actually modify the scale to achieve the value set

func (*Creature) IgnoreChildInput

func (self *Creature) IgnoreChildInput() bool

IgnoreChildInput If `ignoreChildInput` is `false` it will allow this objects _children_ to be considered as valid for Input events.

If this property is `true` then the children will _not_ be considered as valid for Input events.

Note that this property isn't recursive: only immediate children are influenced, it doesn't scan further down.

func (*Creature) InCamera

func (self *Creature) InCamera() bool

InCamera Checks if the Game Objects bounds intersect with the Game Camera bounds. Returns `true` if they do, otherwise `false` if fully outside of the Cameras bounds.

func (*Creature) Indices

func (self *Creature) Indices() *Uint16Array

Indices empty description

func (*Creature) IsPlaying

func (self *Creature) IsPlaying() bool

IsPlaying Is the _current_ animation playing?

func (*Creature) Key

func (self *Creature) Key() interface{}

Key The key of the image or texture used by this Game Object during rendering. If it is a string it's the string used to retrieve the texture from the Phaser Image Cache. It can also be an instance of a RenderTexture, BitmapData, Video or PIXI.Texture. If a Game Object is created without a key it is automatically assigned the key `__default` which is a 32x32 transparent PNG stored within the Cache. If a Game Object is given a key which doesn't exist in the Image Cache it is re-assigned the key `__missing` which is a 32x32 PNG of a green box with a line through it.

func (*Creature) Kill

func (self *Creature) Kill() *DisplayObject

Kill Kills a Game Object. A killed Game Object has its `alive`, `exists` and `visible` properties all set to false.

It will dispatch the `onKilled` event. You can listen to `events.onKilled` for the signal.

Note that killing a Game Object is a way for you to quickly recycle it in an object pool, it doesn't destroy the object or free it up from memory.

If you don't need this Game Object any more you should call `destroy` instead.

func (*Creature) KillI

func (self *Creature) KillI(args ...interface{}) *DisplayObject

KillI Kills a Game Object. A killed Game Object has its `alive`, `exists` and `visible` properties all set to false.

It will dispatch the `onKilled` event. You can listen to `events.onKilled` for the signal.

Note that killing a Game Object is a way for you to quickly recycle it in an object pool, it doesn't destroy the object or free it up from memory.

If you don't need this Game Object any more you should call `destroy` instead.

func (*Creature) Lifespan

func (self *Creature) Lifespan() int

Lifespan The lifespan allows you to give a Game Object a lifespan in milliseconds.

Once the Game Object is 'born' you can set this to a positive value.

It is automatically decremented by the millisecond equivalent of `game.time.physicsElapsed` each frame. When it reaches zero it will call the `kill` method.

Very handy for particles, bullets, collectibles, or any other short-lived entity.

func (*Creature) Loop

func (self *Creature) Loop() bool

Loop Should the _current_ animation loop or not?

func (*Creature) Manager

func (self *Creature) Manager() *CreatureManager

Manager The CreatureManager instance for this object.

func (*Creature) MoveDown

func (self *Creature) MoveDown() *DisplayObject

MoveDown Moves this Game Object down one place in its parents display list. This call has no effect if the Game Object is already at the bottom of the display list.

If this Game Object hasn't been added to a custom Group then this method will move it one object down within the Game World, because the World is the root Group from which all Game Objects descend.

func (*Creature) MoveDownI

func (self *Creature) MoveDownI(args ...interface{}) *DisplayObject

MoveDownI Moves this Game Object down one place in its parents display list. This call has no effect if the Game Object is already at the bottom of the display list.

If this Game Object hasn't been added to a custom Group then this method will move it one object down within the Game World, because the World is the root Group from which all Game Objects descend.

func (*Creature) MoveUp

func (self *Creature) MoveUp() *DisplayObject

MoveUp Moves this Game Object up one place in its parents display list. This call has no effect if the Game Object is already at the top of the display list.

If this Game Object hasn't been added to a custom Group then this method will move it one object up within the Game World, because the World is the root Group from which all Game Objects descend.

func (*Creature) MoveUpI

func (self *Creature) MoveUpI(args ...interface{}) *DisplayObject

MoveUpI Moves this Game Object up one place in its parents display list. This call has no effect if the Game Object is already at the top of the display list.

If this Game Object hasn't been added to a custom Group then this method will move it one object up within the Game World, because the World is the root Group from which all Game Objects descend.

func (*Creature) Name

func (self *Creature) Name() string

Name A user defined name given to this Game Object. This value isn't ever used internally by Phaser, it is meant as a game level property.

func (*Creature) PendingDestroy

func (self *Creature) PendingDestroy() bool

PendingDestroy A Game Object is that is pendingDestroy is flagged to have its destroy method called on the next logic update. You can set it directly to allow you to flag an object to be destroyed on its next update.

This is extremely useful if you wish to destroy an object from within one of its own callbacks such as with Buttons or other Input events.

func (*Creature) Play

func (self *Creature) Play()

Play Plays the currently set animation.

func (*Creature) Play1O

func (self *Creature) Play1O(loop bool)

Play1O Plays the currently set animation.

func (*Creature) PlayI

func (self *Creature) PlayI(args ...interface{})

PlayI Plays the currently set animation.

func (*Creature) PostUpdate

func (self *Creature) PostUpdate()

PostUpdate Internal method called by the World postUpdate cycle.

func (*Creature) PostUpdateI

func (self *Creature) PostUpdateI(args ...interface{})

PostUpdateI Internal method called by the World postUpdate cycle.

func (*Creature) PreUpdate

func (self *Creature) PreUpdate()

PreUpdate Automatically called by World.preUpdate.

func (*Creature) PreUpdateI

func (self *Creature) PreUpdateI(args ...interface{})

PreUpdateI Automatically called by World.preUpdate.

func (*Creature) PreviousPosition

func (self *Creature) PreviousPosition() *Point

PreviousPosition The position the Game Object was located in the previous frame.

func (*Creature) PreviousRotation

func (self *Creature) PreviousRotation() int

PreviousRotation The rotation the Game Object was in set to in the previous frame. Value is in radians.

func (*Creature) RemoveChild

func (self *Creature) RemoveChild(child *DisplayObject) *DisplayObject

RemoveChild Removes a child from the container.

func (*Creature) RemoveChildAt

func (self *Creature) RemoveChildAt(index int) *DisplayObject

RemoveChildAt Removes a child from the specified index position.

func (*Creature) RemoveChildAtI

func (self *Creature) RemoveChildAtI(args ...interface{}) *DisplayObject

RemoveChildAtI Removes a child from the specified index position.

func (*Creature) RemoveChildI

func (self *Creature) RemoveChildI(args ...interface{}) *DisplayObject

RemoveChildI Removes a child from the container.

func (*Creature) RemoveChildren

func (self *Creature) RemoveChildren(beginIndex int, endIndex int)

RemoveChildren Removes all children from this container that are within the begin and end indexes.

func (*Creature) RemoveChildrenI

func (self *Creature) RemoveChildrenI(args ...interface{})

RemoveChildrenI Removes all children from this container that are within the begin and end indexes.

func (*Creature) RenderOrderID

func (self *Creature) RenderOrderID() int

RenderOrderID The render order ID is used internally by the renderer and Input Manager and should not be modified. This property is mostly used internally by the renderers, but is exposed for the use of plugins.

func (*Creature) Reset

func (self *Creature) Reset(x int, y int) *DisplayObject

Reset Resets the Game Object.

This moves the Game Object to the given x/y world coordinates and sets `fresh`, `exists`, `visible` and `renderable` to true.

If this Game Object has the LifeSpan component it will also set `alive` to true and `health` to the given value.

If this Game Object has a Physics Body it will reset the Body.

func (*Creature) Reset1O

func (self *Creature) Reset1O(x int, y int, health int) *DisplayObject

Reset1O Resets the Game Object.

This moves the Game Object to the given x/y world coordinates and sets `fresh`, `exists`, `visible` and `renderable` to true.

If this Game Object has the LifeSpan component it will also set `alive` to true and `health` to the given value.

If this Game Object has a Physics Body it will reset the Body.

func (*Creature) ResetI

func (self *Creature) ResetI(args ...interface{}) *DisplayObject

ResetI Resets the Game Object.

This moves the Game Object to the given x/y world coordinates and sets `fresh`, `exists`, `visible` and `renderable` to true.

If this Game Object has the LifeSpan component it will also set `alive` to true and `health` to the given value.

If this Game Object has a Physics Body it will reset the Body.

func (*Creature) Revive

func (self *Creature) Revive() *DisplayObject

Revive Brings a 'dead' Game Object back to life, optionally resetting its health value in the process.

A resurrected Game Object has its `alive`, `exists` and `visible` properties all set to true.

It will dispatch the `onRevived` event. Listen to `events.onRevived` for the signal.

func (*Creature) Revive1O

func (self *Creature) Revive1O(health int) *DisplayObject

Revive1O Brings a 'dead' Game Object back to life, optionally resetting its health value in the process.

A resurrected Game Object has its `alive`, `exists` and `visible` properties all set to true.

It will dispatch the `onRevived` event. Listen to `events.onRevived` for the signal.

func (*Creature) ReviveI

func (self *Creature) ReviveI(args ...interface{}) *DisplayObject

ReviveI Brings a 'dead' Game Object back to life, optionally resetting its health value in the process.

A resurrected Game Object has its `alive`, `exists` and `visible` properties all set to true.

It will dispatch the `onRevived` event. Listen to `events.onRevived` for the signal.

func (*Creature) SendToBack

func (self *Creature) SendToBack() *DisplayObject

SendToBack Sends this Game Object to the bottom of its parents display list. Visually this means it will render below all other children in the same Group.

If this Game Object hasn't been added to a custom Group then this method will send it to the bottom of the Game World, because the World is the root Group from which all Game Objects descend.

func (*Creature) SendToBackI

func (self *Creature) SendToBackI(args ...interface{}) *DisplayObject

SendToBackI Sends this Game Object to the bottom of its parents display list. Visually this means it will render below all other children in the same Group.

If this Game Object hasn't been added to a custom Group then this method will send it to the bottom of the Game World, because the World is the root Group from which all Game Objects descend.

func (*Creature) SetAliveA

func (self *Creature) SetAliveA(member bool)

SetAliveA A useful flag to control if the Game Object is alive or dead.

This is set automatically by the Health components `damage` method should the object run out of health. Or you can toggle it via your game code.

This property is mostly just provided to be used by your game - it doesn't effect rendering or logic updates. However you can use `Group.getFirstAlive` in conjunction with this property for fast object pooling and recycling.

func (*Creature) SetAngleA

func (self *Creature) SetAngleA(member int)

SetAngleA The angle property is the rotation of the Game Object in *degrees* from its original orientation.

Values from 0 to 180 represent clockwise rotation; values from 0 to -180 represent counterclockwise rotation.

Values outside this range are added to or subtracted from 360 to obtain a value within the range. For example, the statement player.angle = 450 is the same as player.angle = 90.

If you wish to work in radians instead of degrees you can use the property `rotation` instead. Working in radians is slightly faster as it doesn't have to perform any calculations.

func (*Creature) SetAnimation

func (self *Creature) SetAnimation(key string)

SetAnimation Sets the Animation this Creature object will play, as defined in the mesh data.

func (*Creature) SetAnimationA

func (self *Creature) SetAnimationA(member *CreatureAnimation)

SetAnimationA The CreatureAnimation instance.

func (*Creature) SetAnimationI

func (self *Creature) SetAnimationI(args ...interface{})

SetAnimationI Sets the Animation this Creature object will play, as defined in the mesh data.

func (*Creature) SetAnimationsA

func (self *Creature) SetAnimationsA(member *AnimationManager)

SetAnimationsA If the Game Object is enabled for animation (such as a Phaser.Sprite) this is a reference to its AnimationManager instance. Through it you can create, play, pause and stop animations.

func (*Creature) SetAutoCullA

func (self *Creature) SetAutoCullA(member bool)

SetAutoCullA A Game Object with `autoCull` set to true will check its bounds against the World Camera every frame. If it is not intersecting the Camera bounds at any point then it has its `renderable` property set to `false`. This keeps the Game Object alive and still processing updates, but forces it to skip the render step entirely.

This is a relatively expensive operation, especially if enabled on hundreds of Game Objects. So enable it only if you know it's required, or you have tested performance and find it acceptable.

func (*Creature) SetCameraOffsetA

func (self *Creature) SetCameraOffsetA(member *Point)

SetCameraOffsetA The x/y coordinate offset applied to the top-left of the camera that this Game Object will be drawn at if `fixedToCamera` is true.

The values are relative to the top-left of the camera view and in addition to any parent of the Game Object on the display list.

func (*Creature) SetChildIndex

func (self *Creature) SetChildIndex(child *DisplayObject, index int)

SetChildIndex Changes the position of an existing child in the display object container

func (*Creature) SetChildIndexI

func (self *Creature) SetChildIndexI(args ...interface{})

SetChildIndexI Changes the position of an existing child in the display object container

func (*Creature) SetChildrenA

func (self *Creature) SetChildrenA(member []DisplayObject)

SetChildrenA [read-only] The array of children of this container.

func (*Creature) SetColorsA

func (self *Creature) SetColorsA(member *Uint16Array)

SetColorsA The vertices colors

func (*Creature) SetComponentsA

func (self *Creature) SetComponentsA(member interface{})

SetComponentsA The components this Game Object has installed.

func (*Creature) SetCreatureBoundsMaxA

func (self *Creature) SetCreatureBoundsMaxA(member *Point)

SetCreatureBoundsMaxA The maximum bounds point.

func (*Creature) SetCreatureBoundsMinA

func (self *Creature) SetCreatureBoundsMinA(member *Point)

SetCreatureBoundsMinA The minimum bounds point.

func (*Creature) SetDataA

func (self *Creature) SetDataA(member interface{})

SetDataA An empty Object that belongs to this Game Object. This value isn't ever used internally by Phaser, but may be used by your own code, or by Phaser Plugins, to store data that needs to be associated with the Game Object, without polluting the Game Object directly.

func (*Creature) SetDebugA

func (self *Creature) SetDebugA(member bool)

SetDebugA A debug flag designed for use with `Game.enableStep`.

func (*Creature) SetDestroyPhaseA

func (self *Creature) SetDestroyPhaseA(member bool)

SetDestroyPhaseA As a Game Object runs through its destroy method this flag is set to true, and can be checked in any sub-systems or plugins it is being destroyed from.

func (*Creature) SetEventsA

func (self *Creature) SetEventsA(member *Events)

SetEventsA All Phaser Game Objects have an Events class which contains all of the events that are dispatched when certain things happen to this Game Object, or any of its components.

func (*Creature) SetExistsA

func (self *Creature) SetExistsA(member bool)

SetExistsA Controls if this Game Object is processed by the core game loop. If this Game Object has a physics body it also controls if its physics body is updated or not. When `exists` is set to `false` it will remove its physics body from the physics world if it has one. It also toggles the `visible` property to false as well.

Setting `exists` to true will add its physics body back in to the physics world, if it has one. It will also set the `visible` property to `true`.

func (*Creature) SetFixedToCameraA

func (self *Creature) SetFixedToCameraA(member bool)

SetFixedToCameraA A Game Object that is "fixed" to the camera uses its x/y coordinates as offsets from the top left of the camera during rendering.

The values are adjusted at the rendering stage, overriding the Game Objects actual world position.

The end result is that the Game Object will appear to be 'fixed' to the camera, regardless of where in the game world the camera is viewing. This is useful if for example this Game Object is a UI item that you wish to be visible at all times regardless where in the world the camera is.

The offsets are stored in the `cameraOffset` property.

Note that the `cameraOffset` values are in addition to any parent of this Game Object on the display list.

Be careful not to set `fixedToCamera` on Game Objects which are in Groups that already have `fixedToCamera` enabled on them.

func (*Creature) SetFreshA

func (self *Creature) SetFreshA(member bool)

SetFreshA A Game Object is considered `fresh` if it has just been created or reset and is yet to receive a renderer transform update. This property is mostly used internally by the physics systems, but is exposed for the use of plugins.

func (*Creature) SetGameA

func (self *Creature) SetGameA(member *Game)

SetGameA A reference to the currently running Game.

func (*Creature) SetHeightA

func (self *Creature) SetHeightA(member int)

SetHeightA The height of the displayObjectContainer, setting this will actually modify the scale to achieve the value set

func (*Creature) SetIgnoreChildInputA

func (self *Creature) SetIgnoreChildInputA(member bool)

SetIgnoreChildInputA If `ignoreChildInput` is `false` it will allow this objects _children_ to be considered as valid for Input events.

If this property is `true` then the children will _not_ be considered as valid for Input events.

Note that this property isn't recursive: only immediate children are influenced, it doesn't scan further down.

func (*Creature) SetInCameraA

func (self *Creature) SetInCameraA(member bool)

SetInCameraA Checks if the Game Objects bounds intersect with the Game Camera bounds. Returns `true` if they do, otherwise `false` if fully outside of the Cameras bounds.

func (*Creature) SetIndicesA

func (self *Creature) SetIndicesA(member *Uint16Array)

SetIndicesA empty description

func (*Creature) SetIsPlayingA

func (self *Creature) SetIsPlayingA(member bool)

SetIsPlayingA Is the _current_ animation playing?

func (*Creature) SetKeyA

func (self *Creature) SetKeyA(member interface{})

SetKeyA The key of the image or texture used by this Game Object during rendering. If it is a string it's the string used to retrieve the texture from the Phaser Image Cache. It can also be an instance of a RenderTexture, BitmapData, Video or PIXI.Texture. If a Game Object is created without a key it is automatically assigned the key `__default` which is a 32x32 transparent PNG stored within the Cache. If a Game Object is given a key which doesn't exist in the Image Cache it is re-assigned the key `__missing` which is a 32x32 PNG of a green box with a line through it.

func (*Creature) SetLifespanA

func (self *Creature) SetLifespanA(member int)

SetLifespanA The lifespan allows you to give a Game Object a lifespan in milliseconds.

Once the Game Object is 'born' you can set this to a positive value.

It is automatically decremented by the millisecond equivalent of `game.time.physicsElapsed` each frame. When it reaches zero it will call the `kill` method.

Very handy for particles, bullets, collectibles, or any other short-lived entity.

func (*Creature) SetLoopA

func (self *Creature) SetLoopA(member bool)

SetLoopA Should the _current_ animation loop or not?

func (*Creature) SetManagerA

func (self *Creature) SetManagerA(member *CreatureManager)

SetManagerA The CreatureManager instance for this object.

func (*Creature) SetNameA

func (self *Creature) SetNameA(member string)

SetNameA A user defined name given to this Game Object. This value isn't ever used internally by Phaser, it is meant as a game level property.

func (*Creature) SetPendingDestroyA

func (self *Creature) SetPendingDestroyA(member bool)

SetPendingDestroyA A Game Object is that is pendingDestroy is flagged to have its destroy method called on the next logic update. You can set it directly to allow you to flag an object to be destroyed on its next update.

This is extremely useful if you wish to destroy an object from within one of its own callbacks such as with Buttons or other Input events.

func (*Creature) SetPreviousPositionA

func (self *Creature) SetPreviousPositionA(member *Point)

SetPreviousPositionA The position the Game Object was located in the previous frame.

func (*Creature) SetPreviousRotationA

func (self *Creature) SetPreviousRotationA(member int)

SetPreviousRotationA The rotation the Game Object was in set to in the previous frame. Value is in radians.

func (*Creature) SetRenderOrderIDA

func (self *Creature) SetRenderOrderIDA(member int)

SetRenderOrderIDA The render order ID is used internally by the renderer and Input Manager and should not be modified. This property is mostly used internally by the renderers, but is exposed for the use of plugins.

func (*Creature) SetTextureA

func (self *Creature) SetTextureA(member *Texture)

SetTextureA The texture the animation is using.

func (*Creature) SetTimeDeltaA

func (self *Creature) SetTimeDeltaA(member int)

SetTimeDeltaA How quickly the animation advances.

func (*Creature) SetTypeA

func (self *Creature) SetTypeA(member int)

SetTypeA The const type of this object.

func (*Creature) SetUvsA

func (self *Creature) SetUvsA(member *Float32Array)

SetUvsA The UV data.

func (*Creature) SetVerticesA

func (self *Creature) SetVerticesA(member *Float32Array)

SetVerticesA The vertices data.

func (*Creature) SetWidthA

func (self *Creature) SetWidthA(member int)

SetWidthA The width of the displayObjectContainer, setting this will actually modify the scale to achieve the value set

func (*Creature) SetWorldA

func (self *Creature) SetWorldA(member *Point)

SetWorldA The world coordinates of this Game Object in pixels. Depending on where in the display list this Game Object is placed this value can differ from `position`, which contains the x/y coordinates relative to the Game Objects parent.

func (*Creature) SetZA

func (self *Creature) SetZA(member int)

SetZA The z depth of this Game Object within its parent Group. No two objects in a Group can have the same z value. This value is adjusted automatically whenever the Group hierarchy changes. If you wish to re-order the layering of a Game Object then see methods like Group.moveUp or Group.bringToTop.

func (*Creature) Stop

func (self *Creature) Stop()

Stop Stops the currently playing animation.

func (*Creature) StopI

func (self *Creature) StopI(args ...interface{})

StopI Stops the currently playing animation.

func (*Creature) SwapChildren

func (self *Creature) SwapChildren(child *DisplayObject, child2 *DisplayObject)

SwapChildren Swaps the position of 2 Display Objects within this container.

func (*Creature) SwapChildrenI

func (self *Creature) SwapChildrenI(args ...interface{})

SwapChildrenI Swaps the position of 2 Display Objects within this container.

func (*Creature) Texture

func (self *Creature) Texture() *Texture

Texture The texture the animation is using.

func (*Creature) TimeDelta

func (self *Creature) TimeDelta() int

TimeDelta How quickly the animation advances.

func (*Creature) Type

func (self *Creature) Type() int

Type The const type of this object.

func (*Creature) Update

func (self *Creature) Update()

Update Override this method in your own custom objects to handle any update requirements. It is called immediately after `preUpdate` and before `postUpdate`. Remember if this Game Object has any children you should call update on those too.

func (*Creature) UpdateCreatureBounds

func (self *Creature) UpdateCreatureBounds()

UpdateCreatureBounds empty description

func (*Creature) UpdateCreatureBoundsI

func (self *Creature) UpdateCreatureBoundsI(args ...interface{})

UpdateCreatureBoundsI empty description

func (*Creature) UpdateData

func (self *Creature) UpdateData()

UpdateData empty description

func (*Creature) UpdateDataI

func (self *Creature) UpdateDataI(args ...interface{})

UpdateDataI empty description

func (*Creature) UpdateI

func (self *Creature) UpdateI(args ...interface{})

UpdateI Override this method in your own custom objects to handle any update requirements. It is called immediately after `preUpdate` and before `postUpdate`. Remember if this Game Object has any children you should call update on those too.

func (*Creature) UpdateRenderData

func (self *Creature) UpdateRenderData()

UpdateRenderData empty description

func (*Creature) UpdateRenderDataI

func (self *Creature) UpdateRenderDataI(args ...interface{})

UpdateRenderDataI empty description

func (*Creature) Uvs

func (self *Creature) Uvs() *Float32Array

Uvs The UV data.

func (*Creature) Vertices

func (self *Creature) Vertices() *Float32Array

Vertices The vertices data.

func (*Creature) Width

func (self *Creature) Width() int

Width The width of the displayObjectContainer, setting this will actually modify the scale to achieve the value set

func (*Creature) World

func (self *Creature) World() *Point

World The world coordinates of this Game Object in pixels. Depending on where in the display list this Game Object is placed this value can differ from `position`, which contains the x/y coordinates relative to the Game Objects parent.

func (*Creature) Z

func (self *Creature) Z() int

Z The z depth of this Game Object within its parent Group. No two objects in a Group can have the same z value. This value is adjusted automatically whenever the Group hierarchy changes. If you wish to re-order the layering of a Game Object then see methods like Group.moveUp or Group.bringToTop.

type CreatureAnimation

type CreatureAnimation struct{ *js.Object }

type CreatureManager

type CreatureManager struct{ *js.Object }

type CustomState

type CustomState struct {
	*js.Object
	State interface{}
}

func WrapState

func WrapState(state interface{}) *CustomState

type DOM

type DOM struct {
	*js.Object
}

DOM DOM utility class.

Provides a useful Window and Element functions as well as cross-browser compatibility buffer.

Some code originally derived from {@link https://github.com/ryanve/verge verge}. Some parts were inspired by the research of Ryan Van Etten, released under MIT License 2013.

func NewDOM

func NewDOM() *DOM

NewDOM DOM utility class.

Provides a useful Window and Element functions as well as cross-browser compatibility buffer.

Some code originally derived from {@link https://github.com/ryanve/verge verge}. Some parts were inspired by the research of Ryan Van Etten, released under MIT License 2013.

func NewDOMI

func NewDOMI(args ...interface{}) *DOM

NewDOMI DOM utility class.

Provides a useful Window and Element functions as well as cross-browser compatibility buffer.

Some code originally derived from {@link https://github.com/ryanve/verge verge}. Some parts were inspired by the research of Ryan Van Etten, released under MIT License 2013.

func ToDOM

func ToDOM(jsStruct interface{}) *DOM

DOM Binding conversion method to DOM point

func (*DOM) Calibrate

func (self *DOM) Calibrate(coords interface{}) interface{}

Calibrate Calibrates element coordinates for `inLayoutViewport` checks.

func (*DOM) Calibrate1O

func (self *DOM) Calibrate1O(coords interface{}, cushion int) interface{}

Calibrate1O Calibrates element coordinates for `inLayoutViewport` checks.

func (*DOM) CalibrateI

func (self *DOM) CalibrateI(args ...interface{}) interface{}

CalibrateI Calibrates element coordinates for `inLayoutViewport` checks.

func (*DOM) DocumentBounds

func (self *DOM) DocumentBounds() *Rectangle

DocumentBounds The size of the document / Layout viewport.

This incorrectly reports the dimensions in IE.

The properties change dynamically.

func (*DOM) GetAspectRatio

func (self *DOM) GetAspectRatio() int

GetAspectRatio Get the Visual viewport aspect ratio (or the aspect ratio of an object or element)

func (*DOM) GetAspectRatio1O

func (self *DOM) GetAspectRatio1O(object interface{}) int

GetAspectRatio1O Get the Visual viewport aspect ratio (or the aspect ratio of an object or element)

func (*DOM) GetAspectRatioI

func (self *DOM) GetAspectRatioI(args ...interface{}) int

GetAspectRatioI Get the Visual viewport aspect ratio (or the aspect ratio of an object or element)

func (*DOM) GetBounds

func (self *DOM) GetBounds(element interface{}) interface{}

GetBounds A cross-browser element.getBoundingClientRect method with optional cushion.

Returns a plain object containing the properties `top/bottom/left/right/width/height` with respect to the top-left corner of the current viewport. Its properties match the native rectangle. The cushion parameter is an amount of pixels (+/-) to cushion the element. It adjusts the measurements such that it is possible to detect when an element is near the viewport.

func (*DOM) GetBounds1O

func (self *DOM) GetBounds1O(element interface{}, cushion int) interface{}

GetBounds1O A cross-browser element.getBoundingClientRect method with optional cushion.

Returns a plain object containing the properties `top/bottom/left/right/width/height` with respect to the top-left corner of the current viewport. Its properties match the native rectangle. The cushion parameter is an amount of pixels (+/-) to cushion the element. It adjusts the measurements such that it is possible to detect when an element is near the viewport.

func (*DOM) GetBoundsI

func (self *DOM) GetBoundsI(args ...interface{}) interface{}

GetBoundsI A cross-browser element.getBoundingClientRect method with optional cushion.

Returns a plain object containing the properties `top/bottom/left/right/width/height` with respect to the top-left corner of the current viewport. Its properties match the native rectangle. The cushion parameter is an amount of pixels (+/-) to cushion the element. It adjusts the measurements such that it is possible to detect when an element is near the viewport.

func (*DOM) GetOffset

func (self *DOM) GetOffset(element *DOMElement) *Point

GetOffset Get the [absolute] position of the element relative to the Document.

The value may vary slightly as the page is scrolled due to rounding errors.

func (*DOM) GetOffset1O

func (self *DOM) GetOffset1O(element *DOMElement, point *Point) *Point

GetOffset1O Get the [absolute] position of the element relative to the Document.

The value may vary slightly as the page is scrolled due to rounding errors.

func (*DOM) GetOffsetI

func (self *DOM) GetOffsetI(args ...interface{}) *Point

GetOffsetI Get the [absolute] position of the element relative to the Document.

The value may vary slightly as the page is scrolled due to rounding errors.

func (*DOM) GetScreenOrientation

func (self *DOM) GetScreenOrientation()

GetScreenOrientation Returns the device screen orientation.

Orientation values: 'portrait-primary', 'landscape-primary', 'portrait-secondary', 'landscape-secondary'.

Order of resolving: - Screen Orientation API, or variation of - Future track. Most desktop and mobile browsers. - Screen size ratio check - If fallback is 'screen', suited for desktops. - Viewport size ratio check - If fallback is 'viewport', suited for mobile. - window.orientation - If fallback is 'window.orientation', works iOS and probably most Android; non-recommended track. - Media query - Viewport size ratio check (probably only IE9 and legacy mobile gets here..)

See - https://w3c.github.io/screen-orientation/ (conflicts with mozOrientation/msOrientation) - https://developer.mozilla.org/en-US/docs/Web/API/Screen.orientation (mozOrientation) - http://msdn.microsoft.com/en-us/library/ie/dn342934(v=vs.85).aspx - https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Testing_media_queries - http://stackoverflow.com/questions/4917664/detect-viewport-orientation - http://www.matthewgifford.com/blog/2011/12/22/a-misconception-about-window-orientation

func (*DOM) GetScreenOrientation1O

func (self *DOM) GetScreenOrientation1O(primaryFallback string)

GetScreenOrientation1O Returns the device screen orientation.

Orientation values: 'portrait-primary', 'landscape-primary', 'portrait-secondary', 'landscape-secondary'.

Order of resolving: - Screen Orientation API, or variation of - Future track. Most desktop and mobile browsers. - Screen size ratio check - If fallback is 'screen', suited for desktops. - Viewport size ratio check - If fallback is 'viewport', suited for mobile. - window.orientation - If fallback is 'window.orientation', works iOS and probably most Android; non-recommended track. - Media query - Viewport size ratio check (probably only IE9 and legacy mobile gets here..)

See - https://w3c.github.io/screen-orientation/ (conflicts with mozOrientation/msOrientation) - https://developer.mozilla.org/en-US/docs/Web/API/Screen.orientation (mozOrientation) - http://msdn.microsoft.com/en-us/library/ie/dn342934(v=vs.85).aspx - https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Testing_media_queries - http://stackoverflow.com/questions/4917664/detect-viewport-orientation - http://www.matthewgifford.com/blog/2011/12/22/a-misconception-about-window-orientation

func (*DOM) GetScreenOrientationI

func (self *DOM) GetScreenOrientationI(args ...interface{})

GetScreenOrientationI Returns the device screen orientation.

Orientation values: 'portrait-primary', 'landscape-primary', 'portrait-secondary', 'landscape-secondary'.

Order of resolving: - Screen Orientation API, or variation of - Future track. Most desktop and mobile browsers. - Screen size ratio check - If fallback is 'screen', suited for desktops. - Viewport size ratio check - If fallback is 'viewport', suited for mobile. - window.orientation - If fallback is 'window.orientation', works iOS and probably most Android; non-recommended track. - Media query - Viewport size ratio check (probably only IE9 and legacy mobile gets here..)

See - https://w3c.github.io/screen-orientation/ (conflicts with mozOrientation/msOrientation) - https://developer.mozilla.org/en-US/docs/Web/API/Screen.orientation (mozOrientation) - http://msdn.microsoft.com/en-us/library/ie/dn342934(v=vs.85).aspx - https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Testing_media_queries - http://stackoverflow.com/questions/4917664/detect-viewport-orientation - http://www.matthewgifford.com/blog/2011/12/22/a-misconception-about-window-orientation

func (*DOM) InLayoutViewport

func (self *DOM) InLayoutViewport(element interface{}) bool

InLayoutViewport Tests if the given DOM element is within the Layout viewport.

The optional cushion parameter allows you to specify a distance.

inLayoutViewport(element, 100) is `true` if the element is in the viewport or 100px near it. inLayoutViewport(element, -100) is `true` if the element is in the viewport or at least 100px near it.

func (*DOM) InLayoutViewport1O

func (self *DOM) InLayoutViewport1O(element interface{}, cushion int) bool

InLayoutViewport1O Tests if the given DOM element is within the Layout viewport.

The optional cushion parameter allows you to specify a distance.

inLayoutViewport(element, 100) is `true` if the element is in the viewport or 100px near it. inLayoutViewport(element, -100) is `true` if the element is in the viewport or at least 100px near it.

func (*DOM) InLayoutViewportI

func (self *DOM) InLayoutViewportI(args ...interface{}) bool

InLayoutViewportI Tests if the given DOM element is within the Layout viewport.

The optional cushion parameter allows you to specify a distance.

inLayoutViewport(element, 100) is `true` if the element is in the viewport or 100px near it. inLayoutViewport(element, -100) is `true` if the element is in the viewport or at least 100px near it.

func (*DOM) LayoutBounds

func (self *DOM) LayoutBounds() *Rectangle

LayoutBounds The bounds of the Layout viewport, as discussed in {@link http://www.quirksmode.org/mobile/viewports2.html A tale of two viewports — part two}; but honoring the constraints as specified applicable viewport meta-tag.

The bounds returned are not guaranteed to be fully aligned with CSS media queries (see {@link http://www.matanich.com/2013/01/07/viewport-size/ What size is my viewport?}).

This is _not_ representative of the Visual bounds: in particular the non-primary axis will generally be significantly larger than the screen height on mobile devices when running with a constrained viewport.

The properties change dynamically.

func (*DOM) ScrollX

func (self *DOM) ScrollX() int

ScrollX A cross-browser window.scrollX.

func (*DOM) ScrollY

func (self *DOM) ScrollY() int

ScrollY A cross-browser window.scrollY.

func (*DOM) SetDocumentBoundsA

func (self *DOM) SetDocumentBoundsA(member *Rectangle)

SetDocumentBoundsA The size of the document / Layout viewport.

This incorrectly reports the dimensions in IE.

The properties change dynamically.

func (*DOM) SetLayoutBoundsA

func (self *DOM) SetLayoutBoundsA(member *Rectangle)

SetLayoutBoundsA The bounds of the Layout viewport, as discussed in {@link http://www.quirksmode.org/mobile/viewports2.html A tale of two viewports — part two}; but honoring the constraints as specified applicable viewport meta-tag.

The bounds returned are not guaranteed to be fully aligned with CSS media queries (see {@link http://www.matanich.com/2013/01/07/viewport-size/ What size is my viewport?}).

This is _not_ representative of the Visual bounds: in particular the non-primary axis will generally be significantly larger than the screen height on mobile devices when running with a constrained viewport.

The properties change dynamically.

func (*DOM) SetScrollXA

func (self *DOM) SetScrollXA(member int)

SetScrollXA A cross-browser window.scrollX.

func (*DOM) SetScrollYA

func (self *DOM) SetScrollYA(member int)

SetScrollYA A cross-browser window.scrollY.

func (*DOM) SetVisualBoundsA

func (self *DOM) SetVisualBoundsA(member *Rectangle)

SetVisualBoundsA The bounds of the Visual viewport, as discussed in {@link http://www.quirksmode.org/mobile/viewports.html A tale of two viewports — part one} with one difference: the viewport size _excludes_ scrollbars, as found on some desktop browsers.

Supported mobile:

iOS/Safari, Android 4, IE10, Firefox OS (maybe not Firefox Android), Opera Mobile 16

The properties change dynamically.

func (*DOM) VisualBounds

func (self *DOM) VisualBounds() *Rectangle

VisualBounds The bounds of the Visual viewport, as discussed in {@link http://www.quirksmode.org/mobile/viewports.html A tale of two viewports — part one} with one difference: the viewport size _excludes_ scrollbars, as found on some desktop browsers.

Supported mobile:

iOS/Safari, Android 4, IE10, Firefox OS (maybe not Firefox Android), Opera Mobile 16

The properties change dynamically.

type DOMElement

type DOMElement dom.Element

func WrapDOMElement

func WrapDOMElement(o *js.Object) DOMElement

type Device

type Device struct {
	*js.Object
}

Device Detects device support capabilities and is responsible for device initialization - see {@link Phaser.Device.whenReady whenReady}.

This class represents a singleton object that can be accessed directly as `game.device` (or, as a fallback, `Phaser.Device` when a game instance is not available) without the need to instantiate it.

Unless otherwise noted the device capabilities are only guaranteed after initialization. Initialization occurs automatically and is guaranteed complete before {@link Phaser.Game} begins its "boot" phase. Feature detection can be modified in the {@link Phaser.Device.onInitialized onInitialized} signal.

When checking features using the exposed properties only the *truth-iness* of the value should be relied upon unless the documentation states otherwise: properties may return `false`, `”`, `null`, or even `undefined` when indicating the lack of a feature.

Uses elements from System.js by MrDoob and Modernizr

func NewDevice

func NewDevice() *Device

NewDevice It is not possible to instantiate the Device class manually.

func NewDeviceI

func NewDeviceI(args ...interface{}) *Device

NewDeviceI It is not possible to instantiate the Device class manually.

func ToDevice

func ToDevice(jsStruct interface{}) *Device

Device Binding conversion method to Device point

func (*Device) Android

func (self *Device) Android() bool

Android Is running on android?

func (*Device) Arora

func (self *Device) Arora() bool

Arora Set to true if running in Arora.

func (*Device) AudioData

func (self *Device) AudioData() bool

AudioData Are Audio tags available?

func (*Device) CanPlayAudio

func (self *Device) CanPlayAudio(type_ string) bool

CanPlayAudio Check whether the host environment can play audio.

func (*Device) CanPlayAudioI

func (self *Device) CanPlayAudioI(args ...interface{}) bool

CanPlayAudioI Check whether the host environment can play audio.

func (*Device) CanPlayVideo

func (self *Device) CanPlayVideo(type_ string) bool

CanPlayVideo Check whether the host environment can play video files.

func (*Device) CanPlayVideoI

func (self *Device) CanPlayVideoI(args ...interface{}) bool

CanPlayVideoI Check whether the host environment can play video files.

func (*Device) CancelFullscreen

func (self *Device) CancelFullscreen() string

CancelFullscreen If the browser supports the Full Screen API this holds the call you need to use to cancel it.

func (*Device) Canvas

func (self *Device) Canvas() bool

Canvas Is canvas available?

func (*Device) CanvasBitBltShift

func (self *Device) CanvasBitBltShift() bool

CanvasBitBltShift True if canvas supports a 'copy' bitblt onto itself when the source and destination regions overlap.

func (*Device) Chrome

func (self *Device) Chrome() bool

Chrome Set to true if running in Chrome.

func (*Device) ChromeOS

func (self *Device) ChromeOS() bool

ChromeOS Is running on chromeOS?

func (*Device) ChromeVersion

func (self *Device) ChromeVersion() int

ChromeVersion If running in Chrome this will contain the major version number.

func (*Device) CocoonJS

func (self *Device) CocoonJS() bool

CocoonJS Is the game running under CocoonJS?

func (*Device) CocoonJSApp

func (self *Device) CocoonJSApp() bool

CocoonJSApp Is this game running with CocoonJS.App?

func (*Device) Cordova

func (self *Device) Cordova() bool

Cordova Is the game running under Apache Cordova?

func (*Device) Crosswalk

func (self *Device) Crosswalk() bool

Crosswalk Is the game running under the Intel Crosswalk XDK?

func (*Device) Css3D

func (self *Device) Css3D() bool

Css3D Is css3D available?

func (*Device) Desktop

func (self *Device) Desktop() bool

Desktop Is running on a desktop?

func (*Device) DeviceReadyAt

func (self *Device) DeviceReadyAt() int

DeviceReadyAt The time the device became ready.

func (*Device) Dolby

func (self *Device) Dolby() bool

Dolby Can this device play EC-3 Dolby Digital Plus files?

func (*Device) Edge

func (self *Device) Edge() bool

Edge Set to true if running in Microsoft Edge browser.

func (*Device) Ejecta

func (self *Device) Ejecta() bool

Ejecta Is the game running under Ejecta?

func (*Device) Electron

func (self *Device) Electron() bool

Electron Is the game running under GitHub Electron?

func (*Device) Epiphany

func (self *Device) Epiphany() bool

Epiphany Set to true if running in Epiphany.

func (*Device) File

func (self *Device) File() bool

File Is file available?

func (*Device) FileSystem

func (self *Device) FileSystem() bool

FileSystem Is fileSystem available?

func (*Device) Firefox

func (self *Device) Firefox() bool

Firefox Set to true if running in Firefox.

func (*Device) FirefoxVersion

func (self *Device) FirefoxVersion() int

FirefoxVersion If running in Firefox this will contain the major version number.

func (*Device) Fullscreen

func (self *Device) Fullscreen() bool

Fullscreen Does the browser support the Full Screen API?

func (*Device) FullscreenKeyboard

func (self *Device) FullscreenKeyboard() bool

FullscreenKeyboard Does the browser support access to the Keyboard during Full Screen mode?

func (*Device) GetUserMedia

func (self *Device) GetUserMedia() bool

GetUserMedia Does the device support the getUserMedia API?

func (*Device) H264Video

func (self *Device) H264Video() bool

H264Video Can this device play h264 mp4 video files?

func (*Device) HlsVideo

func (self *Device) HlsVideo() bool

HlsVideo Can this device play hls video files?

func (*Device) IOS

func (self *Device) IOS() bool

IOS Is running on iOS?

func (*Device) IOSVersion

func (self *Device) IOSVersion() int

IOSVersion If running in iOS this will contain the major version number.

func (*Device) IPad

func (self *Device) IPad() bool

IPad Is running on iPad?

func (*Device) IPhone

func (self *Device) IPhone() bool

IPhone Is running on iPhone?

func (*Device) IPhone4

func (self *Device) IPhone4() bool

IPhone4 Is running on iPhone4?

func (*Device) Ie

func (self *Device) Ie() bool

Ie Set to true if running in Internet Explorer.

func (*Device) IeVersion

func (self *Device) IeVersion() int

IeVersion If running in Internet Explorer this will contain the major version number. Beyond IE10 you should use Device.trident and Device.tridentVersion.

func (*Device) Initialized

func (self *Device) Initialized() bool

Initialized The time as which initialization has completed.

func (*Device) IsAndroidStockBrowser

func (self *Device) IsAndroidStockBrowser()

IsAndroidStockBrowser Detect if the host is a an Android Stock browser. This is available before the device "ready" event.

Authors might want to scale down on effects and switch to the CANVAS rendering method on those devices.

func (*Device) IsAndroidStockBrowserI

func (self *Device) IsAndroidStockBrowserI(args ...interface{})

IsAndroidStockBrowserI Detect if the host is a an Android Stock browser. This is available before the device "ready" event.

Authors might want to scale down on effects and switch to the CANVAS rendering method on those devices.

func (*Device) IsConsoleOpen

func (self *Device) IsConsoleOpen()

IsConsoleOpen Check whether the console is open. Note that this only works in Firefox with Firebug and earlier versions of Chrome. It used to work in Chrome, but then they removed the ability: {@link http://src.chromium.org/viewvc/blink?view=revision&revision=151136}

func (*Device) IsConsoleOpenI

func (self *Device) IsConsoleOpenI(args ...interface{})

IsConsoleOpenI Check whether the console is open. Note that this only works in Firefox with Firebug and earlier versions of Chrome. It used to work in Chrome, but then they removed the ability: {@link http://src.chromium.org/viewvc/blink?view=revision&revision=151136}

func (*Device) LITTLE_ENDIAN

func (self *Device) LITTLE_ENDIAN() bool

LITTLE_ENDIAN Same value as `littleEndian`.

func (*Device) Linux

func (self *Device) Linux() bool

Linux Is running on linux?

func (*Device) LittleEndian

func (self *Device) LittleEndian() bool

LittleEndian Is the device big or little endian? (only detected if the browser supports TypedArrays)

func (*Device) LocalStorage

func (self *Device) LocalStorage() bool

LocalStorage Is localStorage available?

func (*Device) M4a

func (self *Device) M4a() bool

M4a Can this device play m4a files? True if this device can play m4a files.

func (*Device) MacOS

func (self *Device) MacOS() bool

MacOS Is running on macOS?

func (*Device) Midori

func (self *Device) Midori() bool

Midori Set to true if running in Midori.

func (*Device) MobileSafari

func (self *Device) MobileSafari() bool

MobileSafari Set to true if running in Mobile Safari.

func (*Device) Mp3

func (self *Device) Mp3() bool

Mp3 Can this device play mp3 files?

func (*Device) Mp4Video

func (self *Device) Mp4Video() bool

Mp4Video Can this device play h264 mp4 video files?

func (*Device) Mspointer

func (self *Device) Mspointer() bool

Mspointer Is mspointer available?

func (*Device) Node

func (self *Device) Node() bool

Node Is the game running under Node.js?

func (*Device) NodeWebkit

func (self *Device) NodeWebkit() bool

NodeWebkit Is the game running under Node-Webkit?

func (*Device) Ogg

func (self *Device) Ogg() bool

Ogg Can this device play ogg files?

func (*Device) OggVideo

func (self *Device) OggVideo() bool

OggVideo Can this device play ogg video files?

func (*Device) OnInitialized

func (self *Device) OnInitialized() *Signal

OnInitialized This signal is dispatched after device initialization occurs but before any of the ready callbacks (see {@link Phaser.Device.whenReady whenReady}) have been invoked.

Local "patching" for a particular device can/should be done in this event.

_Note_: This signal is removed after the device has been readied; if a handler has not been added _before_ `new Phaser.Game(..)` it is probably too late.

func (*Device) Opera

func (self *Device) Opera() bool

Opera Set to true if running in Opera.

func (*Device) Opus

func (self *Device) Opus() bool

Opus Can this device play opus files?

func (*Device) PixelRatio

func (self *Device) PixelRatio() int

PixelRatio PixelRatio of the host device?

func (*Device) PointerLock

func (self *Device) PointerLock() bool

PointerLock Is Pointer Lock available?

func (*Device) QuirksMode

func (self *Device) QuirksMode() bool

QuirksMode Is the browser running in strict mode (false) or quirks mode? (true)

func (*Device) RequestFullscreen

func (self *Device) RequestFullscreen() string

RequestFullscreen If the browser supports the Full Screen API this holds the call you need to use to activate it.

func (*Device) Safari

func (self *Device) Safari() bool

Safari Set to true if running in Safari.

func (*Device) SafariVersion

func (self *Device) SafariVersion() int

SafariVersion If running in Safari this will contain the major version number.

func (*Device) SetAndroidA

func (self *Device) SetAndroidA(member bool)

SetAndroidA Is running on android?

func (*Device) SetAroraA

func (self *Device) SetAroraA(member bool)

SetAroraA Set to true if running in Arora.

func (*Device) SetAudioDataA

func (self *Device) SetAudioDataA(member bool)

SetAudioDataA Are Audio tags available?

func (*Device) SetCancelFullscreenA

func (self *Device) SetCancelFullscreenA(member string)

SetCancelFullscreenA If the browser supports the Full Screen API this holds the call you need to use to cancel it.

func (*Device) SetCanvasA

func (self *Device) SetCanvasA(member bool)

SetCanvasA Is canvas available?

func (*Device) SetCanvasBitBltShiftA

func (self *Device) SetCanvasBitBltShiftA(member bool)

SetCanvasBitBltShiftA True if canvas supports a 'copy' bitblt onto itself when the source and destination regions overlap.

func (*Device) SetChromeA

func (self *Device) SetChromeA(member bool)

SetChromeA Set to true if running in Chrome.

func (*Device) SetChromeOSA

func (self *Device) SetChromeOSA(member bool)

SetChromeOSA Is running on chromeOS?

func (*Device) SetChromeVersionA

func (self *Device) SetChromeVersionA(member int)

SetChromeVersionA If running in Chrome this will contain the major version number.

func (*Device) SetCocoonJSA

func (self *Device) SetCocoonJSA(member bool)

SetCocoonJSA Is the game running under CocoonJS?

func (*Device) SetCocoonJSAppA

func (self *Device) SetCocoonJSAppA(member bool)

SetCocoonJSAppA Is this game running with CocoonJS.App?

func (*Device) SetCordovaA

func (self *Device) SetCordovaA(member bool)

SetCordovaA Is the game running under Apache Cordova?

func (*Device) SetCrosswalkA

func (self *Device) SetCrosswalkA(member bool)

SetCrosswalkA Is the game running under the Intel Crosswalk XDK?

func (*Device) SetCss3DA

func (self *Device) SetCss3DA(member bool)

SetCss3DA Is css3D available?

func (*Device) SetDesktopA

func (self *Device) SetDesktopA(member bool)

SetDesktopA Is running on a desktop?

func (*Device) SetDeviceReadyAtA

func (self *Device) SetDeviceReadyAtA(member int)

SetDeviceReadyAtA The time the device became ready.

func (*Device) SetDolbyA

func (self *Device) SetDolbyA(member bool)

SetDolbyA Can this device play EC-3 Dolby Digital Plus files?

func (*Device) SetEdgeA

func (self *Device) SetEdgeA(member bool)

SetEdgeA Set to true if running in Microsoft Edge browser.

func (*Device) SetEjectaA

func (self *Device) SetEjectaA(member bool)

SetEjectaA Is the game running under Ejecta?

func (*Device) SetElectronA

func (self *Device) SetElectronA(member bool)

SetElectronA Is the game running under GitHub Electron?

func (*Device) SetEpiphanyA

func (self *Device) SetEpiphanyA(member bool)

SetEpiphanyA Set to true if running in Epiphany.

func (*Device) SetFileA

func (self *Device) SetFileA(member bool)

SetFileA Is file available?

func (*Device) SetFileSystemA

func (self *Device) SetFileSystemA(member bool)

SetFileSystemA Is fileSystem available?

func (*Device) SetFirefoxA

func (self *Device) SetFirefoxA(member bool)

SetFirefoxA Set to true if running in Firefox.

func (*Device) SetFirefoxVersionA

func (self *Device) SetFirefoxVersionA(member int)

SetFirefoxVersionA If running in Firefox this will contain the major version number.

func (*Device) SetFullscreenA

func (self *Device) SetFullscreenA(member bool)

SetFullscreenA Does the browser support the Full Screen API?

func (*Device) SetFullscreenKeyboardA

func (self *Device) SetFullscreenKeyboardA(member bool)

SetFullscreenKeyboardA Does the browser support access to the Keyboard during Full Screen mode?

func (*Device) SetGetUserMediaA

func (self *Device) SetGetUserMediaA(member bool)

SetGetUserMediaA Does the device support the getUserMedia API?

func (*Device) SetH264VideoA

func (self *Device) SetH264VideoA(member bool)

SetH264VideoA Can this device play h264 mp4 video files?

func (*Device) SetHlsVideoA

func (self *Device) SetHlsVideoA(member bool)

SetHlsVideoA Can this device play hls video files?

func (*Device) SetIOSA

func (self *Device) SetIOSA(member bool)

SetIOSA Is running on iOS?

func (*Device) SetIOSVersionA

func (self *Device) SetIOSVersionA(member int)

SetIOSVersionA If running in iOS this will contain the major version number.

func (*Device) SetIPadA

func (self *Device) SetIPadA(member bool)

SetIPadA Is running on iPad?

func (*Device) SetIPhone4A

func (self *Device) SetIPhone4A(member bool)

SetIPhone4A Is running on iPhone4?

func (*Device) SetIPhoneA

func (self *Device) SetIPhoneA(member bool)

SetIPhoneA Is running on iPhone?

func (*Device) SetIeA

func (self *Device) SetIeA(member bool)

SetIeA Set to true if running in Internet Explorer.

func (*Device) SetIeVersionA

func (self *Device) SetIeVersionA(member int)

SetIeVersionA If running in Internet Explorer this will contain the major version number. Beyond IE10 you should use Device.trident and Device.tridentVersion.

func (*Device) SetInitializedA

func (self *Device) SetInitializedA(member bool)

SetInitializedA The time as which initialization has completed.

func (*Device) SetLITTLE_ENDIANA

func (self *Device) SetLITTLE_ENDIANA(member bool)

SetLITTLE_ENDIANA Same value as `littleEndian`.

func (*Device) SetLinuxA

func (self *Device) SetLinuxA(member bool)

SetLinuxA Is running on linux?

func (*Device) SetLittleEndianA

func (self *Device) SetLittleEndianA(member bool)

SetLittleEndianA Is the device big or little endian? (only detected if the browser supports TypedArrays)

func (*Device) SetLocalStorageA

func (self *Device) SetLocalStorageA(member bool)

SetLocalStorageA Is localStorage available?

func (*Device) SetM4aA

func (self *Device) SetM4aA(member bool)

SetM4aA Can this device play m4a files? True if this device can play m4a files.

func (*Device) SetMacOSA

func (self *Device) SetMacOSA(member bool)

SetMacOSA Is running on macOS?

func (*Device) SetMidoriA

func (self *Device) SetMidoriA(member bool)

SetMidoriA Set to true if running in Midori.

func (*Device) SetMobileSafariA

func (self *Device) SetMobileSafariA(member bool)

SetMobileSafariA Set to true if running in Mobile Safari.

func (*Device) SetMp3A

func (self *Device) SetMp3A(member bool)

SetMp3A Can this device play mp3 files?

func (*Device) SetMp4VideoA

func (self *Device) SetMp4VideoA(member bool)

SetMp4VideoA Can this device play h264 mp4 video files?

func (*Device) SetMspointerA

func (self *Device) SetMspointerA(member bool)

SetMspointerA Is mspointer available?

func (*Device) SetNodeA

func (self *Device) SetNodeA(member bool)

SetNodeA Is the game running under Node.js?

func (*Device) SetNodeWebkitA

func (self *Device) SetNodeWebkitA(member bool)

SetNodeWebkitA Is the game running under Node-Webkit?

func (*Device) SetOggA

func (self *Device) SetOggA(member bool)

SetOggA Can this device play ogg files?

func (*Device) SetOggVideoA

func (self *Device) SetOggVideoA(member bool)

SetOggVideoA Can this device play ogg video files?

func (*Device) SetOnInitializedA

func (self *Device) SetOnInitializedA(member *Signal)

SetOnInitializedA This signal is dispatched after device initialization occurs but before any of the ready callbacks (see {@link Phaser.Device.whenReady whenReady}) have been invoked.

Local "patching" for a particular device can/should be done in this event.

_Note_: This signal is removed after the device has been readied; if a handler has not been added _before_ `new Phaser.Game(..)` it is probably too late.

func (*Device) SetOperaA

func (self *Device) SetOperaA(member bool)

SetOperaA Set to true if running in Opera.

func (*Device) SetOpusA

func (self *Device) SetOpusA(member bool)

SetOpusA Can this device play opus files?

func (*Device) SetPixelRatioA

func (self *Device) SetPixelRatioA(member int)

SetPixelRatioA PixelRatio of the host device?

func (*Device) SetPointerLockA

func (self *Device) SetPointerLockA(member bool)

SetPointerLockA Is Pointer Lock available?

func (*Device) SetQuirksModeA

func (self *Device) SetQuirksModeA(member bool)

SetQuirksModeA Is the browser running in strict mode (false) or quirks mode? (true)

func (*Device) SetRequestFullscreenA

func (self *Device) SetRequestFullscreenA(member string)

SetRequestFullscreenA If the browser supports the Full Screen API this holds the call you need to use to activate it.

func (*Device) SetSafariA

func (self *Device) SetSafariA(member bool)

SetSafariA Set to true if running in Safari.

func (*Device) SetSafariVersionA

func (self *Device) SetSafariVersionA(member int)

SetSafariVersionA If running in Safari this will contain the major version number.

func (*Device) SetSilkA

func (self *Device) SetSilkA(member bool)

SetSilkA Set to true if running in the Silk browser (as used on the Amazon Kindle)

func (*Device) SetSupport32bitA

func (self *Device) SetSupport32bitA(member bool)

SetSupport32bitA Does the device context support 32bit pixel manipulation using array buffer views?

func (*Device) SetTouchA

func (self *Device) SetTouchA(member bool)

SetTouchA Is touch available?

func (*Device) SetTridentA

func (self *Device) SetTridentA(member bool)

SetTridentA Set to true if running a Trident version of Internet Explorer (IE11+)

func (*Device) SetTridentVersionA

func (self *Device) SetTridentVersionA(member int)

SetTridentVersionA If running in Internet Explorer 11 this will contain the major version number. See {@link http://msdn.microsoft.com/en-us/library/ie/ms537503(v=vs.85).aspx}

func (*Device) SetTypedArrayA

func (self *Device) SetTypedArrayA(member bool)

SetTypedArrayA Does the browser support TypedArrays?

func (*Device) SetVibrationA

func (self *Device) SetVibrationA(member bool)

SetVibrationA Does the device support the Vibration API?

func (*Device) SetVp9VideoA

func (self *Device) SetVp9VideoA(member bool)

SetVp9VideoA Can this device play vp9 video files?

func (*Device) SetWavA

func (self *Device) SetWavA(member bool)

SetWavA Can this device play wav files?

func (*Device) SetWebAppA

func (self *Device) SetWebAppA(member bool)

SetWebAppA Set to true if running as a WebApp, i.e. within a WebView

func (*Device) SetWebAudioA

func (self *Device) SetWebAudioA(member bool)

SetWebAudioA Is the WebAudio API available?

func (*Device) SetWebGLA

func (self *Device) SetWebGLA(member bool)

SetWebGLA Is webGL available?

func (*Device) SetWebmA

func (self *Device) SetWebmA(member bool)

SetWebmA Can this device play webm files?

func (*Device) SetWebmVideoA

func (self *Device) SetWebmVideoA(member bool)

SetWebmVideoA Can this device play webm video files?

func (*Device) SetWheelEventA

func (self *Device) SetWheelEventA(member interface{})

SetWheelEventA The newest type of Wheel/Scroll event supported: 'wheel', 'mousewheel', 'DOMMouseScroll'

func (*Device) SetWindowsA

func (self *Device) SetWindowsA(member bool)

SetWindowsA Is running on windows?

func (*Device) SetWindowsPhoneA

func (self *Device) SetWindowsPhoneA(member bool)

SetWindowsPhoneA Is running on a Windows Phone?

func (*Device) SetWorkerA

func (self *Device) SetWorkerA(member bool)

SetWorkerA Is worker available?

func (*Device) Silk

func (self *Device) Silk() bool

Silk Set to true if running in the Silk browser (as used on the Amazon Kindle)

func (*Device) Support32bit

func (self *Device) Support32bit() bool

Support32bit Does the device context support 32bit pixel manipulation using array buffer views?

func (*Device) Touch

func (self *Device) Touch() bool

Touch Is touch available?

func (*Device) Trident

func (self *Device) Trident() bool

Trident Set to true if running a Trident version of Internet Explorer (IE11+)

func (*Device) TridentVersion

func (self *Device) TridentVersion() int

TridentVersion If running in Internet Explorer 11 this will contain the major version number. See {@link http://msdn.microsoft.com/en-us/library/ie/ms537503(v=vs.85).aspx}

func (*Device) TypedArray

func (self *Device) TypedArray() bool

TypedArray Does the browser support TypedArrays?

func (*Device) Vibration

func (self *Device) Vibration() bool

Vibration Does the device support the Vibration API?

func (*Device) Vp9Video

func (self *Device) Vp9Video() bool

Vp9Video Can this device play vp9 video files?

func (*Device) Wav

func (self *Device) Wav() bool

Wav Can this device play wav files?

func (*Device) WebApp

func (self *Device) WebApp() bool

WebApp Set to true if running as a WebApp, i.e. within a WebView

func (*Device) WebAudio

func (self *Device) WebAudio() bool

WebAudio Is the WebAudio API available?

func (*Device) WebGL

func (self *Device) WebGL() bool

WebGL Is webGL available?

func (*Device) Webm

func (self *Device) Webm() bool

Webm Can this device play webm files?

func (*Device) WebmVideo

func (self *Device) WebmVideo() bool

WebmVideo Can this device play webm video files?

func (*Device) WheelEvent

func (self *Device) WheelEvent() interface{}

WheelEvent The newest type of Wheel/Scroll event supported: 'wheel', 'mousewheel', 'DOMMouseScroll'

func (*Device) WhenReady

func (self *Device) WhenReady(handler interface{})

WhenReady Add a device-ready handler and ensure the device ready sequence is started.

Phaser.Device will _not_ activate or initialize until at least one `whenReady` handler is added, which is normally done automatically be calling `new Phaser.Game(..)`.

The handler is invoked when the device is considered "ready", which may be immediately if the device is already "ready". See {@link Phaser.Device#deviceReadyAt deviceReadyAt}.

func (*Device) WhenReady1O

func (self *Device) WhenReady1O(handler interface{}, context interface{})

WhenReady1O Add a device-ready handler and ensure the device ready sequence is started.

Phaser.Device will _not_ activate or initialize until at least one `whenReady` handler is added, which is normally done automatically be calling `new Phaser.Game(..)`.

The handler is invoked when the device is considered "ready", which may be immediately if the device is already "ready". See {@link Phaser.Device#deviceReadyAt deviceReadyAt}.

func (*Device) WhenReady2O

func (self *Device) WhenReady2O(handler interface{}, context interface{}, nonPrimer bool)

WhenReady2O Add a device-ready handler and ensure the device ready sequence is started.

Phaser.Device will _not_ activate or initialize until at least one `whenReady` handler is added, which is normally done automatically be calling `new Phaser.Game(..)`.

The handler is invoked when the device is considered "ready", which may be immediately if the device is already "ready". See {@link Phaser.Device#deviceReadyAt deviceReadyAt}.

func (*Device) WhenReadyI

func (self *Device) WhenReadyI(args ...interface{})

WhenReadyI Add a device-ready handler and ensure the device ready sequence is started.

Phaser.Device will _not_ activate or initialize until at least one `whenReady` handler is added, which is normally done automatically be calling `new Phaser.Game(..)`.

The handler is invoked when the device is considered "ready", which may be immediately if the device is already "ready". See {@link Phaser.Device#deviceReadyAt deviceReadyAt}.

func (*Device) Windows

func (self *Device) Windows() bool

Windows Is running on windows?

func (*Device) WindowsPhone

func (self *Device) WindowsPhone() bool

WindowsPhone Is running on a Windows Phone?

func (*Device) Worker

func (self *Device) Worker() bool

Worker Is worker available?

type DeviceButton

type DeviceButton struct {
	*js.Object
}

DeviceButton DeviceButtons belong to both `Phaser.Pointer` and `Phaser.SinglePad` (Gamepad) instances.

For Pointers they represent the various buttons that can exist on mice and pens, such as the left button, right button, middle button and advanced buttons like back and forward.

Access them via `Pointer.leftbutton`, `Pointer.rightButton` and so on.

On Gamepads they represent all buttons on the pad: from shoulder buttons to action buttons.

At the time of writing this there are device limitations you should be aware of:

  • On Windows, if you install a mouse driver, and its utility software allows you to customize button actions (e.g., IntelliPoint and SetPoint), the middle (wheel) button, the 4th button, and the 5th button might not be set, even when they are pressed.
  • On Linux (GTK), the 4th button and the 5th button are not supported.
  • On Mac OS X 10.5 there is no platform API for implementing any advanced buttons.

func NewDeviceButton

func NewDeviceButton(parent interface{}, buttonCode int) *DeviceButton

NewDeviceButton DeviceButtons belong to both `Phaser.Pointer` and `Phaser.SinglePad` (Gamepad) instances.

For Pointers they represent the various buttons that can exist on mice and pens, such as the left button, right button, middle button and advanced buttons like back and forward.

Access them via `Pointer.leftbutton`, `Pointer.rightButton` and so on.

On Gamepads they represent all buttons on the pad: from shoulder buttons to action buttons.

At the time of writing this there are device limitations you should be aware of:

  • On Windows, if you install a mouse driver, and its utility software allows you to customize button actions (e.g., IntelliPoint and SetPoint), the middle (wheel) button, the 4th button, and the 5th button might not be set, even when they are pressed.
  • On Linux (GTK), the 4th button and the 5th button are not supported.
  • On Mac OS X 10.5 there is no platform API for implementing any advanced buttons.

func NewDeviceButtonI

func NewDeviceButtonI(args ...interface{}) *DeviceButton

NewDeviceButtonI DeviceButtons belong to both `Phaser.Pointer` and `Phaser.SinglePad` (Gamepad) instances.

For Pointers they represent the various buttons that can exist on mice and pens, such as the left button, right button, middle button and advanced buttons like back and forward.

Access them via `Pointer.leftbutton`, `Pointer.rightButton` and so on.

On Gamepads they represent all buttons on the pad: from shoulder buttons to action buttons.

At the time of writing this there are device limitations you should be aware of:

  • On Windows, if you install a mouse driver, and its utility software allows you to customize button actions (e.g., IntelliPoint and SetPoint), the middle (wheel) button, the 4th button, and the 5th button might not be set, even when they are pressed.
  • On Linux (GTK), the 4th button and the 5th button are not supported.
  • On Mac OS X 10.5 there is no platform API for implementing any advanced buttons.

func ToDeviceButton

func ToDeviceButton(jsStruct interface{}) *DeviceButton

DeviceButton Binding conversion method to DeviceButton point

func (*DeviceButton) AltKey

func (self *DeviceButton) AltKey() bool

AltKey True if the alt key was held down when this button was last pressed or released. Not supported on Gamepads.

func (*DeviceButton) ButtonCode

func (self *DeviceButton) ButtonCode() int

ButtonCode The buttoncode of this button if a Gamepad, or the DOM button event value if a Pointer.

func (*DeviceButton) CtrlKey

func (self *DeviceButton) CtrlKey() bool

CtrlKey True if the control key was held down when this button was last pressed or released. Not supported on Gamepads.

func (*DeviceButton) Destroy

func (self *DeviceButton) Destroy()

Destroy Destroys this DeviceButton, this disposes of the onDown, onUp and onFloat signals and clears the parent and game references.

func (*DeviceButton) DestroyI

func (self *DeviceButton) DestroyI(args ...interface{})

DestroyI Destroys this DeviceButton, this disposes of the onDown, onUp and onFloat signals and clears the parent and game references.

func (*DeviceButton) Duration

func (self *DeviceButton) Duration() int

Duration How long the button has been held down for in milliseconds. If not currently down it returns -1.

func (*DeviceButton) Event

func (self *DeviceButton) Event() interface{}

Event The DOM event that caused the change in button state.

func (*DeviceButton) Game

func (self *DeviceButton) Game() *Game

Game A reference to the currently running game.

func (*DeviceButton) IsDown

func (self *DeviceButton) IsDown() bool

IsDown The "down" state of the button.

func (*DeviceButton) IsUp

func (self *DeviceButton) IsUp() bool

IsUp The "up" state of the button.

func (*DeviceButton) JustPressed

func (self *DeviceButton) JustPressed() bool

JustPressed Returns the "just pressed" state of this button. Just pressed is considered true if the button was pressed down within the duration given (default 250ms).

func (*DeviceButton) JustPressed1O

func (self *DeviceButton) JustPressed1O(duration int) bool

JustPressed1O Returns the "just pressed" state of this button. Just pressed is considered true if the button was pressed down within the duration given (default 250ms).

func (*DeviceButton) JustPressedI

func (self *DeviceButton) JustPressedI(args ...interface{}) bool

JustPressedI Returns the "just pressed" state of this button. Just pressed is considered true if the button was pressed down within the duration given (default 250ms).

func (*DeviceButton) JustReleased

func (self *DeviceButton) JustReleased() bool

JustReleased Returns the "just released" state of this button. Just released is considered as being true if the button was released within the duration given (default 250ms).

func (*DeviceButton) JustReleased1O

func (self *DeviceButton) JustReleased1O(duration int) bool

JustReleased1O Returns the "just released" state of this button. Just released is considered as being true if the button was released within the duration given (default 250ms).

func (*DeviceButton) JustReleasedI

func (self *DeviceButton) JustReleasedI(args ...interface{}) bool

JustReleasedI Returns the "just released" state of this button. Just released is considered as being true if the button was released within the duration given (default 250ms).

func (*DeviceButton) OnDown

func (self *DeviceButton) OnDown() *Signal

OnDown This Signal is dispatched every time this DeviceButton is pressed down. It is only dispatched once (until the button is released again). When dispatched it sends 2 arguments: A reference to this DeviceButton and the value of the button.

func (*DeviceButton) OnFloat

func (self *DeviceButton) OnFloat() *Signal

OnFloat Gamepad only. This Signal is dispatched every time this DeviceButton changes floating value (between, but not exactly, 0 and 1). When dispatched it sends 2 arguments: A reference to this DeviceButton and the value of the button.

func (*DeviceButton) OnUp

func (self *DeviceButton) OnUp() *Signal

OnUp This Signal is dispatched every time this DeviceButton is released from a down state. It is only dispatched once (until the button is pressed again). When dispatched it sends 2 arguments: A reference to this DeviceButton and the value of the button.

func (*DeviceButton) PadFloat

func (self *DeviceButton) PadFloat(value int)

PadFloat Called automatically by Phaser.SinglePad.

func (*DeviceButton) PadFloatI

func (self *DeviceButton) PadFloatI(args ...interface{})

PadFloatI Called automatically by Phaser.SinglePad.

func (*DeviceButton) Parent

func (self *DeviceButton) Parent() interface{}

Parent A reference to the Pointer or Gamepad that owns this button.

func (*DeviceButton) Repeats

func (self *DeviceButton) Repeats() int

Repeats Gamepad only. If a button is held down this holds down the number of times the button has 'repeated'.

func (*DeviceButton) Reset

func (self *DeviceButton) Reset()

Reset Resets this DeviceButton, changing it to an isUp state and resetting the duration and repeats counters.

func (*DeviceButton) ResetI

func (self *DeviceButton) ResetI(args ...interface{})

ResetI Resets this DeviceButton, changing it to an isUp state and resetting the duration and repeats counters.

func (*DeviceButton) SetAltKeyA

func (self *DeviceButton) SetAltKeyA(member bool)

SetAltKeyA True if the alt key was held down when this button was last pressed or released. Not supported on Gamepads.

func (*DeviceButton) SetButtonCodeA

func (self *DeviceButton) SetButtonCodeA(member int)

SetButtonCodeA The buttoncode of this button if a Gamepad, or the DOM button event value if a Pointer.

func (*DeviceButton) SetCtrlKeyA

func (self *DeviceButton) SetCtrlKeyA(member bool)

SetCtrlKeyA True if the control key was held down when this button was last pressed or released. Not supported on Gamepads.

func (*DeviceButton) SetDurationA

func (self *DeviceButton) SetDurationA(member int)

SetDurationA How long the button has been held down for in milliseconds. If not currently down it returns -1.

func (*DeviceButton) SetEventA

func (self *DeviceButton) SetEventA(member interface{})

SetEventA The DOM event that caused the change in button state.

func (*DeviceButton) SetGameA

func (self *DeviceButton) SetGameA(member *Game)

SetGameA A reference to the currently running game.

func (*DeviceButton) SetIsDownA

func (self *DeviceButton) SetIsDownA(member bool)

SetIsDownA The "down" state of the button.

func (*DeviceButton) SetIsUpA

func (self *DeviceButton) SetIsUpA(member bool)

SetIsUpA The "up" state of the button.

func (*DeviceButton) SetOnDownA

func (self *DeviceButton) SetOnDownA(member *Signal)

SetOnDownA This Signal is dispatched every time this DeviceButton is pressed down. It is only dispatched once (until the button is released again). When dispatched it sends 2 arguments: A reference to this DeviceButton and the value of the button.

func (*DeviceButton) SetOnFloatA

func (self *DeviceButton) SetOnFloatA(member *Signal)

SetOnFloatA Gamepad only. This Signal is dispatched every time this DeviceButton changes floating value (between, but not exactly, 0 and 1). When dispatched it sends 2 arguments: A reference to this DeviceButton and the value of the button.

func (*DeviceButton) SetOnUpA

func (self *DeviceButton) SetOnUpA(member *Signal)

SetOnUpA This Signal is dispatched every time this DeviceButton is released from a down state. It is only dispatched once (until the button is pressed again). When dispatched it sends 2 arguments: A reference to this DeviceButton and the value of the button.

func (*DeviceButton) SetParentA

func (self *DeviceButton) SetParentA(member interface{})

SetParentA A reference to the Pointer or Gamepad that owns this button.

func (*DeviceButton) SetRepeatsA

func (self *DeviceButton) SetRepeatsA(member int)

SetRepeatsA Gamepad only. If a button is held down this holds down the number of times the button has 'repeated'.

func (*DeviceButton) SetShiftKeyA

func (self *DeviceButton) SetShiftKeyA(member bool)

SetShiftKeyA True if the shift key was held down when this button was last pressed or released. Not supported on Gamepads.

func (*DeviceButton) SetTimeDownA

func (self *DeviceButton) SetTimeDownA(member int)

SetTimeDownA The timestamp when the button was last pressed down.

func (*DeviceButton) SetTimeUpA

func (self *DeviceButton) SetTimeUpA(member int)

SetTimeUpA The timestamp when the button was last released.

func (*DeviceButton) SetValueA

func (self *DeviceButton) SetValueA(member int)

SetValueA Button value. Mainly useful for checking analog buttons (like shoulder triggers) on Gamepads.

func (*DeviceButton) ShiftKey

func (self *DeviceButton) ShiftKey() bool

ShiftKey True if the shift key was held down when this button was last pressed or released. Not supported on Gamepads.

func (*DeviceButton) Start

func (self *DeviceButton) Start()

Start Called automatically by Phaser.Pointer and Phaser.SinglePad. Handles the button down state.

func (*DeviceButton) Start1O

func (self *DeviceButton) Start1O(event interface{})

Start1O Called automatically by Phaser.Pointer and Phaser.SinglePad. Handles the button down state.

func (*DeviceButton) Start2O

func (self *DeviceButton) Start2O(event interface{}, value int)

Start2O Called automatically by Phaser.Pointer and Phaser.SinglePad. Handles the button down state.

func (*DeviceButton) StartI

func (self *DeviceButton) StartI(args ...interface{})

StartI Called automatically by Phaser.Pointer and Phaser.SinglePad. Handles the button down state.

func (*DeviceButton) Stop

func (self *DeviceButton) Stop()

Stop Called automatically by Phaser.Pointer and Phaser.SinglePad. Handles the button up state.

func (*DeviceButton) Stop1O

func (self *DeviceButton) Stop1O(event interface{})

Stop1O Called automatically by Phaser.Pointer and Phaser.SinglePad. Handles the button up state.

func (*DeviceButton) Stop2O

func (self *DeviceButton) Stop2O(event interface{}, value int)

Stop2O Called automatically by Phaser.Pointer and Phaser.SinglePad. Handles the button up state.

func (*DeviceButton) StopI

func (self *DeviceButton) StopI(args ...interface{})

StopI Called automatically by Phaser.Pointer and Phaser.SinglePad. Handles the button up state.

func (*DeviceButton) TimeDown

func (self *DeviceButton) TimeDown() int

TimeDown The timestamp when the button was last pressed down.

func (*DeviceButton) TimeUp

func (self *DeviceButton) TimeUp() int

TimeUp The timestamp when the button was last released.

func (*DeviceButton) Value

func (self *DeviceButton) Value() int

Value Button value. Mainly useful for checking analog buttons (like shoulder triggers) on Gamepads.

type DisplayObject

type DisplayObject struct {
	*js.Object
}

DisplayObject The base class for all objects that are rendered. Contains properties for position, scaling,

rotation, masks and cache handling.

This is an abstract class and should not be used on its own, rather it should be extended.

It is used internally by the likes of PIXI.Sprite.

func NewDisplayObject

func NewDisplayObject() *DisplayObject

NewDisplayObject The base class for all objects that are rendered. Contains properties for position, scaling,

rotation, masks and cache handling.

This is an abstract class and should not be used on its own, rather it should be extended.

It is used internally by the likes of PIXI.Sprite.

func NewDisplayObjectI

func NewDisplayObjectI(args ...interface{}) *DisplayObject

NewDisplayObjectI The base class for all objects that are rendered. Contains properties for position, scaling,

rotation, masks and cache handling.

This is an abstract class and should not be used on its own, rather it should be extended.

It is used internally by the likes of PIXI.Sprite.

func ToDisplayObject

func ToDisplayObject(jsStruct interface{}) *DisplayObject

DisplayObject Binding conversion method to DisplayObject point

func (*DisplayObject) Alpha

func (self *DisplayObject) Alpha() int

Alpha The alpha value of this DisplayObject. A value of 1 is fully opaque. A value of 0 is transparent.

Please note that an object with an alpha value of 0 is skipped during the render pass.

The value of this property does not reflect any alpha values set further up the display list.

To obtain that value please see the `worldAlpha` property.

func (*DisplayObject) CacheAsBitmap

func (self *DisplayObject) CacheAsBitmap() bool

CacheAsBitmap Sets if this DisplayObject should be cached as a bitmap.

When invoked it will take a snapshot of the DisplayObject, as it is at that moment, and store it

in a RenderTexture. This is then used whenever this DisplayObject is rendered. It can provide a

performance benefit for complex, but static, DisplayObjects. I.e. those with lots of children.

Cached Bitmaps do not track their parents. If you update a property of this DisplayObject, it will not

re-generate the cached bitmap automatically. To do that you need to call `DisplayObject.updateCache`.

To remove a cached bitmap, set this property to `null`.

func (*DisplayObject) FilterArea

func (self *DisplayObject) FilterArea() *Rectangle

FilterArea The rectangular area used by filters when rendering a shader for this DisplayObject.

func (*DisplayObject) Filters

func (self *DisplayObject) Filters() []interface{}

Filters Sets the filters for this DisplayObject. This is a WebGL only feature, and is ignored by the Canvas

Renderer. A filter is a shader applied to this DisplayObject. You can modify the placement of the filter

using `DisplayObject.filterArea`.

To remove filters, set this property to `null`.

Note: You cannot have a filter set, and a MULTIPLY Blend Mode active, at the same time. Setting a

filter will reset this DisplayObjects blend mode to NORMAL.

func (*DisplayObject) HitArea

func (self *DisplayObject) HitArea() interface{}

HitArea This is the defined area that will pick up mouse / touch events. It is null by default.

Setting it is a neat way of optimising the hitTest function that the interactionManager will use (as it will not need to hit test all the children)

func (*DisplayObject) Mask

func (self *DisplayObject) Mask() *PIXIGraphics

Mask Sets a mask for this DisplayObject. A mask is an instance of a Graphics object.

When applied it limits the visible area of this DisplayObject to the shape of the mask.

Under a Canvas renderer it uses shape clipping. Under a WebGL renderer it uses a Stencil Buffer.

To remove a mask, set this property to `null`.

func (*DisplayObject) Parent

func (self *DisplayObject) Parent() *PIXIDisplayObjectContainer

Parent The parent DisplayObjectContainer that this DisplayObject is a child of.

All DisplayObjects must belong to a parent in order to be rendered.

The root parent is the Stage object. This property is set automatically when the

DisplayObject is added to, or removed from, a DisplayObjectContainer.

func (*DisplayObject) Pivot

func (self *DisplayObject) Pivot() *PIXIPoint

Pivot The pivot point of this DisplayObject that it rotates around. The values are expressed

in pixel values.

func (*DisplayObject) Position

func (self *DisplayObject) Position() *PIXIPoint

Position The coordinates, in pixels, of this DisplayObject, relative to its parent container.

The value of this property does not reflect any positioning happening further up the display list.

To obtain that value please see the `worldPosition` property.

func (*DisplayObject) Renderable

func (self *DisplayObject) Renderable() bool

Renderable Should this DisplayObject be rendered by the renderer? An object with a renderable value of

`false` is skipped during the render pass.

func (*DisplayObject) Rotation

func (self *DisplayObject) Rotation() int

Rotation The rotation of this DisplayObject. The value is given, and expressed, in radians, and is based on

a right-handed orientation.

The value of this property does not reflect any rotation happening further up the display list.

To obtain that value please see the `worldRotation` property.

func (*DisplayObject) Scale

func (self *DisplayObject) Scale() *PIXIPoint

Scale The scale of this DisplayObject. A scale of 1:1 represents the DisplayObject

at its default size. A value of 0.5 would scale this DisplayObject by half, and so on.

The value of this property does not reflect any scaling happening further up the display list.

To obtain that value please see the `worldScale` property.

func (*DisplayObject) SetAlphaA

func (self *DisplayObject) SetAlphaA(member int)

SetAlphaA The alpha value of this DisplayObject. A value of 1 is fully opaque. A value of 0 is transparent.

Please note that an object with an alpha value of 0 is skipped during the render pass.

The value of this property does not reflect any alpha values set further up the display list.

To obtain that value please see the `worldAlpha` property.

func (*DisplayObject) SetCacheAsBitmapA

func (self *DisplayObject) SetCacheAsBitmapA(member bool)

SetCacheAsBitmapA Sets if this DisplayObject should be cached as a bitmap.

When invoked it will take a snapshot of the DisplayObject, as it is at that moment, and store it

in a RenderTexture. This is then used whenever this DisplayObject is rendered. It can provide a

performance benefit for complex, but static, DisplayObjects. I.e. those with lots of children.

Cached Bitmaps do not track their parents. If you update a property of this DisplayObject, it will not

re-generate the cached bitmap automatically. To do that you need to call `DisplayObject.updateCache`.

To remove a cached bitmap, set this property to `null`.

func (*DisplayObject) SetFilterAreaA

func (self *DisplayObject) SetFilterAreaA(member *Rectangle)

SetFilterAreaA The rectangular area used by filters when rendering a shader for this DisplayObject.

func (*DisplayObject) SetFiltersA

func (self *DisplayObject) SetFiltersA(member []interface{})

SetFiltersA Sets the filters for this DisplayObject. This is a WebGL only feature, and is ignored by the Canvas

Renderer. A filter is a shader applied to this DisplayObject. You can modify the placement of the filter

using `DisplayObject.filterArea`.

To remove filters, set this property to `null`.

Note: You cannot have a filter set, and a MULTIPLY Blend Mode active, at the same time. Setting a

filter will reset this DisplayObjects blend mode to NORMAL.

func (*DisplayObject) SetHitAreaA

func (self *DisplayObject) SetHitAreaA(member interface{})

SetHitAreaA This is the defined area that will pick up mouse / touch events. It is null by default.

Setting it is a neat way of optimising the hitTest function that the interactionManager will use (as it will not need to hit test all the children)

func (*DisplayObject) SetMaskA

func (self *DisplayObject) SetMaskA(member *PIXIGraphics)

SetMaskA Sets a mask for this DisplayObject. A mask is an instance of a Graphics object.

When applied it limits the visible area of this DisplayObject to the shape of the mask.

Under a Canvas renderer it uses shape clipping. Under a WebGL renderer it uses a Stencil Buffer.

To remove a mask, set this property to `null`.

func (*DisplayObject) SetParentA

func (self *DisplayObject) SetParentA(member *PIXIDisplayObjectContainer)

SetParentA The parent DisplayObjectContainer that this DisplayObject is a child of.

All DisplayObjects must belong to a parent in order to be rendered.

The root parent is the Stage object. This property is set automatically when the

DisplayObject is added to, or removed from, a DisplayObjectContainer.

func (*DisplayObject) SetPivotA

func (self *DisplayObject) SetPivotA(member *PIXIPoint)

SetPivotA The pivot point of this DisplayObject that it rotates around. The values are expressed

in pixel values.

func (*DisplayObject) SetPositionA

func (self *DisplayObject) SetPositionA(member *PIXIPoint)

SetPositionA The coordinates, in pixels, of this DisplayObject, relative to its parent container.

The value of this property does not reflect any positioning happening further up the display list.

To obtain that value please see the `worldPosition` property.

func (*DisplayObject) SetRenderableA

func (self *DisplayObject) SetRenderableA(member bool)

SetRenderableA Should this DisplayObject be rendered by the renderer? An object with a renderable value of

`false` is skipped during the render pass.

func (*DisplayObject) SetRotationA

func (self *DisplayObject) SetRotationA(member int)

SetRotationA The rotation of this DisplayObject. The value is given, and expressed, in radians, and is based on

a right-handed orientation.

The value of this property does not reflect any rotation happening further up the display list.

To obtain that value please see the `worldRotation` property.

func (*DisplayObject) SetScaleA

func (self *DisplayObject) SetScaleA(member *PIXIPoint)

SetScaleA The scale of this DisplayObject. A scale of 1:1 represents the DisplayObject

at its default size. A value of 0.5 would scale this DisplayObject by half, and so on.

The value of this property does not reflect any scaling happening further up the display list.

To obtain that value please see the `worldScale` property.

func (*DisplayObject) SetVisibleA

func (self *DisplayObject) SetVisibleA(member bool)

SetVisibleA The visibility of this DisplayObject. A value of `false` makes the object invisible.

A value of `true` makes it visible. Please note that an object with a visible value of

`false` is skipped during the render pass. Equally a DisplayObject with visible false will

not render any of its children.

The value of this property does not reflect any visible values set further up the display list.

To obtain that value please see the `worldVisible` property.

func (*DisplayObject) SetWorldAlphaA

func (self *DisplayObject) SetWorldAlphaA(member int)

SetWorldAlphaA The multiplied alpha value of this DisplayObject. A value of 1 is fully opaque. A value of 0 is transparent.

This value is the calculated total, based on the alpha values of all parents of this DisplayObjects

in the display list.

To obtain, and set, the local alpha value, see the `alpha` property.

Note: This property is only updated at the end of the `updateTransform` call, once per render. Until

that happens this property will contain values based on the previous frame. Be mindful of this if

accessing this property outside of the normal game flow, i.e. from an asynchronous event callback.

func (*DisplayObject) SetWorldPositionA

func (self *DisplayObject) SetWorldPositionA(member *PIXIPoint)

SetWorldPositionA The coordinates, in pixels, of this DisplayObject within the world.

This property contains the calculated total, based on the positions of all parents of this

DisplayObject in the display list.

Note: This property is only updated at the end of the `updateTransform` call, once per render. Until

that happens this property will contain values based on the previous frame. Be mindful of this if

accessing this property outside of the normal game flow, i.e. from an asynchronous event callback.

func (*DisplayObject) SetWorldRotationA

func (self *DisplayObject) SetWorldRotationA(member int)

SetWorldRotationA The rotation, in radians, of this DisplayObject.

This property contains the calculated total, based on the rotations of all parents of this

DisplayObject in the display list.

Note: This property is only updated at the end of the `updateTransform` call, once per render. Until

that happens this property will contain values based on the previous frame. Be mindful of this if

accessing this property outside of the normal game flow, i.e. from an asynchronous event callback.

func (*DisplayObject) SetWorldScaleA

func (self *DisplayObject) SetWorldScaleA(member *PIXIPoint)

SetWorldScaleA The global scale of this DisplayObject.

This property contains the calculated total, based on the scales of all parents of this

DisplayObject in the display list.

Note: This property is only updated at the end of the `updateTransform` call, once per render. Until

that happens this property will contain values based on the previous frame. Be mindful of this if

accessing this property outside of the normal game flow, i.e. from an asynchronous event callback.

func (*DisplayObject) SetWorldTransformA

func (self *DisplayObject) SetWorldTransformA(member *PIXIMatrix)

SetWorldTransformA The current transform of this DisplayObject.

This property contains the calculated total, based on the transforms of all parents of this

DisplayObject in the display list.

Note: This property is only updated at the end of the `updateTransform` call, once per render. Until

that happens this property will contain values based on the previous frame. Be mindful of this if

accessing this property outside of the normal game flow, i.e. from an asynchronous event callback.

func (*DisplayObject) SetWorldVisibleA

func (self *DisplayObject) SetWorldVisibleA(member bool)

SetWorldVisibleA Indicates if this DisplayObject is visible, based on it, and all of its parents, `visible` property values.

func (*DisplayObject) SetXA

func (self *DisplayObject) SetXA(member int)

SetXA The horizontal position of the DisplayObject, in pixels, relative to its parent.

If you need the world position of the DisplayObject, use `DisplayObject.worldPosition` instead.

func (*DisplayObject) SetYA

func (self *DisplayObject) SetYA(member int)

SetYA The vertical position of the DisplayObject, in pixels, relative to its parent.

If you need the world position of the DisplayObject, use `DisplayObject.worldPosition` instead.

func (*DisplayObject) Visible

func (self *DisplayObject) Visible() bool

Visible The visibility of this DisplayObject. A value of `false` makes the object invisible.

A value of `true` makes it visible. Please note that an object with a visible value of

`false` is skipped during the render pass. Equally a DisplayObject with visible false will

not render any of its children.

The value of this property does not reflect any visible values set further up the display list.

To obtain that value please see the `worldVisible` property.

func (*DisplayObject) WorldAlpha

func (self *DisplayObject) WorldAlpha() int

WorldAlpha The multiplied alpha value of this DisplayObject. A value of 1 is fully opaque. A value of 0 is transparent.

This value is the calculated total, based on the alpha values of all parents of this DisplayObjects

in the display list.

To obtain, and set, the local alpha value, see the `alpha` property.

Note: This property is only updated at the end of the `updateTransform` call, once per render. Until

that happens this property will contain values based on the previous frame. Be mindful of this if

accessing this property outside of the normal game flow, i.e. from an asynchronous event callback.

func (*DisplayObject) WorldPosition

func (self *DisplayObject) WorldPosition() *PIXIPoint

WorldPosition The coordinates, in pixels, of this DisplayObject within the world.

This property contains the calculated total, based on the positions of all parents of this

DisplayObject in the display list.

Note: This property is only updated at the end of the `updateTransform` call, once per render. Until

that happens this property will contain values based on the previous frame. Be mindful of this if

accessing this property outside of the normal game flow, i.e. from an asynchronous event callback.

func (*DisplayObject) WorldRotation

func (self *DisplayObject) WorldRotation() int

WorldRotation The rotation, in radians, of this DisplayObject.

This property contains the calculated total, based on the rotations of all parents of this

DisplayObject in the display list.

Note: This property is only updated at the end of the `updateTransform` call, once per render. Until

that happens this property will contain values based on the previous frame. Be mindful of this if

accessing this property outside of the normal game flow, i.e. from an asynchronous event callback.

func (*DisplayObject) WorldScale

func (self *DisplayObject) WorldScale() *PIXIPoint

WorldScale The global scale of this DisplayObject.

This property contains the calculated total, based on the scales of all parents of this

DisplayObject in the display list.

Note: This property is only updated at the end of the `updateTransform` call, once per render. Until

that happens this property will contain values based on the previous frame. Be mindful of this if

accessing this property outside of the normal game flow, i.e. from an asynchronous event callback.

func (*DisplayObject) WorldTransform

func (self *DisplayObject) WorldTransform() *PIXIMatrix

WorldTransform The current transform of this DisplayObject.

This property contains the calculated total, based on the transforms of all parents of this

DisplayObject in the display list.

Note: This property is only updated at the end of the `updateTransform` call, once per render. Until

that happens this property will contain values based on the previous frame. Be mindful of this if

accessing this property outside of the normal game flow, i.e. from an asynchronous event callback.

func (*DisplayObject) WorldVisible

func (self *DisplayObject) WorldVisible() bool

WorldVisible Indicates if this DisplayObject is visible, based on it, and all of its parents, `visible` property values.

func (*DisplayObject) X

func (self *DisplayObject) X() int

X The horizontal position of the DisplayObject, in pixels, relative to its parent.

If you need the world position of the DisplayObject, use `DisplayObject.worldPosition` instead.

func (*DisplayObject) Y

func (self *DisplayObject) Y() int

Y The vertical position of the DisplayObject, in pixels, relative to its parent.

If you need the world position of the DisplayObject, use `DisplayObject.worldPosition` instead.

type DisplayObjectContainer

type DisplayObjectContainer struct {
	*js.Object
}

DisplayObjectContainer A DisplayObjectContainer represents a collection of display objects.

It is the base class of all display objects that act as a container for other objects.

func NewDisplayObjectContainer

func NewDisplayObjectContainer() *DisplayObjectContainer

NewDisplayObjectContainer A DisplayObjectContainer represents a collection of display objects.

It is the base class of all display objects that act as a container for other objects.

func NewDisplayObjectContainerI

func NewDisplayObjectContainerI(args ...interface{}) *DisplayObjectContainer

NewDisplayObjectContainerI A DisplayObjectContainer represents a collection of display objects.

It is the base class of all display objects that act as a container for other objects.

func ToDisplayObjectContainer

func ToDisplayObjectContainer(jsStruct interface{}) *DisplayObjectContainer

DisplayObjectContainer Binding conversion method to DisplayObjectContainer point

func (*DisplayObjectContainer) AddChild

func (self *DisplayObjectContainer) AddChild(child *DisplayObject) *DisplayObject

AddChild Adds a child to the container.

func (*DisplayObjectContainer) AddChildAt

func (self *DisplayObjectContainer) AddChildAt(child *DisplayObject, index int) *DisplayObject

AddChildAt Adds a child to the container at a specified index. If the index is out of bounds an error will be thrown

func (*DisplayObjectContainer) AddChildAtI

func (self *DisplayObjectContainer) AddChildAtI(args ...interface{}) *DisplayObject

AddChildAtI Adds a child to the container at a specified index. If the index is out of bounds an error will be thrown

func (*DisplayObjectContainer) AddChildI

func (self *DisplayObjectContainer) AddChildI(args ...interface{}) *DisplayObject

AddChildI Adds a child to the container.

func (*DisplayObjectContainer) Children

func (self *DisplayObjectContainer) Children() []DisplayObject

Children [read-only] The array of children of this container.

func (*DisplayObjectContainer) Contains

func (self *DisplayObjectContainer) Contains(child *DisplayObject) bool

Contains Determines whether the specified display object is a child of the DisplayObjectContainer instance or the instance itself.

func (*DisplayObjectContainer) ContainsI

func (self *DisplayObjectContainer) ContainsI(args ...interface{}) bool

ContainsI Determines whether the specified display object is a child of the DisplayObjectContainer instance or the instance itself.

func (*DisplayObjectContainer) GetBounds

func (self *DisplayObjectContainer) GetBounds() *Rectangle

GetBounds Retrieves the global bounds of the displayObjectContainer as a rectangle. The bounds calculation takes all visible children into consideration.

func (*DisplayObjectContainer) GetBounds1O

func (self *DisplayObjectContainer) GetBounds1O(targetCoordinateSpace interface{}) *Rectangle

GetBounds1O Retrieves the global bounds of the displayObjectContainer as a rectangle. The bounds calculation takes all visible children into consideration.

func (*DisplayObjectContainer) GetBoundsI

func (self *DisplayObjectContainer) GetBoundsI(args ...interface{}) *Rectangle

GetBoundsI Retrieves the global bounds of the displayObjectContainer as a rectangle. The bounds calculation takes all visible children into consideration.

func (*DisplayObjectContainer) GetChildAt

func (self *DisplayObjectContainer) GetChildAt(index int) *DisplayObject

GetChildAt Returns the child at the specified index

func (*DisplayObjectContainer) GetChildAtI

func (self *DisplayObjectContainer) GetChildAtI(args ...interface{}) *DisplayObject

GetChildAtI Returns the child at the specified index

func (*DisplayObjectContainer) GetChildIndex

func (self *DisplayObjectContainer) GetChildIndex(child *DisplayObject) int

GetChildIndex Returns the index position of a child DisplayObject instance

func (*DisplayObjectContainer) GetChildIndexI

func (self *DisplayObjectContainer) GetChildIndexI(args ...interface{}) int

GetChildIndexI Returns the index position of a child DisplayObject instance

func (*DisplayObjectContainer) GetLocalBounds

func (self *DisplayObjectContainer) GetLocalBounds() *Rectangle

GetLocalBounds Retrieves the non-global local bounds of the displayObjectContainer as a rectangle without any transformations. The calculation takes all visible children into consideration.

func (*DisplayObjectContainer) GetLocalBoundsI

func (self *DisplayObjectContainer) GetLocalBoundsI(args ...interface{}) *Rectangle

GetLocalBoundsI Retrieves the non-global local bounds of the displayObjectContainer as a rectangle without any transformations. The calculation takes all visible children into consideration.

func (*DisplayObjectContainer) Height

func (self *DisplayObjectContainer) Height() int

Height The height of the displayObjectContainer, setting this will actually modify the scale to achieve the value set

func (*DisplayObjectContainer) IgnoreChildInput

func (self *DisplayObjectContainer) IgnoreChildInput() bool

IgnoreChildInput If `ignoreChildInput` is `false` it will allow this objects _children_ to be considered as valid for Input events.

If this property is `true` then the children will _not_ be considered as valid for Input events.

Note that this property isn't recursive: only immediate children are influenced, it doesn't scan further down.

func (*DisplayObjectContainer) RemoveChild

func (self *DisplayObjectContainer) RemoveChild(child *DisplayObject) *DisplayObject

RemoveChild Removes a child from the container.

func (*DisplayObjectContainer) RemoveChildAt

func (self *DisplayObjectContainer) RemoveChildAt(index int) *DisplayObject

RemoveChildAt Removes a child from the specified index position.

func (*DisplayObjectContainer) RemoveChildAtI

func (self *DisplayObjectContainer) RemoveChildAtI(args ...interface{}) *DisplayObject

RemoveChildAtI Removes a child from the specified index position.

func (*DisplayObjectContainer) RemoveChildI

func (self *DisplayObjectContainer) RemoveChildI(args ...interface{}) *DisplayObject

RemoveChildI Removes a child from the container.

func (*DisplayObjectContainer) RemoveChildren

func (self *DisplayObjectContainer) RemoveChildren(beginIndex int, endIndex int)

RemoveChildren Removes all children from this container that are within the begin and end indexes.

func (*DisplayObjectContainer) RemoveChildrenI

func (self *DisplayObjectContainer) RemoveChildrenI(args ...interface{})

RemoveChildrenI Removes all children from this container that are within the begin and end indexes.

func (*DisplayObjectContainer) SetChildIndex

func (self *DisplayObjectContainer) SetChildIndex(child *DisplayObject, index int)

SetChildIndex Changes the position of an existing child in the display object container

func (*DisplayObjectContainer) SetChildIndexI

func (self *DisplayObjectContainer) SetChildIndexI(args ...interface{})

SetChildIndexI Changes the position of an existing child in the display object container

func (*DisplayObjectContainer) SetChildrenA

func (self *DisplayObjectContainer) SetChildrenA(member []DisplayObject)

SetChildrenA [read-only] The array of children of this container.

func (*DisplayObjectContainer) SetHeightA

func (self *DisplayObjectContainer) SetHeightA(member int)

SetHeightA The height of the displayObjectContainer, setting this will actually modify the scale to achieve the value set

func (*DisplayObjectContainer) SetIgnoreChildInputA

func (self *DisplayObjectContainer) SetIgnoreChildInputA(member bool)

SetIgnoreChildInputA If `ignoreChildInput` is `false` it will allow this objects _children_ to be considered as valid for Input events.

If this property is `true` then the children will _not_ be considered as valid for Input events.

Note that this property isn't recursive: only immediate children are influenced, it doesn't scan further down.

func (*DisplayObjectContainer) SetWidthA

func (self *DisplayObjectContainer) SetWidthA(member int)

SetWidthA The width of the displayObjectContainer, setting this will actually modify the scale to achieve the value set

func (*DisplayObjectContainer) SwapChildren

func (self *DisplayObjectContainer) SwapChildren(child *DisplayObject, child2 *DisplayObject)

SwapChildren Swaps the position of 2 Display Objects within this container.

func (*DisplayObjectContainer) SwapChildrenI

func (self *DisplayObjectContainer) SwapChildrenI(args ...interface{})

SwapChildrenI Swaps the position of 2 Display Objects within this container.

func (*DisplayObjectContainer) Width

func (self *DisplayObjectContainer) Width() int

Width The width of the displayObjectContainer, setting this will actually modify the scale to achieve the value set

type EarCut

type EarCut struct {
	*js.Object
}

EarCut empty description

func NewEarCut

func NewEarCut() *EarCut

NewEarCut empty description

func NewEarCutI

func NewEarCutI(args ...interface{}) *EarCut

NewEarCutI empty description

func ToEarCut

func ToEarCut(jsStruct interface{}) *EarCut

EarCut Binding conversion method to EarCut point

type Easing

type Easing struct {
	*js.Object
}

Easing A collection of easing methods defining ease-in and ease-out curves.

func NewEasing

func NewEasing() *Easing

NewEasing A collection of easing methods defining ease-in and ease-out curves.

func NewEasingI

func NewEasingI(args ...interface{}) *Easing

NewEasingI A collection of easing methods defining ease-in and ease-out curves.

func ToEasing

func ToEasing(jsStruct interface{}) *Easing

Easing Binding conversion method to Easing point

type EasingBack

type EasingBack struct {
	*js.Object
}

EasingBack Back easing.

func NewEasingBack

func NewEasingBack() *EasingBack

NewEasingBack Back easing.

func NewEasingBackI

func NewEasingBackI(args ...interface{}) *EasingBack

NewEasingBackI Back easing.

func ToEasingBack

func ToEasingBack(jsStruct interface{}) *EasingBack

EasingBack Binding conversion method to EasingBack point

func (*EasingBack) In

func (self *EasingBack) In(k int) int

In Back ease-in.

func (*EasingBack) InI

func (self *EasingBack) InI(args ...interface{}) int

InI Back ease-in.

func (*EasingBack) InOut

func (self *EasingBack) InOut(k int) int

InOut Back ease-in/out.

func (*EasingBack) InOutI

func (self *EasingBack) InOutI(args ...interface{}) int

InOutI Back ease-in/out.

func (*EasingBack) Out

func (self *EasingBack) Out(k int) int

Out Back ease-out.

func (*EasingBack) OutI

func (self *EasingBack) OutI(args ...interface{}) int

OutI Back ease-out.

type EasingBounce

type EasingBounce struct {
	*js.Object
}

EasingBounce Bounce easing.

func NewEasingBounce

func NewEasingBounce() *EasingBounce

NewEasingBounce Bounce easing.

func NewEasingBounceI

func NewEasingBounceI(args ...interface{}) *EasingBounce

NewEasingBounceI Bounce easing.

func ToEasingBounce

func ToEasingBounce(jsStruct interface{}) *EasingBounce

EasingBounce Binding conversion method to EasingBounce point

func (*EasingBounce) In

func (self *EasingBounce) In(k int) int

In Bounce ease-in.

func (*EasingBounce) InI

func (self *EasingBounce) InI(args ...interface{}) int

InI Bounce ease-in.

func (*EasingBounce) InOut

func (self *EasingBounce) InOut(k int) int

InOut Bounce ease-in/out.

func (*EasingBounce) InOutI

func (self *EasingBounce) InOutI(args ...interface{}) int

InOutI Bounce ease-in/out.

func (*EasingBounce) Out

func (self *EasingBounce) Out(k int) int

Out Bounce ease-out.

func (*EasingBounce) OutI

func (self *EasingBounce) OutI(args ...interface{}) int

OutI Bounce ease-out.

type EasingCircular

type EasingCircular struct {
	*js.Object
}

EasingCircular Circular easing.

func NewEasingCircular

func NewEasingCircular() *EasingCircular

NewEasingCircular Circular easing.

func NewEasingCircularI

func NewEasingCircularI(args ...interface{}) *EasingCircular

NewEasingCircularI Circular easing.

func ToEasingCircular

func ToEasingCircular(jsStruct interface{}) *EasingCircular

EasingCircular Binding conversion method to EasingCircular point

func (*EasingCircular) In

func (self *EasingCircular) In(k int) int

In Circular ease-in.

func (*EasingCircular) InI

func (self *EasingCircular) InI(args ...interface{}) int

InI Circular ease-in.

func (*EasingCircular) InOut

func (self *EasingCircular) InOut(k int) int

InOut Circular ease-in/out.

func (*EasingCircular) InOutI

func (self *EasingCircular) InOutI(args ...interface{}) int

InOutI Circular ease-in/out.

func (*EasingCircular) Out

func (self *EasingCircular) Out(k int) int

Out Circular ease-out.

func (*EasingCircular) OutI

func (self *EasingCircular) OutI(args ...interface{}) int

OutI Circular ease-out.

type EasingCubic

type EasingCubic struct {
	*js.Object
}

EasingCubic Cubic easing.

func NewEasingCubic

func NewEasingCubic() *EasingCubic

NewEasingCubic Cubic easing.

func NewEasingCubicI

func NewEasingCubicI(args ...interface{}) *EasingCubic

NewEasingCubicI Cubic easing.

func ToEasingCubic

func ToEasingCubic(jsStruct interface{}) *EasingCubic

EasingCubic Binding conversion method to EasingCubic point

func (*EasingCubic) In

func (self *EasingCubic) In(k int) int

In Cubic ease-in.

func (*EasingCubic) InI

func (self *EasingCubic) InI(args ...interface{}) int

InI Cubic ease-in.

func (*EasingCubic) InOut

func (self *EasingCubic) InOut(k int) int

InOut Cubic ease-in/out.

func (*EasingCubic) InOutI

func (self *EasingCubic) InOutI(args ...interface{}) int

InOutI Cubic ease-in/out.

func (*EasingCubic) Out

func (self *EasingCubic) Out(k int) int

Out Cubic ease-out.

func (*EasingCubic) OutI

func (self *EasingCubic) OutI(args ...interface{}) int

OutI Cubic ease-out.

type EasingElastic

type EasingElastic struct {
	*js.Object
}

EasingElastic Elastic easing.

func NewEasingElastic

func NewEasingElastic() *EasingElastic

NewEasingElastic Elastic easing.

func NewEasingElasticI

func NewEasingElasticI(args ...interface{}) *EasingElastic

NewEasingElasticI Elastic easing.

func ToEasingElastic

func ToEasingElastic(jsStruct interface{}) *EasingElastic

EasingElastic Binding conversion method to EasingElastic point

func (*EasingElastic) In

func (self *EasingElastic) In(k int) int

In Elastic ease-in.

func (*EasingElastic) InI

func (self *EasingElastic) InI(args ...interface{}) int

InI Elastic ease-in.

func (*EasingElastic) InOut

func (self *EasingElastic) InOut(k int) int

InOut Elastic ease-in/out.

func (*EasingElastic) InOutI

func (self *EasingElastic) InOutI(args ...interface{}) int

InOutI Elastic ease-in/out.

func (*EasingElastic) Out

func (self *EasingElastic) Out(k int) int

Out Elastic ease-out.

func (*EasingElastic) OutI

func (self *EasingElastic) OutI(args ...interface{}) int

OutI Elastic ease-out.

type EasingExponential

type EasingExponential struct {
	*js.Object
}

EasingExponential Exponential easing.

func NewEasingExponential

func NewEasingExponential() *EasingExponential

NewEasingExponential Exponential easing.

func NewEasingExponentialI

func NewEasingExponentialI(args ...interface{}) *EasingExponential

NewEasingExponentialI Exponential easing.

func ToEasingExponential

func ToEasingExponential(jsStruct interface{}) *EasingExponential

EasingExponential Binding conversion method to EasingExponential point

func (*EasingExponential) In

func (self *EasingExponential) In(k int) int

In Exponential ease-in.

func (*EasingExponential) InI

func (self *EasingExponential) InI(args ...interface{}) int

InI Exponential ease-in.

func (*EasingExponential) InOut

func (self *EasingExponential) InOut(k int) int

InOut Exponential ease-in/out.

func (*EasingExponential) InOutI

func (self *EasingExponential) InOutI(args ...interface{}) int

InOutI Exponential ease-in/out.

func (*EasingExponential) Out

func (self *EasingExponential) Out(k int) int

Out Exponential ease-out.

func (*EasingExponential) OutI

func (self *EasingExponential) OutI(args ...interface{}) int

OutI Exponential ease-out.

type EasingLinear

type EasingLinear struct {
	*js.Object
}

EasingLinear Linear easing.

func NewEasingLinear

func NewEasingLinear() *EasingLinear

NewEasingLinear Linear easing.

func NewEasingLinearI

func NewEasingLinearI(args ...interface{}) *EasingLinear

NewEasingLinearI Linear easing.

func ToEasingLinear

func ToEasingLinear(jsStruct interface{}) *EasingLinear

EasingLinear Binding conversion method to EasingLinear point

func (*EasingLinear) None

func (self *EasingLinear) None(k int) int

None Linear Easing (no variation).

func (*EasingLinear) NoneI

func (self *EasingLinear) NoneI(args ...interface{}) int

NoneI Linear Easing (no variation).

type EasingQuadratic

type EasingQuadratic struct {
	*js.Object
}

EasingQuadratic Quadratic easing.

func NewEasingQuadratic

func NewEasingQuadratic() *EasingQuadratic

NewEasingQuadratic Quadratic easing.

func NewEasingQuadraticI

func NewEasingQuadraticI(args ...interface{}) *EasingQuadratic

NewEasingQuadraticI Quadratic easing.

func ToEasingQuadratic

func ToEasingQuadratic(jsStruct interface{}) *EasingQuadratic

EasingQuadratic Binding conversion method to EasingQuadratic point

func (*EasingQuadratic) In

func (self *EasingQuadratic) In(k int) int

In Ease-in.

func (*EasingQuadratic) InI

func (self *EasingQuadratic) InI(args ...interface{}) int

InI Ease-in.

func (*EasingQuadratic) InOut

func (self *EasingQuadratic) InOut(k int) int

InOut Ease-in/out.

func (*EasingQuadratic) InOutI

func (self *EasingQuadratic) InOutI(args ...interface{}) int

InOutI Ease-in/out.

func (*EasingQuadratic) Out

func (self *EasingQuadratic) Out(k int) int

Out Ease-out.

func (*EasingQuadratic) OutI

func (self *EasingQuadratic) OutI(args ...interface{}) int

OutI Ease-out.

type EasingQuartic

type EasingQuartic struct {
	*js.Object
}

EasingQuartic Quartic easing.

func NewEasingQuartic

func NewEasingQuartic() *EasingQuartic

NewEasingQuartic Quartic easing.

func NewEasingQuarticI

func NewEasingQuarticI(args ...interface{}) *EasingQuartic

NewEasingQuarticI Quartic easing.

func ToEasingQuartic

func ToEasingQuartic(jsStruct interface{}) *EasingQuartic

EasingQuartic Binding conversion method to EasingQuartic point

func (*EasingQuartic) In

func (self *EasingQuartic) In(k int) int

In Quartic ease-in.

func (*EasingQuartic) InI

func (self *EasingQuartic) InI(args ...interface{}) int

InI Quartic ease-in.

func (*EasingQuartic) InOut

func (self *EasingQuartic) InOut(k int) int

InOut Quartic ease-in/out.

func (*EasingQuartic) InOutI

func (self *EasingQuartic) InOutI(args ...interface{}) int

InOutI Quartic ease-in/out.

func (*EasingQuartic) Out

func (self *EasingQuartic) Out(k int) int

Out Quartic ease-out.

func (*EasingQuartic) OutI

func (self *EasingQuartic) OutI(args ...interface{}) int

OutI Quartic ease-out.

type EasingQuintic

type EasingQuintic struct {
	*js.Object
}

EasingQuintic Quintic easing.

func NewEasingQuintic

func NewEasingQuintic() *EasingQuintic

NewEasingQuintic Quintic easing.

func NewEasingQuinticI

func NewEasingQuinticI(args ...interface{}) *EasingQuintic

NewEasingQuinticI Quintic easing.

func ToEasingQuintic

func ToEasingQuintic(jsStruct interface{}) *EasingQuintic

EasingQuintic Binding conversion method to EasingQuintic point

func (*EasingQuintic) In

func (self *EasingQuintic) In(k int) int

In Quintic ease-in.

func (*EasingQuintic) InI

func (self *EasingQuintic) InI(args ...interface{}) int

InI Quintic ease-in.

func (*EasingQuintic) InOut

func (self *EasingQuintic) InOut(k int) int

InOut Quintic ease-in/out.

func (*EasingQuintic) InOutI

func (self *EasingQuintic) InOutI(args ...interface{}) int

InOutI Quintic ease-in/out.

func (*EasingQuintic) Out

func (self *EasingQuintic) Out(k int) int

Out Quintic ease-out.

func (*EasingQuintic) OutI

func (self *EasingQuintic) OutI(args ...interface{}) int

OutI Quintic ease-out.

type EasingSinusoidal

type EasingSinusoidal struct {
	*js.Object
}

EasingSinusoidal Sinusoidal easing.

func NewEasingSinusoidal

func NewEasingSinusoidal() *EasingSinusoidal

NewEasingSinusoidal Sinusoidal easing.

func NewEasingSinusoidalI

func NewEasingSinusoidalI(args ...interface{}) *EasingSinusoidal

NewEasingSinusoidalI Sinusoidal easing.

func ToEasingSinusoidal

func ToEasingSinusoidal(jsStruct interface{}) *EasingSinusoidal

EasingSinusoidal Binding conversion method to EasingSinusoidal point

func (*EasingSinusoidal) In

func (self *EasingSinusoidal) In(k int) int

In Sinusoidal ease-in.

func (*EasingSinusoidal) InI

func (self *EasingSinusoidal) InI(args ...interface{}) int

InI Sinusoidal ease-in.

func (*EasingSinusoidal) InOut

func (self *EasingSinusoidal) InOut(k int) int

InOut Sinusoidal ease-in/out.

func (*EasingSinusoidal) InOutI

func (self *EasingSinusoidal) InOutI(args ...interface{}) int

InOutI Sinusoidal ease-in/out.

func (*EasingSinusoidal) Out

func (self *EasingSinusoidal) Out(k int) int

Out Sinusoidal ease-out.

func (*EasingSinusoidal) OutI

func (self *EasingSinusoidal) OutI(args ...interface{}) int

OutI Sinusoidal ease-out.

type Ellipse

type Ellipse struct {
	*js.Object
}

Ellipse Creates a Ellipse object. A curve on a plane surrounding two focal points.

func NewEllipse

func NewEllipse() *Ellipse

NewEllipse Creates a Ellipse object. A curve on a plane surrounding two focal points.

func NewEllipse1O

func NewEllipse1O(x int) *Ellipse

NewEllipse1O Creates a Ellipse object. A curve on a plane surrounding two focal points.

func NewEllipse2O

func NewEllipse2O(x int, y int) *Ellipse

NewEllipse2O Creates a Ellipse object. A curve on a plane surrounding two focal points.

func NewEllipse3O

func NewEllipse3O(x int, y int, width int) *Ellipse

NewEllipse3O Creates a Ellipse object. A curve on a plane surrounding two focal points.

func NewEllipse4O

func NewEllipse4O(x int, y int, width int, height int) *Ellipse

NewEllipse4O Creates a Ellipse object. A curve on a plane surrounding two focal points.

func NewEllipseI

func NewEllipseI(args ...interface{}) *Ellipse

NewEllipseI Creates a Ellipse object. A curve on a plane surrounding two focal points.

func ToEllipse

func ToEllipse(jsStruct interface{}) *Ellipse

Ellipse Binding conversion method to Ellipse point

func (*Ellipse) Bottom

func (self *Ellipse) Bottom() int

Bottom The sum of the y and height properties. Changing the bottom property of an Ellipse doesn't adjust the y property, but does change the height. Gets or sets the bottom of the ellipse.

func (*Ellipse) Clone

func (self *Ellipse) Clone(output *Ellipse) *Ellipse

Clone Returns a new Ellipse object with the same values for the x, y, width, and height properties as this Ellipse object.

func (*Ellipse) CloneI

func (self *Ellipse) CloneI(args ...interface{}) *Ellipse

CloneI Returns a new Ellipse object with the same values for the x, y, width, and height properties as this Ellipse object.

func (*Ellipse) Contains

func (self *Ellipse) Contains(x int, y int) bool

Contains Return true if the given x/y coordinates are within this Ellipse object.

func (*Ellipse) ContainsI

func (self *Ellipse) ContainsI(args ...interface{}) bool

ContainsI Return true if the given x/y coordinates are within this Ellipse object.

func (*Ellipse) CopyFrom

func (self *Ellipse) CopyFrom(source interface{}) *Ellipse

CopyFrom Copies the x, y, width and height properties from any given object to this Ellipse.

func (*Ellipse) CopyFromI

func (self *Ellipse) CopyFromI(args ...interface{}) *Ellipse

CopyFromI Copies the x, y, width and height properties from any given object to this Ellipse.

func (*Ellipse) CopyTo

func (self *Ellipse) CopyTo(dest interface{}) interface{}

CopyTo Copies the x, y, width and height properties from this Ellipse to any given object.

func (*Ellipse) CopyToI

func (self *Ellipse) CopyToI(args ...interface{}) interface{}

CopyToI Copies the x, y, width and height properties from this Ellipse to any given object.

func (*Ellipse) Empty

func (self *Ellipse) Empty() bool

Empty Determines whether or not this Ellipse object is empty. Will return a value of true if the Ellipse objects dimensions are less than or equal to 0; otherwise false. If set to true it will reset all of the Ellipse objects properties to 0. An Ellipse object is empty if its width or height is less than or equal to 0. Gets or sets the empty state of the ellipse.

func (*Ellipse) GetBounds

func (self *Ellipse) GetBounds() *Rectangle

GetBounds Returns the framing rectangle of the ellipse as a Phaser.Rectangle object.

func (*Ellipse) GetBoundsI

func (self *Ellipse) GetBoundsI(args ...interface{}) *Rectangle

GetBoundsI Returns the framing rectangle of the ellipse as a Phaser.Rectangle object.

func (*Ellipse) Height

func (self *Ellipse) Height() int

Height The overall height of this ellipse.

func (*Ellipse) Left

func (self *Ellipse) Left() interface{}

Left The left coordinate of the Ellipse. The same as the X coordinate.

func (*Ellipse) Random

func (self *Ellipse) Random() *Point

Random Returns a uniformly distributed random point from anywhere within this Ellipse.

func (*Ellipse) Random1O

func (self *Ellipse) Random1O(out interface{}) *Point

Random1O Returns a uniformly distributed random point from anywhere within this Ellipse.

func (*Ellipse) RandomI

func (self *Ellipse) RandomI(args ...interface{}) *Point

RandomI Returns a uniformly distributed random point from anywhere within this Ellipse.

func (*Ellipse) Right

func (self *Ellipse) Right() int

Right The x coordinate of the rightmost point of the Ellipse. Changing the right property of an Ellipse object has no effect on the x property, but does adjust the width. Gets or sets the value of the rightmost point of the ellipse.

func (*Ellipse) SetBottomA

func (self *Ellipse) SetBottomA(member int)

SetBottomA The sum of the y and height properties. Changing the bottom property of an Ellipse doesn't adjust the y property, but does change the height. Gets or sets the bottom of the ellipse.

func (*Ellipse) SetEmptyA

func (self *Ellipse) SetEmptyA(member bool)

SetEmptyA Determines whether or not this Ellipse object is empty. Will return a value of true if the Ellipse objects dimensions are less than or equal to 0; otherwise false. If set to true it will reset all of the Ellipse objects properties to 0. An Ellipse object is empty if its width or height is less than or equal to 0. Gets or sets the empty state of the ellipse.

func (*Ellipse) SetHeightA

func (self *Ellipse) SetHeightA(member int)

SetHeightA The overall height of this ellipse.

func (*Ellipse) SetLeftA

func (self *Ellipse) SetLeftA(member interface{})

SetLeftA The left coordinate of the Ellipse. The same as the X coordinate.

func (*Ellipse) SetRightA

func (self *Ellipse) SetRightA(member int)

SetRightA The x coordinate of the rightmost point of the Ellipse. Changing the right property of an Ellipse object has no effect on the x property, but does adjust the width. Gets or sets the value of the rightmost point of the ellipse.

func (*Ellipse) SetTo

func (self *Ellipse) SetTo(x int, y int, width int, height int) *Ellipse

SetTo Sets the members of the Ellipse to the specified values.

func (*Ellipse) SetToI

func (self *Ellipse) SetToI(args ...interface{}) *Ellipse

SetToI Sets the members of the Ellipse to the specified values.

func (*Ellipse) SetTopA

func (self *Ellipse) SetTopA(member int)

SetTopA The top of the Ellipse. The same as its y property. Gets or sets the top of the ellipse.

func (*Ellipse) SetTypeA

func (self *Ellipse) SetTypeA(member int)

SetTypeA The const type of this object.

func (*Ellipse) SetWidthA

func (self *Ellipse) SetWidthA(member int)

SetWidthA The overall width of this ellipse.

func (*Ellipse) SetXA

func (self *Ellipse) SetXA(member int)

SetXA The X coordinate of the upper-left corner of the framing rectangle of this ellipse.

func (*Ellipse) SetYA

func (self *Ellipse) SetYA(member int)

SetYA The Y coordinate of the upper-left corner of the framing rectangle of this ellipse.

func (*Ellipse) ToString

func (self *Ellipse) ToString() string

ToString Returns a string representation of this object.

func (*Ellipse) ToStringI

func (self *Ellipse) ToStringI(args ...interface{}) string

ToStringI Returns a string representation of this object.

func (*Ellipse) Top

func (self *Ellipse) Top() int

Top The top of the Ellipse. The same as its y property. Gets or sets the top of the ellipse.

func (*Ellipse) Type

func (self *Ellipse) Type() int

Type The const type of this object.

func (*Ellipse) Width

func (self *Ellipse) Width() int

Width The overall width of this ellipse.

func (*Ellipse) X

func (self *Ellipse) X() int

X The X coordinate of the upper-left corner of the framing rectangle of this ellipse.

func (*Ellipse) Y

func (self *Ellipse) Y() int

Y The Y coordinate of the upper-left corner of the framing rectangle of this ellipse.

type Emitter

type Emitter struct{ *js.Object }

type Event

type Event struct {
	*js.Object
}

Event Creates an homogenous object for tracking events so users can know what to expect.

func NewEvent

func NewEvent(target interface{}, name string, data interface{}) *Event

NewEvent Creates an homogenous object for tracking events so users can know what to expect.

func NewEventI

func NewEventI(args ...interface{}) *Event

NewEventI Creates an homogenous object for tracking events so users can know what to expect.

func ToEvent

func ToEvent(jsStruct interface{}) *Event

Event Binding conversion method to Event point

func (*Event) Data

func (self *Event) Data() interface{}

Data The data that was passed in with this event.

func (*Event) SetDataA

func (self *Event) SetDataA(member interface{})

SetDataA The data that was passed in with this event.

func (*Event) SetTargetA

func (self *Event) SetTargetA(member interface{})

SetTargetA The original target the event triggered on.

func (*Event) SetTimeStampA

func (self *Event) SetTimeStampA(member int)

SetTimeStampA The timestamp when the event occurred.

func (*Event) SetTypeA

func (self *Event) SetTypeA(member string)

SetTypeA The string name of the event that this represents.

func (*Event) StopImmediatePropagation

func (self *Event) StopImmediatePropagation()

StopImmediatePropagation Stops the propagation of events to sibling listeners (no longer calls any listeners).

func (*Event) StopImmediatePropagationI

func (self *Event) StopImmediatePropagationI(args ...interface{})

StopImmediatePropagationI Stops the propagation of events to sibling listeners (no longer calls any listeners).

func (*Event) StopPropagation

func (self *Event) StopPropagation()

StopPropagation Stops the propagation of events up the scene graph (prevents bubbling).

func (*Event) StopPropagationI

func (self *Event) StopPropagationI(args ...interface{})

StopPropagationI Stops the propagation of events up the scene graph (prevents bubbling).

func (*Event) Target

func (self *Event) Target() interface{}

Target The original target the event triggered on.

func (*Event) TimeStamp

func (self *Event) TimeStamp() int

TimeStamp The timestamp when the event occurred.

func (*Event) Type

func (self *Event) Type() string

Type The string name of the event that this represents.

type EventTarget

type EventTarget struct {
	*js.Object
}

EventTarget Mixins event emitter functionality to a class

func NewEventTarget

func NewEventTarget() *EventTarget

NewEventTarget Mixins event emitter functionality to a class

func NewEventTargetI

func NewEventTargetI(args ...interface{}) *EventTarget

NewEventTargetI Mixins event emitter functionality to a class

func ToEventTarget

func ToEventTarget(jsStruct interface{}) *EventTarget

EventTarget Binding conversion method to EventTarget point

func (*EventTarget) Emit

func (self *EventTarget) Emit(eventName string) bool

Emit Emit an event to all registered event listeners.

func (*EventTarget) EmitI

func (self *EventTarget) EmitI(args ...interface{}) bool

EmitI Emit an event to all registered event listeners.

func (*EventTarget) Listeners

func (self *EventTarget) Listeners(eventName string) []interface{}

Listeners Return a list of assigned event listeners.

func (*EventTarget) ListenersI

func (self *EventTarget) ListenersI(args ...interface{}) []interface{}

ListenersI Return a list of assigned event listeners.

func (*EventTarget) Mixin

func (self *EventTarget) Mixin(object interface{})

Mixin Mixes in the properties of the EventTarget prototype onto another object

func (*EventTarget) MixinI

func (self *EventTarget) MixinI(args ...interface{})

MixinI Mixes in the properties of the EventTarget prototype onto another object

func (*EventTarget) Off

func (self *EventTarget) Off(eventName string, callback interface{})

Off Remove event listeners.

func (*EventTarget) OffI

func (self *EventTarget) OffI(args ...interface{})

OffI Remove event listeners.

func (*EventTarget) On

func (self *EventTarget) On(eventName string, callback interface{})

On Register a new EventListener for the given event.

func (*EventTarget) OnI

func (self *EventTarget) OnI(args ...interface{})

OnI Register a new EventListener for the given event.

func (*EventTarget) Once

func (self *EventTarget) Once(eventName string, callback interface{})

Once Add an EventListener that's only called once.

func (*EventTarget) OnceI

func (self *EventTarget) OnceI(args ...interface{})

OnceI Add an EventListener that's only called once.

func (*EventTarget) RemoveAllListeners

func (self *EventTarget) RemoveAllListeners(eventName string)

RemoveAllListeners Remove all listeners or only the listeners for the specified event.

func (*EventTarget) RemoveAllListenersI

func (self *EventTarget) RemoveAllListenersI(args ...interface{})

RemoveAllListenersI Remove all listeners or only the listeners for the specified event.

type Events

type Events struct {
	*js.Object
}

Events The Events component is a collection of events fired by the parent Game Object.

Phaser uses what are known as 'Signals' for all event handling. All of the events in this class are signals you can subscribe to, much in the same way you'd "listen" for an event.

For example to tell when a Sprite has been added to a new group, you can bind a function to the `onAddedToGroup` signal:

`sprite.events.onAddedToGroup.add(yourFunction, this);`

Where `yourFunction` is the function you want called when this event occurs.

For more details about how signals work please see the Phaser.Signal class.

The Input-related events will only be dispatched if the Sprite has had `inputEnabled` set to `true` and the Animation-related events only apply to game objects with animations like {@link Phaser.Sprite}.

func NewEvents

func NewEvents(sprite *Sprite) *Events

NewEvents The Events component is a collection of events fired by the parent Game Object.

Phaser uses what are known as 'Signals' for all event handling. All of the events in this class are signals you can subscribe to, much in the same way you'd "listen" for an event.

For example to tell when a Sprite has been added to a new group, you can bind a function to the `onAddedToGroup` signal:

`sprite.events.onAddedToGroup.add(yourFunction, this);`

Where `yourFunction` is the function you want called when this event occurs.

For more details about how signals work please see the Phaser.Signal class.

The Input-related events will only be dispatched if the Sprite has had `inputEnabled` set to `true` and the Animation-related events only apply to game objects with animations like {@link Phaser.Sprite}.

func NewEventsI

func NewEventsI(args ...interface{}) *Events

NewEventsI The Events component is a collection of events fired by the parent Game Object.

Phaser uses what are known as 'Signals' for all event handling. All of the events in this class are signals you can subscribe to, much in the same way you'd "listen" for an event.

For example to tell when a Sprite has been added to a new group, you can bind a function to the `onAddedToGroup` signal:

`sprite.events.onAddedToGroup.add(yourFunction, this);`

Where `yourFunction` is the function you want called when this event occurs.

For more details about how signals work please see the Phaser.Signal class.

The Input-related events will only be dispatched if the Sprite has had `inputEnabled` set to `true` and the Animation-related events only apply to game objects with animations like {@link Phaser.Sprite}.

func ToEvents

func ToEvents(jsStruct interface{}) *Events

Events Binding conversion method to Events point

func (*Events) Destroy

func (self *Events) Destroy()

Destroy Removes all events.

func (*Events) DestroyI

func (self *Events) DestroyI(args ...interface{})

DestroyI Removes all events.

func (*Events) OnAddedToGroup

func (self *Events) OnAddedToGroup() *Signal

OnAddedToGroup This signal is dispatched when this Game Object is added to a new Group. It is sent two arguments: {any} The Game Object that was added to the Group. {Phaser.Group} The Group it was added to.

func (*Events) OnAnimationComplete

func (self *Events) OnAnimationComplete() *Signal

OnAnimationComplete This signal is dispatched if the Game Object has the AnimationManager component, and an Animation has been stopped (via `animation.stop()` and the `dispatchComplete` argument has been set. You can also listen to `Animation.onComplete` rather than via the Game Objects events. It is sent two arguments: {any} The Game Object that received the event. {Phaser.Animation} The Phaser.Animation that was stopped.

func (*Events) OnAnimationLoop

func (self *Events) OnAnimationLoop() *Signal

OnAnimationLoop This signal is dispatched if the Game Object has the AnimationManager component, and an Animation has looped playback. You can also listen to `Animation.onLoop` rather than via the Game Objects events. It is sent two arguments: {any} The Game Object that received the event. {Phaser.Animation} The Phaser.Animation that looped.

func (*Events) OnAnimationStart

func (self *Events) OnAnimationStart() *Signal

OnAnimationStart This signal is dispatched if the Game Object has the AnimationManager component, and an Animation has been played. You can also listen to `Animation.onStart` rather than via the Game Objects events. It is sent two arguments: {any} The Game Object that received the event. {Phaser.Animation} The Phaser.Animation that was started.

func (*Events) OnDestroy

func (self *Events) OnDestroy() *Signal

OnDestroy This signal is dispatched when the Game Object is destroyed. This happens when `Sprite.destroy()` is called, or `Group.destroy()` with `destroyChildren` set to true. It is sent one argument: {any} The Game Object that was destroyed.

func (*Events) OnDragStart

func (self *Events) OnDragStart() *Signal

OnDragStart This signal is dispatched if the Game Object has been `inputEnabled` and `enableDrag` has been set. It is sent when a Phaser.Pointer starts to drag the Game Object, taking into consideration the various drag limitations that may be set. It is sent four arguments: {any} The Game Object that received the event. {Phaser.Pointer} The Phaser.Pointer object that caused the event. {number} The x coordinate that the drag started from. {number} The y coordinate that the drag started from.

func (*Events) OnDragStop

func (self *Events) OnDragStop() *Signal

OnDragStop This signal is dispatched if the Game Object has been `inputEnabled` and `enableDrag` has been set. It is sent when a Phaser.Pointer stops dragging the Game Object. It is sent two arguments: {any} The Game Object that received the event. {Phaser.Pointer} The Phaser.Pointer object that caused the event.

func (*Events) OnDragUpdate

func (self *Events) OnDragUpdate() *Signal

OnDragUpdate This signal is dispatched if the Game Object has been `inputEnabled` and `enableDrag` has been set. It is sent when a Phaser.Pointer is actively dragging the Game Object. Be warned: This is a high volume Signal. Be careful what you bind to it. It is sent six arguments: {any} The Game Object that received the event. {Phaser.Pointer} The Phaser.Pointer object that caused the event. {number} The new x coordinate of the Game Object. {number} The new y coordinate of the Game Object. {Phaser.Point} A Point object that contains the point the Game Object was snapped to, if `snapOnDrag` has been enabled. {boolean} The `fromStart` boolean, indicates if this is the first update immediately after the drag has started.

func (*Events) OnEnterBounds

func (self *Events) OnEnterBounds() *Signal

OnEnterBounds This signal is dispatched when the Game Object returns within the Phaser.World bounds, having previously been outside of them. This signal is only if `Sprite.checkWorldBounds` is set to `true`. It is sent one argument: {any} The Game Object that entered the World bounds.

func (*Events) OnInputDown

func (self *Events) OnInputDown() *Signal

OnInputDown This signal is dispatched if the Game Object has `inputEnabled` set to `true`, and receives a down event from a Phaser.Pointer. This effectively means the Pointer has been pressed down (but not yet released) on the Game Object. It is sent two arguments: {any} The Game Object that received the event. {Phaser.Pointer} The Phaser.Pointer object that caused the event.

func (*Events) OnInputOut

func (self *Events) OnInputOut() *Signal

OnInputOut This signal is dispatched if the Game Object has `inputEnabled` set to `true`, and receives an out event from a Phaser.Pointer, which was previously over it. It is sent two arguments: {any} The Game Object that received the event. {Phaser.Pointer} The Phaser.Pointer object that caused the event.

func (*Events) OnInputOver

func (self *Events) OnInputOver() *Signal

OnInputOver This signal is dispatched if the Game Object has `inputEnabled` set to `true`, and receives an over event from a Phaser.Pointer. It is sent two arguments: {any} The Game Object that received the event. {Phaser.Pointer} The Phaser.Pointer object that caused the event.

func (*Events) OnInputUp

func (self *Events) OnInputUp() *Signal

OnInputUp This signal is dispatched if the Game Object has `inputEnabled` set to `true`, and receives an up event from a Phaser.Pointer. This effectively means the Pointer had been pressed down, and was then released on the Game Object. It is sent three arguments: {any} The Game Object that received the event. {Phaser.Pointer} The Phaser.Pointer object that caused the event. {boolean} isOver - Is the Pointer still over the Game Object?

func (*Events) OnKilled

func (self *Events) OnKilled() *Signal

OnKilled This signal is dispatched when the Game Object is killed. This happens when `Sprite.kill()` is called. Please understand the difference between `kill` and `destroy` by looking at their respective methods. It is sent one argument: {any} The Game Object that was killed.

func (*Events) OnOutOfBounds

func (self *Events) OnOutOfBounds() *Signal

OnOutOfBounds This signal is dispatched when the Game Object leaves the Phaser.World bounds. This signal is only if `Sprite.checkWorldBounds` is set to `true`. It is sent one argument: {any} The Game Object that left the World bounds.

func (*Events) OnRemovedFromGroup

func (self *Events) OnRemovedFromGroup() *Signal

OnRemovedFromGroup This signal is dispatched when the Game Object is removed from a Group. It is sent two arguments: {any} The Game Object that was removed from the Group. {Phaser.Group} The Group it was removed from.

func (*Events) OnRemovedFromWorld

func (self *Events) OnRemovedFromWorld() *Signal

OnRemovedFromWorld This Signal is never used internally by Phaser and is now deprecated.

func (*Events) OnRevived

func (self *Events) OnRevived() *Signal

OnRevived This signal is dispatched when the Game Object is revived from a previously killed state. This happens when `Sprite.revive()` is called. It is sent one argument: {any} The Game Object that was revived.

func (*Events) Parent

func (self *Events) Parent() *Sprite

Parent The Sprite that owns these events.

func (*Events) SetOnAddedToGroupA

func (self *Events) SetOnAddedToGroupA(member *Signal)

SetOnAddedToGroupA This signal is dispatched when this Game Object is added to a new Group. It is sent two arguments: {any} The Game Object that was added to the Group. {Phaser.Group} The Group it was added to.

func (*Events) SetOnAnimationCompleteA

func (self *Events) SetOnAnimationCompleteA(member *Signal)

SetOnAnimationCompleteA This signal is dispatched if the Game Object has the AnimationManager component, and an Animation has been stopped (via `animation.stop()` and the `dispatchComplete` argument has been set. You can also listen to `Animation.onComplete` rather than via the Game Objects events. It is sent two arguments: {any} The Game Object that received the event. {Phaser.Animation} The Phaser.Animation that was stopped.

func (*Events) SetOnAnimationLoopA

func (self *Events) SetOnAnimationLoopA(member *Signal)

SetOnAnimationLoopA This signal is dispatched if the Game Object has the AnimationManager component, and an Animation has looped playback. You can also listen to `Animation.onLoop` rather than via the Game Objects events. It is sent two arguments: {any} The Game Object that received the event. {Phaser.Animation} The Phaser.Animation that looped.

func (*Events) SetOnAnimationStartA

func (self *Events) SetOnAnimationStartA(member *Signal)

SetOnAnimationStartA This signal is dispatched if the Game Object has the AnimationManager component, and an Animation has been played. You can also listen to `Animation.onStart` rather than via the Game Objects events. It is sent two arguments: {any} The Game Object that received the event. {Phaser.Animation} The Phaser.Animation that was started.

func (*Events) SetOnDestroyA

func (self *Events) SetOnDestroyA(member *Signal)

SetOnDestroyA This signal is dispatched when the Game Object is destroyed. This happens when `Sprite.destroy()` is called, or `Group.destroy()` with `destroyChildren` set to true. It is sent one argument: {any} The Game Object that was destroyed.

func (*Events) SetOnDragStartA

func (self *Events) SetOnDragStartA(member *Signal)

SetOnDragStartA This signal is dispatched if the Game Object has been `inputEnabled` and `enableDrag` has been set. It is sent when a Phaser.Pointer starts to drag the Game Object, taking into consideration the various drag limitations that may be set. It is sent four arguments: {any} The Game Object that received the event. {Phaser.Pointer} The Phaser.Pointer object that caused the event. {number} The x coordinate that the drag started from. {number} The y coordinate that the drag started from.

func (*Events) SetOnDragStopA

func (self *Events) SetOnDragStopA(member *Signal)

SetOnDragStopA This signal is dispatched if the Game Object has been `inputEnabled` and `enableDrag` has been set. It is sent when a Phaser.Pointer stops dragging the Game Object. It is sent two arguments: {any} The Game Object that received the event. {Phaser.Pointer} The Phaser.Pointer object that caused the event.

func (*Events) SetOnDragUpdateA

func (self *Events) SetOnDragUpdateA(member *Signal)

SetOnDragUpdateA This signal is dispatched if the Game Object has been `inputEnabled` and `enableDrag` has been set. It is sent when a Phaser.Pointer is actively dragging the Game Object. Be warned: This is a high volume Signal. Be careful what you bind to it. It is sent six arguments: {any} The Game Object that received the event. {Phaser.Pointer} The Phaser.Pointer object that caused the event. {number} The new x coordinate of the Game Object. {number} The new y coordinate of the Game Object. {Phaser.Point} A Point object that contains the point the Game Object was snapped to, if `snapOnDrag` has been enabled. {boolean} The `fromStart` boolean, indicates if this is the first update immediately after the drag has started.

func (*Events) SetOnEnterBoundsA

func (self *Events) SetOnEnterBoundsA(member *Signal)

SetOnEnterBoundsA This signal is dispatched when the Game Object returns within the Phaser.World bounds, having previously been outside of them. This signal is only if `Sprite.checkWorldBounds` is set to `true`. It is sent one argument: {any} The Game Object that entered the World bounds.

func (*Events) SetOnInputDownA

func (self *Events) SetOnInputDownA(member *Signal)

SetOnInputDownA This signal is dispatched if the Game Object has `inputEnabled` set to `true`, and receives a down event from a Phaser.Pointer. This effectively means the Pointer has been pressed down (but not yet released) on the Game Object. It is sent two arguments: {any} The Game Object that received the event. {Phaser.Pointer} The Phaser.Pointer object that caused the event.

func (*Events) SetOnInputOutA

func (self *Events) SetOnInputOutA(member *Signal)

SetOnInputOutA This signal is dispatched if the Game Object has `inputEnabled` set to `true`, and receives an out event from a Phaser.Pointer, which was previously over it. It is sent two arguments: {any} The Game Object that received the event. {Phaser.Pointer} The Phaser.Pointer object that caused the event.

func (*Events) SetOnInputOverA

func (self *Events) SetOnInputOverA(member *Signal)

SetOnInputOverA This signal is dispatched if the Game Object has `inputEnabled` set to `true`, and receives an over event from a Phaser.Pointer. It is sent two arguments: {any} The Game Object that received the event. {Phaser.Pointer} The Phaser.Pointer object that caused the event.

func (*Events) SetOnInputUpA

func (self *Events) SetOnInputUpA(member *Signal)

SetOnInputUpA This signal is dispatched if the Game Object has `inputEnabled` set to `true`, and receives an up event from a Phaser.Pointer. This effectively means the Pointer had been pressed down, and was then released on the Game Object. It is sent three arguments: {any} The Game Object that received the event. {Phaser.Pointer} The Phaser.Pointer object that caused the event. {boolean} isOver - Is the Pointer still over the Game Object?

func (*Events) SetOnKilledA

func (self *Events) SetOnKilledA(member *Signal)

SetOnKilledA This signal is dispatched when the Game Object is killed. This happens when `Sprite.kill()` is called. Please understand the difference between `kill` and `destroy` by looking at their respective methods. It is sent one argument: {any} The Game Object that was killed.

func (*Events) SetOnOutOfBoundsA

func (self *Events) SetOnOutOfBoundsA(member *Signal)

SetOnOutOfBoundsA This signal is dispatched when the Game Object leaves the Phaser.World bounds. This signal is only if `Sprite.checkWorldBounds` is set to `true`. It is sent one argument: {any} The Game Object that left the World bounds.

func (*Events) SetOnRemovedFromGroupA

func (self *Events) SetOnRemovedFromGroupA(member *Signal)

SetOnRemovedFromGroupA This signal is dispatched when the Game Object is removed from a Group. It is sent two arguments: {any} The Game Object that was removed from the Group. {Phaser.Group} The Group it was removed from.

func (*Events) SetOnRemovedFromWorldA

func (self *Events) SetOnRemovedFromWorldA(member *Signal)

SetOnRemovedFromWorldA This Signal is never used internally by Phaser and is now deprecated.

func (*Events) SetOnRevivedA

func (self *Events) SetOnRevivedA(member *Signal)

SetOnRevivedA This signal is dispatched when the Game Object is revived from a previously killed state. This happens when `Sprite.revive()` is called. It is sent one argument: {any} The Game Object that was revived.

func (*Events) SetParentA

func (self *Events) SetParentA(member *Sprite)

SetParentA The Sprite that owns these events.

type Filter

type Filter struct {
	*js.Object
}

Filter This is a base Filter class to use for any Phaser filter development.

The vast majority of filters (including all of those that ship with Phaser) use fragment shaders, and therefore only work in WebGL and are not supported by Canvas at all.

func NewFilter

func NewFilter(game *Game, uniforms interface{}, fragmentSrc interface{}) *Filter

NewFilter This is a base Filter class to use for any Phaser filter development.

The vast majority of filters (including all of those that ship with Phaser) use fragment shaders, and therefore only work in WebGL and are not supported by Canvas at all.

func NewFilterI

func NewFilterI(args ...interface{}) *Filter

NewFilterI This is a base Filter class to use for any Phaser filter development.

The vast majority of filters (including all of those that ship with Phaser) use fragment shaders, and therefore only work in WebGL and are not supported by Canvas at all.

func ToFilter

func ToFilter(jsStruct interface{}) *Filter

Filter Binding conversion method to Filter point

func (*Filter) AddToWorld

func (self *Filter) AddToWorld() *Image

AddToWorld Creates a new Phaser.Image object using a blank texture and assigns this Filter to it. The image is then added to the world.

If you don't provide width and height values then Filter.width and Filter.height are used.

If you do provide width and height values then this filter will be resized to match those values.

func (*Filter) AddToWorld1O

func (self *Filter) AddToWorld1O(x int) *Image

AddToWorld1O Creates a new Phaser.Image object using a blank texture and assigns this Filter to it. The image is then added to the world.

If you don't provide width and height values then Filter.width and Filter.height are used.

If you do provide width and height values then this filter will be resized to match those values.

func (*Filter) AddToWorld2O

func (self *Filter) AddToWorld2O(x int, y int) *Image

AddToWorld2O Creates a new Phaser.Image object using a blank texture and assigns this Filter to it. The image is then added to the world.

If you don't provide width and height values then Filter.width and Filter.height are used.

If you do provide width and height values then this filter will be resized to match those values.

func (*Filter) AddToWorld3O

func (self *Filter) AddToWorld3O(x int, y int, width int) *Image

AddToWorld3O Creates a new Phaser.Image object using a blank texture and assigns this Filter to it. The image is then added to the world.

If you don't provide width and height values then Filter.width and Filter.height are used.

If you do provide width and height values then this filter will be resized to match those values.

func (*Filter) AddToWorld4O

func (self *Filter) AddToWorld4O(x int, y int, width int, height int) *Image

AddToWorld4O Creates a new Phaser.Image object using a blank texture and assigns this Filter to it. The image is then added to the world.

If you don't provide width and height values then Filter.width and Filter.height are used.

If you do provide width and height values then this filter will be resized to match those values.

func (*Filter) AddToWorld5O

func (self *Filter) AddToWorld5O(x int, y int, width int, height int, anchorX int) *Image

AddToWorld5O Creates a new Phaser.Image object using a blank texture and assigns this Filter to it. The image is then added to the world.

If you don't provide width and height values then Filter.width and Filter.height are used.

If you do provide width and height values then this filter will be resized to match those values.

func (*Filter) AddToWorld6O

func (self *Filter) AddToWorld6O(x int, y int, width int, height int, anchorX int, anchorY int) *Image

AddToWorld6O Creates a new Phaser.Image object using a blank texture and assigns this Filter to it. The image is then added to the world.

If you don't provide width and height values then Filter.width and Filter.height are used.

If you do provide width and height values then this filter will be resized to match those values.

func (*Filter) AddToWorldI

func (self *Filter) AddToWorldI(args ...interface{}) *Image

AddToWorldI Creates a new Phaser.Image object using a blank texture and assigns this Filter to it. The image is then added to the world.

If you don't provide width and height values then Filter.width and Filter.height are used.

If you do provide width and height values then this filter will be resized to match those values.

func (*Filter) Destroy

func (self *Filter) Destroy()

Destroy Clear down this Filter and null out references

func (*Filter) DestroyI

func (self *Filter) DestroyI(args ...interface{})

DestroyI Clear down this Filter and null out references

func (*Filter) Dirty

func (self *Filter) Dirty() bool

Dirty Internal PIXI var.

func (*Filter) FragmentSrc

func (self *Filter) FragmentSrc() interface{}

FragmentSrc The fragment shader code.

func (*Filter) Game

func (self *Filter) Game() *Game

Game A reference to the currently running game.

func (*Filter) Height

func (self *Filter) Height() int

Height The height (resolution uniform)

func (*Filter) Init

func (self *Filter) Init()

Init Should be over-ridden.

func (*Filter) InitI

func (self *Filter) InitI(args ...interface{})

InitI Should be over-ridden.

func (*Filter) Padding

func (self *Filter) Padding() int

Padding Internal PIXI var.

func (*Filter) PrevPoint

func (self *Filter) PrevPoint() *Point

PrevPoint The previous position of the pointer (we don't update the uniform if the same)

func (*Filter) SetDirtyA

func (self *Filter) SetDirtyA(member bool)

SetDirtyA Internal PIXI var.

func (*Filter) SetFragmentSrcA

func (self *Filter) SetFragmentSrcA(member interface{})

SetFragmentSrcA The fragment shader code.

func (*Filter) SetGameA

func (self *Filter) SetGameA(member *Game)

SetGameA A reference to the currently running game.

func (*Filter) SetHeightA

func (self *Filter) SetHeightA(member int)

SetHeightA The height (resolution uniform)

func (*Filter) SetPaddingA

func (self *Filter) SetPaddingA(member int)

SetPaddingA Internal PIXI var.

func (*Filter) SetPrevPointA

func (self *Filter) SetPrevPointA(member *Point)

SetPrevPointA The previous position of the pointer (we don't update the uniform if the same)

func (*Filter) SetResolution

func (self *Filter) SetResolution(width int, height int)

SetResolution Set the resolution uniforms on the filter.

func (*Filter) SetResolutionI

func (self *Filter) SetResolutionI(args ...interface{})

SetResolutionI Set the resolution uniforms on the filter.

func (*Filter) SetTypeA

func (self *Filter) SetTypeA(member int)

SetTypeA The const type of this object, either Phaser.WEBGL_FILTER or Phaser.CANVAS_FILTER.

func (*Filter) SetUniformsA

func (self *Filter) SetUniformsA(member interface{})

SetUniformsA Default uniform mappings. Compatible with ShaderToy and GLSLSandbox.

func (*Filter) SetWidthA

func (self *Filter) SetWidthA(member int)

SetWidthA The width (resolution uniform)

func (*Filter) Type

func (self *Filter) Type() int

Type The const type of this object, either Phaser.WEBGL_FILTER or Phaser.CANVAS_FILTER.

func (*Filter) Uniforms

func (self *Filter) Uniforms() interface{}

Uniforms Default uniform mappings. Compatible with ShaderToy and GLSLSandbox.

func (*Filter) Update

func (self *Filter) Update()

Update Updates the filter.

func (*Filter) Update1O

func (self *Filter) Update1O(pointer *Pointer)

Update1O Updates the filter.

func (*Filter) UpdateI

func (self *Filter) UpdateI(args ...interface{})

UpdateI Updates the filter.

func (*Filter) Width

func (self *Filter) Width() int

Width The width (resolution uniform)

type FilterTexture

type FilterTexture struct {
	*js.Object
}

FilterTexture empty description

func NewFilterTexture

func NewFilterTexture(gl *WebGLContext, width int, height int, scaleMode int) *FilterTexture

NewFilterTexture empty description

func NewFilterTextureI

func NewFilterTextureI(args ...interface{}) *FilterTexture

NewFilterTextureI empty description

func ToFilterTexture

func ToFilterTexture(jsStruct interface{}) *FilterTexture

FilterTexture Binding conversion method to FilterTexture point

func (*FilterTexture) Clear

func (self *FilterTexture) Clear()

Clear Clears the filter texture.

func (*FilterTexture) ClearI

func (self *FilterTexture) ClearI(args ...interface{})

ClearI Clears the filter texture.

func (*FilterTexture) Destroy

func (self *FilterTexture) Destroy()

Destroy Destroys the filter texture.

func (*FilterTexture) DestroyI

func (self *FilterTexture) DestroyI(args ...interface{})

DestroyI Destroys the filter texture.

func (*FilterTexture) FrameBuffer

func (self *FilterTexture) FrameBuffer() interface{}

FrameBuffer empty description

func (*FilterTexture) Gl

func (self *FilterTexture) Gl() WebGLContext

Gl empty description

func (*FilterTexture) Resize

func (self *FilterTexture) Resize(width int, height int)

Resize Resizes the texture to the specified width and height

func (*FilterTexture) ResizeI

func (self *FilterTexture) ResizeI(args ...interface{})

ResizeI Resizes the texture to the specified width and height

func (*FilterTexture) ScaleMode

func (self *FilterTexture) ScaleMode() int

ScaleMode empty description

func (*FilterTexture) SetFrameBufferA

func (self *FilterTexture) SetFrameBufferA(member interface{})

SetFrameBufferA empty description

func (*FilterTexture) SetGlA

func (self *FilterTexture) SetGlA(member WebGLContext)

SetGlA empty description

func (*FilterTexture) SetScaleModeA

func (self *FilterTexture) SetScaleModeA(member int)

SetScaleModeA empty description

func (*FilterTexture) SetTextureA

func (self *FilterTexture) SetTextureA(member interface{})

SetTextureA empty description

func (*FilterTexture) Texture

func (self *FilterTexture) Texture() interface{}

Texture empty description

type FlexGrid

type FlexGrid struct {
	*js.Object
}

FlexGrid WARNING: This is an EXPERIMENTAL class. The API will change significantly in the coming versions and is incomplete. Please try to avoid using in production games with a long time to build. This is also why the documentation is incomplete.

FlexGrid is a a responsive grid manager that works in conjunction with the ScaleManager RESIZE scaling mode and FlexLayers to provide for game object positioning in a responsive manner.

func NewFlexGrid

func NewFlexGrid(manager *ScaleManager, width int, height int) *FlexGrid

NewFlexGrid WARNING: This is an EXPERIMENTAL class. The API will change significantly in the coming versions and is incomplete. Please try to avoid using in production games with a long time to build. This is also why the documentation is incomplete.

FlexGrid is a a responsive grid manager that works in conjunction with the ScaleManager RESIZE scaling mode and FlexLayers to provide for game object positioning in a responsive manner.

func NewFlexGridI

func NewFlexGridI(args ...interface{}) *FlexGrid

NewFlexGridI WARNING: This is an EXPERIMENTAL class. The API will change significantly in the coming versions and is incomplete. Please try to avoid using in production games with a long time to build. This is also why the documentation is incomplete.

FlexGrid is a a responsive grid manager that works in conjunction with the ScaleManager RESIZE scaling mode and FlexLayers to provide for game object positioning in a responsive manner.

func ToFlexGrid

func ToFlexGrid(jsStruct interface{}) *FlexGrid

FlexGrid Binding conversion method to FlexGrid point

func (*FlexGrid) CreateCustomLayer

func (self *FlexGrid) CreateCustomLayer(width int, height int) *FlexLayer

CreateCustomLayer A custom layer is centered on the game and maintains its aspect ratio as it scales up and down.

func (*FlexGrid) CreateCustomLayer1O

func (self *FlexGrid) CreateCustomLayer1O(width int, height int, children []DisplayObject) *FlexLayer

CreateCustomLayer1O A custom layer is centered on the game and maintains its aspect ratio as it scales up and down.

func (*FlexGrid) CreateCustomLayerI

func (self *FlexGrid) CreateCustomLayerI(args ...interface{}) *FlexLayer

CreateCustomLayerI A custom layer is centered on the game and maintains its aspect ratio as it scales up and down.

func (*FlexGrid) CreateFixedLayer

func (self *FlexGrid) CreateFixedLayer() *FlexLayer

CreateFixedLayer A fixed layer is centered on the game and is the size of the required dimensions and is never scaled.

func (*FlexGrid) CreateFixedLayer1O

func (self *FlexGrid) CreateFixedLayer1O(children []DisplayObject) *FlexLayer

CreateFixedLayer1O A fixed layer is centered on the game and is the size of the required dimensions and is never scaled.

func (*FlexGrid) CreateFixedLayerI

func (self *FlexGrid) CreateFixedLayerI(args ...interface{}) *FlexLayer

CreateFixedLayerI A fixed layer is centered on the game and is the size of the required dimensions and is never scaled.

func (*FlexGrid) CreateFluidLayer

func (self *FlexGrid) CreateFluidLayer() *FlexLayer

CreateFluidLayer A fluid layer is centered on the game and maintains its aspect ratio as it scales up and down.

func (*FlexGrid) CreateFluidLayer1O

func (self *FlexGrid) CreateFluidLayer1O(children []interface{}) *FlexLayer

CreateFluidLayer1O A fluid layer is centered on the game and maintains its aspect ratio as it scales up and down.

func (*FlexGrid) CreateFluidLayerI

func (self *FlexGrid) CreateFluidLayerI(args ...interface{}) *FlexLayer

CreateFluidLayerI A fluid layer is centered on the game and maintains its aspect ratio as it scales up and down.

func (*FlexGrid) CreateFullLayer

func (self *FlexGrid) CreateFullLayer() *FlexLayer

CreateFullLayer A full layer is placed at 0,0 and extends to the full size of the game. Children are scaled according to the fluid ratios.

func (*FlexGrid) CreateFullLayer1O

func (self *FlexGrid) CreateFullLayer1O(children []interface{}) *FlexLayer

CreateFullLayer1O A full layer is placed at 0,0 and extends to the full size of the game. Children are scaled according to the fluid ratios.

func (*FlexGrid) CreateFullLayerI

func (self *FlexGrid) CreateFullLayerI(args ...interface{}) *FlexLayer

CreateFullLayerI A full layer is placed at 0,0 and extends to the full size of the game. Children are scaled according to the fluid ratios.

func (*FlexGrid) Debug

func (self *FlexGrid) Debug()

Debug Call in the render function to output the bounds rects.

func (*FlexGrid) DebugI

func (self *FlexGrid) DebugI(args ...interface{})

DebugI Call in the render function to output the bounds rects.

func (*FlexGrid) FitSprite

func (self *FlexGrid) FitSprite(sprite *Sprite)

FitSprite Fits a sprites width to the bounds.

func (*FlexGrid) FitSpriteI

func (self *FlexGrid) FitSpriteI(args ...interface{})

FitSpriteI Fits a sprites width to the bounds.

func (*FlexGrid) Game

func (self *FlexGrid) Game() *Game

Game A reference to the currently running Game.

func (*FlexGrid) Manager

func (self *FlexGrid) Manager() *ScaleManager

Manager A reference to the ScaleManager.

func (*FlexGrid) OnResize

func (self *FlexGrid) OnResize(width int, height int)

OnResize Called when the game container changes dimensions.

func (*FlexGrid) OnResizeI

func (self *FlexGrid) OnResizeI(args ...interface{})

OnResizeI Called when the game container changes dimensions.

func (*FlexGrid) PositionCustom

func (self *FlexGrid) PositionCustom() interface{}

PositionCustom -

func (*FlexGrid) Refresh

func (self *FlexGrid) Refresh()

Refresh Updates all internal vars such as the bounds and scale values.

func (*FlexGrid) RefreshI

func (self *FlexGrid) RefreshI(args ...interface{})

RefreshI Updates all internal vars such as the bounds and scale values.

func (*FlexGrid) Reset

func (self *FlexGrid) Reset()

Reset Resets the layer children references

func (*FlexGrid) ResetI

func (self *FlexGrid) ResetI(args ...interface{})

ResetI Resets the layer children references

func (*FlexGrid) ScaleCustom

func (self *FlexGrid) ScaleCustom() interface{}

ScaleCustom The scale factor based on the game dimensions vs. the scaled dimensions.

func (*FlexGrid) SetGameA

func (self *FlexGrid) SetGameA(member *Game)

SetGameA A reference to the currently running Game.

func (*FlexGrid) SetManagerA

func (self *FlexGrid) SetManagerA(member *ScaleManager)

SetManagerA A reference to the ScaleManager.

func (*FlexGrid) SetPositionCustomA

func (self *FlexGrid) SetPositionCustomA(member interface{})

SetPositionCustomA -

func (*FlexGrid) SetScaleCustomA

func (self *FlexGrid) SetScaleCustomA(member interface{})

SetScaleCustomA The scale factor based on the game dimensions vs. the scaled dimensions.

func (*FlexGrid) SetSize

func (self *FlexGrid) SetSize(width int, height int)

SetSize Sets the core game size. This resets the w/h parameters and bounds.

func (*FlexGrid) SetSizeI

func (self *FlexGrid) SetSizeI(args ...interface{})

SetSizeI Sets the core game size. This resets the w/h parameters and bounds.

type FlexLayer

type FlexLayer struct {
	*js.Object
}

FlexLayer WARNING: This is an EXPERIMENTAL class. The API will change significantly in the coming versions and is incomplete. Please try to avoid using in production games with a long time to build. This is also why the documentation is incomplete.

A responsive grid layer.

func NewFlexLayer

func NewFlexLayer(manager *FlexGrid, position *Point, bounds *Rectangle, scale *Point) *FlexLayer

NewFlexLayer WARNING: This is an EXPERIMENTAL class. The API will change significantly in the coming versions and is incomplete. Please try to avoid using in production games with a long time to build. This is also why the documentation is incomplete.

A responsive grid layer.

func NewFlexLayerI

func NewFlexLayerI(args ...interface{}) *FlexLayer

NewFlexLayerI WARNING: This is an EXPERIMENTAL class. The API will change significantly in the coming versions and is incomplete. Please try to avoid using in production games with a long time to build. This is also why the documentation is incomplete.

A responsive grid layer.

func ToFlexLayer

func ToFlexLayer(jsStruct interface{}) *FlexLayer

FlexLayer Binding conversion method to FlexLayer point

func (*FlexLayer) Add

func (self *FlexLayer) Add(child *DisplayObject) *DisplayObject

Add Adds an existing object as the top child in this group.

The child is automatically added to the top of the group, and is displayed above every previous child.

Or if the _optional_ index is specified, the child is added at the location specified by the index value, this allows you to control child ordering.

If the child was already in this Group, it is simply returned, and nothing else happens to it.

If `Group.enableBody` is set, then a physics body will be created on the object, so long as one does not already exist.

If `Group.inputEnableChildren` is set, then an Input Handler will be created on the object, so long as one does not already exist.

Use {@link Phaser.Group#addAt addAt} to control where a child is added. Use {@link Phaser.Group#create create} to create and add a new child.

func (*FlexLayer) Add1O

func (self *FlexLayer) Add1O(child *DisplayObject, silent bool) *DisplayObject

Add1O Adds an existing object as the top child in this group.

The child is automatically added to the top of the group, and is displayed above every previous child.

Or if the _optional_ index is specified, the child is added at the location specified by the index value, this allows you to control child ordering.

If the child was already in this Group, it is simply returned, and nothing else happens to it.

If `Group.enableBody` is set, then a physics body will be created on the object, so long as one does not already exist.

If `Group.inputEnableChildren` is set, then an Input Handler will be created on the object, so long as one does not already exist.

Use {@link Phaser.Group#addAt addAt} to control where a child is added. Use {@link Phaser.Group#create create} to create and add a new child.

func (*FlexLayer) Add2O

func (self *FlexLayer) Add2O(child *DisplayObject, silent bool, index int) *DisplayObject

Add2O Adds an existing object as the top child in this group.

The child is automatically added to the top of the group, and is displayed above every previous child.

Or if the _optional_ index is specified, the child is added at the location specified by the index value, this allows you to control child ordering.

If the child was already in this Group, it is simply returned, and nothing else happens to it.

If `Group.enableBody` is set, then a physics body will be created on the object, so long as one does not already exist.

If `Group.inputEnableChildren` is set, then an Input Handler will be created on the object, so long as one does not already exist.

Use {@link Phaser.Group#addAt addAt} to control where a child is added. Use {@link Phaser.Group#create create} to create and add a new child.

func (*FlexLayer) AddAll

func (self *FlexLayer) AddAll(property string, amount int, checkAlive bool, checkVisible bool)

AddAll Adds the amount to the given property on all children in this group.

`Group.addAll('x', 10)` will add 10 to the child.x value for each child.

func (*FlexLayer) AddAllI

func (self *FlexLayer) AddAllI(args ...interface{})

AddAllI Adds the amount to the given property on all children in this group.

`Group.addAll('x', 10)` will add 10 to the child.x value for each child.

func (*FlexLayer) AddAt

func (self *FlexLayer) AddAt(child *DisplayObject) *DisplayObject

AddAt Adds an existing object to this group.

The child is added to the group at the location specified by the index value, this allows you to control child ordering.

If `Group.enableBody` is set, then a physics body will be created on the object, so long as one does not already exist.

If `Group.inputEnableChildren` is set, then an Input Handler will be created on the object, so long as one does not already exist.

func (*FlexLayer) AddAt1O

func (self *FlexLayer) AddAt1O(child *DisplayObject, index int) *DisplayObject

AddAt1O Adds an existing object to this group.

The child is added to the group at the location specified by the index value, this allows you to control child ordering.

If `Group.enableBody` is set, then a physics body will be created on the object, so long as one does not already exist.

If `Group.inputEnableChildren` is set, then an Input Handler will be created on the object, so long as one does not already exist.

func (*FlexLayer) AddAt2O

func (self *FlexLayer) AddAt2O(child *DisplayObject, index int, silent bool) *DisplayObject

AddAt2O Adds an existing object to this group.

The child is added to the group at the location specified by the index value, this allows you to control child ordering.

If `Group.enableBody` is set, then a physics body will be created on the object, so long as one does not already exist.

If `Group.inputEnableChildren` is set, then an Input Handler will be created on the object, so long as one does not already exist.

func (*FlexLayer) AddAtI

func (self *FlexLayer) AddAtI(args ...interface{}) *DisplayObject

AddAtI Adds an existing object to this group.

The child is added to the group at the location specified by the index value, this allows you to control child ordering.

If `Group.enableBody` is set, then a physics body will be created on the object, so long as one does not already exist.

If `Group.inputEnableChildren` is set, then an Input Handler will be created on the object, so long as one does not already exist.

func (*FlexLayer) AddChild

func (self *FlexLayer) AddChild(child *DisplayObject) *DisplayObject

AddChild Adds a child to the container.

func (*FlexLayer) AddChildAt

func (self *FlexLayer) AddChildAt(child *DisplayObject, index int) *DisplayObject

AddChildAt Adds a child to the container at a specified index. If the index is out of bounds an error will be thrown

func (*FlexLayer) AddChildAtI

func (self *FlexLayer) AddChildAtI(args ...interface{}) *DisplayObject

AddChildAtI Adds a child to the container at a specified index. If the index is out of bounds an error will be thrown

func (*FlexLayer) AddChildI

func (self *FlexLayer) AddChildI(args ...interface{}) *DisplayObject

AddChildI Adds a child to the container.

func (*FlexLayer) AddI

func (self *FlexLayer) AddI(args ...interface{}) *DisplayObject

AddI Adds an existing object as the top child in this group.

The child is automatically added to the top of the group, and is displayed above every previous child.

Or if the _optional_ index is specified, the child is added at the location specified by the index value, this allows you to control child ordering.

If the child was already in this Group, it is simply returned, and nothing else happens to it.

If `Group.enableBody` is set, then a physics body will be created on the object, so long as one does not already exist.

If `Group.inputEnableChildren` is set, then an Input Handler will be created on the object, so long as one does not already exist.

Use {@link Phaser.Group#addAt addAt} to control where a child is added. Use {@link Phaser.Group#create create} to create and add a new child.

func (*FlexLayer) AddMultiple

func (self *FlexLayer) AddMultiple(children interface{}) interface{}

AddMultiple Adds an array of existing Display Objects to this Group.

The Display Objects are automatically added to the top of this Group, and will render on-top of everything already in this Group.

As well as an array you can also pass another Group as the first argument. In this case all of the children from that Group will be removed from it and added into this Group.

If `Group.enableBody` is set, then a physics body will be created on the objects, so long as one does not already exist.

If `Group.inputEnableChildren` is set, then an Input Handler will be created on the objects, so long as one does not already exist.

func (*FlexLayer) AddMultiple1O

func (self *FlexLayer) AddMultiple1O(children interface{}, silent bool) interface{}

AddMultiple1O Adds an array of existing Display Objects to this Group.

The Display Objects are automatically added to the top of this Group, and will render on-top of everything already in this Group.

As well as an array you can also pass another Group as the first argument. In this case all of the children from that Group will be removed from it and added into this Group.

If `Group.enableBody` is set, then a physics body will be created on the objects, so long as one does not already exist.

If `Group.inputEnableChildren` is set, then an Input Handler will be created on the objects, so long as one does not already exist.

func (*FlexLayer) AddMultipleI

func (self *FlexLayer) AddMultipleI(args ...interface{}) interface{}

AddMultipleI Adds an array of existing Display Objects to this Group.

The Display Objects are automatically added to the top of this Group, and will render on-top of everything already in this Group.

As well as an array you can also pass another Group as the first argument. In this case all of the children from that Group will be removed from it and added into this Group.

If `Group.enableBody` is set, then a physics body will be created on the objects, so long as one does not already exist.

If `Group.inputEnableChildren` is set, then an Input Handler will be created on the objects, so long as one does not already exist.

func (*FlexLayer) AddToHash

func (self *FlexLayer) AddToHash(child *DisplayObject) bool

AddToHash Adds a child of this Group into the hash array. This call will return false if the child is not a child of this Group, or is already in the hash.

func (*FlexLayer) AddToHashI

func (self *FlexLayer) AddToHashI(args ...interface{}) bool

AddToHashI Adds a child of this Group into the hash array. This call will return false if the child is not a child of this Group, or is already in the hash.

func (*FlexLayer) Align

func (self *FlexLayer) Align(width int, height int, cellWidth int, cellHeight int) bool

Align This method iterates through all children in the Group (regardless if they are visible or exist) and then changes their position so they are arranged in a Grid formation. Children must have the `alignTo` method in order to be positioned by this call. All default Phaser Game Objects have this.

The grid dimensions are determined by the first four arguments. The `width` and `height` arguments relate to the width and height of the grid respectively.

For example if the Group had 100 children in it:

`Group.align(10, 10, 32, 32)`

This will align all of the children into a grid formation of 10x10, using 32 pixels per grid cell. If you want a wider grid, you could do:

`Group.align(25, 4, 32, 32)`

This will align the children into a grid of 25x4, again using 32 pixels per grid cell.

You can choose to set _either_ the `width` or `height` value to -1. Doing so tells the method to keep on aligning children until there are no children left. For example if this Group had 48 children in it, the following:

`Group.align(-1, 8, 32, 32)`

... will align the children so that there are 8 children vertically (the second argument), and each row will contain 6 sprites, except the last one, which will contain 5 (totaling 48)

You can also do:

`Group.align(10, -1, 32, 32)`

In this case it will create a grid 10 wide, and as tall as it needs to be in order to fit all of the children in.

The `position` property allows you to control where in each grid cell the child is positioned. This is a constant and can be one of `Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` or `Phaser.BOTTOM_RIGHT`.

The final argument; `offset` lets you start the alignment from a specific child index.

func (*FlexLayer) Align1O

func (self *FlexLayer) Align1O(width int, height int, cellWidth int, cellHeight int, position int) bool

Align1O This method iterates through all children in the Group (regardless if they are visible or exist) and then changes their position so they are arranged in a Grid formation. Children must have the `alignTo` method in order to be positioned by this call. All default Phaser Game Objects have this.

The grid dimensions are determined by the first four arguments. The `width` and `height` arguments relate to the width and height of the grid respectively.

For example if the Group had 100 children in it:

`Group.align(10, 10, 32, 32)`

This will align all of the children into a grid formation of 10x10, using 32 pixels per grid cell. If you want a wider grid, you could do:

`Group.align(25, 4, 32, 32)`

This will align the children into a grid of 25x4, again using 32 pixels per grid cell.

You can choose to set _either_ the `width` or `height` value to -1. Doing so tells the method to keep on aligning children until there are no children left. For example if this Group had 48 children in it, the following:

`Group.align(-1, 8, 32, 32)`

... will align the children so that there are 8 children vertically (the second argument), and each row will contain 6 sprites, except the last one, which will contain 5 (totaling 48)

You can also do:

`Group.align(10, -1, 32, 32)`

In this case it will create a grid 10 wide, and as tall as it needs to be in order to fit all of the children in.

The `position` property allows you to control where in each grid cell the child is positioned. This is a constant and can be one of `Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` or `Phaser.BOTTOM_RIGHT`.

The final argument; `offset` lets you start the alignment from a specific child index.

func (*FlexLayer) Align2O

func (self *FlexLayer) Align2O(width int, height int, cellWidth int, cellHeight int, position int, offset int) bool

Align2O This method iterates through all children in the Group (regardless if they are visible or exist) and then changes their position so they are arranged in a Grid formation. Children must have the `alignTo` method in order to be positioned by this call. All default Phaser Game Objects have this.

The grid dimensions are determined by the first four arguments. The `width` and `height` arguments relate to the width and height of the grid respectively.

For example if the Group had 100 children in it:

`Group.align(10, 10, 32, 32)`

This will align all of the children into a grid formation of 10x10, using 32 pixels per grid cell. If you want a wider grid, you could do:

`Group.align(25, 4, 32, 32)`

This will align the children into a grid of 25x4, again using 32 pixels per grid cell.

You can choose to set _either_ the `width` or `height` value to -1. Doing so tells the method to keep on aligning children until there are no children left. For example if this Group had 48 children in it, the following:

`Group.align(-1, 8, 32, 32)`

... will align the children so that there are 8 children vertically (the second argument), and each row will contain 6 sprites, except the last one, which will contain 5 (totaling 48)

You can also do:

`Group.align(10, -1, 32, 32)`

In this case it will create a grid 10 wide, and as tall as it needs to be in order to fit all of the children in.

The `position` property allows you to control where in each grid cell the child is positioned. This is a constant and can be one of `Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` or `Phaser.BOTTOM_RIGHT`.

The final argument; `offset` lets you start the alignment from a specific child index.

func (*FlexLayer) AlignI

func (self *FlexLayer) AlignI(args ...interface{}) bool

AlignI This method iterates through all children in the Group (regardless if they are visible or exist) and then changes their position so they are arranged in a Grid formation. Children must have the `alignTo` method in order to be positioned by this call. All default Phaser Game Objects have this.

The grid dimensions are determined by the first four arguments. The `width` and `height` arguments relate to the width and height of the grid respectively.

For example if the Group had 100 children in it:

`Group.align(10, 10, 32, 32)`

This will align all of the children into a grid formation of 10x10, using 32 pixels per grid cell. If you want a wider grid, you could do:

`Group.align(25, 4, 32, 32)`

This will align the children into a grid of 25x4, again using 32 pixels per grid cell.

You can choose to set _either_ the `width` or `height` value to -1. Doing so tells the method to keep on aligning children until there are no children left. For example if this Group had 48 children in it, the following:

`Group.align(-1, 8, 32, 32)`

... will align the children so that there are 8 children vertically (the second argument), and each row will contain 6 sprites, except the last one, which will contain 5 (totaling 48)

You can also do:

`Group.align(10, -1, 32, 32)`

In this case it will create a grid 10 wide, and as tall as it needs to be in order to fit all of the children in.

The `position` property allows you to control where in each grid cell the child is positioned. This is a constant and can be one of `Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` or `Phaser.BOTTOM_RIGHT`.

The final argument; `offset` lets you start the alignment from a specific child index.

func (*FlexLayer) AlignIn

func (self *FlexLayer) AlignIn(container interface{}) *Group

AlignIn Aligns this Group within another Game Object, or Rectangle, known as the 'container', to one of 9 possible positions.

The container must be a Game Object, or Phaser.Rectangle object. This can include properties such as `World.bounds` or `Camera.view`, for aligning Groups within the world and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText, TileSprites or Buttons.

Please note that aligning a Group to another Game Object does **not** make it a child of the container. It simply modifies its position coordinates so it aligns with it.

The position constants you can use are:

`Phaser.TOP_LEFT`, `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

Groups are placed in such a way that their _bounds_ align with the container, taking into consideration rotation and scale of its children. This allows you to neatly align Groups, irrespective of their position value.

The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final aligned position of the Group. For example:

`group.alignIn(background, Phaser.BOTTOM_RIGHT, -20, -20)`

Would align the `group` to the bottom-right, but moved 20 pixels in from the corner. Think of the offsets as applying an adjustment to the containers bounds before the alignment takes place. So providing a negative offset will 'shrink' the container bounds by that amount, and providing a positive one expands it.

func (*FlexLayer) AlignIn1O

func (self *FlexLayer) AlignIn1O(container interface{}, position int) *Group

AlignIn1O Aligns this Group within another Game Object, or Rectangle, known as the 'container', to one of 9 possible positions.

The container must be a Game Object, or Phaser.Rectangle object. This can include properties such as `World.bounds` or `Camera.view`, for aligning Groups within the world and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText, TileSprites or Buttons.

Please note that aligning a Group to another Game Object does **not** make it a child of the container. It simply modifies its position coordinates so it aligns with it.

The position constants you can use are:

`Phaser.TOP_LEFT`, `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

Groups are placed in such a way that their _bounds_ align with the container, taking into consideration rotation and scale of its children. This allows you to neatly align Groups, irrespective of their position value.

The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final aligned position of the Group. For example:

`group.alignIn(background, Phaser.BOTTOM_RIGHT, -20, -20)`

Would align the `group` to the bottom-right, but moved 20 pixels in from the corner. Think of the offsets as applying an adjustment to the containers bounds before the alignment takes place. So providing a negative offset will 'shrink' the container bounds by that amount, and providing a positive one expands it.

func (*FlexLayer) AlignIn2O

func (self *FlexLayer) AlignIn2O(container interface{}, position int, offsetX int) *Group

AlignIn2O Aligns this Group within another Game Object, or Rectangle, known as the 'container', to one of 9 possible positions.

The container must be a Game Object, or Phaser.Rectangle object. This can include properties such as `World.bounds` or `Camera.view`, for aligning Groups within the world and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText, TileSprites or Buttons.

Please note that aligning a Group to another Game Object does **not** make it a child of the container. It simply modifies its position coordinates so it aligns with it.

The position constants you can use are:

`Phaser.TOP_LEFT`, `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

Groups are placed in such a way that their _bounds_ align with the container, taking into consideration rotation and scale of its children. This allows you to neatly align Groups, irrespective of their position value.

The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final aligned position of the Group. For example:

`group.alignIn(background, Phaser.BOTTOM_RIGHT, -20, -20)`

Would align the `group` to the bottom-right, but moved 20 pixels in from the corner. Think of the offsets as applying an adjustment to the containers bounds before the alignment takes place. So providing a negative offset will 'shrink' the container bounds by that amount, and providing a positive one expands it.

func (*FlexLayer) AlignIn3O

func (self *FlexLayer) AlignIn3O(container interface{}, position int, offsetX int, offsetY int) *Group

AlignIn3O Aligns this Group within another Game Object, or Rectangle, known as the 'container', to one of 9 possible positions.

The container must be a Game Object, or Phaser.Rectangle object. This can include properties such as `World.bounds` or `Camera.view`, for aligning Groups within the world and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText, TileSprites or Buttons.

Please note that aligning a Group to another Game Object does **not** make it a child of the container. It simply modifies its position coordinates so it aligns with it.

The position constants you can use are:

`Phaser.TOP_LEFT`, `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

Groups are placed in such a way that their _bounds_ align with the container, taking into consideration rotation and scale of its children. This allows you to neatly align Groups, irrespective of their position value.

The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final aligned position of the Group. For example:

`group.alignIn(background, Phaser.BOTTOM_RIGHT, -20, -20)`

Would align the `group` to the bottom-right, but moved 20 pixels in from the corner. Think of the offsets as applying an adjustment to the containers bounds before the alignment takes place. So providing a negative offset will 'shrink' the container bounds by that amount, and providing a positive one expands it.

func (*FlexLayer) AlignInI

func (self *FlexLayer) AlignInI(args ...interface{}) *Group

AlignInI Aligns this Group within another Game Object, or Rectangle, known as the 'container', to one of 9 possible positions.

The container must be a Game Object, or Phaser.Rectangle object. This can include properties such as `World.bounds` or `Camera.view`, for aligning Groups within the world and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText, TileSprites or Buttons.

Please note that aligning a Group to another Game Object does **not** make it a child of the container. It simply modifies its position coordinates so it aligns with it.

The position constants you can use are:

`Phaser.TOP_LEFT`, `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

Groups are placed in such a way that their _bounds_ align with the container, taking into consideration rotation and scale of its children. This allows you to neatly align Groups, irrespective of their position value.

The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final aligned position of the Group. For example:

`group.alignIn(background, Phaser.BOTTOM_RIGHT, -20, -20)`

Would align the `group` to the bottom-right, but moved 20 pixels in from the corner. Think of the offsets as applying an adjustment to the containers bounds before the alignment takes place. So providing a negative offset will 'shrink' the container bounds by that amount, and providing a positive one expands it.

func (*FlexLayer) AlignTo

func (self *FlexLayer) AlignTo(parent interface{}) *Group

AlignTo Aligns this Group to the side of another Game Object, or Rectangle, known as the 'parent', in one of 11 possible positions.

The parent must be a Game Object, or Phaser.Rectangle object. This can include properties such as `World.bounds` or `Camera.view`, for aligning Groups within the world and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText, TileSprites or Buttons.

Please note that aligning a Group to another Game Object does **not** make it a child of the parent. It simply modifies its position coordinates so it aligns with it.

The position constants you can use are:

`Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_TOP`, `Phaser.LEFT_CENTER`, `Phaser.LEFT_BOTTOM`, `Phaser.RIGHT_TOP`, `Phaser.RIGHT_CENTER`, `Phaser.RIGHT_BOTTOM`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

Groups are placed in such a way that their _bounds_ align with the parent, taking into consideration rotation and scale of the children. This allows you to neatly align Groups, irrespective of their position value.

The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final aligned position of the Group. For example:

`group.alignTo(background, Phaser.BOTTOM_RIGHT, -20, -20)`

Would align the `group` to the bottom-right, but moved 20 pixels in from the corner. Think of the offsets as applying an adjustment to the parents bounds before the alignment takes place. So providing a negative offset will 'shrink' the parent bounds by that amount, and providing a positive one expands it.

func (*FlexLayer) AlignTo1O

func (self *FlexLayer) AlignTo1O(parent interface{}, position int) *Group

AlignTo1O Aligns this Group to the side of another Game Object, or Rectangle, known as the 'parent', in one of 11 possible positions.

The parent must be a Game Object, or Phaser.Rectangle object. This can include properties such as `World.bounds` or `Camera.view`, for aligning Groups within the world and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText, TileSprites or Buttons.

Please note that aligning a Group to another Game Object does **not** make it a child of the parent. It simply modifies its position coordinates so it aligns with it.

The position constants you can use are:

`Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_TOP`, `Phaser.LEFT_CENTER`, `Phaser.LEFT_BOTTOM`, `Phaser.RIGHT_TOP`, `Phaser.RIGHT_CENTER`, `Phaser.RIGHT_BOTTOM`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

Groups are placed in such a way that their _bounds_ align with the parent, taking into consideration rotation and scale of the children. This allows you to neatly align Groups, irrespective of their position value.

The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final aligned position of the Group. For example:

`group.alignTo(background, Phaser.BOTTOM_RIGHT, -20, -20)`

Would align the `group` to the bottom-right, but moved 20 pixels in from the corner. Think of the offsets as applying an adjustment to the parents bounds before the alignment takes place. So providing a negative offset will 'shrink' the parent bounds by that amount, and providing a positive one expands it.

func (*FlexLayer) AlignTo2O

func (self *FlexLayer) AlignTo2O(parent interface{}, position int, offsetX int) *Group

AlignTo2O Aligns this Group to the side of another Game Object, or Rectangle, known as the 'parent', in one of 11 possible positions.

The parent must be a Game Object, or Phaser.Rectangle object. This can include properties such as `World.bounds` or `Camera.view`, for aligning Groups within the world and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText, TileSprites or Buttons.

Please note that aligning a Group to another Game Object does **not** make it a child of the parent. It simply modifies its position coordinates so it aligns with it.

The position constants you can use are:

`Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_TOP`, `Phaser.LEFT_CENTER`, `Phaser.LEFT_BOTTOM`, `Phaser.RIGHT_TOP`, `Phaser.RIGHT_CENTER`, `Phaser.RIGHT_BOTTOM`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

Groups are placed in such a way that their _bounds_ align with the parent, taking into consideration rotation and scale of the children. This allows you to neatly align Groups, irrespective of their position value.

The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final aligned position of the Group. For example:

`group.alignTo(background, Phaser.BOTTOM_RIGHT, -20, -20)`

Would align the `group` to the bottom-right, but moved 20 pixels in from the corner. Think of the offsets as applying an adjustment to the parents bounds before the alignment takes place. So providing a negative offset will 'shrink' the parent bounds by that amount, and providing a positive one expands it.

func (*FlexLayer) AlignTo3O

func (self *FlexLayer) AlignTo3O(parent interface{}, position int, offsetX int, offsetY int) *Group

AlignTo3O Aligns this Group to the side of another Game Object, or Rectangle, known as the 'parent', in one of 11 possible positions.

The parent must be a Game Object, or Phaser.Rectangle object. This can include properties such as `World.bounds` or `Camera.view`, for aligning Groups within the world and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText, TileSprites or Buttons.

Please note that aligning a Group to another Game Object does **not** make it a child of the parent. It simply modifies its position coordinates so it aligns with it.

The position constants you can use are:

`Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_TOP`, `Phaser.LEFT_CENTER`, `Phaser.LEFT_BOTTOM`, `Phaser.RIGHT_TOP`, `Phaser.RIGHT_CENTER`, `Phaser.RIGHT_BOTTOM`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

Groups are placed in such a way that their _bounds_ align with the parent, taking into consideration rotation and scale of the children. This allows you to neatly align Groups, irrespective of their position value.

The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final aligned position of the Group. For example:

`group.alignTo(background, Phaser.BOTTOM_RIGHT, -20, -20)`

Would align the `group` to the bottom-right, but moved 20 pixels in from the corner. Think of the offsets as applying an adjustment to the parents bounds before the alignment takes place. So providing a negative offset will 'shrink' the parent bounds by that amount, and providing a positive one expands it.

func (*FlexLayer) AlignToI

func (self *FlexLayer) AlignToI(args ...interface{}) *Group

AlignToI Aligns this Group to the side of another Game Object, or Rectangle, known as the 'parent', in one of 11 possible positions.

The parent must be a Game Object, or Phaser.Rectangle object. This can include properties such as `World.bounds` or `Camera.view`, for aligning Groups within the world and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText, TileSprites or Buttons.

Please note that aligning a Group to another Game Object does **not** make it a child of the parent. It simply modifies its position coordinates so it aligns with it.

The position constants you can use are:

`Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_TOP`, `Phaser.LEFT_CENTER`, `Phaser.LEFT_BOTTOM`, `Phaser.RIGHT_TOP`, `Phaser.RIGHT_CENTER`, `Phaser.RIGHT_BOTTOM`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

Groups are placed in such a way that their _bounds_ align with the parent, taking into consideration rotation and scale of the children. This allows you to neatly align Groups, irrespective of their position value.

The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final aligned position of the Group. For example:

`group.alignTo(background, Phaser.BOTTOM_RIGHT, -20, -20)`

Would align the `group` to the bottom-right, but moved 20 pixels in from the corner. Think of the offsets as applying an adjustment to the parents bounds before the alignment takes place. So providing a negative offset will 'shrink' the parent bounds by that amount, and providing a positive one expands it.

func (*FlexLayer) Alive

func (self *FlexLayer) Alive() bool

Alive The alive property is useful for Groups that are children of other Groups and need to be included/excluded in checks like forEachAlive.

func (*FlexLayer) Alpha

func (self *FlexLayer) Alpha() int

Alpha The alpha value of the group container.

func (*FlexLayer) Angle

func (self *FlexLayer) Angle() int

Angle The angle of rotation of the group container, in degrees.

This adjusts the group itself by modifying its local rotation transform.

This has no impact on the rotation/angle properties of the children, but it will update their worldTransform and on-screen orientation and position.

func (*FlexLayer) AscendingSortHandler

func (self *FlexLayer) AscendingSortHandler(a interface{}, b interface{})

AscendingSortHandler An internal helper function for the sort process.

func (*FlexLayer) AscendingSortHandlerI

func (self *FlexLayer) AscendingSortHandlerI(args ...interface{})

AscendingSortHandlerI An internal helper function for the sort process.

func (*FlexLayer) Bottom

func (self *FlexLayer) Bottom() int

Bottom The bottom coordinate of this Group.

It is derived by calling `getBounds`, calculating the Groups dimensions based on its visible children.

func (*FlexLayer) BottomLeft

func (self *FlexLayer) BottomLeft() *Point

BottomLeft empty description

func (*FlexLayer) BottomMiddle

func (self *FlexLayer) BottomMiddle() *Point

BottomMiddle empty description

func (*FlexLayer) BottomRight

func (self *FlexLayer) BottomRight() *Point

BottomRight empty description

func (*FlexLayer) Bounds

func (self *FlexLayer) Bounds() *Rectangle

Bounds empty description

func (*FlexLayer) BringToTop

func (self *FlexLayer) BringToTop(child interface{}) interface{}

BringToTop Brings the given child to the top of this group so it renders above all other children.

func (*FlexLayer) BringToTopI

func (self *FlexLayer) BringToTopI(args ...interface{}) interface{}

BringToTopI Brings the given child to the top of this group so it renders above all other children.

func (*FlexLayer) CallAll

func (self *FlexLayer) CallAll(method string, context string, args interface{})

CallAll Calls a function, specified by name, on all on children.

The function is called for all children regardless if they are dead or alive (see callAllExists for different options). After the method parameter and context you can add as many extra parameters as you like, which will all be passed to the child.

func (*FlexLayer) CallAllExists

func (self *FlexLayer) CallAllExists(callback string, existsValue bool, parameter interface{})

CallAllExists Calls a function, specified by name, on all children in the group who exist (or do not exist).

After the existsValue parameter you can add as many parameters as you like, which will all be passed to the child callback.

func (*FlexLayer) CallAllExistsI

func (self *FlexLayer) CallAllExistsI(args ...interface{})

CallAllExistsI Calls a function, specified by name, on all children in the group who exist (or do not exist).

After the existsValue parameter you can add as many parameters as you like, which will all be passed to the child callback.

func (*FlexLayer) CallAllI

func (self *FlexLayer) CallAllI(args ...interface{})

CallAllI Calls a function, specified by name, on all on children.

The function is called for all children regardless if they are dead or alive (see callAllExists for different options). After the method parameter and context you can add as many extra parameters as you like, which will all be passed to the child.

func (*FlexLayer) CallbackFromArray

func (self *FlexLayer) CallbackFromArray(child interface{}, callback []interface{}, length int)

CallbackFromArray Returns a reference to a function that exists on a child of the group based on the given callback array.

func (*FlexLayer) CallbackFromArrayI

func (self *FlexLayer) CallbackFromArrayI(args ...interface{})

CallbackFromArrayI Returns a reference to a function that exists on a child of the group based on the given callback array.

func (*FlexLayer) CameraOffset

func (self *FlexLayer) CameraOffset() *Point

CameraOffset If this object is {@link Phaser.Group#fixedToCamera fixedToCamera} then this stores the x/y position offset relative to the top-left of the camera view. If the parent of this Group is also `fixedToCamera` then the offset here is in addition to that and should typically be disabled.

func (*FlexLayer) CenterX

func (self *FlexLayer) CenterX() int

CenterX The center x coordinate of this Group.

It is derived by calling `getBounds`, calculating the Groups dimensions based on its visible children.

func (*FlexLayer) CenterY

func (self *FlexLayer) CenterY() int

CenterY The center y coordinate of this Group.

It is derived by calling `getBounds`, calculating the Groups dimensions based on its visible children.

func (*FlexLayer) CheckAll

func (self *FlexLayer) CheckAll(key string, value interface{})

CheckAll Quickly check that the same property across all children of this group is equal to the given value.

This call doesn't descend down children, so if you have a Group inside of this group, the property will be checked on the group but not its children.

func (*FlexLayer) CheckAll1O

func (self *FlexLayer) CheckAll1O(key string, value interface{}, checkAlive bool)

CheckAll1O Quickly check that the same property across all children of this group is equal to the given value.

This call doesn't descend down children, so if you have a Group inside of this group, the property will be checked on the group but not its children.

func (*FlexLayer) CheckAll2O

func (self *FlexLayer) CheckAll2O(key string, value interface{}, checkAlive bool, checkVisible bool)

CheckAll2O Quickly check that the same property across all children of this group is equal to the given value.

This call doesn't descend down children, so if you have a Group inside of this group, the property will be checked on the group but not its children.

func (*FlexLayer) CheckAll3O

func (self *FlexLayer) CheckAll3O(key string, value interface{}, checkAlive bool, checkVisible bool, force bool)

CheckAll3O Quickly check that the same property across all children of this group is equal to the given value.

This call doesn't descend down children, so if you have a Group inside of this group, the property will be checked on the group but not its children.

func (*FlexLayer) CheckAllI

func (self *FlexLayer) CheckAllI(args ...interface{})

CheckAllI Quickly check that the same property across all children of this group is equal to the given value.

This call doesn't descend down children, so if you have a Group inside of this group, the property will be checked on the group but not its children.

func (*FlexLayer) CheckProperty

func (self *FlexLayer) CheckProperty(child interface{}, key []interface{}, value interface{}) bool

CheckProperty Checks a property for the given value on the child.

func (*FlexLayer) CheckProperty1O

func (self *FlexLayer) CheckProperty1O(child interface{}, key []interface{}, value interface{}, force bool) bool

CheckProperty1O Checks a property for the given value on the child.

func (*FlexLayer) CheckPropertyI

func (self *FlexLayer) CheckPropertyI(args ...interface{}) bool

CheckPropertyI Checks a property for the given value on the child.

func (*FlexLayer) Children

func (self *FlexLayer) Children() []DisplayObject

Children [read-only] The array of children of this container.

func (*FlexLayer) ClassType

func (self *FlexLayer) ClassType() interface{}

ClassType The type of objects that will be created when using {@link Phaser.Group#create create} or {@link Phaser.Group#createMultiple createMultiple}.

Any object may be used but it should extend either Sprite or Image and accept the same constructor arguments: when a new object is created it is passed the following parameters to its constructor: `(game, x, y, key, frame)`.

func (*FlexLayer) Contains

func (self *FlexLayer) Contains(child *DisplayObject) bool

Contains Determines whether the specified display object is a child of the DisplayObjectContainer instance or the instance itself.

func (*FlexLayer) ContainsI

func (self *FlexLayer) ContainsI(args ...interface{}) bool

ContainsI Determines whether the specified display object is a child of the DisplayObjectContainer instance or the instance itself.

func (*FlexLayer) CountDead

func (self *FlexLayer) CountDead() int

CountDead Get the number of dead children in this group.

func (*FlexLayer) CountDeadI

func (self *FlexLayer) CountDeadI(args ...interface{}) int

CountDeadI Get the number of dead children in this group.

func (*FlexLayer) CountLiving

func (self *FlexLayer) CountLiving() int

CountLiving Get the number of living children in this group.

func (*FlexLayer) CountLivingI

func (self *FlexLayer) CountLivingI(args ...interface{}) int

CountLivingI Get the number of living children in this group.

func (*FlexLayer) Create

func (self *FlexLayer) Create(x int, y int) *DisplayObject

Create Creates a new Phaser.Sprite object and adds it to the top of this group.

Use {@link Phaser.Group#classType classType} to change the type of object created.

The child is automatically added to the top of the group, and is displayed above every previous child.

Or if the _optional_ index is specified, the child is added at the location specified by the index value, this allows you to control child ordering.

If `Group.enableBody` is set, then a physics body will be created on the object, so long as one does not already exist.

If `Group.inputEnableChildren` is set, then an Input Handler will be created on the object, so long as one does not already exist.

func (*FlexLayer) Create1O

func (self *FlexLayer) Create1O(x int, y int, key interface{}) *DisplayObject

Create1O Creates a new Phaser.Sprite object and adds it to the top of this group.

Use {@link Phaser.Group#classType classType} to change the type of object created.

The child is automatically added to the top of the group, and is displayed above every previous child.

Or if the _optional_ index is specified, the child is added at the location specified by the index value, this allows you to control child ordering.

If `Group.enableBody` is set, then a physics body will be created on the object, so long as one does not already exist.

If `Group.inputEnableChildren` is set, then an Input Handler will be created on the object, so long as one does not already exist.

func (*FlexLayer) Create2O

func (self *FlexLayer) Create2O(x int, y int, key interface{}, frame interface{}) *DisplayObject

Create2O Creates a new Phaser.Sprite object and adds it to the top of this group.

Use {@link Phaser.Group#classType classType} to change the type of object created.

The child is automatically added to the top of the group, and is displayed above every previous child.

Or if the _optional_ index is specified, the child is added at the location specified by the index value, this allows you to control child ordering.

If `Group.enableBody` is set, then a physics body will be created on the object, so long as one does not already exist.

If `Group.inputEnableChildren` is set, then an Input Handler will be created on the object, so long as one does not already exist.

func (*FlexLayer) Create3O

func (self *FlexLayer) Create3O(x int, y int, key interface{}, frame interface{}, exists bool) *DisplayObject

Create3O Creates a new Phaser.Sprite object and adds it to the top of this group.

Use {@link Phaser.Group#classType classType} to change the type of object created.

The child is automatically added to the top of the group, and is displayed above every previous child.

Or if the _optional_ index is specified, the child is added at the location specified by the index value, this allows you to control child ordering.

If `Group.enableBody` is set, then a physics body will be created on the object, so long as one does not already exist.

If `Group.inputEnableChildren` is set, then an Input Handler will be created on the object, so long as one does not already exist.

func (*FlexLayer) Create4O

func (self *FlexLayer) Create4O(x int, y int, key interface{}, frame interface{}, exists bool, index int) *DisplayObject

Create4O Creates a new Phaser.Sprite object and adds it to the top of this group.

Use {@link Phaser.Group#classType classType} to change the type of object created.

The child is automatically added to the top of the group, and is displayed above every previous child.

Or if the _optional_ index is specified, the child is added at the location specified by the index value, this allows you to control child ordering.

If `Group.enableBody` is set, then a physics body will be created on the object, so long as one does not already exist.

If `Group.inputEnableChildren` is set, then an Input Handler will be created on the object, so long as one does not already exist.

func (*FlexLayer) CreateI

func (self *FlexLayer) CreateI(args ...interface{}) *DisplayObject

CreateI Creates a new Phaser.Sprite object and adds it to the top of this group.

Use {@link Phaser.Group#classType classType} to change the type of object created.

The child is automatically added to the top of the group, and is displayed above every previous child.

Or if the _optional_ index is specified, the child is added at the location specified by the index value, this allows you to control child ordering.

If `Group.enableBody` is set, then a physics body will be created on the object, so long as one does not already exist.

If `Group.inputEnableChildren` is set, then an Input Handler will be created on the object, so long as one does not already exist.

func (*FlexLayer) CreateMultiple

func (self *FlexLayer) CreateMultiple(quantity int, key interface{}) []interface{}

CreateMultiple Creates multiple Phaser.Sprite objects and adds them to the top of this Group.

This method is useful if you need to quickly generate a pool of sprites, such as bullets.

Use {@link Phaser.Group#classType classType} to change the type of object created.

You can provide an array as the `key` and / or `frame` arguments. When you do this it will create `quantity` Sprites for every key (and frame) in the arrays.

For example:

`createMultiple(25, ['ball', 'carrot'])`

In the above code there are 2 keys (ball and carrot) which means that 50 sprites will be created in total, 25 of each. You can also have the `frame` as an array:

`createMultiple(5, 'bricks', [0, 1, 2, 3])`

In the above there is one key (bricks), which is a sprite sheet. The frames array tells this method to use frames 0, 1, 2 and 3. So in total it will create 20 sprites, because the quantity was set to 5, so that is 5 brick sprites of frame 0, 5 brick sprites with frame 1, and so on.

If you set both the key and frame arguments to be arrays then understand it will create a total quantity of sprites equal to the size of both arrays times each other. I.e.:

`createMultiple(20, ['diamonds', 'balls'], [0, 1, 2])`

The above will create 20 'diamonds' of frame 0, 20 with frame 1 and 20 with frame 2. It will then create 20 'balls' of frame 0, 20 with frame 1 and 20 with frame 2. In total it will have created 120 sprites.

By default the Sprites will have their `exists` property set to `false`, and they will be positioned at 0x0, relative to the `Group.x / y` values.

If `Group.enableBody` is set, then a physics body will be created on the objects, so long as one does not already exist.

If `Group.inputEnableChildren` is set, then an Input Handler will be created on the objects, so long as one does not already exist.

func (*FlexLayer) CreateMultiple1O

func (self *FlexLayer) CreateMultiple1O(quantity int, key interface{}, frame interface{}) []interface{}

CreateMultiple1O Creates multiple Phaser.Sprite objects and adds them to the top of this Group.

This method is useful if you need to quickly generate a pool of sprites, such as bullets.

Use {@link Phaser.Group#classType classType} to change the type of object created.

You can provide an array as the `key` and / or `frame` arguments. When you do this it will create `quantity` Sprites for every key (and frame) in the arrays.

For example:

`createMultiple(25, ['ball', 'carrot'])`

In the above code there are 2 keys (ball and carrot) which means that 50 sprites will be created in total, 25 of each. You can also have the `frame` as an array:

`createMultiple(5, 'bricks', [0, 1, 2, 3])`

In the above there is one key (bricks), which is a sprite sheet. The frames array tells this method to use frames 0, 1, 2 and 3. So in total it will create 20 sprites, because the quantity was set to 5, so that is 5 brick sprites of frame 0, 5 brick sprites with frame 1, and so on.

If you set both the key and frame arguments to be arrays then understand it will create a total quantity of sprites equal to the size of both arrays times each other. I.e.:

`createMultiple(20, ['diamonds', 'balls'], [0, 1, 2])`

The above will create 20 'diamonds' of frame 0, 20 with frame 1 and 20 with frame 2. It will then create 20 'balls' of frame 0, 20 with frame 1 and 20 with frame 2. In total it will have created 120 sprites.

By default the Sprites will have their `exists` property set to `false`, and they will be positioned at 0x0, relative to the `Group.x / y` values.

If `Group.enableBody` is set, then a physics body will be created on the objects, so long as one does not already exist.

If `Group.inputEnableChildren` is set, then an Input Handler will be created on the objects, so long as one does not already exist.

func (*FlexLayer) CreateMultiple2O

func (self *FlexLayer) CreateMultiple2O(quantity int, key interface{}, frame interface{}, exists bool) []interface{}

CreateMultiple2O Creates multiple Phaser.Sprite objects and adds them to the top of this Group.

This method is useful if you need to quickly generate a pool of sprites, such as bullets.

Use {@link Phaser.Group#classType classType} to change the type of object created.

You can provide an array as the `key` and / or `frame` arguments. When you do this it will create `quantity` Sprites for every key (and frame) in the arrays.

For example:

`createMultiple(25, ['ball', 'carrot'])`

In the above code there are 2 keys (ball and carrot) which means that 50 sprites will be created in total, 25 of each. You can also have the `frame` as an array:

`createMultiple(5, 'bricks', [0, 1, 2, 3])`

In the above there is one key (bricks), which is a sprite sheet. The frames array tells this method to use frames 0, 1, 2 and 3. So in total it will create 20 sprites, because the quantity was set to 5, so that is 5 brick sprites of frame 0, 5 brick sprites with frame 1, and so on.

If you set both the key and frame arguments to be arrays then understand it will create a total quantity of sprites equal to the size of both arrays times each other. I.e.:

`createMultiple(20, ['diamonds', 'balls'], [0, 1, 2])`

The above will create 20 'diamonds' of frame 0, 20 with frame 1 and 20 with frame 2. It will then create 20 'balls' of frame 0, 20 with frame 1 and 20 with frame 2. In total it will have created 120 sprites.

By default the Sprites will have their `exists` property set to `false`, and they will be positioned at 0x0, relative to the `Group.x / y` values.

If `Group.enableBody` is set, then a physics body will be created on the objects, so long as one does not already exist.

If `Group.inputEnableChildren` is set, then an Input Handler will be created on the objects, so long as one does not already exist.

func (*FlexLayer) CreateMultipleI

func (self *FlexLayer) CreateMultipleI(args ...interface{}) []interface{}

CreateMultipleI Creates multiple Phaser.Sprite objects and adds them to the top of this Group.

This method is useful if you need to quickly generate a pool of sprites, such as bullets.

Use {@link Phaser.Group#classType classType} to change the type of object created.

You can provide an array as the `key` and / or `frame` arguments. When you do this it will create `quantity` Sprites for every key (and frame) in the arrays.

For example:

`createMultiple(25, ['ball', 'carrot'])`

In the above code there are 2 keys (ball and carrot) which means that 50 sprites will be created in total, 25 of each. You can also have the `frame` as an array:

`createMultiple(5, 'bricks', [0, 1, 2, 3])`

In the above there is one key (bricks), which is a sprite sheet. The frames array tells this method to use frames 0, 1, 2 and 3. So in total it will create 20 sprites, because the quantity was set to 5, so that is 5 brick sprites of frame 0, 5 brick sprites with frame 1, and so on.

If you set both the key and frame arguments to be arrays then understand it will create a total quantity of sprites equal to the size of both arrays times each other. I.e.:

`createMultiple(20, ['diamonds', 'balls'], [0, 1, 2])`

The above will create 20 'diamonds' of frame 0, 20 with frame 1 and 20 with frame 2. It will then create 20 'balls' of frame 0, 20 with frame 1 and 20 with frame 2. In total it will have created 120 sprites.

By default the Sprites will have their `exists` property set to `false`, and they will be positioned at 0x0, relative to the `Group.x / y` values.

If `Group.enableBody` is set, then a physics body will be created on the objects, so long as one does not already exist.

If `Group.inputEnableChildren` is set, then an Input Handler will be created on the objects, so long as one does not already exist.

func (*FlexLayer) Cursor

func (self *FlexLayer) Cursor() *DisplayObject

Cursor The current display object that the group cursor is pointing to, if any. (Can be set manually.)

The cursor is a way to iterate through the children in a Group using {@link Phaser.Group#next next} and {@link Phaser.Group#previous previous}.

func (*FlexLayer) CursorIndex

func (self *FlexLayer) CursorIndex() int

CursorIndex The current index of the Group cursor. Advance it with Group.next.

func (*FlexLayer) CustomSort

func (self *FlexLayer) CustomSort(sortHandler interface{})

CustomSort Sort the children in the group according to custom sort function.

The `sortHandler` is provided the two parameters: the two children involved in the comparison (a and b). It should return -1 if `a > b`, 1 if `a < b` or 0 if `a === b`.

func (*FlexLayer) CustomSort1O

func (self *FlexLayer) CustomSort1O(sortHandler interface{}, context interface{})

CustomSort1O Sort the children in the group according to custom sort function.

The `sortHandler` is provided the two parameters: the two children involved in the comparison (a and b). It should return -1 if `a > b`, 1 if `a < b` or 0 if `a === b`.

func (*FlexLayer) CustomSortI

func (self *FlexLayer) CustomSortI(args ...interface{})

CustomSortI Sort the children in the group according to custom sort function.

The `sortHandler` is provided the two parameters: the two children involved in the comparison (a and b). It should return -1 if `a > b`, 1 if `a < b` or 0 if `a === b`.

func (*FlexLayer) Debug

func (self *FlexLayer) Debug()

Debug Debug.

func (*FlexLayer) DebugI

func (self *FlexLayer) DebugI(args ...interface{})

DebugI Debug.

func (*FlexLayer) DescendingSortHandler

func (self *FlexLayer) DescendingSortHandler(a interface{}, b interface{})

DescendingSortHandler An internal helper function for the sort process.

func (*FlexLayer) DescendingSortHandlerI

func (self *FlexLayer) DescendingSortHandlerI(args ...interface{})

DescendingSortHandlerI An internal helper function for the sort process.

func (*FlexLayer) Destroy

func (self *FlexLayer) Destroy()

Destroy Destroys this group.

Removes all children, then removes this group from its parent and nulls references.

func (*FlexLayer) Destroy1O

func (self *FlexLayer) Destroy1O(destroyChildren bool)

Destroy1O Destroys this group.

Removes all children, then removes this group from its parent and nulls references.

func (*FlexLayer) Destroy2O

func (self *FlexLayer) Destroy2O(destroyChildren bool, soft bool)

Destroy2O Destroys this group.

Removes all children, then removes this group from its parent and nulls references.

func (*FlexLayer) DestroyI

func (self *FlexLayer) DestroyI(args ...interface{})

DestroyI Destroys this group.

Removes all children, then removes this group from its parent and nulls references.

func (*FlexLayer) DivideAll

func (self *FlexLayer) DivideAll(property string, amount int, checkAlive bool, checkVisible bool)

DivideAll Divides the given property by the amount on all children in this group.

`Group.divideAll('x', 2)` will half the child.x value for each child.

func (*FlexLayer) DivideAllI

func (self *FlexLayer) DivideAllI(args ...interface{})

DivideAllI Divides the given property by the amount on all children in this group.

`Group.divideAll('x', 2)` will half the child.x value for each child.

func (*FlexLayer) EnableBody

func (self *FlexLayer) EnableBody() bool

EnableBody If true all Sprites created by, or added to this group, will have a physics body enabled on them.

If there are children already in the Group at the time you set this property, they are not changed.

The default body type is controlled with {@link Phaser.Group#physicsBodyType physicsBodyType}.

func (*FlexLayer) EnableBodyDebug

func (self *FlexLayer) EnableBodyDebug() bool

EnableBodyDebug If true when a physics body is created (via {@link Phaser.Group#enableBody enableBody}) it will create a physics debug object as well.

This only works for P2 bodies.

func (*FlexLayer) Exists

func (self *FlexLayer) Exists() bool

Exists If exists is true the group is updated, otherwise it is skipped.

func (*FlexLayer) Filter

func (self *FlexLayer) Filter(predicate interface{}) *ArraySet

Filter Find children matching a certain predicate.

For example:

var healthyList = Group.filter(function(child, index, children) {
    return child.health > 10 ? true : false;
}, true);
healthyList.callAll('attack');

Note: Currently this will skip any children which are Groups themselves.

func (*FlexLayer) Filter1O

func (self *FlexLayer) Filter1O(predicate interface{}, checkExists bool) *ArraySet

Filter1O Find children matching a certain predicate.

For example:

var healthyList = Group.filter(function(child, index, children) {
    return child.health > 10 ? true : false;
}, true);
healthyList.callAll('attack');

Note: Currently this will skip any children which are Groups themselves.

func (*FlexLayer) FilterI

func (self *FlexLayer) FilterI(args ...interface{}) *ArraySet

FilterI Find children matching a certain predicate.

For example:

var healthyList = Group.filter(function(child, index, children) {
    return child.health > 10 ? true : false;
}, true);
healthyList.callAll('attack');

Note: Currently this will skip any children which are Groups themselves.

func (*FlexLayer) FixedToCamera

func (self *FlexLayer) FixedToCamera() bool

FixedToCamera A Group that is fixed to the camera uses its x/y coordinates as offsets from the top left of the camera. These are stored in Group.cameraOffset.

Note that the cameraOffset values are in addition to any parent in the display list. So if this Group was in a Group that has x: 200, then this will be added to the cameraOffset.x

func (*FlexLayer) ForEach

func (self *FlexLayer) ForEach(callback interface{}, callbackContext interface{})

ForEach Call a function on each child in this group.

Additional arguments for the callback can be specified after the `checkExists` parameter. For example,

Group.forEach(awardBonusGold, this, true, 100, 500)

would invoke `awardBonusGold` function with the parameters `(child, 100, 500)`.

Note: This check will skip any children which are Groups themselves.

func (*FlexLayer) ForEach1O

func (self *FlexLayer) ForEach1O(callback interface{}, callbackContext interface{}, checkExists bool)

ForEach1O Call a function on each child in this group.

Additional arguments for the callback can be specified after the `checkExists` parameter. For example,

Group.forEach(awardBonusGold, this, true, 100, 500)

would invoke `awardBonusGold` function with the parameters `(child, 100, 500)`.

Note: This check will skip any children which are Groups themselves.

func (*FlexLayer) ForEach2O

func (self *FlexLayer) ForEach2O(callback interface{}, callbackContext interface{}, checkExists bool, args interface{})

ForEach2O Call a function on each child in this group.

Additional arguments for the callback can be specified after the `checkExists` parameter. For example,

Group.forEach(awardBonusGold, this, true, 100, 500)

would invoke `awardBonusGold` function with the parameters `(child, 100, 500)`.

Note: This check will skip any children which are Groups themselves.

func (*FlexLayer) ForEachAlive

func (self *FlexLayer) ForEachAlive(callback interface{}, callbackContext interface{})

ForEachAlive Call a function on each alive child in this group.

See {@link Phaser.Group#forEach forEach} for details.

func (*FlexLayer) ForEachAlive1O

func (self *FlexLayer) ForEachAlive1O(callback interface{}, callbackContext interface{}, args interface{})

ForEachAlive1O Call a function on each alive child in this group.

See {@link Phaser.Group#forEach forEach} for details.

func (*FlexLayer) ForEachAliveI

func (self *FlexLayer) ForEachAliveI(args ...interface{})

ForEachAliveI Call a function on each alive child in this group.

See {@link Phaser.Group#forEach forEach} for details.

func (*FlexLayer) ForEachDead

func (self *FlexLayer) ForEachDead(callback interface{}, callbackContext interface{})

ForEachDead Call a function on each dead child in this group.

See {@link Phaser.Group#forEach forEach} for details.

func (*FlexLayer) ForEachDead1O

func (self *FlexLayer) ForEachDead1O(callback interface{}, callbackContext interface{}, args interface{})

ForEachDead1O Call a function on each dead child in this group.

See {@link Phaser.Group#forEach forEach} for details.

func (*FlexLayer) ForEachDeadI

func (self *FlexLayer) ForEachDeadI(args ...interface{})

ForEachDeadI Call a function on each dead child in this group.

See {@link Phaser.Group#forEach forEach} for details.

func (*FlexLayer) ForEachExists

func (self *FlexLayer) ForEachExists(callback interface{}, callbackContext interface{})

ForEachExists Call a function on each existing child in this group.

See {@link Phaser.Group#forEach forEach} for details.

func (*FlexLayer) ForEachExists1O

func (self *FlexLayer) ForEachExists1O(callback interface{}, callbackContext interface{}, args interface{})

ForEachExists1O Call a function on each existing child in this group.

See {@link Phaser.Group#forEach forEach} for details.

func (*FlexLayer) ForEachExistsI

func (self *FlexLayer) ForEachExistsI(args ...interface{})

ForEachExistsI Call a function on each existing child in this group.

See {@link Phaser.Group#forEach forEach} for details.

func (*FlexLayer) ForEachI

func (self *FlexLayer) ForEachI(args ...interface{})

ForEachI Call a function on each child in this group.

Additional arguments for the callback can be specified after the `checkExists` parameter. For example,

Group.forEach(awardBonusGold, this, true, 100, 500)

would invoke `awardBonusGold` function with the parameters `(child, 100, 500)`.

Note: This check will skip any children which are Groups themselves.

func (*FlexLayer) Game

func (self *FlexLayer) Game() *Game

Game A reference to the currently running Game.

func (*FlexLayer) GetAll

func (self *FlexLayer) GetAll() interface{}

GetAll Returns all children in this Group.

You can optionally specify a matching criteria using the `property` and `value` arguments.

For example: `getAll('exists', true)` would return only children that have their exists property set.

Optionally you can specify a start and end index. For example if this Group had 100 children, and you set `startIndex` to 0 and `endIndex` to 50, it would return a random child from only the first 50 children in the Group.

func (*FlexLayer) GetAll1O

func (self *FlexLayer) GetAll1O(property string) interface{}

GetAll1O Returns all children in this Group.

You can optionally specify a matching criteria using the `property` and `value` arguments.

For example: `getAll('exists', true)` would return only children that have their exists property set.

Optionally you can specify a start and end index. For example if this Group had 100 children, and you set `startIndex` to 0 and `endIndex` to 50, it would return a random child from only the first 50 children in the Group.

func (*FlexLayer) GetAll2O

func (self *FlexLayer) GetAll2O(property string, value interface{}) interface{}

GetAll2O Returns all children in this Group.

You can optionally specify a matching criteria using the `property` and `value` arguments.

For example: `getAll('exists', true)` would return only children that have their exists property set.

Optionally you can specify a start and end index. For example if this Group had 100 children, and you set `startIndex` to 0 and `endIndex` to 50, it would return a random child from only the first 50 children in the Group.

func (*FlexLayer) GetAll3O

func (self *FlexLayer) GetAll3O(property string, value interface{}, startIndex int) interface{}

GetAll3O Returns all children in this Group.

You can optionally specify a matching criteria using the `property` and `value` arguments.

For example: `getAll('exists', true)` would return only children that have their exists property set.

Optionally you can specify a start and end index. For example if this Group had 100 children, and you set `startIndex` to 0 and `endIndex` to 50, it would return a random child from only the first 50 children in the Group.

func (*FlexLayer) GetAll4O

func (self *FlexLayer) GetAll4O(property string, value interface{}, startIndex int, endIndex int) interface{}

GetAll4O Returns all children in this Group.

You can optionally specify a matching criteria using the `property` and `value` arguments.

For example: `getAll('exists', true)` would return only children that have their exists property set.

Optionally you can specify a start and end index. For example if this Group had 100 children, and you set `startIndex` to 0 and `endIndex` to 50, it would return a random child from only the first 50 children in the Group.

func (*FlexLayer) GetAllI

func (self *FlexLayer) GetAllI(args ...interface{}) interface{}

GetAllI Returns all children in this Group.

You can optionally specify a matching criteria using the `property` and `value` arguments.

For example: `getAll('exists', true)` would return only children that have their exists property set.

Optionally you can specify a start and end index. For example if this Group had 100 children, and you set `startIndex` to 0 and `endIndex` to 50, it would return a random child from only the first 50 children in the Group.

func (*FlexLayer) GetAt

func (self *FlexLayer) GetAt(index int) interface{}

GetAt Returns the child found at the given index within this group.

func (*FlexLayer) GetAtI

func (self *FlexLayer) GetAtI(args ...interface{}) interface{}

GetAtI Returns the child found at the given index within this group.

func (*FlexLayer) GetBottom

func (self *FlexLayer) GetBottom() interface{}

GetBottom Returns the child at the bottom of this group.

The bottom child the child being displayed (rendered) below every other child.

func (*FlexLayer) GetBottomI

func (self *FlexLayer) GetBottomI(args ...interface{}) interface{}

GetBottomI Returns the child at the bottom of this group.

The bottom child the child being displayed (rendered) below every other child.

func (*FlexLayer) GetBounds

func (self *FlexLayer) GetBounds() *Rectangle

GetBounds Retrieves the global bounds of the displayObjectContainer as a rectangle. The bounds calculation takes all visible children into consideration.

func (*FlexLayer) GetBounds1O

func (self *FlexLayer) GetBounds1O(targetCoordinateSpace interface{}) *Rectangle

GetBounds1O Retrieves the global bounds of the displayObjectContainer as a rectangle. The bounds calculation takes all visible children into consideration.

func (*FlexLayer) GetBoundsI

func (self *FlexLayer) GetBoundsI(args ...interface{}) *Rectangle

GetBoundsI Retrieves the global bounds of the displayObjectContainer as a rectangle. The bounds calculation takes all visible children into consideration.

func (*FlexLayer) GetByName

func (self *FlexLayer) GetByName(name string) interface{}

GetByName Searches the Group for the first instance of a child with the `name` property matching the given argument. Should more than one child have the same name only the first instance is returned.

func (*FlexLayer) GetByNameI

func (self *FlexLayer) GetByNameI(args ...interface{}) interface{}

GetByNameI Searches the Group for the first instance of a child with the `name` property matching the given argument. Should more than one child have the same name only the first instance is returned.

func (*FlexLayer) GetChildAt

func (self *FlexLayer) GetChildAt(index int) *DisplayObject

GetChildAt Returns the child at the specified index

func (*FlexLayer) GetChildAtI

func (self *FlexLayer) GetChildAtI(args ...interface{}) *DisplayObject

GetChildAtI Returns the child at the specified index

func (*FlexLayer) GetChildIndex

func (self *FlexLayer) GetChildIndex(child *DisplayObject) int

GetChildIndex Returns the index position of a child DisplayObject instance

func (*FlexLayer) GetChildIndexI

func (self *FlexLayer) GetChildIndexI(args ...interface{}) int

GetChildIndexI Returns the index position of a child DisplayObject instance

func (*FlexLayer) GetClosestTo

func (self *FlexLayer) GetClosestTo(object interface{}) interface{}

GetClosestTo Get the closest child to given Object, with optional callback to filter children.

This can be a Sprite, Group, Image or any object with public x and y properties.

'close' is determined by the distance from the objects `x` and `y` properties compared to the childs `x` and `y` properties.

You can use the optional `callback` argument to apply your own filter to the distance checks. If the child is closer then the previous child, it will be sent to `callback` as the first argument, with the distance as the second. The callback should return `true` if it passes your filtering criteria, otherwise it should return `false`.

func (*FlexLayer) GetClosestTo1O

func (self *FlexLayer) GetClosestTo1O(object interface{}, callback interface{}) interface{}

GetClosestTo1O Get the closest child to given Object, with optional callback to filter children.

This can be a Sprite, Group, Image or any object with public x and y properties.

'close' is determined by the distance from the objects `x` and `y` properties compared to the childs `x` and `y` properties.

You can use the optional `callback` argument to apply your own filter to the distance checks. If the child is closer then the previous child, it will be sent to `callback` as the first argument, with the distance as the second. The callback should return `true` if it passes your filtering criteria, otherwise it should return `false`.

func (*FlexLayer) GetClosestTo2O

func (self *FlexLayer) GetClosestTo2O(object interface{}, callback interface{}, callbackContext interface{}) interface{}

GetClosestTo2O Get the closest child to given Object, with optional callback to filter children.

This can be a Sprite, Group, Image or any object with public x and y properties.

'close' is determined by the distance from the objects `x` and `y` properties compared to the childs `x` and `y` properties.

You can use the optional `callback` argument to apply your own filter to the distance checks. If the child is closer then the previous child, it will be sent to `callback` as the first argument, with the distance as the second. The callback should return `true` if it passes your filtering criteria, otherwise it should return `false`.

func (*FlexLayer) GetClosestToI

func (self *FlexLayer) GetClosestToI(args ...interface{}) interface{}

GetClosestToI Get the closest child to given Object, with optional callback to filter children.

This can be a Sprite, Group, Image or any object with public x and y properties.

'close' is determined by the distance from the objects `x` and `y` properties compared to the childs `x` and `y` properties.

You can use the optional `callback` argument to apply your own filter to the distance checks. If the child is closer then the previous child, it will be sent to `callback` as the first argument, with the distance as the second. The callback should return `true` if it passes your filtering criteria, otherwise it should return `false`.

func (*FlexLayer) GetFirstAlive

func (self *FlexLayer) GetFirstAlive() *DisplayObject

GetFirstAlive Get the first child that is alive (`child.alive === true`).

This is handy for choosing a squad leader, etc.

You can use the optional argument `createIfNull` to create a new Game Object if no alive ones were found in this Group.

It works by calling `Group.create` passing it the parameters given to this method, and returning the new child.

If a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child will be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.

func (*FlexLayer) GetFirstAlive1O

func (self *FlexLayer) GetFirstAlive1O(createIfNull bool) *DisplayObject

GetFirstAlive1O Get the first child that is alive (`child.alive === true`).

This is handy for choosing a squad leader, etc.

You can use the optional argument `createIfNull` to create a new Game Object if no alive ones were found in this Group.

It works by calling `Group.create` passing it the parameters given to this method, and returning the new child.

If a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child will be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.

func (*FlexLayer) GetFirstAlive2O

func (self *FlexLayer) GetFirstAlive2O(createIfNull bool, x int) *DisplayObject

GetFirstAlive2O Get the first child that is alive (`child.alive === true`).

This is handy for choosing a squad leader, etc.

You can use the optional argument `createIfNull` to create a new Game Object if no alive ones were found in this Group.

It works by calling `Group.create` passing it the parameters given to this method, and returning the new child.

If a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child will be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.

func (*FlexLayer) GetFirstAlive3O

func (self *FlexLayer) GetFirstAlive3O(createIfNull bool, x int, y int) *DisplayObject

GetFirstAlive3O Get the first child that is alive (`child.alive === true`).

This is handy for choosing a squad leader, etc.

You can use the optional argument `createIfNull` to create a new Game Object if no alive ones were found in this Group.

It works by calling `Group.create` passing it the parameters given to this method, and returning the new child.

If a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child will be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.

func (*FlexLayer) GetFirstAlive4O

func (self *FlexLayer) GetFirstAlive4O(createIfNull bool, x int, y int, key interface{}) *DisplayObject

GetFirstAlive4O Get the first child that is alive (`child.alive === true`).

This is handy for choosing a squad leader, etc.

You can use the optional argument `createIfNull` to create a new Game Object if no alive ones were found in this Group.

It works by calling `Group.create` passing it the parameters given to this method, and returning the new child.

If a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child will be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.

func (*FlexLayer) GetFirstAlive5O

func (self *FlexLayer) GetFirstAlive5O(createIfNull bool, x int, y int, key interface{}, frame interface{}) *DisplayObject

GetFirstAlive5O Get the first child that is alive (`child.alive === true`).

This is handy for choosing a squad leader, etc.

You can use the optional argument `createIfNull` to create a new Game Object if no alive ones were found in this Group.

It works by calling `Group.create` passing it the parameters given to this method, and returning the new child.

If a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child will be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.

func (*FlexLayer) GetFirstAliveI

func (self *FlexLayer) GetFirstAliveI(args ...interface{}) *DisplayObject

GetFirstAliveI Get the first child that is alive (`child.alive === true`).

This is handy for choosing a squad leader, etc.

You can use the optional argument `createIfNull` to create a new Game Object if no alive ones were found in this Group.

It works by calling `Group.create` passing it the parameters given to this method, and returning the new child.

If a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child will be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.

func (*FlexLayer) GetFirstDead

func (self *FlexLayer) GetFirstDead() *DisplayObject

GetFirstDead Get the first child that is dead (`child.alive === false`).

This is handy for checking if everything has been wiped out and adding to the pool as needed.

You can use the optional argument `createIfNull` to create a new Game Object if no dead ones were found in this Group.

It works by calling `Group.create` passing it the parameters given to this method, and returning the new child.

If a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child will be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.

func (*FlexLayer) GetFirstDead1O

func (self *FlexLayer) GetFirstDead1O(createIfNull bool) *DisplayObject

GetFirstDead1O Get the first child that is dead (`child.alive === false`).

This is handy for checking if everything has been wiped out and adding to the pool as needed.

You can use the optional argument `createIfNull` to create a new Game Object if no dead ones were found in this Group.

It works by calling `Group.create` passing it the parameters given to this method, and returning the new child.

If a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child will be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.

func (*FlexLayer) GetFirstDead2O

func (self *FlexLayer) GetFirstDead2O(createIfNull bool, x int) *DisplayObject

GetFirstDead2O Get the first child that is dead (`child.alive === false`).

This is handy for checking if everything has been wiped out and adding to the pool as needed.

You can use the optional argument `createIfNull` to create a new Game Object if no dead ones were found in this Group.

It works by calling `Group.create` passing it the parameters given to this method, and returning the new child.

If a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child will be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.

func (*FlexLayer) GetFirstDead3O

func (self *FlexLayer) GetFirstDead3O(createIfNull bool, x int, y int) *DisplayObject

GetFirstDead3O Get the first child that is dead (`child.alive === false`).

This is handy for checking if everything has been wiped out and adding to the pool as needed.

You can use the optional argument `createIfNull` to create a new Game Object if no dead ones were found in this Group.

It works by calling `Group.create` passing it the parameters given to this method, and returning the new child.

If a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child will be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.

func (*FlexLayer) GetFirstDead4O

func (self *FlexLayer) GetFirstDead4O(createIfNull bool, x int, y int, key interface{}) *DisplayObject

GetFirstDead4O Get the first child that is dead (`child.alive === false`).

This is handy for checking if everything has been wiped out and adding to the pool as needed.

You can use the optional argument `createIfNull` to create a new Game Object if no dead ones were found in this Group.

It works by calling `Group.create` passing it the parameters given to this method, and returning the new child.

If a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child will be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.

func (*FlexLayer) GetFirstDead5O

func (self *FlexLayer) GetFirstDead5O(createIfNull bool, x int, y int, key interface{}, frame interface{}) *DisplayObject

GetFirstDead5O Get the first child that is dead (`child.alive === false`).

This is handy for checking if everything has been wiped out and adding to the pool as needed.

You can use the optional argument `createIfNull` to create a new Game Object if no dead ones were found in this Group.

It works by calling `Group.create` passing it the parameters given to this method, and returning the new child.

If a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child will be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.

func (*FlexLayer) GetFirstDeadI

func (self *FlexLayer) GetFirstDeadI(args ...interface{}) *DisplayObject

GetFirstDeadI Get the first child that is dead (`child.alive === false`).

This is handy for checking if everything has been wiped out and adding to the pool as needed.

You can use the optional argument `createIfNull` to create a new Game Object if no dead ones were found in this Group.

It works by calling `Group.create` passing it the parameters given to this method, and returning the new child.

If a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child will be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.

func (*FlexLayer) GetFirstExists

func (self *FlexLayer) GetFirstExists() *DisplayObject

GetFirstExists Get the first display object that exists, or doesn't exist.

You can use the optional argument `createIfNull` to create a new Game Object if none matching your exists argument were found in this Group.

It works by calling `Group.create` passing it the parameters given to this method, and returning the new child.

If a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child will be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.

func (*FlexLayer) GetFirstExists1O

func (self *FlexLayer) GetFirstExists1O(exists bool) *DisplayObject

GetFirstExists1O Get the first display object that exists, or doesn't exist.

You can use the optional argument `createIfNull` to create a new Game Object if none matching your exists argument were found in this Group.

It works by calling `Group.create` passing it the parameters given to this method, and returning the new child.

If a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child will be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.

func (*FlexLayer) GetFirstExists2O

func (self *FlexLayer) GetFirstExists2O(exists bool, createIfNull bool) *DisplayObject

GetFirstExists2O Get the first display object that exists, or doesn't exist.

You can use the optional argument `createIfNull` to create a new Game Object if none matching your exists argument were found in this Group.

It works by calling `Group.create` passing it the parameters given to this method, and returning the new child.

If a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child will be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.

func (*FlexLayer) GetFirstExists3O

func (self *FlexLayer) GetFirstExists3O(exists bool, createIfNull bool, x int) *DisplayObject

GetFirstExists3O Get the first display object that exists, or doesn't exist.

You can use the optional argument `createIfNull` to create a new Game Object if none matching your exists argument were found in this Group.

It works by calling `Group.create` passing it the parameters given to this method, and returning the new child.

If a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child will be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.

func (*FlexLayer) GetFirstExists4O

func (self *FlexLayer) GetFirstExists4O(exists bool, createIfNull bool, x int, y int) *DisplayObject

GetFirstExists4O Get the first display object that exists, or doesn't exist.

You can use the optional argument `createIfNull` to create a new Game Object if none matching your exists argument were found in this Group.

It works by calling `Group.create` passing it the parameters given to this method, and returning the new child.

If a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child will be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.

func (*FlexLayer) GetFirstExists5O

func (self *FlexLayer) GetFirstExists5O(exists bool, createIfNull bool, x int, y int, key interface{}) *DisplayObject

GetFirstExists5O Get the first display object that exists, or doesn't exist.

You can use the optional argument `createIfNull` to create a new Game Object if none matching your exists argument were found in this Group.

It works by calling `Group.create` passing it the parameters given to this method, and returning the new child.

If a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child will be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.

func (*FlexLayer) GetFirstExists6O

func (self *FlexLayer) GetFirstExists6O(exists bool, createIfNull bool, x int, y int, key interface{}, frame interface{}) *DisplayObject

GetFirstExists6O Get the first display object that exists, or doesn't exist.

You can use the optional argument `createIfNull` to create a new Game Object if none matching your exists argument were found in this Group.

It works by calling `Group.create` passing it the parameters given to this method, and returning the new child.

If a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child will be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.

func (*FlexLayer) GetFirstExistsI

func (self *FlexLayer) GetFirstExistsI(args ...interface{}) *DisplayObject

GetFirstExistsI Get the first display object that exists, or doesn't exist.

You can use the optional argument `createIfNull` to create a new Game Object if none matching your exists argument were found in this Group.

It works by calling `Group.create` passing it the parameters given to this method, and returning the new child.

If a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child will be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.

func (*FlexLayer) GetFurthestFrom

func (self *FlexLayer) GetFurthestFrom(object interface{}) interface{}

GetFurthestFrom Get the child furthest away from the given Object, with optional callback to filter children.

This can be a Sprite, Group, Image or any object with public x and y properties.

'furthest away' is determined by the distance from the objects `x` and `y` properties compared to the childs `x` and `y` properties.

You can use the optional `callback` argument to apply your own filter to the distance checks. If the child is closer then the previous child, it will be sent to `callback` as the first argument, with the distance as the second. The callback should return `true` if it passes your filtering criteria, otherwise it should return `false`.

func (*FlexLayer) GetFurthestFrom1O

func (self *FlexLayer) GetFurthestFrom1O(object interface{}, callback interface{}) interface{}

GetFurthestFrom1O Get the child furthest away from the given Object, with optional callback to filter children.

This can be a Sprite, Group, Image or any object with public x and y properties.

'furthest away' is determined by the distance from the objects `x` and `y` properties compared to the childs `x` and `y` properties.

You can use the optional `callback` argument to apply your own filter to the distance checks. If the child is closer then the previous child, it will be sent to `callback` as the first argument, with the distance as the second. The callback should return `true` if it passes your filtering criteria, otherwise it should return `false`.

func (*FlexLayer) GetFurthestFrom2O

func (self *FlexLayer) GetFurthestFrom2O(object interface{}, callback interface{}, callbackContext interface{}) interface{}

GetFurthestFrom2O Get the child furthest away from the given Object, with optional callback to filter children.

This can be a Sprite, Group, Image or any object with public x and y properties.

'furthest away' is determined by the distance from the objects `x` and `y` properties compared to the childs `x` and `y` properties.

You can use the optional `callback` argument to apply your own filter to the distance checks. If the child is closer then the previous child, it will be sent to `callback` as the first argument, with the distance as the second. The callback should return `true` if it passes your filtering criteria, otherwise it should return `false`.

func (*FlexLayer) GetFurthestFromI

func (self *FlexLayer) GetFurthestFromI(args ...interface{}) interface{}

GetFurthestFromI Get the child furthest away from the given Object, with optional callback to filter children.

This can be a Sprite, Group, Image or any object with public x and y properties.

'furthest away' is determined by the distance from the objects `x` and `y` properties compared to the childs `x` and `y` properties.

You can use the optional `callback` argument to apply your own filter to the distance checks. If the child is closer then the previous child, it will be sent to `callback` as the first argument, with the distance as the second. The callback should return `true` if it passes your filtering criteria, otherwise it should return `false`.

func (*FlexLayer) GetIndex

func (self *FlexLayer) GetIndex(child interface{}) int

GetIndex Get the index position of the given child in this group, which should match the child's `z` property.

func (*FlexLayer) GetIndexI

func (self *FlexLayer) GetIndexI(args ...interface{}) int

GetIndexI Get the index position of the given child in this group, which should match the child's `z` property.

func (*FlexLayer) GetLocalBounds

func (self *FlexLayer) GetLocalBounds() *Rectangle

GetLocalBounds Retrieves the non-global local bounds of the displayObjectContainer as a rectangle without any transformations. The calculation takes all visible children into consideration.

func (*FlexLayer) GetLocalBoundsI

func (self *FlexLayer) GetLocalBoundsI(args ...interface{}) *Rectangle

GetLocalBoundsI Retrieves the non-global local bounds of the displayObjectContainer as a rectangle without any transformations. The calculation takes all visible children into consideration.

func (*FlexLayer) GetRandom

func (self *FlexLayer) GetRandom() interface{}

GetRandom Returns a random child from the group.

func (*FlexLayer) GetRandom1O

func (self *FlexLayer) GetRandom1O(startIndex int) interface{}

GetRandom1O Returns a random child from the group.

func (*FlexLayer) GetRandom2O

func (self *FlexLayer) GetRandom2O(startIndex int, length int) interface{}

GetRandom2O Returns a random child from the group.

func (*FlexLayer) GetRandomExists

func (self *FlexLayer) GetRandomExists() interface{}

GetRandomExists Returns a random child from the Group that has `exists` set to `true`.

Optionally you can specify a start and end index. For example if this Group had 100 children, and you set `startIndex` to 0 and `endIndex` to 50, it would return a random child from only the first 50 children in the Group.

func (*FlexLayer) GetRandomExists1O

func (self *FlexLayer) GetRandomExists1O(startIndex int) interface{}

GetRandomExists1O Returns a random child from the Group that has `exists` set to `true`.

Optionally you can specify a start and end index. For example if this Group had 100 children, and you set `startIndex` to 0 and `endIndex` to 50, it would return a random child from only the first 50 children in the Group.

func (*FlexLayer) GetRandomExists2O

func (self *FlexLayer) GetRandomExists2O(startIndex int, endIndex int) interface{}

GetRandomExists2O Returns a random child from the Group that has `exists` set to `true`.

Optionally you can specify a start and end index. For example if this Group had 100 children, and you set `startIndex` to 0 and `endIndex` to 50, it would return a random child from only the first 50 children in the Group.

func (*FlexLayer) GetRandomExistsI

func (self *FlexLayer) GetRandomExistsI(args ...interface{}) interface{}

GetRandomExistsI Returns a random child from the Group that has `exists` set to `true`.

Optionally you can specify a start and end index. For example if this Group had 100 children, and you set `startIndex` to 0 and `endIndex` to 50, it would return a random child from only the first 50 children in the Group.

func (*FlexLayer) GetRandomI

func (self *FlexLayer) GetRandomI(args ...interface{}) interface{}

GetRandomI Returns a random child from the group.

func (*FlexLayer) GetTop

func (self *FlexLayer) GetTop() interface{}

GetTop Return the child at the top of this group.

The top child is the child displayed (rendered) above every other child.

func (*FlexLayer) GetTopI

func (self *FlexLayer) GetTopI(args ...interface{}) interface{}

GetTopI Return the child at the top of this group.

The top child is the child displayed (rendered) above every other child.

func (*FlexLayer) Grid

func (self *FlexLayer) Grid() *FlexGrid

Grid A reference to the FlexGrid that owns this layer.

func (*FlexLayer) HasProperty

func (self *FlexLayer) HasProperty(child interface{}, key []string) bool

HasProperty Checks if the child has the given property.

Will scan up to 4 levels deep only.

func (*FlexLayer) HasPropertyI

func (self *FlexLayer) HasPropertyI(args ...interface{}) bool

HasPropertyI Checks if the child has the given property.

Will scan up to 4 levels deep only.

func (*FlexLayer) Hash

func (self *FlexLayer) Hash() []interface{}

Hash The hash array is an array belonging to this Group into which you can add any of its children via Group.addToHash and Group.removeFromHash.

Only children of this Group can be added to and removed from the hash.

This hash is used automatically by Phaser Arcade Physics in order to perform non z-index based destructive sorting. However if you don't use Arcade Physics, or this isn't a physics enabled Group, then you can use the hash to perform your own sorting and filtering of Group children without touching their z-index (and therefore display draw order)

func (*FlexLayer) Height

func (self *FlexLayer) Height() int

Height The height of the displayObjectContainer, setting this will actually modify the scale to achieve the value set

func (*FlexLayer) IgnoreChildInput

func (self *FlexLayer) IgnoreChildInput() bool

IgnoreChildInput If `ignoreChildInput` is `false` it will allow this objects _children_ to be considered as valid for Input events.

If this property is `true` then the children will _not_ be considered as valid for Input events.

Note that this property isn't recursive: only immediate children are influenced, it doesn't scan further down.

func (*FlexLayer) IgnoreDestroy

func (self *FlexLayer) IgnoreDestroy() bool

IgnoreDestroy A group with `ignoreDestroy` set to `true` ignores all calls to its `destroy` method.

func (*FlexLayer) InputEnableChildren

func (self *FlexLayer) InputEnableChildren() bool

InputEnableChildren A Group with `inputEnableChildren` set to `true` will automatically call `inputEnabled = true` on any children _added_ to, or _created by_, this Group.

If there are children already in the Group at the time you set this property, they are not changed.

func (*FlexLayer) Iterate

func (self *FlexLayer) Iterate(key string, value interface{}, returnType int) interface{}

Iterate Iterates over the children of the group performing one of several actions for matched children.

A child is considered a match when it has a property, named `key`, whose value is equal to `value` according to a strict equality comparison.

The result depends on the `returnType`:

  • {@link Phaser.Group.RETURN_TOTAL RETURN_TOTAL}: The callback, if any, is applied to all matching children. The number of matched children is returned.
  • {@link Phaser.Group.RETURN_NONE RETURN_NONE}: The callback, if any, is applied to all matching children. No value is returned.
  • {@link Phaser.Group.RETURN_CHILD RETURN_CHILD}: The callback, if any, is applied to the *first* matching child and the *first* matched child is returned. If there is no matching child then null is returned.

If `args` is specified it must be an array. The matched child will be assigned to the first element and the entire array will be applied to the callback function.

func (*FlexLayer) Iterate1O

func (self *FlexLayer) Iterate1O(key string, value interface{}, returnType int, callback interface{}) interface{}

Iterate1O Iterates over the children of the group performing one of several actions for matched children.

A child is considered a match when it has a property, named `key`, whose value is equal to `value` according to a strict equality comparison.

The result depends on the `returnType`:

  • {@link Phaser.Group.RETURN_TOTAL RETURN_TOTAL}: The callback, if any, is applied to all matching children. The number of matched children is returned.
  • {@link Phaser.Group.RETURN_NONE RETURN_NONE}: The callback, if any, is applied to all matching children. No value is returned.
  • {@link Phaser.Group.RETURN_CHILD RETURN_CHILD}: The callback, if any, is applied to the *first* matching child and the *first* matched child is returned. If there is no matching child then null is returned.

If `args` is specified it must be an array. The matched child will be assigned to the first element and the entire array will be applied to the callback function.

func (*FlexLayer) Iterate2O

func (self *FlexLayer) Iterate2O(key string, value interface{}, returnType int, callback interface{}, callbackContext interface{}) interface{}

Iterate2O Iterates over the children of the group performing one of several actions for matched children.

A child is considered a match when it has a property, named `key`, whose value is equal to `value` according to a strict equality comparison.

The result depends on the `returnType`:

  • {@link Phaser.Group.RETURN_TOTAL RETURN_TOTAL}: The callback, if any, is applied to all matching children. The number of matched children is returned.
  • {@link Phaser.Group.RETURN_NONE RETURN_NONE}: The callback, if any, is applied to all matching children. No value is returned.
  • {@link Phaser.Group.RETURN_CHILD RETURN_CHILD}: The callback, if any, is applied to the *first* matching child and the *first* matched child is returned. If there is no matching child then null is returned.

If `args` is specified it must be an array. The matched child will be assigned to the first element and the entire array will be applied to the callback function.

func (*FlexLayer) Iterate3O

func (self *FlexLayer) Iterate3O(key string, value interface{}, returnType int, callback interface{}, callbackContext interface{}, args []interface{}) interface{}

Iterate3O Iterates over the children of the group performing one of several actions for matched children.

A child is considered a match when it has a property, named `key`, whose value is equal to `value` according to a strict equality comparison.

The result depends on the `returnType`:

  • {@link Phaser.Group.RETURN_TOTAL RETURN_TOTAL}: The callback, if any, is applied to all matching children. The number of matched children is returned.
  • {@link Phaser.Group.RETURN_NONE RETURN_NONE}: The callback, if any, is applied to all matching children. No value is returned.
  • {@link Phaser.Group.RETURN_CHILD RETURN_CHILD}: The callback, if any, is applied to the *first* matching child and the *first* matched child is returned. If there is no matching child then null is returned.

If `args` is specified it must be an array. The matched child will be assigned to the first element and the entire array will be applied to the callback function.

func (*FlexLayer) IterateI

func (self *FlexLayer) IterateI(args ...interface{}) interface{}

IterateI Iterates over the children of the group performing one of several actions for matched children.

A child is considered a match when it has a property, named `key`, whose value is equal to `value` according to a strict equality comparison.

The result depends on the `returnType`:

  • {@link Phaser.Group.RETURN_TOTAL RETURN_TOTAL}: The callback, if any, is applied to all matching children. The number of matched children is returned.
  • {@link Phaser.Group.RETURN_NONE RETURN_NONE}: The callback, if any, is applied to all matching children. No value is returned.
  • {@link Phaser.Group.RETURN_CHILD RETURN_CHILD}: The callback, if any, is applied to the *first* matching child and the *first* matched child is returned. If there is no matching child then null is returned.

If `args` is specified it must be an array. The matched child will be assigned to the first element and the entire array will be applied to the callback function.

func (*FlexLayer) Left

func (self *FlexLayer) Left() int

Left The left coordinate of this Group.

It is derived by calling `getBounds`, calculating the Groups dimensions based on its visible children.

func (*FlexLayer) Length

func (self *FlexLayer) Length() int

Length Total number of children in this group, regardless of exists/alive status.

func (*FlexLayer) Manager

func (self *FlexLayer) Manager() interface{}

Manager A reference to the ScaleManager.

func (*FlexLayer) MoveAll

func (self *FlexLayer) MoveAll(group *Group) *Group

MoveAll Moves all children from this Group to the Group given.

func (*FlexLayer) MoveAll1O

func (self *FlexLayer) MoveAll1O(group *Group, silent bool) *Group

MoveAll1O Moves all children from this Group to the Group given.

func (*FlexLayer) MoveAllI

func (self *FlexLayer) MoveAllI(args ...interface{}) *Group

MoveAllI Moves all children from this Group to the Group given.

func (*FlexLayer) MoveDown

func (self *FlexLayer) MoveDown(child interface{}) interface{}

MoveDown Moves the given child down one place in this group unless it's already at the bottom.

func (*FlexLayer) MoveDownI

func (self *FlexLayer) MoveDownI(args ...interface{}) interface{}

MoveDownI Moves the given child down one place in this group unless it's already at the bottom.

func (*FlexLayer) MoveUp

func (self *FlexLayer) MoveUp(child interface{}) interface{}

MoveUp Moves the given child up one place in this group unless it's already at the top.

func (*FlexLayer) MoveUpI

func (self *FlexLayer) MoveUpI(args ...interface{}) interface{}

MoveUpI Moves the given child up one place in this group unless it's already at the top.

func (*FlexLayer) MultiplyAll

func (self *FlexLayer) MultiplyAll(property string, amount int, checkAlive bool, checkVisible bool)

MultiplyAll Multiplies the given property by the amount on all children in this group.

`Group.multiplyAll('x', 2)` will x2 the child.x value for each child.

func (*FlexLayer) MultiplyAllI

func (self *FlexLayer) MultiplyAllI(args ...interface{})

MultiplyAllI Multiplies the given property by the amount on all children in this group.

`Group.multiplyAll('x', 2)` will x2 the child.x value for each child.

func (*FlexLayer) Name

func (self *FlexLayer) Name() string

Name A name for this group. Not used internally but useful for debugging.

func (*FlexLayer) Next

func (self *FlexLayer) Next() interface{}

Next Advances the group cursor to the next (higher) object in the group.

If the cursor is at the end of the group (top child) it is moved the start of the group (bottom child).

func (*FlexLayer) NextI

func (self *FlexLayer) NextI(args ...interface{}) interface{}

NextI Advances the group cursor to the next (higher) object in the group.

If the cursor is at the end of the group (top child) it is moved the start of the group (bottom child).

func (*FlexLayer) OnChildInputDown

func (self *FlexLayer) OnChildInputDown() *Signal

OnChildInputDown This Signal is dispatched whenever a child of this Group emits an onInputDown signal as a result of having been interacted with by a Pointer. You can bind functions to this Signal instead of to every child Sprite.

This Signal is sent 2 arguments: A reference to the Sprite that triggered the signal, and a reference to the Pointer that caused it.

func (*FlexLayer) OnChildInputOut

func (self *FlexLayer) OnChildInputOut() *Signal

OnChildInputOut This Signal is dispatched whenever a child of this Group emits an onInputOut signal as a result of having been interacted with by a Pointer. You can bind functions to this Signal instead of to every child Sprite.

This Signal is sent 2 arguments: A reference to the Sprite that triggered the signal, and a reference to the Pointer that caused it.

func (*FlexLayer) OnChildInputOver

func (self *FlexLayer) OnChildInputOver() *Signal

OnChildInputOver This Signal is dispatched whenever a child of this Group emits an onInputOver signal as a result of having been interacted with by a Pointer. You can bind functions to this Signal instead of to every child Sprite.

This Signal is sent 2 arguments: A reference to the Sprite that triggered the signal, and a reference to the Pointer that caused it.

func (*FlexLayer) OnChildInputUp

func (self *FlexLayer) OnChildInputUp() *Signal

OnChildInputUp This Signal is dispatched whenever a child of this Group emits an onInputUp signal as a result of having been interacted with by a Pointer. You can bind functions to this Signal instead of to every child Sprite.

This Signal is sent 3 arguments: A reference to the Sprite that triggered the signal, a reference to the Pointer that caused it, and a boolean value `isOver` that tells you if the Pointer is still over the Sprite or not.

func (*FlexLayer) OnDestroy

func (self *FlexLayer) OnDestroy() *Signal

OnDestroy This signal is dispatched when the group is destroyed.

func (*FlexLayer) PendingDestroy

func (self *FlexLayer) PendingDestroy() bool

PendingDestroy A Group is that has `pendingDestroy` set to `true` is flagged to have its destroy method called on the next logic update. You can set it directly to flag the Group to be destroyed on its next update.

This is extremely useful if you wish to destroy a Group from within one of its own callbacks or a callback of one of its children.

func (*FlexLayer) Persist

func (self *FlexLayer) Persist() bool

Persist Should the FlexLayer remain through a State swap?

func (*FlexLayer) PhysicsBodyType

func (self *FlexLayer) PhysicsBodyType() int

PhysicsBodyType If {@link Phaser.Group#enableBody enableBody} is true this is the type of physics body that is created on new Sprites.

The valid values are {@link Phaser.Physics.ARCADE}, {@link Phaser.Physics.P2JS}, {@link Phaser.Physics.NINJA}, etc.

func (*FlexLayer) PhysicsSortDirection

func (self *FlexLayer) PhysicsSortDirection() int

PhysicsSortDirection If this Group contains Arcade Physics Sprites you can set a custom sort direction via this property.

It should be set to one of the Phaser.Physics.Arcade sort direction constants:

Phaser.Physics.Arcade.SORT_NONE Phaser.Physics.Arcade.LEFT_RIGHT Phaser.Physics.Arcade.RIGHT_LEFT Phaser.Physics.Arcade.TOP_BOTTOM Phaser.Physics.Arcade.BOTTOM_TOP

If set to `null` the Group will use whatever Phaser.Physics.Arcade.sortDirection is set to. This is the default behavior.

func (*FlexLayer) PhysicsType

func (self *FlexLayer) PhysicsType() int

PhysicsType The const physics body type of this object.

func (*FlexLayer) Position

func (self *FlexLayer) Position() *Point

Position empty description

func (*FlexLayer) PostUpdate

func (self *FlexLayer) PostUpdate()

PostUpdate The core postUpdate - as called by World.

func (*FlexLayer) PostUpdateI

func (self *FlexLayer) PostUpdateI(args ...interface{})

PostUpdateI The core postUpdate - as called by World.

func (*FlexLayer) PreUpdate

func (self *FlexLayer) PreUpdate()

PreUpdate The core preUpdate - as called by World.

func (*FlexLayer) PreUpdateI

func (self *FlexLayer) PreUpdateI(args ...interface{})

PreUpdateI The core preUpdate - as called by World.

func (*FlexLayer) Previous

func (self *FlexLayer) Previous() interface{}

Previous Moves the group cursor to the previous (lower) child in the group.

If the cursor is at the start of the group (bottom child) it is moved to the end (top child).

func (*FlexLayer) PreviousI

func (self *FlexLayer) PreviousI(args ...interface{}) interface{}

PreviousI Moves the group cursor to the previous (lower) child in the group.

If the cursor is at the start of the group (bottom child) it is moved to the end (top child).

func (*FlexLayer) Remove

func (self *FlexLayer) Remove(child interface{}) bool

Remove Removes the given child from this group.

This will dispatch an `onRemovedFromGroup` event from the child (if it has one), and optionally destroy the child.

If the group cursor was referring to the removed child it is updated to refer to the next child.

func (*FlexLayer) Remove1O

func (self *FlexLayer) Remove1O(child interface{}, destroy bool) bool

Remove1O Removes the given child from this group.

This will dispatch an `onRemovedFromGroup` event from the child (if it has one), and optionally destroy the child.

If the group cursor was referring to the removed child it is updated to refer to the next child.

func (*FlexLayer) Remove2O

func (self *FlexLayer) Remove2O(child interface{}, destroy bool, silent bool) bool

Remove2O Removes the given child from this group.

This will dispatch an `onRemovedFromGroup` event from the child (if it has one), and optionally destroy the child.

If the group cursor was referring to the removed child it is updated to refer to the next child.

func (*FlexLayer) RemoveAll

func (self *FlexLayer) RemoveAll()

RemoveAll Removes all children from this Group, but does not remove the group from its parent.

The children can be optionally destroyed as they are removed.

You can also optionally also destroy the BaseTexture the Child is using. Be careful if you've more than one Game Object sharing the same BaseTexture.

func (*FlexLayer) RemoveAll1O

func (self *FlexLayer) RemoveAll1O(destroy bool)

RemoveAll1O Removes all children from this Group, but does not remove the group from its parent.

The children can be optionally destroyed as they are removed.

You can also optionally also destroy the BaseTexture the Child is using. Be careful if you've more than one Game Object sharing the same BaseTexture.

func (*FlexLayer) RemoveAll2O

func (self *FlexLayer) RemoveAll2O(destroy bool, silent bool)

RemoveAll2O Removes all children from this Group, but does not remove the group from its parent.

The children can be optionally destroyed as they are removed.

You can also optionally also destroy the BaseTexture the Child is using. Be careful if you've more than one Game Object sharing the same BaseTexture.

func (*FlexLayer) RemoveAll3O

func (self *FlexLayer) RemoveAll3O(destroy bool, silent bool, destroyTexture bool)

RemoveAll3O Removes all children from this Group, but does not remove the group from its parent.

The children can be optionally destroyed as they are removed.

You can also optionally also destroy the BaseTexture the Child is using. Be careful if you've more than one Game Object sharing the same BaseTexture.

func (*FlexLayer) RemoveAllI

func (self *FlexLayer) RemoveAllI(args ...interface{})

RemoveAllI Removes all children from this Group, but does not remove the group from its parent.

The children can be optionally destroyed as they are removed.

You can also optionally also destroy the BaseTexture the Child is using. Be careful if you've more than one Game Object sharing the same BaseTexture.

func (*FlexLayer) RemoveBetween

func (self *FlexLayer) RemoveBetween(startIndex int)

RemoveBetween Removes all children from this group whose index falls beteen the given startIndex and endIndex values.

func (*FlexLayer) RemoveBetween1O

func (self *FlexLayer) RemoveBetween1O(startIndex int, endIndex int)

RemoveBetween1O Removes all children from this group whose index falls beteen the given startIndex and endIndex values.

func (*FlexLayer) RemoveBetween2O

func (self *FlexLayer) RemoveBetween2O(startIndex int, endIndex int, destroy bool)

RemoveBetween2O Removes all children from this group whose index falls beteen the given startIndex and endIndex values.

func (*FlexLayer) RemoveBetween3O

func (self *FlexLayer) RemoveBetween3O(startIndex int, endIndex int, destroy bool, silent bool)

RemoveBetween3O Removes all children from this group whose index falls beteen the given startIndex and endIndex values.

func (*FlexLayer) RemoveBetweenI

func (self *FlexLayer) RemoveBetweenI(args ...interface{})

RemoveBetweenI Removes all children from this group whose index falls beteen the given startIndex and endIndex values.

func (*FlexLayer) RemoveChild

func (self *FlexLayer) RemoveChild(child *DisplayObject) *DisplayObject

RemoveChild Removes a child from the container.

func (*FlexLayer) RemoveChildAt

func (self *FlexLayer) RemoveChildAt(index int) *DisplayObject

RemoveChildAt Removes a child from the specified index position.

func (*FlexLayer) RemoveChildAtI

func (self *FlexLayer) RemoveChildAtI(args ...interface{}) *DisplayObject

RemoveChildAtI Removes a child from the specified index position.

func (*FlexLayer) RemoveChildI

func (self *FlexLayer) RemoveChildI(args ...interface{}) *DisplayObject

RemoveChildI Removes a child from the container.

func (*FlexLayer) RemoveChildren

func (self *FlexLayer) RemoveChildren(beginIndex int, endIndex int)

RemoveChildren Removes all children from this container that are within the begin and end indexes.

func (*FlexLayer) RemoveChildrenI

func (self *FlexLayer) RemoveChildrenI(args ...interface{})

RemoveChildrenI Removes all children from this container that are within the begin and end indexes.

func (*FlexLayer) RemoveFromHash

func (self *FlexLayer) RemoveFromHash(child *DisplayObject) bool

RemoveFromHash Removes a child of this Group from the hash array. This call will return false if the child is not in the hash.

func (*FlexLayer) RemoveFromHashI

func (self *FlexLayer) RemoveFromHashI(args ...interface{}) bool

RemoveFromHashI Removes a child of this Group from the hash array. This call will return false if the child is not in the hash.

func (*FlexLayer) RemoveI

func (self *FlexLayer) RemoveI(args ...interface{}) bool

RemoveI Removes the given child from this group.

This will dispatch an `onRemovedFromGroup` event from the child (if it has one), and optionally destroy the child.

If the group cursor was referring to the removed child it is updated to refer to the next child.

func (*FlexLayer) Replace

func (self *FlexLayer) Replace(oldChild interface{}, newChild interface{}) interface{}

Replace Replaces a child of this Group with the given newChild. The newChild cannot be a member of this Group.

If `Group.enableBody` is set, then a physics body will be created on the object, so long as one does not already exist.

If `Group.inputEnableChildren` is set, then an Input Handler will be created on the object, so long as one does not already exist.

func (*FlexLayer) ReplaceI

func (self *FlexLayer) ReplaceI(args ...interface{}) interface{}

ReplaceI Replaces a child of this Group with the given newChild. The newChild cannot be a member of this Group.

If `Group.enableBody` is set, then a physics body will be created on the object, so long as one does not already exist.

If `Group.inputEnableChildren` is set, then an Input Handler will be created on the object, so long as one does not already exist.

func (*FlexLayer) ResetChild

func (self *FlexLayer) ResetChild(child *DisplayObject) *DisplayObject

ResetChild Takes a child and if the `x` and `y` arguments are given it calls `child.reset(x, y)` on it.

If the `key` and optionally the `frame` arguments are given, it calls `child.loadTexture(key, frame)` on it.

The two operations are separate. For example if you just wish to load a new texture then pass `null` as the x and y values.

func (*FlexLayer) ResetChild1O

func (self *FlexLayer) ResetChild1O(child *DisplayObject, x int) *DisplayObject

ResetChild1O Takes a child and if the `x` and `y` arguments are given it calls `child.reset(x, y)` on it.

If the `key` and optionally the `frame` arguments are given, it calls `child.loadTexture(key, frame)` on it.

The two operations are separate. For example if you just wish to load a new texture then pass `null` as the x and y values.

func (*FlexLayer) ResetChild2O

func (self *FlexLayer) ResetChild2O(child *DisplayObject, x int, y int) *DisplayObject

ResetChild2O Takes a child and if the `x` and `y` arguments are given it calls `child.reset(x, y)` on it.

If the `key` and optionally the `frame` arguments are given, it calls `child.loadTexture(key, frame)` on it.

The two operations are separate. For example if you just wish to load a new texture then pass `null` as the x and y values.

func (*FlexLayer) ResetChild3O

func (self *FlexLayer) ResetChild3O(child *DisplayObject, x int, y int, key interface{}) *DisplayObject

ResetChild3O Takes a child and if the `x` and `y` arguments are given it calls `child.reset(x, y)` on it.

If the `key` and optionally the `frame` arguments are given, it calls `child.loadTexture(key, frame)` on it.

The two operations are separate. For example if you just wish to load a new texture then pass `null` as the x and y values.

func (*FlexLayer) ResetChild4O

func (self *FlexLayer) ResetChild4O(child *DisplayObject, x int, y int, key interface{}, frame interface{}) *DisplayObject

ResetChild4O Takes a child and if the `x` and `y` arguments are given it calls `child.reset(x, y)` on it.

If the `key` and optionally the `frame` arguments are given, it calls `child.loadTexture(key, frame)` on it.

The two operations are separate. For example if you just wish to load a new texture then pass `null` as the x and y values.

func (*FlexLayer) ResetChildI

func (self *FlexLayer) ResetChildI(args ...interface{}) *DisplayObject

ResetChildI Takes a child and if the `x` and `y` arguments are given it calls `child.reset(x, y)` on it.

If the `key` and optionally the `frame` arguments are given, it calls `child.loadTexture(key, frame)` on it.

The two operations are separate. For example if you just wish to load a new texture then pass `null` as the x and y values.

func (*FlexLayer) ResetCursor

func (self *FlexLayer) ResetCursor() interface{}

ResetCursor Sets the group cursor to the first child in the group.

If the optional index parameter is given it sets the cursor to the object at that index instead.

func (*FlexLayer) ResetCursor1O

func (self *FlexLayer) ResetCursor1O(index int) interface{}

ResetCursor1O Sets the group cursor to the first child in the group.

If the optional index parameter is given it sets the cursor to the object at that index instead.

func (*FlexLayer) ResetCursorI

func (self *FlexLayer) ResetCursorI(args ...interface{}) interface{}

ResetCursorI Sets the group cursor to the first child in the group.

If the optional index parameter is given it sets the cursor to the object at that index instead.

func (*FlexLayer) Resize

func (self *FlexLayer) Resize()

Resize Resize.

func (*FlexLayer) ResizeI

func (self *FlexLayer) ResizeI(args ...interface{})

ResizeI Resize.

func (*FlexLayer) Reverse

func (self *FlexLayer) Reverse()

Reverse Reverses all children in this group.

This operation applies only to immediate children and does not propagate to subgroups.

func (*FlexLayer) ReverseI

func (self *FlexLayer) ReverseI(args ...interface{})

ReverseI Reverses all children in this group.

This operation applies only to immediate children and does not propagate to subgroups.

func (*FlexLayer) Right

func (self *FlexLayer) Right() int

Right The right coordinate of this Group.

It is derived by calling `getBounds`, calculating the Groups dimensions based on its visible children.

func (*FlexLayer) Rotation

func (self *FlexLayer) Rotation() int

Rotation The angle of rotation of the group container, in radians.

This will adjust the group container itself by modifying its rotation. This will have no impact on the rotation value of its children, but it will update their worldTransform and on-screen position.

func (*FlexLayer) Scale

func (self *FlexLayer) Scale() *Point

Scale empty description

func (*FlexLayer) SendToBack

func (self *FlexLayer) SendToBack(child interface{}) interface{}

SendToBack Sends the given child to the bottom of this group so it renders below all other children.

func (*FlexLayer) SendToBackI

func (self *FlexLayer) SendToBackI(args ...interface{}) interface{}

SendToBackI Sends the given child to the bottom of this group so it renders below all other children.

func (*FlexLayer) Set

func (self *FlexLayer) Set(child *Sprite, key string, value interface{}) bool

Set Quickly set a property on a single child of this group to a new value.

The operation parameter controls how the new value is assigned to the property, from simple replacement to addition and multiplication.

func (*FlexLayer) Set1O

func (self *FlexLayer) Set1O(child *Sprite, key string, value interface{}, checkAlive bool) bool

Set1O Quickly set a property on a single child of this group to a new value.

The operation parameter controls how the new value is assigned to the property, from simple replacement to addition and multiplication.

func (*FlexLayer) Set2O

func (self *FlexLayer) Set2O(child *Sprite, key string, value interface{}, checkAlive bool, checkVisible bool) bool

Set2O Quickly set a property on a single child of this group to a new value.

The operation parameter controls how the new value is assigned to the property, from simple replacement to addition and multiplication.

func (*FlexLayer) Set3O

func (self *FlexLayer) Set3O(child *Sprite, key string, value interface{}, checkAlive bool, checkVisible bool, operation int) bool

Set3O Quickly set a property on a single child of this group to a new value.

The operation parameter controls how the new value is assigned to the property, from simple replacement to addition and multiplication.

func (*FlexLayer) Set4O

func (self *FlexLayer) Set4O(child *Sprite, key string, value interface{}, checkAlive bool, checkVisible bool, operation int, force bool) bool

Set4O Quickly set a property on a single child of this group to a new value.

The operation parameter controls how the new value is assigned to the property, from simple replacement to addition and multiplication.

func (*FlexLayer) SetAliveA

func (self *FlexLayer) SetAliveA(member bool)

SetAliveA The alive property is useful for Groups that are children of other Groups and need to be included/excluded in checks like forEachAlive.

func (*FlexLayer) SetAll

func (self *FlexLayer) SetAll(key string, value interface{})

SetAll Quickly set the same property across all children of this group to a new value.

This call doesn't descend down children, so if you have a Group inside of this group, the property will be set on the group but not its children. If you need that ability please see `Group.setAllChildren`.

The operation parameter controls how the new value is assigned to the property, from simple replacement to addition and multiplication.

func (*FlexLayer) SetAll1O

func (self *FlexLayer) SetAll1O(key string, value interface{}, checkAlive bool)

SetAll1O Quickly set the same property across all children of this group to a new value.

This call doesn't descend down children, so if you have a Group inside of this group, the property will be set on the group but not its children. If you need that ability please see `Group.setAllChildren`.

The operation parameter controls how the new value is assigned to the property, from simple replacement to addition and multiplication.

func (*FlexLayer) SetAll2O

func (self *FlexLayer) SetAll2O(key string, value interface{}, checkAlive bool, checkVisible bool)

SetAll2O Quickly set the same property across all children of this group to a new value.

This call doesn't descend down children, so if you have a Group inside of this group, the property will be set on the group but not its children. If you need that ability please see `Group.setAllChildren`.

The operation parameter controls how the new value is assigned to the property, from simple replacement to addition and multiplication.

func (*FlexLayer) SetAll3O

func (self *FlexLayer) SetAll3O(key string, value interface{}, checkAlive bool, checkVisible bool, operation int)

SetAll3O Quickly set the same property across all children of this group to a new value.

This call doesn't descend down children, so if you have a Group inside of this group, the property will be set on the group but not its children. If you need that ability please see `Group.setAllChildren`.

The operation parameter controls how the new value is assigned to the property, from simple replacement to addition and multiplication.

func (*FlexLayer) SetAll4O

func (self *FlexLayer) SetAll4O(key string, value interface{}, checkAlive bool, checkVisible bool, operation int, force bool)

SetAll4O Quickly set the same property across all children of this group to a new value.

This call doesn't descend down children, so if you have a Group inside of this group, the property will be set on the group but not its children. If you need that ability please see `Group.setAllChildren`.

The operation parameter controls how the new value is assigned to the property, from simple replacement to addition and multiplication.

func (*FlexLayer) SetAllChildren

func (self *FlexLayer) SetAllChildren(key string, value interface{})

SetAllChildren Quickly set the same property across all children of this group, and any child Groups, to a new value.

If this group contains other Groups then the same property is set across their children as well, iterating down until it reaches the bottom. Unlike with `setAll` the property is NOT set on child Groups itself.

The operation parameter controls how the new value is assigned to the property, from simple replacement to addition and multiplication.

func (*FlexLayer) SetAllChildren1O

func (self *FlexLayer) SetAllChildren1O(key string, value interface{}, checkAlive bool)

SetAllChildren1O Quickly set the same property across all children of this group, and any child Groups, to a new value.

If this group contains other Groups then the same property is set across their children as well, iterating down until it reaches the bottom. Unlike with `setAll` the property is NOT set on child Groups itself.

The operation parameter controls how the new value is assigned to the property, from simple replacement to addition and multiplication.

func (*FlexLayer) SetAllChildren2O

func (self *FlexLayer) SetAllChildren2O(key string, value interface{}, checkAlive bool, checkVisible bool)

SetAllChildren2O Quickly set the same property across all children of this group, and any child Groups, to a new value.

If this group contains other Groups then the same property is set across their children as well, iterating down until it reaches the bottom. Unlike with `setAll` the property is NOT set on child Groups itself.

The operation parameter controls how the new value is assigned to the property, from simple replacement to addition and multiplication.

func (*FlexLayer) SetAllChildren3O

func (self *FlexLayer) SetAllChildren3O(key string, value interface{}, checkAlive bool, checkVisible bool, operation int)

SetAllChildren3O Quickly set the same property across all children of this group, and any child Groups, to a new value.

If this group contains other Groups then the same property is set across their children as well, iterating down until it reaches the bottom. Unlike with `setAll` the property is NOT set on child Groups itself.

The operation parameter controls how the new value is assigned to the property, from simple replacement to addition and multiplication.

func (*FlexLayer) SetAllChildren4O

func (self *FlexLayer) SetAllChildren4O(key string, value interface{}, checkAlive bool, checkVisible bool, operation int, force bool)

SetAllChildren4O Quickly set the same property across all children of this group, and any child Groups, to a new value.

If this group contains other Groups then the same property is set across their children as well, iterating down until it reaches the bottom. Unlike with `setAll` the property is NOT set on child Groups itself.

The operation parameter controls how the new value is assigned to the property, from simple replacement to addition and multiplication.

func (*FlexLayer) SetAllChildrenI

func (self *FlexLayer) SetAllChildrenI(args ...interface{})

SetAllChildrenI Quickly set the same property across all children of this group, and any child Groups, to a new value.

If this group contains other Groups then the same property is set across their children as well, iterating down until it reaches the bottom. Unlike with `setAll` the property is NOT set on child Groups itself.

The operation parameter controls how the new value is assigned to the property, from simple replacement to addition and multiplication.

func (*FlexLayer) SetAllI

func (self *FlexLayer) SetAllI(args ...interface{})

SetAllI Quickly set the same property across all children of this group to a new value.

This call doesn't descend down children, so if you have a Group inside of this group, the property will be set on the group but not its children. If you need that ability please see `Group.setAllChildren`.

The operation parameter controls how the new value is assigned to the property, from simple replacement to addition and multiplication.

func (*FlexLayer) SetAlphaA

func (self *FlexLayer) SetAlphaA(member int)

SetAlphaA The alpha value of the group container.

func (*FlexLayer) SetAngleA

func (self *FlexLayer) SetAngleA(member int)

SetAngleA The angle of rotation of the group container, in degrees.

This adjusts the group itself by modifying its local rotation transform.

This has no impact on the rotation/angle properties of the children, but it will update their worldTransform and on-screen orientation and position.

func (*FlexLayer) SetBottomA

func (self *FlexLayer) SetBottomA(member int)

SetBottomA The bottom coordinate of this Group.

It is derived by calling `getBounds`, calculating the Groups dimensions based on its visible children.

func (*FlexLayer) SetBottomLeftA

func (self *FlexLayer) SetBottomLeftA(member *Point)

SetBottomLeftA empty description

func (*FlexLayer) SetBottomMiddleA

func (self *FlexLayer) SetBottomMiddleA(member *Point)

SetBottomMiddleA empty description

func (*FlexLayer) SetBottomRightA

func (self *FlexLayer) SetBottomRightA(member *Point)

SetBottomRightA empty description

func (*FlexLayer) SetBoundsA

func (self *FlexLayer) SetBoundsA(member *Rectangle)

SetBoundsA empty description

func (*FlexLayer) SetCameraOffsetA

func (self *FlexLayer) SetCameraOffsetA(member *Point)

SetCameraOffsetA If this object is {@link Phaser.Group#fixedToCamera fixedToCamera} then this stores the x/y position offset relative to the top-left of the camera view. If the parent of this Group is also `fixedToCamera` then the offset here is in addition to that and should typically be disabled.

func (*FlexLayer) SetCenterXA

func (self *FlexLayer) SetCenterXA(member int)

SetCenterXA The center x coordinate of this Group.

It is derived by calling `getBounds`, calculating the Groups dimensions based on its visible children.

func (*FlexLayer) SetCenterYA

func (self *FlexLayer) SetCenterYA(member int)

SetCenterYA The center y coordinate of this Group.

It is derived by calling `getBounds`, calculating the Groups dimensions based on its visible children.

func (*FlexLayer) SetChildIndex

func (self *FlexLayer) SetChildIndex(child *DisplayObject, index int)

SetChildIndex Changes the position of an existing child in the display object container

func (*FlexLayer) SetChildIndexI

func (self *FlexLayer) SetChildIndexI(args ...interface{})

SetChildIndexI Changes the position of an existing child in the display object container

func (*FlexLayer) SetChildrenA

func (self *FlexLayer) SetChildrenA(member []DisplayObject)

SetChildrenA [read-only] The array of children of this container.

func (*FlexLayer) SetClassTypeA

func (self *FlexLayer) SetClassTypeA(member interface{})

SetClassTypeA The type of objects that will be created when using {@link Phaser.Group#create create} or {@link Phaser.Group#createMultiple createMultiple}.

Any object may be used but it should extend either Sprite or Image and accept the same constructor arguments: when a new object is created it is passed the following parameters to its constructor: `(game, x, y, key, frame)`.

func (*FlexLayer) SetCursorA

func (self *FlexLayer) SetCursorA(member *DisplayObject)

SetCursorA The current display object that the group cursor is pointing to, if any. (Can be set manually.)

The cursor is a way to iterate through the children in a Group using {@link Phaser.Group#next next} and {@link Phaser.Group#previous previous}.

func (*FlexLayer) SetCursorIndexA

func (self *FlexLayer) SetCursorIndexA(member int)

SetCursorIndexA The current index of the Group cursor. Advance it with Group.next.

func (*FlexLayer) SetEnableBodyA

func (self *FlexLayer) SetEnableBodyA(member bool)

SetEnableBodyA If true all Sprites created by, or added to this group, will have a physics body enabled on them.

If there are children already in the Group at the time you set this property, they are not changed.

The default body type is controlled with {@link Phaser.Group#physicsBodyType physicsBodyType}.

func (*FlexLayer) SetEnableBodyDebugA

func (self *FlexLayer) SetEnableBodyDebugA(member bool)

SetEnableBodyDebugA If true when a physics body is created (via {@link Phaser.Group#enableBody enableBody}) it will create a physics debug object as well.

This only works for P2 bodies.

func (*FlexLayer) SetExistsA

func (self *FlexLayer) SetExistsA(member bool)

SetExistsA If exists is true the group is updated, otherwise it is skipped.

func (*FlexLayer) SetFixedToCameraA

func (self *FlexLayer) SetFixedToCameraA(member bool)

SetFixedToCameraA A Group that is fixed to the camera uses its x/y coordinates as offsets from the top left of the camera. These are stored in Group.cameraOffset.

Note that the cameraOffset values are in addition to any parent in the display list. So if this Group was in a Group that has x: 200, then this will be added to the cameraOffset.x

func (*FlexLayer) SetGameA

func (self *FlexLayer) SetGameA(member *Game)

SetGameA A reference to the currently running Game.

func (*FlexLayer) SetGridA

func (self *FlexLayer) SetGridA(member *FlexGrid)

SetGridA A reference to the FlexGrid that owns this layer.

func (*FlexLayer) SetHashA

func (self *FlexLayer) SetHashA(member []interface{})

SetHashA The hash array is an array belonging to this Group into which you can add any of its children via Group.addToHash and Group.removeFromHash.

Only children of this Group can be added to and removed from the hash.

This hash is used automatically by Phaser Arcade Physics in order to perform non z-index based destructive sorting. However if you don't use Arcade Physics, or this isn't a physics enabled Group, then you can use the hash to perform your own sorting and filtering of Group children without touching their z-index (and therefore display draw order)

func (*FlexLayer) SetHeightA

func (self *FlexLayer) SetHeightA(member int)

SetHeightA The height of the displayObjectContainer, setting this will actually modify the scale to achieve the value set

func (*FlexLayer) SetI

func (self *FlexLayer) SetI(args ...interface{}) bool

SetI Quickly set a property on a single child of this group to a new value.

The operation parameter controls how the new value is assigned to the property, from simple replacement to addition and multiplication.

func (*FlexLayer) SetIgnoreChildInputA

func (self *FlexLayer) SetIgnoreChildInputA(member bool)

SetIgnoreChildInputA If `ignoreChildInput` is `false` it will allow this objects _children_ to be considered as valid for Input events.

If this property is `true` then the children will _not_ be considered as valid for Input events.

Note that this property isn't recursive: only immediate children are influenced, it doesn't scan further down.

func (*FlexLayer) SetIgnoreDestroyA

func (self *FlexLayer) SetIgnoreDestroyA(member bool)

SetIgnoreDestroyA A group with `ignoreDestroy` set to `true` ignores all calls to its `destroy` method.

func (*FlexLayer) SetInputEnableChildrenA

func (self *FlexLayer) SetInputEnableChildrenA(member bool)

SetInputEnableChildrenA A Group with `inputEnableChildren` set to `true` will automatically call `inputEnabled = true` on any children _added_ to, or _created by_, this Group.

If there are children already in the Group at the time you set this property, they are not changed.

func (*FlexLayer) SetLeftA

func (self *FlexLayer) SetLeftA(member int)

SetLeftA The left coordinate of this Group.

It is derived by calling `getBounds`, calculating the Groups dimensions based on its visible children.

func (*FlexLayer) SetLengthA

func (self *FlexLayer) SetLengthA(member int)

SetLengthA Total number of children in this group, regardless of exists/alive status.

func (*FlexLayer) SetManagerA

func (self *FlexLayer) SetManagerA(member interface{})

SetManagerA A reference to the ScaleManager.

func (*FlexLayer) SetNameA

func (self *FlexLayer) SetNameA(member string)

SetNameA A name for this group. Not used internally but useful for debugging.

func (*FlexLayer) SetOnChildInputDownA

func (self *FlexLayer) SetOnChildInputDownA(member *Signal)

SetOnChildInputDownA This Signal is dispatched whenever a child of this Group emits an onInputDown signal as a result of having been interacted with by a Pointer. You can bind functions to this Signal instead of to every child Sprite.

This Signal is sent 2 arguments: A reference to the Sprite that triggered the signal, and a reference to the Pointer that caused it.

func (*FlexLayer) SetOnChildInputOutA

func (self *FlexLayer) SetOnChildInputOutA(member *Signal)

SetOnChildInputOutA This Signal is dispatched whenever a child of this Group emits an onInputOut signal as a result of having been interacted with by a Pointer. You can bind functions to this Signal instead of to every child Sprite.

This Signal is sent 2 arguments: A reference to the Sprite that triggered the signal, and a reference to the Pointer that caused it.

func (*FlexLayer) SetOnChildInputOverA

func (self *FlexLayer) SetOnChildInputOverA(member *Signal)

SetOnChildInputOverA This Signal is dispatched whenever a child of this Group emits an onInputOver signal as a result of having been interacted with by a Pointer. You can bind functions to this Signal instead of to every child Sprite.

This Signal is sent 2 arguments: A reference to the Sprite that triggered the signal, and a reference to the Pointer that caused it.

func (*FlexLayer) SetOnChildInputUpA

func (self *FlexLayer) SetOnChildInputUpA(member *Signal)

SetOnChildInputUpA This Signal is dispatched whenever a child of this Group emits an onInputUp signal as a result of having been interacted with by a Pointer. You can bind functions to this Signal instead of to every child Sprite.

This Signal is sent 3 arguments: A reference to the Sprite that triggered the signal, a reference to the Pointer that caused it, and a boolean value `isOver` that tells you if the Pointer is still over the Sprite or not.

func (*FlexLayer) SetOnDestroyA

func (self *FlexLayer) SetOnDestroyA(member *Signal)

SetOnDestroyA This signal is dispatched when the group is destroyed.

func (*FlexLayer) SetPendingDestroyA

func (self *FlexLayer) SetPendingDestroyA(member bool)

SetPendingDestroyA A Group is that has `pendingDestroy` set to `true` is flagged to have its destroy method called on the next logic update. You can set it directly to flag the Group to be destroyed on its next update.

This is extremely useful if you wish to destroy a Group from within one of its own callbacks or a callback of one of its children.

func (*FlexLayer) SetPersistA

func (self *FlexLayer) SetPersistA(member bool)

SetPersistA Should the FlexLayer remain through a State swap?

func (*FlexLayer) SetPhysicsBodyTypeA

func (self *FlexLayer) SetPhysicsBodyTypeA(member int)

SetPhysicsBodyTypeA If {@link Phaser.Group#enableBody enableBody} is true this is the type of physics body that is created on new Sprites.

The valid values are {@link Phaser.Physics.ARCADE}, {@link Phaser.Physics.P2JS}, {@link Phaser.Physics.NINJA}, etc.

func (*FlexLayer) SetPhysicsSortDirectionA

func (self *FlexLayer) SetPhysicsSortDirectionA(member int)

SetPhysicsSortDirectionA If this Group contains Arcade Physics Sprites you can set a custom sort direction via this property.

It should be set to one of the Phaser.Physics.Arcade sort direction constants:

Phaser.Physics.Arcade.SORT_NONE Phaser.Physics.Arcade.LEFT_RIGHT Phaser.Physics.Arcade.RIGHT_LEFT Phaser.Physics.Arcade.TOP_BOTTOM Phaser.Physics.Arcade.BOTTOM_TOP

If set to `null` the Group will use whatever Phaser.Physics.Arcade.sortDirection is set to. This is the default behavior.

func (*FlexLayer) SetPhysicsTypeA

func (self *FlexLayer) SetPhysicsTypeA(member int)

SetPhysicsTypeA The const physics body type of this object.

func (*FlexLayer) SetPositionA

func (self *FlexLayer) SetPositionA(member *Point)

SetPositionA empty description

func (*FlexLayer) SetProperty

func (self *FlexLayer) SetProperty(child interface{}, key []interface{}, value interface{}) bool

SetProperty Sets a property to the given value on the child. The operation parameter controls how the value is set.

The operations are: - 0: set the existing value to the given value; if force is `true` a new property will be created if needed - 1: will add the given value to the value already present. - 2: will subtract the given value from the value already present. - 3: will multiply the value already present by the given value. - 4: will divide the value already present by the given value.

func (*FlexLayer) SetProperty1O

func (self *FlexLayer) SetProperty1O(child interface{}, key []interface{}, value interface{}, operation int) bool

SetProperty1O Sets a property to the given value on the child. The operation parameter controls how the value is set.

The operations are: - 0: set the existing value to the given value; if force is `true` a new property will be created if needed - 1: will add the given value to the value already present. - 2: will subtract the given value from the value already present. - 3: will multiply the value already present by the given value. - 4: will divide the value already present by the given value.

func (*FlexLayer) SetProperty2O

func (self *FlexLayer) SetProperty2O(child interface{}, key []interface{}, value interface{}, operation int, force bool) bool

SetProperty2O Sets a property to the given value on the child. The operation parameter controls how the value is set.

The operations are: - 0: set the existing value to the given value; if force is `true` a new property will be created if needed - 1: will add the given value to the value already present. - 2: will subtract the given value from the value already present. - 3: will multiply the value already present by the given value. - 4: will divide the value already present by the given value.

func (*FlexLayer) SetPropertyI

func (self *FlexLayer) SetPropertyI(args ...interface{}) bool

SetPropertyI Sets a property to the given value on the child. The operation parameter controls how the value is set.

The operations are: - 0: set the existing value to the given value; if force is `true` a new property will be created if needed - 1: will add the given value to the value already present. - 2: will subtract the given value from the value already present. - 3: will multiply the value already present by the given value. - 4: will divide the value already present by the given value.

func (*FlexLayer) SetRightA

func (self *FlexLayer) SetRightA(member int)

SetRightA The right coordinate of this Group.

It is derived by calling `getBounds`, calculating the Groups dimensions based on its visible children.

func (*FlexLayer) SetRotationA

func (self *FlexLayer) SetRotationA(member int)

SetRotationA The angle of rotation of the group container, in radians.

This will adjust the group container itself by modifying its rotation. This will have no impact on the rotation value of its children, but it will update their worldTransform and on-screen position.

func (*FlexLayer) SetScaleA

func (self *FlexLayer) SetScaleA(member *Point)

SetScaleA empty description

func (*FlexLayer) SetTopA

func (self *FlexLayer) SetTopA(member int)

SetTopA The top coordinate of this Group.

It is derived by calling `getBounds`, calculating the Groups dimensions based on its visible children.

func (*FlexLayer) SetTopLeftA

func (self *FlexLayer) SetTopLeftA(member *Point)

SetTopLeftA empty description

func (*FlexLayer) SetTopMiddleA

func (self *FlexLayer) SetTopMiddleA(member *Point)

SetTopMiddleA empty description

func (*FlexLayer) SetTopRightA

func (self *FlexLayer) SetTopRightA(member *Point)

SetTopRightA empty description

func (*FlexLayer) SetTotalA

func (self *FlexLayer) SetTotalA(member int)

SetTotalA Total number of existing children in the group.

func (*FlexLayer) SetTypeA

func (self *FlexLayer) SetTypeA(member int)

SetTypeA Internal Phaser Type value.

func (*FlexLayer) SetVisibleA

func (self *FlexLayer) SetVisibleA(member bool)

SetVisibleA The visible state of the group. Non-visible Groups and all of their children are not rendered.

func (*FlexLayer) SetWidthA

func (self *FlexLayer) SetWidthA(member int)

SetWidthA The width of the displayObjectContainer, setting this will actually modify the scale to achieve the value set

func (*FlexLayer) SetXA

func (self *FlexLayer) SetXA(member int)

SetXA The x coordinate of the group container.

You can adjust the group container itself by modifying its coordinates. This will have no impact on the x/y coordinates of its children, but it will update their worldTransform and on-screen position.

func (*FlexLayer) SetYA

func (self *FlexLayer) SetYA(member int)

SetYA The y coordinate of the group container.

You can adjust the group container itself by modifying its coordinates. This will have no impact on the x/y coordinates of its children, but it will update their worldTransform and on-screen position.

func (*FlexLayer) SetZA

func (self *FlexLayer) SetZA(member int)

SetZA The z-depth value of this object within its parent container/Group - the World is a Group as well. This value must be unique for each child in a Group.

func (*FlexLayer) Sort

func (self *FlexLayer) Sort()

Sort Sort the children in the group according to a particular key and ordering.

Call this function to sort the group according to a particular key value and order.

For example to depth sort Sprites for Zelda-style game you might call `group.sort('y', Phaser.Group.SORT_ASCENDING)` at the bottom of your `State.update()`.

Internally this uses a standard JavaScript Array sort, so everything that applies there also applies here, including alphabetical sorting, mixing strings and numbers, and Unicode sorting. See MDN for more details.

func (*FlexLayer) Sort1O

func (self *FlexLayer) Sort1O(key string)

Sort1O Sort the children in the group according to a particular key and ordering.

Call this function to sort the group according to a particular key value and order.

For example to depth sort Sprites for Zelda-style game you might call `group.sort('y', Phaser.Group.SORT_ASCENDING)` at the bottom of your `State.update()`.

Internally this uses a standard JavaScript Array sort, so everything that applies there also applies here, including alphabetical sorting, mixing strings and numbers, and Unicode sorting. See MDN for more details.

func (*FlexLayer) Sort2O

func (self *FlexLayer) Sort2O(key string, order int)

Sort2O Sort the children in the group according to a particular key and ordering.

Call this function to sort the group according to a particular key value and order.

For example to depth sort Sprites for Zelda-style game you might call `group.sort('y', Phaser.Group.SORT_ASCENDING)` at the bottom of your `State.update()`.

Internally this uses a standard JavaScript Array sort, so everything that applies there also applies here, including alphabetical sorting, mixing strings and numbers, and Unicode sorting. See MDN for more details.

func (*FlexLayer) SortI

func (self *FlexLayer) SortI(args ...interface{})

SortI Sort the children in the group according to a particular key and ordering.

Call this function to sort the group according to a particular key value and order.

For example to depth sort Sprites for Zelda-style game you might call `group.sort('y', Phaser.Group.SORT_ASCENDING)` at the bottom of your `State.update()`.

Internally this uses a standard JavaScript Array sort, so everything that applies there also applies here, including alphabetical sorting, mixing strings and numbers, and Unicode sorting. See MDN for more details.

func (*FlexLayer) SubAll

func (self *FlexLayer) SubAll(property string, amount int, checkAlive bool, checkVisible bool)

SubAll Subtracts the amount from the given property on all children in this group.

`Group.subAll('x', 10)` will minus 10 from the child.x value for each child.

func (*FlexLayer) SubAllI

func (self *FlexLayer) SubAllI(args ...interface{})

SubAllI Subtracts the amount from the given property on all children in this group.

`Group.subAll('x', 10)` will minus 10 from the child.x value for each child.

func (*FlexLayer) Swap

func (self *FlexLayer) Swap(child1 interface{}, child2 interface{})

Swap Swaps the position of two children in this group.

Both children must be in this group, a child cannot be swapped with itself, and unparented children cannot be swapped.

func (*FlexLayer) SwapChildren

func (self *FlexLayer) SwapChildren(child *DisplayObject, child2 *DisplayObject)

SwapChildren Swaps the position of 2 Display Objects within this container.

func (*FlexLayer) SwapChildrenI

func (self *FlexLayer) SwapChildrenI(args ...interface{})

SwapChildrenI Swaps the position of 2 Display Objects within this container.

func (*FlexLayer) SwapI

func (self *FlexLayer) SwapI(args ...interface{})

SwapI Swaps the position of two children in this group.

Both children must be in this group, a child cannot be swapped with itself, and unparented children cannot be swapped.

func (*FlexLayer) Top

func (self *FlexLayer) Top() int

Top The top coordinate of this Group.

It is derived by calling `getBounds`, calculating the Groups dimensions based on its visible children.

func (*FlexLayer) TopLeft

func (self *FlexLayer) TopLeft() *Point

TopLeft empty description

func (*FlexLayer) TopMiddle

func (self *FlexLayer) TopMiddle() *Point

TopMiddle empty description

func (*FlexLayer) TopRight

func (self *FlexLayer) TopRight() *Point

TopRight empty description

func (*FlexLayer) Total

func (self *FlexLayer) Total() int

Total Total number of existing children in the group.

func (*FlexLayer) Type

func (self *FlexLayer) Type() int

Type Internal Phaser Type value.

func (*FlexLayer) Update

func (self *FlexLayer) Update()

Update The core update - as called by World.

func (*FlexLayer) UpdateI

func (self *FlexLayer) UpdateI(args ...interface{})

UpdateI The core update - as called by World.

func (*FlexLayer) UpdateZ

func (self *FlexLayer) UpdateZ()

UpdateZ Internal method that re-applies all of the children's Z values.

This must be called whenever children ordering is altered so that their `z` indices are correctly updated.

func (*FlexLayer) UpdateZI

func (self *FlexLayer) UpdateZI(args ...interface{})

UpdateZI Internal method that re-applies all of the children's Z values.

This must be called whenever children ordering is altered so that their `z` indices are correctly updated.

func (*FlexLayer) Visible

func (self *FlexLayer) Visible() bool

Visible The visible state of the group. Non-visible Groups and all of their children are not rendered.

func (*FlexLayer) Width

func (self *FlexLayer) Width() int

Width The width of the displayObjectContainer, setting this will actually modify the scale to achieve the value set

func (*FlexLayer) X

func (self *FlexLayer) X() int

X The x coordinate of the group container.

You can adjust the group container itself by modifying its coordinates. This will have no impact on the x/y coordinates of its children, but it will update their worldTransform and on-screen position.

func (*FlexLayer) Xy

func (self *FlexLayer) Xy(index int, x int, y int)

Xy Positions the child found at the given index within this group to the given x and y coordinates.

func (*FlexLayer) XyI

func (self *FlexLayer) XyI(args ...interface{})

XyI Positions the child found at the given index within this group to the given x and y coordinates.

func (*FlexLayer) Y

func (self *FlexLayer) Y() int

Y The y coordinate of the group container.

You can adjust the group container itself by modifying its coordinates. This will have no impact on the x/y coordinates of its children, but it will update their worldTransform and on-screen position.

func (*FlexLayer) Z

func (self *FlexLayer) Z() int

Z The z-depth value of this object within its parent container/Group - the World is a Group as well. This value must be unique for each child in a Group.

type Float32Array

type Float32Array struct{ *js.Object }

type Frame

type Frame struct {
	*js.Object
}

Frame A Frame is a single frame of an animation and is part of a FrameData collection.

func NewFrame

func NewFrame(index int, x int, y int, width int, height int, name string) *Frame

NewFrame A Frame is a single frame of an animation and is part of a FrameData collection.

func NewFrameI

func NewFrameI(args ...interface{}) *Frame

NewFrameI A Frame is a single frame of an animation and is part of a FrameData collection.

func ToFrame

func ToFrame(jsStruct interface{}) *Frame

Frame Binding conversion method to Frame point

func (*Frame) Bottom

func (self *Frame) Bottom() int

Bottom The bottom of the frame (y + height).

func (*Frame) CenterX

func (self *Frame) CenterX() int

CenterX Center X position within the image to cut from.

func (*Frame) CenterY

func (self *Frame) CenterY() int

CenterY Center Y position within the image to cut from.

func (*Frame) Clone

func (self *Frame) Clone() *Frame

Clone Clones this Frame into a new Phaser.Frame object and returns it. Note that all properties are cloned, including the name, index and UUID.

func (*Frame) CloneI

func (self *Frame) CloneI(args ...interface{}) *Frame

CloneI Clones this Frame into a new Phaser.Frame object and returns it. Note that all properties are cloned, including the name, index and UUID.

func (*Frame) Distance

func (self *Frame) Distance() int

Distance The distance from the top left to the bottom-right of this Frame.

func (*Frame) GetRect

func (self *Frame) GetRect() *Rectangle

GetRect Returns a Rectangle set to the dimensions of this Frame.

func (*Frame) GetRect1O

func (self *Frame) GetRect1O(out *Rectangle) *Rectangle

GetRect1O Returns a Rectangle set to the dimensions of this Frame.

func (*Frame) GetRectI

func (self *Frame) GetRectI(args ...interface{}) *Rectangle

GetRectI Returns a Rectangle set to the dimensions of this Frame.

func (*Frame) Height

func (self *Frame) Height() int

Height Height of the frame.

func (*Frame) Index

func (self *Frame) Index() int

Index The index of this Frame within the FrameData set it is being added to.

func (*Frame) Name

func (self *Frame) Name() string

Name Useful for Texture Atlas files (is set to the filename value).

func (*Frame) Resize

func (self *Frame) Resize(width int, height int)

Resize Adjusts of all the Frame properties based on the given width and height values.

func (*Frame) ResizeI

func (self *Frame) ResizeI(args ...interface{})

ResizeI Adjusts of all the Frame properties based on the given width and height values.

func (*Frame) Right

func (self *Frame) Right() int

Right The right of the Frame (x + width).

func (*Frame) Rotated

func (self *Frame) Rotated() bool

Rotated Rotated? (not yet implemented)

func (*Frame) RotationDirection

func (self *Frame) RotationDirection() string

RotationDirection Either 'cw' or 'ccw', rotation is always 90 degrees.

func (*Frame) SetBottomA

func (self *Frame) SetBottomA(member int)

SetBottomA The bottom of the frame (y + height).

func (*Frame) SetCenterXA

func (self *Frame) SetCenterXA(member int)

SetCenterXA Center X position within the image to cut from.

func (*Frame) SetCenterYA

func (self *Frame) SetCenterYA(member int)

SetCenterYA Center Y position within the image to cut from.

func (*Frame) SetDistanceA

func (self *Frame) SetDistanceA(member int)

SetDistanceA The distance from the top left to the bottom-right of this Frame.

func (*Frame) SetHeightA

func (self *Frame) SetHeightA(member int)

SetHeightA Height of the frame.

func (*Frame) SetIndexA

func (self *Frame) SetIndexA(member int)

SetIndexA The index of this Frame within the FrameData set it is being added to.

func (*Frame) SetNameA

func (self *Frame) SetNameA(member string)

SetNameA Useful for Texture Atlas files (is set to the filename value).

func (*Frame) SetRightA

func (self *Frame) SetRightA(member int)

SetRightA The right of the Frame (x + width).

func (*Frame) SetRotatedA

func (self *Frame) SetRotatedA(member bool)

SetRotatedA Rotated? (not yet implemented)

func (*Frame) SetRotationDirectionA

func (self *Frame) SetRotationDirectionA(member string)

SetRotationDirectionA Either 'cw' or 'ccw', rotation is always 90 degrees.

func (*Frame) SetSourceSizeHA

func (self *Frame) SetSourceSizeHA(member int)

SetSourceSizeHA Height of the original sprite before it was trimmed.

func (*Frame) SetSourceSizeWA

func (self *Frame) SetSourceSizeWA(member int)

SetSourceSizeWA Width of the original sprite before it was trimmed.

func (*Frame) SetSpriteSourceSizeHA

func (self *Frame) SetSpriteSourceSizeHA(member int)

SetSpriteSourceSizeHA Height of the trimmed sprite.

func (*Frame) SetSpriteSourceSizeWA

func (self *Frame) SetSpriteSourceSizeWA(member int)

SetSpriteSourceSizeWA Width of the trimmed sprite.

func (*Frame) SetSpriteSourceSizeXA

func (self *Frame) SetSpriteSourceSizeXA(member int)

SetSpriteSourceSizeXA X position of the trimmed sprite inside original sprite.

func (*Frame) SetSpriteSourceSizeYA

func (self *Frame) SetSpriteSourceSizeYA(member int)

SetSpriteSourceSizeYA Y position of the trimmed sprite inside original sprite.

func (*Frame) SetTrim

func (self *Frame) SetTrim(trimmed bool, actualWidth int, actualHeight int, destX int, destY int, destWidth int, destHeight int)

SetTrim If the frame was trimmed when added to the Texture Atlas this records the trim and source data.

func (*Frame) SetTrimI

func (self *Frame) SetTrimI(args ...interface{})

SetTrimI If the frame was trimmed when added to the Texture Atlas this records the trim and source data.

func (*Frame) SetTrimmedA

func (self *Frame) SetTrimmedA(member bool)

SetTrimmedA Was it trimmed when packed?

func (*Frame) SetWidthA

func (self *Frame) SetWidthA(member int)

SetWidthA Width of the frame.

func (*Frame) SetXA

func (self *Frame) SetXA(member int)

SetXA X position within the image to cut from.

func (*Frame) SetYA

func (self *Frame) SetYA(member int)

SetYA Y position within the image to cut from.

func (*Frame) SourceSizeH

func (self *Frame) SourceSizeH() int

SourceSizeH Height of the original sprite before it was trimmed.

func (*Frame) SourceSizeW

func (self *Frame) SourceSizeW() int

SourceSizeW Width of the original sprite before it was trimmed.

func (*Frame) SpriteSourceSizeH

func (self *Frame) SpriteSourceSizeH() int

SpriteSourceSizeH Height of the trimmed sprite.

func (*Frame) SpriteSourceSizeW

func (self *Frame) SpriteSourceSizeW() int

SpriteSourceSizeW Width of the trimmed sprite.

func (*Frame) SpriteSourceSizeX

func (self *Frame) SpriteSourceSizeX() int

SpriteSourceSizeX X position of the trimmed sprite inside original sprite.

func (*Frame) SpriteSourceSizeY

func (self *Frame) SpriteSourceSizeY() int

SpriteSourceSizeY Y position of the trimmed sprite inside original sprite.

func (*Frame) Trimmed

func (self *Frame) Trimmed() bool

Trimmed Was it trimmed when packed?

func (*Frame) Width

func (self *Frame) Width() int

Width Width of the frame.

func (*Frame) X

func (self *Frame) X() int

X X position within the image to cut from.

func (*Frame) Y

func (self *Frame) Y() int

Y Y position within the image to cut from.

type FrameData

type FrameData struct {
	*js.Object
}

FrameData FrameData is a container for Frame objects, which are the internal representation of animation data in Phaser.

func NewFrameData

func NewFrameData() *FrameData

NewFrameData FrameData is a container for Frame objects, which are the internal representation of animation data in Phaser.

func NewFrameDataI

func NewFrameDataI(args ...interface{}) *FrameData

NewFrameDataI FrameData is a container for Frame objects, which are the internal representation of animation data in Phaser.

func ToFrameData

func ToFrameData(jsStruct interface{}) *FrameData

FrameData Binding conversion method to FrameData point

func (*FrameData) AddFrame

func (self *FrameData) AddFrame(frame *Frame) *Frame

AddFrame Adds a new Frame to this FrameData collection. Typically called by the Animation.Parser and not directly.

func (*FrameData) AddFrameI

func (self *FrameData) AddFrameI(args ...interface{}) *Frame

AddFrameI Adds a new Frame to this FrameData collection. Typically called by the Animation.Parser and not directly.

func (*FrameData) CheckFrameName

func (self *FrameData) CheckFrameName(name string) bool

CheckFrameName Check if there is a Frame with the given name.

func (*FrameData) CheckFrameNameI

func (self *FrameData) CheckFrameNameI(args ...interface{}) bool

CheckFrameNameI Check if there is a Frame with the given name.

func (*FrameData) Clone

func (self *FrameData) Clone() *FrameData

Clone Makes a copy of this FrameData including copies (not references) to all of the Frames it contains.

func (*FrameData) CloneI

func (self *FrameData) CloneI(args ...interface{}) *FrameData

CloneI Makes a copy of this FrameData including copies (not references) to all of the Frames it contains.

func (*FrameData) Destroy

func (self *FrameData) Destroy()

Destroy Destroys this FrameData collection by nulling the _frames and _frameNames arrays.

func (*FrameData) DestroyI

func (self *FrameData) DestroyI(args ...interface{})

DestroyI Destroys this FrameData collection by nulling the _frames and _frameNames arrays.

func (*FrameData) GetFrame

func (self *FrameData) GetFrame(index int) *Frame

GetFrame Get a Frame by its numerical index.

func (*FrameData) GetFrameByName

func (self *FrameData) GetFrameByName(name string) *Frame

GetFrameByName Get a Frame by its frame name.

func (*FrameData) GetFrameByNameI

func (self *FrameData) GetFrameByNameI(args ...interface{}) *Frame

GetFrameByNameI Get a Frame by its frame name.

func (*FrameData) GetFrameI

func (self *FrameData) GetFrameI(args ...interface{}) *Frame

GetFrameI Get a Frame by its numerical index.

func (*FrameData) GetFrameIndexes

func (self *FrameData) GetFrameIndexes() []interface{}

GetFrameIndexes Returns all of the Frame indexes in this FrameData set. The frames indexes are returned in the output array, or if none is provided in a new Array object.

func (*FrameData) GetFrameIndexes1O

func (self *FrameData) GetFrameIndexes1O(frames []interface{}) []interface{}

GetFrameIndexes1O Returns all of the Frame indexes in this FrameData set. The frames indexes are returned in the output array, or if none is provided in a new Array object.

func (*FrameData) GetFrameIndexes2O

func (self *FrameData) GetFrameIndexes2O(frames []interface{}, useNumericIndex bool) []interface{}

GetFrameIndexes2O Returns all of the Frame indexes in this FrameData set. The frames indexes are returned in the output array, or if none is provided in a new Array object.

func (*FrameData) GetFrameIndexes3O

func (self *FrameData) GetFrameIndexes3O(frames []interface{}, useNumericIndex bool, output []interface{}) []interface{}

GetFrameIndexes3O Returns all of the Frame indexes in this FrameData set. The frames indexes are returned in the output array, or if none is provided in a new Array object.

func (*FrameData) GetFrameIndexesI

func (self *FrameData) GetFrameIndexesI(args ...interface{}) []interface{}

GetFrameIndexesI Returns all of the Frame indexes in this FrameData set. The frames indexes are returned in the output array, or if none is provided in a new Array object.

func (*FrameData) GetFrameRange

func (self *FrameData) GetFrameRange(start int, end int) []interface{}

GetFrameRange Returns a range of frames based on the given start and end frame indexes and returns them in an Array.

func (*FrameData) GetFrameRange1O

func (self *FrameData) GetFrameRange1O(start int, end int, output []interface{}) []interface{}

GetFrameRange1O Returns a range of frames based on the given start and end frame indexes and returns them in an Array.

func (*FrameData) GetFrameRangeI

func (self *FrameData) GetFrameRangeI(args ...interface{}) []interface{}

GetFrameRangeI Returns a range of frames based on the given start and end frame indexes and returns them in an Array.

func (*FrameData) GetFrames

func (self *FrameData) GetFrames() []interface{}

GetFrames Returns all of the Frames in this FrameData set where the frame index is found in the input array. The frames are returned in the output array, or if none is provided in a new Array object.

func (*FrameData) GetFrames1O

func (self *FrameData) GetFrames1O(frames []interface{}) []interface{}

GetFrames1O Returns all of the Frames in this FrameData set where the frame index is found in the input array. The frames are returned in the output array, or if none is provided in a new Array object.

func (*FrameData) GetFrames2O

func (self *FrameData) GetFrames2O(frames []interface{}, useNumericIndex bool) []interface{}

GetFrames2O Returns all of the Frames in this FrameData set where the frame index is found in the input array. The frames are returned in the output array, or if none is provided in a new Array object.

func (*FrameData) GetFrames3O

func (self *FrameData) GetFrames3O(frames []interface{}, useNumericIndex bool, output []interface{}) []interface{}

GetFrames3O Returns all of the Frames in this FrameData set where the frame index is found in the input array. The frames are returned in the output array, or if none is provided in a new Array object.

func (*FrameData) GetFramesI

func (self *FrameData) GetFramesI(args ...interface{}) []interface{}

GetFramesI Returns all of the Frames in this FrameData set where the frame index is found in the input array. The frames are returned in the output array, or if none is provided in a new Array object.

func (*FrameData) SetTotalA

func (self *FrameData) SetTotalA(member int)

SetTotalA The total number of frames in this FrameData set.

func (*FrameData) Total

func (self *FrameData) Total() int

Total The total number of frames in this FrameData set.

type Game

type Game struct {
	*js.Object
}

Game This is where the magic happens. The Game object is the heart of your game, providing quick access to common functions and handling the boot process.

"Hell, there are no rules here - we're trying to accomplish something."

Thomas A. Edison

func NewGame

func NewGame() *Game

NewGame This is where the magic happens. The Game object is the heart of your game, providing quick access to common functions and handling the boot process.

"Hell, there are no rules here - we're trying to accomplish something."

Thomas A. Edison

func NewGame1O

func NewGame1O(width interface{}) *Game

NewGame1O This is where the magic happens. The Game object is the heart of your game, providing quick access to common functions and handling the boot process.

"Hell, there are no rules here - we're trying to accomplish something."

Thomas A. Edison

func NewGame2O

func NewGame2O(width interface{}, height interface{}) *Game

NewGame2O This is where the magic happens. The Game object is the heart of your game, providing quick access to common functions and handling the boot process.

"Hell, there are no rules here - we're trying to accomplish something."

Thomas A. Edison

func NewGame3O

func NewGame3O(width interface{}, height interface{}, renderer int) *Game

NewGame3O This is where the magic happens. The Game object is the heart of your game, providing quick access to common functions and handling the boot process.

"Hell, there are no rules here - we're trying to accomplish something."

Thomas A. Edison

func NewGame4O

func NewGame4O(width interface{}, height interface{}, renderer int, parent interface{}) *Game

NewGame4O This is where the magic happens. The Game object is the heart of your game, providing quick access to common functions and handling the boot process.

"Hell, there are no rules here - we're trying to accomplish something."

Thomas A. Edison

func NewGame5O

func NewGame5O(width interface{}, height interface{}, renderer int, parent interface{}, state interface{}) *Game

NewGame5O This is where the magic happens. The Game object is the heart of your game, providing quick access to common functions and handling the boot process.

"Hell, there are no rules here - we're trying to accomplish something."

Thomas A. Edison

func NewGame6O

func NewGame6O(width interface{}, height interface{}, renderer int, parent interface{}, state interface{}, transparent bool) *Game

NewGame6O This is where the magic happens. The Game object is the heart of your game, providing quick access to common functions and handling the boot process.

"Hell, there are no rules here - we're trying to accomplish something."

Thomas A. Edison

func NewGame7O

func NewGame7O(width interface{}, height interface{}, renderer int, parent interface{}, state interface{}, transparent bool, antialias bool) *Game

NewGame7O This is where the magic happens. The Game object is the heart of your game, providing quick access to common functions and handling the boot process.

"Hell, there are no rules here - we're trying to accomplish something."

Thomas A. Edison

func NewGame8O

func NewGame8O(width interface{}, height interface{}, renderer int, parent interface{}, state interface{}, transparent bool, antialias bool, physicsConfig interface{}) *Game

NewGame8O This is where the magic happens. The Game object is the heart of your game, providing quick access to common functions and handling the boot process.

"Hell, there are no rules here - we're trying to accomplish something."

Thomas A. Edison

func NewGameI

func NewGameI(args ...interface{}) *Game

NewGameI This is where the magic happens. The Game object is the heart of your game, providing quick access to common functions and handling the boot process.

"Hell, there are no rules here - we're trying to accomplish something."

Thomas A. Edison

func ToGame

func ToGame(jsStruct interface{}) *Game

Game Binding conversion method to Game point

func (*Game) Add

func (self *Game) Add() *GameObjectFactory

Add Reference to the Phaser.GameObjectFactory.

func (*Game) Antialias

func (self *Game) Antialias() bool

Antialias Anti-alias graphics. By default scaled images are smoothed in Canvas and WebGL, set anti-alias to false to disable this globally.

func (*Game) Boot

func (self *Game) Boot()

Boot Initialize engine sub modules and start the game.

func (*Game) BootI

func (self *Game) BootI(args ...interface{})

BootI Initialize engine sub modules and start the game.

func (*Game) Cache

func (self *Game) Cache() *Cache

Cache Reference to the assets cache.

func (*Game) Camera

func (self *Game) Camera() *Camera

Camera A handy reference to world.camera.

func (*Game) Canvas

func (self *Game) Canvas() dom.HTMLCanvasElement

Canvas A handy reference to renderer.view, the canvas that the game is being rendered in to.

func (*Game) ClearBeforeRender

func (self *Game) ClearBeforeRender() bool

ClearBeforeRender Clear the Canvas each frame before rendering the display list. You can set this to `false` to gain some performance if your game always contains a background that completely fills the display.

func (*Game) Config

func (self *Game) Config() interface{}

Config The Phaser.Game configuration object.

func (*Game) Context

func (self *Game) Context() dom.CanvasRenderingContext2D

Context A handy reference to renderer.context (only set for CANVAS games, not WebGL)

func (*Game) ContextLost

func (self *Game) ContextLost(event *Event)

ContextLost Handles WebGL context loss.

func (*Game) ContextLostI

func (self *Game) ContextLostI(args ...interface{})

ContextLostI Handles WebGL context loss.

func (*Game) ContextRestored

func (self *Game) ContextRestored()

ContextRestored Handles WebGL context restoration.

func (*Game) ContextRestoredI

func (self *Game) ContextRestoredI(args ...interface{})

ContextRestoredI Handles WebGL context restoration.

func (*Game) Create

func (self *Game) Create() *Create

Create The Asset Generator.

func (*Game) CurrentUpdateID

func (self *Game) CurrentUpdateID() int

CurrentUpdateID The ID of the current/last logic update applied this render frame, starting from 0. The first update is `currentUpdateID === 0` and the last update is `currentUpdateID === updatesThisFrame.`

func (*Game) Debug

func (self *Game) Debug() *UtilsDebug

Debug A set of useful debug utilities.

func (*Game) Destroy

func (self *Game) Destroy()

Destroy Nukes the entire game from orbit.

Calls destroy on Game.state, Game.sound, Game.scale, Game.stage, Game.input, Game.physics and Game.plugins.

Then sets all of those local handlers to null, destroys the renderer, removes the canvas from the DOM and resets the PIXI default renderer.

func (*Game) DestroyI

func (self *Game) DestroyI(args ...interface{})

DestroyI Nukes the entire game from orbit.

Calls destroy on Game.state, Game.sound, Game.scale, Game.stage, Game.input, Game.physics and Game.plugins.

Then sets all of those local handlers to null, destroys the renderer, removes the canvas from the DOM and resets the PIXI default renderer.

func (*Game) Device

func (self *Game) Device() *Device

Device Contains device information and capabilities.

func (*Game) DisableStep

func (self *Game) DisableStep()

DisableStep Disables core game loop stepping.

func (*Game) DisableStepI

func (self *Game) DisableStepI(args ...interface{})

DisableStepI Disables core game loop stepping.

func (*Game) EnableStep

func (self *Game) EnableStep()

EnableStep Enable core game loop stepping. When enabled you must call game.step() directly (perhaps via a DOM button?) Calling step will advance the game loop by one frame. This is extremely useful for hard to track down errors!

func (*Game) EnableStepI

func (self *Game) EnableStepI(args ...interface{})

EnableStepI Enable core game loop stepping. When enabled you must call game.step() directly (perhaps via a DOM button?) Calling step will advance the game loop by one frame. This is extremely useful for hard to track down errors!

func (*Game) FocusGain

func (self *Game) FocusGain(event interface{})

FocusGain Called by the Stage visibility handler.

func (*Game) FocusGainI

func (self *Game) FocusGainI(args ...interface{})

FocusGainI Called by the Stage visibility handler.

func (*Game) FocusLoss

func (self *Game) FocusLoss(event interface{})

FocusLoss Called by the Stage visibility handler.

func (*Game) FocusLossI

func (self *Game) FocusLossI(args ...interface{})

FocusLossI Called by the Stage visibility handler.

func (*Game) ForceSingleUpdate

func (self *Game) ForceSingleUpdate() bool

ForceSingleUpdate Should the game loop force a logic update, regardless of the delta timer? Set to true if you know you need this. You can toggle it on the fly.

func (*Game) FpsProblemNotifier

func (self *Game) FpsProblemNotifier() *Signal

FpsProblemNotifier If the game is struggling to maintain the desired FPS, this signal will be dispatched. The desired/chosen FPS should probably be closer to the {@link Phaser.Time#suggestedFps} value.

func (*Game) GamePaused

func (self *Game) GamePaused(event interface{})

GamePaused Called by the Stage visibility handler.

func (*Game) GamePausedI

func (self *Game) GamePausedI(args ...interface{})

GamePausedI Called by the Stage visibility handler.

func (*Game) GameResumed

func (self *Game) GameResumed(event interface{})

GameResumed Called by the Stage visibility handler.

func (*Game) GameResumedI

func (self *Game) GameResumedI(args ...interface{})

GameResumedI Called by the Stage visibility handler.

func (*Game) Height

func (self *Game) Height() int

Height The current Game Height in pixels.

_Do not modify this property directly:_ use {@link Phaser.ScaleManager#setGameSize} - eg. `game.scale.setGameSize(width, height)` - instead.

func (*Game) Id

func (self *Game) Id() int

Id Phaser Game ID (for when Pixi supports multiple instances).

func (*Game) Input

func (self *Game) Input() *Input

Input Reference to the input manager

func (*Game) IsBooted

func (self *Game) IsBooted() bool

IsBooted Whether the game engine is booted, aka available.

func (*Game) IsRunning

func (self *Game) IsRunning() bool

IsRunning Is game running or paused?

func (*Game) Load

func (self *Game) Load() *Loader

Load Reference to the assets loader.

func (*Game) LockRender

func (self *Game) LockRender() bool

LockRender If `false` Phaser will automatically render the display list every update. If `true` the render loop will be skipped. You can toggle this value at run-time to gain exact control over when Phaser renders. This can be useful in certain types of game or application. Please note that if you don't render the display list then none of the game object transforms will be updated, so use this value carefully.

func (*Game) Make

func (self *Game) Make() *GameObjectCreator

Make Reference to the GameObject Creator.

func (*Game) Math

func (self *Game) Math() *Math

Math Reference to the math helper.

func (*Game) Net

func (self *Game) Net() *Net

Net Reference to the network class.

func (*Game) OnBlur

func (self *Game) OnBlur() *Signal

OnBlur This event is fired when the game no longer has focus (typically on page hide).

func (*Game) OnFocus

func (self *Game) OnFocus() *Signal

OnFocus This event is fired when the game has focus (typically on page show).

func (*Game) OnPause

func (self *Game) OnPause() *Signal

OnPause This event is fired when the game pauses.

func (*Game) OnResume

func (self *Game) OnResume() *Signal

OnResume This event is fired when the game resumes from a paused state.

func (*Game) Parent

func (self *Game) Parent() interface{}

Parent The Games DOM parent.

func (*Game) ParseConfig

func (self *Game) ParseConfig()

ParseConfig Parses a Game configuration object.

func (*Game) ParseConfigI

func (self *Game) ParseConfigI(args ...interface{})

ParseConfigI Parses a Game configuration object.

func (*Game) Particles

func (self *Game) Particles() *Particles

Particles The Particle Manager.

func (*Game) Paused

func (self *Game) Paused() bool

Paused The paused state of the Game. A paused game doesn't update any of its subsystems. When a game is paused the onPause event is dispatched. When it is resumed the onResume event is dispatched. Gets and sets the paused state of the Game.

func (*Game) PendingStep

func (self *Game) PendingStep() bool

PendingStep An internal property used by enableStep, but also useful to query from your own game objects.

func (*Game) Physics

func (self *Game) Physics() *Physics

Physics Reference to the physics manager.

func (*Game) PhysicsConfig

func (self *Game) PhysicsConfig() interface{}

PhysicsConfig The Phaser.Physics.World configuration object.

func (*Game) Plugins

func (self *Game) Plugins() *PluginManager

Plugins Reference to the plugin manager.

func (*Game) PreserveDrawingBuffer

func (self *Game) PreserveDrawingBuffer() bool

PreserveDrawingBuffer The value of the preserveDrawingBuffer flag affects whether or not the contents of the stencil buffer is retained after rendering.

func (*Game) Raf

func (self *Game) Raf() *RequestAnimationFrame

Raf Automatically handles the core game loop via requestAnimationFrame or setTimeout

func (*Game) RenderType

func (self *Game) RenderType() int

RenderType The Renderer this game will use. Either Phaser.AUTO, Phaser.CANVAS, Phaser.WEBGL, or Phaser.HEADLESS.

func (*Game) Renderer

func (self *Game) Renderer() interface{}

Renderer The Pixi Renderer.

func (*Game) Resolution

func (self *Game) Resolution() int

Resolution The resolution of your game. This value is read only, but can be changed at start time it via a game configuration object.

func (*Game) Rnd

func (self *Game) Rnd() *RandomDataGenerator

Rnd Instance of repeatable random data generator helper.

func (*Game) Scale

func (self *Game) Scale() *ScaleManager

Scale The game scale manager.

func (*Game) SetAddA

func (self *Game) SetAddA(member *GameObjectFactory)

SetAddA Reference to the Phaser.GameObjectFactory.

func (*Game) SetAntialiasA

func (self *Game) SetAntialiasA(member bool)

SetAntialiasA Anti-alias graphics. By default scaled images are smoothed in Canvas and WebGL, set anti-alias to false to disable this globally.

func (*Game) SetCacheA

func (self *Game) SetCacheA(member *Cache)

SetCacheA Reference to the assets cache.

func (*Game) SetCameraA

func (self *Game) SetCameraA(member *Camera)

SetCameraA A handy reference to world.camera.

func (*Game) SetCanvasA

func (self *Game) SetCanvasA(member dom.HTMLCanvasElement)

SetCanvasA A handy reference to renderer.view, the canvas that the game is being rendered in to.

func (*Game) SetClearBeforeRenderA

func (self *Game) SetClearBeforeRenderA(member bool)

SetClearBeforeRenderA Clear the Canvas each frame before rendering the display list. You can set this to `false` to gain some performance if your game always contains a background that completely fills the display.

func (*Game) SetConfigA

func (self *Game) SetConfigA(member interface{})

SetConfigA The Phaser.Game configuration object.

func (*Game) SetContextA

func (self *Game) SetContextA(member dom.CanvasRenderingContext2D)

SetContextA A handy reference to renderer.context (only set for CANVAS games, not WebGL)

func (*Game) SetCreateA

func (self *Game) SetCreateA(member *Create)

SetCreateA The Asset Generator.

func (*Game) SetCurrentUpdateIDA

func (self *Game) SetCurrentUpdateIDA(member int)

SetCurrentUpdateIDA The ID of the current/last logic update applied this render frame, starting from 0. The first update is `currentUpdateID === 0` and the last update is `currentUpdateID === updatesThisFrame.`

func (*Game) SetDebugA

func (self *Game) SetDebugA(member *UtilsDebug)

SetDebugA A set of useful debug utilities.

func (*Game) SetDeviceA

func (self *Game) SetDeviceA(member *Device)

SetDeviceA Contains device information and capabilities.

func (*Game) SetForceSingleUpdateA

func (self *Game) SetForceSingleUpdateA(member bool)

SetForceSingleUpdateA Should the game loop force a logic update, regardless of the delta timer? Set to true if you know you need this. You can toggle it on the fly.

func (*Game) SetFpsProblemNotifierA

func (self *Game) SetFpsProblemNotifierA(member *Signal)

SetFpsProblemNotifierA If the game is struggling to maintain the desired FPS, this signal will be dispatched. The desired/chosen FPS should probably be closer to the {@link Phaser.Time#suggestedFps} value.

func (*Game) SetHeightA

func (self *Game) SetHeightA(member int)

SetHeightA The current Game Height in pixels.

_Do not modify this property directly:_ use {@link Phaser.ScaleManager#setGameSize} - eg. `game.scale.setGameSize(width, height)` - instead.

func (*Game) SetIdA

func (self *Game) SetIdA(member int)

SetIdA Phaser Game ID (for when Pixi supports multiple instances).

func (*Game) SetInputA

func (self *Game) SetInputA(member *Input)

SetInputA Reference to the input manager

func (*Game) SetIsBootedA

func (self *Game) SetIsBootedA(member bool)

SetIsBootedA Whether the game engine is booted, aka available.

func (*Game) SetIsRunningA

func (self *Game) SetIsRunningA(member bool)

SetIsRunningA Is game running or paused?

func (*Game) SetLoadA

func (self *Game) SetLoadA(member *Loader)

SetLoadA Reference to the assets loader.

func (*Game) SetLockRenderA

func (self *Game) SetLockRenderA(member bool)

SetLockRenderA If `false` Phaser will automatically render the display list every update. If `true` the render loop will be skipped. You can toggle this value at run-time to gain exact control over when Phaser renders. This can be useful in certain types of game or application. Please note that if you don't render the display list then none of the game object transforms will be updated, so use this value carefully.

func (*Game) SetMakeA

func (self *Game) SetMakeA(member *GameObjectCreator)

SetMakeA Reference to the GameObject Creator.

func (*Game) SetMathA

func (self *Game) SetMathA(member *Math)

SetMathA Reference to the math helper.

func (*Game) SetNetA

func (self *Game) SetNetA(member *Net)

SetNetA Reference to the network class.

func (*Game) SetOnBlurA

func (self *Game) SetOnBlurA(member *Signal)

SetOnBlurA This event is fired when the game no longer has focus (typically on page hide).

func (*Game) SetOnFocusA

func (self *Game) SetOnFocusA(member *Signal)

SetOnFocusA This event is fired when the game has focus (typically on page show).

func (*Game) SetOnPauseA

func (self *Game) SetOnPauseA(member *Signal)

SetOnPauseA This event is fired when the game pauses.

func (*Game) SetOnResumeA

func (self *Game) SetOnResumeA(member *Signal)

SetOnResumeA This event is fired when the game resumes from a paused state.

func (*Game) SetParentA

func (self *Game) SetParentA(member interface{})

SetParentA The Games DOM parent.

func (*Game) SetParticlesA

func (self *Game) SetParticlesA(member *Particles)

SetParticlesA The Particle Manager.

func (*Game) SetPausedA

func (self *Game) SetPausedA(member bool)

SetPausedA The paused state of the Game. A paused game doesn't update any of its subsystems. When a game is paused the onPause event is dispatched. When it is resumed the onResume event is dispatched. Gets and sets the paused state of the Game.

func (*Game) SetPendingStepA

func (self *Game) SetPendingStepA(member bool)

SetPendingStepA An internal property used by enableStep, but also useful to query from your own game objects.

func (*Game) SetPhysicsA

func (self *Game) SetPhysicsA(member *Physics)

SetPhysicsA Reference to the physics manager.

func (*Game) SetPhysicsConfigA

func (self *Game) SetPhysicsConfigA(member interface{})

SetPhysicsConfigA The Phaser.Physics.World configuration object.

func (*Game) SetPluginsA

func (self *Game) SetPluginsA(member *PluginManager)

SetPluginsA Reference to the plugin manager.

func (*Game) SetPreserveDrawingBufferA

func (self *Game) SetPreserveDrawingBufferA(member bool)

SetPreserveDrawingBufferA The value of the preserveDrawingBuffer flag affects whether or not the contents of the stencil buffer is retained after rendering.

func (*Game) SetRafA

func (self *Game) SetRafA(member *RequestAnimationFrame)

SetRafA Automatically handles the core game loop via requestAnimationFrame or setTimeout

func (*Game) SetRenderTypeA

func (self *Game) SetRenderTypeA(member int)

SetRenderTypeA The Renderer this game will use. Either Phaser.AUTO, Phaser.CANVAS, Phaser.WEBGL, or Phaser.HEADLESS.

func (*Game) SetRendererA

func (self *Game) SetRendererA(member interface{})

SetRendererA The Pixi Renderer.

func (*Game) SetResolutionA

func (self *Game) SetResolutionA(member int)

SetResolutionA The resolution of your game. This value is read only, but can be changed at start time it via a game configuration object.

func (*Game) SetRndA

func (self *Game) SetRndA(member *RandomDataGenerator)

SetRndA Instance of repeatable random data generator helper.

func (*Game) SetScaleA

func (self *Game) SetScaleA(member *ScaleManager)

SetScaleA The game scale manager.

func (*Game) SetSoundA

func (self *Game) SetSoundA(member *SoundManager)

SetSoundA Reference to the sound manager.

func (*Game) SetStageA

func (self *Game) SetStageA(member *Stage)

SetStageA Reference to the stage.

func (*Game) SetStateA

func (self *Game) SetStateA(member *StateManager)

SetStateA The StateManager.

func (*Game) SetStepCountA

func (self *Game) SetStepCountA(member int)

SetStepCountA When stepping is enabled this contains the current step cycle.

func (*Game) SetSteppingA

func (self *Game) SetSteppingA(member bool)

SetSteppingA Enable core loop stepping with Game.enableStep().

func (*Game) SetTimeA

func (self *Game) SetTimeA(member *Time)

SetTimeA Reference to the core game clock.

func (*Game) SetTransparentA

func (self *Game) SetTransparentA(member bool)

SetTransparentA Use a transparent canvas background or not.

func (*Game) SetTweensA

func (self *Game) SetTweensA(member *TweenManager)

SetTweensA Reference to the tween manager.

func (*Game) SetUpRenderer

func (self *Game) SetUpRenderer()

SetUpRenderer Checks if the device is capable of using the requested renderer and sets it up or an alternative if not.

func (*Game) SetUpRendererI

func (self *Game) SetUpRendererI(args ...interface{})

SetUpRendererI Checks if the device is capable of using the requested renderer and sets it up or an alternative if not.

func (*Game) SetUpdatesThisFrameA

func (self *Game) SetUpdatesThisFrameA(member int)

SetUpdatesThisFrameA Number of logic updates expected to occur this render frame; will be 1 unless there are catch-ups required (and allowed).

func (*Game) SetWidthA

func (self *Game) SetWidthA(member int)

SetWidthA The current Game Width in pixels.

_Do not modify this property directly:_ use {@link Phaser.ScaleManager#setGameSize} - eg. `game.scale.setGameSize(width, height)` - instead.

func (*Game) SetWorldA

func (self *Game) SetWorldA(member *World)

SetWorldA Reference to the world.

func (*Game) ShowDebugHeader

func (self *Game) ShowDebugHeader()

ShowDebugHeader Displays a Phaser version debug header in the console.

func (*Game) ShowDebugHeaderI

func (self *Game) ShowDebugHeaderI(args ...interface{})

ShowDebugHeaderI Displays a Phaser version debug header in the console.

func (*Game) Sound

func (self *Game) Sound() *SoundManager

Sound Reference to the sound manager.

func (*Game) Stage

func (self *Game) Stage() *Stage

Stage Reference to the stage.

func (*Game) State

func (self *Game) State() *StateManager

State The StateManager.

func (*Game) Step

func (self *Game) Step()

Step When stepping is enabled you must call this function directly (perhaps via a DOM button?) to advance the game loop by one frame. This is extremely useful to hard to track down errors! Use the internal stepCount property to monitor progress.

func (*Game) StepCount

func (self *Game) StepCount() int

StepCount When stepping is enabled this contains the current step cycle.

func (*Game) StepI

func (self *Game) StepI(args ...interface{})

StepI When stepping is enabled you must call this function directly (perhaps via a DOM button?) to advance the game loop by one frame. This is extremely useful to hard to track down errors! Use the internal stepCount property to monitor progress.

func (*Game) Stepping

func (self *Game) Stepping() bool

Stepping Enable core loop stepping with Game.enableStep().

func (*Game) Time

func (self *Game) Time() *Time

Time Reference to the core game clock.

func (*Game) Transparent

func (self *Game) Transparent() bool

Transparent Use a transparent canvas background or not.

func (*Game) Tweens

func (self *Game) Tweens() *TweenManager

Tweens Reference to the tween manager.

func (*Game) Update

func (self *Game) Update(time int)

Update The core game loop.

func (*Game) UpdateI

func (self *Game) UpdateI(args ...interface{})

UpdateI The core game loop.

func (*Game) UpdateLogic

func (self *Game) UpdateLogic(timeStep int)

UpdateLogic Updates all logic subsystems in Phaser. Called automatically by Game.update.

func (*Game) UpdateLogicI

func (self *Game) UpdateLogicI(args ...interface{})

UpdateLogicI Updates all logic subsystems in Phaser. Called automatically by Game.update.

func (*Game) UpdateRender

func (self *Game) UpdateRender(elapsedTime int)

UpdateRender Runs the Render cycle. It starts by calling State.preRender. In here you can do any last minute adjustments of display objects as required. It then calls the renderer, which renders the entire display list, starting from the Stage object and working down. It then calls plugin.render on any loaded plugins, in the order in which they were enabled. After this State.render is called. Any rendering that happens here will take place on-top of the display list. Finally plugin.postRender is called on any loaded plugins, in the order in which they were enabled. This method is called automatically by Game.update, you don't need to call it directly. Should you wish to have fine-grained control over when Phaser renders then use the `Game.lockRender` boolean. Phaser will only render when this boolean is `false`.

func (*Game) UpdateRenderI

func (self *Game) UpdateRenderI(args ...interface{})

UpdateRenderI Runs the Render cycle. It starts by calling State.preRender. In here you can do any last minute adjustments of display objects as required. It then calls the renderer, which renders the entire display list, starting from the Stage object and working down. It then calls plugin.render on any loaded plugins, in the order in which they were enabled. After this State.render is called. Any rendering that happens here will take place on-top of the display list. Finally plugin.postRender is called on any loaded plugins, in the order in which they were enabled. This method is called automatically by Game.update, you don't need to call it directly. Should you wish to have fine-grained control over when Phaser renders then use the `Game.lockRender` boolean. Phaser will only render when this boolean is `false`.

func (*Game) UpdatesThisFrame

func (self *Game) UpdatesThisFrame() int

UpdatesThisFrame Number of logic updates expected to occur this render frame; will be 1 unless there are catch-ups required (and allowed).

func (*Game) Width

func (self *Game) Width() int

Width The current Game Width in pixels.

_Do not modify this property directly:_ use {@link Phaser.ScaleManager#setGameSize} - eg. `game.scale.setGameSize(width, height)` - instead.

func (*Game) World

func (self *Game) World() *World

World Reference to the world.

type GameObjectCreator

type GameObjectCreator struct {
	*js.Object
}

GameObjectCreator The GameObjectCreator is a quick way to create common game objects _without_ adding them to the game world. The object creator can be accessed with {@linkcode Phaser.Game#make `game.make`}.

func NewGameObjectCreator

func NewGameObjectCreator(game *Game) *GameObjectCreator

NewGameObjectCreator The GameObjectCreator is a quick way to create common game objects _without_ adding them to the game world. The object creator can be accessed with {@linkcode Phaser.Game#make `game.make`}.

func NewGameObjectCreatorI

func NewGameObjectCreatorI(args ...interface{}) *GameObjectCreator

NewGameObjectCreatorI The GameObjectCreator is a quick way to create common game objects _without_ adding them to the game world. The object creator can be accessed with {@linkcode Phaser.Game#make `game.make`}.

func ToGameObjectCreator

func ToGameObjectCreator(jsStruct interface{}) *GameObjectCreator

GameObjectCreator Binding conversion method to GameObjectCreator point

func (*GameObjectCreator) Audio

func (self *GameObjectCreator) Audio(key string) *Sound

Audio Creates a new Sound object.

func (*GameObjectCreator) Audio1O

func (self *GameObjectCreator) Audio1O(key string, volume int) *Sound

Audio1O Creates a new Sound object.

func (*GameObjectCreator) Audio2O

func (self *GameObjectCreator) Audio2O(key string, volume int, loop bool) *Sound

Audio2O Creates a new Sound object.

func (*GameObjectCreator) Audio3O

func (self *GameObjectCreator) Audio3O(key string, volume int, loop bool, connect bool) *Sound

Audio3O Creates a new Sound object.

func (*GameObjectCreator) AudioI

func (self *GameObjectCreator) AudioI(args ...interface{}) *Sound

AudioI Creates a new Sound object.

func (*GameObjectCreator) AudioSprite

func (self *GameObjectCreator) AudioSprite(key string) *AudioSprite

AudioSprite Creates a new AudioSprite object.

func (*GameObjectCreator) AudioSpriteI

func (self *GameObjectCreator) AudioSpriteI(args ...interface{}) *AudioSprite

AudioSpriteI Creates a new AudioSprite object.

func (*GameObjectCreator) BitmapData

func (self *GameObjectCreator) BitmapData() *BitmapData

BitmapData Create a BitmpaData object.

A BitmapData object can be manipulated and drawn to like a traditional Canvas object and used to texture Sprites.

func (*GameObjectCreator) BitmapData1O

func (self *GameObjectCreator) BitmapData1O(width int) *BitmapData

BitmapData1O Create a BitmpaData object.

A BitmapData object can be manipulated and drawn to like a traditional Canvas object and used to texture Sprites.

func (*GameObjectCreator) BitmapData2O

func (self *GameObjectCreator) BitmapData2O(width int, height int) *BitmapData

BitmapData2O Create a BitmpaData object.

A BitmapData object can be manipulated and drawn to like a traditional Canvas object and used to texture Sprites.

func (*GameObjectCreator) BitmapData3O

func (self *GameObjectCreator) BitmapData3O(width int, height int, key string) *BitmapData

BitmapData3O Create a BitmpaData object.

A BitmapData object can be manipulated and drawn to like a traditional Canvas object and used to texture Sprites.

func (*GameObjectCreator) BitmapData4O

func (self *GameObjectCreator) BitmapData4O(width int, height int, key string, addToCache bool) *BitmapData

BitmapData4O Create a BitmpaData object.

A BitmapData object can be manipulated and drawn to like a traditional Canvas object and used to texture Sprites.

func (*GameObjectCreator) BitmapDataI

func (self *GameObjectCreator) BitmapDataI(args ...interface{}) *BitmapData

BitmapDataI Create a BitmpaData object.

A BitmapData object can be manipulated and drawn to like a traditional Canvas object and used to texture Sprites.

func (*GameObjectCreator) BitmapText

func (self *GameObjectCreator) BitmapText(x int, y int, font string) *BitmapText

BitmapText Create a new BitmapText object.

BitmapText objects work by taking a texture file and an XML file that describes the font structure. It then generates a new Sprite object for each letter of the text, proportionally spaced out and aligned to match the font structure.

BitmapText objects are less flexible than Text objects, in that they have less features such as shadows, fills and the ability to use Web Fonts. However you trade this flexibility for pure rendering speed. You can also create visually compelling BitmapTexts by processing the font texture in an image editor first, applying fills and any other effects required.

To create multi-line text insert \r, \n or \r\n escape codes into the text string.

To create a BitmapText data files you can use:

BMFont (Windows, free): http://www.angelcode.com/products/bmfont/ Glyph Designer (OS X, commercial): http://www.71squared.com/en/glyphdesigner Littera (Web-based, free): http://kvazars.com/littera/

func (*GameObjectCreator) BitmapText1O

func (self *GameObjectCreator) BitmapText1O(x int, y int, font string, text string) *BitmapText

BitmapText1O Create a new BitmapText object.

BitmapText objects work by taking a texture file and an XML file that describes the font structure. It then generates a new Sprite object for each letter of the text, proportionally spaced out and aligned to match the font structure.

BitmapText objects are less flexible than Text objects, in that they have less features such as shadows, fills and the ability to use Web Fonts. However you trade this flexibility for pure rendering speed. You can also create visually compelling BitmapTexts by processing the font texture in an image editor first, applying fills and any other effects required.

To create multi-line text insert \r, \n or \r\n escape codes into the text string.

To create a BitmapText data files you can use:

BMFont (Windows, free): http://www.angelcode.com/products/bmfont/ Glyph Designer (OS X, commercial): http://www.71squared.com/en/glyphdesigner Littera (Web-based, free): http://kvazars.com/littera/

func (*GameObjectCreator) BitmapText2O

func (self *GameObjectCreator) BitmapText2O(x int, y int, font string, text string, size int) *BitmapText

BitmapText2O Create a new BitmapText object.

BitmapText objects work by taking a texture file and an XML file that describes the font structure. It then generates a new Sprite object for each letter of the text, proportionally spaced out and aligned to match the font structure.

BitmapText objects are less flexible than Text objects, in that they have less features such as shadows, fills and the ability to use Web Fonts. However you trade this flexibility for pure rendering speed. You can also create visually compelling BitmapTexts by processing the font texture in an image editor first, applying fills and any other effects required.

To create multi-line text insert \r, \n or \r\n escape codes into the text string.

To create a BitmapText data files you can use:

BMFont (Windows, free): http://www.angelcode.com/products/bmfont/ Glyph Designer (OS X, commercial): http://www.71squared.com/en/glyphdesigner Littera (Web-based, free): http://kvazars.com/littera/

func (*GameObjectCreator) BitmapText3O

func (self *GameObjectCreator) BitmapText3O(x int, y int, font string, text string, size int, align string) *BitmapText

BitmapText3O Create a new BitmapText object.

BitmapText objects work by taking a texture file and an XML file that describes the font structure. It then generates a new Sprite object for each letter of the text, proportionally spaced out and aligned to match the font structure.

BitmapText objects are less flexible than Text objects, in that they have less features such as shadows, fills and the ability to use Web Fonts. However you trade this flexibility for pure rendering speed. You can also create visually compelling BitmapTexts by processing the font texture in an image editor first, applying fills and any other effects required.

To create multi-line text insert \r, \n or \r\n escape codes into the text string.

To create a BitmapText data files you can use:

BMFont (Windows, free): http://www.angelcode.com/products/bmfont/ Glyph Designer (OS X, commercial): http://www.71squared.com/en/glyphdesigner Littera (Web-based, free): http://kvazars.com/littera/

func (*GameObjectCreator) BitmapTextI

func (self *GameObjectCreator) BitmapTextI(args ...interface{}) *BitmapText

BitmapTextI Create a new BitmapText object.

BitmapText objects work by taking a texture file and an XML file that describes the font structure. It then generates a new Sprite object for each letter of the text, proportionally spaced out and aligned to match the font structure.

BitmapText objects are less flexible than Text objects, in that they have less features such as shadows, fills and the ability to use Web Fonts. However you trade this flexibility for pure rendering speed. You can also create visually compelling BitmapTexts by processing the font texture in an image editor first, applying fills and any other effects required.

To create multi-line text insert \r, \n or \r\n escape codes into the text string.

To create a BitmapText data files you can use:

BMFont (Windows, free): http://www.angelcode.com/products/bmfont/ Glyph Designer (OS X, commercial): http://www.71squared.com/en/glyphdesigner Littera (Web-based, free): http://kvazars.com/littera/

func (*GameObjectCreator) Button

func (self *GameObjectCreator) Button() *Button

Button Creates a new Button object.

func (*GameObjectCreator) Button1O

func (self *GameObjectCreator) Button1O(x int) *Button

Button1O Creates a new Button object.

func (*GameObjectCreator) Button2O

func (self *GameObjectCreator) Button2O(x int, y int) *Button

Button2O Creates a new Button object.

func (*GameObjectCreator) Button3O

func (self *GameObjectCreator) Button3O(x int, y int, key string) *Button

Button3O Creates a new Button object.

func (*GameObjectCreator) Button4O

func (self *GameObjectCreator) Button4O(x int, y int, key string, callback interface{}) *Button

Button4O Creates a new Button object.

func (*GameObjectCreator) Button5O

func (self *GameObjectCreator) Button5O(x int, y int, key string, callback interface{}, callbackContext interface{}) *Button

Button5O Creates a new Button object.

func (*GameObjectCreator) Button6O

func (self *GameObjectCreator) Button6O(x int, y int, key string, callback interface{}, callbackContext interface{}, overFrame interface{}) *Button

Button6O Creates a new Button object.

func (*GameObjectCreator) Button7O

func (self *GameObjectCreator) Button7O(x int, y int, key string, callback interface{}, callbackContext interface{}, overFrame interface{}, outFrame interface{}) *Button

Button7O Creates a new Button object.

func (*GameObjectCreator) Button8O

func (self *GameObjectCreator) Button8O(x int, y int, key string, callback interface{}, callbackContext interface{}, overFrame interface{}, outFrame interface{}, downFrame interface{}) *Button

Button8O Creates a new Button object.

func (*GameObjectCreator) Button9O

func (self *GameObjectCreator) Button9O(x int, y int, key string, callback interface{}, callbackContext interface{}, overFrame interface{}, outFrame interface{}, downFrame interface{}, upFrame interface{}) *Button

Button9O Creates a new Button object.

func (*GameObjectCreator) ButtonI

func (self *GameObjectCreator) ButtonI(args ...interface{}) *Button

ButtonI Creates a new Button object.

func (*GameObjectCreator) Emitter

func (self *GameObjectCreator) Emitter() *Emitter

Emitter Creat a new Emitter.

An Emitter is a lightweight particle emitter. It can be used for one-time explosions or for continuous effects like rain and fire. All it really does is launch Particle objects out at set intervals, and fixes their positions and velocities accorindgly.

func (*GameObjectCreator) Emitter1O

func (self *GameObjectCreator) Emitter1O(x int) *Emitter

Emitter1O Creat a new Emitter.

An Emitter is a lightweight particle emitter. It can be used for one-time explosions or for continuous effects like rain and fire. All it really does is launch Particle objects out at set intervals, and fixes their positions and velocities accorindgly.

func (*GameObjectCreator) Emitter2O

func (self *GameObjectCreator) Emitter2O(x int, y int) *Emitter

Emitter2O Creat a new Emitter.

An Emitter is a lightweight particle emitter. It can be used for one-time explosions or for continuous effects like rain and fire. All it really does is launch Particle objects out at set intervals, and fixes their positions and velocities accorindgly.

func (*GameObjectCreator) Emitter3O

func (self *GameObjectCreator) Emitter3O(x int, y int, maxParticles int) *Emitter

Emitter3O Creat a new Emitter.

An Emitter is a lightweight particle emitter. It can be used for one-time explosions or for continuous effects like rain and fire. All it really does is launch Particle objects out at set intervals, and fixes their positions and velocities accorindgly.

func (*GameObjectCreator) EmitterI

func (self *GameObjectCreator) EmitterI(args ...interface{}) *Emitter

EmitterI Creat a new Emitter.

An Emitter is a lightweight particle emitter. It can be used for one-time explosions or for continuous effects like rain and fire. All it really does is launch Particle objects out at set intervals, and fixes their positions and velocities accorindgly.

func (*GameObjectCreator) Filter

func (self *GameObjectCreator) Filter(filter string, args interface{}) *Filter

Filter A WebGL shader/filter that can be applied to Sprites.

func (*GameObjectCreator) FilterI

func (self *GameObjectCreator) FilterI(args ...interface{}) *Filter

FilterI A WebGL shader/filter that can be applied to Sprites.

func (*GameObjectCreator) Game

func (self *GameObjectCreator) Game() *Game

Game A reference to the currently running Game.

func (*GameObjectCreator) Graphics

func (self *GameObjectCreator) Graphics() *Graphics

Graphics Creates a new Graphics object.

func (*GameObjectCreator) Graphics1O

func (self *GameObjectCreator) Graphics1O(x int) *Graphics

Graphics1O Creates a new Graphics object.

func (*GameObjectCreator) Graphics2O

func (self *GameObjectCreator) Graphics2O(x int, y int) *Graphics

Graphics2O Creates a new Graphics object.

func (*GameObjectCreator) GraphicsI

func (self *GameObjectCreator) GraphicsI(args ...interface{}) *Graphics

GraphicsI Creates a new Graphics object.

func (*GameObjectCreator) Group

func (self *GameObjectCreator) Group(parent interface{}) *Group

Group A Group is a container for display objects that allows for fast pooling, recycling and collision checks.

func (*GameObjectCreator) Group1O

func (self *GameObjectCreator) Group1O(parent interface{}, name string) *Group

Group1O A Group is a container for display objects that allows for fast pooling, recycling and collision checks.

func (*GameObjectCreator) Group2O

func (self *GameObjectCreator) Group2O(parent interface{}, name string, addToStage bool) *Group

Group2O A Group is a container for display objects that allows for fast pooling, recycling and collision checks.

func (*GameObjectCreator) Group3O

func (self *GameObjectCreator) Group3O(parent interface{}, name string, addToStage bool, enableBody bool) *Group

Group3O A Group is a container for display objects that allows for fast pooling, recycling and collision checks.

func (*GameObjectCreator) Group4O

func (self *GameObjectCreator) Group4O(parent interface{}, name string, addToStage bool, enableBody bool, physicsBodyType int) *Group

Group4O A Group is a container for display objects that allows for fast pooling, recycling and collision checks.

func (*GameObjectCreator) GroupI

func (self *GameObjectCreator) GroupI(args ...interface{}) *Group

GroupI A Group is a container for display objects that allows for fast pooling, recycling and collision checks.

func (*GameObjectCreator) Image

func (self *GameObjectCreator) Image(x int, y int, key interface{}) *Image

Image Create a new Image object.

An Image is a light-weight object you can use to display anything that doesn't need physics or animation. It can still rotate, scale, crop and receive input events. This makes it perfect for logos, backgrounds, simple buttons and other non-Sprite graphics.

func (*GameObjectCreator) Image1O

func (self *GameObjectCreator) Image1O(x int, y int, key interface{}, frame interface{}) *Image

Image1O Create a new Image object.

An Image is a light-weight object you can use to display anything that doesn't need physics or animation. It can still rotate, scale, crop and receive input events. This makes it perfect for logos, backgrounds, simple buttons and other non-Sprite graphics.

func (*GameObjectCreator) ImageI

func (self *GameObjectCreator) ImageI(args ...interface{}) *Image

ImageI Create a new Image object.

An Image is a light-weight object you can use to display anything that doesn't need physics or animation. It can still rotate, scale, crop and receive input events. This makes it perfect for logos, backgrounds, simple buttons and other non-Sprite graphics.

func (*GameObjectCreator) RenderTexture

func (self *GameObjectCreator) RenderTexture() *RenderTexture

RenderTexture A dynamic initially blank canvas to which images can be drawn.

func (*GameObjectCreator) RenderTexture1O

func (self *GameObjectCreator) RenderTexture1O(width int) *RenderTexture

RenderTexture1O A dynamic initially blank canvas to which images can be drawn.

func (*GameObjectCreator) RenderTexture2O

func (self *GameObjectCreator) RenderTexture2O(width int, height int) *RenderTexture

RenderTexture2O A dynamic initially blank canvas to which images can be drawn.

func (*GameObjectCreator) RenderTexture3O

func (self *GameObjectCreator) RenderTexture3O(width int, height int, key string) *RenderTexture

RenderTexture3O A dynamic initially blank canvas to which images can be drawn.

func (*GameObjectCreator) RenderTexture4O

func (self *GameObjectCreator) RenderTexture4O(width int, height int, key string, addToCache bool) *RenderTexture

RenderTexture4O A dynamic initially blank canvas to which images can be drawn.

func (*GameObjectCreator) RenderTextureI

func (self *GameObjectCreator) RenderTextureI(args ...interface{}) *RenderTexture

RenderTextureI A dynamic initially blank canvas to which images can be drawn.

func (*GameObjectCreator) RetroFont

func (self *GameObjectCreator) RetroFont(font string, characterWidth int, characterHeight int, chars string, charsPerRow int) *RetroFont

RetroFont Create a new RetroFont object.

A RetroFont can be used as a texture for an Image or Sprite and optionally add it to the Cache. A RetroFont uses a bitmap which contains fixed with characters for the font set. You use character spacing to define the set. If you need variable width character support then use a BitmapText object instead. The main difference between a RetroFont and a BitmapText is that a RetroFont creates a single texture that you can apply to a game object, where-as a BitmapText creates one Sprite object per letter of text. The texture can be asssigned or one or multiple images/sprites, but note that the text the RetroFont uses will be shared across them all, i.e. if you need each Image to have different text in it, then you need to create multiple RetroFont objects.

func (*GameObjectCreator) RetroFont1O

func (self *GameObjectCreator) RetroFont1O(font string, characterWidth int, characterHeight int, chars string, charsPerRow int, xSpacing int) *RetroFont

RetroFont1O Create a new RetroFont object.

A RetroFont can be used as a texture for an Image or Sprite and optionally add it to the Cache. A RetroFont uses a bitmap which contains fixed with characters for the font set. You use character spacing to define the set. If you need variable width character support then use a BitmapText object instead. The main difference between a RetroFont and a BitmapText is that a RetroFont creates a single texture that you can apply to a game object, where-as a BitmapText creates one Sprite object per letter of text. The texture can be asssigned or one or multiple images/sprites, but note that the text the RetroFont uses will be shared across them all, i.e. if you need each Image to have different text in it, then you need to create multiple RetroFont objects.

func (*GameObjectCreator) RetroFont2O

func (self *GameObjectCreator) RetroFont2O(font string, characterWidth int, characterHeight int, chars string, charsPerRow int, xSpacing int, ySpacing int) *RetroFont

RetroFont2O Create a new RetroFont object.

A RetroFont can be used as a texture for an Image or Sprite and optionally add it to the Cache. A RetroFont uses a bitmap which contains fixed with characters for the font set. You use character spacing to define the set. If you need variable width character support then use a BitmapText object instead. The main difference between a RetroFont and a BitmapText is that a RetroFont creates a single texture that you can apply to a game object, where-as a BitmapText creates one Sprite object per letter of text. The texture can be asssigned or one or multiple images/sprites, but note that the text the RetroFont uses will be shared across them all, i.e. if you need each Image to have different text in it, then you need to create multiple RetroFont objects.

func (*GameObjectCreator) RetroFont3O

func (self *GameObjectCreator) RetroFont3O(font string, characterWidth int, characterHeight int, chars string, charsPerRow int, xSpacing int, ySpacing int, xOffset int) *RetroFont

RetroFont3O Create a new RetroFont object.

A RetroFont can be used as a texture for an Image or Sprite and optionally add it to the Cache. A RetroFont uses a bitmap which contains fixed with characters for the font set. You use character spacing to define the set. If you need variable width character support then use a BitmapText object instead. The main difference between a RetroFont and a BitmapText is that a RetroFont creates a single texture that you can apply to a game object, where-as a BitmapText creates one Sprite object per letter of text. The texture can be asssigned or one or multiple images/sprites, but note that the text the RetroFont uses will be shared across them all, i.e. if you need each Image to have different text in it, then you need to create multiple RetroFont objects.

func (*GameObjectCreator) RetroFont4O

func (self *GameObjectCreator) RetroFont4O(font string, characterWidth int, characterHeight int, chars string, charsPerRow int, xSpacing int, ySpacing int, xOffset int, yOffset int) *RetroFont

RetroFont4O Create a new RetroFont object.

A RetroFont can be used as a texture for an Image or Sprite and optionally add it to the Cache. A RetroFont uses a bitmap which contains fixed with characters for the font set. You use character spacing to define the set. If you need variable width character support then use a BitmapText object instead. The main difference between a RetroFont and a BitmapText is that a RetroFont creates a single texture that you can apply to a game object, where-as a BitmapText creates one Sprite object per letter of text. The texture can be asssigned or one or multiple images/sprites, but note that the text the RetroFont uses will be shared across them all, i.e. if you need each Image to have different text in it, then you need to create multiple RetroFont objects.

func (*GameObjectCreator) RetroFontI

func (self *GameObjectCreator) RetroFontI(args ...interface{}) *RetroFont

RetroFontI Create a new RetroFont object.

A RetroFont can be used as a texture for an Image or Sprite and optionally add it to the Cache. A RetroFont uses a bitmap which contains fixed with characters for the font set. You use character spacing to define the set. If you need variable width character support then use a BitmapText object instead. The main difference between a RetroFont and a BitmapText is that a RetroFont creates a single texture that you can apply to a game object, where-as a BitmapText creates one Sprite object per letter of text. The texture can be asssigned or one or multiple images/sprites, but note that the text the RetroFont uses will be shared across them all, i.e. if you need each Image to have different text in it, then you need to create multiple RetroFont objects.

func (*GameObjectCreator) Rope

func (self *GameObjectCreator) Rope(x int, y int, width int, height int, key interface{}, frame interface{}) *Rope

Rope Creates a new Rope object.

func (*GameObjectCreator) RopeI

func (self *GameObjectCreator) RopeI(args ...interface{}) *Rope

RopeI Creates a new Rope object.

func (*GameObjectCreator) SetGameA

func (self *GameObjectCreator) SetGameA(member *Game)

SetGameA A reference to the currently running Game.

func (*GameObjectCreator) SetWorldA

func (self *GameObjectCreator) SetWorldA(member *World)

SetWorldA A reference to the game world.

func (*GameObjectCreator) Sound

func (self *GameObjectCreator) Sound(key string) *Sound

Sound Creates a new Sound object.

func (*GameObjectCreator) Sound1O

func (self *GameObjectCreator) Sound1O(key string, volume int) *Sound

Sound1O Creates a new Sound object.

func (*GameObjectCreator) Sound2O

func (self *GameObjectCreator) Sound2O(key string, volume int, loop bool) *Sound

Sound2O Creates a new Sound object.

func (*GameObjectCreator) Sound3O

func (self *GameObjectCreator) Sound3O(key string, volume int, loop bool, connect bool) *Sound

Sound3O Creates a new Sound object.

func (*GameObjectCreator) SoundI

func (self *GameObjectCreator) SoundI(args ...interface{}) *Sound

SoundI Creates a new Sound object.

func (*GameObjectCreator) Sprite

func (self *GameObjectCreator) Sprite(x int, y int, key interface{}) *Sprite

Sprite Create a new Sprite with specific position and sprite sheet key.

func (*GameObjectCreator) Sprite1O

func (self *GameObjectCreator) Sprite1O(x int, y int, key interface{}, frame interface{}) *Sprite

Sprite1O Create a new Sprite with specific position and sprite sheet key.

func (*GameObjectCreator) SpriteBatch

func (self *GameObjectCreator) SpriteBatch(parent interface{}) *SpriteBatch

SpriteBatch Create a new SpriteBatch.

func (*GameObjectCreator) SpriteBatch1O

func (self *GameObjectCreator) SpriteBatch1O(parent interface{}, name string) *SpriteBatch

SpriteBatch1O Create a new SpriteBatch.

func (*GameObjectCreator) SpriteBatch2O

func (self *GameObjectCreator) SpriteBatch2O(parent interface{}, name string, addToStage bool) *SpriteBatch

SpriteBatch2O Create a new SpriteBatch.

func (*GameObjectCreator) SpriteBatchI

func (self *GameObjectCreator) SpriteBatchI(args ...interface{}) *SpriteBatch

SpriteBatchI Create a new SpriteBatch.

func (*GameObjectCreator) SpriteI

func (self *GameObjectCreator) SpriteI(args ...interface{}) *Sprite

SpriteI Create a new Sprite with specific position and sprite sheet key.

func (*GameObjectCreator) Text

func (self *GameObjectCreator) Text(x int, y int, text string, style interface{}) *Text

Text Creates a new Text object.

func (*GameObjectCreator) TextI

func (self *GameObjectCreator) TextI(args ...interface{}) *Text

TextI Creates a new Text object.

func (*GameObjectCreator) TileSprite

func (self *GameObjectCreator) TileSprite(x int, y int, width int, height int, key interface{}, frame interface{}) *TileSprite

TileSprite Creates a new TileSprite object.

func (*GameObjectCreator) TileSpriteI

func (self *GameObjectCreator) TileSpriteI(args ...interface{}) *TileSprite

TileSpriteI Creates a new TileSprite object.

func (*GameObjectCreator) Tilemap

func (self *GameObjectCreator) Tilemap()

Tilemap Creates a new Phaser.Tilemap object.

The map can either be populated with data from a Tiled JSON file or from a CSV file. To do this pass the Cache key as the first parameter. When using Tiled data you need only provide the key. When using CSV data you must provide the key and the tileWidth and tileHeight parameters. If creating a blank tilemap to be populated later, you can either specify no parameters at all and then use `Tilemap.create` or pass the map and tile dimensions here. Note that all Tilemaps use a base tile size to calculate dimensions from, but that a TilemapLayer may have its own unique tile size that overrides it.

func (*GameObjectCreator) Tilemap1O

func (self *GameObjectCreator) Tilemap1O(key string)

Tilemap1O Creates a new Phaser.Tilemap object.

The map can either be populated with data from a Tiled JSON file or from a CSV file. To do this pass the Cache key as the first parameter. When using Tiled data you need only provide the key. When using CSV data you must provide the key and the tileWidth and tileHeight parameters. If creating a blank tilemap to be populated later, you can either specify no parameters at all and then use `Tilemap.create` or pass the map and tile dimensions here. Note that all Tilemaps use a base tile size to calculate dimensions from, but that a TilemapLayer may have its own unique tile size that overrides it.

func (*GameObjectCreator) Tilemap2O

func (self *GameObjectCreator) Tilemap2O(key string, tileWidth int)

Tilemap2O Creates a new Phaser.Tilemap object.

The map can either be populated with data from a Tiled JSON file or from a CSV file. To do this pass the Cache key as the first parameter. When using Tiled data you need only provide the key. When using CSV data you must provide the key and the tileWidth and tileHeight parameters. If creating a blank tilemap to be populated later, you can either specify no parameters at all and then use `Tilemap.create` or pass the map and tile dimensions here. Note that all Tilemaps use a base tile size to calculate dimensions from, but that a TilemapLayer may have its own unique tile size that overrides it.

func (*GameObjectCreator) Tilemap3O

func (self *GameObjectCreator) Tilemap3O(key string, tileWidth int, tileHeight int)

Tilemap3O Creates a new Phaser.Tilemap object.

The map can either be populated with data from a Tiled JSON file or from a CSV file. To do this pass the Cache key as the first parameter. When using Tiled data you need only provide the key. When using CSV data you must provide the key and the tileWidth and tileHeight parameters. If creating a blank tilemap to be populated later, you can either specify no parameters at all and then use `Tilemap.create` or pass the map and tile dimensions here. Note that all Tilemaps use a base tile size to calculate dimensions from, but that a TilemapLayer may have its own unique tile size that overrides it.

func (*GameObjectCreator) Tilemap4O

func (self *GameObjectCreator) Tilemap4O(key string, tileWidth int, tileHeight int, width int)

Tilemap4O Creates a new Phaser.Tilemap object.

The map can either be populated with data from a Tiled JSON file or from a CSV file. To do this pass the Cache key as the first parameter. When using Tiled data you need only provide the key. When using CSV data you must provide the key and the tileWidth and tileHeight parameters. If creating a blank tilemap to be populated later, you can either specify no parameters at all and then use `Tilemap.create` or pass the map and tile dimensions here. Note that all Tilemaps use a base tile size to calculate dimensions from, but that a TilemapLayer may have its own unique tile size that overrides it.

func (*GameObjectCreator) Tilemap5O

func (self *GameObjectCreator) Tilemap5O(key string, tileWidth int, tileHeight int, width int, height int)

Tilemap5O Creates a new Phaser.Tilemap object.

The map can either be populated with data from a Tiled JSON file or from a CSV file. To do this pass the Cache key as the first parameter. When using Tiled data you need only provide the key. When using CSV data you must provide the key and the tileWidth and tileHeight parameters. If creating a blank tilemap to be populated later, you can either specify no parameters at all and then use `Tilemap.create` or pass the map and tile dimensions here. Note that all Tilemaps use a base tile size to calculate dimensions from, but that a TilemapLayer may have its own unique tile size that overrides it.

func (*GameObjectCreator) TilemapI

func (self *GameObjectCreator) TilemapI(args ...interface{})

TilemapI Creates a new Phaser.Tilemap object.

The map can either be populated with data from a Tiled JSON file or from a CSV file. To do this pass the Cache key as the first parameter. When using Tiled data you need only provide the key. When using CSV data you must provide the key and the tileWidth and tileHeight parameters. If creating a blank tilemap to be populated later, you can either specify no parameters at all and then use `Tilemap.create` or pass the map and tile dimensions here. Note that all Tilemaps use a base tile size to calculate dimensions from, but that a TilemapLayer may have its own unique tile size that overrides it.

func (*GameObjectCreator) Tween

func (self *GameObjectCreator) Tween(obj interface{}) *Tween

Tween Create a tween object for a specific object.

The object can be any JavaScript object or Phaser object such as Sprite.

func (*GameObjectCreator) TweenI

func (self *GameObjectCreator) TweenI(args ...interface{}) *Tween

TweenI Create a tween object for a specific object.

The object can be any JavaScript object or Phaser object such as Sprite.

func (*GameObjectCreator) World

func (self *GameObjectCreator) World() *World

World A reference to the game world.

type GameObjectFactory

type GameObjectFactory struct {
	*js.Object
}

GameObjectFactory The GameObjectFactory is a quick way to create many common game objects using {@linkcode Phaser.Game#add `game.add`}.

Created objects are _automatically added_ to the appropriate Manager, World, or manually specified parent Group.

func NewGameObjectFactory

func NewGameObjectFactory(game *Game) *GameObjectFactory

NewGameObjectFactory The GameObjectFactory is a quick way to create many common game objects using {@linkcode Phaser.Game#add `game.add`}.

Created objects are _automatically added_ to the appropriate Manager, World, or manually specified parent Group.

func NewGameObjectFactoryI

func NewGameObjectFactoryI(args ...interface{}) *GameObjectFactory

NewGameObjectFactoryI The GameObjectFactory is a quick way to create many common game objects using {@linkcode Phaser.Game#add `game.add`}.

Created objects are _automatically added_ to the appropriate Manager, World, or manually specified parent Group.

func ToGameObjectFactory

func ToGameObjectFactory(jsStruct interface{}) *GameObjectFactory

GameObjectFactory Binding conversion method to GameObjectFactory point

func (*GameObjectFactory) Audio

func (self *GameObjectFactory) Audio(key string) *Sound

Audio Creates a new Sound object.

func (*GameObjectFactory) Audio1O

func (self *GameObjectFactory) Audio1O(key string, volume int) *Sound

Audio1O Creates a new Sound object.

func (*GameObjectFactory) Audio2O

func (self *GameObjectFactory) Audio2O(key string, volume int, loop bool) *Sound

Audio2O Creates a new Sound object.

func (*GameObjectFactory) Audio3O

func (self *GameObjectFactory) Audio3O(key string, volume int, loop bool, connect bool) *Sound

Audio3O Creates a new Sound object.

func (*GameObjectFactory) AudioI

func (self *GameObjectFactory) AudioI(args ...interface{}) *Sound

AudioI Creates a new Sound object.

func (*GameObjectFactory) AudioSprite

func (self *GameObjectFactory) AudioSprite(key string) *AudioSprite

AudioSprite Creates a new AudioSprite object.

func (*GameObjectFactory) AudioSpriteI

func (self *GameObjectFactory) AudioSpriteI(args ...interface{}) *AudioSprite

AudioSpriteI Creates a new AudioSprite object.

func (*GameObjectFactory) BitmapData

func (self *GameObjectFactory) BitmapData() *BitmapData

BitmapData Create a BitmapData object.

A BitmapData object can be manipulated and drawn to like a traditional Canvas object and used to texture Sprites.

func (*GameObjectFactory) BitmapData1O

func (self *GameObjectFactory) BitmapData1O(width int) *BitmapData

BitmapData1O Create a BitmapData object.

A BitmapData object can be manipulated and drawn to like a traditional Canvas object and used to texture Sprites.

func (*GameObjectFactory) BitmapData2O

func (self *GameObjectFactory) BitmapData2O(width int, height int) *BitmapData

BitmapData2O Create a BitmapData object.

A BitmapData object can be manipulated and drawn to like a traditional Canvas object and used to texture Sprites.

func (*GameObjectFactory) BitmapData3O

func (self *GameObjectFactory) BitmapData3O(width int, height int, key string) *BitmapData

BitmapData3O Create a BitmapData object.

A BitmapData object can be manipulated and drawn to like a traditional Canvas object and used to texture Sprites.

func (*GameObjectFactory) BitmapData4O

func (self *GameObjectFactory) BitmapData4O(width int, height int, key string, addToCache bool) *BitmapData

BitmapData4O Create a BitmapData object.

A BitmapData object can be manipulated and drawn to like a traditional Canvas object and used to texture Sprites.

func (*GameObjectFactory) BitmapDataI

func (self *GameObjectFactory) BitmapDataI(args ...interface{}) *BitmapData

BitmapDataI Create a BitmapData object.

A BitmapData object can be manipulated and drawn to like a traditional Canvas object and used to texture Sprites.

func (*GameObjectFactory) BitmapText

func (self *GameObjectFactory) BitmapText(x int, y int, font string) *BitmapText

BitmapText Create a new BitmapText object.

BitmapText objects work by taking a texture file and an XML file that describes the font structure. It then generates a new Sprite object for each letter of the text, proportionally spaced out and aligned to match the font structure.

BitmapText objects are less flexible than Text objects, in that they have less features such as shadows, fills and the ability to use Web Fonts. However you trade this flexibility for pure rendering speed. You can also create visually compelling BitmapTexts by processing the font texture in an image editor first, applying fills and any other effects required.

To create multi-line text insert \r, \n or \r\n escape codes into the text string.

To create a BitmapText data files you can use:

BMFont (Windows, free): http://www.angelcode.com/products/bmfont/ Glyph Designer (OS X, commercial): http://www.71squared.com/en/glyphdesigner Littera (Web-based, free): http://kvazars.com/littera/

func (*GameObjectFactory) BitmapText1O

func (self *GameObjectFactory) BitmapText1O(x int, y int, font string, text string) *BitmapText

BitmapText1O Create a new BitmapText object.

BitmapText objects work by taking a texture file and an XML file that describes the font structure. It then generates a new Sprite object for each letter of the text, proportionally spaced out and aligned to match the font structure.

BitmapText objects are less flexible than Text objects, in that they have less features such as shadows, fills and the ability to use Web Fonts. However you trade this flexibility for pure rendering speed. You can also create visually compelling BitmapTexts by processing the font texture in an image editor first, applying fills and any other effects required.

To create multi-line text insert \r, \n or \r\n escape codes into the text string.

To create a BitmapText data files you can use:

BMFont (Windows, free): http://www.angelcode.com/products/bmfont/ Glyph Designer (OS X, commercial): http://www.71squared.com/en/glyphdesigner Littera (Web-based, free): http://kvazars.com/littera/

func (*GameObjectFactory) BitmapText2O

func (self *GameObjectFactory) BitmapText2O(x int, y int, font string, text string, size int) *BitmapText

BitmapText2O Create a new BitmapText object.

BitmapText objects work by taking a texture file and an XML file that describes the font structure. It then generates a new Sprite object for each letter of the text, proportionally spaced out and aligned to match the font structure.

BitmapText objects are less flexible than Text objects, in that they have less features such as shadows, fills and the ability to use Web Fonts. However you trade this flexibility for pure rendering speed. You can also create visually compelling BitmapTexts by processing the font texture in an image editor first, applying fills and any other effects required.

To create multi-line text insert \r, \n or \r\n escape codes into the text string.

To create a BitmapText data files you can use:

BMFont (Windows, free): http://www.angelcode.com/products/bmfont/ Glyph Designer (OS X, commercial): http://www.71squared.com/en/glyphdesigner Littera (Web-based, free): http://kvazars.com/littera/

func (*GameObjectFactory) BitmapText3O

func (self *GameObjectFactory) BitmapText3O(x int, y int, font string, text string, size int, group *Group) *BitmapText

BitmapText3O Create a new BitmapText object.

BitmapText objects work by taking a texture file and an XML file that describes the font structure. It then generates a new Sprite object for each letter of the text, proportionally spaced out and aligned to match the font structure.

BitmapText objects are less flexible than Text objects, in that they have less features such as shadows, fills and the ability to use Web Fonts. However you trade this flexibility for pure rendering speed. You can also create visually compelling BitmapTexts by processing the font texture in an image editor first, applying fills and any other effects required.

To create multi-line text insert \r, \n or \r\n escape codes into the text string.

To create a BitmapText data files you can use:

BMFont (Windows, free): http://www.angelcode.com/products/bmfont/ Glyph Designer (OS X, commercial): http://www.71squared.com/en/glyphdesigner Littera (Web-based, free): http://kvazars.com/littera/

func (*GameObjectFactory) BitmapTextI

func (self *GameObjectFactory) BitmapTextI(args ...interface{}) *BitmapText

BitmapTextI Create a new BitmapText object.

BitmapText objects work by taking a texture file and an XML file that describes the font structure. It then generates a new Sprite object for each letter of the text, proportionally spaced out and aligned to match the font structure.

BitmapText objects are less flexible than Text objects, in that they have less features such as shadows, fills and the ability to use Web Fonts. However you trade this flexibility for pure rendering speed. You can also create visually compelling BitmapTexts by processing the font texture in an image editor first, applying fills and any other effects required.

To create multi-line text insert \r, \n or \r\n escape codes into the text string.

To create a BitmapText data files you can use:

BMFont (Windows, free): http://www.angelcode.com/products/bmfont/ Glyph Designer (OS X, commercial): http://www.71squared.com/en/glyphdesigner Littera (Web-based, free): http://kvazars.com/littera/

func (*GameObjectFactory) Button

func (self *GameObjectFactory) Button() *Button

Button Creates a new Button object.

func (*GameObjectFactory) Button10O

func (self *GameObjectFactory) Button10O(x int, y int, key string, callback interface{}, callbackContext interface{}, overFrame interface{}, outFrame interface{}, downFrame interface{}, upFrame interface{}, group *Group) *Button

Button10O Creates a new Button object.

func (*GameObjectFactory) Button1O

func (self *GameObjectFactory) Button1O(x int) *Button

Button1O Creates a new Button object.

func (*GameObjectFactory) Button2O

func (self *GameObjectFactory) Button2O(x int, y int) *Button

Button2O Creates a new Button object.

func (*GameObjectFactory) Button3O

func (self *GameObjectFactory) Button3O(x int, y int, key string) *Button

Button3O Creates a new Button object.

func (*GameObjectFactory) Button4O

func (self *GameObjectFactory) Button4O(x int, y int, key string, callback interface{}) *Button

Button4O Creates a new Button object.

func (*GameObjectFactory) Button5O

func (self *GameObjectFactory) Button5O(x int, y int, key string, callback interface{}, callbackContext interface{}) *Button

Button5O Creates a new Button object.

func (*GameObjectFactory) Button6O

func (self *GameObjectFactory) Button6O(x int, y int, key string, callback interface{}, callbackContext interface{}, overFrame interface{}) *Button

Button6O Creates a new Button object.

func (*GameObjectFactory) Button7O

func (self *GameObjectFactory) Button7O(x int, y int, key string, callback interface{}, callbackContext interface{}, overFrame interface{}, outFrame interface{}) *Button

Button7O Creates a new Button object.

func (*GameObjectFactory) Button8O

func (self *GameObjectFactory) Button8O(x int, y int, key string, callback interface{}, callbackContext interface{}, overFrame interface{}, outFrame interface{}, downFrame interface{}) *Button

Button8O Creates a new Button object.

func (*GameObjectFactory) Button9O

func (self *GameObjectFactory) Button9O(x int, y int, key string, callback interface{}, callbackContext interface{}, overFrame interface{}, outFrame interface{}, downFrame interface{}, upFrame interface{}) *Button

Button9O Creates a new Button object.

func (*GameObjectFactory) ButtonI

func (self *GameObjectFactory) ButtonI(args ...interface{}) *Button

ButtonI Creates a new Button object.

func (*GameObjectFactory) Creature

func (self *GameObjectFactory) Creature() *Creature

Creature Create a new Creature Animation object.

Creature is a custom Game Object used in conjunction with the Creature Runtime libraries by Kestrel Moon Studios.

It allows you to display animated Game Objects that were created with the [Creature Automated Animation Tool](http://www.kestrelmoon.com/creature/).

Note 1: You can only use Phaser.Creature objects in WebGL enabled games. They do not work in Canvas mode games.

Note 2: You must use a build of Phaser that includes the CreatureMeshBone.js runtime and gl-matrix.js, or have them loaded before your Phaser game boots.

See the Phaser custom build process for more details.

func (*GameObjectFactory) Creature1O

func (self *GameObjectFactory) Creature1O(x int) *Creature

Creature1O Create a new Creature Animation object.

Creature is a custom Game Object used in conjunction with the Creature Runtime libraries by Kestrel Moon Studios.

It allows you to display animated Game Objects that were created with the [Creature Automated Animation Tool](http://www.kestrelmoon.com/creature/).

Note 1: You can only use Phaser.Creature objects in WebGL enabled games. They do not work in Canvas mode games.

Note 2: You must use a build of Phaser that includes the CreatureMeshBone.js runtime and gl-matrix.js, or have them loaded before your Phaser game boots.

See the Phaser custom build process for more details.

func (*GameObjectFactory) Creature2O

func (self *GameObjectFactory) Creature2O(x int, y int) *Creature

Creature2O Create a new Creature Animation object.

Creature is a custom Game Object used in conjunction with the Creature Runtime libraries by Kestrel Moon Studios.

It allows you to display animated Game Objects that were created with the [Creature Automated Animation Tool](http://www.kestrelmoon.com/creature/).

Note 1: You can only use Phaser.Creature objects in WebGL enabled games. They do not work in Canvas mode games.

Note 2: You must use a build of Phaser that includes the CreatureMeshBone.js runtime and gl-matrix.js, or have them loaded before your Phaser game boots.

See the Phaser custom build process for more details.

func (*GameObjectFactory) Creature3O

func (self *GameObjectFactory) Creature3O(x int, y int, key interface{}) *Creature

Creature3O Create a new Creature Animation object.

Creature is a custom Game Object used in conjunction with the Creature Runtime libraries by Kestrel Moon Studios.

It allows you to display animated Game Objects that were created with the [Creature Automated Animation Tool](http://www.kestrelmoon.com/creature/).

Note 1: You can only use Phaser.Creature objects in WebGL enabled games. They do not work in Canvas mode games.

Note 2: You must use a build of Phaser that includes the CreatureMeshBone.js runtime and gl-matrix.js, or have them loaded before your Phaser game boots.

See the Phaser custom build process for more details.

func (*GameObjectFactory) Creature4O

func (self *GameObjectFactory) Creature4O(x int, y int, key interface{}, group *Group) *Creature

Creature4O Create a new Creature Animation object.

Creature is a custom Game Object used in conjunction with the Creature Runtime libraries by Kestrel Moon Studios.

It allows you to display animated Game Objects that were created with the [Creature Automated Animation Tool](http://www.kestrelmoon.com/creature/).

Note 1: You can only use Phaser.Creature objects in WebGL enabled games. They do not work in Canvas mode games.

Note 2: You must use a build of Phaser that includes the CreatureMeshBone.js runtime and gl-matrix.js, or have them loaded before your Phaser game boots.

See the Phaser custom build process for more details.

func (*GameObjectFactory) CreatureI

func (self *GameObjectFactory) CreatureI(args ...interface{}) *Creature

CreatureI Create a new Creature Animation object.

Creature is a custom Game Object used in conjunction with the Creature Runtime libraries by Kestrel Moon Studios.

It allows you to display animated Game Objects that were created with the [Creature Automated Animation Tool](http://www.kestrelmoon.com/creature/).

Note 1: You can only use Phaser.Creature objects in WebGL enabled games. They do not work in Canvas mode games.

Note 2: You must use a build of Phaser that includes the CreatureMeshBone.js runtime and gl-matrix.js, or have them loaded before your Phaser game boots.

See the Phaser custom build process for more details.

func (*GameObjectFactory) Emitter

func (self *GameObjectFactory) Emitter() *ParticlesArcadeEmitter

Emitter Create a new Emitter.

A particle emitter can be used for one-time explosions or for continuous effects like rain and fire. All it really does is launch Particle objects out at set intervals, and fixes their positions and velocities accordingly.

func (*GameObjectFactory) Emitter1O

func (self *GameObjectFactory) Emitter1O(x int) *ParticlesArcadeEmitter

Emitter1O Create a new Emitter.

A particle emitter can be used for one-time explosions or for continuous effects like rain and fire. All it really does is launch Particle objects out at set intervals, and fixes their positions and velocities accordingly.

func (*GameObjectFactory) Emitter2O

func (self *GameObjectFactory) Emitter2O(x int, y int) *ParticlesArcadeEmitter

Emitter2O Create a new Emitter.

A particle emitter can be used for one-time explosions or for continuous effects like rain and fire. All it really does is launch Particle objects out at set intervals, and fixes their positions and velocities accordingly.

func (*GameObjectFactory) Emitter3O

func (self *GameObjectFactory) Emitter3O(x int, y int, maxParticles int) *ParticlesArcadeEmitter

Emitter3O Create a new Emitter.

A particle emitter can be used for one-time explosions or for continuous effects like rain and fire. All it really does is launch Particle objects out at set intervals, and fixes their positions and velocities accordingly.

func (*GameObjectFactory) EmitterI

func (self *GameObjectFactory) EmitterI(args ...interface{}) *ParticlesArcadeEmitter

EmitterI Create a new Emitter.

A particle emitter can be used for one-time explosions or for continuous effects like rain and fire. All it really does is launch Particle objects out at set intervals, and fixes their positions and velocities accordingly.

func (*GameObjectFactory) Existing

func (self *GameObjectFactory) Existing(object interface{}) interface{}

Existing Adds an existing display object to the game world.

func (*GameObjectFactory) ExistingI

func (self *GameObjectFactory) ExistingI(args ...interface{}) interface{}

ExistingI Adds an existing display object to the game world.

func (*GameObjectFactory) Filter

func (self *GameObjectFactory) Filter(filter string, args interface{}) *Filter

Filter A WebGL shader/filter that can be applied to Sprites.

func (*GameObjectFactory) FilterI

func (self *GameObjectFactory) FilterI(args ...interface{}) *Filter

FilterI A WebGL shader/filter that can be applied to Sprites.

func (*GameObjectFactory) Game

func (self *GameObjectFactory) Game() *Game

Game A reference to the currently running Game.

func (*GameObjectFactory) Graphics

func (self *GameObjectFactory) Graphics() *Graphics

Graphics Creates a new Graphics object.

func (*GameObjectFactory) Graphics1O

func (self *GameObjectFactory) Graphics1O(x int) *Graphics

Graphics1O Creates a new Graphics object.

func (*GameObjectFactory) Graphics2O

func (self *GameObjectFactory) Graphics2O(x int, y int) *Graphics

Graphics2O Creates a new Graphics object.

func (*GameObjectFactory) Graphics3O

func (self *GameObjectFactory) Graphics3O(x int, y int, group *Group) *Graphics

Graphics3O Creates a new Graphics object.

func (*GameObjectFactory) GraphicsI

func (self *GameObjectFactory) GraphicsI(args ...interface{}) *Graphics

GraphicsI Creates a new Graphics object.

func (*GameObjectFactory) Group

func (self *GameObjectFactory) Group() *Group

Group A Group is a container for display objects that allows for fast pooling, recycling and collision checks.

func (*GameObjectFactory) Group1O

func (self *GameObjectFactory) Group1O(parent interface{}) *Group

Group1O A Group is a container for display objects that allows for fast pooling, recycling and collision checks.

func (*GameObjectFactory) Group2O

func (self *GameObjectFactory) Group2O(parent interface{}, name string) *Group

Group2O A Group is a container for display objects that allows for fast pooling, recycling and collision checks.

func (*GameObjectFactory) Group3O

func (self *GameObjectFactory) Group3O(parent interface{}, name string, addToStage bool) *Group

Group3O A Group is a container for display objects that allows for fast pooling, recycling and collision checks.

func (*GameObjectFactory) Group4O

func (self *GameObjectFactory) Group4O(parent interface{}, name string, addToStage bool, enableBody bool) *Group

Group4O A Group is a container for display objects that allows for fast pooling, recycling and collision checks.

func (*GameObjectFactory) Group5O

func (self *GameObjectFactory) Group5O(parent interface{}, name string, addToStage bool, enableBody bool, physicsBodyType int) *Group

Group5O A Group is a container for display objects that allows for fast pooling, recycling and collision checks.

func (*GameObjectFactory) GroupI

func (self *GameObjectFactory) GroupI(args ...interface{}) *Group

GroupI A Group is a container for display objects that allows for fast pooling, recycling and collision checks.

func (*GameObjectFactory) Image

func (self *GameObjectFactory) Image() *Image

Image Create a new `Image` object.

An Image is a light-weight object you can use to display anything that doesn't need physics or animation.

It can still rotate, scale, crop and receive input events. This makes it perfect for logos, backgrounds, simple buttons and other non-Sprite graphics.

func (*GameObjectFactory) Image1O

func (self *GameObjectFactory) Image1O(x int) *Image

Image1O Create a new `Image` object.

An Image is a light-weight object you can use to display anything that doesn't need physics or animation.

It can still rotate, scale, crop and receive input events. This makes it perfect for logos, backgrounds, simple buttons and other non-Sprite graphics.

func (*GameObjectFactory) Image2O

func (self *GameObjectFactory) Image2O(x int, y int) *Image

Image2O Create a new `Image` object.

An Image is a light-weight object you can use to display anything that doesn't need physics or animation.

It can still rotate, scale, crop and receive input events. This makes it perfect for logos, backgrounds, simple buttons and other non-Sprite graphics.

func (*GameObjectFactory) Image3O

func (self *GameObjectFactory) Image3O(x int, y int, key interface{}) *Image

Image3O Create a new `Image` object.

An Image is a light-weight object you can use to display anything that doesn't need physics or animation.

It can still rotate, scale, crop and receive input events. This makes it perfect for logos, backgrounds, simple buttons and other non-Sprite graphics.

func (*GameObjectFactory) Image4O

func (self *GameObjectFactory) Image4O(x int, y int, key interface{}, frame interface{}) *Image

Image4O Create a new `Image` object.

An Image is a light-weight object you can use to display anything that doesn't need physics or animation.

It can still rotate, scale, crop and receive input events. This makes it perfect for logos, backgrounds, simple buttons and other non-Sprite graphics.

func (*GameObjectFactory) Image5O

func (self *GameObjectFactory) Image5O(x int, y int, key interface{}, frame interface{}, group *Group) *Image

Image5O Create a new `Image` object.

An Image is a light-weight object you can use to display anything that doesn't need physics or animation.

It can still rotate, scale, crop and receive input events. This makes it perfect for logos, backgrounds, simple buttons and other non-Sprite graphics.

func (*GameObjectFactory) ImageI

func (self *GameObjectFactory) ImageI(args ...interface{}) *Image

ImageI Create a new `Image` object.

An Image is a light-weight object you can use to display anything that doesn't need physics or animation.

It can still rotate, scale, crop and receive input events. This makes it perfect for logos, backgrounds, simple buttons and other non-Sprite graphics.

func (*GameObjectFactory) PhysicsGroup

func (self *GameObjectFactory) PhysicsGroup() *Group

PhysicsGroup A Group is a container for display objects that allows for fast pooling, recycling and collision checks.

A Physics Group is the same as an ordinary Group except that is has enableBody turned on by default, so any Sprites it creates are automatically given a physics body.

func (*GameObjectFactory) PhysicsGroup1O

func (self *GameObjectFactory) PhysicsGroup1O(physicsBodyType int) *Group

PhysicsGroup1O A Group is a container for display objects that allows for fast pooling, recycling and collision checks.

A Physics Group is the same as an ordinary Group except that is has enableBody turned on by default, so any Sprites it creates are automatically given a physics body.

func (*GameObjectFactory) PhysicsGroup2O

func (self *GameObjectFactory) PhysicsGroup2O(physicsBodyType int, parent interface{}) *Group

PhysicsGroup2O A Group is a container for display objects that allows for fast pooling, recycling and collision checks.

A Physics Group is the same as an ordinary Group except that is has enableBody turned on by default, so any Sprites it creates are automatically given a physics body.

func (*GameObjectFactory) PhysicsGroup3O

func (self *GameObjectFactory) PhysicsGroup3O(physicsBodyType int, parent interface{}, name string) *Group

PhysicsGroup3O A Group is a container for display objects that allows for fast pooling, recycling and collision checks.

A Physics Group is the same as an ordinary Group except that is has enableBody turned on by default, so any Sprites it creates are automatically given a physics body.

func (*GameObjectFactory) PhysicsGroup4O

func (self *GameObjectFactory) PhysicsGroup4O(physicsBodyType int, parent interface{}, name string, addToStage bool) *Group

PhysicsGroup4O A Group is a container for display objects that allows for fast pooling, recycling and collision checks.

A Physics Group is the same as an ordinary Group except that is has enableBody turned on by default, so any Sprites it creates are automatically given a physics body.

func (*GameObjectFactory) PhysicsGroupI

func (self *GameObjectFactory) PhysicsGroupI(args ...interface{}) *Group

PhysicsGroupI A Group is a container for display objects that allows for fast pooling, recycling and collision checks.

A Physics Group is the same as an ordinary Group except that is has enableBody turned on by default, so any Sprites it creates are automatically given a physics body.

func (*GameObjectFactory) Plugin

func (self *GameObjectFactory) Plugin(plugin interface{}, parameter interface{}) *Plugin

Plugin Add a new Plugin into the PluginManager.

The Plugin must have 2 properties: `game` and `parent`. Plugin.game is set to the game reference the PluginManager uses, and parent is set to the PluginManager.

func (*GameObjectFactory) PluginI

func (self *GameObjectFactory) PluginI(args ...interface{}) *Plugin

PluginI Add a new Plugin into the PluginManager.

The Plugin must have 2 properties: `game` and `parent`. Plugin.game is set to the game reference the PluginManager uses, and parent is set to the PluginManager.

func (*GameObjectFactory) RenderTexture

func (self *GameObjectFactory) RenderTexture() *RenderTexture

RenderTexture A dynamic initially blank canvas to which images can be drawn.

func (*GameObjectFactory) RenderTexture1O

func (self *GameObjectFactory) RenderTexture1O(width int) *RenderTexture

RenderTexture1O A dynamic initially blank canvas to which images can be drawn.

func (*GameObjectFactory) RenderTexture2O

func (self *GameObjectFactory) RenderTexture2O(width int, height int) *RenderTexture

RenderTexture2O A dynamic initially blank canvas to which images can be drawn.

func (*GameObjectFactory) RenderTexture3O

func (self *GameObjectFactory) RenderTexture3O(width int, height int, key string) *RenderTexture

RenderTexture3O A dynamic initially blank canvas to which images can be drawn.

func (*GameObjectFactory) RenderTexture4O

func (self *GameObjectFactory) RenderTexture4O(width int, height int, key string, addToCache bool) *RenderTexture

RenderTexture4O A dynamic initially blank canvas to which images can be drawn.

func (*GameObjectFactory) RenderTextureI

func (self *GameObjectFactory) RenderTextureI(args ...interface{}) *RenderTexture

RenderTextureI A dynamic initially blank canvas to which images can be drawn.

func (*GameObjectFactory) RetroFont

func (self *GameObjectFactory) RetroFont(font string, characterWidth int, characterHeight int, chars string, charsPerRow int) *RetroFont

RetroFont Create a new RetroFont object.

A RetroFont can be used as a texture for an Image or Sprite and optionally add it to the Cache. A RetroFont uses a bitmap which contains fixed with characters for the font set. You use character spacing to define the set. If you need variable width character support then use a BitmapText object instead. The main difference between a RetroFont and a BitmapText is that a RetroFont creates a single texture that you can apply to a game object, where-as a BitmapText creates one Sprite object per letter of text. The texture can be asssigned or one or multiple images/sprites, but note that the text the RetroFont uses will be shared across them all, i.e. if you need each Image to have different text in it, then you need to create multiple RetroFont objects.

func (*GameObjectFactory) RetroFont1O

func (self *GameObjectFactory) RetroFont1O(font string, characterWidth int, characterHeight int, chars string, charsPerRow int, xSpacing int) *RetroFont

RetroFont1O Create a new RetroFont object.

A RetroFont can be used as a texture for an Image or Sprite and optionally add it to the Cache. A RetroFont uses a bitmap which contains fixed with characters for the font set. You use character spacing to define the set. If you need variable width character support then use a BitmapText object instead. The main difference between a RetroFont and a BitmapText is that a RetroFont creates a single texture that you can apply to a game object, where-as a BitmapText creates one Sprite object per letter of text. The texture can be asssigned or one or multiple images/sprites, but note that the text the RetroFont uses will be shared across them all, i.e. if you need each Image to have different text in it, then you need to create multiple RetroFont objects.

func (*GameObjectFactory) RetroFont2O

func (self *GameObjectFactory) RetroFont2O(font string, characterWidth int, characterHeight int, chars string, charsPerRow int, xSpacing int, ySpacing int) *RetroFont

RetroFont2O Create a new RetroFont object.

A RetroFont can be used as a texture for an Image or Sprite and optionally add it to the Cache. A RetroFont uses a bitmap which contains fixed with characters for the font set. You use character spacing to define the set. If you need variable width character support then use a BitmapText object instead. The main difference between a RetroFont and a BitmapText is that a RetroFont creates a single texture that you can apply to a game object, where-as a BitmapText creates one Sprite object per letter of text. The texture can be asssigned or one or multiple images/sprites, but note that the text the RetroFont uses will be shared across them all, i.e. if you need each Image to have different text in it, then you need to create multiple RetroFont objects.

func (*GameObjectFactory) RetroFont3O

func (self *GameObjectFactory) RetroFont3O(font string, characterWidth int, characterHeight int, chars string, charsPerRow int, xSpacing int, ySpacing int, xOffset int) *RetroFont

RetroFont3O Create a new RetroFont object.

A RetroFont can be used as a texture for an Image or Sprite and optionally add it to the Cache. A RetroFont uses a bitmap which contains fixed with characters for the font set. You use character spacing to define the set. If you need variable width character support then use a BitmapText object instead. The main difference between a RetroFont and a BitmapText is that a RetroFont creates a single texture that you can apply to a game object, where-as a BitmapText creates one Sprite object per letter of text. The texture can be asssigned or one or multiple images/sprites, but note that the text the RetroFont uses will be shared across them all, i.e. if you need each Image to have different text in it, then you need to create multiple RetroFont objects.

func (*GameObjectFactory) RetroFont4O

func (self *GameObjectFactory) RetroFont4O(font string, characterWidth int, characterHeight int, chars string, charsPerRow int, xSpacing int, ySpacing int, xOffset int, yOffset int) *RetroFont

RetroFont4O Create a new RetroFont object.

A RetroFont can be used as a texture for an Image or Sprite and optionally add it to the Cache. A RetroFont uses a bitmap which contains fixed with characters for the font set. You use character spacing to define the set. If you need variable width character support then use a BitmapText object instead. The main difference between a RetroFont and a BitmapText is that a RetroFont creates a single texture that you can apply to a game object, where-as a BitmapText creates one Sprite object per letter of text. The texture can be asssigned or one or multiple images/sprites, but note that the text the RetroFont uses will be shared across them all, i.e. if you need each Image to have different text in it, then you need to create multiple RetroFont objects.

func (*GameObjectFactory) RetroFontI

func (self *GameObjectFactory) RetroFontI(args ...interface{}) *RetroFont

RetroFontI Create a new RetroFont object.

A RetroFont can be used as a texture for an Image or Sprite and optionally add it to the Cache. A RetroFont uses a bitmap which contains fixed with characters for the font set. You use character spacing to define the set. If you need variable width character support then use a BitmapText object instead. The main difference between a RetroFont and a BitmapText is that a RetroFont creates a single texture that you can apply to a game object, where-as a BitmapText creates one Sprite object per letter of text. The texture can be asssigned or one or multiple images/sprites, but note that the text the RetroFont uses will be shared across them all, i.e. if you need each Image to have different text in it, then you need to create multiple RetroFont objects.

func (*GameObjectFactory) Rope

func (self *GameObjectFactory) Rope(x int, y int, key interface{}, frame interface{}, points []interface{}) *Rope

Rope Creates a new Rope object.

Example usage: https://github.com/codevinsky/phaser-rope-demo/blob/master/dist/demo.js

func (*GameObjectFactory) Rope1O

func (self *GameObjectFactory) Rope1O(x int, y int, key interface{}, frame interface{}, points []interface{}, group *Group) *Rope

Rope1O Creates a new Rope object.

Example usage: https://github.com/codevinsky/phaser-rope-demo/blob/master/dist/demo.js

func (*GameObjectFactory) RopeI

func (self *GameObjectFactory) RopeI(args ...interface{}) *Rope

RopeI Creates a new Rope object.

Example usage: https://github.com/codevinsky/phaser-rope-demo/blob/master/dist/demo.js

func (*GameObjectFactory) SetGameA

func (self *GameObjectFactory) SetGameA(member *Game)

SetGameA A reference to the currently running Game.

func (*GameObjectFactory) SetWorldA

func (self *GameObjectFactory) SetWorldA(member *World)

SetWorldA A reference to the game world.

func (*GameObjectFactory) Sound

func (self *GameObjectFactory) Sound(key string) *Sound

Sound Creates a new Sound object.

func (*GameObjectFactory) Sound1O

func (self *GameObjectFactory) Sound1O(key string, volume int) *Sound

Sound1O Creates a new Sound object.

func (*GameObjectFactory) Sound2O

func (self *GameObjectFactory) Sound2O(key string, volume int, loop bool) *Sound

Sound2O Creates a new Sound object.

func (*GameObjectFactory) Sound3O

func (self *GameObjectFactory) Sound3O(key string, volume int, loop bool, connect bool) *Sound

Sound3O Creates a new Sound object.

func (*GameObjectFactory) SoundI

func (self *GameObjectFactory) SoundI(args ...interface{}) *Sound

SoundI Creates a new Sound object.

func (*GameObjectFactory) Sprite

func (self *GameObjectFactory) Sprite() *Sprite

Sprite Create a new Sprite with specific position and sprite sheet key.

At its most basic a Sprite consists of a set of coordinates and a texture that is used when rendered. They also contain additional properties allowing for physics motion (via Sprite.body), input handling (via Sprite.input), events (via Sprite.events), animation (via Sprite.animations), camera culling and more. Please see the Examples for use cases.

func (*GameObjectFactory) Sprite1O

func (self *GameObjectFactory) Sprite1O(x int) *Sprite

Sprite1O Create a new Sprite with specific position and sprite sheet key.

At its most basic a Sprite consists of a set of coordinates and a texture that is used when rendered. They also contain additional properties allowing for physics motion (via Sprite.body), input handling (via Sprite.input), events (via Sprite.events), animation (via Sprite.animations), camera culling and more. Please see the Examples for use cases.

func (*GameObjectFactory) Sprite2O

func (self *GameObjectFactory) Sprite2O(x int, y int) *Sprite

Sprite2O Create a new Sprite with specific position and sprite sheet key.

At its most basic a Sprite consists of a set of coordinates and a texture that is used when rendered. They also contain additional properties allowing for physics motion (via Sprite.body), input handling (via Sprite.input), events (via Sprite.events), animation (via Sprite.animations), camera culling and more. Please see the Examples for use cases.

func (*GameObjectFactory) Sprite3O

func (self *GameObjectFactory) Sprite3O(x int, y int, key interface{}) *Sprite

Sprite3O Create a new Sprite with specific position and sprite sheet key.

At its most basic a Sprite consists of a set of coordinates and a texture that is used when rendered. They also contain additional properties allowing for physics motion (via Sprite.body), input handling (via Sprite.input), events (via Sprite.events), animation (via Sprite.animations), camera culling and more. Please see the Examples for use cases.

func (*GameObjectFactory) Sprite4O

func (self *GameObjectFactory) Sprite4O(x int, y int, key interface{}, frame interface{}) *Sprite

Sprite4O Create a new Sprite with specific position and sprite sheet key.

At its most basic a Sprite consists of a set of coordinates and a texture that is used when rendered. They also contain additional properties allowing for physics motion (via Sprite.body), input handling (via Sprite.input), events (via Sprite.events), animation (via Sprite.animations), camera culling and more. Please see the Examples for use cases.

func (*GameObjectFactory) Sprite5O

func (self *GameObjectFactory) Sprite5O(x int, y int, key interface{}, frame interface{}, group *Group) *Sprite

Sprite5O Create a new Sprite with specific position and sprite sheet key.

At its most basic a Sprite consists of a set of coordinates and a texture that is used when rendered. They also contain additional properties allowing for physics motion (via Sprite.body), input handling (via Sprite.input), events (via Sprite.events), animation (via Sprite.animations), camera culling and more. Please see the Examples for use cases.

func (*GameObjectFactory) SpriteBatch

func (self *GameObjectFactory) SpriteBatch(parent interface{}) *SpriteBatch

SpriteBatch A SpriteBatch is a really fast version of a Phaser Group built solely for speed. Use when you need a lot of sprites or particles all sharing the same texture. The speed gains are specifically for WebGL. In Canvas mode you won't see any real difference.

func (*GameObjectFactory) SpriteBatch1O

func (self *GameObjectFactory) SpriteBatch1O(parent interface{}, name string) *SpriteBatch

SpriteBatch1O A SpriteBatch is a really fast version of a Phaser Group built solely for speed. Use when you need a lot of sprites or particles all sharing the same texture. The speed gains are specifically for WebGL. In Canvas mode you won't see any real difference.

func (*GameObjectFactory) SpriteBatch2O

func (self *GameObjectFactory) SpriteBatch2O(parent interface{}, name string, addToStage bool) *SpriteBatch

SpriteBatch2O A SpriteBatch is a really fast version of a Phaser Group built solely for speed. Use when you need a lot of sprites or particles all sharing the same texture. The speed gains are specifically for WebGL. In Canvas mode you won't see any real difference.

func (*GameObjectFactory) SpriteBatchI

func (self *GameObjectFactory) SpriteBatchI(args ...interface{}) *SpriteBatch

SpriteBatchI A SpriteBatch is a really fast version of a Phaser Group built solely for speed. Use when you need a lot of sprites or particles all sharing the same texture. The speed gains are specifically for WebGL. In Canvas mode you won't see any real difference.

func (*GameObjectFactory) SpriteI

func (self *GameObjectFactory) SpriteI(args ...interface{}) *Sprite

SpriteI Create a new Sprite with specific position and sprite sheet key.

At its most basic a Sprite consists of a set of coordinates and a texture that is used when rendered. They also contain additional properties allowing for physics motion (via Sprite.body), input handling (via Sprite.input), events (via Sprite.events), animation (via Sprite.animations), camera culling and more. Please see the Examples for use cases.

func (*GameObjectFactory) Text

func (self *GameObjectFactory) Text() *Text

Text Creates a new Text object.

func (*GameObjectFactory) Text1O

func (self *GameObjectFactory) Text1O(x int) *Text

Text1O Creates a new Text object.

func (*GameObjectFactory) Text2O

func (self *GameObjectFactory) Text2O(x int, y int) *Text

Text2O Creates a new Text object.

func (*GameObjectFactory) Text3O

func (self *GameObjectFactory) Text3O(x int, y int, text string) *Text

Text3O Creates a new Text object.

func (*GameObjectFactory) Text4O

func (self *GameObjectFactory) Text4O(x int, y int, text string, style interface{}) *Text

Text4O Creates a new Text object.

func (*GameObjectFactory) Text5O

func (self *GameObjectFactory) Text5O(x int, y int, text string, style interface{}, group *Group) *Text

Text5O Creates a new Text object.

func (*GameObjectFactory) TextI

func (self *GameObjectFactory) TextI(args ...interface{}) *Text

TextI Creates a new Text object.

func (*GameObjectFactory) TileSprite

func (self *GameObjectFactory) TileSprite(x int, y int, width int, height int, key interface{}) *TileSprite

TileSprite Creates a new TileSprite object.

func (*GameObjectFactory) TileSprite1O

func (self *GameObjectFactory) TileSprite1O(x int, y int, width int, height int, key interface{}, frame interface{}) *TileSprite

TileSprite1O Creates a new TileSprite object.

func (*GameObjectFactory) TileSprite2O

func (self *GameObjectFactory) TileSprite2O(x int, y int, width int, height int, key interface{}, frame interface{}, group *Group) *TileSprite

TileSprite2O Creates a new TileSprite object.

func (*GameObjectFactory) TileSpriteI

func (self *GameObjectFactory) TileSpriteI(args ...interface{}) *TileSprite

TileSpriteI Creates a new TileSprite object.

func (*GameObjectFactory) Tilemap

func (self *GameObjectFactory) Tilemap() *Tilemap

Tilemap Creates a new Phaser.Tilemap object.

The map can either be populated with data from a Tiled JSON file or from a CSV file. To do this pass the Cache key as the first parameter. When using Tiled data you need only provide the key. When using CSV data you must provide the key and the tileWidth and tileHeight parameters. If creating a blank tilemap to be populated later, you can either specify no parameters at all and then use `Tilemap.create` or pass the map and tile dimensions here. Note that all Tilemaps use a base tile size to calculate dimensions from, but that a TilemapLayer may have its own unique tile size that overrides it.

func (*GameObjectFactory) Tilemap1O

func (self *GameObjectFactory) Tilemap1O(key string) *Tilemap

Tilemap1O Creates a new Phaser.Tilemap object.

The map can either be populated with data from a Tiled JSON file or from a CSV file. To do this pass the Cache key as the first parameter. When using Tiled data you need only provide the key. When using CSV data you must provide the key and the tileWidth and tileHeight parameters. If creating a blank tilemap to be populated later, you can either specify no parameters at all and then use `Tilemap.create` or pass the map and tile dimensions here. Note that all Tilemaps use a base tile size to calculate dimensions from, but that a TilemapLayer may have its own unique tile size that overrides it.

func (*GameObjectFactory) Tilemap2O

func (self *GameObjectFactory) Tilemap2O(key string, tileWidth int) *Tilemap

Tilemap2O Creates a new Phaser.Tilemap object.

The map can either be populated with data from a Tiled JSON file or from a CSV file. To do this pass the Cache key as the first parameter. When using Tiled data you need only provide the key. When using CSV data you must provide the key and the tileWidth and tileHeight parameters. If creating a blank tilemap to be populated later, you can either specify no parameters at all and then use `Tilemap.create` or pass the map and tile dimensions here. Note that all Tilemaps use a base tile size to calculate dimensions from, but that a TilemapLayer may have its own unique tile size that overrides it.

func (*GameObjectFactory) Tilemap3O

func (self *GameObjectFactory) Tilemap3O(key string, tileWidth int, tileHeight int) *Tilemap

Tilemap3O Creates a new Phaser.Tilemap object.

The map can either be populated with data from a Tiled JSON file or from a CSV file. To do this pass the Cache key as the first parameter. When using Tiled data you need only provide the key. When using CSV data you must provide the key and the tileWidth and tileHeight parameters. If creating a blank tilemap to be populated later, you can either specify no parameters at all and then use `Tilemap.create` or pass the map and tile dimensions here. Note that all Tilemaps use a base tile size to calculate dimensions from, but that a TilemapLayer may have its own unique tile size that overrides it.

func (*GameObjectFactory) Tilemap4O

func (self *GameObjectFactory) Tilemap4O(key string, tileWidth int, tileHeight int, width int) *Tilemap

Tilemap4O Creates a new Phaser.Tilemap object.

The map can either be populated with data from a Tiled JSON file or from a CSV file. To do this pass the Cache key as the first parameter. When using Tiled data you need only provide the key. When using CSV data you must provide the key and the tileWidth and tileHeight parameters. If creating a blank tilemap to be populated later, you can either specify no parameters at all and then use `Tilemap.create` or pass the map and tile dimensions here. Note that all Tilemaps use a base tile size to calculate dimensions from, but that a TilemapLayer may have its own unique tile size that overrides it.

func (*GameObjectFactory) Tilemap5O

func (self *GameObjectFactory) Tilemap5O(key string, tileWidth int, tileHeight int, width int, height int) *Tilemap

Tilemap5O Creates a new Phaser.Tilemap object.

The map can either be populated with data from a Tiled JSON file or from a CSV file. To do this pass the Cache key as the first parameter. When using Tiled data you need only provide the key. When using CSV data you must provide the key and the tileWidth and tileHeight parameters. If creating a blank tilemap to be populated later, you can either specify no parameters at all and then use `Tilemap.create` or pass the map and tile dimensions here. Note that all Tilemaps use a base tile size to calculate dimensions from, but that a TilemapLayer may have its own unique tile size that overrides it.

func (*GameObjectFactory) TilemapI

func (self *GameObjectFactory) TilemapI(args ...interface{}) *Tilemap

TilemapI Creates a new Phaser.Tilemap object.

The map can either be populated with data from a Tiled JSON file or from a CSV file. To do this pass the Cache key as the first parameter. When using Tiled data you need only provide the key. When using CSV data you must provide the key and the tileWidth and tileHeight parameters. If creating a blank tilemap to be populated later, you can either specify no parameters at all and then use `Tilemap.create` or pass the map and tile dimensions here. Note that all Tilemaps use a base tile size to calculate dimensions from, but that a TilemapLayer may have its own unique tile size that overrides it.

func (*GameObjectFactory) Tween

func (self *GameObjectFactory) Tween(object interface{}) *Tween

Tween Create a tween on a specific object.

The object can be any JavaScript object or Phaser object such as Sprite.

func (*GameObjectFactory) TweenI

func (self *GameObjectFactory) TweenI(args ...interface{}) *Tween

TweenI Create a tween on a specific object.

The object can be any JavaScript object or Phaser object such as Sprite.

func (*GameObjectFactory) Video

func (self *GameObjectFactory) Video() *Video

Video Create a Video object.

This will return a Phaser.Video object which you can pass to a Sprite to be used as a texture.

func (*GameObjectFactory) Video1O

func (self *GameObjectFactory) Video1O(key interface{}) *Video

Video1O Create a Video object.

This will return a Phaser.Video object which you can pass to a Sprite to be used as a texture.

func (*GameObjectFactory) Video2O

func (self *GameObjectFactory) Video2O(key interface{}, url interface{}) *Video

Video2O Create a Video object.

This will return a Phaser.Video object which you can pass to a Sprite to be used as a texture.

func (*GameObjectFactory) VideoI

func (self *GameObjectFactory) VideoI(args ...interface{}) *Video

VideoI Create a Video object.

This will return a Phaser.Video object which you can pass to a Sprite to be used as a texture.

func (*GameObjectFactory) Weapon

func (self *GameObjectFactory) Weapon() *Weapon

Weapon Weapons provide the ability to easily create a bullet pool and manager.

Weapons fire Phaser.Bullet objects, which are essentially Sprites with a few extra properties. The Bullets are enabled for Arcade Physics. They do not currently work with P2 Physics.

The Bullets are created inside of `Weapon.bullets`, which is a Phaser.Group instance. Anything you can usually do with a Group, such as move it around the display list, iterate it, etc can be done to the bullets Group too.

Bullets can have textures and even animations. You can control the speed at which they are fired, the firing rate, the firing angle, and even set things like gravity for them.

func (*GameObjectFactory) Weapon1O

func (self *GameObjectFactory) Weapon1O(quantity int) *Weapon

Weapon1O Weapons provide the ability to easily create a bullet pool and manager.

Weapons fire Phaser.Bullet objects, which are essentially Sprites with a few extra properties. The Bullets are enabled for Arcade Physics. They do not currently work with P2 Physics.

The Bullets are created inside of `Weapon.bullets`, which is a Phaser.Group instance. Anything you can usually do with a Group, such as move it around the display list, iterate it, etc can be done to the bullets Group too.

Bullets can have textures and even animations. You can control the speed at which they are fired, the firing rate, the firing angle, and even set things like gravity for them.

func (*GameObjectFactory) Weapon2O

func (self *GameObjectFactory) Weapon2O(quantity int, key interface{}) *Weapon

Weapon2O Weapons provide the ability to easily create a bullet pool and manager.

Weapons fire Phaser.Bullet objects, which are essentially Sprites with a few extra properties. The Bullets are enabled for Arcade Physics. They do not currently work with P2 Physics.

The Bullets are created inside of `Weapon.bullets`, which is a Phaser.Group instance. Anything you can usually do with a Group, such as move it around the display list, iterate it, etc can be done to the bullets Group too.

Bullets can have textures and even animations. You can control the speed at which they are fired, the firing rate, the firing angle, and even set things like gravity for them.

func (*GameObjectFactory) Weapon3O

func (self *GameObjectFactory) Weapon3O(quantity int, key interface{}, frame interface{}) *Weapon

Weapon3O Weapons provide the ability to easily create a bullet pool and manager.

Weapons fire Phaser.Bullet objects, which are essentially Sprites with a few extra properties. The Bullets are enabled for Arcade Physics. They do not currently work with P2 Physics.

The Bullets are created inside of `Weapon.bullets`, which is a Phaser.Group instance. Anything you can usually do with a Group, such as move it around the display list, iterate it, etc can be done to the bullets Group too.

Bullets can have textures and even animations. You can control the speed at which they are fired, the firing rate, the firing angle, and even set things like gravity for them.

func (*GameObjectFactory) Weapon4O

func (self *GameObjectFactory) Weapon4O(quantity int, key interface{}, frame interface{}, group *Group) *Weapon

Weapon4O Weapons provide the ability to easily create a bullet pool and manager.

Weapons fire Phaser.Bullet objects, which are essentially Sprites with a few extra properties. The Bullets are enabled for Arcade Physics. They do not currently work with P2 Physics.

The Bullets are created inside of `Weapon.bullets`, which is a Phaser.Group instance. Anything you can usually do with a Group, such as move it around the display list, iterate it, etc can be done to the bullets Group too.

Bullets can have textures and even animations. You can control the speed at which they are fired, the firing rate, the firing angle, and even set things like gravity for them.

func (*GameObjectFactory) WeaponI

func (self *GameObjectFactory) WeaponI(args ...interface{}) *Weapon

WeaponI Weapons provide the ability to easily create a bullet pool and manager.

Weapons fire Phaser.Bullet objects, which are essentially Sprites with a few extra properties. The Bullets are enabled for Arcade Physics. They do not currently work with P2 Physics.

The Bullets are created inside of `Weapon.bullets`, which is a Phaser.Group instance. Anything you can usually do with a Group, such as move it around the display list, iterate it, etc can be done to the bullets Group too.

Bullets can have textures and even animations. You can control the speed at which they are fired, the firing rate, the firing angle, and even set things like gravity for them.

func (*GameObjectFactory) World

func (self *GameObjectFactory) World() *World

World A reference to the game world.

type Gamepad

type Gamepad struct {
	*js.Object
}

Gamepad The Gamepad class handles gamepad input and dispatches gamepad events.

Remember to call `gamepad.start()`.

HTML5 GAMEPAD API SUPPORT IS AT AN EXPERIMENTAL STAGE! At moment of writing this (end of 2013) only Chrome supports parts of it out of the box. Firefox supports it via prefs flags (about:config, search gamepad). The browsers map the same controllers differently. This class has constants for Windows 7 Chrome mapping of XBOX 360 controller.

func NewGamepad

func NewGamepad(game *Game) *Gamepad

NewGamepad The Gamepad class handles gamepad input and dispatches gamepad events.

Remember to call `gamepad.start()`.

HTML5 GAMEPAD API SUPPORT IS AT AN EXPERIMENTAL STAGE! At moment of writing this (end of 2013) only Chrome supports parts of it out of the box. Firefox supports it via prefs flags (about:config, search gamepad). The browsers map the same controllers differently. This class has constants for Windows 7 Chrome mapping of XBOX 360 controller.

func NewGamepadI

func NewGamepadI(args ...interface{}) *Gamepad

NewGamepadI The Gamepad class handles gamepad input and dispatches gamepad events.

Remember to call `gamepad.start()`.

HTML5 GAMEPAD API SUPPORT IS AT AN EXPERIMENTAL STAGE! At moment of writing this (end of 2013) only Chrome supports parts of it out of the box. Firefox supports it via prefs flags (about:config, search gamepad). The browsers map the same controllers differently. This class has constants for Windows 7 Chrome mapping of XBOX 360 controller.

func ToGamepad

func ToGamepad(jsStruct interface{}) *Gamepad

Gamepad Binding conversion method to Gamepad point

func (*Gamepad) Active

func (self *Gamepad) Active() bool

Active If the gamepad input is active or not - if not active it should not be updated from Input.js

func (*Gamepad) AddCallbacks

func (self *Gamepad) AddCallbacks(context interface{}, callbacks interface{})

AddCallbacks Add callbacks to the main Gamepad handler to handle connect/disconnect/button down/button up/axis change/float value buttons.

func (*Gamepad) AddCallbacksI

func (self *Gamepad) AddCallbacksI(args ...interface{})

AddCallbacksI Add callbacks to the main Gamepad handler to handle connect/disconnect/button down/button up/axis change/float value buttons.

func (*Gamepad) CallbackContext

func (self *Gamepad) CallbackContext() interface{}

CallbackContext The context under which the callbacks are run.

func (*Gamepad) Destroy

func (self *Gamepad) Destroy()

Destroy Destroys this object and the associated event listeners.

func (*Gamepad) DestroyI

func (self *Gamepad) DestroyI(args ...interface{})

DestroyI Destroys this object and the associated event listeners.

func (*Gamepad) Enabled

func (self *Gamepad) Enabled() bool

Enabled Gamepad input will only be processed if enabled.

func (*Gamepad) Game

func (self *Gamepad) Game() *Game

Game Local reference to game.

func (*Gamepad) IsDown

func (self *Gamepad) IsDown(buttonCode int) bool

IsDown Returns true if the button is currently pressed down, on ANY gamepad.

func (*Gamepad) IsDownI

func (self *Gamepad) IsDownI(args ...interface{}) bool

IsDownI Returns true if the button is currently pressed down, on ANY gamepad.

func (*Gamepad) JustPressed

func (self *Gamepad) JustPressed(buttonCode int) bool

JustPressed Returns the "just pressed" state of a button from ANY gamepad connected. Just pressed is considered true if the button was pressed down within the duration given (default 250ms).

func (*Gamepad) JustPressed1O

func (self *Gamepad) JustPressed1O(buttonCode int, duration int) bool

JustPressed1O Returns the "just pressed" state of a button from ANY gamepad connected. Just pressed is considered true if the button was pressed down within the duration given (default 250ms).

func (*Gamepad) JustPressedI

func (self *Gamepad) JustPressedI(args ...interface{}) bool

JustPressedI Returns the "just pressed" state of a button from ANY gamepad connected. Just pressed is considered true if the button was pressed down within the duration given (default 250ms).

func (*Gamepad) OnAxisCallback

func (self *Gamepad) OnAxisCallback() interface{}

OnAxisCallback This callback is invoked every time any gamepad axis is changed.

func (*Gamepad) OnConnectCallback

func (self *Gamepad) OnConnectCallback() interface{}

OnConnectCallback This callback is invoked every time any gamepad is connected

func (*Gamepad) OnDisconnectCallback

func (self *Gamepad) OnDisconnectCallback() interface{}

OnDisconnectCallback This callback is invoked every time any gamepad is disconnected

func (*Gamepad) OnDownCallback

func (self *Gamepad) OnDownCallback() interface{}

OnDownCallback This callback is invoked every time any gamepad button is pressed down.

func (*Gamepad) OnFloatCallback

func (self *Gamepad) OnFloatCallback() interface{}

OnFloatCallback This callback is invoked every time any gamepad button is changed to a value where value > 0 and value < 1.

func (*Gamepad) OnUpCallback

func (self *Gamepad) OnUpCallback() interface{}

OnUpCallback This callback is invoked every time any gamepad button is released.

func (*Gamepad) Pad1

func (self *Gamepad) Pad1() *SinglePad

Pad1 Gamepad #1

func (*Gamepad) Pad2

func (self *Gamepad) Pad2() *SinglePad

Pad2 Gamepad #2

func (*Gamepad) Pad3

func (self *Gamepad) Pad3() *SinglePad

Pad3 Gamepad #3

func (*Gamepad) Pad4

func (self *Gamepad) Pad4() *SinglePad

Pad4 Gamepad #4

func (*Gamepad) PadsConnected

func (self *Gamepad) PadsConnected() int

PadsConnected How many live gamepads are currently connected.

func (*Gamepad) Reset

func (self *Gamepad) Reset()

Reset Reset all buttons/axes of all gamepads

func (*Gamepad) ResetI

func (self *Gamepad) ResetI(args ...interface{})

ResetI Reset all buttons/axes of all gamepads

func (*Gamepad) SetActiveA

func (self *Gamepad) SetActiveA(member bool)

SetActiveA If the gamepad input is active or not - if not active it should not be updated from Input.js

func (*Gamepad) SetCallbackContextA

func (self *Gamepad) SetCallbackContextA(member interface{})

SetCallbackContextA The context under which the callbacks are run.

func (*Gamepad) SetDeadZones

func (self *Gamepad) SetDeadZones()

SetDeadZones Sets the deadZone variable for all four gamepads

func (*Gamepad) SetDeadZonesI

func (self *Gamepad) SetDeadZonesI(args ...interface{})

SetDeadZonesI Sets the deadZone variable for all four gamepads

func (*Gamepad) SetEnabledA

func (self *Gamepad) SetEnabledA(member bool)

SetEnabledA Gamepad input will only be processed if enabled.

func (*Gamepad) SetGameA

func (self *Gamepad) SetGameA(member *Game)

SetGameA Local reference to game.

func (*Gamepad) SetOnAxisCallbackA

func (self *Gamepad) SetOnAxisCallbackA(member interface{})

SetOnAxisCallbackA This callback is invoked every time any gamepad axis is changed.

func (*Gamepad) SetOnConnectCallbackA

func (self *Gamepad) SetOnConnectCallbackA(member interface{})

SetOnConnectCallbackA This callback is invoked every time any gamepad is connected

func (*Gamepad) SetOnDisconnectCallbackA

func (self *Gamepad) SetOnDisconnectCallbackA(member interface{})

SetOnDisconnectCallbackA This callback is invoked every time any gamepad is disconnected

func (*Gamepad) SetOnDownCallbackA

func (self *Gamepad) SetOnDownCallbackA(member interface{})

SetOnDownCallbackA This callback is invoked every time any gamepad button is pressed down.

func (*Gamepad) SetOnFloatCallbackA

func (self *Gamepad) SetOnFloatCallbackA(member interface{})

SetOnFloatCallbackA This callback is invoked every time any gamepad button is changed to a value where value > 0 and value < 1.

func (*Gamepad) SetOnUpCallbackA

func (self *Gamepad) SetOnUpCallbackA(member interface{})

SetOnUpCallbackA This callback is invoked every time any gamepad button is released.

func (*Gamepad) SetPad1A

func (self *Gamepad) SetPad1A(member *SinglePad)

SetPad1A Gamepad #1

func (*Gamepad) SetPad2A

func (self *Gamepad) SetPad2A(member *SinglePad)

SetPad2A Gamepad #2

func (*Gamepad) SetPad3A

func (self *Gamepad) SetPad3A(member *SinglePad)

SetPad3A Gamepad #3

func (*Gamepad) SetPad4A

func (self *Gamepad) SetPad4A(member *SinglePad)

SetPad4A Gamepad #4

func (*Gamepad) SetPadsConnectedA

func (self *Gamepad) SetPadsConnectedA(member int)

SetPadsConnectedA How many live gamepads are currently connected.

func (*Gamepad) SetSupportedA

func (self *Gamepad) SetSupportedA(member bool)

SetSupportedA Whether or not gamepads are supported in current browser.

func (*Gamepad) Start

func (self *Gamepad) Start()

Start Starts the Gamepad event handling. This MUST be called manually before Phaser will start polling the Gamepad API.

func (*Gamepad) StartI

func (self *Gamepad) StartI(args ...interface{})

StartI Starts the Gamepad event handling. This MUST be called manually before Phaser will start polling the Gamepad API.

func (*Gamepad) Stop

func (self *Gamepad) Stop()

Stop Stops the Gamepad event handling.

func (*Gamepad) StopI

func (self *Gamepad) StopI(args ...interface{})

StopI Stops the Gamepad event handling.

func (*Gamepad) Supported

func (self *Gamepad) Supported() bool

Supported Whether or not gamepads are supported in current browser.

func (*Gamepad) Update

func (self *Gamepad) Update()

Update Main gamepad update loop. Should not be called manually.

func (*Gamepad) UpdateI

func (self *Gamepad) UpdateI(args ...interface{})

UpdateI Main gamepad update loop. Should not be called manually.

type GlMatrix

type GlMatrix struct {
	*js.Object
}

GlMatrix empty description

func NewGlMatrix

func NewGlMatrix() *GlMatrix

NewGlMatrix empty description

func NewGlMatrixI

func NewGlMatrixI(args ...interface{}) *GlMatrix

NewGlMatrixI empty description

func ToGlMatrix

func ToGlMatrix(jsStruct interface{}) *GlMatrix

GlMatrix Binding conversion method to GlMatrix point

type Graphics

type Graphics struct {
	*js.Object
}

Graphics A Graphics object is a way to draw primitives to your game. Primitives include forms of geometry, such as Rectangles, Circles and Polygons. They also include lines, arcs and curves. When you initially create a Graphics object it will be empty. To 'draw' to it you first specify a lineStyle or fillStyle (or both), and then draw a shape. For example:

``` graphics.beginFill(0xff0000); graphics.drawCircle(50, 50, 100); graphics.endFill(); ```

This will draw a circle shape to the Graphics object, with a diameter of 100, located at x: 50, y: 50.

When a Graphics object is rendered it will render differently based on if the game is running under Canvas or WebGL. Under Canvas it will use the HTML Canvas context drawing operations to draw the path. Under WebGL the graphics data is decomposed into polygons. Both of these are expensive processes, especially with complex shapes.

If your Graphics object doesn't change much (or at all) once you've drawn your shape to it, then you will help performance by calling `Graphics.generateTexture`. This will 'bake' the Graphics object into a Texture, and return it. You can then use this Texture for Sprites or other display objects. If your Graphics object updates frequently then you should avoid doing this, as it will constantly generate new textures, which will consume memory.

As you can tell, Graphics objects are a bit of a trade-off. While they are extremely useful, you need to be careful in their complexity and quantity of them in your game.

func NewGraphics

func NewGraphics(game *Game) *Graphics

NewGraphics A Graphics object is a way to draw primitives to your game. Primitives include forms of geometry, such as Rectangles, Circles and Polygons. They also include lines, arcs and curves. When you initially create a Graphics object it will be empty. To 'draw' to it you first specify a lineStyle or fillStyle (or both), and then draw a shape. For example:

``` graphics.beginFill(0xff0000); graphics.drawCircle(50, 50, 100); graphics.endFill(); ```

This will draw a circle shape to the Graphics object, with a diameter of 100, located at x: 50, y: 50.

When a Graphics object is rendered it will render differently based on if the game is running under Canvas or WebGL. Under Canvas it will use the HTML Canvas context drawing operations to draw the path. Under WebGL the graphics data is decomposed into polygons. Both of these are expensive processes, especially with complex shapes.

If your Graphics object doesn't change much (or at all) once you've drawn your shape to it, then you will help performance by calling `Graphics.generateTexture`. This will 'bake' the Graphics object into a Texture, and return it. You can then use this Texture for Sprites or other display objects. If your Graphics object updates frequently then you should avoid doing this, as it will constantly generate new textures, which will consume memory.

As you can tell, Graphics objects are a bit of a trade-off. While they are extremely useful, you need to be careful in their complexity and quantity of them in your game.

func NewGraphics1O

func NewGraphics1O(game *Game, x int) *Graphics

NewGraphics1O A Graphics object is a way to draw primitives to your game. Primitives include forms of geometry, such as Rectangles, Circles and Polygons. They also include lines, arcs and curves. When you initially create a Graphics object it will be empty. To 'draw' to it you first specify a lineStyle or fillStyle (or both), and then draw a shape. For example:

``` graphics.beginFill(0xff0000); graphics.drawCircle(50, 50, 100); graphics.endFill(); ```

This will draw a circle shape to the Graphics object, with a diameter of 100, located at x: 50, y: 50.

When a Graphics object is rendered it will render differently based on if the game is running under Canvas or WebGL. Under Canvas it will use the HTML Canvas context drawing operations to draw the path. Under WebGL the graphics data is decomposed into polygons. Both of these are expensive processes, especially with complex shapes.

If your Graphics object doesn't change much (or at all) once you've drawn your shape to it, then you will help performance by calling `Graphics.generateTexture`. This will 'bake' the Graphics object into a Texture, and return it. You can then use this Texture for Sprites or other display objects. If your Graphics object updates frequently then you should avoid doing this, as it will constantly generate new textures, which will consume memory.

As you can tell, Graphics objects are a bit of a trade-off. While they are extremely useful, you need to be careful in their complexity and quantity of them in your game.

func NewGraphics2O

func NewGraphics2O(game *Game, x int, y int) *Graphics

NewGraphics2O A Graphics object is a way to draw primitives to your game. Primitives include forms of geometry, such as Rectangles, Circles and Polygons. They also include lines, arcs and curves. When you initially create a Graphics object it will be empty. To 'draw' to it you first specify a lineStyle or fillStyle (or both), and then draw a shape. For example:

``` graphics.beginFill(0xff0000); graphics.drawCircle(50, 50, 100); graphics.endFill(); ```

This will draw a circle shape to the Graphics object, with a diameter of 100, located at x: 50, y: 50.

When a Graphics object is rendered it will render differently based on if the game is running under Canvas or WebGL. Under Canvas it will use the HTML Canvas context drawing operations to draw the path. Under WebGL the graphics data is decomposed into polygons. Both of these are expensive processes, especially with complex shapes.

If your Graphics object doesn't change much (or at all) once you've drawn your shape to it, then you will help performance by calling `Graphics.generateTexture`. This will 'bake' the Graphics object into a Texture, and return it. You can then use this Texture for Sprites or other display objects. If your Graphics object updates frequently then you should avoid doing this, as it will constantly generate new textures, which will consume memory.

As you can tell, Graphics objects are a bit of a trade-off. While they are extremely useful, you need to be careful in their complexity and quantity of them in your game.

func NewGraphicsI

func NewGraphicsI(args ...interface{}) *Graphics

NewGraphicsI A Graphics object is a way to draw primitives to your game. Primitives include forms of geometry, such as Rectangles, Circles and Polygons. They also include lines, arcs and curves. When you initially create a Graphics object it will be empty. To 'draw' to it you first specify a lineStyle or fillStyle (or both), and then draw a shape. For example:

``` graphics.beginFill(0xff0000); graphics.drawCircle(50, 50, 100); graphics.endFill(); ```

This will draw a circle shape to the Graphics object, with a diameter of 100, located at x: 50, y: 50.

When a Graphics object is rendered it will render differently based on if the game is running under Canvas or WebGL. Under Canvas it will use the HTML Canvas context drawing operations to draw the path. Under WebGL the graphics data is decomposed into polygons. Both of these are expensive processes, especially with complex shapes.

If your Graphics object doesn't change much (or at all) once you've drawn your shape to it, then you will help performance by calling `Graphics.generateTexture`. This will 'bake' the Graphics object into a Texture, and return it. You can then use this Texture for Sprites or other display objects. If your Graphics object updates frequently then you should avoid doing this, as it will constantly generate new textures, which will consume memory.

As you can tell, Graphics objects are a bit of a trade-off. While they are extremely useful, you need to be careful in their complexity and quantity of them in your game.

func ToGraphics

func ToGraphics(jsStruct interface{}) *Graphics

Graphics Binding conversion method to Graphics point

func (*Graphics) AddChild

func (self *Graphics) AddChild(child *DisplayObject) *DisplayObject

AddChild Adds a child to the container.

func (*Graphics) AddChildAt

func (self *Graphics) AddChildAt(child *DisplayObject, index int) *DisplayObject

AddChildAt Adds a child to the container at a specified index. If the index is out of bounds an error will be thrown

func (*Graphics) AddChildAtI

func (self *Graphics) AddChildAtI(args ...interface{}) *DisplayObject

AddChildAtI Adds a child to the container at a specified index. If the index is out of bounds an error will be thrown

func (*Graphics) AddChildI

func (self *Graphics) AddChildI(args ...interface{}) *DisplayObject

AddChildI Adds a child to the container.

func (*Graphics) AlignIn

func (self *Graphics) AlignIn(container interface{}) interface{}

AlignIn Aligns this Game Object within another Game Object, or Rectangle, known as the 'container', to one of 9 possible positions.

The container must be a Game Object, or Phaser.Rectangle object. This can include properties such as `World.bounds` or `Camera.view`, for aligning Game Objects within the world and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText, TileSprites or Buttons.

Please note that aligning a Sprite to another Game Object does **not** make it a child of the container. It simply modifies its position coordinates so it aligns with it.

The position constants you can use are:

`Phaser.TOP_LEFT`, `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

The Game Objects are placed in such a way that their _bounds_ align with the container, taking into consideration rotation, scale and the anchor property. This allows you to neatly align Game Objects, irrespective of their position value.

The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final aligned position of the Game Object. For example:

`sprite.alignIn(background, Phaser.BOTTOM_RIGHT, -20, -20)`

Would align the `sprite` to the bottom-right, but moved 20 pixels in from the corner. Think of the offsets as applying an adjustment to the containers bounds before the alignment takes place. So providing a negative offset will 'shrink' the container bounds by that amount, and providing a positive one expands it.

func (*Graphics) AlignIn1O

func (self *Graphics) AlignIn1O(container interface{}, position int) interface{}

AlignIn1O Aligns this Game Object within another Game Object, or Rectangle, known as the 'container', to one of 9 possible positions.

The container must be a Game Object, or Phaser.Rectangle object. This can include properties such as `World.bounds` or `Camera.view`, for aligning Game Objects within the world and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText, TileSprites or Buttons.

Please note that aligning a Sprite to another Game Object does **not** make it a child of the container. It simply modifies its position coordinates so it aligns with it.

The position constants you can use are:

`Phaser.TOP_LEFT`, `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

The Game Objects are placed in such a way that their _bounds_ align with the container, taking into consideration rotation, scale and the anchor property. This allows you to neatly align Game Objects, irrespective of their position value.

The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final aligned position of the Game Object. For example:

`sprite.alignIn(background, Phaser.BOTTOM_RIGHT, -20, -20)`

Would align the `sprite` to the bottom-right, but moved 20 pixels in from the corner. Think of the offsets as applying an adjustment to the containers bounds before the alignment takes place. So providing a negative offset will 'shrink' the container bounds by that amount, and providing a positive one expands it.

func (*Graphics) AlignIn2O

func (self *Graphics) AlignIn2O(container interface{}, position int, offsetX int) interface{}

AlignIn2O Aligns this Game Object within another Game Object, or Rectangle, known as the 'container', to one of 9 possible positions.

The container must be a Game Object, or Phaser.Rectangle object. This can include properties such as `World.bounds` or `Camera.view`, for aligning Game Objects within the world and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText, TileSprites or Buttons.

Please note that aligning a Sprite to another Game Object does **not** make it a child of the container. It simply modifies its position coordinates so it aligns with it.

The position constants you can use are:

`Phaser.TOP_LEFT`, `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

The Game Objects are placed in such a way that their _bounds_ align with the container, taking into consideration rotation, scale and the anchor property. This allows you to neatly align Game Objects, irrespective of their position value.

The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final aligned position of the Game Object. For example:

`sprite.alignIn(background, Phaser.BOTTOM_RIGHT, -20, -20)`

Would align the `sprite` to the bottom-right, but moved 20 pixels in from the corner. Think of the offsets as applying an adjustment to the containers bounds before the alignment takes place. So providing a negative offset will 'shrink' the container bounds by that amount, and providing a positive one expands it.

func (*Graphics) AlignIn3O

func (self *Graphics) AlignIn3O(container interface{}, position int, offsetX int, offsetY int) interface{}

AlignIn3O Aligns this Game Object within another Game Object, or Rectangle, known as the 'container', to one of 9 possible positions.

The container must be a Game Object, or Phaser.Rectangle object. This can include properties such as `World.bounds` or `Camera.view`, for aligning Game Objects within the world and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText, TileSprites or Buttons.

Please note that aligning a Sprite to another Game Object does **not** make it a child of the container. It simply modifies its position coordinates so it aligns with it.

The position constants you can use are:

`Phaser.TOP_LEFT`, `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

The Game Objects are placed in such a way that their _bounds_ align with the container, taking into consideration rotation, scale and the anchor property. This allows you to neatly align Game Objects, irrespective of their position value.

The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final aligned position of the Game Object. For example:

`sprite.alignIn(background, Phaser.BOTTOM_RIGHT, -20, -20)`

Would align the `sprite` to the bottom-right, but moved 20 pixels in from the corner. Think of the offsets as applying an adjustment to the containers bounds before the alignment takes place. So providing a negative offset will 'shrink' the container bounds by that amount, and providing a positive one expands it.

func (*Graphics) AlignInI

func (self *Graphics) AlignInI(args ...interface{}) interface{}

AlignInI Aligns this Game Object within another Game Object, or Rectangle, known as the 'container', to one of 9 possible positions.

The container must be a Game Object, or Phaser.Rectangle object. This can include properties such as `World.bounds` or `Camera.view`, for aligning Game Objects within the world and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText, TileSprites or Buttons.

Please note that aligning a Sprite to another Game Object does **not** make it a child of the container. It simply modifies its position coordinates so it aligns with it.

The position constants you can use are:

`Phaser.TOP_LEFT`, `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

The Game Objects are placed in such a way that their _bounds_ align with the container, taking into consideration rotation, scale and the anchor property. This allows you to neatly align Game Objects, irrespective of their position value.

The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final aligned position of the Game Object. For example:

`sprite.alignIn(background, Phaser.BOTTOM_RIGHT, -20, -20)`

Would align the `sprite` to the bottom-right, but moved 20 pixels in from the corner. Think of the offsets as applying an adjustment to the containers bounds before the alignment takes place. So providing a negative offset will 'shrink' the container bounds by that amount, and providing a positive one expands it.

func (*Graphics) AlignTo

func (self *Graphics) AlignTo(parent interface{}) interface{}

AlignTo Aligns this Game Object to the side of another Game Object, or Rectangle, known as the 'parent', in one of 11 possible positions.

The parent must be a Game Object, or Phaser.Rectangle object. This can include properties such as `World.bounds` or `Camera.view`, for aligning Game Objects within the world and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText, TileSprites or Buttons.

Please note that aligning a Sprite to another Game Object does **not** make it a child of the parent. It simply modifies its position coordinates so it aligns with it.

The position constants you can use are:

`Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_TOP`, `Phaser.LEFT_CENTER`, `Phaser.LEFT_BOTTOM`, `Phaser.RIGHT_TOP`, `Phaser.RIGHT_CENTER`, `Phaser.RIGHT_BOTTOM`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

The Game Objects are placed in such a way that their _bounds_ align with the parent, taking into consideration rotation, scale and the anchor property. This allows you to neatly align Game Objects, irrespective of their position value.

The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final aligned position of the Game Object. For example:

`sprite.alignTo(background, Phaser.BOTTOM_RIGHT, -20, -20)`

Would align the `sprite` to the bottom-right, but moved 20 pixels in from the corner. Think of the offsets as applying an adjustment to the parents bounds before the alignment takes place. So providing a negative offset will 'shrink' the parent bounds by that amount, and providing a positive one expands it.

func (*Graphics) AlignTo1O

func (self *Graphics) AlignTo1O(parent interface{}, position int) interface{}

AlignTo1O Aligns this Game Object to the side of another Game Object, or Rectangle, known as the 'parent', in one of 11 possible positions.

The parent must be a Game Object, or Phaser.Rectangle object. This can include properties such as `World.bounds` or `Camera.view`, for aligning Game Objects within the world and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText, TileSprites or Buttons.

Please note that aligning a Sprite to another Game Object does **not** make it a child of the parent. It simply modifies its position coordinates so it aligns with it.

The position constants you can use are:

`Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_TOP`, `Phaser.LEFT_CENTER`, `Phaser.LEFT_BOTTOM`, `Phaser.RIGHT_TOP`, `Phaser.RIGHT_CENTER`, `Phaser.RIGHT_BOTTOM`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

The Game Objects are placed in such a way that their _bounds_ align with the parent, taking into consideration rotation, scale and the anchor property. This allows you to neatly align Game Objects, irrespective of their position value.

The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final aligned position of the Game Object. For example:

`sprite.alignTo(background, Phaser.BOTTOM_RIGHT, -20, -20)`

Would align the `sprite` to the bottom-right, but moved 20 pixels in from the corner. Think of the offsets as applying an adjustment to the parents bounds before the alignment takes place. So providing a negative offset will 'shrink' the parent bounds by that amount, and providing a positive one expands it.

func (*Graphics) AlignTo2O

func (self *Graphics) AlignTo2O(parent interface{}, position int, offsetX int) interface{}

AlignTo2O Aligns this Game Object to the side of another Game Object, or Rectangle, known as the 'parent', in one of 11 possible positions.

The parent must be a Game Object, or Phaser.Rectangle object. This can include properties such as `World.bounds` or `Camera.view`, for aligning Game Objects within the world and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText, TileSprites or Buttons.

Please note that aligning a Sprite to another Game Object does **not** make it a child of the parent. It simply modifies its position coordinates so it aligns with it.

The position constants you can use are:

`Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_TOP`, `Phaser.LEFT_CENTER`, `Phaser.LEFT_BOTTOM`, `Phaser.RIGHT_TOP`, `Phaser.RIGHT_CENTER`, `Phaser.RIGHT_BOTTOM`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

The Game Objects are placed in such a way that their _bounds_ align with the parent, taking into consideration rotation, scale and the anchor property. This allows you to neatly align Game Objects, irrespective of their position value.

The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final aligned position of the Game Object. For example:

`sprite.alignTo(background, Phaser.BOTTOM_RIGHT, -20, -20)`

Would align the `sprite` to the bottom-right, but moved 20 pixels in from the corner. Think of the offsets as applying an adjustment to the parents bounds before the alignment takes place. So providing a negative offset will 'shrink' the parent bounds by that amount, and providing a positive one expands it.

func (*Graphics) AlignTo3O

func (self *Graphics) AlignTo3O(parent interface{}, position int, offsetX int, offsetY int) interface{}

AlignTo3O Aligns this Game Object to the side of another Game Object, or Rectangle, known as the 'parent', in one of 11 possible positions.

The parent must be a Game Object, or Phaser.Rectangle object. This can include properties such as `World.bounds` or `Camera.view`, for aligning Game Objects within the world and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText, TileSprites or Buttons.

Please note that aligning a Sprite to another Game Object does **not** make it a child of the parent. It simply modifies its position coordinates so it aligns with it.

The position constants you can use are:

`Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_TOP`, `Phaser.LEFT_CENTER`, `Phaser.LEFT_BOTTOM`, `Phaser.RIGHT_TOP`, `Phaser.RIGHT_CENTER`, `Phaser.RIGHT_BOTTOM`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

The Game Objects are placed in such a way that their _bounds_ align with the parent, taking into consideration rotation, scale and the anchor property. This allows you to neatly align Game Objects, irrespective of their position value.

The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final aligned position of the Game Object. For example:

`sprite.alignTo(background, Phaser.BOTTOM_RIGHT, -20, -20)`

Would align the `sprite` to the bottom-right, but moved 20 pixels in from the corner. Think of the offsets as applying an adjustment to the parents bounds before the alignment takes place. So providing a negative offset will 'shrink' the parent bounds by that amount, and providing a positive one expands it.

func (*Graphics) AlignToI

func (self *Graphics) AlignToI(args ...interface{}) interface{}

AlignToI Aligns this Game Object to the side of another Game Object, or Rectangle, known as the 'parent', in one of 11 possible positions.

The parent must be a Game Object, or Phaser.Rectangle object. This can include properties such as `World.bounds` or `Camera.view`, for aligning Game Objects within the world and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText, TileSprites or Buttons.

Please note that aligning a Sprite to another Game Object does **not** make it a child of the parent. It simply modifies its position coordinates so it aligns with it.

The position constants you can use are:

`Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_TOP`, `Phaser.LEFT_CENTER`, `Phaser.LEFT_BOTTOM`, `Phaser.RIGHT_TOP`, `Phaser.RIGHT_CENTER`, `Phaser.RIGHT_BOTTOM`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

The Game Objects are placed in such a way that their _bounds_ align with the parent, taking into consideration rotation, scale and the anchor property. This allows you to neatly align Game Objects, irrespective of their position value.

The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final aligned position of the Game Object. For example:

`sprite.alignTo(background, Phaser.BOTTOM_RIGHT, -20, -20)`

Would align the `sprite` to the bottom-right, but moved 20 pixels in from the corner. Think of the offsets as applying an adjustment to the parents bounds before the alignment takes place. So providing a negative offset will 'shrink' the parent bounds by that amount, and providing a positive one expands it.

func (*Graphics) Alive

func (self *Graphics) Alive() bool

Alive A useful flag to control if the Game Object is alive or dead.

This is set automatically by the Health components `damage` method should the object run out of health. Or you can toggle it via your game code.

This property is mostly just provided to be used by your game - it doesn't effect rendering or logic updates. However you can use `Group.getFirstAlive` in conjunction with this property for fast object pooling and recycling.

func (*Graphics) Angle

func (self *Graphics) Angle() int

Angle The angle property is the rotation of the Game Object in *degrees* from its original orientation.

Values from 0 to 180 represent clockwise rotation; values from 0 to -180 represent counterclockwise rotation.

Values outside this range are added to or subtracted from 360 to obtain a value within the range. For example, the statement player.angle = 450 is the same as player.angle = 90.

If you wish to work in radians instead of degrees you can use the property `rotation` instead. Working in radians is slightly faster as it doesn't have to perform any calculations.

func (*Graphics) Animations

func (self *Graphics) Animations() *AnimationManager

Animations If the Game Object is enabled for animation (such as a Phaser.Sprite) this is a reference to its AnimationManager instance. Through it you can create, play, pause and stop animations.

func (*Graphics) Arc

func (self *Graphics) Arc(cx int, cy int, radius int, startAngle int, endAngle int, anticlockwise bool, segments int) *Graphics

Arc The arc method creates an arc/curve (used to create circles, or parts of circles).

func (*Graphics) ArcI

func (self *Graphics) ArcI(args ...interface{}) *Graphics

ArcI The arc method creates an arc/curve (used to create circles, or parts of circles).

func (*Graphics) AutoCull

func (self *Graphics) AutoCull() bool

AutoCull A Game Object with `autoCull` set to true will check its bounds against the World Camera every frame. If it is not intersecting the Camera bounds at any point then it has its `renderable` property set to `false`. This keeps the Game Object alive and still processing updates, but forces it to skip the render step entirely.

This is a relatively expensive operation, especially if enabled on hundreds of Game Objects. So enable it only if you know it's required, or you have tested performance and find it acceptable.

func (*Graphics) BeginFill

func (self *Graphics) BeginFill(color int, alpha int) *Graphics

BeginFill Specifies a simple one-color fill that subsequent calls to other Graphics methods

(such as lineTo() or drawCircle()) use when drawing.

func (*Graphics) BeginFillI

func (self *Graphics) BeginFillI(args ...interface{}) *Graphics

BeginFillI Specifies a simple one-color fill that subsequent calls to other Graphics methods

(such as lineTo() or drawCircle()) use when drawing.

func (*Graphics) BezierCurveTo

func (self *Graphics) BezierCurveTo(cpX int, cpY int, cpX2 int, cpY2 int, toX int, toY int) *Graphics

BezierCurveTo Calculate the points for a bezier curve and then draws it.

func (*Graphics) BezierCurveToI

func (self *Graphics) BezierCurveToI(args ...interface{}) *Graphics

BezierCurveToI Calculate the points for a bezier curve and then draws it.

func (*Graphics) BlendMode

func (self *Graphics) BlendMode() int

BlendMode The blend mode to be applied to the graphic shape. Apply a value of PIXI.blendModes.NORMAL to reset the blend mode.

func (*Graphics) Body

func (self *Graphics) Body() interface{}

Body `body` is the Game Objects physics body. Once a Game Object is enabled for physics you access all associated properties and methods via it.

By default Game Objects won't add themselves to any physics system and their `body` property will be `null`.

To enable this Game Object for physics you need to call `game.physics.enable(object, system)` where `object` is this object and `system` is the Physics system you are using. If none is given it defaults to `Phaser.Physics.Arcade`.

You can alternatively call `game.physics.arcade.enable(object)`, or add this Game Object to a physics enabled Group.

Important: Enabling a Game Object for P2 or Ninja physics will automatically set its `anchor` property to 0.5, so the physics body is centered on the Game Object.

If you need a different result then adjust or re-create the Body shape offsets manually or reset the anchor after enabling physics.

func (*Graphics) Bottom

func (self *Graphics) Bottom() int

Bottom The sum of the y and height properties. This is the same as `y + height - offsetY`.

func (*Graphics) BoundsPadding

func (self *Graphics) BoundsPadding() int

BoundsPadding The bounds' padding used for bounds calculation.

func (*Graphics) CameraOffset

func (self *Graphics) CameraOffset() *Point

CameraOffset The x/y coordinate offset applied to the top-left of the camera that this Game Object will be drawn at if `fixedToCamera` is true.

The values are relative to the top-left of the camera view and in addition to any parent of the Game Object on the display list.

func (*Graphics) CenterX

func (self *Graphics) CenterX() int

CenterX The center x coordinate of the Game Object. This is the same as `(x - offsetX) + (width / 2)`.

func (*Graphics) CenterY

func (self *Graphics) CenterY() int

CenterY The center y coordinate of the Game Object. This is the same as `(y - offsetY) + (height / 2)`.

func (*Graphics) CheckWorldBounds

func (self *Graphics) CheckWorldBounds() bool

CheckWorldBounds If this is set to `true` the Game Object checks if it is within the World bounds each frame.

When it is no longer intersecting the world bounds it dispatches the `onOutOfBounds` event.

If it was *previously* out of bounds but is now intersecting the world bounds again it dispatches the `onEnterBounds` event.

It also optionally kills the Game Object if `outOfBoundsKill` is `true`.

When `checkWorldBounds` is enabled it forces the Game Object to calculate its full bounds every frame.

This is a relatively expensive operation, especially if enabled on hundreds of Game Objects. So enable it only if you know it's required, or you have tested performance and find it acceptable.

func (*Graphics) Children

func (self *Graphics) Children() []DisplayObject

Children [read-only] The array of children of this container.

func (*Graphics) Clear

func (self *Graphics) Clear() *Graphics

Clear Clears the graphics that were drawn to this Graphics object, and resets fill and line style settings.

func (*Graphics) ClearI

func (self *Graphics) ClearI(args ...interface{}) *Graphics

ClearI Clears the graphics that were drawn to this Graphics object, and resets fill and line style settings.

func (*Graphics) Components

func (self *Graphics) Components() interface{}

Components The components this Game Object has installed.

func (*Graphics) Contains

func (self *Graphics) Contains(child *DisplayObject) bool

Contains Determines whether the specified display object is a child of the DisplayObjectContainer instance or the instance itself.

func (*Graphics) ContainsI

func (self *Graphics) ContainsI(args ...interface{}) bool

ContainsI Determines whether the specified display object is a child of the DisplayObjectContainer instance or the instance itself.

func (*Graphics) Data

func (self *Graphics) Data() interface{}

Data An empty Object that belongs to this Game Object. This value isn't ever used internally by Phaser, but may be used by your own code, or by Phaser Plugins, to store data that needs to be associated with the Game Object, without polluting the Game Object directly.

func (*Graphics) Debug

func (self *Graphics) Debug() bool

Debug A debug flag designed for use with `Game.enableStep`.

func (*Graphics) Destroy

func (self *Graphics) Destroy()

Destroy Destroy this Graphics instance.

func (*Graphics) Destroy1O

func (self *Graphics) Destroy1O(destroyChildren bool)

Destroy1O Destroy this Graphics instance.

func (*Graphics) DestroyCachedSprite

func (self *Graphics) DestroyCachedSprite()

DestroyCachedSprite Destroys a previous cached sprite.

func (*Graphics) DestroyCachedSpriteI

func (self *Graphics) DestroyCachedSpriteI(args ...interface{})

DestroyCachedSpriteI Destroys a previous cached sprite.

func (*Graphics) DestroyI

func (self *Graphics) DestroyI(args ...interface{})

DestroyI Destroy this Graphics instance.

func (*Graphics) DestroyPhase

func (self *Graphics) DestroyPhase() bool

DestroyPhase As a Game Object runs through its destroy method this flag is set to true, and can be checked in any sub-systems or plugins it is being destroyed from.

func (*Graphics) DrawCircle

func (self *Graphics) DrawCircle(x int, y int, diameter int) *Graphics

DrawCircle Draws a circle.

func (*Graphics) DrawCircleI

func (self *Graphics) DrawCircleI(args ...interface{}) *Graphics

DrawCircleI Draws a circle.

func (*Graphics) DrawEllipse

func (self *Graphics) DrawEllipse(x int, y int, width int, height int) *Graphics

DrawEllipse Draws an ellipse.

func (*Graphics) DrawEllipseI

func (self *Graphics) DrawEllipseI(args ...interface{}) *Graphics

DrawEllipseI Draws an ellipse.

func (*Graphics) DrawPolygon

func (self *Graphics) DrawPolygon(path interface{}) *Graphics

DrawPolygon Draws a polygon using the given path.

func (*Graphics) DrawPolygonI

func (self *Graphics) DrawPolygonI(args ...interface{}) *Graphics

DrawPolygonI Draws a polygon using the given path.

func (*Graphics) DrawRect

func (self *Graphics) DrawRect(x int, y int, width int, height int) *Graphics

DrawRect empty description

func (*Graphics) DrawRectI

func (self *Graphics) DrawRectI(args ...interface{}) *Graphics

DrawRectI empty description

func (*Graphics) DrawRoundedRect

func (self *Graphics) DrawRoundedRect(x int, y int, width int, height int, radius int)

DrawRoundedRect empty description

func (*Graphics) DrawRoundedRectI

func (self *Graphics) DrawRoundedRectI(args ...interface{})

DrawRoundedRectI empty description

func (*Graphics) DrawShape

func (self *Graphics) DrawShape(shape interface{}) *GraphicsData

DrawShape Draws the given shape to this Graphics object. Can be any of Circle, Rectangle, Ellipse, Line or Polygon.

func (*Graphics) DrawShapeI

func (self *Graphics) DrawShapeI(args ...interface{}) *GraphicsData

DrawShapeI Draws the given shape to this Graphics object. Can be any of Circle, Rectangle, Ellipse, Line or Polygon.

func (*Graphics) EndFill

func (self *Graphics) EndFill() *Graphics

EndFill Applies a fill to the lines and shapes that were added since the last call to the beginFill() method.

func (*Graphics) EndFillI

func (self *Graphics) EndFillI(args ...interface{}) *Graphics

EndFillI Applies a fill to the lines and shapes that were added since the last call to the beginFill() method.

func (*Graphics) Events

func (self *Graphics) Events() *Events

Events All Phaser Game Objects have an Events class which contains all of the events that are dispatched when certain things happen to this Game Object, or any of its components.

func (*Graphics) Exists

func (self *Graphics) Exists() bool

Exists Controls if this Game Object is processed by the core game loop. If this Game Object has a physics body it also controls if its physics body is updated or not. When `exists` is set to `false` it will remove its physics body from the physics world if it has one. It also toggles the `visible` property to false as well.

Setting `exists` to true will add its physics body back in to the physics world, if it has one. It will also set the `visible` property to `true`.

func (*Graphics) FillAlpha

func (self *Graphics) FillAlpha() int

FillAlpha The alpha value used when filling the Graphics object.

func (*Graphics) FixedToCamera

func (self *Graphics) FixedToCamera() bool

FixedToCamera A Game Object that is "fixed" to the camera uses its x/y coordinates as offsets from the top left of the camera during rendering.

The values are adjusted at the rendering stage, overriding the Game Objects actual world position.

The end result is that the Game Object will appear to be 'fixed' to the camera, regardless of where in the game world the camera is viewing. This is useful if for example this Game Object is a UI item that you wish to be visible at all times regardless where in the world the camera is.

The offsets are stored in the `cameraOffset` property.

Note that the `cameraOffset` values are in addition to any parent of this Game Object on the display list.

Be careful not to set `fixedToCamera` on Game Objects which are in Groups that already have `fixedToCamera` enabled on them.

func (*Graphics) Fresh

func (self *Graphics) Fresh() bool

Fresh A Game Object is considered `fresh` if it has just been created or reset and is yet to receive a renderer transform update. This property is mostly used internally by the physics systems, but is exposed for the use of plugins.

func (*Graphics) Game

func (self *Graphics) Game() *Game

Game A reference to the currently running Game.

func (*Graphics) GenerateTexture

func (self *Graphics) GenerateTexture() *Texture

GenerateTexture Useful function that returns a texture of the graphics object that can then be used to create sprites

This can be quite useful if your geometry is complicated and needs to be reused multiple times.

func (*Graphics) GenerateTexture1O

func (self *Graphics) GenerateTexture1O(resolution int) *Texture

GenerateTexture1O Useful function that returns a texture of the graphics object that can then be used to create sprites

This can be quite useful if your geometry is complicated and needs to be reused multiple times.

func (*Graphics) GenerateTexture2O

func (self *Graphics) GenerateTexture2O(resolution int, scaleMode int) *Texture

GenerateTexture2O Useful function that returns a texture of the graphics object that can then be used to create sprites

This can be quite useful if your geometry is complicated and needs to be reused multiple times.

func (*Graphics) GenerateTexture3O

func (self *Graphics) GenerateTexture3O(resolution int, scaleMode int, padding int) *Texture

GenerateTexture3O Useful function that returns a texture of the graphics object that can then be used to create sprites

This can be quite useful if your geometry is complicated and needs to be reused multiple times.

func (*Graphics) GenerateTextureI

func (self *Graphics) GenerateTextureI(args ...interface{}) *Texture

GenerateTextureI Useful function that returns a texture of the graphics object that can then be used to create sprites

This can be quite useful if your geometry is complicated and needs to be reused multiple times.

func (*Graphics) GetBounds

func (self *Graphics) GetBounds() *Rectangle

GetBounds Retrieves the bounds of the graphic shape as a rectangle object

func (*Graphics) GetBoundsI

func (self *Graphics) GetBoundsI(args ...interface{}) *Rectangle

GetBoundsI Retrieves the bounds of the graphic shape as a rectangle object

func (*Graphics) GetChildAt

func (self *Graphics) GetChildAt(index int) *DisplayObject

GetChildAt Returns the child at the specified index

func (*Graphics) GetChildAtI

func (self *Graphics) GetChildAtI(args ...interface{}) *DisplayObject

GetChildAtI Returns the child at the specified index

func (*Graphics) GetChildIndex

func (self *Graphics) GetChildIndex(child *DisplayObject) int

GetChildIndex Returns the index position of a child DisplayObject instance

func (*Graphics) GetChildIndexI

func (self *Graphics) GetChildIndexI(args ...interface{}) int

GetChildIndexI Returns the index position of a child DisplayObject instance

func (*Graphics) GetLocalBounds

func (self *Graphics) GetLocalBounds() *Rectangle

GetLocalBounds Retrieves the non-global local bounds of the graphic shape as a rectangle. The calculation takes all visible children into consideration.

func (*Graphics) GetLocalBoundsI

func (self *Graphics) GetLocalBoundsI(args ...interface{}) *Rectangle

GetLocalBoundsI Retrieves the non-global local bounds of the graphic shape as a rectangle. The calculation takes all visible children into consideration.

func (*Graphics) Height

func (self *Graphics) Height() int

Height The height of the displayObjectContainer, setting this will actually modify the scale to achieve the value set

func (*Graphics) IgnoreChildInput

func (self *Graphics) IgnoreChildInput() bool

IgnoreChildInput If `ignoreChildInput` is `false` it will allow this objects _children_ to be considered as valid for Input events.

If this property is `true` then the children will _not_ be considered as valid for Input events.

Note that this property isn't recursive: only immediate children are influenced, it doesn't scan further down.

func (*Graphics) InCamera

func (self *Graphics) InCamera() bool

InCamera Checks if the Game Objects bounds intersect with the Game Camera bounds. Returns `true` if they do, otherwise `false` if fully outside of the Cameras bounds.

func (*Graphics) InWorld

func (self *Graphics) InWorld() bool

InWorld Checks if the Game Objects bounds are within, or intersect at any point with the Game World bounds.

func (*Graphics) Input

func (self *Graphics) Input() interface{}

Input The Input Handler for this Game Object.

By default it is disabled. If you wish this Game Object to process input events you should enable it with: `inputEnabled = true`.

After you have done this, this property will be a reference to the Phaser InputHandler.

func (*Graphics) InputEnabled

func (self *Graphics) InputEnabled() bool

InputEnabled By default a Game Object won't process any input events. By setting `inputEnabled` to true a Phaser.InputHandler is created for this Game Object and it will then start to process click / touch events and more.

You can then access the Input Handler via `this.input`.

Note that Input related events are dispatched from `this.events`, i.e.: `events.onInputDown`.

If you set this property to false it will stop the Input Handler from processing any more input events.

If you want to _temporarily_ disable input for a Game Object, then it's better to set `input.enabled = false`, as it won't reset any of the Input Handlers internal properties. You can then toggle this back on as needed.

func (*Graphics) IsMask

func (self *Graphics) IsMask() bool

IsMask Whether this shape is being used as a mask.

func (*Graphics) Key

func (self *Graphics) Key() interface{}

Key The key of the image or texture used by this Game Object during rendering. If it is a string it's the string used to retrieve the texture from the Phaser Image Cache. It can also be an instance of a RenderTexture, BitmapData, Video or PIXI.Texture. If a Game Object is created without a key it is automatically assigned the key `__default` which is a 32x32 transparent PNG stored within the Cache. If a Game Object is given a key which doesn't exist in the Image Cache it is re-assigned the key `__missing` which is a 32x32 PNG of a green box with a line through it.

func (*Graphics) Kill

func (self *Graphics) Kill() *DisplayObject

Kill Kills a Game Object. A killed Game Object has its `alive`, `exists` and `visible` properties all set to false.

It will dispatch the `onKilled` event. You can listen to `events.onKilled` for the signal.

Note that killing a Game Object is a way for you to quickly recycle it in an object pool, it doesn't destroy the object or free it up from memory.

If you don't need this Game Object any more you should call `destroy` instead.

func (*Graphics) KillI

func (self *Graphics) KillI(args ...interface{}) *DisplayObject

KillI Kills a Game Object. A killed Game Object has its `alive`, `exists` and `visible` properties all set to false.

It will dispatch the `onKilled` event. You can listen to `events.onKilled` for the signal.

Note that killing a Game Object is a way for you to quickly recycle it in an object pool, it doesn't destroy the object or free it up from memory.

If you don't need this Game Object any more you should call `destroy` instead.

func (*Graphics) Left

func (self *Graphics) Left() int

Left The left coordinate of the Game Object. This is the same as `x - offsetX`.

func (*Graphics) Lifespan

func (self *Graphics) Lifespan() int

Lifespan The lifespan allows you to give a Game Object a lifespan in milliseconds.

Once the Game Object is 'born' you can set this to a positive value.

It is automatically decremented by the millisecond equivalent of `game.time.physicsElapsed` each frame. When it reaches zero it will call the `kill` method.

Very handy for particles, bullets, collectibles, or any other short-lived entity.

func (*Graphics) LineColor

func (self *Graphics) LineColor() string

LineColor The color of any lines drawn.

func (*Graphics) LineStyle

func (self *Graphics) LineStyle(lineWidth int, color int, alpha int) *Graphics

LineStyle Specifies the line style used for subsequent calls to Graphics methods such as the lineTo() method or the drawCircle() method.

func (*Graphics) LineStyleI

func (self *Graphics) LineStyleI(args ...interface{}) *Graphics

LineStyleI Specifies the line style used for subsequent calls to Graphics methods such as the lineTo() method or the drawCircle() method.

func (*Graphics) LineTo

func (self *Graphics) LineTo(x int, y int) *Graphics

LineTo Draws a line using the current line style from the current drawing position to (x, y);

The current drawing position is then set to (x, y).

func (*Graphics) LineToI

func (self *Graphics) LineToI(args ...interface{}) *Graphics

LineToI Draws a line using the current line style from the current drawing position to (x, y);

The current drawing position is then set to (x, y).

func (*Graphics) LineWidth

func (self *Graphics) LineWidth() int

LineWidth The width (thickness) of any lines drawn.

func (*Graphics) MoveTo

func (self *Graphics) MoveTo(x int, y int) *Graphics

MoveTo Moves the current drawing position to x, y.

func (*Graphics) MoveToI

func (self *Graphics) MoveToI(args ...interface{}) *Graphics

MoveToI Moves the current drawing position to x, y.

func (*Graphics) Name

func (self *Graphics) Name() string

Name A user defined name given to this Game Object. This value isn't ever used internally by Phaser, it is meant as a game level property.

func (*Graphics) OffsetX

func (self *Graphics) OffsetX() int

OffsetX The amount the Game Object is visually offset from its x coordinate. This is the same as `width * anchor.x`. It will only be > 0 if anchor.x is not equal to zero.

func (*Graphics) OffsetY

func (self *Graphics) OffsetY() int

OffsetY The amount the Game Object is visually offset from its y coordinate. This is the same as `height * anchor.y`. It will only be > 0 if anchor.y is not equal to zero.

func (*Graphics) OutOfBoundsKill

func (self *Graphics) OutOfBoundsKill() bool

OutOfBoundsKill If this and the `checkWorldBounds` property are both set to `true` then the `kill` method is called as soon as `inWorld` returns false.

func (*Graphics) OutOfCameraBoundsKill

func (self *Graphics) OutOfCameraBoundsKill() bool

OutOfCameraBoundsKill If this and the `autoCull` property are both set to `true`, then the `kill` method is called as soon as the Game Object leaves the camera bounds.

func (*Graphics) PendingDestroy

func (self *Graphics) PendingDestroy() bool

PendingDestroy A Game Object is that is pendingDestroy is flagged to have its destroy method called on the next logic update. You can set it directly to allow you to flag an object to be destroyed on its next update.

This is extremely useful if you wish to destroy an object from within one of its own callbacks such as with Buttons or other Input events.

func (*Graphics) PhysicsType

func (self *Graphics) PhysicsType() int

PhysicsType The const physics body type of this object.

func (*Graphics) PostUpdate

func (self *Graphics) PostUpdate()

PostUpdate Automatically called by World

func (*Graphics) PostUpdateI

func (self *Graphics) PostUpdateI(args ...interface{})

PostUpdateI Automatically called by World

func (*Graphics) PreUpdate

func (self *Graphics) PreUpdate()

PreUpdate Automatically called by World.preUpdate.

func (*Graphics) PreUpdateI

func (self *Graphics) PreUpdateI(args ...interface{})

PreUpdateI Automatically called by World.preUpdate.

func (*Graphics) PreviousPosition

func (self *Graphics) PreviousPosition() *Point

PreviousPosition The position the Game Object was located in the previous frame.

func (*Graphics) PreviousRotation

func (self *Graphics) PreviousRotation() int

PreviousRotation The rotation the Game Object was in set to in the previous frame. Value is in radians.

func (*Graphics) QuadraticCurveTo

func (self *Graphics) QuadraticCurveTo(cpX int, cpY int, toX int, toY int) *Graphics

QuadraticCurveTo Calculate the points for a quadratic bezier curve and then draws it.

Based on: https://stackoverflow.com/questions/785097/how-do-i-implement-a-bezier-curve-in-c

func (*Graphics) QuadraticCurveToI

func (self *Graphics) QuadraticCurveToI(args ...interface{}) *Graphics

QuadraticCurveToI Calculate the points for a quadratic bezier curve and then draws it.

Based on: https://stackoverflow.com/questions/785097/how-do-i-implement-a-bezier-curve-in-c

func (*Graphics) RemoveChild

func (self *Graphics) RemoveChild(child *DisplayObject) *DisplayObject

RemoveChild Removes a child from the container.

func (*Graphics) RemoveChildAt

func (self *Graphics) RemoveChildAt(index int) *DisplayObject

RemoveChildAt Removes a child from the specified index position.

func (*Graphics) RemoveChildAtI

func (self *Graphics) RemoveChildAtI(args ...interface{}) *DisplayObject

RemoveChildAtI Removes a child from the specified index position.

func (*Graphics) RemoveChildI

func (self *Graphics) RemoveChildI(args ...interface{}) *DisplayObject

RemoveChildI Removes a child from the container.

func (*Graphics) RemoveChildren

func (self *Graphics) RemoveChildren(beginIndex int, endIndex int)

RemoveChildren Removes all children from this container that are within the begin and end indexes.

func (*Graphics) RemoveChildrenI

func (self *Graphics) RemoveChildrenI(args ...interface{})

RemoveChildrenI Removes all children from this container that are within the begin and end indexes.

func (*Graphics) RenderOrderID

func (self *Graphics) RenderOrderID() int

RenderOrderID The render order ID is used internally by the renderer and Input Manager and should not be modified. This property is mostly used internally by the renderers, but is exposed for the use of plugins.

func (*Graphics) Reset

func (self *Graphics) Reset(x int, y int) *DisplayObject

Reset Resets the Game Object.

This moves the Game Object to the given x/y world coordinates and sets `fresh`, `exists`, `visible` and `renderable` to true.

If this Game Object has the LifeSpan component it will also set `alive` to true and `health` to the given value.

If this Game Object has a Physics Body it will reset the Body.

func (*Graphics) Reset1O

func (self *Graphics) Reset1O(x int, y int, health int) *DisplayObject

Reset1O Resets the Game Object.

This moves the Game Object to the given x/y world coordinates and sets `fresh`, `exists`, `visible` and `renderable` to true.

If this Game Object has the LifeSpan component it will also set `alive` to true and `health` to the given value.

If this Game Object has a Physics Body it will reset the Body.

func (*Graphics) ResetI

func (self *Graphics) ResetI(args ...interface{}) *DisplayObject

ResetI Resets the Game Object.

This moves the Game Object to the given x/y world coordinates and sets `fresh`, `exists`, `visible` and `renderable` to true.

If this Game Object has the LifeSpan component it will also set `alive` to true and `health` to the given value.

If this Game Object has a Physics Body it will reset the Body.

func (*Graphics) Revive

func (self *Graphics) Revive() *DisplayObject

Revive Brings a 'dead' Game Object back to life, optionally resetting its health value in the process.

A resurrected Game Object has its `alive`, `exists` and `visible` properties all set to true.

It will dispatch the `onRevived` event. Listen to `events.onRevived` for the signal.

func (*Graphics) Revive1O

func (self *Graphics) Revive1O(health int) *DisplayObject

Revive1O Brings a 'dead' Game Object back to life, optionally resetting its health value in the process.

A resurrected Game Object has its `alive`, `exists` and `visible` properties all set to true.

It will dispatch the `onRevived` event. Listen to `events.onRevived` for the signal.

func (*Graphics) ReviveI

func (self *Graphics) ReviveI(args ...interface{}) *DisplayObject

ReviveI Brings a 'dead' Game Object back to life, optionally resetting its health value in the process.

A resurrected Game Object has its `alive`, `exists` and `visible` properties all set to true.

It will dispatch the `onRevived` event. Listen to `events.onRevived` for the signal.

func (*Graphics) Right

func (self *Graphics) Right() int

Right The right coordinate of the Game Object. This is the same as `x + width - offsetX`.

func (*Graphics) SetAliveA

func (self *Graphics) SetAliveA(member bool)

SetAliveA A useful flag to control if the Game Object is alive or dead.

This is set automatically by the Health components `damage` method should the object run out of health. Or you can toggle it via your game code.

This property is mostly just provided to be used by your game - it doesn't effect rendering or logic updates. However you can use `Group.getFirstAlive` in conjunction with this property for fast object pooling and recycling.

func (*Graphics) SetAngleA

func (self *Graphics) SetAngleA(member int)

SetAngleA The angle property is the rotation of the Game Object in *degrees* from its original orientation.

Values from 0 to 180 represent clockwise rotation; values from 0 to -180 represent counterclockwise rotation.

Values outside this range are added to or subtracted from 360 to obtain a value within the range. For example, the statement player.angle = 450 is the same as player.angle = 90.

If you wish to work in radians instead of degrees you can use the property `rotation` instead. Working in radians is slightly faster as it doesn't have to perform any calculations.

func (*Graphics) SetAnimationsA

func (self *Graphics) SetAnimationsA(member *AnimationManager)

SetAnimationsA If the Game Object is enabled for animation (such as a Phaser.Sprite) this is a reference to its AnimationManager instance. Through it you can create, play, pause and stop animations.

func (*Graphics) SetAutoCullA

func (self *Graphics) SetAutoCullA(member bool)

SetAutoCullA A Game Object with `autoCull` set to true will check its bounds against the World Camera every frame. If it is not intersecting the Camera bounds at any point then it has its `renderable` property set to `false`. This keeps the Game Object alive and still processing updates, but forces it to skip the render step entirely.

This is a relatively expensive operation, especially if enabled on hundreds of Game Objects. So enable it only if you know it's required, or you have tested performance and find it acceptable.

func (*Graphics) SetBlendModeA

func (self *Graphics) SetBlendModeA(member int)

SetBlendModeA The blend mode to be applied to the graphic shape. Apply a value of PIXI.blendModes.NORMAL to reset the blend mode.

func (*Graphics) SetBodyA

func (self *Graphics) SetBodyA(member interface{})

SetBodyA `body` is the Game Objects physics body. Once a Game Object is enabled for physics you access all associated properties and methods via it.

By default Game Objects won't add themselves to any physics system and their `body` property will be `null`.

To enable this Game Object for physics you need to call `game.physics.enable(object, system)` where `object` is this object and `system` is the Physics system you are using. If none is given it defaults to `Phaser.Physics.Arcade`.

You can alternatively call `game.physics.arcade.enable(object)`, or add this Game Object to a physics enabled Group.

Important: Enabling a Game Object for P2 or Ninja physics will automatically set its `anchor` property to 0.5, so the physics body is centered on the Game Object.

If you need a different result then adjust or re-create the Body shape offsets manually or reset the anchor after enabling physics.

func (*Graphics) SetBottomA

func (self *Graphics) SetBottomA(member int)

SetBottomA The sum of the y and height properties. This is the same as `y + height - offsetY`.

func (*Graphics) SetBoundsPaddingA

func (self *Graphics) SetBoundsPaddingA(member int)

SetBoundsPaddingA The bounds' padding used for bounds calculation.

func (*Graphics) SetCameraOffsetA

func (self *Graphics) SetCameraOffsetA(member *Point)

SetCameraOffsetA The x/y coordinate offset applied to the top-left of the camera that this Game Object will be drawn at if `fixedToCamera` is true.

The values are relative to the top-left of the camera view and in addition to any parent of the Game Object on the display list.

func (*Graphics) SetCenterXA

func (self *Graphics) SetCenterXA(member int)

SetCenterXA The center x coordinate of the Game Object. This is the same as `(x - offsetX) + (width / 2)`.

func (*Graphics) SetCenterYA

func (self *Graphics) SetCenterYA(member int)

SetCenterYA The center y coordinate of the Game Object. This is the same as `(y - offsetY) + (height / 2)`.

func (*Graphics) SetCheckWorldBoundsA

func (self *Graphics) SetCheckWorldBoundsA(member bool)

SetCheckWorldBoundsA If this is set to `true` the Game Object checks if it is within the World bounds each frame.

When it is no longer intersecting the world bounds it dispatches the `onOutOfBounds` event.

If it was *previously* out of bounds but is now intersecting the world bounds again it dispatches the `onEnterBounds` event.

It also optionally kills the Game Object if `outOfBoundsKill` is `true`.

When `checkWorldBounds` is enabled it forces the Game Object to calculate its full bounds every frame.

This is a relatively expensive operation, especially if enabled on hundreds of Game Objects. So enable it only if you know it's required, or you have tested performance and find it acceptable.

func (*Graphics) SetChildIndex

func (self *Graphics) SetChildIndex(child *DisplayObject, index int)

SetChildIndex Changes the position of an existing child in the display object container

func (*Graphics) SetChildIndexI

func (self *Graphics) SetChildIndexI(args ...interface{})

SetChildIndexI Changes the position of an existing child in the display object container

func (*Graphics) SetChildrenA

func (self *Graphics) SetChildrenA(member []DisplayObject)

SetChildrenA [read-only] The array of children of this container.

func (*Graphics) SetComponentsA

func (self *Graphics) SetComponentsA(member interface{})

SetComponentsA The components this Game Object has installed.

func (*Graphics) SetDataA

func (self *Graphics) SetDataA(member interface{})

SetDataA An empty Object that belongs to this Game Object. This value isn't ever used internally by Phaser, but may be used by your own code, or by Phaser Plugins, to store data that needs to be associated with the Game Object, without polluting the Game Object directly.

func (*Graphics) SetDebugA

func (self *Graphics) SetDebugA(member bool)

SetDebugA A debug flag designed for use with `Game.enableStep`.

func (*Graphics) SetDestroyPhaseA

func (self *Graphics) SetDestroyPhaseA(member bool)

SetDestroyPhaseA As a Game Object runs through its destroy method this flag is set to true, and can be checked in any sub-systems or plugins it is being destroyed from.

func (*Graphics) SetEventsA

func (self *Graphics) SetEventsA(member *Events)

SetEventsA All Phaser Game Objects have an Events class which contains all of the events that are dispatched when certain things happen to this Game Object, or any of its components.

func (*Graphics) SetExistsA

func (self *Graphics) SetExistsA(member bool)

SetExistsA Controls if this Game Object is processed by the core game loop. If this Game Object has a physics body it also controls if its physics body is updated or not. When `exists` is set to `false` it will remove its physics body from the physics world if it has one. It also toggles the `visible` property to false as well.

Setting `exists` to true will add its physics body back in to the physics world, if it has one. It will also set the `visible` property to `true`.

func (*Graphics) SetFillAlphaA

func (self *Graphics) SetFillAlphaA(member int)

SetFillAlphaA The alpha value used when filling the Graphics object.

func (*Graphics) SetFixedToCameraA

func (self *Graphics) SetFixedToCameraA(member bool)

SetFixedToCameraA A Game Object that is "fixed" to the camera uses its x/y coordinates as offsets from the top left of the camera during rendering.

The values are adjusted at the rendering stage, overriding the Game Objects actual world position.

The end result is that the Game Object will appear to be 'fixed' to the camera, regardless of where in the game world the camera is viewing. This is useful if for example this Game Object is a UI item that you wish to be visible at all times regardless where in the world the camera is.

The offsets are stored in the `cameraOffset` property.

Note that the `cameraOffset` values are in addition to any parent of this Game Object on the display list.

Be careful not to set `fixedToCamera` on Game Objects which are in Groups that already have `fixedToCamera` enabled on them.

func (*Graphics) SetFreshA

func (self *Graphics) SetFreshA(member bool)

SetFreshA A Game Object is considered `fresh` if it has just been created or reset and is yet to receive a renderer transform update. This property is mostly used internally by the physics systems, but is exposed for the use of plugins.

func (*Graphics) SetGameA

func (self *Graphics) SetGameA(member *Game)

SetGameA A reference to the currently running Game.

func (*Graphics) SetHeightA

func (self *Graphics) SetHeightA(member int)

SetHeightA The height of the displayObjectContainer, setting this will actually modify the scale to achieve the value set

func (*Graphics) SetIgnoreChildInputA

func (self *Graphics) SetIgnoreChildInputA(member bool)

SetIgnoreChildInputA If `ignoreChildInput` is `false` it will allow this objects _children_ to be considered as valid for Input events.

If this property is `true` then the children will _not_ be considered as valid for Input events.

Note that this property isn't recursive: only immediate children are influenced, it doesn't scan further down.

func (*Graphics) SetInCameraA

func (self *Graphics) SetInCameraA(member bool)

SetInCameraA Checks if the Game Objects bounds intersect with the Game Camera bounds. Returns `true` if they do, otherwise `false` if fully outside of the Cameras bounds.

func (*Graphics) SetInWorldA

func (self *Graphics) SetInWorldA(member bool)

SetInWorldA Checks if the Game Objects bounds are within, or intersect at any point with the Game World bounds.

func (*Graphics) SetInputA

func (self *Graphics) SetInputA(member interface{})

SetInputA The Input Handler for this Game Object.

By default it is disabled. If you wish this Game Object to process input events you should enable it with: `inputEnabled = true`.

After you have done this, this property will be a reference to the Phaser InputHandler.

func (*Graphics) SetInputEnabledA

func (self *Graphics) SetInputEnabledA(member bool)

SetInputEnabledA By default a Game Object won't process any input events. By setting `inputEnabled` to true a Phaser.InputHandler is created for this Game Object and it will then start to process click / touch events and more.

You can then access the Input Handler via `this.input`.

Note that Input related events are dispatched from `this.events`, i.e.: `events.onInputDown`.

If you set this property to false it will stop the Input Handler from processing any more input events.

If you want to _temporarily_ disable input for a Game Object, then it's better to set `input.enabled = false`, as it won't reset any of the Input Handlers internal properties. You can then toggle this back on as needed.

func (*Graphics) SetIsMaskA

func (self *Graphics) SetIsMaskA(member bool)

SetIsMaskA Whether this shape is being used as a mask.

func (*Graphics) SetKeyA

func (self *Graphics) SetKeyA(member interface{})

SetKeyA The key of the image or texture used by this Game Object during rendering. If it is a string it's the string used to retrieve the texture from the Phaser Image Cache. It can also be an instance of a RenderTexture, BitmapData, Video or PIXI.Texture. If a Game Object is created without a key it is automatically assigned the key `__default` which is a 32x32 transparent PNG stored within the Cache. If a Game Object is given a key which doesn't exist in the Image Cache it is re-assigned the key `__missing` which is a 32x32 PNG of a green box with a line through it.

func (*Graphics) SetLeftA

func (self *Graphics) SetLeftA(member int)

SetLeftA The left coordinate of the Game Object. This is the same as `x - offsetX`.

func (*Graphics) SetLifespanA

func (self *Graphics) SetLifespanA(member int)

SetLifespanA The lifespan allows you to give a Game Object a lifespan in milliseconds.

Once the Game Object is 'born' you can set this to a positive value.

It is automatically decremented by the millisecond equivalent of `game.time.physicsElapsed` each frame. When it reaches zero it will call the `kill` method.

Very handy for particles, bullets, collectibles, or any other short-lived entity.

func (*Graphics) SetLineColorA

func (self *Graphics) SetLineColorA(member string)

SetLineColorA The color of any lines drawn.

func (*Graphics) SetLineWidthA

func (self *Graphics) SetLineWidthA(member int)

SetLineWidthA The width (thickness) of any lines drawn.

func (*Graphics) SetNameA

func (self *Graphics) SetNameA(member string)

SetNameA A user defined name given to this Game Object. This value isn't ever used internally by Phaser, it is meant as a game level property.

func (*Graphics) SetOffsetXA

func (self *Graphics) SetOffsetXA(member int)

SetOffsetXA The amount the Game Object is visually offset from its x coordinate. This is the same as `width * anchor.x`. It will only be > 0 if anchor.x is not equal to zero.

func (*Graphics) SetOffsetYA

func (self *Graphics) SetOffsetYA(member int)

SetOffsetYA The amount the Game Object is visually offset from its y coordinate. This is the same as `height * anchor.y`. It will only be > 0 if anchor.y is not equal to zero.

func (*Graphics) SetOutOfBoundsKillA

func (self *Graphics) SetOutOfBoundsKillA(member bool)

SetOutOfBoundsKillA If this and the `checkWorldBounds` property are both set to `true` then the `kill` method is called as soon as `inWorld` returns false.

func (*Graphics) SetOutOfCameraBoundsKillA

func (self *Graphics) SetOutOfCameraBoundsKillA(member bool)

SetOutOfCameraBoundsKillA If this and the `autoCull` property are both set to `true`, then the `kill` method is called as soon as the Game Object leaves the camera bounds.

func (*Graphics) SetPendingDestroyA

func (self *Graphics) SetPendingDestroyA(member bool)

SetPendingDestroyA A Game Object is that is pendingDestroy is flagged to have its destroy method called on the next logic update. You can set it directly to allow you to flag an object to be destroyed on its next update.

This is extremely useful if you wish to destroy an object from within one of its own callbacks such as with Buttons or other Input events.

func (*Graphics) SetPhysicsTypeA

func (self *Graphics) SetPhysicsTypeA(member int)

SetPhysicsTypeA The const physics body type of this object.

func (*Graphics) SetPreviousPositionA

func (self *Graphics) SetPreviousPositionA(member *Point)

SetPreviousPositionA The position the Game Object was located in the previous frame.

func (*Graphics) SetPreviousRotationA

func (self *Graphics) SetPreviousRotationA(member int)

SetPreviousRotationA The rotation the Game Object was in set to in the previous frame. Value is in radians.

func (*Graphics) SetRenderOrderIDA

func (self *Graphics) SetRenderOrderIDA(member int)

SetRenderOrderIDA The render order ID is used internally by the renderer and Input Manager and should not be modified. This property is mostly used internally by the renderers, but is exposed for the use of plugins.

func (*Graphics) SetRightA

func (self *Graphics) SetRightA(member int)

SetRightA The right coordinate of the Game Object. This is the same as `x + width - offsetX`.

func (*Graphics) SetTintA

func (self *Graphics) SetTintA(member int)

SetTintA The tint applied to the graphic shape. This is a hex value. Apply a value of 0xFFFFFF to reset the tint.

func (*Graphics) SetTopA

func (self *Graphics) SetTopA(member int)

SetTopA The y coordinate of the Game Object. This is the same as `y - offsetY`.

func (*Graphics) SetTypeA

func (self *Graphics) SetTypeA(member int)

SetTypeA The const type of this object.

func (*Graphics) SetWidthA

func (self *Graphics) SetWidthA(member int)

SetWidthA The width of the displayObjectContainer, setting this will actually modify the scale to achieve the value set

func (*Graphics) SetWorldA

func (self *Graphics) SetWorldA(member *Point)

SetWorldA The world coordinates of this Game Object in pixels. Depending on where in the display list this Game Object is placed this value can differ from `position`, which contains the x/y coordinates relative to the Game Objects parent.

func (*Graphics) SetXA

func (self *Graphics) SetXA(member int)

SetXA The position of the Game Object on the x axis relative to the local coordinates of the parent.

func (*Graphics) SetYA

func (self *Graphics) SetYA(member int)

SetYA The position of the Game Object on the y axis relative to the local coordinates of the parent.

func (*Graphics) SetZA

func (self *Graphics) SetZA(member int)

SetZA The z depth of this Game Object within its parent Group. No two objects in a Group can have the same z value. This value is adjusted automatically whenever the Group hierarchy changes. If you wish to re-order the layering of a Game Object then see methods like Group.moveUp or Group.bringToTop.

func (*Graphics) SwapChildren

func (self *Graphics) SwapChildren(child *DisplayObject, child2 *DisplayObject)

SwapChildren Swaps the position of 2 Display Objects within this container.

func (*Graphics) SwapChildrenI

func (self *Graphics) SwapChildrenI(args ...interface{})

SwapChildrenI Swaps the position of 2 Display Objects within this container.

func (*Graphics) Tint

func (self *Graphics) Tint() int

Tint The tint applied to the graphic shape. This is a hex value. Apply a value of 0xFFFFFF to reset the tint.

func (*Graphics) Top

func (self *Graphics) Top() int

Top The y coordinate of the Game Object. This is the same as `y - offsetY`.

func (*Graphics) Type

func (self *Graphics) Type() int

Type The const type of this object.

func (*Graphics) Update

func (self *Graphics) Update()

Update Override this method in your own custom objects to handle any update requirements. It is called immediately after `preUpdate` and before `postUpdate`. Remember if this Game Object has any children you should call update on those too.

func (*Graphics) UpdateCachedSpriteTexture

func (self *Graphics) UpdateCachedSpriteTexture()

UpdateCachedSpriteTexture Updates texture size based on canvas size

func (*Graphics) UpdateCachedSpriteTextureI

func (self *Graphics) UpdateCachedSpriteTextureI(args ...interface{})

UpdateCachedSpriteTextureI Updates texture size based on canvas size

func (*Graphics) UpdateI

func (self *Graphics) UpdateI(args ...interface{})

UpdateI Override this method in your own custom objects to handle any update requirements. It is called immediately after `preUpdate` and before `postUpdate`. Remember if this Game Object has any children you should call update on those too.

func (*Graphics) UpdateLocalBounds

func (self *Graphics) UpdateLocalBounds()

UpdateLocalBounds Update the bounds of the object

func (*Graphics) UpdateLocalBoundsI

func (self *Graphics) UpdateLocalBoundsI(args ...interface{})

UpdateLocalBoundsI Update the bounds of the object

func (*Graphics) Width

func (self *Graphics) Width() int

Width The width of the displayObjectContainer, setting this will actually modify the scale to achieve the value set

func (*Graphics) World

func (self *Graphics) World() *Point

World The world coordinates of this Game Object in pixels. Depending on where in the display list this Game Object is placed this value can differ from `position`, which contains the x/y coordinates relative to the Game Objects parent.

func (*Graphics) X

func (self *Graphics) X() int

X The position of the Game Object on the x axis relative to the local coordinates of the parent.

func (*Graphics) Y

func (self *Graphics) Y() int

Y The position of the Game Object on the y axis relative to the local coordinates of the parent.

func (*Graphics) Z

func (self *Graphics) Z() int

Z The z depth of this Game Object within its parent Group. No two objects in a Group can have the same z value. This value is adjusted automatically whenever the Group hierarchy changes. If you wish to re-order the layering of a Game Object then see methods like Group.moveUp or Group.bringToTop.

type GraphicsData

type GraphicsData struct {
	*js.Object
}

GraphicsData A GraphicsData object.

func NewGraphicsData

func NewGraphicsData() *GraphicsData

NewGraphicsData A GraphicsData object.

func NewGraphicsDataI

func NewGraphicsDataI(args ...interface{}) *GraphicsData

NewGraphicsDataI A GraphicsData object.

func ToGraphicsData

func ToGraphicsData(jsStruct interface{}) *GraphicsData

GraphicsData Binding conversion method to GraphicsData point

type Group

type Group struct {
	*js.Object
}

Group A Group is a container for {@link DisplayObject display objects} including {@link Phaser.Sprite Sprites} and {@link Phaser.Image Images}.

Groups form the logical tree structure of the display/scene graph where local transformations are applied to children. For instance, all children are also moved/rotated/scaled when the group is moved/rotated/scaled.

In addition, Groups provides support for fast pooling and object recycling.

Groups are also display objects and can be nested as children within other Groups.

func NewGroup

func NewGroup(game *Game) *Group

NewGroup A Group is a container for {@link DisplayObject display objects} including {@link Phaser.Sprite Sprites} and {@link Phaser.Image Images}.

Groups form the logical tree structure of the display/scene graph where local transformations are applied to children. For instance, all children are also moved/rotated/scaled when the group is moved/rotated/scaled.

In addition, Groups provides support for fast pooling and object recycling.

Groups are also display objects and can be nested as children within other Groups.

func NewGroup1O

func NewGroup1O(game *Game, parent interface{}) *Group

NewGroup1O A Group is a container for {@link DisplayObject display objects} including {@link Phaser.Sprite Sprites} and {@link Phaser.Image Images}.

Groups form the logical tree structure of the display/scene graph where local transformations are applied to children. For instance, all children are also moved/rotated/scaled when the group is moved/rotated/scaled.

In addition, Groups provides support for fast pooling and object recycling.

Groups are also display objects and can be nested as children within other Groups.

func NewGroup2O

func NewGroup2O(game *Game, parent interface{}, name string) *Group

NewGroup2O A Group is a container for {@link DisplayObject display objects} including {@link Phaser.Sprite Sprites} and {@link Phaser.Image Images}.

Groups form the logical tree structure of the display/scene graph where local transformations are applied to children. For instance, all children are also moved/rotated/scaled when the group is moved/rotated/scaled.

In addition, Groups provides support for fast pooling and object recycling.

Groups are also display objects and can be nested as children within other Groups.

func NewGroup3O

func NewGroup3O(game *Game, parent interface{}, name string, addToStage bool) *Group

NewGroup3O A Group is a container for {@link DisplayObject display objects} including {@link Phaser.Sprite Sprites} and {@link Phaser.Image Images}.

Groups form the logical tree structure of the display/scene graph where local transformations are applied to children. For instance, all children are also moved/rotated/scaled when the group is moved/rotated/scaled.

In addition, Groups provides support for fast pooling and object recycling.

Groups are also display objects and can be nested as children within other Groups.

func NewGroup4O

func NewGroup4O(game *Game, parent interface{}, name string, addToStage bool, enableBody bool) *Group

NewGroup4O A Group is a container for {@link DisplayObject display objects} including {@link Phaser.Sprite Sprites} and {@link Phaser.Image Images}.

Groups form the logical tree structure of the display/scene graph where local transformations are applied to children. For instance, all children are also moved/rotated/scaled when the group is moved/rotated/scaled.

In addition, Groups provides support for fast pooling and object recycling.

Groups are also display objects and can be nested as children within other Groups.

func NewGroup5O

func NewGroup5O(game *Game, parent interface{}, name string, addToStage bool, enableBody bool, physicsBodyType int) *Group

NewGroup5O A Group is a container for {@link DisplayObject display objects} including {@link Phaser.Sprite Sprites} and {@link Phaser.Image Images}.

Groups form the logical tree structure of the display/scene graph where local transformations are applied to children. For instance, all children are also moved/rotated/scaled when the group is moved/rotated/scaled.

In addition, Groups provides support for fast pooling and object recycling.

Groups are also display objects and can be nested as children within other Groups.

func NewGroupI

func NewGroupI(args ...interface{}) *Group

NewGroupI A Group is a container for {@link DisplayObject display objects} including {@link Phaser.Sprite Sprites} and {@link Phaser.Image Images}.

Groups form the logical tree structure of the display/scene graph where local transformations are applied to children. For instance, all children are also moved/rotated/scaled when the group is moved/rotated/scaled.

In addition, Groups provides support for fast pooling and object recycling.

Groups are also display objects and can be nested as children within other Groups.

func ToGroup

func ToGroup(jsStruct interface{}) *Group

Group Binding conversion method to Group point

func (*Group) Add

func (self *Group) Add(child *DisplayObject) *DisplayObject

Add Adds an existing object as the top child in this group.

The child is automatically added to the top of the group, and is displayed above every previous child.

Or if the _optional_ index is specified, the child is added at the location specified by the index value, this allows you to control child ordering.

If the child was already in this Group, it is simply returned, and nothing else happens to it.

If `Group.enableBody` is set, then a physics body will be created on the object, so long as one does not already exist.

If `Group.inputEnableChildren` is set, then an Input Handler will be created on the object, so long as one does not already exist.

Use {@link Phaser.Group#addAt addAt} to control where a child is added. Use {@link Phaser.Group#create create} to create and add a new child.

func (*Group) Add1O

func (self *Group) Add1O(child *DisplayObject, silent bool) *DisplayObject

Add1O Adds an existing object as the top child in this group.

The child is automatically added to the top of the group, and is displayed above every previous child.

Or if the _optional_ index is specified, the child is added at the location specified by the index value, this allows you to control child ordering.

If the child was already in this Group, it is simply returned, and nothing else happens to it.

If `Group.enableBody` is set, then a physics body will be created on the object, so long as one does not already exist.

If `Group.inputEnableChildren` is set, then an Input Handler will be created on the object, so long as one does not already exist.

Use {@link Phaser.Group#addAt addAt} to control where a child is added. Use {@link Phaser.Group#create create} to create and add a new child.

func (*Group) Add2O

func (self *Group) Add2O(child *DisplayObject, silent bool, index int) *DisplayObject

Add2O Adds an existing object as the top child in this group.

The child is automatically added to the top of the group, and is displayed above every previous child.

Or if the _optional_ index is specified, the child is added at the location specified by the index value, this allows you to control child ordering.

If the child was already in this Group, it is simply returned, and nothing else happens to it.

If `Group.enableBody` is set, then a physics body will be created on the object, so long as one does not already exist.

If `Group.inputEnableChildren` is set, then an Input Handler will be created on the object, so long as one does not already exist.

Use {@link Phaser.Group#addAt addAt} to control where a child is added. Use {@link Phaser.Group#create create} to create and add a new child.

func (*Group) AddAll

func (self *Group) AddAll(property string, amount int, checkAlive bool, checkVisible bool)

AddAll Adds the amount to the given property on all children in this group.

`Group.addAll('x', 10)` will add 10 to the child.x value for each child.

func (*Group) AddAllI

func (self *Group) AddAllI(args ...interface{})

AddAllI Adds the amount to the given property on all children in this group.

`Group.addAll('x', 10)` will add 10 to the child.x value for each child.

func (*Group) AddAt

func (self *Group) AddAt(child *DisplayObject) *DisplayObject

AddAt Adds an existing object to this group.

The child is added to the group at the location specified by the index value, this allows you to control child ordering.

If `Group.enableBody` is set, then a physics body will be created on the object, so long as one does not already exist.

If `Group.inputEnableChildren` is set, then an Input Handler will be created on the object, so long as one does not already exist.

func (*Group) AddAt1O

func (self *Group) AddAt1O(child *DisplayObject, index int) *DisplayObject

AddAt1O Adds an existing object to this group.

The child is added to the group at the location specified by the index value, this allows you to control child ordering.

If `Group.enableBody` is set, then a physics body will be created on the object, so long as one does not already exist.

If `Group.inputEnableChildren` is set, then an Input Handler will be created on the object, so long as one does not already exist.

func (*Group) AddAt2O

func (self *Group) AddAt2O(child *DisplayObject, index int, silent bool) *DisplayObject

AddAt2O Adds an existing object to this group.

The child is added to the group at the location specified by the index value, this allows you to control child ordering.

If `Group.enableBody` is set, then a physics body will be created on the object, so long as one does not already exist.

If `Group.inputEnableChildren` is set, then an Input Handler will be created on the object, so long as one does not already exist.

func (*Group) AddAtI

func (self *Group) AddAtI(args ...interface{}) *DisplayObject

AddAtI Adds an existing object to this group.

The child is added to the group at the location specified by the index value, this allows you to control child ordering.

If `Group.enableBody` is set, then a physics body will be created on the object, so long as one does not already exist.

If `Group.inputEnableChildren` is set, then an Input Handler will be created on the object, so long as one does not already exist.

func (*Group) AddChild

func (self *Group) AddChild(child *DisplayObject) *DisplayObject

AddChild Adds a child to the container.

func (*Group) AddChildAt

func (self *Group) AddChildAt(child *DisplayObject, index int) *DisplayObject

AddChildAt Adds a child to the container at a specified index. If the index is out of bounds an error will be thrown

func (*Group) AddChildAtI

func (self *Group) AddChildAtI(args ...interface{}) *DisplayObject

AddChildAtI Adds a child to the container at a specified index. If the index is out of bounds an error will be thrown

func (*Group) AddChildI

func (self *Group) AddChildI(args ...interface{}) *DisplayObject

AddChildI Adds a child to the container.

func (*Group) AddI

func (self *Group) AddI(args ...interface{}) *DisplayObject

AddI Adds an existing object as the top child in this group.

The child is automatically added to the top of the group, and is displayed above every previous child.

Or if the _optional_ index is specified, the child is added at the location specified by the index value, this allows you to control child ordering.

If the child was already in this Group, it is simply returned, and nothing else happens to it.

If `Group.enableBody` is set, then a physics body will be created on the object, so long as one does not already exist.

If `Group.inputEnableChildren` is set, then an Input Handler will be created on the object, so long as one does not already exist.

Use {@link Phaser.Group#addAt addAt} to control where a child is added. Use {@link Phaser.Group#create create} to create and add a new child.

func (*Group) AddMultiple

func (self *Group) AddMultiple(children interface{}) interface{}

AddMultiple Adds an array of existing Display Objects to this Group.

The Display Objects are automatically added to the top of this Group, and will render on-top of everything already in this Group.

As well as an array you can also pass another Group as the first argument. In this case all of the children from that Group will be removed from it and added into this Group.

If `Group.enableBody` is set, then a physics body will be created on the objects, so long as one does not already exist.

If `Group.inputEnableChildren` is set, then an Input Handler will be created on the objects, so long as one does not already exist.

func (*Group) AddMultiple1O

func (self *Group) AddMultiple1O(children interface{}, silent bool) interface{}

AddMultiple1O Adds an array of existing Display Objects to this Group.

The Display Objects are automatically added to the top of this Group, and will render on-top of everything already in this Group.

As well as an array you can also pass another Group as the first argument. In this case all of the children from that Group will be removed from it and added into this Group.

If `Group.enableBody` is set, then a physics body will be created on the objects, so long as one does not already exist.

If `Group.inputEnableChildren` is set, then an Input Handler will be created on the objects, so long as one does not already exist.

func (*Group) AddMultipleI

func (self *Group) AddMultipleI(args ...interface{}) interface{}

AddMultipleI Adds an array of existing Display Objects to this Group.

The Display Objects are automatically added to the top of this Group, and will render on-top of everything already in this Group.

As well as an array you can also pass another Group as the first argument. In this case all of the children from that Group will be removed from it and added into this Group.

If `Group.enableBody` is set, then a physics body will be created on the objects, so long as one does not already exist.

If `Group.inputEnableChildren` is set, then an Input Handler will be created on the objects, so long as one does not already exist.

func (*Group) AddToHash

func (self *Group) AddToHash(child *DisplayObject) bool

AddToHash Adds a child of this Group into the hash array. This call will return false if the child is not a child of this Group, or is already in the hash.

func (*Group) AddToHashI

func (self *Group) AddToHashI(args ...interface{}) bool

AddToHashI Adds a child of this Group into the hash array. This call will return false if the child is not a child of this Group, or is already in the hash.

func (*Group) Align

func (self *Group) Align(width int, height int, cellWidth int, cellHeight int) bool

Align This method iterates through all children in the Group (regardless if they are visible or exist) and then changes their position so they are arranged in a Grid formation. Children must have the `alignTo` method in order to be positioned by this call. All default Phaser Game Objects have this.

The grid dimensions are determined by the first four arguments. The `width` and `height` arguments relate to the width and height of the grid respectively.

For example if the Group had 100 children in it:

`Group.align(10, 10, 32, 32)`

This will align all of the children into a grid formation of 10x10, using 32 pixels per grid cell. If you want a wider grid, you could do:

`Group.align(25, 4, 32, 32)`

This will align the children into a grid of 25x4, again using 32 pixels per grid cell.

You can choose to set _either_ the `width` or `height` value to -1. Doing so tells the method to keep on aligning children until there are no children left. For example if this Group had 48 children in it, the following:

`Group.align(-1, 8, 32, 32)`

... will align the children so that there are 8 children vertically (the second argument), and each row will contain 6 sprites, except the last one, which will contain 5 (totaling 48)

You can also do:

`Group.align(10, -1, 32, 32)`

In this case it will create a grid 10 wide, and as tall as it needs to be in order to fit all of the children in.

The `position` property allows you to control where in each grid cell the child is positioned. This is a constant and can be one of `Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` or `Phaser.BOTTOM_RIGHT`.

The final argument; `offset` lets you start the alignment from a specific child index.

func (*Group) Align1O

func (self *Group) Align1O(width int, height int, cellWidth int, cellHeight int, position int) bool

Align1O This method iterates through all children in the Group (regardless if they are visible or exist) and then changes their position so they are arranged in a Grid formation. Children must have the `alignTo` method in order to be positioned by this call. All default Phaser Game Objects have this.

The grid dimensions are determined by the first four arguments. The `width` and `height` arguments relate to the width and height of the grid respectively.

For example if the Group had 100 children in it:

`Group.align(10, 10, 32, 32)`

This will align all of the children into a grid formation of 10x10, using 32 pixels per grid cell. If you want a wider grid, you could do:

`Group.align(25, 4, 32, 32)`

This will align the children into a grid of 25x4, again using 32 pixels per grid cell.

You can choose to set _either_ the `width` or `height` value to -1. Doing so tells the method to keep on aligning children until there are no children left. For example if this Group had 48 children in it, the following:

`Group.align(-1, 8, 32, 32)`

... will align the children so that there are 8 children vertically (the second argument), and each row will contain 6 sprites, except the last one, which will contain 5 (totaling 48)

You can also do:

`Group.align(10, -1, 32, 32)`

In this case it will create a grid 10 wide, and as tall as it needs to be in order to fit all of the children in.

The `position` property allows you to control where in each grid cell the child is positioned. This is a constant and can be one of `Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` or `Phaser.BOTTOM_RIGHT`.

The final argument; `offset` lets you start the alignment from a specific child index.

func (*Group) Align2O

func (self *Group) Align2O(width int, height int, cellWidth int, cellHeight int, position int, offset int) bool

Align2O This method iterates through all children in the Group (regardless if they are visible or exist) and then changes their position so they are arranged in a Grid formation. Children must have the `alignTo` method in order to be positioned by this call. All default Phaser Game Objects have this.

The grid dimensions are determined by the first four arguments. The `width` and `height` arguments relate to the width and height of the grid respectively.

For example if the Group had 100 children in it:

`Group.align(10, 10, 32, 32)`

This will align all of the children into a grid formation of 10x10, using 32 pixels per grid cell. If you want a wider grid, you could do:

`Group.align(25, 4, 32, 32)`

This will align the children into a grid of 25x4, again using 32 pixels per grid cell.

You can choose to set _either_ the `width` or `height` value to -1. Doing so tells the method to keep on aligning children until there are no children left. For example if this Group had 48 children in it, the following:

`Group.align(-1, 8, 32, 32)`

... will align the children so that there are 8 children vertically (the second argument), and each row will contain 6 sprites, except the last one, which will contain 5 (totaling 48)

You can also do:

`Group.align(10, -1, 32, 32)`

In this case it will create a grid 10 wide, and as tall as it needs to be in order to fit all of the children in.

The `position` property allows you to control where in each grid cell the child is positioned. This is a constant and can be one of `Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` or `Phaser.BOTTOM_RIGHT`.

The final argument; `offset` lets you start the alignment from a specific child index.

func (*Group) AlignI

func (self *Group) AlignI(args ...interface{}) bool

AlignI This method iterates through all children in the Group (regardless if they are visible or exist) and then changes their position so they are arranged in a Grid formation. Children must have the `alignTo` method in order to be positioned by this call. All default Phaser Game Objects have this.

The grid dimensions are determined by the first four arguments. The `width` and `height` arguments relate to the width and height of the grid respectively.

For example if the Group had 100 children in it:

`Group.align(10, 10, 32, 32)`

This will align all of the children into a grid formation of 10x10, using 32 pixels per grid cell. If you want a wider grid, you could do:

`Group.align(25, 4, 32, 32)`

This will align the children into a grid of 25x4, again using 32 pixels per grid cell.

You can choose to set _either_ the `width` or `height` value to -1. Doing so tells the method to keep on aligning children until there are no children left. For example if this Group had 48 children in it, the following:

`Group.align(-1, 8, 32, 32)`

... will align the children so that there are 8 children vertically (the second argument), and each row will contain 6 sprites, except the last one, which will contain 5 (totaling 48)

You can also do:

`Group.align(10, -1, 32, 32)`

In this case it will create a grid 10 wide, and as tall as it needs to be in order to fit all of the children in.

The `position` property allows you to control where in each grid cell the child is positioned. This is a constant and can be one of `Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` or `Phaser.BOTTOM_RIGHT`.

The final argument; `offset` lets you start the alignment from a specific child index.

func (*Group) Alive

func (self *Group) Alive() bool

Alive The alive property is useful for Groups that are children of other Groups and need to be included/excluded in checks like forEachAlive.

func (*Group) Angle

func (self *Group) Angle() int

Angle The angle of rotation of the group container, in degrees.

This adjusts the group itself by modifying its local rotation transform.

This has no impact on the rotation/angle properties of the children, but it will update their worldTransform and on-screen orientation and position.

func (*Group) AscendingSortHandler

func (self *Group) AscendingSortHandler(a interface{}, b interface{})

AscendingSortHandler An internal helper function for the sort process.

func (*Group) AscendingSortHandlerI

func (self *Group) AscendingSortHandlerI(args ...interface{})

AscendingSortHandlerI An internal helper function for the sort process.

func (*Group) Bottom

func (self *Group) Bottom() int

Bottom The bottom coordinate of this Group.

It is derived by calling `getBounds`, calculating the Groups dimensions based on its visible children.

func (*Group) BringToTop

func (self *Group) BringToTop(child interface{}) interface{}

BringToTop Brings the given child to the top of this group so it renders above all other children.

func (*Group) BringToTopI

func (self *Group) BringToTopI(args ...interface{}) interface{}

BringToTopI Brings the given child to the top of this group so it renders above all other children.

func (*Group) CallAll

func (self *Group) CallAll(method string, context string, args interface{})

CallAll Calls a function, specified by name, on all on children.

The function is called for all children regardless if they are dead or alive (see callAllExists for different options). After the method parameter and context you can add as many extra parameters as you like, which will all be passed to the child.

func (*Group) CallAllExists

func (self *Group) CallAllExists(callback string, existsValue bool, parameter interface{})

CallAllExists Calls a function, specified by name, on all children in the group who exist (or do not exist).

After the existsValue parameter you can add as many parameters as you like, which will all be passed to the child callback.

func (*Group) CallAllExistsI

func (self *Group) CallAllExistsI(args ...interface{})

CallAllExistsI Calls a function, specified by name, on all children in the group who exist (or do not exist).

After the existsValue parameter you can add as many parameters as you like, which will all be passed to the child callback.

func (*Group) CallAllI

func (self *Group) CallAllI(args ...interface{})

CallAllI Calls a function, specified by name, on all on children.

The function is called for all children regardless if they are dead or alive (see callAllExists for different options). After the method parameter and context you can add as many extra parameters as you like, which will all be passed to the child.

func (*Group) CallbackFromArray

func (self *Group) CallbackFromArray(child interface{}, callback []interface{}, length int)

CallbackFromArray Returns a reference to a function that exists on a child of the group based on the given callback array.

func (*Group) CallbackFromArrayI

func (self *Group) CallbackFromArrayI(args ...interface{})

CallbackFromArrayI Returns a reference to a function that exists on a child of the group based on the given callback array.

func (*Group) CameraOffset

func (self *Group) CameraOffset() *Point

CameraOffset If this object is {@link Phaser.Group#fixedToCamera fixedToCamera} then this stores the x/y position offset relative to the top-left of the camera view. If the parent of this Group is also `fixedToCamera` then the offset here is in addition to that and should typically be disabled.

func (*Group) CenterX

func (self *Group) CenterX() int

CenterX The center x coordinate of this Group.

It is derived by calling `getBounds`, calculating the Groups dimensions based on its visible children.

func (*Group) CenterY

func (self *Group) CenterY() int

CenterY The center y coordinate of this Group.

It is derived by calling `getBounds`, calculating the Groups dimensions based on its visible children.

func (*Group) CheckAll

func (self *Group) CheckAll(key string, value interface{})

CheckAll Quickly check that the same property across all children of this group is equal to the given value.

This call doesn't descend down children, so if you have a Group inside of this group, the property will be checked on the group but not its children.

func (*Group) CheckAll1O

func (self *Group) CheckAll1O(key string, value interface{}, checkAlive bool)

CheckAll1O Quickly check that the same property across all children of this group is equal to the given value.

This call doesn't descend down children, so if you have a Group inside of this group, the property will be checked on the group but not its children.

func (*Group) CheckAll2O

func (self *Group) CheckAll2O(key string, value interface{}, checkAlive bool, checkVisible bool)

CheckAll2O Quickly check that the same property across all children of this group is equal to the given value.

This call doesn't descend down children, so if you have a Group inside of this group, the property will be checked on the group but not its children.

func (*Group) CheckAll3O

func (self *Group) CheckAll3O(key string, value interface{}, checkAlive bool, checkVisible bool, force bool)

CheckAll3O Quickly check that the same property across all children of this group is equal to the given value.

This call doesn't descend down children, so if you have a Group inside of this group, the property will be checked on the group but not its children.

func (*Group) CheckAllI

func (self *Group) CheckAllI(args ...interface{})

CheckAllI Quickly check that the same property across all children of this group is equal to the given value.

This call doesn't descend down children, so if you have a Group inside of this group, the property will be checked on the group but not its children.

func (*Group) CheckProperty

func (self *Group) CheckProperty(child interface{}, key []interface{}, value interface{}) bool

CheckProperty Checks a property for the given value on the child.

func (*Group) CheckProperty1O

func (self *Group) CheckProperty1O(child interface{}, key []interface{}, value interface{}, force bool) bool

CheckProperty1O Checks a property for the given value on the child.

func (*Group) CheckPropertyI

func (self *Group) CheckPropertyI(args ...interface{}) bool

CheckPropertyI Checks a property for the given value on the child.

func (*Group) Children

func (self *Group) Children() []DisplayObject

Children [read-only] The array of children of this container.

func (*Group) ClassType

func (self *Group) ClassType() interface{}

ClassType The type of objects that will be created when using {@link Phaser.Group#create create} or {@link Phaser.Group#createMultiple createMultiple}.

Any object may be used but it should extend either Sprite or Image and accept the same constructor arguments: when a new object is created it is passed the following parameters to its constructor: `(game, x, y, key, frame)`.

func (*Group) Contains

func (self *Group) Contains(child *DisplayObject) bool

Contains Determines whether the specified display object is a child of the DisplayObjectContainer instance or the instance itself.

func (*Group) ContainsI

func (self *Group) ContainsI(args ...interface{}) bool

ContainsI Determines whether the specified display object is a child of the DisplayObjectContainer instance or the instance itself.

func (*Group) CountDead

func (self *Group) CountDead() int

CountDead Get the number of dead children in this group.

func (*Group) CountDeadI

func (self *Group) CountDeadI(args ...interface{}) int

CountDeadI Get the number of dead children in this group.

func (*Group) CountLiving

func (self *Group) CountLiving() int

CountLiving Get the number of living children in this group.

func (*Group) CountLivingI

func (self *Group) CountLivingI(args ...interface{}) int

CountLivingI Get the number of living children in this group.

func (*Group) Create

func (self *Group) Create(x int, y int) *DisplayObject

Create Creates a new Phaser.Sprite object and adds it to the top of this group.

Use {@link Phaser.Group#classType classType} to change the type of object created.

The child is automatically added to the top of the group, and is displayed above every previous child.

Or if the _optional_ index is specified, the child is added at the location specified by the index value, this allows you to control child ordering.

If `Group.enableBody` is set, then a physics body will be created on the object, so long as one does not already exist.

If `Group.inputEnableChildren` is set, then an Input Handler will be created on the object, so long as one does not already exist.

func (*Group) Create1O

func (self *Group) Create1O(x int, y int, key interface{}) *DisplayObject

Create1O Creates a new Phaser.Sprite object and adds it to the top of this group.

Use {@link Phaser.Group#classType classType} to change the type of object created.

The child is automatically added to the top of the group, and is displayed above every previous child.

Or if the _optional_ index is specified, the child is added at the location specified by the index value, this allows you to control child ordering.

If `Group.enableBody` is set, then a physics body will be created on the object, so long as one does not already exist.

If `Group.inputEnableChildren` is set, then an Input Handler will be created on the object, so long as one does not already exist.

func (*Group) Create2O

func (self *Group) Create2O(x int, y int, key interface{}, frame interface{}) *DisplayObject

Create2O Creates a new Phaser.Sprite object and adds it to the top of this group.

Use {@link Phaser.Group#classType classType} to change the type of object created.

The child is automatically added to the top of the group, and is displayed above every previous child.

Or if the _optional_ index is specified, the child is added at the location specified by the index value, this allows you to control child ordering.

If `Group.enableBody` is set, then a physics body will be created on the object, so long as one does not already exist.

If `Group.inputEnableChildren` is set, then an Input Handler will be created on the object, so long as one does not already exist.

func (*Group) Create3O

func (self *Group) Create3O(x int, y int, key interface{}, frame interface{}, exists bool) *DisplayObject

Create3O Creates a new Phaser.Sprite object and adds it to the top of this group.

Use {@link Phaser.Group#classType classType} to change the type of object created.

The child is automatically added to the top of the group, and is displayed above every previous child.

Or if the _optional_ index is specified, the child is added at the location specified by the index value, this allows you to control child ordering.

If `Group.enableBody` is set, then a physics body will be created on the object, so long as one does not already exist.

If `Group.inputEnableChildren` is set, then an Input Handler will be created on the object, so long as one does not already exist.

func (*Group) Create4O

func (self *Group) Create4O(x int, y int, key interface{}, frame interface{}, exists bool, index int) *DisplayObject

Create4O Creates a new Phaser.Sprite object and adds it to the top of this group.

Use {@link Phaser.Group#classType classType} to change the type of object created.

The child is automatically added to the top of the group, and is displayed above every previous child.

Or if the _optional_ index is specified, the child is added at the location specified by the index value, this allows you to control child ordering.

If `Group.enableBody` is set, then a physics body will be created on the object, so long as one does not already exist.

If `Group.inputEnableChildren` is set, then an Input Handler will be created on the object, so long as one does not already exist.

func (*Group) CreateI

func (self *Group) CreateI(args ...interface{}) *DisplayObject

CreateI Creates a new Phaser.Sprite object and adds it to the top of this group.

Use {@link Phaser.Group#classType classType} to change the type of object created.

The child is automatically added to the top of the group, and is displayed above every previous child.

Or if the _optional_ index is specified, the child is added at the location specified by the index value, this allows you to control child ordering.

If `Group.enableBody` is set, then a physics body will be created on the object, so long as one does not already exist.

If `Group.inputEnableChildren` is set, then an Input Handler will be created on the object, so long as one does not already exist.

func (*Group) CreateMultiple

func (self *Group) CreateMultiple(quantity int, key interface{}) []interface{}

CreateMultiple Creates multiple Phaser.Sprite objects and adds them to the top of this Group.

This method is useful if you need to quickly generate a pool of sprites, such as bullets.

Use {@link Phaser.Group#classType classType} to change the type of object created.

You can provide an array as the `key` and / or `frame` arguments. When you do this it will create `quantity` Sprites for every key (and frame) in the arrays.

For example:

`createMultiple(25, ['ball', 'carrot'])`

In the above code there are 2 keys (ball and carrot) which means that 50 sprites will be created in total, 25 of each. You can also have the `frame` as an array:

`createMultiple(5, 'bricks', [0, 1, 2, 3])`

In the above there is one key (bricks), which is a sprite sheet. The frames array tells this method to use frames 0, 1, 2 and 3. So in total it will create 20 sprites, because the quantity was set to 5, so that is 5 brick sprites of frame 0, 5 brick sprites with frame 1, and so on.

If you set both the key and frame arguments to be arrays then understand it will create a total quantity of sprites equal to the size of both arrays times each other. I.e.:

`createMultiple(20, ['diamonds', 'balls'], [0, 1, 2])`

The above will create 20 'diamonds' of frame 0, 20 with frame 1 and 20 with frame 2. It will then create 20 'balls' of frame 0, 20 with frame 1 and 20 with frame 2. In total it will have created 120 sprites.

By default the Sprites will have their `exists` property set to `false`, and they will be positioned at 0x0, relative to the `Group.x / y` values.

If `Group.enableBody` is set, then a physics body will be created on the objects, so long as one does not already exist.

If `Group.inputEnableChildren` is set, then an Input Handler will be created on the objects, so long as one does not already exist.

func (*Group) CreateMultiple1O

func (self *Group) CreateMultiple1O(quantity int, key interface{}, frame interface{}) []interface{}

CreateMultiple1O Creates multiple Phaser.Sprite objects and adds them to the top of this Group.

This method is useful if you need to quickly generate a pool of sprites, such as bullets.

Use {@link Phaser.Group#classType classType} to change the type of object created.

You can provide an array as the `key` and / or `frame` arguments. When you do this it will create `quantity` Sprites for every key (and frame) in the arrays.

For example:

`createMultiple(25, ['ball', 'carrot'])`

In the above code there are 2 keys (ball and carrot) which means that 50 sprites will be created in total, 25 of each. You can also have the `frame` as an array:

`createMultiple(5, 'bricks', [0, 1, 2, 3])`

In the above there is one key (bricks), which is a sprite sheet. The frames array tells this method to use frames 0, 1, 2 and 3. So in total it will create 20 sprites, because the quantity was set to 5, so that is 5 brick sprites of frame 0, 5 brick sprites with frame 1, and so on.

If you set both the key and frame arguments to be arrays then understand it will create a total quantity of sprites equal to the size of both arrays times each other. I.e.:

`createMultiple(20, ['diamonds', 'balls'], [0, 1, 2])`

The above will create 20 'diamonds' of frame 0, 20 with frame 1 and 20 with frame 2. It will then create 20 'balls' of frame 0, 20 with frame 1 and 20 with frame 2. In total it will have created 120 sprites.

By default the Sprites will have their `exists` property set to `false`, and they will be positioned at 0x0, relative to the `Group.x / y` values.

If `Group.enableBody` is set, then a physics body will be created on the objects, so long as one does not already exist.

If `Group.inputEnableChildren` is set, then an Input Handler will be created on the objects, so long as one does not already exist.

func (*Group) CreateMultiple2O

func (self *Group) CreateMultiple2O(quantity int, key interface{}, frame interface{}, exists bool) []interface{}

CreateMultiple2O Creates multiple Phaser.Sprite objects and adds them to the top of this Group.

This method is useful if you need to quickly generate a pool of sprites, such as bullets.

Use {@link Phaser.Group#classType classType} to change the type of object created.

You can provide an array as the `key` and / or `frame` arguments. When you do this it will create `quantity` Sprites for every key (and frame) in the arrays.

For example:

`createMultiple(25, ['ball', 'carrot'])`

In the above code there are 2 keys (ball and carrot) which means that 50 sprites will be created in total, 25 of each. You can also have the `frame` as an array:

`createMultiple(5, 'bricks', [0, 1, 2, 3])`

In the above there is one key (bricks), which is a sprite sheet. The frames array tells this method to use frames 0, 1, 2 and 3. So in total it will create 20 sprites, because the quantity was set to 5, so that is 5 brick sprites of frame 0, 5 brick sprites with frame 1, and so on.

If you set both the key and frame arguments to be arrays then understand it will create a total quantity of sprites equal to the size of both arrays times each other. I.e.:

`createMultiple(20, ['diamonds', 'balls'], [0, 1, 2])`

The above will create 20 'diamonds' of frame 0, 20 with frame 1 and 20 with frame 2. It will then create 20 'balls' of frame 0, 20 with frame 1 and 20 with frame 2. In total it will have created 120 sprites.

By default the Sprites will have their `exists` property set to `false`, and they will be positioned at 0x0, relative to the `Group.x / y` values.

If `Group.enableBody` is set, then a physics body will be created on the objects, so long as one does not already exist.

If `Group.inputEnableChildren` is set, then an Input Handler will be created on the objects, so long as one does not already exist.

func (*Group) CreateMultipleI

func (self *Group) CreateMultipleI(args ...interface{}) []interface{}

CreateMultipleI Creates multiple Phaser.Sprite objects and adds them to the top of this Group.

This method is useful if you need to quickly generate a pool of sprites, such as bullets.

Use {@link Phaser.Group#classType classType} to change the type of object created.

You can provide an array as the `key` and / or `frame` arguments. When you do this it will create `quantity` Sprites for every key (and frame) in the arrays.

For example:

`createMultiple(25, ['ball', 'carrot'])`

In the above code there are 2 keys (ball and carrot) which means that 50 sprites will be created in total, 25 of each. You can also have the `frame` as an array:

`createMultiple(5, 'bricks', [0, 1, 2, 3])`

In the above there is one key (bricks), which is a sprite sheet. The frames array tells this method to use frames 0, 1, 2 and 3. So in total it will create 20 sprites, because the quantity was set to 5, so that is 5 brick sprites of frame 0, 5 brick sprites with frame 1, and so on.

If you set both the key and frame arguments to be arrays then understand it will create a total quantity of sprites equal to the size of both arrays times each other. I.e.:

`createMultiple(20, ['diamonds', 'balls'], [0, 1, 2])`

The above will create 20 'diamonds' of frame 0, 20 with frame 1 and 20 with frame 2. It will then create 20 'balls' of frame 0, 20 with frame 1 and 20 with frame 2. In total it will have created 120 sprites.

By default the Sprites will have their `exists` property set to `false`, and they will be positioned at 0x0, relative to the `Group.x / y` values.

If `Group.enableBody` is set, then a physics body will be created on the objects, so long as one does not already exist.

If `Group.inputEnableChildren` is set, then an Input Handler will be created on the objects, so long as one does not already exist.

func (*Group) Cursor

func (self *Group) Cursor() *DisplayObject

Cursor The current display object that the group cursor is pointing to, if any. (Can be set manually.)

The cursor is a way to iterate through the children in a Group using {@link Phaser.Group#next next} and {@link Phaser.Group#previous previous}.

func (*Group) CursorIndex

func (self *Group) CursorIndex() int

CursorIndex The current index of the Group cursor. Advance it with Group.next.

func (*Group) CustomSort

func (self *Group) CustomSort(sortHandler interface{})

CustomSort Sort the children in the group according to custom sort function.

The `sortHandler` is provided the two parameters: the two children involved in the comparison (a and b). It should return -1 if `a > b`, 1 if `a < b` or 0 if `a === b`.

func (*Group) CustomSort1O

func (self *Group) CustomSort1O(sortHandler interface{}, context interface{})

CustomSort1O Sort the children in the group according to custom sort function.

The `sortHandler` is provided the two parameters: the two children involved in the comparison (a and b). It should return -1 if `a > b`, 1 if `a < b` or 0 if `a === b`.

func (*Group) CustomSortI

func (self *Group) CustomSortI(args ...interface{})

CustomSortI Sort the children in the group according to custom sort function.

The `sortHandler` is provided the two parameters: the two children involved in the comparison (a and b). It should return -1 if `a > b`, 1 if `a < b` or 0 if `a === b`.

func (*Group) DescendingSortHandler

func (self *Group) DescendingSortHandler(a interface{}, b interface{})

DescendingSortHandler An internal helper function for the sort process.

func (*Group) DescendingSortHandlerI

func (self *Group) DescendingSortHandlerI(args ...interface{})

DescendingSortHandlerI An internal helper function for the sort process.

func (*Group) Destroy

func (self *Group) Destroy()

Destroy Destroys this group.

Removes all children, then removes this group from its parent and nulls references.

func (*Group) Destroy1O

func (self *Group) Destroy1O(destroyChildren bool)

Destroy1O Destroys this group.

Removes all children, then removes this group from its parent and nulls references.

func (*Group) Destroy2O

func (self *Group) Destroy2O(destroyChildren bool, soft bool)

Destroy2O Destroys this group.

Removes all children, then removes this group from its parent and nulls references.

func (*Group) DestroyI

func (self *Group) DestroyI(args ...interface{})

DestroyI Destroys this group.

Removes all children, then removes this group from its parent and nulls references.

func (*Group) DivideAll

func (self *Group) DivideAll(property string, amount int, checkAlive bool, checkVisible bool)

DivideAll Divides the given property by the amount on all children in this group.

`Group.divideAll('x', 2)` will half the child.x value for each child.

func (*Group) DivideAllI

func (self *Group) DivideAllI(args ...interface{})

DivideAllI Divides the given property by the amount on all children in this group.

`Group.divideAll('x', 2)` will half the child.x value for each child.

func (*Group) EnableBody

func (self *Group) EnableBody() bool

EnableBody If true all Sprites created by, or added to this group, will have a physics body enabled on them.

If there are children already in the Group at the time you set this property, they are not changed.

The default body type is controlled with {@link Phaser.Group#physicsBodyType physicsBodyType}.

func (*Group) EnableBodyDebug

func (self *Group) EnableBodyDebug() bool

EnableBodyDebug If true when a physics body is created (via {@link Phaser.Group#enableBody enableBody}) it will create a physics debug object as well.

This only works for P2 bodies.

func (*Group) Exists

func (self *Group) Exists() bool

Exists If exists is true the group is updated, otherwise it is skipped.

func (*Group) Filter

func (self *Group) Filter(predicate interface{}) *ArraySet

Filter Find children matching a certain predicate.

For example:

var healthyList = Group.filter(function(child, index, children) {
    return child.health > 10 ? true : false;
}, true);
healthyList.callAll('attack');

Note: Currently this will skip any children which are Groups themselves.

func (*Group) Filter1O

func (self *Group) Filter1O(predicate interface{}, checkExists bool) *ArraySet

Filter1O Find children matching a certain predicate.

For example:

var healthyList = Group.filter(function(child, index, children) {
    return child.health > 10 ? true : false;
}, true);
healthyList.callAll('attack');

Note: Currently this will skip any children which are Groups themselves.

func (*Group) FilterI

func (self *Group) FilterI(args ...interface{}) *ArraySet

FilterI Find children matching a certain predicate.

For example:

var healthyList = Group.filter(function(child, index, children) {
    return child.health > 10 ? true : false;
}, true);
healthyList.callAll('attack');

Note: Currently this will skip any children which are Groups themselves.

func (*Group) FixedToCamera

func (self *Group) FixedToCamera() bool

FixedToCamera A Group that is fixed to the camera uses its x/y coordinates as offsets from the top left of the camera. These are stored in Group.cameraOffset.

Note that the cameraOffset values are in addition to any parent in the display list. So if this Group was in a Group that has x: 200, then this will be added to the cameraOffset.x

func (*Group) ForEach

func (self *Group) ForEach(callback interface{}, callbackContext interface{})

ForEach Call a function on each child in this group.

Additional arguments for the callback can be specified after the `checkExists` parameter. For example,

Group.forEach(awardBonusGold, this, true, 100, 500)

would invoke `awardBonusGold` function with the parameters `(child, 100, 500)`.

Note: This check will skip any children which are Groups themselves.

func (*Group) ForEach1O

func (self *Group) ForEach1O(callback interface{}, callbackContext interface{}, checkExists bool)

ForEach1O Call a function on each child in this group.

Additional arguments for the callback can be specified after the `checkExists` parameter. For example,

Group.forEach(awardBonusGold, this, true, 100, 500)

would invoke `awardBonusGold` function with the parameters `(child, 100, 500)`.

Note: This check will skip any children which are Groups themselves.

func (*Group) ForEach2O

func (self *Group) ForEach2O(callback interface{}, callbackContext interface{}, checkExists bool, args interface{})

ForEach2O Call a function on each child in this group.

Additional arguments for the callback can be specified after the `checkExists` parameter. For example,

Group.forEach(awardBonusGold, this, true, 100, 500)

would invoke `awardBonusGold` function with the parameters `(child, 100, 500)`.

Note: This check will skip any children which are Groups themselves.

func (*Group) ForEachAlive

func (self *Group) ForEachAlive(callback interface{}, callbackContext interface{})

ForEachAlive Call a function on each alive child in this group.

See {@link Phaser.Group#forEach forEach} for details.

func (*Group) ForEachAlive1O

func (self *Group) ForEachAlive1O(callback interface{}, callbackContext interface{}, args interface{})

ForEachAlive1O Call a function on each alive child in this group.

See {@link Phaser.Group#forEach forEach} for details.

func (*Group) ForEachAliveI

func (self *Group) ForEachAliveI(args ...interface{})

ForEachAliveI Call a function on each alive child in this group.

See {@link Phaser.Group#forEach forEach} for details.

func (*Group) ForEachDead

func (self *Group) ForEachDead(callback interface{}, callbackContext interface{})

ForEachDead Call a function on each dead child in this group.

See {@link Phaser.Group#forEach forEach} for details.

func (*Group) ForEachDead1O

func (self *Group) ForEachDead1O(callback interface{}, callbackContext interface{}, args interface{})

ForEachDead1O Call a function on each dead child in this group.

See {@link Phaser.Group#forEach forEach} for details.

func (*Group) ForEachDeadI

func (self *Group) ForEachDeadI(args ...interface{})

ForEachDeadI Call a function on each dead child in this group.

See {@link Phaser.Group#forEach forEach} for details.

func (*Group) ForEachExists

func (self *Group) ForEachExists(callback interface{}, callbackContext interface{})

ForEachExists Call a function on each existing child in this group.

See {@link Phaser.Group#forEach forEach} for details.

func (*Group) ForEachExists1O

func (self *Group) ForEachExists1O(callback interface{}, callbackContext interface{}, args interface{})

ForEachExists1O Call a function on each existing child in this group.

See {@link Phaser.Group#forEach forEach} for details.

func (*Group) ForEachExistsI

func (self *Group) ForEachExistsI(args ...interface{})

ForEachExistsI Call a function on each existing child in this group.

See {@link Phaser.Group#forEach forEach} for details.

func (*Group) ForEachI

func (self *Group) ForEachI(args ...interface{})

ForEachI Call a function on each child in this group.

Additional arguments for the callback can be specified after the `checkExists` parameter. For example,

Group.forEach(awardBonusGold, this, true, 100, 500)

would invoke `awardBonusGold` function with the parameters `(child, 100, 500)`.

Note: This check will skip any children which are Groups themselves.

func (*Group) Game

func (self *Group) Game() *Game

Game A reference to the currently running Game.

func (*Group) GetAll

func (self *Group) GetAll() interface{}

GetAll Returns all children in this Group.

You can optionally specify a matching criteria using the `property` and `value` arguments.

For example: `getAll('exists', true)` would return only children that have their exists property set.

Optionally you can specify a start and end index. For example if this Group had 100 children, and you set `startIndex` to 0 and `endIndex` to 50, it would return a random child from only the first 50 children in the Group.

func (*Group) GetAll1O

func (self *Group) GetAll1O(property string) interface{}

GetAll1O Returns all children in this Group.

You can optionally specify a matching criteria using the `property` and `value` arguments.

For example: `getAll('exists', true)` would return only children that have their exists property set.

Optionally you can specify a start and end index. For example if this Group had 100 children, and you set `startIndex` to 0 and `endIndex` to 50, it would return a random child from only the first 50 children in the Group.

func (*Group) GetAll2O

func (self *Group) GetAll2O(property string, value interface{}) interface{}

GetAll2O Returns all children in this Group.

You can optionally specify a matching criteria using the `property` and `value` arguments.

For example: `getAll('exists', true)` would return only children that have their exists property set.

Optionally you can specify a start and end index. For example if this Group had 100 children, and you set `startIndex` to 0 and `endIndex` to 50, it would return a random child from only the first 50 children in the Group.

func (*Group) GetAll3O

func (self *Group) GetAll3O(property string, value interface{}, startIndex int) interface{}

GetAll3O Returns all children in this Group.

You can optionally specify a matching criteria using the `property` and `value` arguments.

For example: `getAll('exists', true)` would return only children that have their exists property set.

Optionally you can specify a start and end index. For example if this Group had 100 children, and you set `startIndex` to 0 and `endIndex` to 50, it would return a random child from only the first 50 children in the Group.

func (*Group) GetAll4O

func (self *Group) GetAll4O(property string, value interface{}, startIndex int, endIndex int) interface{}

GetAll4O Returns all children in this Group.

You can optionally specify a matching criteria using the `property` and `value` arguments.

For example: `getAll('exists', true)` would return only children that have their exists property set.

Optionally you can specify a start and end index. For example if this Group had 100 children, and you set `startIndex` to 0 and `endIndex` to 50, it would return a random child from only the first 50 children in the Group.

func (*Group) GetAllI

func (self *Group) GetAllI(args ...interface{}) interface{}

GetAllI Returns all children in this Group.

You can optionally specify a matching criteria using the `property` and `value` arguments.

For example: `getAll('exists', true)` would return only children that have their exists property set.

Optionally you can specify a start and end index. For example if this Group had 100 children, and you set `startIndex` to 0 and `endIndex` to 50, it would return a random child from only the first 50 children in the Group.

func (*Group) GetAt

func (self *Group) GetAt(index int) interface{}

GetAt Returns the child found at the given index within this group.

func (*Group) GetAtI

func (self *Group) GetAtI(args ...interface{}) interface{}

GetAtI Returns the child found at the given index within this group.

func (*Group) GetBottom

func (self *Group) GetBottom() interface{}

GetBottom Returns the child at the bottom of this group.

The bottom child the child being displayed (rendered) below every other child.

func (*Group) GetBottomI

func (self *Group) GetBottomI(args ...interface{}) interface{}

GetBottomI Returns the child at the bottom of this group.

The bottom child the child being displayed (rendered) below every other child.

func (*Group) GetBounds

func (self *Group) GetBounds() *Rectangle

GetBounds Retrieves the global bounds of the displayObjectContainer as a rectangle. The bounds calculation takes all visible children into consideration.

func (*Group) GetBounds1O

func (self *Group) GetBounds1O(targetCoordinateSpace interface{}) *Rectangle

GetBounds1O Retrieves the global bounds of the displayObjectContainer as a rectangle. The bounds calculation takes all visible children into consideration.

func (*Group) GetBoundsI

func (self *Group) GetBoundsI(args ...interface{}) *Rectangle

GetBoundsI Retrieves the global bounds of the displayObjectContainer as a rectangle. The bounds calculation takes all visible children into consideration.

func (*Group) GetByName

func (self *Group) GetByName(name string) interface{}

GetByName Searches the Group for the first instance of a child with the `name` property matching the given argument. Should more than one child have the same name only the first instance is returned.

func (*Group) GetByNameI

func (self *Group) GetByNameI(args ...interface{}) interface{}

GetByNameI Searches the Group for the first instance of a child with the `name` property matching the given argument. Should more than one child have the same name only the first instance is returned.

func (*Group) GetChildAt

func (self *Group) GetChildAt(index int) *DisplayObject

GetChildAt Returns the child at the specified index

func (*Group) GetChildAtI

func (self *Group) GetChildAtI(args ...interface{}) *DisplayObject

GetChildAtI Returns the child at the specified index

func (*Group) GetChildIndex

func (self *Group) GetChildIndex(child *DisplayObject) int

GetChildIndex Returns the index position of a child DisplayObject instance

func (*Group) GetChildIndexI

func (self *Group) GetChildIndexI(args ...interface{}) int

GetChildIndexI Returns the index position of a child DisplayObject instance

func (*Group) GetClosestTo

func (self *Group) GetClosestTo(object interface{}) interface{}

GetClosestTo Get the closest child to given Object, with optional callback to filter children.

This can be a Sprite, Group, Image or any object with public x and y properties.

'close' is determined by the distance from the objects `x` and `y` properties compared to the childs `x` and `y` properties.

You can use the optional `callback` argument to apply your own filter to the distance checks. If the child is closer then the previous child, it will be sent to `callback` as the first argument, with the distance as the second. The callback should return `true` if it passes your filtering criteria, otherwise it should return `false`.

func (*Group) GetClosestTo1O

func (self *Group) GetClosestTo1O(object interface{}, callback interface{}) interface{}

GetClosestTo1O Get the closest child to given Object, with optional callback to filter children.

This can be a Sprite, Group, Image or any object with public x and y properties.

'close' is determined by the distance from the objects `x` and `y` properties compared to the childs `x` and `y` properties.

You can use the optional `callback` argument to apply your own filter to the distance checks. If the child is closer then the previous child, it will be sent to `callback` as the first argument, with the distance as the second. The callback should return `true` if it passes your filtering criteria, otherwise it should return `false`.

func (*Group) GetClosestTo2O

func (self *Group) GetClosestTo2O(object interface{}, callback interface{}, callbackContext interface{}) interface{}

GetClosestTo2O Get the closest child to given Object, with optional callback to filter children.

This can be a Sprite, Group, Image or any object with public x and y properties.

'close' is determined by the distance from the objects `x` and `y` properties compared to the childs `x` and `y` properties.

You can use the optional `callback` argument to apply your own filter to the distance checks. If the child is closer then the previous child, it will be sent to `callback` as the first argument, with the distance as the second. The callback should return `true` if it passes your filtering criteria, otherwise it should return `false`.

func (*Group) GetClosestToI

func (self *Group) GetClosestToI(args ...interface{}) interface{}

GetClosestToI Get the closest child to given Object, with optional callback to filter children.

This can be a Sprite, Group, Image or any object with public x and y properties.

'close' is determined by the distance from the objects `x` and `y` properties compared to the childs `x` and `y` properties.

You can use the optional `callback` argument to apply your own filter to the distance checks. If the child is closer then the previous child, it will be sent to `callback` as the first argument, with the distance as the second. The callback should return `true` if it passes your filtering criteria, otherwise it should return `false`.

func (*Group) GetFirstAlive

func (self *Group) GetFirstAlive() *DisplayObject

GetFirstAlive Get the first child that is alive (`child.alive === true`).

This is handy for choosing a squad leader, etc.

You can use the optional argument `createIfNull` to create a new Game Object if no alive ones were found in this Group.

It works by calling `Group.create` passing it the parameters given to this method, and returning the new child.

If a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child will be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.

func (*Group) GetFirstAlive1O

func (self *Group) GetFirstAlive1O(createIfNull bool) *DisplayObject

GetFirstAlive1O Get the first child that is alive (`child.alive === true`).

This is handy for choosing a squad leader, etc.

You can use the optional argument `createIfNull` to create a new Game Object if no alive ones were found in this Group.

It works by calling `Group.create` passing it the parameters given to this method, and returning the new child.

If a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child will be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.

func (*Group) GetFirstAlive2O

func (self *Group) GetFirstAlive2O(createIfNull bool, x int) *DisplayObject

GetFirstAlive2O Get the first child that is alive (`child.alive === true`).

This is handy for choosing a squad leader, etc.

You can use the optional argument `createIfNull` to create a new Game Object if no alive ones were found in this Group.

It works by calling `Group.create` passing it the parameters given to this method, and returning the new child.

If a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child will be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.

func (*Group) GetFirstAlive3O

func (self *Group) GetFirstAlive3O(createIfNull bool, x int, y int) *DisplayObject

GetFirstAlive3O Get the first child that is alive (`child.alive === true`).

This is handy for choosing a squad leader, etc.

You can use the optional argument `createIfNull` to create a new Game Object if no alive ones were found in this Group.

It works by calling `Group.create` passing it the parameters given to this method, and returning the new child.

If a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child will be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.

func (*Group) GetFirstAlive4O

func (self *Group) GetFirstAlive4O(createIfNull bool, x int, y int, key interface{}) *DisplayObject

GetFirstAlive4O Get the first child that is alive (`child.alive === true`).

This is handy for choosing a squad leader, etc.

You can use the optional argument `createIfNull` to create a new Game Object if no alive ones were found in this Group.

It works by calling `Group.create` passing it the parameters given to this method, and returning the new child.

If a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child will be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.

func (*Group) GetFirstAlive5O

func (self *Group) GetFirstAlive5O(createIfNull bool, x int, y int, key interface{}, frame interface{}) *DisplayObject

GetFirstAlive5O Get the first child that is alive (`child.alive === true`).

This is handy for choosing a squad leader, etc.

You can use the optional argument `createIfNull` to create a new Game Object if no alive ones were found in this Group.

It works by calling `Group.create` passing it the parameters given to this method, and returning the new child.

If a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child will be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.

func (*Group) GetFirstAliveI

func (self *Group) GetFirstAliveI(args ...interface{}) *DisplayObject

GetFirstAliveI Get the first child that is alive (`child.alive === true`).

This is handy for choosing a squad leader, etc.

You can use the optional argument `createIfNull` to create a new Game Object if no alive ones were found in this Group.

It works by calling `Group.create` passing it the parameters given to this method, and returning the new child.

If a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child will be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.

func (*Group) GetFirstDead

func (self *Group) GetFirstDead() *DisplayObject

GetFirstDead Get the first child that is dead (`child.alive === false`).

This is handy for checking if everything has been wiped out and adding to the pool as needed.

You can use the optional argument `createIfNull` to create a new Game Object if no dead ones were found in this Group.

It works by calling `Group.create` passing it the parameters given to this method, and returning the new child.

If a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child will be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.

func (*Group) GetFirstDead1O

func (self *Group) GetFirstDead1O(createIfNull bool) *DisplayObject

GetFirstDead1O Get the first child that is dead (`child.alive === false`).

This is handy for checking if everything has been wiped out and adding to the pool as needed.

You can use the optional argument `createIfNull` to create a new Game Object if no dead ones were found in this Group.

It works by calling `Group.create` passing it the parameters given to this method, and returning the new child.

If a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child will be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.

func (*Group) GetFirstDead2O

func (self *Group) GetFirstDead2O(createIfNull bool, x int) *DisplayObject

GetFirstDead2O Get the first child that is dead (`child.alive === false`).

This is handy for checking if everything has been wiped out and adding to the pool as needed.

You can use the optional argument `createIfNull` to create a new Game Object if no dead ones were found in this Group.

It works by calling `Group.create` passing it the parameters given to this method, and returning the new child.

If a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child will be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.

func (*Group) GetFirstDead3O

func (self *Group) GetFirstDead3O(createIfNull bool, x int, y int) *DisplayObject

GetFirstDead3O Get the first child that is dead (`child.alive === false`).

This is handy for checking if everything has been wiped out and adding to the pool as needed.

You can use the optional argument `createIfNull` to create a new Game Object if no dead ones were found in this Group.

It works by calling `Group.create` passing it the parameters given to this method, and returning the new child.

If a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child will be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.

func (*Group) GetFirstDead4O

func (self *Group) GetFirstDead4O(createIfNull bool, x int, y int, key interface{}) *DisplayObject

GetFirstDead4O Get the first child that is dead (`child.alive === false`).

This is handy for checking if everything has been wiped out and adding to the pool as needed.

You can use the optional argument `createIfNull` to create a new Game Object if no dead ones were found in this Group.

It works by calling `Group.create` passing it the parameters given to this method, and returning the new child.

If a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child will be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.

func (*Group) GetFirstDead5O

func (self *Group) GetFirstDead5O(createIfNull bool, x int, y int, key interface{}, frame interface{}) *DisplayObject

GetFirstDead5O Get the first child that is dead (`child.alive === false`).

This is handy for checking if everything has been wiped out and adding to the pool as needed.

You can use the optional argument `createIfNull` to create a new Game Object if no dead ones were found in this Group.

It works by calling `Group.create` passing it the parameters given to this method, and returning the new child.

If a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child will be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.

func (*Group) GetFirstDeadI

func (self *Group) GetFirstDeadI(args ...interface{}) *DisplayObject

GetFirstDeadI Get the first child that is dead (`child.alive === false`).

This is handy for checking if everything has been wiped out and adding to the pool as needed.

You can use the optional argument `createIfNull` to create a new Game Object if no dead ones were found in this Group.

It works by calling `Group.create` passing it the parameters given to this method, and returning the new child.

If a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child will be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.

func (*Group) GetFirstExists

func (self *Group) GetFirstExists() *DisplayObject

GetFirstExists Get the first display object that exists, or doesn't exist.

You can use the optional argument `createIfNull` to create a new Game Object if none matching your exists argument were found in this Group.

It works by calling `Group.create` passing it the parameters given to this method, and returning the new child.

If a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child will be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.

func (*Group) GetFirstExists1O

func (self *Group) GetFirstExists1O(exists bool) *DisplayObject

GetFirstExists1O Get the first display object that exists, or doesn't exist.

You can use the optional argument `createIfNull` to create a new Game Object if none matching your exists argument were found in this Group.

It works by calling `Group.create` passing it the parameters given to this method, and returning the new child.

If a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child will be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.

func (*Group) GetFirstExists2O

func (self *Group) GetFirstExists2O(exists bool, createIfNull bool) *DisplayObject

GetFirstExists2O Get the first display object that exists, or doesn't exist.

You can use the optional argument `createIfNull` to create a new Game Object if none matching your exists argument were found in this Group.

It works by calling `Group.create` passing it the parameters given to this method, and returning the new child.

If a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child will be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.

func (*Group) GetFirstExists3O

func (self *Group) GetFirstExists3O(exists bool, createIfNull bool, x int) *DisplayObject

GetFirstExists3O Get the first display object that exists, or doesn't exist.

You can use the optional argument `createIfNull` to create a new Game Object if none matching your exists argument were found in this Group.

It works by calling `Group.create` passing it the parameters given to this method, and returning the new child.

If a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child will be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.

func (*Group) GetFirstExists4O

func (self *Group) GetFirstExists4O(exists bool, createIfNull bool, x int, y int) *DisplayObject

GetFirstExists4O Get the first display object that exists, or doesn't exist.

You can use the optional argument `createIfNull` to create a new Game Object if none matching your exists argument were found in this Group.

It works by calling `Group.create` passing it the parameters given to this method, and returning the new child.

If a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child will be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.

func (*Group) GetFirstExists5O

func (self *Group) GetFirstExists5O(exists bool, createIfNull bool, x int, y int, key interface{}) *DisplayObject

GetFirstExists5O Get the first display object that exists, or doesn't exist.

You can use the optional argument `createIfNull` to create a new Game Object if none matching your exists argument were found in this Group.

It works by calling `Group.create` passing it the parameters given to this method, and returning the new child.

If a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child will be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.

func (*Group) GetFirstExists6O

func (self *Group) GetFirstExists6O(exists bool, createIfNull bool, x int, y int, key interface{}, frame interface{}) *DisplayObject

GetFirstExists6O Get the first display object that exists, or doesn't exist.

You can use the optional argument `createIfNull` to create a new Game Object if none matching your exists argument were found in this Group.

It works by calling `Group.create` passing it the parameters given to this method, and returning the new child.

If a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child will be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.

func (*Group) GetFirstExistsI

func (self *Group) GetFirstExistsI(args ...interface{}) *DisplayObject

GetFirstExistsI Get the first display object that exists, or doesn't exist.

You can use the optional argument `createIfNull` to create a new Game Object if none matching your exists argument were found in this Group.

It works by calling `Group.create` passing it the parameters given to this method, and returning the new child.

If a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child will be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.

func (*Group) GetFurthestFrom

func (self *Group) GetFurthestFrom(object interface{}) interface{}

GetFurthestFrom Get the child furthest away from the given Object, with optional callback to filter children.

This can be a Sprite, Group, Image or any object with public x and y properties.

'furthest away' is determined by the distance from the objects `x` and `y` properties compared to the childs `x` and `y` properties.

You can use the optional `callback` argument to apply your own filter to the distance checks. If the child is closer then the previous child, it will be sent to `callback` as the first argument, with the distance as the second. The callback should return `true` if it passes your filtering criteria, otherwise it should return `false`.

func (*Group) GetFurthestFrom1O

func (self *Group) GetFurthestFrom1O(object interface{}, callback interface{}) interface{}

GetFurthestFrom1O Get the child furthest away from the given Object, with optional callback to filter children.

This can be a Sprite, Group, Image or any object with public x and y properties.

'furthest away' is determined by the distance from the objects `x` and `y` properties compared to the childs `x` and `y` properties.

You can use the optional `callback` argument to apply your own filter to the distance checks. If the child is closer then the previous child, it will be sent to `callback` as the first argument, with the distance as the second. The callback should return `true` if it passes your filtering criteria, otherwise it should return `false`.

func (*Group) GetFurthestFrom2O

func (self *Group) GetFurthestFrom2O(object interface{}, callback interface{}, callbackContext interface{}) interface{}

GetFurthestFrom2O Get the child furthest away from the given Object, with optional callback to filter children.

This can be a Sprite, Group, Image or any object with public x and y properties.

'furthest away' is determined by the distance from the objects `x` and `y` properties compared to the childs `x` and `y` properties.

You can use the optional `callback` argument to apply your own filter to the distance checks. If the child is closer then the previous child, it will be sent to `callback` as the first argument, with the distance as the second. The callback should return `true` if it passes your filtering criteria, otherwise it should return `false`.

func (*Group) GetFurthestFromI

func (self *Group) GetFurthestFromI(args ...interface{}) interface{}

GetFurthestFromI Get the child furthest away from the given Object, with optional callback to filter children.

This can be a Sprite, Group, Image or any object with public x and y properties.

'furthest away' is determined by the distance from the objects `x` and `y` properties compared to the childs `x` and `y` properties.

You can use the optional `callback` argument to apply your own filter to the distance checks. If the child is closer then the previous child, it will be sent to `callback` as the first argument, with the distance as the second. The callback should return `true` if it passes your filtering criteria, otherwise it should return `false`.

func (*Group) GetIndex

func (self *Group) GetIndex(child interface{}) int

GetIndex Get the index position of the given child in this group, which should match the child's `z` property.

func (*Group) GetIndexI

func (self *Group) GetIndexI(args ...interface{}) int

GetIndexI Get the index position of the given child in this group, which should match the child's `z` property.

func (*Group) GetLocalBounds

func (self *Group) GetLocalBounds() *Rectangle

GetLocalBounds Retrieves the non-global local bounds of the displayObjectContainer as a rectangle without any transformations. The calculation takes all visible children into consideration.

func (*Group) GetLocalBoundsI

func (self *Group) GetLocalBoundsI(args ...interface{}) *Rectangle

GetLocalBoundsI Retrieves the non-global local bounds of the displayObjectContainer as a rectangle without any transformations. The calculation takes all visible children into consideration.

func (*Group) GetRandom

func (self *Group) GetRandom() interface{}

GetRandom Returns a random child from the group.

func (*Group) GetRandom1O

func (self *Group) GetRandom1O(startIndex int) interface{}

GetRandom1O Returns a random child from the group.

func (*Group) GetRandom2O

func (self *Group) GetRandom2O(startIndex int, length int) interface{}

GetRandom2O Returns a random child from the group.

func (*Group) GetRandomExists

func (self *Group) GetRandomExists() interface{}

GetRandomExists Returns a random child from the Group that has `exists` set to `true`.

Optionally you can specify a start and end index. For example if this Group had 100 children, and you set `startIndex` to 0 and `endIndex` to 50, it would return a random child from only the first 50 children in the Group.

func (*Group) GetRandomExists1O

func (self *Group) GetRandomExists1O(startIndex int) interface{}

GetRandomExists1O Returns a random child from the Group that has `exists` set to `true`.

Optionally you can specify a start and end index. For example if this Group had 100 children, and you set `startIndex` to 0 and `endIndex` to 50, it would return a random child from only the first 50 children in the Group.

func (*Group) GetRandomExists2O

func (self *Group) GetRandomExists2O(startIndex int, endIndex int) interface{}

GetRandomExists2O Returns a random child from the Group that has `exists` set to `true`.

Optionally you can specify a start and end index. For example if this Group had 100 children, and you set `startIndex` to 0 and `endIndex` to 50, it would return a random child from only the first 50 children in the Group.

func (*Group) GetRandomExistsI

func (self *Group) GetRandomExistsI(args ...interface{}) interface{}

GetRandomExistsI Returns a random child from the Group that has `exists` set to `true`.

Optionally you can specify a start and end index. For example if this Group had 100 children, and you set `startIndex` to 0 and `endIndex` to 50, it would return a random child from only the first 50 children in the Group.

func (*Group) GetRandomI

func (self *Group) GetRandomI(args ...interface{}) interface{}

GetRandomI Returns a random child from the group.

func (*Group) GetTop

func (self *Group) GetTop() interface{}

GetTop Return the child at the top of this group.

The top child is the child displayed (rendered) above every other child.

func (*Group) GetTopI

func (self *Group) GetTopI(args ...interface{}) interface{}

GetTopI Return the child at the top of this group.

The top child is the child displayed (rendered) above every other child.

func (*Group) HasProperty

func (self *Group) HasProperty(child interface{}, key []string) bool

HasProperty Checks if the child has the given property.

Will scan up to 4 levels deep only.

func (*Group) HasPropertyI

func (self *Group) HasPropertyI(args ...interface{}) bool

HasPropertyI Checks if the child has the given property.

Will scan up to 4 levels deep only.

func (*Group) Hash

func (self *Group) Hash() []interface{}

Hash The hash array is an array belonging to this Group into which you can add any of its children via Group.addToHash and Group.removeFromHash.

Only children of this Group can be added to and removed from the hash.

This hash is used automatically by Phaser Arcade Physics in order to perform non z-index based destructive sorting. However if you don't use Arcade Physics, or this isn't a physics enabled Group, then you can use the hash to perform your own sorting and filtering of Group children without touching their z-index (and therefore display draw order)

func (*Group) Height

func (self *Group) Height() int

Height The height of the displayObjectContainer, setting this will actually modify the scale to achieve the value set

func (*Group) IgnoreChildInput

func (self *Group) IgnoreChildInput() bool

IgnoreChildInput If `ignoreChildInput` is `false` it will allow this objects _children_ to be considered as valid for Input events.

If this property is `true` then the children will _not_ be considered as valid for Input events.

Note that this property isn't recursive: only immediate children are influenced, it doesn't scan further down.

func (*Group) IgnoreDestroy

func (self *Group) IgnoreDestroy() bool

IgnoreDestroy A group with `ignoreDestroy` set to `true` ignores all calls to its `destroy` method.

func (*Group) InputEnableChildren

func (self *Group) InputEnableChildren() bool

InputEnableChildren A Group with `inputEnableChildren` set to `true` will automatically call `inputEnabled = true` on any children _added_ to, or _created by_, this Group.

If there are children already in the Group at the time you set this property, they are not changed.

func (*Group) Iterate

func (self *Group) Iterate(key string, value interface{}, returnType int) interface{}

Iterate Iterates over the children of the group performing one of several actions for matched children.

A child is considered a match when it has a property, named `key`, whose value is equal to `value` according to a strict equality comparison.

The result depends on the `returnType`:

  • {@link Phaser.Group.RETURN_TOTAL RETURN_TOTAL}: The callback, if any, is applied to all matching children. The number of matched children is returned.
  • {@link Phaser.Group.RETURN_NONE RETURN_NONE}: The callback, if any, is applied to all matching children. No value is returned.
  • {@link Phaser.Group.RETURN_CHILD RETURN_CHILD}: The callback, if any, is applied to the *first* matching child and the *first* matched child is returned. If there is no matching child then null is returned.

If `args` is specified it must be an array. The matched child will be assigned to the first element and the entire array will be applied to the callback function.

func (*Group) Iterate1O

func (self *Group) Iterate1O(key string, value interface{}, returnType int, callback interface{}) interface{}

Iterate1O Iterates over the children of the group performing one of several actions for matched children.

A child is considered a match when it has a property, named `key`, whose value is equal to `value` according to a strict equality comparison.

The result depends on the `returnType`:

  • {@link Phaser.Group.RETURN_TOTAL RETURN_TOTAL}: The callback, if any, is applied to all matching children. The number of matched children is returned.
  • {@link Phaser.Group.RETURN_NONE RETURN_NONE}: The callback, if any, is applied to all matching children. No value is returned.
  • {@link Phaser.Group.RETURN_CHILD RETURN_CHILD}: The callback, if any, is applied to the *first* matching child and the *first* matched child is returned. If there is no matching child then null is returned.

If `args` is specified it must be an array. The matched child will be assigned to the first element and the entire array will be applied to the callback function.

func (*Group) Iterate2O

func (self *Group) Iterate2O(key string, value interface{}, returnType int, callback interface{}, callbackContext interface{}) interface{}

Iterate2O Iterates over the children of the group performing one of several actions for matched children.

A child is considered a match when it has a property, named `key`, whose value is equal to `value` according to a strict equality comparison.

The result depends on the `returnType`:

  • {@link Phaser.Group.RETURN_TOTAL RETURN_TOTAL}: The callback, if any, is applied to all matching children. The number of matched children is returned.
  • {@link Phaser.Group.RETURN_NONE RETURN_NONE}: The callback, if any, is applied to all matching children. No value is returned.
  • {@link Phaser.Group.RETURN_CHILD RETURN_CHILD}: The callback, if any, is applied to the *first* matching child and the *first* matched child is returned. If there is no matching child then null is returned.

If `args` is specified it must be an array. The matched child will be assigned to the first element and the entire array will be applied to the callback function.

func (*Group) Iterate3O

func (self *Group) Iterate3O(key string, value interface{}, returnType int, callback interface{}, callbackContext interface{}, args []interface{}) interface{}

Iterate3O Iterates over the children of the group performing one of several actions for matched children.

A child is considered a match when it has a property, named `key`, whose value is equal to `value` according to a strict equality comparison.

The result depends on the `returnType`:

  • {@link Phaser.Group.RETURN_TOTAL RETURN_TOTAL}: The callback, if any, is applied to all matching children. The number of matched children is returned.
  • {@link Phaser.Group.RETURN_NONE RETURN_NONE}: The callback, if any, is applied to all matching children. No value is returned.
  • {@link Phaser.Group.RETURN_CHILD RETURN_CHILD}: The callback, if any, is applied to the *first* matching child and the *first* matched child is returned. If there is no matching child then null is returned.

If `args` is specified it must be an array. The matched child will be assigned to the first element and the entire array will be applied to the callback function.

func (*Group) IterateI

func (self *Group) IterateI(args ...interface{}) interface{}

IterateI Iterates over the children of the group performing one of several actions for matched children.

A child is considered a match when it has a property, named `key`, whose value is equal to `value` according to a strict equality comparison.

The result depends on the `returnType`:

  • {@link Phaser.Group.RETURN_TOTAL RETURN_TOTAL}: The callback, if any, is applied to all matching children. The number of matched children is returned.
  • {@link Phaser.Group.RETURN_NONE RETURN_NONE}: The callback, if any, is applied to all matching children. No value is returned.
  • {@link Phaser.Group.RETURN_CHILD RETURN_CHILD}: The callback, if any, is applied to the *first* matching child and the *first* matched child is returned. If there is no matching child then null is returned.

If `args` is specified it must be an array. The matched child will be assigned to the first element and the entire array will be applied to the callback function.

func (*Group) Left

func (self *Group) Left() int

Left The left coordinate of this Group.

It is derived by calling `getBounds`, calculating the Groups dimensions based on its visible children.

func (*Group) Length

func (self *Group) Length() int

Length Total number of children in this group, regardless of exists/alive status.

func (*Group) MoveAll

func (self *Group) MoveAll(group *Group) *Group

MoveAll Moves all children from this Group to the Group given.

func (*Group) MoveAll1O

func (self *Group) MoveAll1O(group *Group, silent bool) *Group

MoveAll1O Moves all children from this Group to the Group given.

func (*Group) MoveAllI

func (self *Group) MoveAllI(args ...interface{}) *Group

MoveAllI Moves all children from this Group to the Group given.

func (*Group) MoveDown

func (self *Group) MoveDown(child interface{}) interface{}

MoveDown Moves the given child down one place in this group unless it's already at the bottom.

func (*Group) MoveDownI

func (self *Group) MoveDownI(args ...interface{}) interface{}

MoveDownI Moves the given child down one place in this group unless it's already at the bottom.

func (*Group) MoveUp

func (self *Group) MoveUp(child interface{}) interface{}

MoveUp Moves the given child up one place in this group unless it's already at the top.

func (*Group) MoveUpI

func (self *Group) MoveUpI(args ...interface{}) interface{}

MoveUpI Moves the given child up one place in this group unless it's already at the top.

func (*Group) MultiplyAll

func (self *Group) MultiplyAll(property string, amount int, checkAlive bool, checkVisible bool)

MultiplyAll Multiplies the given property by the amount on all children in this group.

`Group.multiplyAll('x', 2)` will x2 the child.x value for each child.

func (*Group) MultiplyAllI

func (self *Group) MultiplyAllI(args ...interface{})

MultiplyAllI Multiplies the given property by the amount on all children in this group.

`Group.multiplyAll('x', 2)` will x2 the child.x value for each child.

func (*Group) Name

func (self *Group) Name() string

Name A name for this group. Not used internally but useful for debugging.

func (*Group) Next

func (self *Group) Next() interface{}

Next Advances the group cursor to the next (higher) object in the group.

If the cursor is at the end of the group (top child) it is moved the start of the group (bottom child).

func (*Group) NextI

func (self *Group) NextI(args ...interface{}) interface{}

NextI Advances the group cursor to the next (higher) object in the group.

If the cursor is at the end of the group (top child) it is moved the start of the group (bottom child).

func (*Group) OnChildInputDown

func (self *Group) OnChildInputDown() *Signal

OnChildInputDown This Signal is dispatched whenever a child of this Group emits an onInputDown signal as a result of having been interacted with by a Pointer. You can bind functions to this Signal instead of to every child Sprite.

This Signal is sent 2 arguments: A reference to the Sprite that triggered the signal, and a reference to the Pointer that caused it.

func (*Group) OnChildInputOut

func (self *Group) OnChildInputOut() *Signal

OnChildInputOut This Signal is dispatched whenever a child of this Group emits an onInputOut signal as a result of having been interacted with by a Pointer. You can bind functions to this Signal instead of to every child Sprite.

This Signal is sent 2 arguments: A reference to the Sprite that triggered the signal, and a reference to the Pointer that caused it.

func (*Group) OnChildInputOver

func (self *Group) OnChildInputOver() *Signal

OnChildInputOver This Signal is dispatched whenever a child of this Group emits an onInputOver signal as a result of having been interacted with by a Pointer. You can bind functions to this Signal instead of to every child Sprite.

This Signal is sent 2 arguments: A reference to the Sprite that triggered the signal, and a reference to the Pointer that caused it.

func (*Group) OnChildInputUp

func (self *Group) OnChildInputUp() *Signal

OnChildInputUp This Signal is dispatched whenever a child of this Group emits an onInputUp signal as a result of having been interacted with by a Pointer. You can bind functions to this Signal instead of to every child Sprite.

This Signal is sent 3 arguments: A reference to the Sprite that triggered the signal, a reference to the Pointer that caused it, and a boolean value `isOver` that tells you if the Pointer is still over the Sprite or not.

func (*Group) OnDestroy

func (self *Group) OnDestroy() *Signal

OnDestroy This signal is dispatched when the group is destroyed.

func (*Group) PendingDestroy

func (self *Group) PendingDestroy() bool

PendingDestroy A Group is that has `pendingDestroy` set to `true` is flagged to have its destroy method called on the next logic update. You can set it directly to flag the Group to be destroyed on its next update.

This is extremely useful if you wish to destroy a Group from within one of its own callbacks or a callback of one of its children.

func (*Group) PhysicsBodyType

func (self *Group) PhysicsBodyType() int

PhysicsBodyType If {@link Phaser.Group#enableBody enableBody} is true this is the type of physics body that is created on new Sprites.

The valid values are {@link Phaser.Physics.ARCADE}, {@link Phaser.Physics.P2JS}, {@link Phaser.Physics.NINJA}, etc.

func (*Group) PhysicsSortDirection

func (self *Group) PhysicsSortDirection() int

PhysicsSortDirection If this Group contains Arcade Physics Sprites you can set a custom sort direction via this property.

It should be set to one of the Phaser.Physics.Arcade sort direction constants:

Phaser.Physics.Arcade.SORT_NONE Phaser.Physics.Arcade.LEFT_RIGHT Phaser.Physics.Arcade.RIGHT_LEFT Phaser.Physics.Arcade.TOP_BOTTOM Phaser.Physics.Arcade.BOTTOM_TOP

If set to `null` the Group will use whatever Phaser.Physics.Arcade.sortDirection is set to. This is the default behavior.

func (*Group) PhysicsType

func (self *Group) PhysicsType() int

PhysicsType The const physics body type of this object.

func (*Group) PostUpdate

func (self *Group) PostUpdate()

PostUpdate The core postUpdate - as called by World.

func (*Group) PostUpdateI

func (self *Group) PostUpdateI(args ...interface{})

PostUpdateI The core postUpdate - as called by World.

func (*Group) PreUpdate

func (self *Group) PreUpdate()

PreUpdate The core preUpdate - as called by World.

func (*Group) PreUpdateI

func (self *Group) PreUpdateI(args ...interface{})

PreUpdateI The core preUpdate - as called by World.

func (*Group) Previous

func (self *Group) Previous() interface{}

Previous Moves the group cursor to the previous (lower) child in the group.

If the cursor is at the start of the group (bottom child) it is moved to the end (top child).

func (*Group) PreviousI

func (self *Group) PreviousI(args ...interface{}) interface{}

PreviousI Moves the group cursor to the previous (lower) child in the group.

If the cursor is at the start of the group (bottom child) it is moved to the end (top child).

func (*Group) RETURN_ALL

func (self *Group) RETURN_ALL() int

RETURN_ALL A returnType value, as specified in {@link Phaser.Group#iterate iterate} eg.

func (*Group) RETURN_CHILD

func (self *Group) RETURN_CHILD() int

RETURN_CHILD A returnType value, as specified in {@link Phaser.Group#iterate iterate} eg.

func (*Group) RETURN_NONE

func (self *Group) RETURN_NONE() int

RETURN_NONE A returnType value, as specified in {@link Phaser.Group#iterate iterate} eg.

func (*Group) RETURN_TOTAL

func (self *Group) RETURN_TOTAL() int

RETURN_TOTAL A returnType value, as specified in {@link Phaser.Group#iterate iterate} eg.

func (*Group) Remove

func (self *Group) Remove(child interface{}) bool

Remove Removes the given child from this group.

This will dispatch an `onRemovedFromGroup` event from the child (if it has one), and optionally destroy the child.

If the group cursor was referring to the removed child it is updated to refer to the next child.

func (*Group) Remove1O

func (self *Group) Remove1O(child interface{}, destroy bool) bool

Remove1O Removes the given child from this group.

This will dispatch an `onRemovedFromGroup` event from the child (if it has one), and optionally destroy the child.

If the group cursor was referring to the removed child it is updated to refer to the next child.

func (*Group) Remove2O

func (self *Group) Remove2O(child interface{}, destroy bool, silent bool) bool

Remove2O Removes the given child from this group.

This will dispatch an `onRemovedFromGroup` event from the child (if it has one), and optionally destroy the child.

If the group cursor was referring to the removed child it is updated to refer to the next child.

func (*Group) RemoveAll

func (self *Group) RemoveAll()

RemoveAll Removes all children from this Group, but does not remove the group from its parent.

The children can be optionally destroyed as they are removed.

You can also optionally also destroy the BaseTexture the Child is using. Be careful if you've more than one Game Object sharing the same BaseTexture.

func (*Group) RemoveAll1O

func (self *Group) RemoveAll1O(destroy bool)

RemoveAll1O Removes all children from this Group, but does not remove the group from its parent.

The children can be optionally destroyed as they are removed.

You can also optionally also destroy the BaseTexture the Child is using. Be careful if you've more than one Game Object sharing the same BaseTexture.

func (*Group) RemoveAll2O

func (self *Group) RemoveAll2O(destroy bool, silent bool)

RemoveAll2O Removes all children from this Group, but does not remove the group from its parent.

The children can be optionally destroyed as they are removed.

You can also optionally also destroy the BaseTexture the Child is using. Be careful if you've more than one Game Object sharing the same BaseTexture.

func (*Group) RemoveAll3O

func (self *Group) RemoveAll3O(destroy bool, silent bool, destroyTexture bool)

RemoveAll3O Removes all children from this Group, but does not remove the group from its parent.

The children can be optionally destroyed as they are removed.

You can also optionally also destroy the BaseTexture the Child is using. Be careful if you've more than one Game Object sharing the same BaseTexture.

func (*Group) RemoveAllI

func (self *Group) RemoveAllI(args ...interface{})

RemoveAllI Removes all children from this Group, but does not remove the group from its parent.

The children can be optionally destroyed as they are removed.

You can also optionally also destroy the BaseTexture the Child is using. Be careful if you've more than one Game Object sharing the same BaseTexture.

func (*Group) RemoveBetween

func (self *Group) RemoveBetween(startIndex int)

RemoveBetween Removes all children from this group whose index falls beteen the given startIndex and endIndex values.

func (*Group) RemoveBetween1O

func (self *Group) RemoveBetween1O(startIndex int, endIndex int)

RemoveBetween1O Removes all children from this group whose index falls beteen the given startIndex and endIndex values.

func (*Group) RemoveBetween2O

func (self *Group) RemoveBetween2O(startIndex int, endIndex int, destroy bool)

RemoveBetween2O Removes all children from this group whose index falls beteen the given startIndex and endIndex values.

func (*Group) RemoveBetween3O

func (self *Group) RemoveBetween3O(startIndex int, endIndex int, destroy bool, silent bool)

RemoveBetween3O Removes all children from this group whose index falls beteen the given startIndex and endIndex values.

func (*Group) RemoveBetweenI

func (self *Group) RemoveBetweenI(args ...interface{})

RemoveBetweenI Removes all children from this group whose index falls beteen the given startIndex and endIndex values.

func (*Group) RemoveChild

func (self *Group) RemoveChild(child *DisplayObject) *DisplayObject

RemoveChild Removes a child from the container.

func (*Group) RemoveChildAt

func (self *Group) RemoveChildAt(index int) *DisplayObject

RemoveChildAt Removes a child from the specified index position.

func (*Group) RemoveChildAtI

func (self *Group) RemoveChildAtI(args ...interface{}) *DisplayObject

RemoveChildAtI Removes a child from the specified index position.

func (*Group) RemoveChildI

func (self *Group) RemoveChildI(args ...interface{}) *DisplayObject

RemoveChildI Removes a child from the container.

func (*Group) RemoveChildren

func (self *Group) RemoveChildren(beginIndex int, endIndex int)

RemoveChildren Removes all children from this container that are within the begin and end indexes.

func (*Group) RemoveChildrenI

func (self *Group) RemoveChildrenI(args ...interface{})

RemoveChildrenI Removes all children from this container that are within the begin and end indexes.

func (*Group) RemoveFromHash

func (self *Group) RemoveFromHash(child *DisplayObject) bool

RemoveFromHash Removes a child of this Group from the hash array. This call will return false if the child is not in the hash.

func (*Group) RemoveFromHashI

func (self *Group) RemoveFromHashI(args ...interface{}) bool

RemoveFromHashI Removes a child of this Group from the hash array. This call will return false if the child is not in the hash.

func (*Group) RemoveI

func (self *Group) RemoveI(args ...interface{}) bool

RemoveI Removes the given child from this group.

This will dispatch an `onRemovedFromGroup` event from the child (if it has one), and optionally destroy the child.

If the group cursor was referring to the removed child it is updated to refer to the next child.

func (*Group) Replace

func (self *Group) Replace(oldChild interface{}, newChild interface{}) interface{}

Replace Replaces a child of this Group with the given newChild. The newChild cannot be a member of this Group.

If `Group.enableBody` is set, then a physics body will be created on the object, so long as one does not already exist.

If `Group.inputEnableChildren` is set, then an Input Handler will be created on the object, so long as one does not already exist.

func (*Group) ReplaceI

func (self *Group) ReplaceI(args ...interface{}) interface{}

ReplaceI Replaces a child of this Group with the given newChild. The newChild cannot be a member of this Group.

If `Group.enableBody` is set, then a physics body will be created on the object, so long as one does not already exist.

If `Group.inputEnableChildren` is set, then an Input Handler will be created on the object, so long as one does not already exist.

func (*Group) ResetChild

func (self *Group) ResetChild(child *DisplayObject) *DisplayObject

ResetChild Takes a child and if the `x` and `y` arguments are given it calls `child.reset(x, y)` on it.

If the `key` and optionally the `frame` arguments are given, it calls `child.loadTexture(key, frame)` on it.

The two operations are separate. For example if you just wish to load a new texture then pass `null` as the x and y values.

func (*Group) ResetChild1O

func (self *Group) ResetChild1O(child *DisplayObject, x int) *DisplayObject

ResetChild1O Takes a child and if the `x` and `y` arguments are given it calls `child.reset(x, y)` on it.

If the `key` and optionally the `frame` arguments are given, it calls `child.loadTexture(key, frame)` on it.

The two operations are separate. For example if you just wish to load a new texture then pass `null` as the x and y values.

func (*Group) ResetChild2O

func (self *Group) ResetChild2O(child *DisplayObject, x int, y int) *DisplayObject

ResetChild2O Takes a child and if the `x` and `y` arguments are given it calls `child.reset(x, y)` on it.

If the `key` and optionally the `frame` arguments are given, it calls `child.loadTexture(key, frame)` on it.

The two operations are separate. For example if you just wish to load a new texture then pass `null` as the x and y values.

func (*Group) ResetChild3O

func (self *Group) ResetChild3O(child *DisplayObject, x int, y int, key interface{}) *DisplayObject

ResetChild3O Takes a child and if the `x` and `y` arguments are given it calls `child.reset(x, y)` on it.

If the `key` and optionally the `frame` arguments are given, it calls `child.loadTexture(key, frame)` on it.

The two operations are separate. For example if you just wish to load a new texture then pass `null` as the x and y values.

func (*Group) ResetChild4O

func (self *Group) ResetChild4O(child *DisplayObject, x int, y int, key interface{}, frame interface{}) *DisplayObject

ResetChild4O Takes a child and if the `x` and `y` arguments are given it calls `child.reset(x, y)` on it.

If the `key` and optionally the `frame` arguments are given, it calls `child.loadTexture(key, frame)` on it.

The two operations are separate. For example if you just wish to load a new texture then pass `null` as the x and y values.

func (*Group) ResetChildI

func (self *Group) ResetChildI(args ...interface{}) *DisplayObject

ResetChildI Takes a child and if the `x` and `y` arguments are given it calls `child.reset(x, y)` on it.

If the `key` and optionally the `frame` arguments are given, it calls `child.loadTexture(key, frame)` on it.

The two operations are separate. For example if you just wish to load a new texture then pass `null` as the x and y values.

func (*Group) ResetCursor

func (self *Group) ResetCursor() interface{}

ResetCursor Sets the group cursor to the first child in the group.

If the optional index parameter is given it sets the cursor to the object at that index instead.

func (*Group) ResetCursor1O

func (self *Group) ResetCursor1O(index int) interface{}

ResetCursor1O Sets the group cursor to the first child in the group.

If the optional index parameter is given it sets the cursor to the object at that index instead.

func (*Group) ResetCursorI

func (self *Group) ResetCursorI(args ...interface{}) interface{}

ResetCursorI Sets the group cursor to the first child in the group.

If the optional index parameter is given it sets the cursor to the object at that index instead.

func (*Group) Reverse

func (self *Group) Reverse()

Reverse Reverses all children in this group.

This operation applies only to immediate children and does not propagate to subgroups.

func (*Group) ReverseI

func (self *Group) ReverseI(args ...interface{})

ReverseI Reverses all children in this group.

This operation applies only to immediate children and does not propagate to subgroups.

func (*Group) Right

func (self *Group) Right() int

Right The right coordinate of this Group.

It is derived by calling `getBounds`, calculating the Groups dimensions based on its visible children.

func (*Group) SORT_ASCENDING

func (self *Group) SORT_ASCENDING() int

SORT_ASCENDING A sort ordering value, as specified in {@link Phaser.Group#sort sort} eg.

func (*Group) SORT_DESCENDING

func (self *Group) SORT_DESCENDING() int

SORT_DESCENDING A sort ordering value, as specified in {@link Phaser.Group#sort sort} eg.

func (*Group) SendToBack

func (self *Group) SendToBack(child interface{}) interface{}

SendToBack Sends the given child to the bottom of this group so it renders below all other children.

func (*Group) SendToBackI

func (self *Group) SendToBackI(args ...interface{}) interface{}

SendToBackI Sends the given child to the bottom of this group so it renders below all other children.

func (*Group) Set

func (self *Group) Set(child *Sprite, key string, value interface{}) bool

Set Quickly set a property on a single child of this group to a new value.

The operation parameter controls how the new value is assigned to the property, from simple replacement to addition and multiplication.

func (*Group) Set1O

func (self *Group) Set1O(child *Sprite, key string, value interface{}, checkAlive bool) bool

Set1O Quickly set a property on a single child of this group to a new value.

The operation parameter controls how the new value is assigned to the property, from simple replacement to addition and multiplication.

func (*Group) Set2O

func (self *Group) Set2O(child *Sprite, key string, value interface{}, checkAlive bool, checkVisible bool) bool

Set2O Quickly set a property on a single child of this group to a new value.

The operation parameter controls how the new value is assigned to the property, from simple replacement to addition and multiplication.

func (*Group) Set3O

func (self *Group) Set3O(child *Sprite, key string, value interface{}, checkAlive bool, checkVisible bool, operation int) bool

Set3O Quickly set a property on a single child of this group to a new value.

The operation parameter controls how the new value is assigned to the property, from simple replacement to addition and multiplication.

func (*Group) Set4O

func (self *Group) Set4O(child *Sprite, key string, value interface{}, checkAlive bool, checkVisible bool, operation int, force bool) bool

Set4O Quickly set a property on a single child of this group to a new value.

The operation parameter controls how the new value is assigned to the property, from simple replacement to addition and multiplication.

func (*Group) SetAliveA

func (self *Group) SetAliveA(member bool)

SetAliveA The alive property is useful for Groups that are children of other Groups and need to be included/excluded in checks like forEachAlive.

func (*Group) SetAll

func (self *Group) SetAll(key string, value interface{})

SetAll Quickly set the same property across all children of this group to a new value.

This call doesn't descend down children, so if you have a Group inside of this group, the property will be set on the group but not its children. If you need that ability please see `Group.setAllChildren`.

The operation parameter controls how the new value is assigned to the property, from simple replacement to addition and multiplication.

func (*Group) SetAll1O

func (self *Group) SetAll1O(key string, value interface{}, checkAlive bool)

SetAll1O Quickly set the same property across all children of this group to a new value.

This call doesn't descend down children, so if you have a Group inside of this group, the property will be set on the group but not its children. If you need that ability please see `Group.setAllChildren`.

The operation parameter controls how the new value is assigned to the property, from simple replacement to addition and multiplication.

func (*Group) SetAll2O

func (self *Group) SetAll2O(key string, value interface{}, checkAlive bool, checkVisible bool)

SetAll2O Quickly set the same property across all children of this group to a new value.

This call doesn't descend down children, so if you have a Group inside of this group, the property will be set on the group but not its children. If you need that ability please see `Group.setAllChildren`.

The operation parameter controls how the new value is assigned to the property, from simple replacement to addition and multiplication.

func (*Group) SetAll3O

func (self *Group) SetAll3O(key string, value interface{}, checkAlive bool, checkVisible bool, operation int)

SetAll3O Quickly set the same property across all children of this group to a new value.

This call doesn't descend down children, so if you have a Group inside of this group, the property will be set on the group but not its children. If you need that ability please see `Group.setAllChildren`.

The operation parameter controls how the new value is assigned to the property, from simple replacement to addition and multiplication.

func (*Group) SetAll4O

func (self *Group) SetAll4O(key string, value interface{}, checkAlive bool, checkVisible bool, operation int, force bool)

SetAll4O Quickly set the same property across all children of this group to a new value.

This call doesn't descend down children, so if you have a Group inside of this group, the property will be set on the group but not its children. If you need that ability please see `Group.setAllChildren`.

The operation parameter controls how the new value is assigned to the property, from simple replacement to addition and multiplication.

func (*Group) SetAllChildren

func (self *Group) SetAllChildren(key string, value interface{})

SetAllChildren Quickly set the same property across all children of this group, and any child Groups, to a new value.

If this group contains other Groups then the same property is set across their children as well, iterating down until it reaches the bottom. Unlike with `setAll` the property is NOT set on child Groups itself.

The operation parameter controls how the new value is assigned to the property, from simple replacement to addition and multiplication.

func (*Group) SetAllChildren1O

func (self *Group) SetAllChildren1O(key string, value interface{}, checkAlive bool)

SetAllChildren1O Quickly set the same property across all children of this group, and any child Groups, to a new value.

If this group contains other Groups then the same property is set across their children as well, iterating down until it reaches the bottom. Unlike with `setAll` the property is NOT set on child Groups itself.

The operation parameter controls how the new value is assigned to the property, from simple replacement to addition and multiplication.

func (*Group) SetAllChildren2O

func (self *Group) SetAllChildren2O(key string, value interface{}, checkAlive bool, checkVisible bool)

SetAllChildren2O Quickly set the same property across all children of this group, and any child Groups, to a new value.

If this group contains other Groups then the same property is set across their children as well, iterating down until it reaches the bottom. Unlike with `setAll` the property is NOT set on child Groups itself.

The operation parameter controls how the new value is assigned to the property, from simple replacement to addition and multiplication.

func (*Group) SetAllChildren3O

func (self *Group) SetAllChildren3O(key string, value interface{}, checkAlive bool, checkVisible bool, operation int)

SetAllChildren3O Quickly set the same property across all children of this group, and any child Groups, to a new value.

If this group contains other Groups then the same property is set across their children as well, iterating down until it reaches the bottom. Unlike with `setAll` the property is NOT set on child Groups itself.

The operation parameter controls how the new value is assigned to the property, from simple replacement to addition and multiplication.

func (*Group) SetAllChildren4O

func (self *Group) SetAllChildren4O(key string, value interface{}, checkAlive bool, checkVisible bool, operation int, force bool)

SetAllChildren4O Quickly set the same property across all children of this group, and any child Groups, to a new value.

If this group contains other Groups then the same property is set across their children as well, iterating down until it reaches the bottom. Unlike with `setAll` the property is NOT set on child Groups itself.

The operation parameter controls how the new value is assigned to the property, from simple replacement to addition and multiplication.

func (*Group) SetAllChildrenI

func (self *Group) SetAllChildrenI(args ...interface{})

SetAllChildrenI Quickly set the same property across all children of this group, and any child Groups, to a new value.

If this group contains other Groups then the same property is set across their children as well, iterating down until it reaches the bottom. Unlike with `setAll` the property is NOT set on child Groups itself.

The operation parameter controls how the new value is assigned to the property, from simple replacement to addition and multiplication.

func (*Group) SetAllI

func (self *Group) SetAllI(args ...interface{})

SetAllI Quickly set the same property across all children of this group to a new value.

This call doesn't descend down children, so if you have a Group inside of this group, the property will be set on the group but not its children. If you need that ability please see `Group.setAllChildren`.

The operation parameter controls how the new value is assigned to the property, from simple replacement to addition and multiplication.

func (*Group) SetAngleA

func (self *Group) SetAngleA(member int)

SetAngleA The angle of rotation of the group container, in degrees.

This adjusts the group itself by modifying its local rotation transform.

This has no impact on the rotation/angle properties of the children, but it will update their worldTransform and on-screen orientation and position.

func (*Group) SetBottomA

func (self *Group) SetBottomA(member int)

SetBottomA The bottom coordinate of this Group.

It is derived by calling `getBounds`, calculating the Groups dimensions based on its visible children.

func (*Group) SetCameraOffsetA

func (self *Group) SetCameraOffsetA(member *Point)

SetCameraOffsetA If this object is {@link Phaser.Group#fixedToCamera fixedToCamera} then this stores the x/y position offset relative to the top-left of the camera view. If the parent of this Group is also `fixedToCamera` then the offset here is in addition to that and should typically be disabled.

func (*Group) SetCenterXA

func (self *Group) SetCenterXA(member int)

SetCenterXA The center x coordinate of this Group.

It is derived by calling `getBounds`, calculating the Groups dimensions based on its visible children.

func (*Group) SetCenterYA

func (self *Group) SetCenterYA(member int)

SetCenterYA The center y coordinate of this Group.

It is derived by calling `getBounds`, calculating the Groups dimensions based on its visible children.

func (*Group) SetChildIndex

func (self *Group) SetChildIndex(child *DisplayObject, index int)

SetChildIndex Changes the position of an existing child in the display object container

func (*Group) SetChildIndexI

func (self *Group) SetChildIndexI(args ...interface{})

SetChildIndexI Changes the position of an existing child in the display object container

func (*Group) SetChildrenA

func (self *Group) SetChildrenA(member []DisplayObject)

SetChildrenA [read-only] The array of children of this container.

func (*Group) SetClassTypeA

func (self *Group) SetClassTypeA(member interface{})

SetClassTypeA The type of objects that will be created when using {@link Phaser.Group#create create} or {@link Phaser.Group#createMultiple createMultiple}.

Any object may be used but it should extend either Sprite or Image and accept the same constructor arguments: when a new object is created it is passed the following parameters to its constructor: `(game, x, y, key, frame)`.

func (*Group) SetCursorA

func (self *Group) SetCursorA(member *DisplayObject)

SetCursorA The current display object that the group cursor is pointing to, if any. (Can be set manually.)

The cursor is a way to iterate through the children in a Group using {@link Phaser.Group#next next} and {@link Phaser.Group#previous previous}.

func (*Group) SetCursorIndexA

func (self *Group) SetCursorIndexA(member int)

SetCursorIndexA The current index of the Group cursor. Advance it with Group.next.

func (*Group) SetEnableBodyA

func (self *Group) SetEnableBodyA(member bool)

SetEnableBodyA If true all Sprites created by, or added to this group, will have a physics body enabled on them.

If there are children already in the Group at the time you set this property, they are not changed.

The default body type is controlled with {@link Phaser.Group#physicsBodyType physicsBodyType}.

func (*Group) SetEnableBodyDebugA

func (self *Group) SetEnableBodyDebugA(member bool)

SetEnableBodyDebugA If true when a physics body is created (via {@link Phaser.Group#enableBody enableBody}) it will create a physics debug object as well.

This only works for P2 bodies.

func (*Group) SetExistsA

func (self *Group) SetExistsA(member bool)

SetExistsA If exists is true the group is updated, otherwise it is skipped.

func (*Group) SetFixedToCameraA

func (self *Group) SetFixedToCameraA(member bool)

SetFixedToCameraA A Group that is fixed to the camera uses its x/y coordinates as offsets from the top left of the camera. These are stored in Group.cameraOffset.

Note that the cameraOffset values are in addition to any parent in the display list. So if this Group was in a Group that has x: 200, then this will be added to the cameraOffset.x

func (*Group) SetGameA

func (self *Group) SetGameA(member *Game)

SetGameA A reference to the currently running Game.

func (*Group) SetHashA

func (self *Group) SetHashA(member []interface{})

SetHashA The hash array is an array belonging to this Group into which you can add any of its children via Group.addToHash and Group.removeFromHash.

Only children of this Group can be added to and removed from the hash.

This hash is used automatically by Phaser Arcade Physics in order to perform non z-index based destructive sorting. However if you don't use Arcade Physics, or this isn't a physics enabled Group, then you can use the hash to perform your own sorting and filtering of Group children without touching their z-index (and therefore display draw order)

func (*Group) SetHeightA

func (self *Group) SetHeightA(member int)

SetHeightA The height of the displayObjectContainer, setting this will actually modify the scale to achieve the value set

func (*Group) SetI

func (self *Group) SetI(args ...interface{}) bool

SetI Quickly set a property on a single child of this group to a new value.

The operation parameter controls how the new value is assigned to the property, from simple replacement to addition and multiplication.

func (*Group) SetIgnoreChildInputA

func (self *Group) SetIgnoreChildInputA(member bool)

SetIgnoreChildInputA If `ignoreChildInput` is `false` it will allow this objects _children_ to be considered as valid for Input events.

If this property is `true` then the children will _not_ be considered as valid for Input events.

Note that this property isn't recursive: only immediate children are influenced, it doesn't scan further down.

func (*Group) SetIgnoreDestroyA

func (self *Group) SetIgnoreDestroyA(member bool)

SetIgnoreDestroyA A group with `ignoreDestroy` set to `true` ignores all calls to its `destroy` method.

func (*Group) SetInputEnableChildrenA

func (self *Group) SetInputEnableChildrenA(member bool)

SetInputEnableChildrenA A Group with `inputEnableChildren` set to `true` will automatically call `inputEnabled = true` on any children _added_ to, or _created by_, this Group.

If there are children already in the Group at the time you set this property, they are not changed.

func (*Group) SetLeftA

func (self *Group) SetLeftA(member int)

SetLeftA The left coordinate of this Group.

It is derived by calling `getBounds`, calculating the Groups dimensions based on its visible children.

func (*Group) SetLengthA

func (self *Group) SetLengthA(member int)

SetLengthA Total number of children in this group, regardless of exists/alive status.

func (*Group) SetNameA

func (self *Group) SetNameA(member string)

SetNameA A name for this group. Not used internally but useful for debugging.

func (*Group) SetOnChildInputDownA

func (self *Group) SetOnChildInputDownA(member *Signal)

SetOnChildInputDownA This Signal is dispatched whenever a child of this Group emits an onInputDown signal as a result of having been interacted with by a Pointer. You can bind functions to this Signal instead of to every child Sprite.

This Signal is sent 2 arguments: A reference to the Sprite that triggered the signal, and a reference to the Pointer that caused it.

func (*Group) SetOnChildInputOutA

func (self *Group) SetOnChildInputOutA(member *Signal)

SetOnChildInputOutA This Signal is dispatched whenever a child of this Group emits an onInputOut signal as a result of having been interacted with by a Pointer. You can bind functions to this Signal instead of to every child Sprite.

This Signal is sent 2 arguments: A reference to the Sprite that triggered the signal, and a reference to the Pointer that caused it.

func (*Group) SetOnChildInputOverA

func (self *Group) SetOnChildInputOverA(member *Signal)

SetOnChildInputOverA This Signal is dispatched whenever a child of this Group emits an onInputOver signal as a result of having been interacted with by a Pointer. You can bind functions to this Signal instead of to every child Sprite.

This Signal is sent 2 arguments: A reference to the Sprite that triggered the signal, and a reference to the Pointer that caused it.

func (*Group) SetOnChildInputUpA

func (self *Group) SetOnChildInputUpA(member *Signal)

SetOnChildInputUpA This Signal is dispatched whenever a child of this Group emits an onInputUp signal as a result of having been interacted with by a Pointer. You can bind functions to this Signal instead of to every child Sprite.

This Signal is sent 3 arguments: A reference to the Sprite that triggered the signal, a reference to the Pointer that caused it, and a boolean value `isOver` that tells you if the Pointer is still over the Sprite or not.

func (*Group) SetOnDestroyA

func (self *Group) SetOnDestroyA(member *Signal)

SetOnDestroyA This signal is dispatched when the group is destroyed.

func (*Group) SetPendingDestroyA

func (self *Group) SetPendingDestroyA(member bool)

SetPendingDestroyA A Group is that has `pendingDestroy` set to `true` is flagged to have its destroy method called on the next logic update. You can set it directly to flag the Group to be destroyed on its next update.

This is extremely useful if you wish to destroy a Group from within one of its own callbacks or a callback of one of its children.

func (*Group) SetPhysicsBodyTypeA

func (self *Group) SetPhysicsBodyTypeA(member int)

SetPhysicsBodyTypeA If {@link Phaser.Group#enableBody enableBody} is true this is the type of physics body that is created on new Sprites.

The valid values are {@link Phaser.Physics.ARCADE}, {@link Phaser.Physics.P2JS}, {@link Phaser.Physics.NINJA}, etc.

func (*Group) SetPhysicsSortDirectionA

func (self *Group) SetPhysicsSortDirectionA(member int)

SetPhysicsSortDirectionA If this Group contains Arcade Physics Sprites you can set a custom sort direction via this property.

It should be set to one of the Phaser.Physics.Arcade sort direction constants:

Phaser.Physics.Arcade.SORT_NONE Phaser.Physics.Arcade.LEFT_RIGHT Phaser.Physics.Arcade.RIGHT_LEFT Phaser.Physics.Arcade.TOP_BOTTOM Phaser.Physics.Arcade.BOTTOM_TOP

If set to `null` the Group will use whatever Phaser.Physics.Arcade.sortDirection is set to. This is the default behavior.

func (*Group) SetPhysicsTypeA

func (self *Group) SetPhysicsTypeA(member int)

SetPhysicsTypeA The const physics body type of this object.

func (*Group) SetProperty

func (self *Group) SetProperty(child interface{}, key []interface{}, value interface{}) bool

SetProperty Sets a property to the given value on the child. The operation parameter controls how the value is set.

The operations are: - 0: set the existing value to the given value; if force is `true` a new property will be created if needed - 1: will add the given value to the value already present. - 2: will subtract the given value from the value already present. - 3: will multiply the value already present by the given value. - 4: will divide the value already present by the given value.

func (*Group) SetProperty1O

func (self *Group) SetProperty1O(child interface{}, key []interface{}, value interface{}, operation int) bool

SetProperty1O Sets a property to the given value on the child. The operation parameter controls how the value is set.

The operations are: - 0: set the existing value to the given value; if force is `true` a new property will be created if needed - 1: will add the given value to the value already present. - 2: will subtract the given value from the value already present. - 3: will multiply the value already present by the given value. - 4: will divide the value already present by the given value.

func (*Group) SetProperty2O

func (self *Group) SetProperty2O(child interface{}, key []interface{}, value interface{}, operation int, force bool) bool

SetProperty2O Sets a property to the given value on the child. The operation parameter controls how the value is set.

The operations are: - 0: set the existing value to the given value; if force is `true` a new property will be created if needed - 1: will add the given value to the value already present. - 2: will subtract the given value from the value already present. - 3: will multiply the value already present by the given value. - 4: will divide the value already present by the given value.

func (*Group) SetPropertyI

func (self *Group) SetPropertyI(args ...interface{}) bool

SetPropertyI Sets a property to the given value on the child. The operation parameter controls how the value is set.

The operations are: - 0: set the existing value to the given value; if force is `true` a new property will be created if needed - 1: will add the given value to the value already present. - 2: will subtract the given value from the value already present. - 3: will multiply the value already present by the given value. - 4: will divide the value already present by the given value.

func (*Group) SetRETURN_ALLA

func (self *Group) SetRETURN_ALLA(member int)

SetRETURN_ALLA A returnType value, as specified in {@link Phaser.Group#iterate iterate} eg.

func (*Group) SetRETURN_CHILDA

func (self *Group) SetRETURN_CHILDA(member int)

SetRETURN_CHILDA A returnType value, as specified in {@link Phaser.Group#iterate iterate} eg.

func (*Group) SetRETURN_NONEA

func (self *Group) SetRETURN_NONEA(member int)

SetRETURN_NONEA A returnType value, as specified in {@link Phaser.Group#iterate iterate} eg.

func (*Group) SetRETURN_TOTALA

func (self *Group) SetRETURN_TOTALA(member int)

SetRETURN_TOTALA A returnType value, as specified in {@link Phaser.Group#iterate iterate} eg.

func (*Group) SetRightA

func (self *Group) SetRightA(member int)

SetRightA The right coordinate of this Group.

It is derived by calling `getBounds`, calculating the Groups dimensions based on its visible children.

func (*Group) SetSORT_ASCENDINGA

func (self *Group) SetSORT_ASCENDINGA(member int)

SetSORT_ASCENDINGA A sort ordering value, as specified in {@link Phaser.Group#sort sort} eg.

func (*Group) SetSORT_DESCENDINGA

func (self *Group) SetSORT_DESCENDINGA(member int)

SetSORT_DESCENDINGA A sort ordering value, as specified in {@link Phaser.Group#sort sort} eg.

func (*Group) SetTopA

func (self *Group) SetTopA(member int)

SetTopA The top coordinate of this Group.

It is derived by calling `getBounds`, calculating the Groups dimensions based on its visible children.

func (*Group) SetTotalA

func (self *Group) SetTotalA(member int)

SetTotalA Total number of existing children in the group.

func (*Group) SetTypeA

func (self *Group) SetTypeA(member int)

SetTypeA Internal Phaser Type value.

func (*Group) SetWidthA

func (self *Group) SetWidthA(member int)

SetWidthA The width of the displayObjectContainer, setting this will actually modify the scale to achieve the value set

func (*Group) SetZA

func (self *Group) SetZA(member int)

SetZA The z-depth value of this object within its parent container/Group - the World is a Group as well. This value must be unique for each child in a Group.

func (*Group) Sort

func (self *Group) Sort()

Sort Sort the children in the group according to a particular key and ordering.

Call this function to sort the group according to a particular key value and order.

For example to depth sort Sprites for Zelda-style game you might call `group.sort('y', Phaser.Group.SORT_ASCENDING)` at the bottom of your `State.update()`.

Internally this uses a standard JavaScript Array sort, so everything that applies there also applies here, including alphabetical sorting, mixing strings and numbers, and Unicode sorting. See MDN for more details.

func (*Group) Sort1O

func (self *Group) Sort1O(key string)

Sort1O Sort the children in the group according to a particular key and ordering.

Call this function to sort the group according to a particular key value and order.

For example to depth sort Sprites for Zelda-style game you might call `group.sort('y', Phaser.Group.SORT_ASCENDING)` at the bottom of your `State.update()`.

Internally this uses a standard JavaScript Array sort, so everything that applies there also applies here, including alphabetical sorting, mixing strings and numbers, and Unicode sorting. See MDN for more details.

func (*Group) Sort2O

func (self *Group) Sort2O(key string, order int)

Sort2O Sort the children in the group according to a particular key and ordering.

Call this function to sort the group according to a particular key value and order.

For example to depth sort Sprites for Zelda-style game you might call `group.sort('y', Phaser.Group.SORT_ASCENDING)` at the bottom of your `State.update()`.

Internally this uses a standard JavaScript Array sort, so everything that applies there also applies here, including alphabetical sorting, mixing strings and numbers, and Unicode sorting. See MDN for more details.

func (*Group) SortI

func (self *Group) SortI(args ...interface{})

SortI Sort the children in the group according to a particular key and ordering.

Call this function to sort the group according to a particular key value and order.

For example to depth sort Sprites for Zelda-style game you might call `group.sort('y', Phaser.Group.SORT_ASCENDING)` at the bottom of your `State.update()`.

Internally this uses a standard JavaScript Array sort, so everything that applies there also applies here, including alphabetical sorting, mixing strings and numbers, and Unicode sorting. See MDN for more details.

func (*Group) SubAll

func (self *Group) SubAll(property string, amount int, checkAlive bool, checkVisible bool)

SubAll Subtracts the amount from the given property on all children in this group.

`Group.subAll('x', 10)` will minus 10 from the child.x value for each child.

func (*Group) SubAllI

func (self *Group) SubAllI(args ...interface{})

SubAllI Subtracts the amount from the given property on all children in this group.

`Group.subAll('x', 10)` will minus 10 from the child.x value for each child.

func (*Group) Swap

func (self *Group) Swap(child1 interface{}, child2 interface{})

Swap Swaps the position of two children in this group.

Both children must be in this group, a child cannot be swapped with itself, and unparented children cannot be swapped.

func (*Group) SwapChildren

func (self *Group) SwapChildren(child *DisplayObject, child2 *DisplayObject)

SwapChildren Swaps the position of 2 Display Objects within this container.

func (*Group) SwapChildrenI

func (self *Group) SwapChildrenI(args ...interface{})

SwapChildrenI Swaps the position of 2 Display Objects within this container.

func (*Group) SwapI

func (self *Group) SwapI(args ...interface{})

SwapI Swaps the position of two children in this group.

Both children must be in this group, a child cannot be swapped with itself, and unparented children cannot be swapped.

func (*Group) Top

func (self *Group) Top() int

Top The top coordinate of this Group.

It is derived by calling `getBounds`, calculating the Groups dimensions based on its visible children.

func (*Group) Total

func (self *Group) Total() int

Total Total number of existing children in the group.

func (*Group) Type

func (self *Group) Type() int

Type Internal Phaser Type value.

func (*Group) Update

func (self *Group) Update()

Update The core update - as called by World.

func (*Group) UpdateI

func (self *Group) UpdateI(args ...interface{})

UpdateI The core update - as called by World.

func (*Group) UpdateZ

func (self *Group) UpdateZ()

UpdateZ Internal method that re-applies all of the children's Z values.

This must be called whenever children ordering is altered so that their `z` indices are correctly updated.

func (*Group) UpdateZI

func (self *Group) UpdateZI(args ...interface{})

UpdateZI Internal method that re-applies all of the children's Z values.

This must be called whenever children ordering is altered so that their `z` indices are correctly updated.

func (*Group) Width

func (self *Group) Width() int

Width The width of the displayObjectContainer, setting this will actually modify the scale to achieve the value set

func (*Group) Xy

func (self *Group) Xy(index int, x int, y int)

Xy Positions the child found at the given index within this group to the given x and y coordinates.

func (*Group) XyI

func (self *Group) XyI(args ...interface{})

XyI Positions the child found at the given index within this group to the given x and y coordinates.

func (*Group) Z

func (self *Group) Z() int

Z The z-depth value of this object within its parent container/Group - the World is a Group as well. This value must be unique for each child in a Group.

type Hermite

type Hermite struct {
	*js.Object
}

Hermite A data representation of a Hermite Curve (see http://en.wikipedia.org/wiki/Cubic_Hermite_spline)

A Hermite curve has a start and end point and tangent vectors for both of them. The curve will always pass through the two control points and the shape of it is controlled by the length and direction of the tangent vectors. At the control points the curve will be facing exactly in the vector direction.

As these curves change speed (speed = distance between points separated by an equal change in 't' value - see Hermite.getPoint) this class attempts to reduce the variation by pre-calculating the `accuracy` number of points on the curve. The straight-line distances to these points are stored in the private 'points' array, and this information is used by Hermite.findT() to convert a pixel distance along the curve into a 'time' value.

Higher `accuracy` values will result in more even movement, but require more memory for the points list. 5 works, but 10 seems to be an ideal value for the length of curves found in most games on a desktop screen. If you use very long curves (more than 400 pixels) you may need to increase this value further.

func NewHermite

func NewHermite(p1x int, p1y int, p2x int, p2y int, v1x int, v1y int, v2x int, v2y int) *Hermite

NewHermite A data representation of a Hermite Curve (see http://en.wikipedia.org/wiki/Cubic_Hermite_spline)

A Hermite curve has a start and end point and tangent vectors for both of them. The curve will always pass through the two control points and the shape of it is controlled by the length and direction of the tangent vectors. At the control points the curve will be facing exactly in the vector direction.

As these curves change speed (speed = distance between points separated by an equal change in 't' value - see Hermite.getPoint) this class attempts to reduce the variation by pre-calculating the `accuracy` number of points on the curve. The straight-line distances to these points are stored in the private 'points' array, and this information is used by Hermite.findT() to convert a pixel distance along the curve into a 'time' value.

Higher `accuracy` values will result in more even movement, but require more memory for the points list. 5 works, but 10 seems to be an ideal value for the length of curves found in most games on a desktop screen. If you use very long curves (more than 400 pixels) you may need to increase this value further.

func NewHermite1O

func NewHermite1O(p1x int, p1y int, p2x int, p2y int, v1x int, v1y int, v2x int, v2y int, accuracy int) *Hermite

NewHermite1O A data representation of a Hermite Curve (see http://en.wikipedia.org/wiki/Cubic_Hermite_spline)

A Hermite curve has a start and end point and tangent vectors for both of them. The curve will always pass through the two control points and the shape of it is controlled by the length and direction of the tangent vectors. At the control points the curve will be facing exactly in the vector direction.

As these curves change speed (speed = distance between points separated by an equal change in 't' value - see Hermite.getPoint) this class attempts to reduce the variation by pre-calculating the `accuracy` number of points on the curve. The straight-line distances to these points are stored in the private 'points' array, and this information is used by Hermite.findT() to convert a pixel distance along the curve into a 'time' value.

Higher `accuracy` values will result in more even movement, but require more memory for the points list. 5 works, but 10 seems to be an ideal value for the length of curves found in most games on a desktop screen. If you use very long curves (more than 400 pixels) you may need to increase this value further.

func NewHermiteI

func NewHermiteI(args ...interface{}) *Hermite

NewHermiteI A data representation of a Hermite Curve (see http://en.wikipedia.org/wiki/Cubic_Hermite_spline)

A Hermite curve has a start and end point and tangent vectors for both of them. The curve will always pass through the two control points and the shape of it is controlled by the length and direction of the tangent vectors. At the control points the curve will be facing exactly in the vector direction.

As these curves change speed (speed = distance between points separated by an equal change in 't' value - see Hermite.getPoint) this class attempts to reduce the variation by pre-calculating the `accuracy` number of points on the curve. The straight-line distances to these points are stored in the private 'points' array, and this information is used by Hermite.findT() to convert a pixel distance along the curve into a 'time' value.

Higher `accuracy` values will result in more even movement, but require more memory for the points list. 5 works, but 10 seems to be an ideal value for the length of curves found in most games on a desktop screen. If you use very long curves (more than 400 pixels) you may need to increase this value further.

func ToHermite

func ToHermite(jsStruct interface{}) *Hermite

Hermite Binding conversion method to Hermite point

func (*Hermite) Accuracy

func (self *Hermite) Accuracy() int

Accuracy The amount of points to pre-calculate on the curve.

func (*Hermite) CalculateEvenPoints

func (self *Hermite) CalculateEvenPoints() int

CalculateEvenPoints Calculate a number of points along the curve, based on `Hermite.accuracy`, and stores them in the private `_points` array.

func (*Hermite) CalculateEvenPointsI

func (self *Hermite) CalculateEvenPointsI(args ...interface{}) int

CalculateEvenPointsI Calculate a number of points along the curve, based on `Hermite.accuracy`, and stores them in the private `_points` array.

func (*Hermite) FindT

func (self *Hermite) FindT(distance int) int

FindT Convert a distance along this curve into a `time` value which will be between 0 and 1.

For example if this curve has a length of 100 pixels then `findT(50)` would return `0.5`.

func (*Hermite) FindTI

func (self *Hermite) FindTI(args ...interface{}) int

FindTI Convert a distance along this curve into a `time` value which will be between 0 and 1.

For example if this curve has a length of 100 pixels then `findT(50)` would return `0.5`.

func (*Hermite) GetAngle

func (self *Hermite) GetAngle() int

GetAngle Calculate and return the angle, in radians, of the curves tangent based on time.

func (*Hermite) GetAngle1O

func (self *Hermite) GetAngle1O(t int) int

GetAngle1O Calculate and return the angle, in radians, of the curves tangent based on time.

func (*Hermite) GetAngleI

func (self *Hermite) GetAngleI(args ...interface{}) int

GetAngleI Calculate and return the angle, in radians, of the curves tangent based on time.

func (*Hermite) GetAngleWithDistance

func (self *Hermite) GetAngleWithDistance() int

GetAngleWithDistance Calculate and return the angle, in radians, of the curves tangent at the given pixel distance along the curves length.

func (*Hermite) GetAngleWithDistance1O

func (self *Hermite) GetAngleWithDistance1O(distance int) int

GetAngleWithDistance1O Calculate and return the angle, in radians, of the curves tangent at the given pixel distance along the curves length.

func (*Hermite) GetAngleWithDistanceI

func (self *Hermite) GetAngleWithDistanceI(args ...interface{}) int

GetAngleWithDistanceI Calculate and return the angle, in radians, of the curves tangent at the given pixel distance along the curves length.

func (*Hermite) GetEntryTangent

func (self *Hermite) GetEntryTangent(point interface{}) *Point

GetEntryTangent Get the angle of the curves entry point.

func (*Hermite) GetEntryTangentI

func (self *Hermite) GetEntryTangentI(args ...interface{}) *Point

GetEntryTangentI Get the angle of the curves entry point.

func (*Hermite) GetPoint

func (self *Hermite) GetPoint() *Point

GetPoint Get a point on the curve using the `t` (time) value, which must be between 0 and 1.

func (*Hermite) GetPoint1O

func (self *Hermite) GetPoint1O(t int) *Point

GetPoint1O Get a point on the curve using the `t` (time) value, which must be between 0 and 1.

func (*Hermite) GetPoint2O

func (self *Hermite) GetPoint2O(t int, point interface{}) *Point

GetPoint2O Get a point on the curve using the `t` (time) value, which must be between 0 and 1.

func (*Hermite) GetPointI

func (self *Hermite) GetPointI(args ...interface{}) *Point

GetPointI Get a point on the curve using the `t` (time) value, which must be between 0 and 1.

func (*Hermite) GetPointWithDistance

func (self *Hermite) GetPointWithDistance() *Point

GetPointWithDistance Get a point on the curve using the distance, in pixels, along the curve.

func (*Hermite) GetPointWithDistance1O

func (self *Hermite) GetPointWithDistance1O(distance int) *Point

GetPointWithDistance1O Get a point on the curve using the distance, in pixels, along the curve.

func (*Hermite) GetPointWithDistance2O

func (self *Hermite) GetPointWithDistance2O(distance int, point interface{}) *Point

GetPointWithDistance2O Get a point on the curve using the distance, in pixels, along the curve.

func (*Hermite) GetPointWithDistanceI

func (self *Hermite) GetPointWithDistanceI(args ...interface{}) *Point

GetPointWithDistanceI Get a point on the curve using the distance, in pixels, along the curve.

func (*Hermite) GetX

func (self *Hermite) GetX() int

GetX Get the X component of a point on the curve based on the `t` (time) value, which must be between 0 and 1.

func (*Hermite) GetX1O

func (self *Hermite) GetX1O(t int) int

GetX1O Get the X component of a point on the curve based on the `t` (time) value, which must be between 0 and 1.

func (*Hermite) GetXI

func (self *Hermite) GetXI(args ...interface{}) int

GetXI Get the X component of a point on the curve based on the `t` (time) value, which must be between 0 and 1.

func (*Hermite) GetY

func (self *Hermite) GetY() int

GetY Get the Y component of a point on the curve based on the `t` (time) value, which must be between 0 and 1.

func (*Hermite) GetY1O

func (self *Hermite) GetY1O(t int) int

GetY1O Get the Y component of a point on the curve based on the `t` (time) value, which must be between 0 and 1.

func (*Hermite) GetYI

func (self *Hermite) GetYI(args ...interface{}) int

GetYI Get the Y component of a point on the curve based on the `t` (time) value, which must be between 0 and 1.

func (*Hermite) P1x

func (self *Hermite) P1x() int

P1x The x coordinate of the start of the curve. Setting this value will recalculate the curve.

func (*Hermite) P1y

func (self *Hermite) P1y() int

P1y The y coordinate of the start of the curve. Setting this value will recalculate the curve.

func (*Hermite) P2x

func (self *Hermite) P2x() int

P2x The x coordinate of the end of the curve. Setting this value will recalculate the curve.

func (*Hermite) P2y

func (self *Hermite) P2y() int

P2y The y coordinate of the end of the curve. Setting this value will recalculate the curve.

func (*Hermite) Recalculate

func (self *Hermite) Recalculate() *Hermite

Recalculate Performs the curve calculations.

This is called automatically if you change any of the curves public properties, such as `Hermite.p1x` or `Hermite.v2y`.

If you adjust any of the internal private values, then call this to update the points.

func (*Hermite) RecalculateI

func (self *Hermite) RecalculateI(args ...interface{}) *Hermite

RecalculateI Performs the curve calculations.

This is called automatically if you change any of the curves public properties, such as `Hermite.p1x` or `Hermite.v2y`.

If you adjust any of the internal private values, then call this to update the points.

func (*Hermite) SetAccuracyA

func (self *Hermite) SetAccuracyA(member int)

SetAccuracyA The amount of points to pre-calculate on the curve.

func (*Hermite) SetP1xA

func (self *Hermite) SetP1xA(member int)

SetP1xA The x coordinate of the start of the curve. Setting this value will recalculate the curve.

func (*Hermite) SetP1yA

func (self *Hermite) SetP1yA(member int)

SetP1yA The y coordinate of the start of the curve. Setting this value will recalculate the curve.

func (*Hermite) SetP2xA

func (self *Hermite) SetP2xA(member int)

SetP2xA The x coordinate of the end of the curve. Setting this value will recalculate the curve.

func (*Hermite) SetP2yA

func (self *Hermite) SetP2yA(member int)

SetP2yA The y coordinate of the end of the curve. Setting this value will recalculate the curve.

func (*Hermite) SetV1xA

func (self *Hermite) SetV1xA(member int)

SetV1xA The x component of the tangent vector for the start of the curve. Setting this value will recalculate the curve.

func (*Hermite) SetV1yA

func (self *Hermite) SetV1yA(member int)

SetV1yA The y component of the tangent vector for the start of the curve. Setting this value will recalculate the curve.

func (*Hermite) SetV2xA

func (self *Hermite) SetV2xA(member int)

SetV2xA The x component of the tangent vector for the end of the curve. Setting this value will recalculate the curve.

func (*Hermite) SetV2yA

func (self *Hermite) SetV2yA(member int)

SetV2yA The y component of the tangent vector for the end of the curve. Setting this value will recalculate the curve.

func (*Hermite) V1x

func (self *Hermite) V1x() int

V1x The x component of the tangent vector for the start of the curve. Setting this value will recalculate the curve.

func (*Hermite) V1y

func (self *Hermite) V1y() int

V1y The y component of the tangent vector for the start of the curve. Setting this value will recalculate the curve.

func (*Hermite) V2x

func (self *Hermite) V2x() int

V2x The x component of the tangent vector for the end of the curve. Setting this value will recalculate the curve.

func (*Hermite) V2y

func (self *Hermite) V2y() int

V2y The y component of the tangent vector for the end of the curve. Setting this value will recalculate the curve.

type Image

type Image struct {
	*js.Object
}

Image An Image is a light-weight object you can use to display anything that doesn't need physics or animation. It can still rotate, scale, crop and receive input events. This makes it perfect for logos, backgrounds, simple buttons and other non-Sprite graphics.

func NewImage

func NewImage(game *Game) *Image

NewImage An Image is a light-weight object you can use to display anything that doesn't need physics or animation. It can still rotate, scale, crop and receive input events. This makes it perfect for logos, backgrounds, simple buttons and other non-Sprite graphics.

func NewImage1O

func NewImage1O(game *Game, x int) *Image

NewImage1O An Image is a light-weight object you can use to display anything that doesn't need physics or animation. It can still rotate, scale, crop and receive input events. This makes it perfect for logos, backgrounds, simple buttons and other non-Sprite graphics.

func NewImage2O

func NewImage2O(game *Game, x int, y int) *Image

NewImage2O An Image is a light-weight object you can use to display anything that doesn't need physics or animation. It can still rotate, scale, crop and receive input events. This makes it perfect for logos, backgrounds, simple buttons and other non-Sprite graphics.

func NewImage3O

func NewImage3O(game *Game, x int, y int, key interface{}) *Image

NewImage3O An Image is a light-weight object you can use to display anything that doesn't need physics or animation. It can still rotate, scale, crop and receive input events. This makes it perfect for logos, backgrounds, simple buttons and other non-Sprite graphics.

func NewImage4O

func NewImage4O(game *Game, x int, y int, key interface{}, frame interface{}) *Image

NewImage4O An Image is a light-weight object you can use to display anything that doesn't need physics or animation. It can still rotate, scale, crop and receive input events. This makes it perfect for logos, backgrounds, simple buttons and other non-Sprite graphics.

func NewImageI

func NewImageI(args ...interface{}) *Image

NewImageI An Image is a light-weight object you can use to display anything that doesn't need physics or animation. It can still rotate, scale, crop and receive input events. This makes it perfect for logos, backgrounds, simple buttons and other non-Sprite graphics.

func ToImage

func ToImage(jsStruct interface{}) *Image

Image Binding conversion method to Image point

func (*Image) AddChild

func (self *Image) AddChild(child *DisplayObject) *DisplayObject

AddChild Adds a child to the container.

func (*Image) AddChildAt

func (self *Image) AddChildAt(child *DisplayObject, index int) *DisplayObject

AddChildAt Adds a child to the container at a specified index. If the index is out of bounds an error will be thrown

func (*Image) AddChildAtI

func (self *Image) AddChildAtI(args ...interface{}) *DisplayObject

AddChildAtI Adds a child to the container at a specified index. If the index is out of bounds an error will be thrown

func (*Image) AddChildI

func (self *Image) AddChildI(args ...interface{}) *DisplayObject

AddChildI Adds a child to the container.

func (*Image) AlignIn

func (self *Image) AlignIn(container interface{}) interface{}

AlignIn Aligns this Game Object within another Game Object, or Rectangle, known as the 'container', to one of 9 possible positions.

The container must be a Game Object, or Phaser.Rectangle object. This can include properties such as `World.bounds` or `Camera.view`, for aligning Game Objects within the world and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText, TileSprites or Buttons.

Please note that aligning a Sprite to another Game Object does **not** make it a child of the container. It simply modifies its position coordinates so it aligns with it.

The position constants you can use are:

`Phaser.TOP_LEFT`, `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

The Game Objects are placed in such a way that their _bounds_ align with the container, taking into consideration rotation, scale and the anchor property. This allows you to neatly align Game Objects, irrespective of their position value.

The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final aligned position of the Game Object. For example:

`sprite.alignIn(background, Phaser.BOTTOM_RIGHT, -20, -20)`

Would align the `sprite` to the bottom-right, but moved 20 pixels in from the corner. Think of the offsets as applying an adjustment to the containers bounds before the alignment takes place. So providing a negative offset will 'shrink' the container bounds by that amount, and providing a positive one expands it.

func (*Image) AlignIn1O

func (self *Image) AlignIn1O(container interface{}, position int) interface{}

AlignIn1O Aligns this Game Object within another Game Object, or Rectangle, known as the 'container', to one of 9 possible positions.

The container must be a Game Object, or Phaser.Rectangle object. This can include properties such as `World.bounds` or `Camera.view`, for aligning Game Objects within the world and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText, TileSprites or Buttons.

Please note that aligning a Sprite to another Game Object does **not** make it a child of the container. It simply modifies its position coordinates so it aligns with it.

The position constants you can use are:

`Phaser.TOP_LEFT`, `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

The Game Objects are placed in such a way that their _bounds_ align with the container, taking into consideration rotation, scale and the anchor property. This allows you to neatly align Game Objects, irrespective of their position value.

The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final aligned position of the Game Object. For example:

`sprite.alignIn(background, Phaser.BOTTOM_RIGHT, -20, -20)`

Would align the `sprite` to the bottom-right, but moved 20 pixels in from the corner. Think of the offsets as applying an adjustment to the containers bounds before the alignment takes place. So providing a negative offset will 'shrink' the container bounds by that amount, and providing a positive one expands it.

func (*Image) AlignIn2O

func (self *Image) AlignIn2O(container interface{}, position int, offsetX int) interface{}

AlignIn2O Aligns this Game Object within another Game Object, or Rectangle, known as the 'container', to one of 9 possible positions.

The container must be a Game Object, or Phaser.Rectangle object. This can include properties such as `World.bounds` or `Camera.view`, for aligning Game Objects within the world and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText, TileSprites or Buttons.

Please note that aligning a Sprite to another Game Object does **not** make it a child of the container. It simply modifies its position coordinates so it aligns with it.

The position constants you can use are:

`Phaser.TOP_LEFT`, `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

The Game Objects are placed in such a way that their _bounds_ align with the container, taking into consideration rotation, scale and the anchor property. This allows you to neatly align Game Objects, irrespective of their position value.

The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final aligned position of the Game Object. For example:

`sprite.alignIn(background, Phaser.BOTTOM_RIGHT, -20, -20)`

Would align the `sprite` to the bottom-right, but moved 20 pixels in from the corner. Think of the offsets as applying an adjustment to the containers bounds before the alignment takes place. So providing a negative offset will 'shrink' the container bounds by that amount, and providing a positive one expands it.

func (*Image) AlignIn3O

func (self *Image) AlignIn3O(container interface{}, position int, offsetX int, offsetY int) interface{}

AlignIn3O Aligns this Game Object within another Game Object, or Rectangle, known as the 'container', to one of 9 possible positions.

The container must be a Game Object, or Phaser.Rectangle object. This can include properties such as `World.bounds` or `Camera.view`, for aligning Game Objects within the world and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText, TileSprites or Buttons.

Please note that aligning a Sprite to another Game Object does **not** make it a child of the container. It simply modifies its position coordinates so it aligns with it.

The position constants you can use are:

`Phaser.TOP_LEFT`, `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

The Game Objects are placed in such a way that their _bounds_ align with the container, taking into consideration rotation, scale and the anchor property. This allows you to neatly align Game Objects, irrespective of their position value.

The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final aligned position of the Game Object. For example:

`sprite.alignIn(background, Phaser.BOTTOM_RIGHT, -20, -20)`

Would align the `sprite` to the bottom-right, but moved 20 pixels in from the corner. Think of the offsets as applying an adjustment to the containers bounds before the alignment takes place. So providing a negative offset will 'shrink' the container bounds by that amount, and providing a positive one expands it.

func (*Image) AlignInI

func (self *Image) AlignInI(args ...interface{}) interface{}

AlignInI Aligns this Game Object within another Game Object, or Rectangle, known as the 'container', to one of 9 possible positions.

The container must be a Game Object, or Phaser.Rectangle object. This can include properties such as `World.bounds` or `Camera.view`, for aligning Game Objects within the world and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText, TileSprites or Buttons.

Please note that aligning a Sprite to another Game Object does **not** make it a child of the container. It simply modifies its position coordinates so it aligns with it.

The position constants you can use are:

`Phaser.TOP_LEFT`, `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

The Game Objects are placed in such a way that their _bounds_ align with the container, taking into consideration rotation, scale and the anchor property. This allows you to neatly align Game Objects, irrespective of their position value.

The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final aligned position of the Game Object. For example:

`sprite.alignIn(background, Phaser.BOTTOM_RIGHT, -20, -20)`

Would align the `sprite` to the bottom-right, but moved 20 pixels in from the corner. Think of the offsets as applying an adjustment to the containers bounds before the alignment takes place. So providing a negative offset will 'shrink' the container bounds by that amount, and providing a positive one expands it.

func (*Image) AlignTo

func (self *Image) AlignTo(parent interface{}) interface{}

AlignTo Aligns this Game Object to the side of another Game Object, or Rectangle, known as the 'parent', in one of 11 possible positions.

The parent must be a Game Object, or Phaser.Rectangle object. This can include properties such as `World.bounds` or `Camera.view`, for aligning Game Objects within the world and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText, TileSprites or Buttons.

Please note that aligning a Sprite to another Game Object does **not** make it a child of the parent. It simply modifies its position coordinates so it aligns with it.

The position constants you can use are:

`Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_TOP`, `Phaser.LEFT_CENTER`, `Phaser.LEFT_BOTTOM`, `Phaser.RIGHT_TOP`, `Phaser.RIGHT_CENTER`, `Phaser.RIGHT_BOTTOM`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

The Game Objects are placed in such a way that their _bounds_ align with the parent, taking into consideration rotation, scale and the anchor property. This allows you to neatly align Game Objects, irrespective of their position value.

The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final aligned position of the Game Object. For example:

`sprite.alignTo(background, Phaser.BOTTOM_RIGHT, -20, -20)`

Would align the `sprite` to the bottom-right, but moved 20 pixels in from the corner. Think of the offsets as applying an adjustment to the parents bounds before the alignment takes place. So providing a negative offset will 'shrink' the parent bounds by that amount, and providing a positive one expands it.

func (*Image) AlignTo1O

func (self *Image) AlignTo1O(parent interface{}, position int) interface{}

AlignTo1O Aligns this Game Object to the side of another Game Object, or Rectangle, known as the 'parent', in one of 11 possible positions.

The parent must be a Game Object, or Phaser.Rectangle object. This can include properties such as `World.bounds` or `Camera.view`, for aligning Game Objects within the world and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText, TileSprites or Buttons.

Please note that aligning a Sprite to another Game Object does **not** make it a child of the parent. It simply modifies its position coordinates so it aligns with it.

The position constants you can use are:

`Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_TOP`, `Phaser.LEFT_CENTER`, `Phaser.LEFT_BOTTOM`, `Phaser.RIGHT_TOP`, `Phaser.RIGHT_CENTER`, `Phaser.RIGHT_BOTTOM`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

The Game Objects are placed in such a way that their _bounds_ align with the parent, taking into consideration rotation, scale and the anchor property. This allows you to neatly align Game Objects, irrespective of their position value.

The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final aligned position of the Game Object. For example:

`sprite.alignTo(background, Phaser.BOTTOM_RIGHT, -20, -20)`

Would align the `sprite` to the bottom-right, but moved 20 pixels in from the corner. Think of the offsets as applying an adjustment to the parents bounds before the alignment takes place. So providing a negative offset will 'shrink' the parent bounds by that amount, and providing a positive one expands it.

func (*Image) AlignTo2O

func (self *Image) AlignTo2O(parent interface{}, position int, offsetX int) interface{}

AlignTo2O Aligns this Game Object to the side of another Game Object, or Rectangle, known as the 'parent', in one of 11 possible positions.

The parent must be a Game Object, or Phaser.Rectangle object. This can include properties such as `World.bounds` or `Camera.view`, for aligning Game Objects within the world and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText, TileSprites or Buttons.

Please note that aligning a Sprite to another Game Object does **not** make it a child of the parent. It simply modifies its position coordinates so it aligns with it.

The position constants you can use are:

`Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_TOP`, `Phaser.LEFT_CENTER`, `Phaser.LEFT_BOTTOM`, `Phaser.RIGHT_TOP`, `Phaser.RIGHT_CENTER`, `Phaser.RIGHT_BOTTOM`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

The Game Objects are placed in such a way that their _bounds_ align with the parent, taking into consideration rotation, scale and the anchor property. This allows you to neatly align Game Objects, irrespective of their position value.

The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final aligned position of the Game Object. For example:

`sprite.alignTo(background, Phaser.BOTTOM_RIGHT, -20, -20)`

Would align the `sprite` to the bottom-right, but moved 20 pixels in from the corner. Think of the offsets as applying an adjustment to the parents bounds before the alignment takes place. So providing a negative offset will 'shrink' the parent bounds by that amount, and providing a positive one expands it.

func (*Image) AlignTo3O

func (self *Image) AlignTo3O(parent interface{}, position int, offsetX int, offsetY int) interface{}

AlignTo3O Aligns this Game Object to the side of another Game Object, or Rectangle, known as the 'parent', in one of 11 possible positions.

The parent must be a Game Object, or Phaser.Rectangle object. This can include properties such as `World.bounds` or `Camera.view`, for aligning Game Objects within the world and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText, TileSprites or Buttons.

Please note that aligning a Sprite to another Game Object does **not** make it a child of the parent. It simply modifies its position coordinates so it aligns with it.

The position constants you can use are:

`Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_TOP`, `Phaser.LEFT_CENTER`, `Phaser.LEFT_BOTTOM`, `Phaser.RIGHT_TOP`, `Phaser.RIGHT_CENTER`, `Phaser.RIGHT_BOTTOM`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

The Game Objects are placed in such a way that their _bounds_ align with the parent, taking into consideration rotation, scale and the anchor property. This allows you to neatly align Game Objects, irrespective of their position value.

The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final aligned position of the Game Object. For example:

`sprite.alignTo(background, Phaser.BOTTOM_RIGHT, -20, -20)`

Would align the `sprite` to the bottom-right, but moved 20 pixels in from the corner. Think of the offsets as applying an adjustment to the parents bounds before the alignment takes place. So providing a negative offset will 'shrink' the parent bounds by that amount, and providing a positive one expands it.

func (*Image) AlignToI

func (self *Image) AlignToI(args ...interface{}) interface{}

AlignToI Aligns this Game Object to the side of another Game Object, or Rectangle, known as the 'parent', in one of 11 possible positions.

The parent must be a Game Object, or Phaser.Rectangle object. This can include properties such as `World.bounds` or `Camera.view`, for aligning Game Objects within the world and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText, TileSprites or Buttons.

Please note that aligning a Sprite to another Game Object does **not** make it a child of the parent. It simply modifies its position coordinates so it aligns with it.

The position constants you can use are:

`Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_TOP`, `Phaser.LEFT_CENTER`, `Phaser.LEFT_BOTTOM`, `Phaser.RIGHT_TOP`, `Phaser.RIGHT_CENTER`, `Phaser.RIGHT_BOTTOM`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

The Game Objects are placed in such a way that their _bounds_ align with the parent, taking into consideration rotation, scale and the anchor property. This allows you to neatly align Game Objects, irrespective of their position value.

The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final aligned position of the Game Object. For example:

`sprite.alignTo(background, Phaser.BOTTOM_RIGHT, -20, -20)`

Would align the `sprite` to the bottom-right, but moved 20 pixels in from the corner. Think of the offsets as applying an adjustment to the parents bounds before the alignment takes place. So providing a negative offset will 'shrink' the parent bounds by that amount, and providing a positive one expands it.

func (*Image) Alive

func (self *Image) Alive() bool

Alive A useful flag to control if the Game Object is alive or dead.

This is set automatically by the Health components `damage` method should the object run out of health. Or you can toggle it via your game code.

This property is mostly just provided to be used by your game - it doesn't effect rendering or logic updates. However you can use `Group.getFirstAlive` in conjunction with this property for fast object pooling and recycling.

func (*Image) Anchor

func (self *Image) Anchor() *Point

Anchor The anchor sets the origin point of the texture.

The default is 0,0 this means the texture's origin is the top left

Setting than anchor to 0.5,0.5 means the textures origin is centered

Setting the anchor to 1,1 would mean the textures origin points will be the bottom right corner

func (*Image) Angle

func (self *Image) Angle() int

Angle The angle property is the rotation of the Game Object in *degrees* from its original orientation.

Values from 0 to 180 represent clockwise rotation; values from 0 to -180 represent counterclockwise rotation.

Values outside this range are added to or subtracted from 360 to obtain a value within the range. For example, the statement player.angle = 450 is the same as player.angle = 90.

If you wish to work in radians instead of degrees you can use the property `rotation` instead. Working in radians is slightly faster as it doesn't have to perform any calculations.

func (*Image) Animations

func (self *Image) Animations() *AnimationManager

Animations If the Game Object is enabled for animation (such as a Phaser.Sprite) this is a reference to its AnimationManager instance. Through it you can create, play, pause and stop animations.

func (*Image) AutoCull

func (self *Image) AutoCull() bool

AutoCull A Game Object with `autoCull` set to true will check its bounds against the World Camera every frame. If it is not intersecting the Camera bounds at any point then it has its `renderable` property set to `false`. This keeps the Game Object alive and still processing updates, but forces it to skip the render step entirely.

This is a relatively expensive operation, especially if enabled on hundreds of Game Objects. So enable it only if you know it's required, or you have tested performance and find it acceptable.

func (*Image) BlendMode

func (self *Image) BlendMode() int

BlendMode The blend mode to be applied to the sprite. Set to PIXI.blendModes.NORMAL to remove any blend mode.

Warning: You cannot have a blend mode and a filter active on the same Sprite. Doing so will render the sprite invisible.

func (*Image) Bottom

func (self *Image) Bottom() int

Bottom The sum of the y and height properties. This is the same as `y + height - offsetY`.

func (*Image) BringToTop

func (self *Image) BringToTop() *DisplayObject

BringToTop Brings this Game Object to the top of its parents display list. Visually this means it will render over the top of any old child in the same Group.

If this Game Object hasn't been added to a custom Group then this method will bring it to the top of the Game World, because the World is the root Group from which all Game Objects descend.

func (*Image) BringToTopI

func (self *Image) BringToTopI(args ...interface{}) *DisplayObject

BringToTopI Brings this Game Object to the top of its parents display list. Visually this means it will render over the top of any old child in the same Group.

If this Game Object hasn't been added to a custom Group then this method will bring it to the top of the Game World, because the World is the root Group from which all Game Objects descend.

func (*Image) CameraOffset

func (self *Image) CameraOffset() *Point

CameraOffset The x/y coordinate offset applied to the top-left of the camera that this Game Object will be drawn at if `fixedToCamera` is true.

The values are relative to the top-left of the camera view and in addition to any parent of the Game Object on the display list.

func (*Image) CenterX

func (self *Image) CenterX() int

CenterX The center x coordinate of the Game Object. This is the same as `(x - offsetX) + (width / 2)`.

func (*Image) CenterY

func (self *Image) CenterY() int

CenterY The center y coordinate of the Game Object. This is the same as `(y - offsetY) + (height / 2)`.

func (*Image) CheckTransform

func (self *Image) CheckTransform(wt *Matrix)

CheckTransform Adjust scaling limits, if set, to this Game Object.

func (*Image) CheckTransformI

func (self *Image) CheckTransformI(args ...interface{})

CheckTransformI Adjust scaling limits, if set, to this Game Object.

func (*Image) Children

func (self *Image) Children() []DisplayObject

Children [read-only] The array of children of this container.

func (*Image) Components

func (self *Image) Components() interface{}

Components The components this Game Object has installed.

func (*Image) Contains

func (self *Image) Contains(child *DisplayObject) bool

Contains Determines whether the specified display object is a child of the DisplayObjectContainer instance or the instance itself.

func (*Image) ContainsI

func (self *Image) ContainsI(args ...interface{}) bool

ContainsI Determines whether the specified display object is a child of the DisplayObjectContainer instance or the instance itself.

func (*Image) Crop

func (self *Image) Crop(rect *Rectangle)

Crop Crop allows you to crop the texture being used to display this Game Object. Setting a crop rectangle modifies the core texture frame. The Game Object width and height properties will be adjusted accordingly.

Cropping takes place from the top-left and can be modified in real-time either by providing an updated rectangle object to this method, or by modifying `cropRect` property directly and then calling `updateCrop`.

The rectangle object given to this method can be either a `Phaser.Rectangle` or any other object so long as it has public `x`, `y`, `width`, `height`, `right` and `bottom` properties.

A reference to the rectangle is stored in `cropRect` unless the `copy` parameter is `true`, in which case the values are duplicated to a local object.

func (*Image) Crop1O

func (self *Image) Crop1O(rect *Rectangle, copy bool)

Crop1O Crop allows you to crop the texture being used to display this Game Object. Setting a crop rectangle modifies the core texture frame. The Game Object width and height properties will be adjusted accordingly.

Cropping takes place from the top-left and can be modified in real-time either by providing an updated rectangle object to this method, or by modifying `cropRect` property directly and then calling `updateCrop`.

The rectangle object given to this method can be either a `Phaser.Rectangle` or any other object so long as it has public `x`, `y`, `width`, `height`, `right` and `bottom` properties.

A reference to the rectangle is stored in `cropRect` unless the `copy` parameter is `true`, in which case the values are duplicated to a local object.

func (*Image) CropI

func (self *Image) CropI(args ...interface{})

CropI Crop allows you to crop the texture being used to display this Game Object. Setting a crop rectangle modifies the core texture frame. The Game Object width and height properties will be adjusted accordingly.

Cropping takes place from the top-left and can be modified in real-time either by providing an updated rectangle object to this method, or by modifying `cropRect` property directly and then calling `updateCrop`.

The rectangle object given to this method can be either a `Phaser.Rectangle` or any other object so long as it has public `x`, `y`, `width`, `height`, `right` and `bottom` properties.

A reference to the rectangle is stored in `cropRect` unless the `copy` parameter is `true`, in which case the values are duplicated to a local object.

func (*Image) CropRect

func (self *Image) CropRect() *Rectangle

CropRect The Rectangle used to crop the texture this Game Object uses. Set this property via `crop`. If you modify this property directly you must call `updateCrop` in order to have the change take effect.

func (*Image) Data

func (self *Image) Data() interface{}

Data An empty Object that belongs to this Game Object. This value isn't ever used internally by Phaser, but may be used by your own code, or by Phaser Plugins, to store data that needs to be associated with the Game Object, without polluting the Game Object directly.

func (*Image) Debug

func (self *Image) Debug() bool

Debug A debug flag designed for use with `Game.enableStep`.

func (*Image) Destroy

func (self *Image) Destroy()

Destroy Destroys the Game Object. This removes it from its parent group, destroys the input, event and animation handlers if present and nulls its reference to `game`, freeing it up for garbage collection.

If this Game Object has the Events component it will also dispatch the `onDestroy` event.

You can optionally also destroy the BaseTexture this Game Object is using. Be careful if you've more than one Game Object sharing the same BaseTexture.

func (*Image) Destroy1O

func (self *Image) Destroy1O(destroyChildren bool)

Destroy1O Destroys the Game Object. This removes it from its parent group, destroys the input, event and animation handlers if present and nulls its reference to `game`, freeing it up for garbage collection.

If this Game Object has the Events component it will also dispatch the `onDestroy` event.

You can optionally also destroy the BaseTexture this Game Object is using. Be careful if you've more than one Game Object sharing the same BaseTexture.

func (*Image) Destroy2O

func (self *Image) Destroy2O(destroyChildren bool, destroyTexture bool)

Destroy2O Destroys the Game Object. This removes it from its parent group, destroys the input, event and animation handlers if present and nulls its reference to `game`, freeing it up for garbage collection.

If this Game Object has the Events component it will also dispatch the `onDestroy` event.

You can optionally also destroy the BaseTexture this Game Object is using. Be careful if you've more than one Game Object sharing the same BaseTexture.

func (*Image) DestroyI

func (self *Image) DestroyI(args ...interface{})

DestroyI Destroys the Game Object. This removes it from its parent group, destroys the input, event and animation handlers if present and nulls its reference to `game`, freeing it up for garbage collection.

If this Game Object has the Events component it will also dispatch the `onDestroy` event.

You can optionally also destroy the BaseTexture this Game Object is using. Be careful if you've more than one Game Object sharing the same BaseTexture.

func (*Image) DestroyPhase

func (self *Image) DestroyPhase() bool

DestroyPhase As a Game Object runs through its destroy method this flag is set to true, and can be checked in any sub-systems or plugins it is being destroyed from.

func (*Image) Events

func (self *Image) Events() *Events

Events All Phaser Game Objects have an Events class which contains all of the events that are dispatched when certain things happen to this Game Object, or any of its components.

func (*Image) Exists

func (self *Image) Exists() bool

Exists Controls if this Sprite is processed by the core Phaser game loops and Group loops.

func (*Image) FixedToCamera

func (self *Image) FixedToCamera() bool

FixedToCamera A Game Object that is "fixed" to the camera uses its x/y coordinates as offsets from the top left of the camera during rendering.

The values are adjusted at the rendering stage, overriding the Game Objects actual world position.

The end result is that the Game Object will appear to be 'fixed' to the camera, regardless of where in the game world the camera is viewing. This is useful if for example this Game Object is a UI item that you wish to be visible at all times regardless where in the world the camera is.

The offsets are stored in the `cameraOffset` property.

Note that the `cameraOffset` values are in addition to any parent of this Game Object on the display list.

Be careful not to set `fixedToCamera` on Game Objects which are in Groups that already have `fixedToCamera` enabled on them.

func (*Image) Frame

func (self *Image) Frame() int

Frame Gets or sets the current frame index of the texture being used to render this Game Object.

To change the frame set `frame` to the index of the new frame in the sprite sheet you wish this Game Object to use, for example: `player.frame = 4`.

If the frame index given doesn't exist it will revert to the first frame found in the texture.

If you are using a texture atlas then you should use the `frameName` property instead.

If you wish to fully replace the texture being used see `loadTexture`.

func (*Image) FrameName

func (self *Image) FrameName() string

FrameName Gets or sets the current frame name of the texture being used to render this Game Object.

To change the frame set `frameName` to the name of the new frame in the texture atlas you wish this Game Object to use, for example: `player.frameName = "idle"`.

If the frame name given doesn't exist it will revert to the first frame found in the texture and throw a console warning.

If you are using a sprite sheet then you should use the `frame` property instead.

If you wish to fully replace the texture being used see `loadTexture`.

func (*Image) Fresh

func (self *Image) Fresh() bool

Fresh A Game Object is considered `fresh` if it has just been created or reset and is yet to receive a renderer transform update. This property is mostly used internally by the physics systems, but is exposed for the use of plugins.

func (*Image) Game

func (self *Image) Game() *Game

Game A reference to the currently running Game.

func (*Image) GetBounds

func (self *Image) GetBounds(matrix *Matrix) *Rectangle

GetBounds Returns the bounds of the Sprite as a rectangle.

The bounds calculation takes the worldTransform into account.

It is important to note that the transform is not updated when you call this method.

So if this Sprite is the child of a Display Object which has had its transform

updated since the last render pass, those changes will not yet have been applied

to this Sprites worldTransform. If you need to ensure that all parent transforms

are factored into this getBounds operation then you should call `updateTransform`

on the root most object in this Sprites display list first.

func (*Image) GetBoundsI

func (self *Image) GetBoundsI(args ...interface{}) *Rectangle

GetBoundsI Returns the bounds of the Sprite as a rectangle.

The bounds calculation takes the worldTransform into account.

It is important to note that the transform is not updated when you call this method.

So if this Sprite is the child of a Display Object which has had its transform

updated since the last render pass, those changes will not yet have been applied

to this Sprites worldTransform. If you need to ensure that all parent transforms

are factored into this getBounds operation then you should call `updateTransform`

on the root most object in this Sprites display list first.

func (*Image) GetChildAt

func (self *Image) GetChildAt(index int) *DisplayObject

GetChildAt Returns the child at the specified index

func (*Image) GetChildAtI

func (self *Image) GetChildAtI(args ...interface{}) *DisplayObject

GetChildAtI Returns the child at the specified index

func (*Image) GetChildIndex

func (self *Image) GetChildIndex(child *DisplayObject) int

GetChildIndex Returns the index position of a child DisplayObject instance

func (*Image) GetChildIndexI

func (self *Image) GetChildIndexI(args ...interface{}) int

GetChildIndexI Returns the index position of a child DisplayObject instance

func (*Image) GetLocalBounds

func (self *Image) GetLocalBounds() *Rectangle

GetLocalBounds Retrieves the non-global local bounds of the Sprite as a rectangle. The calculation takes all visible children into consideration.

func (*Image) GetLocalBoundsI

func (self *Image) GetLocalBoundsI(args ...interface{}) *Rectangle

GetLocalBoundsI Retrieves the non-global local bounds of the Sprite as a rectangle. The calculation takes all visible children into consideration.

func (*Image) Height

func (self *Image) Height() int

Height The height of the sprite, setting this will actually modify the scale to achieve the value set

func (*Image) IgnoreChildInput

func (self *Image) IgnoreChildInput() bool

IgnoreChildInput If `ignoreChildInput` is `false` it will allow this objects _children_ to be considered as valid for Input events.

If this property is `true` then the children will _not_ be considered as valid for Input events.

Note that this property isn't recursive: only immediate children are influenced, it doesn't scan further down.

func (*Image) InCamera

func (self *Image) InCamera() bool

InCamera Checks if the Game Objects bounds intersect with the Game Camera bounds. Returns `true` if they do, otherwise `false` if fully outside of the Cameras bounds.

func (*Image) Input

func (self *Image) Input() interface{}

Input The Input Handler for this Game Object.

By default it is disabled. If you wish this Game Object to process input events you should enable it with: `inputEnabled = true`.

After you have done this, this property will be a reference to the Phaser InputHandler.

func (*Image) InputEnabled

func (self *Image) InputEnabled() bool

InputEnabled By default a Game Object won't process any input events. By setting `inputEnabled` to true a Phaser.InputHandler is created for this Game Object and it will then start to process click / touch events and more.

You can then access the Input Handler via `this.input`.

Note that Input related events are dispatched from `this.events`, i.e.: `events.onInputDown`.

If you set this property to false it will stop the Input Handler from processing any more input events.

If you want to _temporarily_ disable input for a Game Object, then it's better to set `input.enabled = false`, as it won't reset any of the Input Handlers internal properties. You can then toggle this back on as needed.

func (*Image) Key

func (self *Image) Key() interface{}

Key The key of the image or texture used by this Game Object during rendering. If it is a string it's the string used to retrieve the texture from the Phaser Image Cache. It can also be an instance of a RenderTexture, BitmapData, Video or PIXI.Texture. If a Game Object is created without a key it is automatically assigned the key `__default` which is a 32x32 transparent PNG stored within the Cache. If a Game Object is given a key which doesn't exist in the Image Cache it is re-assigned the key `__missing` which is a 32x32 PNG of a green box with a line through it.

func (*Image) Kill

func (self *Image) Kill() *DisplayObject

Kill Kills a Game Object. A killed Game Object has its `alive`, `exists` and `visible` properties all set to false.

It will dispatch the `onKilled` event. You can listen to `events.onKilled` for the signal.

Note that killing a Game Object is a way for you to quickly recycle it in an object pool, it doesn't destroy the object or free it up from memory.

If you don't need this Game Object any more you should call `destroy` instead.

func (*Image) KillI

func (self *Image) KillI(args ...interface{}) *DisplayObject

KillI Kills a Game Object. A killed Game Object has its `alive`, `exists` and `visible` properties all set to false.

It will dispatch the `onKilled` event. You can listen to `events.onKilled` for the signal.

Note that killing a Game Object is a way for you to quickly recycle it in an object pool, it doesn't destroy the object or free it up from memory.

If you don't need this Game Object any more you should call `destroy` instead.

func (*Image) Left

func (self *Image) Left() int

Left The left coordinate of the Game Object. This is the same as `x - offsetX`.

func (*Image) Lifespan

func (self *Image) Lifespan() int

Lifespan The lifespan allows you to give a Game Object a lifespan in milliseconds.

Once the Game Object is 'born' you can set this to a positive value.

It is automatically decremented by the millisecond equivalent of `game.time.physicsElapsed` each frame. When it reaches zero it will call the `kill` method.

Very handy for particles, bullets, collectibles, or any other short-lived entity.

func (*Image) LoadTexture

func (self *Image) LoadTexture(key interface{})

LoadTexture Changes the base texture the Game Object is using. The old texture is removed and the new one is referenced or fetched from the Cache.

If your Game Object is using a frame from a texture atlas and you just wish to change to another frame, then see the `frame` or `frameName` properties instead.

You should only use `loadTexture` if you want to replace the base texture entirely.

Calling this method causes a WebGL texture update, so use sparingly or in low-intensity portions of your game, or if you know the new texture is already on the GPU.

You can use the new const `Phaser.PENDING_ATLAS` as the texture key for any sprite. Doing this then sets the key to be the `frame` argument (the frame is set to zero).

This allows you to create sprites using `load.image` during development, and then change them to use a Texture Atlas later in development by simply searching your code for 'PENDING_ATLAS' and swapping it to be the key of the atlas data.

Note: You cannot use a RenderTexture as a texture for a TileSprite.

func (*Image) LoadTexture1O

func (self *Image) LoadTexture1O(key interface{}, frame interface{})

LoadTexture1O Changes the base texture the Game Object is using. The old texture is removed and the new one is referenced or fetched from the Cache.

If your Game Object is using a frame from a texture atlas and you just wish to change to another frame, then see the `frame` or `frameName` properties instead.

You should only use `loadTexture` if you want to replace the base texture entirely.

Calling this method causes a WebGL texture update, so use sparingly or in low-intensity portions of your game, or if you know the new texture is already on the GPU.

You can use the new const `Phaser.PENDING_ATLAS` as the texture key for any sprite. Doing this then sets the key to be the `frame` argument (the frame is set to zero).

This allows you to create sprites using `load.image` during development, and then change them to use a Texture Atlas later in development by simply searching your code for 'PENDING_ATLAS' and swapping it to be the key of the atlas data.

Note: You cannot use a RenderTexture as a texture for a TileSprite.

func (*Image) LoadTexture2O

func (self *Image) LoadTexture2O(key interface{}, frame interface{}, stopAnimation bool)

LoadTexture2O Changes the base texture the Game Object is using. The old texture is removed and the new one is referenced or fetched from the Cache.

If your Game Object is using a frame from a texture atlas and you just wish to change to another frame, then see the `frame` or `frameName` properties instead.

You should only use `loadTexture` if you want to replace the base texture entirely.

Calling this method causes a WebGL texture update, so use sparingly or in low-intensity portions of your game, or if you know the new texture is already on the GPU.

You can use the new const `Phaser.PENDING_ATLAS` as the texture key for any sprite. Doing this then sets the key to be the `frame` argument (the frame is set to zero).

This allows you to create sprites using `load.image` during development, and then change them to use a Texture Atlas later in development by simply searching your code for 'PENDING_ATLAS' and swapping it to be the key of the atlas data.

Note: You cannot use a RenderTexture as a texture for a TileSprite.

func (*Image) LoadTextureI

func (self *Image) LoadTextureI(args ...interface{})

LoadTextureI Changes the base texture the Game Object is using. The old texture is removed and the new one is referenced or fetched from the Cache.

If your Game Object is using a frame from a texture atlas and you just wish to change to another frame, then see the `frame` or `frameName` properties instead.

You should only use `loadTexture` if you want to replace the base texture entirely.

Calling this method causes a WebGL texture update, so use sparingly or in low-intensity portions of your game, or if you know the new texture is already on the GPU.

You can use the new const `Phaser.PENDING_ATLAS` as the texture key for any sprite. Doing this then sets the key to be the `frame` argument (the frame is set to zero).

This allows you to create sprites using `load.image` during development, and then change them to use a Texture Atlas later in development by simply searching your code for 'PENDING_ATLAS' and swapping it to be the key of the atlas data.

Note: You cannot use a RenderTexture as a texture for a TileSprite.

func (*Image) MoveDown

func (self *Image) MoveDown() *DisplayObject

MoveDown Moves this Game Object down one place in its parents display list. This call has no effect if the Game Object is already at the bottom of the display list.

If this Game Object hasn't been added to a custom Group then this method will move it one object down within the Game World, because the World is the root Group from which all Game Objects descend.

func (*Image) MoveDownI

func (self *Image) MoveDownI(args ...interface{}) *DisplayObject

MoveDownI Moves this Game Object down one place in its parents display list. This call has no effect if the Game Object is already at the bottom of the display list.

If this Game Object hasn't been added to a custom Group then this method will move it one object down within the Game World, because the World is the root Group from which all Game Objects descend.

func (*Image) MoveUp

func (self *Image) MoveUp() *DisplayObject

MoveUp Moves this Game Object up one place in its parents display list. This call has no effect if the Game Object is already at the top of the display list.

If this Game Object hasn't been added to a custom Group then this method will move it one object up within the Game World, because the World is the root Group from which all Game Objects descend.

func (*Image) MoveUpI

func (self *Image) MoveUpI(args ...interface{}) *DisplayObject

MoveUpI Moves this Game Object up one place in its parents display list. This call has no effect if the Game Object is already at the top of the display list.

If this Game Object hasn't been added to a custom Group then this method will move it one object up within the Game World, because the World is the root Group from which all Game Objects descend.

func (*Image) Name

func (self *Image) Name() string

Name A user defined name given to this Game Object. This value isn't ever used internally by Phaser, it is meant as a game level property.

func (*Image) OffsetX

func (self *Image) OffsetX() int

OffsetX The amount the Game Object is visually offset from its x coordinate. This is the same as `width * anchor.x`. It will only be > 0 if anchor.x is not equal to zero.

func (*Image) OffsetY

func (self *Image) OffsetY() int

OffsetY The amount the Game Object is visually offset from its y coordinate. This is the same as `height * anchor.y`. It will only be > 0 if anchor.y is not equal to zero.

func (*Image) OnTextureUpdate

func (self *Image) OnTextureUpdate(event interface{})

OnTextureUpdate When the texture is updated, this event will fire to update the scale and frame

func (*Image) OnTextureUpdateI

func (self *Image) OnTextureUpdateI(args ...interface{})

OnTextureUpdateI When the texture is updated, this event will fire to update the scale and frame

func (*Image) Overlap

func (self *Image) Overlap(displayObject interface{}) bool

Overlap Checks to see if the bounds of this Game Object overlaps with the bounds of the given Display Object, which can be a Sprite, Image, TileSprite or anything that extends those such as Button or provides a `getBounds` method and result.

This check ignores the `hitArea` property if set and runs a `getBounds` comparison on both objects to determine the result.

Therefore it's relatively expensive to use in large quantities, i.e. with lots of Sprites at a high frequency. It should be fine for low-volume testing where physics isn't required.

func (*Image) OverlapI

func (self *Image) OverlapI(args ...interface{}) bool

OverlapI Checks to see if the bounds of this Game Object overlaps with the bounds of the given Display Object, which can be a Sprite, Image, TileSprite or anything that extends those such as Button or provides a `getBounds` method and result.

This check ignores the `hitArea` property if set and runs a `getBounds` comparison on both objects to determine the result.

Therefore it's relatively expensive to use in large quantities, i.e. with lots of Sprites at a high frequency. It should be fine for low-volume testing where physics isn't required.

func (*Image) PendingDestroy

func (self *Image) PendingDestroy() bool

PendingDestroy A Game Object is that is pendingDestroy is flagged to have its destroy method called on the next logic update. You can set it directly to allow you to flag an object to be destroyed on its next update.

This is extremely useful if you wish to destroy an object from within one of its own callbacks such as with Buttons or other Input events.

func (*Image) Play

func (self *Image) Play(name string) *Animation

Play Plays an Animation.

The animation should have previously been created via `animations.add`.

If the animation is already playing calling this again won't do anything. If you need to reset an already running animation do so directly on the Animation object itself or via `AnimationManager.stop`.

func (*Image) Play1O

func (self *Image) Play1O(name string, frameRate int) *Animation

Play1O Plays an Animation.

The animation should have previously been created via `animations.add`.

If the animation is already playing calling this again won't do anything. If you need to reset an already running animation do so directly on the Animation object itself or via `AnimationManager.stop`.

func (*Image) Play2O

func (self *Image) Play2O(name string, frameRate int, loop bool) *Animation

Play2O Plays an Animation.

The animation should have previously been created via `animations.add`.

If the animation is already playing calling this again won't do anything. If you need to reset an already running animation do so directly on the Animation object itself or via `AnimationManager.stop`.

func (*Image) Play3O

func (self *Image) Play3O(name string, frameRate int, loop bool, killOnComplete bool) *Animation

Play3O Plays an Animation.

The animation should have previously been created via `animations.add`.

If the animation is already playing calling this again won't do anything. If you need to reset an already running animation do so directly on the Animation object itself or via `AnimationManager.stop`.

func (*Image) PlayI

func (self *Image) PlayI(args ...interface{}) *Animation

PlayI Plays an Animation.

The animation should have previously been created via `animations.add`.

If the animation is already playing calling this again won't do anything. If you need to reset an already running animation do so directly on the Animation object itself or via `AnimationManager.stop`.

func (*Image) PostUpdate

func (self *Image) PostUpdate()

PostUpdate Internal method called by the World postUpdate cycle.

func (*Image) PostUpdateI

func (self *Image) PostUpdateI(args ...interface{})

PostUpdateI Internal method called by the World postUpdate cycle.

func (*Image) PreUpdate

func (self *Image) PreUpdate()

PreUpdate Automatically called by World.preUpdate.

func (*Image) PreUpdateI

func (self *Image) PreUpdateI(args ...interface{})

PreUpdateI Automatically called by World.preUpdate.

func (*Image) PreviousPosition

func (self *Image) PreviousPosition() *Point

PreviousPosition The position the Game Object was located in the previous frame.

func (*Image) PreviousRotation

func (self *Image) PreviousRotation() int

PreviousRotation The rotation the Game Object was in set to in the previous frame. Value is in radians.

func (*Image) RemoveChild

func (self *Image) RemoveChild(child *DisplayObject) *DisplayObject

RemoveChild Removes a child from the container.

func (*Image) RemoveChildAt

func (self *Image) RemoveChildAt(index int) *DisplayObject

RemoveChildAt Removes a child from the specified index position.

func (*Image) RemoveChildAtI

func (self *Image) RemoveChildAtI(args ...interface{}) *DisplayObject

RemoveChildAtI Removes a child from the specified index position.

func (*Image) RemoveChildI

func (self *Image) RemoveChildI(args ...interface{}) *DisplayObject

RemoveChildI Removes a child from the container.

func (*Image) RemoveChildren

func (self *Image) RemoveChildren(beginIndex int, endIndex int)

RemoveChildren Removes all children from this container that are within the begin and end indexes.

func (*Image) RemoveChildrenI

func (self *Image) RemoveChildrenI(args ...interface{})

RemoveChildrenI Removes all children from this container that are within the begin and end indexes.

func (*Image) RenderOrderID

func (self *Image) RenderOrderID() int

RenderOrderID The render order ID is used internally by the renderer and Input Manager and should not be modified. This property is mostly used internally by the renderers, but is exposed for the use of plugins.

func (*Image) Reset

func (self *Image) Reset(x int, y int) *DisplayObject

Reset Resets the Game Object.

This moves the Game Object to the given x/y world coordinates and sets `fresh`, `exists`, `visible` and `renderable` to true.

If this Game Object has the LifeSpan component it will also set `alive` to true and `health` to the given value.

If this Game Object has a Physics Body it will reset the Body.

func (*Image) Reset1O

func (self *Image) Reset1O(x int, y int, health int) *DisplayObject

Reset1O Resets the Game Object.

This moves the Game Object to the given x/y world coordinates and sets `fresh`, `exists`, `visible` and `renderable` to true.

If this Game Object has the LifeSpan component it will also set `alive` to true and `health` to the given value.

If this Game Object has a Physics Body it will reset the Body.

func (*Image) ResetFrame

func (self *Image) ResetFrame()

ResetFrame Resets the texture frame dimensions that the Game Object uses for rendering.

func (*Image) ResetFrameI

func (self *Image) ResetFrameI(args ...interface{})

ResetFrameI Resets the texture frame dimensions that the Game Object uses for rendering.

func (*Image) ResetI

func (self *Image) ResetI(args ...interface{}) *DisplayObject

ResetI Resets the Game Object.

This moves the Game Object to the given x/y world coordinates and sets `fresh`, `exists`, `visible` and `renderable` to true.

If this Game Object has the LifeSpan component it will also set `alive` to true and `health` to the given value.

If this Game Object has a Physics Body it will reset the Body.

func (*Image) ResizeFrame

func (self *Image) ResizeFrame(parent interface{}, width int, height int)

ResizeFrame Resizes the Frame dimensions that the Game Object uses for rendering.

You shouldn't normally need to ever call this, but in the case of special texture types such as Video or BitmapData it can be useful to adjust the dimensions directly in this way.

func (*Image) ResizeFrameI

func (self *Image) ResizeFrameI(args ...interface{})

ResizeFrameI Resizes the Frame dimensions that the Game Object uses for rendering.

You shouldn't normally need to ever call this, but in the case of special texture types such as Video or BitmapData it can be useful to adjust the dimensions directly in this way.

func (*Image) Revive

func (self *Image) Revive() *DisplayObject

Revive Brings a 'dead' Game Object back to life, optionally resetting its health value in the process.

A resurrected Game Object has its `alive`, `exists` and `visible` properties all set to true.

It will dispatch the `onRevived` event. Listen to `events.onRevived` for the signal.

func (*Image) Revive1O

func (self *Image) Revive1O(health int) *DisplayObject

Revive1O Brings a 'dead' Game Object back to life, optionally resetting its health value in the process.

A resurrected Game Object has its `alive`, `exists` and `visible` properties all set to true.

It will dispatch the `onRevived` event. Listen to `events.onRevived` for the signal.

func (*Image) ReviveI

func (self *Image) ReviveI(args ...interface{}) *DisplayObject

ReviveI Brings a 'dead' Game Object back to life, optionally resetting its health value in the process.

A resurrected Game Object has its `alive`, `exists` and `visible` properties all set to true.

It will dispatch the `onRevived` event. Listen to `events.onRevived` for the signal.

func (*Image) Right

func (self *Image) Right() int

Right The right coordinate of the Game Object. This is the same as `x + width - offsetX`.

func (*Image) ScaleMax

func (self *Image) ScaleMax() *Point

ScaleMax The maximum scale this Game Object will scale up to.

It allows you to prevent a parent from scaling this Game Object higher than the given value.

Set it to `null` to remove the limit.

func (*Image) ScaleMin

func (self *Image) ScaleMin() *Point

ScaleMin The minimum scale this Game Object will scale down to.

It allows you to prevent a parent from scaling this Game Object lower than the given value.

Set it to `null` to remove the limit.

func (*Image) SendToBack

func (self *Image) SendToBack() *DisplayObject

SendToBack Sends this Game Object to the bottom of its parents display list. Visually this means it will render below all other children in the same Group.

If this Game Object hasn't been added to a custom Group then this method will send it to the bottom of the Game World, because the World is the root Group from which all Game Objects descend.

func (*Image) SendToBackI

func (self *Image) SendToBackI(args ...interface{}) *DisplayObject

SendToBackI Sends this Game Object to the bottom of its parents display list. Visually this means it will render below all other children in the same Group.

If this Game Object hasn't been added to a custom Group then this method will send it to the bottom of the Game World, because the World is the root Group from which all Game Objects descend.

func (*Image) SetAliveA

func (self *Image) SetAliveA(member bool)

SetAliveA A useful flag to control if the Game Object is alive or dead.

This is set automatically by the Health components `damage` method should the object run out of health. Or you can toggle it via your game code.

This property is mostly just provided to be used by your game - it doesn't effect rendering or logic updates. However you can use `Group.getFirstAlive` in conjunction with this property for fast object pooling and recycling.

func (*Image) SetAnchorA

func (self *Image) SetAnchorA(member *Point)

SetAnchorA The anchor sets the origin point of the texture.

The default is 0,0 this means the texture's origin is the top left

Setting than anchor to 0.5,0.5 means the textures origin is centered

Setting the anchor to 1,1 would mean the textures origin points will be the bottom right corner

func (*Image) SetAngleA

func (self *Image) SetAngleA(member int)

SetAngleA The angle property is the rotation of the Game Object in *degrees* from its original orientation.

Values from 0 to 180 represent clockwise rotation; values from 0 to -180 represent counterclockwise rotation.

Values outside this range are added to or subtracted from 360 to obtain a value within the range. For example, the statement player.angle = 450 is the same as player.angle = 90.

If you wish to work in radians instead of degrees you can use the property `rotation` instead. Working in radians is slightly faster as it doesn't have to perform any calculations.

func (*Image) SetAnimationsA

func (self *Image) SetAnimationsA(member *AnimationManager)

SetAnimationsA If the Game Object is enabled for animation (such as a Phaser.Sprite) this is a reference to its AnimationManager instance. Through it you can create, play, pause and stop animations.

func (*Image) SetAutoCullA

func (self *Image) SetAutoCullA(member bool)

SetAutoCullA A Game Object with `autoCull` set to true will check its bounds against the World Camera every frame. If it is not intersecting the Camera bounds at any point then it has its `renderable` property set to `false`. This keeps the Game Object alive and still processing updates, but forces it to skip the render step entirely.

This is a relatively expensive operation, especially if enabled on hundreds of Game Objects. So enable it only if you know it's required, or you have tested performance and find it acceptable.

func (*Image) SetBlendModeA

func (self *Image) SetBlendModeA(member int)

SetBlendModeA The blend mode to be applied to the sprite. Set to PIXI.blendModes.NORMAL to remove any blend mode.

Warning: You cannot have a blend mode and a filter active on the same Sprite. Doing so will render the sprite invisible.

func (*Image) SetBottomA

func (self *Image) SetBottomA(member int)

SetBottomA The sum of the y and height properties. This is the same as `y + height - offsetY`.

func (*Image) SetCameraOffsetA

func (self *Image) SetCameraOffsetA(member *Point)

SetCameraOffsetA The x/y coordinate offset applied to the top-left of the camera that this Game Object will be drawn at if `fixedToCamera` is true.

The values are relative to the top-left of the camera view and in addition to any parent of the Game Object on the display list.

func (*Image) SetCenterXA

func (self *Image) SetCenterXA(member int)

SetCenterXA The center x coordinate of the Game Object. This is the same as `(x - offsetX) + (width / 2)`.

func (*Image) SetCenterYA

func (self *Image) SetCenterYA(member int)

SetCenterYA The center y coordinate of the Game Object. This is the same as `(y - offsetY) + (height / 2)`.

func (*Image) SetChildIndex

func (self *Image) SetChildIndex(child *DisplayObject, index int)

SetChildIndex Changes the position of an existing child in the display object container

func (*Image) SetChildIndexI

func (self *Image) SetChildIndexI(args ...interface{})

SetChildIndexI Changes the position of an existing child in the display object container

func (*Image) SetChildrenA

func (self *Image) SetChildrenA(member []DisplayObject)

SetChildrenA [read-only] The array of children of this container.

func (*Image) SetComponentsA

func (self *Image) SetComponentsA(member interface{})

SetComponentsA The components this Game Object has installed.

func (*Image) SetCropRectA

func (self *Image) SetCropRectA(member *Rectangle)

SetCropRectA The Rectangle used to crop the texture this Game Object uses. Set this property via `crop`. If you modify this property directly you must call `updateCrop` in order to have the change take effect.

func (*Image) SetDataA

func (self *Image) SetDataA(member interface{})

SetDataA An empty Object that belongs to this Game Object. This value isn't ever used internally by Phaser, but may be used by your own code, or by Phaser Plugins, to store data that needs to be associated with the Game Object, without polluting the Game Object directly.

func (*Image) SetDebugA

func (self *Image) SetDebugA(member bool)

SetDebugA A debug flag designed for use with `Game.enableStep`.

func (*Image) SetDestroyPhaseA

func (self *Image) SetDestroyPhaseA(member bool)

SetDestroyPhaseA As a Game Object runs through its destroy method this flag is set to true, and can be checked in any sub-systems or plugins it is being destroyed from.

func (*Image) SetEventsA

func (self *Image) SetEventsA(member *Events)

SetEventsA All Phaser Game Objects have an Events class which contains all of the events that are dispatched when certain things happen to this Game Object, or any of its components.

func (*Image) SetExistsA

func (self *Image) SetExistsA(member bool)

SetExistsA Controls if this Sprite is processed by the core Phaser game loops and Group loops.

func (*Image) SetFixedToCameraA

func (self *Image) SetFixedToCameraA(member bool)

SetFixedToCameraA A Game Object that is "fixed" to the camera uses its x/y coordinates as offsets from the top left of the camera during rendering.

The values are adjusted at the rendering stage, overriding the Game Objects actual world position.

The end result is that the Game Object will appear to be 'fixed' to the camera, regardless of where in the game world the camera is viewing. This is useful if for example this Game Object is a UI item that you wish to be visible at all times regardless where in the world the camera is.

The offsets are stored in the `cameraOffset` property.

Note that the `cameraOffset` values are in addition to any parent of this Game Object on the display list.

Be careful not to set `fixedToCamera` on Game Objects which are in Groups that already have `fixedToCamera` enabled on them.

func (*Image) SetFrame

func (self *Image) SetFrame(frame *Frame)

SetFrame Sets the texture frame the Game Object uses for rendering.

This is primarily an internal method used by `loadTexture`, but is exposed for the use of plugins and custom classes.

func (*Image) SetFrameA

func (self *Image) SetFrameA(member int)

SetFrameA Gets or sets the current frame index of the texture being used to render this Game Object.

To change the frame set `frame` to the index of the new frame in the sprite sheet you wish this Game Object to use, for example: `player.frame = 4`.

If the frame index given doesn't exist it will revert to the first frame found in the texture.

If you are using a texture atlas then you should use the `frameName` property instead.

If you wish to fully replace the texture being used see `loadTexture`.

func (*Image) SetFrameI

func (self *Image) SetFrameI(args ...interface{})

SetFrameI Sets the texture frame the Game Object uses for rendering.

This is primarily an internal method used by `loadTexture`, but is exposed for the use of plugins and custom classes.

func (*Image) SetFrameNameA

func (self *Image) SetFrameNameA(member string)

SetFrameNameA Gets or sets the current frame name of the texture being used to render this Game Object.

To change the frame set `frameName` to the name of the new frame in the texture atlas you wish this Game Object to use, for example: `player.frameName = "idle"`.

If the frame name given doesn't exist it will revert to the first frame found in the texture and throw a console warning.

If you are using a sprite sheet then you should use the `frame` property instead.

If you wish to fully replace the texture being used see `loadTexture`.

func (*Image) SetFreshA

func (self *Image) SetFreshA(member bool)

SetFreshA A Game Object is considered `fresh` if it has just been created or reset and is yet to receive a renderer transform update. This property is mostly used internally by the physics systems, but is exposed for the use of plugins.

func (*Image) SetGameA

func (self *Image) SetGameA(member *Game)

SetGameA A reference to the currently running Game.

func (*Image) SetHeightA

func (self *Image) SetHeightA(member int)

SetHeightA The height of the sprite, setting this will actually modify the scale to achieve the value set

func (*Image) SetIgnoreChildInputA

func (self *Image) SetIgnoreChildInputA(member bool)

SetIgnoreChildInputA If `ignoreChildInput` is `false` it will allow this objects _children_ to be considered as valid for Input events.

If this property is `true` then the children will _not_ be considered as valid for Input events.

Note that this property isn't recursive: only immediate children are influenced, it doesn't scan further down.

func (*Image) SetInCameraA

func (self *Image) SetInCameraA(member bool)

SetInCameraA Checks if the Game Objects bounds intersect with the Game Camera bounds. Returns `true` if they do, otherwise `false` if fully outside of the Cameras bounds.

func (*Image) SetInputA

func (self *Image) SetInputA(member interface{})

SetInputA The Input Handler for this Game Object.

By default it is disabled. If you wish this Game Object to process input events you should enable it with: `inputEnabled = true`.

After you have done this, this property will be a reference to the Phaser InputHandler.

func (*Image) SetInputEnabledA

func (self *Image) SetInputEnabledA(member bool)

SetInputEnabledA By default a Game Object won't process any input events. By setting `inputEnabled` to true a Phaser.InputHandler is created for this Game Object and it will then start to process click / touch events and more.

You can then access the Input Handler via `this.input`.

Note that Input related events are dispatched from `this.events`, i.e.: `events.onInputDown`.

If you set this property to false it will stop the Input Handler from processing any more input events.

If you want to _temporarily_ disable input for a Game Object, then it's better to set `input.enabled = false`, as it won't reset any of the Input Handlers internal properties. You can then toggle this back on as needed.

func (*Image) SetKeyA

func (self *Image) SetKeyA(member interface{})

SetKeyA The key of the image or texture used by this Game Object during rendering. If it is a string it's the string used to retrieve the texture from the Phaser Image Cache. It can also be an instance of a RenderTexture, BitmapData, Video or PIXI.Texture. If a Game Object is created without a key it is automatically assigned the key `__default` which is a 32x32 transparent PNG stored within the Cache. If a Game Object is given a key which doesn't exist in the Image Cache it is re-assigned the key `__missing` which is a 32x32 PNG of a green box with a line through it.

func (*Image) SetLeftA

func (self *Image) SetLeftA(member int)

SetLeftA The left coordinate of the Game Object. This is the same as `x - offsetX`.

func (*Image) SetLifespanA

func (self *Image) SetLifespanA(member int)

SetLifespanA The lifespan allows you to give a Game Object a lifespan in milliseconds.

Once the Game Object is 'born' you can set this to a positive value.

It is automatically decremented by the millisecond equivalent of `game.time.physicsElapsed` each frame. When it reaches zero it will call the `kill` method.

Very handy for particles, bullets, collectibles, or any other short-lived entity.

func (*Image) SetNameA

func (self *Image) SetNameA(member string)

SetNameA A user defined name given to this Game Object. This value isn't ever used internally by Phaser, it is meant as a game level property.

func (*Image) SetOffsetXA

func (self *Image) SetOffsetXA(member int)

SetOffsetXA The amount the Game Object is visually offset from its x coordinate. This is the same as `width * anchor.x`. It will only be > 0 if anchor.x is not equal to zero.

func (*Image) SetOffsetYA

func (self *Image) SetOffsetYA(member int)

SetOffsetYA The amount the Game Object is visually offset from its y coordinate. This is the same as `height * anchor.y`. It will only be > 0 if anchor.y is not equal to zero.

func (*Image) SetPendingDestroyA

func (self *Image) SetPendingDestroyA(member bool)

SetPendingDestroyA A Game Object is that is pendingDestroy is flagged to have its destroy method called on the next logic update. You can set it directly to allow you to flag an object to be destroyed on its next update.

This is extremely useful if you wish to destroy an object from within one of its own callbacks such as with Buttons or other Input events.

func (*Image) SetPreviousPositionA

func (self *Image) SetPreviousPositionA(member *Point)

SetPreviousPositionA The position the Game Object was located in the previous frame.

func (*Image) SetPreviousRotationA

func (self *Image) SetPreviousRotationA(member int)

SetPreviousRotationA The rotation the Game Object was in set to in the previous frame. Value is in radians.

func (*Image) SetRenderOrderIDA

func (self *Image) SetRenderOrderIDA(member int)

SetRenderOrderIDA The render order ID is used internally by the renderer and Input Manager and should not be modified. This property is mostly used internally by the renderers, but is exposed for the use of plugins.

func (*Image) SetRightA

func (self *Image) SetRightA(member int)

SetRightA The right coordinate of the Game Object. This is the same as `x + width - offsetX`.

func (*Image) SetScaleMaxA

func (self *Image) SetScaleMaxA(member *Point)

SetScaleMaxA The maximum scale this Game Object will scale up to.

It allows you to prevent a parent from scaling this Game Object higher than the given value.

Set it to `null` to remove the limit.

func (*Image) SetScaleMinA

func (self *Image) SetScaleMinA(member *Point)

SetScaleMinA The minimum scale this Game Object will scale down to.

It allows you to prevent a parent from scaling this Game Object lower than the given value.

Set it to `null` to remove the limit.

func (*Image) SetScaleMinMax

func (self *Image) SetScaleMinMax(minX interface{}, minY interface{}, maxX interface{}, maxY interface{})

SetScaleMinMax Sets the scaleMin and scaleMax values. These values are used to limit how far this Game Object will scale based on its parent.

For example if this Game Object has a `minScale` value of 1 and its parent has a `scale` value of 0.5, the 0.5 will be ignored and the scale value of 1 will be used, as the parents scale is lower than the minimum scale this Game Object should adhere to.

By setting these values you can carefully control how Game Objects deal with responsive scaling.

If only one parameter is given then that value will be used for both scaleMin and scaleMax: `setScaleMinMax(1)` = scaleMin.x, scaleMin.y, scaleMax.x and scaleMax.y all = 1

If only two parameters are given the first is set as scaleMin.x and y and the second as scaleMax.x and y: `setScaleMinMax(0.5, 2)` = scaleMin.x and y = 0.5 and scaleMax.x and y = 2

If you wish to set `scaleMin` with different values for x and y then either modify Game Object.scaleMin directly, or pass `null` for the `maxX` and `maxY` parameters.

Call `setScaleMinMax(null)` to clear all previously set values.

func (*Image) SetScaleMinMaxI

func (self *Image) SetScaleMinMaxI(args ...interface{})

SetScaleMinMaxI Sets the scaleMin and scaleMax values. These values are used to limit how far this Game Object will scale based on its parent.

For example if this Game Object has a `minScale` value of 1 and its parent has a `scale` value of 0.5, the 0.5 will be ignored and the scale value of 1 will be used, as the parents scale is lower than the minimum scale this Game Object should adhere to.

By setting these values you can carefully control how Game Objects deal with responsive scaling.

If only one parameter is given then that value will be used for both scaleMin and scaleMax: `setScaleMinMax(1)` = scaleMin.x, scaleMin.y, scaleMax.x and scaleMax.y all = 1

If only two parameters are given the first is set as scaleMin.x and y and the second as scaleMax.x and y: `setScaleMinMax(0.5, 2)` = scaleMin.x and y = 0.5 and scaleMax.x and y = 2

If you wish to set `scaleMin` with different values for x and y then either modify Game Object.scaleMin directly, or pass `null` for the `maxX` and `maxY` parameters.

Call `setScaleMinMax(null)` to clear all previously set values.

func (*Image) SetShaderA

func (self *Image) SetShaderA(member *AbstractFilter)

SetShaderA The shader that will be used to render this Sprite.

Set to null to remove a current shader.

func (*Image) SetSmoothedA

func (self *Image) SetSmoothedA(member bool)

SetSmoothedA Enable or disable texture smoothing for this Game Object.

It only takes effect if the Game Object is using an image based texture.

Smoothing is enabled by default.

func (*Image) SetTexture

func (self *Image) SetTexture(texture *Texture)

SetTexture Sets the texture of the sprite. Be warned that this doesn't remove or destroy the previous

texture this Sprite was using.

func (*Image) SetTexture1O

func (self *Image) SetTexture1O(texture *Texture, destroy bool)

SetTexture1O Sets the texture of the sprite. Be warned that this doesn't remove or destroy the previous

texture this Sprite was using.

func (*Image) SetTextureA

func (self *Image) SetTextureA(member *Texture)

SetTextureA The texture that the sprite is using

func (*Image) SetTextureI

func (self *Image) SetTextureI(args ...interface{})

SetTextureI Sets the texture of the sprite. Be warned that this doesn't remove or destroy the previous

texture this Sprite was using.

func (*Image) SetTintA

func (self *Image) SetTintA(member int)

SetTintA The tint applied to the sprite. This is a hex value. A value of 0xFFFFFF will remove any tint effect.

func (*Image) SetTintedTextureA

func (self *Image) SetTintedTextureA(member *Canvas)

SetTintedTextureA A canvas that contains the tinted version of the Sprite (in Canvas mode, WebGL doesn't populate this)

func (*Image) SetTopA

func (self *Image) SetTopA(member int)

SetTopA The y coordinate of the Game Object. This is the same as `y - offsetY`.

func (*Image) SetTransformCallbackA

func (self *Image) SetTransformCallbackA(member interface{})

SetTransformCallbackA The callback that will apply any scale limiting to the worldTransform.

func (*Image) SetTransformCallbackContextA

func (self *Image) SetTransformCallbackContextA(member interface{})

SetTransformCallbackContextA The context under which `transformCallback` is called.

func (*Image) SetTypeA

func (self *Image) SetTypeA(member int)

SetTypeA The const type of this object.

func (*Image) SetWidthA

func (self *Image) SetWidthA(member int)

SetWidthA The width of the sprite, setting this will actually modify the scale to achieve the value set

func (*Image) SetWorldA

func (self *Image) SetWorldA(member *Point)

SetWorldA The world coordinates of this Game Object in pixels. Depending on where in the display list this Game Object is placed this value can differ from `position`, which contains the x/y coordinates relative to the Game Objects parent.

func (*Image) SetZA

func (self *Image) SetZA(member int)

SetZA The z depth of this Game Object within its parent Group. No two objects in a Group can have the same z value. This value is adjusted automatically whenever the Group hierarchy changes. If you wish to re-order the layering of a Game Object then see methods like Group.moveUp or Group.bringToTop.

func (*Image) Shader

func (self *Image) Shader() *AbstractFilter

Shader The shader that will be used to render this Sprite.

Set to null to remove a current shader.

func (*Image) Smoothed

func (self *Image) Smoothed() bool

Smoothed Enable or disable texture smoothing for this Game Object.

It only takes effect if the Game Object is using an image based texture.

Smoothing is enabled by default.

func (*Image) SwapChildren

func (self *Image) SwapChildren(child *DisplayObject, child2 *DisplayObject)

SwapChildren Swaps the position of 2 Display Objects within this container.

func (*Image) SwapChildrenI

func (self *Image) SwapChildrenI(args ...interface{})

SwapChildrenI Swaps the position of 2 Display Objects within this container.

func (*Image) Texture

func (self *Image) Texture() *Texture

Texture The texture that the sprite is using

func (*Image) Tint

func (self *Image) Tint() int

Tint The tint applied to the sprite. This is a hex value. A value of 0xFFFFFF will remove any tint effect.

func (*Image) TintedTexture

func (self *Image) TintedTexture() *Canvas

TintedTexture A canvas that contains the tinted version of the Sprite (in Canvas mode, WebGL doesn't populate this)

func (*Image) Top

func (self *Image) Top() int

Top The y coordinate of the Game Object. This is the same as `y - offsetY`.

func (*Image) TransformCallback

func (self *Image) TransformCallback() interface{}

TransformCallback The callback that will apply any scale limiting to the worldTransform.

func (*Image) TransformCallbackContext

func (self *Image) TransformCallbackContext() interface{}

TransformCallbackContext The context under which `transformCallback` is called.

func (*Image) Type

func (self *Image) Type() int

Type The const type of this object.

func (*Image) Update

func (self *Image) Update()

Update Override this method in your own custom objects to handle any update requirements. It is called immediately after `preUpdate` and before `postUpdate`. Remember if this Game Object has any children you should call update on those too.

func (*Image) UpdateCrop

func (self *Image) UpdateCrop()

UpdateCrop If you have set a crop rectangle on this Game Object via `crop` and since modified the `cropRect` property, or the rectangle it references, then you need to update the crop frame by calling this method.

func (*Image) UpdateCropI

func (self *Image) UpdateCropI(args ...interface{})

UpdateCropI If you have set a crop rectangle on this Game Object via `crop` and since modified the `cropRect` property, or the rectangle it references, then you need to update the crop frame by calling this method.

func (*Image) UpdateI

func (self *Image) UpdateI(args ...interface{})

UpdateI Override this method in your own custom objects to handle any update requirements. It is called immediately after `preUpdate` and before `postUpdate`. Remember if this Game Object has any children you should call update on those too.

func (*Image) Width

func (self *Image) Width() int

Width The width of the sprite, setting this will actually modify the scale to achieve the value set

func (*Image) World

func (self *Image) World() *Point

World The world coordinates of this Game Object in pixels. Depending on where in the display list this Game Object is placed this value can differ from `position`, which contains the x/y coordinates relative to the Game Objects parent.

func (*Image) Z

func (self *Image) Z() int

Z The z depth of this Game Object within its parent Group. No two objects in a Group can have the same z value. This value is adjusted automatically whenever the Group hierarchy changes. If you wish to re-order the layering of a Game Object then see methods like Group.moveUp or Group.bringToTop.

type ImageCollection

type ImageCollection struct {
	*js.Object
}

ImageCollection An Image Collection is a special tileset containing mulitple images, with no slicing into each image.

Image Collections are normally created automatically when Tiled data is loaded.

func NewImageCollection

func NewImageCollection(name string, firstgid int) *ImageCollection

NewImageCollection An Image Collection is a special tileset containing mulitple images, with no slicing into each image.

Image Collections are normally created automatically when Tiled data is loaded.

func NewImageCollection1O

func NewImageCollection1O(name string, firstgid int, width int) *ImageCollection

NewImageCollection1O An Image Collection is a special tileset containing mulitple images, with no slicing into each image.

Image Collections are normally created automatically when Tiled data is loaded.

func NewImageCollection2O

func NewImageCollection2O(name string, firstgid int, width int, height int) *ImageCollection

NewImageCollection2O An Image Collection is a special tileset containing mulitple images, with no slicing into each image.

Image Collections are normally created automatically when Tiled data is loaded.

func NewImageCollection3O

func NewImageCollection3O(name string, firstgid int, width int, height int, margin int) *ImageCollection

NewImageCollection3O An Image Collection is a special tileset containing mulitple images, with no slicing into each image.

Image Collections are normally created automatically when Tiled data is loaded.

func NewImageCollection4O

func NewImageCollection4O(name string, firstgid int, width int, height int, margin int, spacing int) *ImageCollection

NewImageCollection4O An Image Collection is a special tileset containing mulitple images, with no slicing into each image.

Image Collections are normally created automatically when Tiled data is loaded.

func NewImageCollection5O

func NewImageCollection5O(name string, firstgid int, width int, height int, margin int, spacing int, properties interface{}) *ImageCollection

NewImageCollection5O An Image Collection is a special tileset containing mulitple images, with no slicing into each image.

Image Collections are normally created automatically when Tiled data is loaded.

func NewImageCollectionI

func NewImageCollectionI(args ...interface{}) *ImageCollection

NewImageCollectionI An Image Collection is a special tileset containing mulitple images, with no slicing into each image.

Image Collections are normally created automatically when Tiled data is loaded.

func ToImageCollection

func ToImageCollection(jsStruct interface{}) *ImageCollection

ImageCollection Binding conversion method to ImageCollection point

func (*ImageCollection) AddImage

func (self *ImageCollection) AddImage(gid int, image string)

AddImage Add an image to this Image Collection.

func (*ImageCollection) AddImageI

func (self *ImageCollection) AddImageI(args ...interface{})

AddImageI Add an image to this Image Collection.

func (*ImageCollection) ContainsImageIndex

func (self *ImageCollection) ContainsImageIndex(imageIndex int) bool

ContainsImageIndex Returns true if and only if this image collection contains the given image index.

func (*ImageCollection) ContainsImageIndexI

func (self *ImageCollection) ContainsImageIndexI(args ...interface{}) bool

ContainsImageIndexI Returns true if and only if this image collection contains the given image index.

func (*ImageCollection) Firstgid

func (self *ImageCollection) Firstgid() int

Firstgid The Tiled firstgid value. This is the starting index of the first image index this Image Collection contains.

func (*ImageCollection) ImageHeight

func (self *ImageCollection) ImageHeight() int

ImageHeight The height of the tallest image (in pixels).

func (*ImageCollection) ImageMargin

func (self *ImageCollection) ImageMargin() interface{}

ImageMargin The margin around the images in the collection (in pixels). Use `setSpacing` to change.

func (*ImageCollection) ImageSpacing

func (self *ImageCollection) ImageSpacing() int

ImageSpacing The spacing between each image in the collection (in pixels). Use `setSpacing` to change.

func (*ImageCollection) ImageWidth

func (self *ImageCollection) ImageWidth() int

ImageWidth The width of the widest image (in pixels).

func (*ImageCollection) Images

func (self *ImageCollection) Images() []interface{}

Images The cached images that are a part of this collection.

func (*ImageCollection) Name

func (self *ImageCollection) Name() string

Name The name of the Image Collection.

func (*ImageCollection) Properties

func (self *ImageCollection) Properties() interface{}

Properties Image Collection-specific properties that are typically defined in the Tiled editor.

func (*ImageCollection) SetFirstgidA

func (self *ImageCollection) SetFirstgidA(member int)

SetFirstgidA The Tiled firstgid value. This is the starting index of the first image index this Image Collection contains.

func (*ImageCollection) SetImageHeightA

func (self *ImageCollection) SetImageHeightA(member int)

SetImageHeightA The height of the tallest image (in pixels).

func (*ImageCollection) SetImageMarginA

func (self *ImageCollection) SetImageMarginA(member interface{})

SetImageMarginA The margin around the images in the collection (in pixels). Use `setSpacing` to change.

func (*ImageCollection) SetImageSpacingA

func (self *ImageCollection) SetImageSpacingA(member int)

SetImageSpacingA The spacing between each image in the collection (in pixels). Use `setSpacing` to change.

func (*ImageCollection) SetImageWidthA

func (self *ImageCollection) SetImageWidthA(member int)

SetImageWidthA The width of the widest image (in pixels).

func (*ImageCollection) SetImagesA

func (self *ImageCollection) SetImagesA(member []interface{})

SetImagesA The cached images that are a part of this collection.

func (*ImageCollection) SetNameA

func (self *ImageCollection) SetNameA(member string)

SetNameA The name of the Image Collection.

func (*ImageCollection) SetPropertiesA

func (self *ImageCollection) SetPropertiesA(member interface{})

SetPropertiesA Image Collection-specific properties that are typically defined in the Tiled editor.

func (*ImageCollection) SetTotalA

func (self *ImageCollection) SetTotalA(member int)

SetTotalA The total number of images in the image collection.

func (*ImageCollection) Total

func (self *ImageCollection) Total() int

Total The total number of images in the image collection.

type ImageData

type ImageData struct{ *js.Object }

type Input

type Input struct {
	*js.Object
}

Input Phaser.Input is the Input Manager for all types of Input across Phaser, including mouse, keyboard, touch and MSPointer. The Input manager is updated automatically by the core game loop.

func NewInput

func NewInput(game *Game) *Input

NewInput Phaser.Input is the Input Manager for all types of Input across Phaser, including mouse, keyboard, touch and MSPointer. The Input manager is updated automatically by the core game loop.

func NewInputI

func NewInputI(args ...interface{}) *Input

NewInputI Phaser.Input is the Input Manager for all types of Input across Phaser, including mouse, keyboard, touch and MSPointer. The Input manager is updated automatically by the core game loop.

func ToInput

func ToInput(jsStruct interface{}) *Input

Input Binding conversion method to Input point

func (*Input) ActivePointer

func (self *Input) ActivePointer() *Pointer

ActivePointer The most recently active Pointer object.

When you've limited max pointers to 1 this will accurately be either the first finger touched or mouse.

func (*Input) AddMoveCallback

func (self *Input) AddMoveCallback(callback interface{}, context interface{})

AddMoveCallback Adds a callback that is fired every time the activePointer receives a DOM move event such as a mousemove or touchmove.

The callback will be sent 4 parameters:

A reference to the Phaser.Pointer object that moved, The x position of the pointer, The y position, A boolean indicating if the movement was the result of a 'click' event (such as a mouse click or touch down).

It will be called every time the activePointer moves, which in a multi-touch game can be a lot of times, so this is best to only use if you've limited input to a single pointer (i.e. mouse or touch).

The callback is added to the Phaser.Input.moveCallbacks array and should be removed with Phaser.Input.deleteMoveCallback.

func (*Input) AddMoveCallbackI

func (self *Input) AddMoveCallbackI(args ...interface{})

AddMoveCallbackI Adds a callback that is fired every time the activePointer receives a DOM move event such as a mousemove or touchmove.

The callback will be sent 4 parameters:

A reference to the Phaser.Pointer object that moved, The x position of the pointer, The y position, A boolean indicating if the movement was the result of a 'click' event (such as a mouse click or touch down).

It will be called every time the activePointer moves, which in a multi-touch game can be a lot of times, so this is best to only use if you've limited input to a single pointer (i.e. mouse or touch).

The callback is added to the Phaser.Input.moveCallbacks array and should be removed with Phaser.Input.deleteMoveCallback.

func (*Input) AddPointer

func (self *Input) AddPointer() interface{}

AddPointer Add a new Pointer object to the Input Manager. By default Input creates 3 pointer objects: `mousePointer` (not include in part of general pointer pool), `pointer1` and `pointer2`. This method adds an additional pointer, up to a maximum of Phaser.Input.MAX_POINTERS (default of 10).

func (*Input) AddPointerI

func (self *Input) AddPointerI(args ...interface{}) interface{}

AddPointerI Add a new Pointer object to the Input Manager. By default Input creates 3 pointer objects: `mousePointer` (not include in part of general pointer pool), `pointer1` and `pointer2`. This method adds an additional pointer, up to a maximum of Phaser.Input.MAX_POINTERS (default of 10).

func (*Input) Boot

func (self *Input) Boot()

Boot Starts the Input Manager running.

func (*Input) BootI

func (self *Input) BootI(args ...interface{})

BootI Starts the Input Manager running.

func (*Input) Circle

func (self *Input) Circle() *Circle

Circle A Circle object centered on the x/y screen coordinates of the Input. Default size of 44px (Apples recommended "finger tip" size) but can be changed to anything.

func (*Input) DeleteMoveCallback

func (self *Input) DeleteMoveCallback(callback interface{}, context interface{})

DeleteMoveCallback Removes the callback from the Phaser.Input.moveCallbacks array.

func (*Input) DeleteMoveCallbackI

func (self *Input) DeleteMoveCallbackI(args ...interface{})

DeleteMoveCallbackI Removes the callback from the Phaser.Input.moveCallbacks array.

func (*Input) Destroy

func (self *Input) Destroy()

Destroy Stops all of the Input Managers from running.

func (*Input) DestroyI

func (self *Input) DestroyI(args ...interface{})

DestroyI Stops all of the Input Managers from running.

func (*Input) DoubleTapRate

func (self *Input) DoubleTapRate() int

DoubleTapRate The number of milliseconds between taps of the same Pointer for it to be considered a double tap / click.

func (*Input) Enabled

func (self *Input) Enabled() bool

Enabled When enabled, input (eg. Keyboard, Mouse, Touch) will be processed - as long as the individual sources are enabled themselves.

When not enabled, _all_ input sources are ignored. To disable just one type of input; for example, the Mouse, use `input.mouse.enabled = false`.

func (*Input) Game

func (self *Input) Game() *Game

Game A reference to the currently running game.

func (*Input) Gamepad

func (self *Input) Gamepad() *Gamepad

Gamepad The Gamepad Input manager.

func (*Input) GetLocalPosition

func (self *Input) GetLocalPosition(displayObject interface{}, pointer *Pointer) *Point

GetLocalPosition This will return the local coordinates of the specified displayObject based on the given Pointer.

func (*Input) GetLocalPositionI

func (self *Input) GetLocalPositionI(args ...interface{}) *Point

GetLocalPositionI This will return the local coordinates of the specified displayObject based on the given Pointer.

func (*Input) GetPointer

func (self *Input) GetPointer() *Pointer

GetPointer Get the first Pointer with the given active state.

func (*Input) GetPointer1O

func (self *Input) GetPointer1O(isActive bool) *Pointer

GetPointer1O Get the first Pointer with the given active state.

func (*Input) GetPointerFromId

func (self *Input) GetPointerFromId(pointerId int) *Pointer

GetPointerFromId Get the Pointer object whos `pointerId` property matches the given value.

The pointerId property is not set until the Pointer has been used at least once, as its populated by the DOM event. Also it can change every time you press the pointer down if the browser recycles it.

func (*Input) GetPointerFromIdI

func (self *Input) GetPointerFromIdI(args ...interface{}) *Pointer

GetPointerFromIdI Get the Pointer object whos `pointerId` property matches the given value.

The pointerId property is not set until the Pointer has been used at least once, as its populated by the DOM event. Also it can change every time you press the pointer down if the browser recycles it.

func (*Input) GetPointerFromIdentifier

func (self *Input) GetPointerFromIdentifier(identifier int) *Pointer

GetPointerFromIdentifier Get the Pointer object whos `identifier` property matches the given identifier value.

The identifier property is not set until the Pointer has been used at least once, as its populated by the DOM event. Also it can change every time you press the pointer down, and is not fixed once set. Note: Not all browsers set the identifier property and it's not part of the W3C spec, so you may need getPointerFromId instead.

func (*Input) GetPointerFromIdentifierI

func (self *Input) GetPointerFromIdentifierI(args ...interface{}) *Pointer

GetPointerFromIdentifierI Get the Pointer object whos `identifier` property matches the given identifier value.

The identifier property is not set until the Pointer has been used at least once, as its populated by the DOM event. Also it can change every time you press the pointer down, and is not fixed once set. Note: Not all browsers set the identifier property and it's not part of the W3C spec, so you may need getPointerFromId instead.

func (*Input) GetPointerI

func (self *Input) GetPointerI(args ...interface{}) *Pointer

GetPointerI Get the first Pointer with the given active state.

func (*Input) HitCanvas

func (self *Input) HitCanvas() dom.HTMLCanvasElement

HitCanvas The canvas to which single pixels are drawn in order to perform pixel-perfect hit detection.

func (*Input) HitContext

func (self *Input) HitContext() dom.CanvasRenderingContext2D

HitContext The context of the pixel perfect hit canvas.

func (*Input) HitTest

func (self *Input) HitTest(displayObject *DisplayObject, pointer *Pointer, localPoint *Point)

HitTest Tests if the pointer hits the given object.

func (*Input) HitTestI

func (self *Input) HitTestI(args ...interface{})

HitTestI Tests if the pointer hits the given object.

func (*Input) HoldRate

func (self *Input) HoldRate() int

HoldRate The number of milliseconds that the Pointer has to be pressed down for it to fire a onHold event.

func (*Input) InteractiveItems

func (self *Input) InteractiveItems() *ArraySet

InteractiveItems A list of interactive objects. The InputHandler components add and remove themselves from this list.

func (*Input) JustPressedRate

func (self *Input) JustPressedRate() int

JustPressedRate The number of milliseconds below which the Pointer is considered justPressed.

func (*Input) JustReleasedRate

func (self *Input) JustReleasedRate() int

JustReleasedRate The number of milliseconds below which the Pointer is considered justReleased .

func (*Input) Keyboard

func (self *Input) Keyboard() *Keyboard

Keyboard The Keyboard Input manager.

func (*Input) MAX_POINTERS

func (self *Input) MAX_POINTERS() int

MAX_POINTERS The maximum number of pointers that can be added. This excludes the mouse pointer.

func (*Input) MOUSE_OVERRIDES_TOUCH

func (self *Input) MOUSE_OVERRIDES_TOUCH() int

MOUSE_OVERRIDES_TOUCH empty description

func (*Input) MOUSE_TOUCH_COMBINE

func (self *Input) MOUSE_TOUCH_COMBINE() int

MOUSE_TOUCH_COMBINE empty description

func (*Input) MaxPointers

func (self *Input) MaxPointers() int

MaxPointers The maximum number of Pointers allowed to be active at any one time. A value of -1 is only limited by the total number of pointers. For lots of games it's useful to set this to 1.

func (*Input) MinPriorityID

func (self *Input) MinPriorityID() int

MinPriorityID You can tell all Pointers to ignore any Game Object with a `priorityID` lower than this value. This is useful when stacking UI layers. Set to zero to disable.

func (*Input) Mouse

func (self *Input) Mouse() *Mouse

Mouse The Mouse Input manager.

You should not usually access this manager directly, but instead use Input.mousePointer or Input.activePointer which normalizes all the input values for you, regardless of browser.

func (*Input) MousePointer

func (self *Input) MousePointer() *Pointer

MousePointer The mouse has its own unique Phaser.Pointer object which you can use if making a desktop specific game.

func (*Input) MoveCallbacks

func (self *Input) MoveCallbacks() []interface{}

MoveCallbacks An array of callbacks that will be fired every time the activePointer receives a move event from the DOM. To add a callback to this array please use `Input.addMoveCallback`.

func (*Input) Mspointer

func (self *Input) Mspointer() *MSPointer

Mspointer The MSPointer Input manager.

You should not usually access this manager directly, but instead use Input.activePointer which normalizes all the input values for you, regardless of browser.

func (*Input) MultiInputOverride

func (self *Input) MultiInputOverride() int

MultiInputOverride Controls the expected behavior when using a mouse and touch together on a multi-input device.

func (*Input) OnClickTrampoline

func (self *Input) OnClickTrampoline()

OnClickTrampoline Used for click trampolines. See {@link Phaser.Pointer.addClickTrampoline}.

func (*Input) OnClickTrampolineI

func (self *Input) OnClickTrampolineI(args ...interface{})

OnClickTrampolineI Used for click trampolines. See {@link Phaser.Pointer.addClickTrampoline}.

func (*Input) OnDown

func (self *Input) OnDown() *Signal

OnDown A Signal that is dispatched each time a pointer is pressed down.

func (*Input) OnHold

func (self *Input) OnHold() *Signal

OnHold A Signal that is dispatched each time a pointer is held down.

func (*Input) OnTap

func (self *Input) OnTap() *Signal

OnTap A Signal that is dispatched each time a pointer is tapped.

func (*Input) OnUp

func (self *Input) OnUp() *Signal

OnUp A Signal that is dispatched each time a pointer is released.

func (*Input) Pointer1

func (self *Input) Pointer1() *Pointer

Pointer1 A Pointer object.

func (*Input) Pointer10

func (self *Input) Pointer10() *Pointer

Pointer10 A Pointer object.

func (*Input) Pointer2

func (self *Input) Pointer2() *Pointer

Pointer2 A Pointer object.

func (*Input) Pointer3

func (self *Input) Pointer3() *Pointer

Pointer3 A Pointer object.

func (*Input) Pointer4

func (self *Input) Pointer4() *Pointer

Pointer4 A Pointer object.

func (*Input) Pointer5

func (self *Input) Pointer5() *Pointer

Pointer5 A Pointer object.

func (*Input) Pointer6

func (self *Input) Pointer6() *Pointer

Pointer6 A Pointer object.

func (*Input) Pointer7

func (self *Input) Pointer7() *Pointer

Pointer7 A Pointer object.

func (*Input) Pointer8

func (self *Input) Pointer8() *Pointer

Pointer8 A Pointer object.

func (*Input) Pointer9

func (self *Input) Pointer9() *Pointer

Pointer9 A Pointer object.

func (*Input) Pointers

func (self *Input) Pointers() []Pointer

Pointers An array of non-mouse pointers that have been added to the game. The properties `pointer1..N` are aliases for `pointers[0..N-1]`.

func (*Input) PollLocked

func (self *Input) PollLocked() bool

PollLocked True if the Input is currently poll rate locked.

func (*Input) PollRate

func (self *Input) PollRate() int

PollRate How often should the input pointers be checked for updates? A value of 0 means every single frame (60fps); a value of 1 means every other frame (30fps) and so on.

func (*Input) Position

func (self *Input) Position() *Point

Position A point object representing the current position of the Pointer.

func (*Input) RecordLimit

func (self *Input) RecordLimit() int

RecordLimit The total number of entries that can be recorded into the Pointer objects tracking history. If the Pointer is tracking one event every 100ms; then a trackLimit of 100 would store the last 10 seconds worth of history.

func (*Input) RecordPointerHistory

func (self *Input) RecordPointerHistory() bool

RecordPointerHistory Sets if the Pointer objects should record a history of x/y coordinates they have passed through. The history is cleared each time the Pointer is pressed down. The history is updated at the rate specified in Input.pollRate

func (*Input) RecordRate

func (self *Input) RecordRate() int

RecordRate The rate in milliseconds at which the Pointer objects should update their tracking history.

func (*Input) Reset

func (self *Input) Reset()

Reset Reset all of the Pointers and Input states.

The optional `hard` parameter will reset any events or callbacks that may be bound. Input.reset is called automatically during a State change or if a game loses focus / visibility. To control control the reset manually set {@link Phaser.InputManager.resetLocked} to `true`.

func (*Input) Reset1O

func (self *Input) Reset1O(hard bool)

Reset1O Reset all of the Pointers and Input states.

The optional `hard` parameter will reset any events or callbacks that may be bound. Input.reset is called automatically during a State change or if a game loses focus / visibility. To control control the reset manually set {@link Phaser.InputManager.resetLocked} to `true`.

func (*Input) ResetI

func (self *Input) ResetI(args ...interface{})

ResetI Reset all of the Pointers and Input states.

The optional `hard` parameter will reset any events or callbacks that may be bound. Input.reset is called automatically during a State change or if a game loses focus / visibility. To control control the reset manually set {@link Phaser.InputManager.resetLocked} to `true`.

func (*Input) ResetLocked

func (self *Input) ResetLocked() bool

ResetLocked If the Input Manager has been reset locked then all calls made to InputManager.reset, such as from a State change, are ignored.

func (*Input) ResetSpeed

func (self *Input) ResetSpeed(x int, y int)

ResetSpeed Resets the speed and old position properties.

func (*Input) ResetSpeedI

func (self *Input) ResetSpeedI(args ...interface{})

ResetSpeedI Resets the speed and old position properties.

func (*Input) Scale

func (self *Input) Scale() *Point

Scale The scale by which all input coordinates are multiplied; calculated by the ScaleManager. In an un-scaled game the values will be x = 1 and y = 1.

func (*Input) SetActivePointerA

func (self *Input) SetActivePointerA(member *Pointer)

SetActivePointerA The most recently active Pointer object.

When you've limited max pointers to 1 this will accurately be either the first finger touched or mouse.

func (*Input) SetCircleA

func (self *Input) SetCircleA(member *Circle)

SetCircleA A Circle object centered on the x/y screen coordinates of the Input. Default size of 44px (Apples recommended "finger tip" size) but can be changed to anything.

func (*Input) SetDoubleTapRateA

func (self *Input) SetDoubleTapRateA(member int)

SetDoubleTapRateA The number of milliseconds between taps of the same Pointer for it to be considered a double tap / click.

func (*Input) SetEnabledA

func (self *Input) SetEnabledA(member bool)

SetEnabledA When enabled, input (eg. Keyboard, Mouse, Touch) will be processed - as long as the individual sources are enabled themselves.

When not enabled, _all_ input sources are ignored. To disable just one type of input; for example, the Mouse, use `input.mouse.enabled = false`.

func (*Input) SetGameA

func (self *Input) SetGameA(member *Game)

SetGameA A reference to the currently running game.

func (*Input) SetGamepadA

func (self *Input) SetGamepadA(member *Gamepad)

SetGamepadA The Gamepad Input manager.

func (*Input) SetHitCanvasA

func (self *Input) SetHitCanvasA(member dom.HTMLCanvasElement)

SetHitCanvasA The canvas to which single pixels are drawn in order to perform pixel-perfect hit detection.

func (*Input) SetHitContextA

func (self *Input) SetHitContextA(member dom.CanvasRenderingContext2D)

SetHitContextA The context of the pixel perfect hit canvas.

func (*Input) SetHoldRateA

func (self *Input) SetHoldRateA(member int)

SetHoldRateA The number of milliseconds that the Pointer has to be pressed down for it to fire a onHold event.

func (*Input) SetInteractiveCandidateHandler

func (self *Input) SetInteractiveCandidateHandler(callback interface{}, context interface{})

SetInteractiveCandidateHandler Adds a callback that is fired every time `Pointer.processInteractiveObjects` is called. The purpose of `processInteractiveObjects` is to work out which Game Object the Pointer is going to interact with. It works by polling all of the valid game objects, and then slowly discounting those that don't meet the criteria (i.e. they aren't under the Pointer, are disabled, invisible, etc).

Eventually a short-list of 'candidates' is created. These are all of the Game Objects which are valid for input and overlap with the Pointer. If you need fine-grained control over which of the items is selected then you can use this callback to do so.

The callback will be sent 3 parameters:

1) A reference to the Phaser.Pointer object that is processing the Items. 2) An array containing all potential interactive candidates. This is an array of `InputHandler` objects, not Sprites. 3) The current 'favorite' candidate, based on its priorityID and position in the display list.

Your callback MUST return one of the candidates sent to it.

func (*Input) SetInteractiveCandidateHandlerI

func (self *Input) SetInteractiveCandidateHandlerI(args ...interface{})

SetInteractiveCandidateHandlerI Adds a callback that is fired every time `Pointer.processInteractiveObjects` is called. The purpose of `processInteractiveObjects` is to work out which Game Object the Pointer is going to interact with. It works by polling all of the valid game objects, and then slowly discounting those that don't meet the criteria (i.e. they aren't under the Pointer, are disabled, invisible, etc).

Eventually a short-list of 'candidates' is created. These are all of the Game Objects which are valid for input and overlap with the Pointer. If you need fine-grained control over which of the items is selected then you can use this callback to do so.

The callback will be sent 3 parameters:

1) A reference to the Phaser.Pointer object that is processing the Items. 2) An array containing all potential interactive candidates. This is an array of `InputHandler` objects, not Sprites. 3) The current 'favorite' candidate, based on its priorityID and position in the display list.

Your callback MUST return one of the candidates sent to it.

func (*Input) SetInteractiveItemsA

func (self *Input) SetInteractiveItemsA(member *ArraySet)

SetInteractiveItemsA A list of interactive objects. The InputHandler components add and remove themselves from this list.

func (*Input) SetJustPressedRateA

func (self *Input) SetJustPressedRateA(member int)

SetJustPressedRateA The number of milliseconds below which the Pointer is considered justPressed.

func (*Input) SetJustReleasedRateA

func (self *Input) SetJustReleasedRateA(member int)

SetJustReleasedRateA The number of milliseconds below which the Pointer is considered justReleased .

func (*Input) SetKeyboardA

func (self *Input) SetKeyboardA(member *Keyboard)

SetKeyboardA The Keyboard Input manager.

func (*Input) SetMAX_POINTERSA

func (self *Input) SetMAX_POINTERSA(member int)

SetMAX_POINTERSA The maximum number of pointers that can be added. This excludes the mouse pointer.

func (*Input) SetMOUSE_OVERRIDES_TOUCHA

func (self *Input) SetMOUSE_OVERRIDES_TOUCHA(member int)

SetMOUSE_OVERRIDES_TOUCHA empty description

func (*Input) SetMOUSE_TOUCH_COMBINEA

func (self *Input) SetMOUSE_TOUCH_COMBINEA(member int)

SetMOUSE_TOUCH_COMBINEA empty description

func (*Input) SetMaxPointersA

func (self *Input) SetMaxPointersA(member int)

SetMaxPointersA The maximum number of Pointers allowed to be active at any one time. A value of -1 is only limited by the total number of pointers. For lots of games it's useful to set this to 1.

func (*Input) SetMinPriorityIDA

func (self *Input) SetMinPriorityIDA(member int)

SetMinPriorityIDA You can tell all Pointers to ignore any Game Object with a `priorityID` lower than this value. This is useful when stacking UI layers. Set to zero to disable.

func (*Input) SetMouseA

func (self *Input) SetMouseA(member *Mouse)

SetMouseA The Mouse Input manager.

You should not usually access this manager directly, but instead use Input.mousePointer or Input.activePointer which normalizes all the input values for you, regardless of browser.

func (*Input) SetMousePointerA

func (self *Input) SetMousePointerA(member *Pointer)

SetMousePointerA The mouse has its own unique Phaser.Pointer object which you can use if making a desktop specific game.

func (*Input) SetMoveCallbacksA

func (self *Input) SetMoveCallbacksA(member []interface{})

SetMoveCallbacksA An array of callbacks that will be fired every time the activePointer receives a move event from the DOM. To add a callback to this array please use `Input.addMoveCallback`.

func (*Input) SetMspointerA

func (self *Input) SetMspointerA(member *MSPointer)

SetMspointerA The MSPointer Input manager.

You should not usually access this manager directly, but instead use Input.activePointer which normalizes all the input values for you, regardless of browser.

func (*Input) SetMultiInputOverrideA

func (self *Input) SetMultiInputOverrideA(member int)

SetMultiInputOverrideA Controls the expected behavior when using a mouse and touch together on a multi-input device.

func (*Input) SetOnDownA

func (self *Input) SetOnDownA(member *Signal)

SetOnDownA A Signal that is dispatched each time a pointer is pressed down.

func (*Input) SetOnHoldA

func (self *Input) SetOnHoldA(member *Signal)

SetOnHoldA A Signal that is dispatched each time a pointer is held down.

func (*Input) SetOnTapA

func (self *Input) SetOnTapA(member *Signal)

SetOnTapA A Signal that is dispatched each time a pointer is tapped.

func (*Input) SetOnUpA

func (self *Input) SetOnUpA(member *Signal)

SetOnUpA A Signal that is dispatched each time a pointer is released.

func (*Input) SetPointer10A

func (self *Input) SetPointer10A(member *Pointer)

SetPointer10A A Pointer object.

func (*Input) SetPointer1A

func (self *Input) SetPointer1A(member *Pointer)

SetPointer1A A Pointer object.

func (*Input) SetPointer2A

func (self *Input) SetPointer2A(member *Pointer)

SetPointer2A A Pointer object.

func (*Input) SetPointer3A

func (self *Input) SetPointer3A(member *Pointer)

SetPointer3A A Pointer object.

func (*Input) SetPointer4A

func (self *Input) SetPointer4A(member *Pointer)

SetPointer4A A Pointer object.

func (*Input) SetPointer5A

func (self *Input) SetPointer5A(member *Pointer)

SetPointer5A A Pointer object.

func (*Input) SetPointer6A

func (self *Input) SetPointer6A(member *Pointer)

SetPointer6A A Pointer object.

func (*Input) SetPointer7A

func (self *Input) SetPointer7A(member *Pointer)

SetPointer7A A Pointer object.

func (*Input) SetPointer8A

func (self *Input) SetPointer8A(member *Pointer)

SetPointer8A A Pointer object.

func (*Input) SetPointer9A

func (self *Input) SetPointer9A(member *Pointer)

SetPointer9A A Pointer object.

func (*Input) SetPointersA

func (self *Input) SetPointersA(member []Pointer)

SetPointersA An array of non-mouse pointers that have been added to the game. The properties `pointer1..N` are aliases for `pointers[0..N-1]`.

func (*Input) SetPollLockedA

func (self *Input) SetPollLockedA(member bool)

SetPollLockedA True if the Input is currently poll rate locked.

func (*Input) SetPollRateA

func (self *Input) SetPollRateA(member int)

SetPollRateA How often should the input pointers be checked for updates? A value of 0 means every single frame (60fps); a value of 1 means every other frame (30fps) and so on.

func (*Input) SetPositionA

func (self *Input) SetPositionA(member *Point)

SetPositionA A point object representing the current position of the Pointer.

func (*Input) SetRecordLimitA

func (self *Input) SetRecordLimitA(member int)

SetRecordLimitA The total number of entries that can be recorded into the Pointer objects tracking history. If the Pointer is tracking one event every 100ms; then a trackLimit of 100 would store the last 10 seconds worth of history.

func (*Input) SetRecordPointerHistoryA

func (self *Input) SetRecordPointerHistoryA(member bool)

SetRecordPointerHistoryA Sets if the Pointer objects should record a history of x/y coordinates they have passed through. The history is cleared each time the Pointer is pressed down. The history is updated at the rate specified in Input.pollRate

func (*Input) SetRecordRateA

func (self *Input) SetRecordRateA(member int)

SetRecordRateA The rate in milliseconds at which the Pointer objects should update their tracking history.

func (*Input) SetResetLockedA

func (self *Input) SetResetLockedA(member bool)

SetResetLockedA If the Input Manager has been reset locked then all calls made to InputManager.reset, such as from a State change, are ignored.

func (*Input) SetScaleA

func (self *Input) SetScaleA(member *Point)

SetScaleA The scale by which all input coordinates are multiplied; calculated by the ScaleManager. In an un-scaled game the values will be x = 1 and y = 1.

func (*Input) SetSpeedA

func (self *Input) SetSpeedA(member *Point)

SetSpeedA A point object representing the speed of the Pointer. Only really useful in single Pointer games; otherwise see the Pointer objects directly.

func (*Input) SetTOUCH_OVERRIDES_MOUSEA

func (self *Input) SetTOUCH_OVERRIDES_MOUSEA(member int)

SetTOUCH_OVERRIDES_MOUSEA empty description

func (*Input) SetTapRateA

func (self *Input) SetTapRateA(member int)

SetTapRateA The number of milliseconds that the Pointer has to be pressed down and then released to be considered a tap or click.

func (*Input) SetTotalActivePointersA

func (self *Input) SetTotalActivePointersA(member int)

SetTotalActivePointersA The total number of active Pointers, not counting the mouse pointer.

func (*Input) SetTotalInactivePointersA

func (self *Input) SetTotalInactivePointersA(member int)

SetTotalInactivePointersA The total number of inactive Pointers.

func (*Input) SetTouchA

func (self *Input) SetTouchA(member *Touch)

SetTouchA The Touch Input manager.

You should not usually access this manager directly, but instead use Input.activePointer which normalizes all the input values for you, regardless of browser.

func (*Input) SetWorldXA

func (self *Input) SetWorldXA(member int)

SetWorldXA The world X coordinate of the most recently active pointer.

func (*Input) SetWorldYA

func (self *Input) SetWorldYA(member int)

SetWorldYA The world Y coordinate of the most recently active pointer.

func (*Input) SetXA

func (self *Input) SetXA(member int)

SetXA The X coordinate of the most recently active pointer. This value takes game scaling into account automatically. See Pointer.screenX/clientX for source values.

func (*Input) SetYA

func (self *Input) SetYA(member int)

SetYA The Y coordinate of the most recently active pointer. This value takes game scaling into account automatically. See Pointer.screenY/clientY for source values.

func (*Input) Speed

func (self *Input) Speed() *Point

Speed A point object representing the speed of the Pointer. Only really useful in single Pointer games; otherwise see the Pointer objects directly.

func (*Input) StartPointer

func (self *Input) StartPointer(event interface{}) *Pointer

StartPointer Find the first free Pointer object and start it, passing in the event data. This is called automatically by Phaser.Touch and Phaser.MSPointer.

func (*Input) StartPointerI

func (self *Input) StartPointerI(args ...interface{}) *Pointer

StartPointerI Find the first free Pointer object and start it, passing in the event data. This is called automatically by Phaser.Touch and Phaser.MSPointer.

func (*Input) StopPointer

func (self *Input) StopPointer(event interface{}) *Pointer

StopPointer Stops the matching Pointer object, passing in the event data.

func (*Input) StopPointerI

func (self *Input) StopPointerI(args ...interface{}) *Pointer

StopPointerI Stops the matching Pointer object, passing in the event data.

func (*Input) TOUCH_OVERRIDES_MOUSE

func (self *Input) TOUCH_OVERRIDES_MOUSE() int

TOUCH_OVERRIDES_MOUSE empty description

func (*Input) TapRate

func (self *Input) TapRate() int

TapRate The number of milliseconds that the Pointer has to be pressed down and then released to be considered a tap or click.

func (*Input) TotalActivePointers

func (self *Input) TotalActivePointers() int

TotalActivePointers The total number of active Pointers, not counting the mouse pointer.

func (*Input) TotalInactivePointers

func (self *Input) TotalInactivePointers() int

TotalInactivePointers The total number of inactive Pointers.

func (*Input) Touch

func (self *Input) Touch() *Touch

Touch The Touch Input manager.

You should not usually access this manager directly, but instead use Input.activePointer which normalizes all the input values for you, regardless of browser.

func (*Input) Update

func (self *Input) Update()

Update Updates the Input Manager. Called by the core Game loop.

func (*Input) UpdateI

func (self *Input) UpdateI(args ...interface{})

UpdateI Updates the Input Manager. Called by the core Game loop.

func (*Input) UpdatePointer

func (self *Input) UpdatePointer(event interface{}) *Pointer

UpdatePointer Updates the matching Pointer object, passing in the event data. This is called automatically and should not normally need to be invoked.

func (*Input) UpdatePointerI

func (self *Input) UpdatePointerI(args ...interface{}) *Pointer

UpdatePointerI Updates the matching Pointer object, passing in the event data. This is called automatically and should not normally need to be invoked.

func (*Input) WorldX

func (self *Input) WorldX() int

WorldX The world X coordinate of the most recently active pointer.

func (*Input) WorldY

func (self *Input) WorldY() int

WorldY The world Y coordinate of the most recently active pointer.

func (*Input) X

func (self *Input) X() int

X The X coordinate of the most recently active pointer. This value takes game scaling into account automatically. See Pointer.screenX/clientX for source values.

func (*Input) Y

func (self *Input) Y() int

Y The Y coordinate of the most recently active pointer. This value takes game scaling into account automatically. See Pointer.screenY/clientY for source values.

type InputHandler

type InputHandler struct {
	*js.Object
}

InputHandler The Input Handler is bound to a specific Sprite and is responsible for managing all Input events on that Sprite.

func NewInputHandler

func NewInputHandler(sprite *Sprite) *InputHandler

NewInputHandler The Input Handler is bound to a specific Sprite and is responsible for managing all Input events on that Sprite.

func NewInputHandlerI

func NewInputHandlerI(args ...interface{}) *InputHandler

NewInputHandlerI The Input Handler is bound to a specific Sprite and is responsible for managing all Input events on that Sprite.

func ToInputHandler

func ToInputHandler(jsStruct interface{}) *InputHandler

InputHandler Binding conversion method to InputHandler point

func (*InputHandler) AddedToGroup

func (self *InputHandler) AddedToGroup()

AddedToGroup Handles when the parent Sprite is added to a new Group.

func (*InputHandler) AddedToGroupI

func (self *InputHandler) AddedToGroupI(args ...interface{})

AddedToGroupI Handles when the parent Sprite is added to a new Group.

func (*InputHandler) AllowHorizontalDrag

func (self *InputHandler) AllowHorizontalDrag() bool

AllowHorizontalDrag Controls if the Sprite is allowed to be dragged horizontally.

func (*InputHandler) AllowVerticalDrag

func (self *InputHandler) AllowVerticalDrag() bool

AllowVerticalDrag Controls if the Sprite is allowed to be dragged vertically.

func (*InputHandler) BoundsRect

func (self *InputHandler) BoundsRect() *Rectangle

BoundsRect A region of the game world within which the sprite is restricted during drag.

func (*InputHandler) BoundsSprite

func (self *InputHandler) BoundsSprite() *Sprite

BoundsSprite A Sprite the bounds of which this sprite is restricted during drag.

func (*InputHandler) BringToTop

func (self *InputHandler) BringToTop() bool

BringToTop If true when this Sprite is clicked or dragged it will automatically be bought to the top of the Group it is within.

func (*InputHandler) CheckBoundsRect

func (self *InputHandler) CheckBoundsRect()

CheckBoundsRect Bounds Rect check for the sprite drag

func (*InputHandler) CheckBoundsRectI

func (self *InputHandler) CheckBoundsRectI(args ...interface{})

CheckBoundsRectI Bounds Rect check for the sprite drag

func (*InputHandler) CheckBoundsSprite

func (self *InputHandler) CheckBoundsSprite()

CheckBoundsSprite Parent Sprite Bounds check for the sprite drag.

func (*InputHandler) CheckBoundsSpriteI

func (self *InputHandler) CheckBoundsSpriteI(args ...interface{})

CheckBoundsSpriteI Parent Sprite Bounds check for the sprite drag.

func (*InputHandler) CheckPixel

func (self *InputHandler) CheckPixel(x int, y int) bool

CheckPixel Runs a pixel perfect check against the given x/y coordinates of the Sprite this InputHandler is bound to. It compares the alpha value of the pixel and if >= InputHandler.pixelPerfectAlpha it returns true.

func (*InputHandler) CheckPixel1O

func (self *InputHandler) CheckPixel1O(x int, y int, pointer *Pointer) bool

CheckPixel1O Runs a pixel perfect check against the given x/y coordinates of the Sprite this InputHandler is bound to. It compares the alpha value of the pixel and if >= InputHandler.pixelPerfectAlpha it returns true.

func (*InputHandler) CheckPixelI

func (self *InputHandler) CheckPixelI(args ...interface{}) bool

CheckPixelI Runs a pixel perfect check against the given x/y coordinates of the Sprite this InputHandler is bound to. It compares the alpha value of the pixel and if >= InputHandler.pixelPerfectAlpha it returns true.

func (*InputHandler) CheckPointerDown

func (self *InputHandler) CheckPointerDown(pointer *Pointer) bool

CheckPointerDown Checks if the given pointer is both down and over the Sprite this InputHandler belongs to. Use the `fastTest` flag is to quickly check just the bounding hit area even if `InputHandler.pixelPerfectOver` is `true`.

func (*InputHandler) CheckPointerDown1O

func (self *InputHandler) CheckPointerDown1O(pointer *Pointer, fastTest bool) bool

CheckPointerDown1O Checks if the given pointer is both down and over the Sprite this InputHandler belongs to. Use the `fastTest` flag is to quickly check just the bounding hit area even if `InputHandler.pixelPerfectOver` is `true`.

func (*InputHandler) CheckPointerDownI

func (self *InputHandler) CheckPointerDownI(args ...interface{}) bool

CheckPointerDownI Checks if the given pointer is both down and over the Sprite this InputHandler belongs to. Use the `fastTest` flag is to quickly check just the bounding hit area even if `InputHandler.pixelPerfectOver` is `true`.

func (*InputHandler) CheckPointerOver

func (self *InputHandler) CheckPointerOver(pointer *Pointer) bool

CheckPointerOver Checks if the given pointer is over the Sprite this InputHandler belongs to. Use the `fastTest` flag is to quickly check just the bounding hit area even if `InputHandler.pixelPerfectOver` is `true`.

func (*InputHandler) CheckPointerOver1O

func (self *InputHandler) CheckPointerOver1O(pointer *Pointer, fastTest bool) bool

CheckPointerOver1O Checks if the given pointer is over the Sprite this InputHandler belongs to. Use the `fastTest` flag is to quickly check just the bounding hit area even if `InputHandler.pixelPerfectOver` is `true`.

func (*InputHandler) CheckPointerOverI

func (self *InputHandler) CheckPointerOverI(args ...interface{}) bool

CheckPointerOverI Checks if the given pointer is over the Sprite this InputHandler belongs to. Use the `fastTest` flag is to quickly check just the bounding hit area even if `InputHandler.pixelPerfectOver` is `true`.

func (*InputHandler) Checked

func (self *InputHandler) Checked() bool

Checked A disposable flag used by the Pointer class when performing priority checks.

func (*InputHandler) Destroy

func (self *InputHandler) Destroy()

Destroy Clean up memory.

func (*InputHandler) DestroyI

func (self *InputHandler) DestroyI(args ...interface{})

DestroyI Clean up memory.

func (*InputHandler) DisableDrag

func (self *InputHandler) DisableDrag()

DisableDrag Stops this sprite from being able to be dragged. If it is currently the target of an active drag it will be stopped immediately; also disables any set callbacks.

func (*InputHandler) DisableDragI

func (self *InputHandler) DisableDragI(args ...interface{})

DisableDragI Stops this sprite from being able to be dragged. If it is currently the target of an active drag it will be stopped immediately; also disables any set callbacks.

func (*InputHandler) DisableSnap

func (self *InputHandler) DisableSnap()

DisableSnap Stops the sprite from snapping to a grid during drag or release.

func (*InputHandler) DisableSnapI

func (self *InputHandler) DisableSnapI(args ...interface{})

DisableSnapI Stops the sprite from snapping to a grid during drag or release.

func (*InputHandler) DownDuration

func (self *InputHandler) DownDuration() int

DownDuration If the pointer is currently over this Sprite this returns how long it has been there for in milliseconds.

func (*InputHandler) DownDuration1O

func (self *InputHandler) DownDuration1O(pointerId int) int

DownDuration1O If the pointer is currently over this Sprite this returns how long it has been there for in milliseconds.

func (*InputHandler) DownDurationI

func (self *InputHandler) DownDurationI(args ...interface{}) int

DownDurationI If the pointer is currently over this Sprite this returns how long it has been there for in milliseconds.

func (*InputHandler) DownPoint

func (self *InputHandler) DownPoint() *Point

DownPoint A Point object containing the coordinates of the Pointer when it was first pressed down onto this Sprite.

func (*InputHandler) DragDistanceThreshold

func (self *InputHandler) DragDistanceThreshold() int

DragDistanceThreshold The distance, in pixels, the pointer has to move while being held down, before the Sprite thinks it is being dragged.

func (*InputHandler) DragFromCenter

func (self *InputHandler) DragFromCenter() bool

DragFromCenter Is the Sprite dragged from its center, or the point at which the Pointer was pressed down upon it?

func (*InputHandler) DragOffset

func (self *InputHandler) DragOffset() *Point

DragOffset The offset from the Sprites position that dragging takes place from.

func (*InputHandler) DragStartPoint

func (self *InputHandler) DragStartPoint() *Point

DragStartPoint The Point from which the most recent drag started from. Useful if you need to return an object to its starting position.

func (*InputHandler) DragStopBlocksInputUp

func (self *InputHandler) DragStopBlocksInputUp() bool

DragStopBlocksInputUp If enabled, when the Sprite stops being dragged, it will only dispatch the `onDragStop` event, and not the `onInputUp` event. If set to `false` it will dispatch both events.

func (*InputHandler) DragTimeElapsed

func (self *InputHandler) DragTimeElapsed(pointer *Pointer)

DragTimeElapsed Internal method handling the drag threshold timer.

func (*InputHandler) DragTimeElapsedI

func (self *InputHandler) DragTimeElapsedI(args ...interface{})

DragTimeElapsedI Internal method handling the drag threshold timer.

func (*InputHandler) DragTimeThreshold

func (self *InputHandler) DragTimeThreshold() int

DragTimeThreshold The amount of time, in ms, the pointer has to be held down over the Sprite before it thinks it is being dragged.

func (*InputHandler) Draggable

func (self *InputHandler) Draggable() bool

Draggable Is this sprite allowed to be dragged by the mouse? true = yes, false = no

func (*InputHandler) EnableDrag

func (self *InputHandler) EnableDrag()

EnableDrag Allow this Sprite to be dragged by any valid pointer.

When the drag begins the Sprite.events.onDragStart event will be dispatched.

When the drag completes by way of the user letting go of the pointer that was dragging the sprite, the Sprite.events.onDragStop event is dispatched.

You can control the thresholds over when a drag starts via the properties:

`Pointer.dragDistanceThreshold` the distance, in pixels, that the pointer has to move before the drag will start.

`Pointer.dragTimeThreshold` the time, in ms, that the pointer must be held down on the Sprite before the drag will start.

You can set either (or both) of these properties after enabling a Sprite for drag.

For the duration of the drag the Sprite.events.onDragUpdate event is dispatched. This event is only dispatched when the pointer actually changes position and moves. The event sends 5 parameters: `sprite`, `pointer`, `dragX`, `dragY` and `snapPoint`.

func (*InputHandler) EnableDrag1O

func (self *InputHandler) EnableDrag1O(lockCenter bool)

EnableDrag1O Allow this Sprite to be dragged by any valid pointer.

When the drag begins the Sprite.events.onDragStart event will be dispatched.

When the drag completes by way of the user letting go of the pointer that was dragging the sprite, the Sprite.events.onDragStop event is dispatched.

You can control the thresholds over when a drag starts via the properties:

`Pointer.dragDistanceThreshold` the distance, in pixels, that the pointer has to move before the drag will start.

`Pointer.dragTimeThreshold` the time, in ms, that the pointer must be held down on the Sprite before the drag will start.

You can set either (or both) of these properties after enabling a Sprite for drag.

For the duration of the drag the Sprite.events.onDragUpdate event is dispatched. This event is only dispatched when the pointer actually changes position and moves. The event sends 5 parameters: `sprite`, `pointer`, `dragX`, `dragY` and `snapPoint`.

func (*InputHandler) EnableDrag2O

func (self *InputHandler) EnableDrag2O(lockCenter bool, bringToTop bool)

EnableDrag2O Allow this Sprite to be dragged by any valid pointer.

When the drag begins the Sprite.events.onDragStart event will be dispatched.

When the drag completes by way of the user letting go of the pointer that was dragging the sprite, the Sprite.events.onDragStop event is dispatched.

You can control the thresholds over when a drag starts via the properties:

`Pointer.dragDistanceThreshold` the distance, in pixels, that the pointer has to move before the drag will start.

`Pointer.dragTimeThreshold` the time, in ms, that the pointer must be held down on the Sprite before the drag will start.

You can set either (or both) of these properties after enabling a Sprite for drag.

For the duration of the drag the Sprite.events.onDragUpdate event is dispatched. This event is only dispatched when the pointer actually changes position and moves. The event sends 5 parameters: `sprite`, `pointer`, `dragX`, `dragY` and `snapPoint`.

func (*InputHandler) EnableDrag3O

func (self *InputHandler) EnableDrag3O(lockCenter bool, bringToTop bool, pixelPerfect bool)

EnableDrag3O Allow this Sprite to be dragged by any valid pointer.

When the drag begins the Sprite.events.onDragStart event will be dispatched.

When the drag completes by way of the user letting go of the pointer that was dragging the sprite, the Sprite.events.onDragStop event is dispatched.

You can control the thresholds over when a drag starts via the properties:

`Pointer.dragDistanceThreshold` the distance, in pixels, that the pointer has to move before the drag will start.

`Pointer.dragTimeThreshold` the time, in ms, that the pointer must be held down on the Sprite before the drag will start.

You can set either (or both) of these properties after enabling a Sprite for drag.

For the duration of the drag the Sprite.events.onDragUpdate event is dispatched. This event is only dispatched when the pointer actually changes position and moves. The event sends 5 parameters: `sprite`, `pointer`, `dragX`, `dragY` and `snapPoint`.

func (*InputHandler) EnableDrag4O

func (self *InputHandler) EnableDrag4O(lockCenter bool, bringToTop bool, pixelPerfect bool, alphaThreshold bool)

EnableDrag4O Allow this Sprite to be dragged by any valid pointer.

When the drag begins the Sprite.events.onDragStart event will be dispatched.

When the drag completes by way of the user letting go of the pointer that was dragging the sprite, the Sprite.events.onDragStop event is dispatched.

You can control the thresholds over when a drag starts via the properties:

`Pointer.dragDistanceThreshold` the distance, in pixels, that the pointer has to move before the drag will start.

`Pointer.dragTimeThreshold` the time, in ms, that the pointer must be held down on the Sprite before the drag will start.

You can set either (or both) of these properties after enabling a Sprite for drag.

For the duration of the drag the Sprite.events.onDragUpdate event is dispatched. This event is only dispatched when the pointer actually changes position and moves. The event sends 5 parameters: `sprite`, `pointer`, `dragX`, `dragY` and `snapPoint`.

func (*InputHandler) EnableDrag5O

func (self *InputHandler) EnableDrag5O(lockCenter bool, bringToTop bool, pixelPerfect bool, alphaThreshold bool, boundsRect *Rectangle)

EnableDrag5O Allow this Sprite to be dragged by any valid pointer.

When the drag begins the Sprite.events.onDragStart event will be dispatched.

When the drag completes by way of the user letting go of the pointer that was dragging the sprite, the Sprite.events.onDragStop event is dispatched.

You can control the thresholds over when a drag starts via the properties:

`Pointer.dragDistanceThreshold` the distance, in pixels, that the pointer has to move before the drag will start.

`Pointer.dragTimeThreshold` the time, in ms, that the pointer must be held down on the Sprite before the drag will start.

You can set either (or both) of these properties after enabling a Sprite for drag.

For the duration of the drag the Sprite.events.onDragUpdate event is dispatched. This event is only dispatched when the pointer actually changes position and moves. The event sends 5 parameters: `sprite`, `pointer`, `dragX`, `dragY` and `snapPoint`.

func (*InputHandler) EnableDrag6O

func (self *InputHandler) EnableDrag6O(lockCenter bool, bringToTop bool, pixelPerfect bool, alphaThreshold bool, boundsRect *Rectangle, boundsSprite *Sprite)

EnableDrag6O Allow this Sprite to be dragged by any valid pointer.

When the drag begins the Sprite.events.onDragStart event will be dispatched.

When the drag completes by way of the user letting go of the pointer that was dragging the sprite, the Sprite.events.onDragStop event is dispatched.

You can control the thresholds over when a drag starts via the properties:

`Pointer.dragDistanceThreshold` the distance, in pixels, that the pointer has to move before the drag will start.

`Pointer.dragTimeThreshold` the time, in ms, that the pointer must be held down on the Sprite before the drag will start.

You can set either (or both) of these properties after enabling a Sprite for drag.

For the duration of the drag the Sprite.events.onDragUpdate event is dispatched. This event is only dispatched when the pointer actually changes position and moves. The event sends 5 parameters: `sprite`, `pointer`, `dragX`, `dragY` and `snapPoint`.

func (*InputHandler) EnableDragI

func (self *InputHandler) EnableDragI(args ...interface{})

EnableDragI Allow this Sprite to be dragged by any valid pointer.

When the drag begins the Sprite.events.onDragStart event will be dispatched.

When the drag completes by way of the user letting go of the pointer that was dragging the sprite, the Sprite.events.onDragStop event is dispatched.

You can control the thresholds over when a drag starts via the properties:

`Pointer.dragDistanceThreshold` the distance, in pixels, that the pointer has to move before the drag will start.

`Pointer.dragTimeThreshold` the time, in ms, that the pointer must be held down on the Sprite before the drag will start.

You can set either (or both) of these properties after enabling a Sprite for drag.

For the duration of the drag the Sprite.events.onDragUpdate event is dispatched. This event is only dispatched when the pointer actually changes position and moves. The event sends 5 parameters: `sprite`, `pointer`, `dragX`, `dragY` and `snapPoint`.

func (*InputHandler) EnableSnap

func (self *InputHandler) EnableSnap(snapX int, snapY int)

EnableSnap Make this Sprite snap to the given grid either during drag or when it's released. For example 16x16 as the snapX and snapY would make the sprite snap to every 16 pixels.

func (*InputHandler) EnableSnap1O

func (self *InputHandler) EnableSnap1O(snapX int, snapY int, onDrag bool)

EnableSnap1O Make this Sprite snap to the given grid either during drag or when it's released. For example 16x16 as the snapX and snapY would make the sprite snap to every 16 pixels.

func (*InputHandler) EnableSnap2O

func (self *InputHandler) EnableSnap2O(snapX int, snapY int, onDrag bool, onRelease bool)

EnableSnap2O Make this Sprite snap to the given grid either during drag or when it's released. For example 16x16 as the snapX and snapY would make the sprite snap to every 16 pixels.

func (*InputHandler) EnableSnap3O

func (self *InputHandler) EnableSnap3O(snapX int, snapY int, onDrag bool, onRelease bool, snapOffsetX int)

EnableSnap3O Make this Sprite snap to the given grid either during drag or when it's released. For example 16x16 as the snapX and snapY would make the sprite snap to every 16 pixels.

func (*InputHandler) EnableSnap4O

func (self *InputHandler) EnableSnap4O(snapX int, snapY int, onDrag bool, onRelease bool, snapOffsetX int, snapOffsetY int)

EnableSnap4O Make this Sprite snap to the given grid either during drag or when it's released. For example 16x16 as the snapX and snapY would make the sprite snap to every 16 pixels.

func (*InputHandler) EnableSnapI

func (self *InputHandler) EnableSnapI(args ...interface{})

EnableSnapI Make this Sprite snap to the given grid either during drag or when it's released. For example 16x16 as the snapX and snapY would make the sprite snap to every 16 pixels.

func (*InputHandler) Enabled

func (self *InputHandler) Enabled() bool

Enabled If enabled the Input Handler will process input requests and monitor pointer activity.

func (*InputHandler) Game

func (self *InputHandler) Game() *Game

Game A reference to the currently running game.

func (*InputHandler) GlobalToLocalX

func (self *InputHandler) GlobalToLocalX(x int)

GlobalToLocalX Warning: EXPERIMENTAL

func (*InputHandler) GlobalToLocalXI

func (self *InputHandler) GlobalToLocalXI(args ...interface{})

GlobalToLocalXI Warning: EXPERIMENTAL

func (*InputHandler) GlobalToLocalY

func (self *InputHandler) GlobalToLocalY(y int)

GlobalToLocalY Warning: EXPERIMENTAL

func (*InputHandler) GlobalToLocalYI

func (self *InputHandler) GlobalToLocalYI(args ...interface{})

GlobalToLocalYI Warning: EXPERIMENTAL

func (*InputHandler) IsDragged

func (self *InputHandler) IsDragged() bool

IsDragged true if the Sprite is being currently dragged.

func (*InputHandler) IsPixelPerfect

func (self *InputHandler) IsPixelPerfect() bool

IsPixelPerfect Is this object using pixel perfect checking?

func (*InputHandler) IsPixelPerfectI

func (self *InputHandler) IsPixelPerfectI(args ...interface{}) bool

IsPixelPerfectI Is this object using pixel perfect checking?

func (*InputHandler) JustOut

func (self *InputHandler) JustOut(pointerId int, delay int) bool

JustOut Returns true if the pointer has left the Sprite within the specified delay time (defaults to 500ms, half a second)

func (*InputHandler) JustOutI

func (self *InputHandler) JustOutI(args ...interface{}) bool

JustOutI Returns true if the pointer has left the Sprite within the specified delay time (defaults to 500ms, half a second)

func (*InputHandler) JustOver

func (self *InputHandler) JustOver(pointerId int, delay int) bool

JustOver Returns true if the pointer has entered the Sprite within the specified delay time (defaults to 500ms, half a second)

func (*InputHandler) JustOverI

func (self *InputHandler) JustOverI(args ...interface{}) bool

JustOverI Returns true if the pointer has entered the Sprite within the specified delay time (defaults to 500ms, half a second)

func (*InputHandler) JustPressed

func (self *InputHandler) JustPressed(pointerId int, delay int) bool

JustPressed Returns true if the pointer has touched or clicked on the Sprite within the specified delay time (defaults to 500ms, half a second)

func (*InputHandler) JustPressedI

func (self *InputHandler) JustPressedI(args ...interface{}) bool

JustPressedI Returns true if the pointer has touched or clicked on the Sprite within the specified delay time (defaults to 500ms, half a second)

func (*InputHandler) JustReleased

func (self *InputHandler) JustReleased(pointerId int, delay int) bool

JustReleased Returns true if the pointer was touching this Sprite, but has been released within the specified delay time (defaults to 500ms, half a second)

func (*InputHandler) JustReleasedI

func (self *InputHandler) JustReleasedI(args ...interface{}) bool

JustReleasedI Returns true if the pointer was touching this Sprite, but has been released within the specified delay time (defaults to 500ms, half a second)

func (*InputHandler) OverDuration

func (self *InputHandler) OverDuration() int

OverDuration If the pointer is currently over this Sprite this returns how long it has been there for in milliseconds.

func (*InputHandler) OverDuration1O

func (self *InputHandler) OverDuration1O(pointerId int) int

OverDuration1O If the pointer is currently over this Sprite this returns how long it has been there for in milliseconds.

func (*InputHandler) OverDurationI

func (self *InputHandler) OverDurationI(args ...interface{}) int

OverDurationI If the pointer is currently over this Sprite this returns how long it has been there for in milliseconds.

func (*InputHandler) PixelPerfectAlpha

func (self *InputHandler) PixelPerfectAlpha() int

PixelPerfectAlpha The alpha tolerance threshold. If the alpha value of the pixel matches or is above this value, it's considered a hit.

func (*InputHandler) PixelPerfectClick

func (self *InputHandler) PixelPerfectClick() bool

PixelPerfectClick Set to true to use pixel perfect hit detection when checking if the pointer is over this Sprite when it's clicked or touched. The x/y coordinates of the pointer are tested against the image in combination with the InputHandler.pixelPerfectAlpha value. This feature only works for display objects with image based textures such as Sprites. It won't work on BitmapText or Rope. Warning: This is expensive so only enable if you really need it. Use a pixel perfect check when testing for clicks or touches on the Sprite.

func (*InputHandler) PixelPerfectOver

func (self *InputHandler) PixelPerfectOver() bool

PixelPerfectOver Set to true to use pixel perfect hit detection when checking if the pointer is over this Sprite. The x/y coordinates of the pointer are tested against the image in combination with the InputHandler.pixelPerfectAlpha value. This feature only works for display objects with image based textures such as Sprites. It won't work on BitmapText or Rope. Warning: This is expensive, especially on mobile (where it's not even needed!) so only enable if required. Also see the less-expensive InputHandler.pixelPerfectClick. Use a pixel perfect check when testing for pointer over.

func (*InputHandler) PointerDown

func (self *InputHandler) PointerDown() bool

PointerDown If the Pointer is down this returns true. This *only* checks if the Pointer is down, not if it's down over any specific Sprite.

func (*InputHandler) PointerDown1O

func (self *InputHandler) PointerDown1O(pointerId int) bool

PointerDown1O If the Pointer is down this returns true. This *only* checks if the Pointer is down, not if it's down over any specific Sprite.

func (*InputHandler) PointerDownI

func (self *InputHandler) PointerDownI(args ...interface{}) bool

PointerDownI If the Pointer is down this returns true. This *only* checks if the Pointer is down, not if it's down over any specific Sprite.

func (*InputHandler) PointerDragged

func (self *InputHandler) PointerDragged() bool

PointerDragged Is this sprite being dragged by the mouse or not?

func (*InputHandler) PointerDragged1O

func (self *InputHandler) PointerDragged1O(pointerId int) bool

PointerDragged1O Is this sprite being dragged by the mouse or not?

func (*InputHandler) PointerDraggedI

func (self *InputHandler) PointerDraggedI(args ...interface{}) bool

PointerDraggedI Is this sprite being dragged by the mouse or not?

func (*InputHandler) PointerOut

func (self *InputHandler) PointerOut() bool

PointerOut Is the Pointer outside of this Sprite?

func (*InputHandler) PointerOut1O

func (self *InputHandler) PointerOut1O(pointerId int) bool

PointerOut1O Is the Pointer outside of this Sprite?

func (*InputHandler) PointerOutI

func (self *InputHandler) PointerOutI(args ...interface{}) bool

PointerOutI Is the Pointer outside of this Sprite?

func (*InputHandler) PointerOver

func (self *InputHandler) PointerOver() bool

PointerOver Is the Pointer over this Sprite?

func (*InputHandler) PointerOver1O

func (self *InputHandler) PointerOver1O(pointerId int) bool

PointerOver1O Is the Pointer over this Sprite?

func (*InputHandler) PointerOverI

func (self *InputHandler) PointerOverI(args ...interface{}) bool

PointerOverI Is the Pointer over this Sprite?

func (*InputHandler) PointerTimeDown

func (self *InputHandler) PointerTimeDown() int

PointerTimeDown A timestamp representing when the Pointer first touched the touchscreen.

func (*InputHandler) PointerTimeDown1O

func (self *InputHandler) PointerTimeDown1O(pointerId int) int

PointerTimeDown1O A timestamp representing when the Pointer first touched the touchscreen.

func (*InputHandler) PointerTimeDownI

func (self *InputHandler) PointerTimeDownI(args ...interface{}) int

PointerTimeDownI A timestamp representing when the Pointer first touched the touchscreen.

func (*InputHandler) PointerTimeOut

func (self *InputHandler) PointerTimeOut() int

PointerTimeOut A timestamp representing when the Pointer left the touchscreen.

func (*InputHandler) PointerTimeOut1O

func (self *InputHandler) PointerTimeOut1O(pointerId int) int

PointerTimeOut1O A timestamp representing when the Pointer left the touchscreen.

func (*InputHandler) PointerTimeOutI

func (self *InputHandler) PointerTimeOutI(args ...interface{}) int

PointerTimeOutI A timestamp representing when the Pointer left the touchscreen.

func (*InputHandler) PointerTimeOver

func (self *InputHandler) PointerTimeOver() int

PointerTimeOver A timestamp representing when the Pointer first touched the touchscreen.

func (*InputHandler) PointerTimeOver1O

func (self *InputHandler) PointerTimeOver1O(pointerId int) int

PointerTimeOver1O A timestamp representing when the Pointer first touched the touchscreen.

func (*InputHandler) PointerTimeOverI

func (self *InputHandler) PointerTimeOverI(args ...interface{}) int

PointerTimeOverI A timestamp representing when the Pointer first touched the touchscreen.

func (*InputHandler) PointerTimeUp

func (self *InputHandler) PointerTimeUp() int

PointerTimeUp A timestamp representing when the Pointer left the touchscreen.

func (*InputHandler) PointerTimeUp1O

func (self *InputHandler) PointerTimeUp1O(pointerId int) int

PointerTimeUp1O A timestamp representing when the Pointer left the touchscreen.

func (*InputHandler) PointerTimeUpI

func (self *InputHandler) PointerTimeUpI(args ...interface{}) int

PointerTimeUpI A timestamp representing when the Pointer left the touchscreen.

func (*InputHandler) PointerUp

func (self *InputHandler) PointerUp() bool

PointerUp If the Pointer is up this returns true. This *only* checks if the Pointer is up, not if it's up over any specific Sprite.

func (*InputHandler) PointerUp1O

func (self *InputHandler) PointerUp1O(pointerId int) bool

PointerUp1O If the Pointer is up this returns true. This *only* checks if the Pointer is up, not if it's up over any specific Sprite.

func (*InputHandler) PointerUpI

func (self *InputHandler) PointerUpI(args ...interface{}) bool

PointerUpI If the Pointer is up this returns true. This *only* checks if the Pointer is up, not if it's up over any specific Sprite.

func (*InputHandler) PointerX

func (self *InputHandler) PointerX() int

PointerX The x coordinate of the Input pointer, relative to the top-left of the parent Sprite. This value is only set when the pointer is over this Sprite.

func (*InputHandler) PointerX1O

func (self *InputHandler) PointerX1O(pointerId int) int

PointerX1O The x coordinate of the Input pointer, relative to the top-left of the parent Sprite. This value is only set when the pointer is over this Sprite.

func (*InputHandler) PointerXI

func (self *InputHandler) PointerXI(args ...interface{}) int

PointerXI The x coordinate of the Input pointer, relative to the top-left of the parent Sprite. This value is only set when the pointer is over this Sprite.

func (*InputHandler) PointerY

func (self *InputHandler) PointerY() int

PointerY The y coordinate of the Input pointer, relative to the top-left of the parent Sprite This value is only set when the pointer is over this Sprite.

func (*InputHandler) PointerY1O

func (self *InputHandler) PointerY1O(pointerId int) int

PointerY1O The y coordinate of the Input pointer, relative to the top-left of the parent Sprite This value is only set when the pointer is over this Sprite.

func (*InputHandler) PointerYI

func (self *InputHandler) PointerYI(args ...interface{}) int

PointerYI The y coordinate of the Input pointer, relative to the top-left of the parent Sprite This value is only set when the pointer is over this Sprite.

func (*InputHandler) PriorityID

func (self *InputHandler) PriorityID() int

PriorityID The priorityID is used to determine which game objects should get priority when input events occur. For example if you have several Sprites that overlap, by default the one at the top of the display list is given priority for input events. You can stop this from happening by controlling the priorityID value. The higher the value, the more important they are considered to the Input events.

func (*InputHandler) RemovedFromGroup

func (self *InputHandler) RemovedFromGroup()

RemovedFromGroup Handles when the parent Sprite is removed from a Group.

func (*InputHandler) RemovedFromGroupI

func (self *InputHandler) RemovedFromGroupI(args ...interface{})

RemovedFromGroupI Handles when the parent Sprite is removed from a Group.

func (*InputHandler) Reset

func (self *InputHandler) Reset()

Reset Resets the Input Handler and disables it.

func (*InputHandler) ResetI

func (self *InputHandler) ResetI(args ...interface{})

ResetI Resets the Input Handler and disables it.

func (*InputHandler) ScaleLayer

func (self *InputHandler) ScaleLayer() bool

ScaleLayer EXPERIMENTAL: Please do not use this property unless you know what it does. Likely to change in the future.

func (*InputHandler) SetAllowHorizontalDragA

func (self *InputHandler) SetAllowHorizontalDragA(member bool)

SetAllowHorizontalDragA Controls if the Sprite is allowed to be dragged horizontally.

func (*InputHandler) SetAllowVerticalDragA

func (self *InputHandler) SetAllowVerticalDragA(member bool)

SetAllowVerticalDragA Controls if the Sprite is allowed to be dragged vertically.

func (*InputHandler) SetBoundsRectA

func (self *InputHandler) SetBoundsRectA(member *Rectangle)

SetBoundsRectA A region of the game world within which the sprite is restricted during drag.

func (*InputHandler) SetBoundsSpriteA

func (self *InputHandler) SetBoundsSpriteA(member *Sprite)

SetBoundsSpriteA A Sprite the bounds of which this sprite is restricted during drag.

func (*InputHandler) SetBringToTopA

func (self *InputHandler) SetBringToTopA(member bool)

SetBringToTopA If true when this Sprite is clicked or dragged it will automatically be bought to the top of the Group it is within.

func (*InputHandler) SetCheckedA

func (self *InputHandler) SetCheckedA(member bool)

SetCheckedA A disposable flag used by the Pointer class when performing priority checks.

func (*InputHandler) SetDownPointA

func (self *InputHandler) SetDownPointA(member *Point)

SetDownPointA A Point object containing the coordinates of the Pointer when it was first pressed down onto this Sprite.

func (*InputHandler) SetDragDistanceThresholdA

func (self *InputHandler) SetDragDistanceThresholdA(member int)

SetDragDistanceThresholdA The distance, in pixels, the pointer has to move while being held down, before the Sprite thinks it is being dragged.

func (*InputHandler) SetDragFromCenterA

func (self *InputHandler) SetDragFromCenterA(member bool)

SetDragFromCenterA Is the Sprite dragged from its center, or the point at which the Pointer was pressed down upon it?

func (*InputHandler) SetDragLock

func (self *InputHandler) SetDragLock()

SetDragLock Restricts this sprite to drag movement only on the given axis. Note: If both are set to false the sprite will never move!

func (*InputHandler) SetDragLock1O

func (self *InputHandler) SetDragLock1O(allowHorizontal bool)

SetDragLock1O Restricts this sprite to drag movement only on the given axis. Note: If both are set to false the sprite will never move!

func (*InputHandler) SetDragLock2O

func (self *InputHandler) SetDragLock2O(allowHorizontal bool, allowVertical bool)

SetDragLock2O Restricts this sprite to drag movement only on the given axis. Note: If both are set to false the sprite will never move!

func (*InputHandler) SetDragLockI

func (self *InputHandler) SetDragLockI(args ...interface{})

SetDragLockI Restricts this sprite to drag movement only on the given axis. Note: If both are set to false the sprite will never move!

func (*InputHandler) SetDragOffsetA

func (self *InputHandler) SetDragOffsetA(member *Point)

SetDragOffsetA The offset from the Sprites position that dragging takes place from.

func (*InputHandler) SetDragStartPointA

func (self *InputHandler) SetDragStartPointA(member *Point)

SetDragStartPointA The Point from which the most recent drag started from. Useful if you need to return an object to its starting position.

func (*InputHandler) SetDragStopBlocksInputUpA

func (self *InputHandler) SetDragStopBlocksInputUpA(member bool)

SetDragStopBlocksInputUpA If enabled, when the Sprite stops being dragged, it will only dispatch the `onDragStop` event, and not the `onInputUp` event. If set to `false` it will dispatch both events.

func (*InputHandler) SetDragTimeThresholdA

func (self *InputHandler) SetDragTimeThresholdA(member int)

SetDragTimeThresholdA The amount of time, in ms, the pointer has to be held down over the Sprite before it thinks it is being dragged.

func (*InputHandler) SetDraggableA

func (self *InputHandler) SetDraggableA(member bool)

SetDraggableA Is this sprite allowed to be dragged by the mouse? true = yes, false = no

func (*InputHandler) SetEnabledA

func (self *InputHandler) SetEnabledA(member bool)

SetEnabledA If enabled the Input Handler will process input requests and monitor pointer activity.

func (*InputHandler) SetGameA

func (self *InputHandler) SetGameA(member *Game)

SetGameA A reference to the currently running game.

func (*InputHandler) SetIsDraggedA

func (self *InputHandler) SetIsDraggedA(member bool)

SetIsDraggedA true if the Sprite is being currently dragged.

func (*InputHandler) SetPixelPerfectAlphaA

func (self *InputHandler) SetPixelPerfectAlphaA(member int)

SetPixelPerfectAlphaA The alpha tolerance threshold. If the alpha value of the pixel matches or is above this value, it's considered a hit.

func (*InputHandler) SetPixelPerfectClickA

func (self *InputHandler) SetPixelPerfectClickA(member bool)

SetPixelPerfectClickA Set to true to use pixel perfect hit detection when checking if the pointer is over this Sprite when it's clicked or touched. The x/y coordinates of the pointer are tested against the image in combination with the InputHandler.pixelPerfectAlpha value. This feature only works for display objects with image based textures such as Sprites. It won't work on BitmapText or Rope. Warning: This is expensive so only enable if you really need it. Use a pixel perfect check when testing for clicks or touches on the Sprite.

func (*InputHandler) SetPixelPerfectOverA

func (self *InputHandler) SetPixelPerfectOverA(member bool)

SetPixelPerfectOverA Set to true to use pixel perfect hit detection when checking if the pointer is over this Sprite. The x/y coordinates of the pointer are tested against the image in combination with the InputHandler.pixelPerfectAlpha value. This feature only works for display objects with image based textures such as Sprites. It won't work on BitmapText or Rope. Warning: This is expensive, especially on mobile (where it's not even needed!) so only enable if required. Also see the less-expensive InputHandler.pixelPerfectClick. Use a pixel perfect check when testing for pointer over.

func (*InputHandler) SetPriorityIDA

func (self *InputHandler) SetPriorityIDA(member int)

SetPriorityIDA The priorityID is used to determine which game objects should get priority when input events occur. For example if you have several Sprites that overlap, by default the one at the top of the display list is given priority for input events. You can stop this from happening by controlling the priorityID value. The higher the value, the more important they are considered to the Input events.

func (*InputHandler) SetScaleLayerA

func (self *InputHandler) SetScaleLayerA(member bool)

SetScaleLayerA EXPERIMENTAL: Please do not use this property unless you know what it does. Likely to change in the future.

func (*InputHandler) SetSnapOffsetA

func (self *InputHandler) SetSnapOffsetA(member *Point)

SetSnapOffsetA A Point object that contains by how far the Sprite snap is offset.

func (*InputHandler) SetSnapOffsetXA

func (self *InputHandler) SetSnapOffsetXA(member int)

SetSnapOffsetXA This defines the top-left X coordinate of the snap grid.

func (*InputHandler) SetSnapOffsetYA

func (self *InputHandler) SetSnapOffsetYA(member int)

SetSnapOffsetYA This defines the top-left Y coordinate of the snap grid..

func (*InputHandler) SetSnapOnDragA

func (self *InputHandler) SetSnapOnDragA(member bool)

SetSnapOnDragA When the Sprite is dragged this controls if the center of the Sprite will snap to the pointer on drag or not.

func (*InputHandler) SetSnapOnReleaseA

func (self *InputHandler) SetSnapOnReleaseA(member bool)

SetSnapOnReleaseA When the Sprite is dragged this controls if the Sprite will be snapped on release.

func (*InputHandler) SetSnapPointA

func (self *InputHandler) SetSnapPointA(member *Point)

SetSnapPointA If the sprite is set to snap while dragging this holds the point of the most recent 'snap' event.

func (*InputHandler) SetSnapXA

func (self *InputHandler) SetSnapXA(member int)

SetSnapXA When a Sprite has snapping enabled this holds the width of the snap grid.

func (*InputHandler) SetSnapYA

func (self *InputHandler) SetSnapYA(member int)

SetSnapYA When a Sprite has snapping enabled this holds the height of the snap grid.

func (*InputHandler) SetSpriteA

func (self *InputHandler) SetSpriteA(member *Sprite)

SetSpriteA The Sprite object to which this Input Handler belongs.

func (*InputHandler) SetUseHandCursorA

func (self *InputHandler) SetUseHandCursorA(member bool)

SetUseHandCursorA On a desktop browser you can set the 'hand' cursor to appear when moving over the Sprite.

func (*InputHandler) SnapOffset

func (self *InputHandler) SnapOffset() *Point

SnapOffset A Point object that contains by how far the Sprite snap is offset.

func (*InputHandler) SnapOffsetX

func (self *InputHandler) SnapOffsetX() int

SnapOffsetX This defines the top-left X coordinate of the snap grid.

func (*InputHandler) SnapOffsetY

func (self *InputHandler) SnapOffsetY() int

SnapOffsetY This defines the top-left Y coordinate of the snap grid..

func (*InputHandler) SnapOnDrag

func (self *InputHandler) SnapOnDrag() bool

SnapOnDrag When the Sprite is dragged this controls if the center of the Sprite will snap to the pointer on drag or not.

func (*InputHandler) SnapOnRelease

func (self *InputHandler) SnapOnRelease() bool

SnapOnRelease When the Sprite is dragged this controls if the Sprite will be snapped on release.

func (*InputHandler) SnapPoint

func (self *InputHandler) SnapPoint() *Point

SnapPoint If the sprite is set to snap while dragging this holds the point of the most recent 'snap' event.

func (*InputHandler) SnapX

func (self *InputHandler) SnapX() int

SnapX When a Sprite has snapping enabled this holds the width of the snap grid.

func (*InputHandler) SnapY

func (self *InputHandler) SnapY() int

SnapY When a Sprite has snapping enabled this holds the height of the snap grid.

func (*InputHandler) Sprite

func (self *InputHandler) Sprite() *Sprite

Sprite The Sprite object to which this Input Handler belongs.

func (*InputHandler) Start

func (self *InputHandler) Start() *Sprite

Start Starts the Input Handler running. This is called automatically when you enable input on a Sprite, or can be called directly if you need to set a specific priority.

func (*InputHandler) Start1O

func (self *InputHandler) Start1O(priority int) *Sprite

Start1O Starts the Input Handler running. This is called automatically when you enable input on a Sprite, or can be called directly if you need to set a specific priority.

func (*InputHandler) Start2O

func (self *InputHandler) Start2O(priority int, useHandCursor bool) *Sprite

Start2O Starts the Input Handler running. This is called automatically when you enable input on a Sprite, or can be called directly if you need to set a specific priority.

func (*InputHandler) StartDrag

func (self *InputHandler) StartDrag(pointer *Pointer)

StartDrag Called by Pointer when drag starts on this Sprite. Should not usually be called directly.

func (*InputHandler) StartDragI

func (self *InputHandler) StartDragI(args ...interface{})

StartDragI Called by Pointer when drag starts on this Sprite. Should not usually be called directly.

func (*InputHandler) StartI

func (self *InputHandler) StartI(args ...interface{}) *Sprite

StartI Starts the Input Handler running. This is called automatically when you enable input on a Sprite, or can be called directly if you need to set a specific priority.

func (*InputHandler) Stop

func (self *InputHandler) Stop()

Stop Stops the Input Handler from running.

func (*InputHandler) StopDrag

func (self *InputHandler) StopDrag(pointer *Pointer)

StopDrag Called by Pointer when drag is stopped on this Sprite. Should not usually be called directly.

func (*InputHandler) StopDragI

func (self *InputHandler) StopDragI(args ...interface{})

StopDragI Called by Pointer when drag is stopped on this Sprite. Should not usually be called directly.

func (*InputHandler) StopI

func (self *InputHandler) StopI(args ...interface{})

StopI Stops the Input Handler from running.

func (*InputHandler) Update

func (self *InputHandler) Update(pointer *Pointer) bool

Update Internal Update method. This is called automatically and handles the Pointer and drag update loops.

func (*InputHandler) UpdateDrag

func (self *InputHandler) UpdateDrag(pointer *Pointer, fromStart bool) bool

UpdateDrag Called as a Pointer actively drags this Game Object.

func (*InputHandler) UpdateDragI

func (self *InputHandler) UpdateDragI(args ...interface{}) bool

UpdateDragI Called as a Pointer actively drags this Game Object.

func (*InputHandler) UpdateI

func (self *InputHandler) UpdateI(args ...interface{}) bool

UpdateI Internal Update method. This is called automatically and handles the Pointer and drag update loops.

func (*InputHandler) UseHandCursor

func (self *InputHandler) UseHandCursor() bool

UseHandCursor On a desktop browser you can set the 'hand' cursor to appear when moving over the Sprite.

func (*InputHandler) ValidForInput

func (self *InputHandler) ValidForInput(highestID int, highestRenderID int) bool

ValidForInput Checks if the object this InputHandler is bound to is valid for consideration in the Pointer move event. This is called by Phaser.Pointer and shouldn't typically be called directly.

func (*InputHandler) ValidForInput1O

func (self *InputHandler) ValidForInput1O(highestID int, highestRenderID int, includePixelPerfect bool) bool

ValidForInput1O Checks if the object this InputHandler is bound to is valid for consideration in the Pointer move event. This is called by Phaser.Pointer and shouldn't typically be called directly.

func (*InputHandler) ValidForInputI

func (self *InputHandler) ValidForInputI(args ...interface{}) bool

ValidForInputI Checks if the object this InputHandler is bound to is valid for consideration in the Pointer move event. This is called by Phaser.Pointer and shouldn't typically be called directly.

type Key

type Key struct {
	*js.Object
}

Key If you need more fine-grained control over the handling of specific keys you can create and use Phaser.Key objects.

func NewKey

func NewKey(game *Game, keycode int) *Key

NewKey If you need more fine-grained control over the handling of specific keys you can create and use Phaser.Key objects.

func NewKeyI

func NewKeyI(args ...interface{}) *Key

NewKeyI If you need more fine-grained control over the handling of specific keys you can create and use Phaser.Key objects.

func ToKey

func ToKey(jsStruct interface{}) *Key

Key Binding conversion method to Key point

func (*Key) AltKey

func (self *Key) AltKey() bool

AltKey The down state of the ALT key, if pressed at the same time as this key.

func (*Key) CtrlKey

func (self *Key) CtrlKey() bool

CtrlKey The down state of the CTRL key, if pressed at the same time as this key.

func (*Key) DownDuration

func (self *Key) DownDuration() bool

DownDuration Returns `true` if the Key was pressed down within the `duration` value given, or `false` if it either isn't down, or was pressed down longer ago than then given duration.

func (*Key) DownDuration1O

func (self *Key) DownDuration1O(duration int) bool

DownDuration1O Returns `true` if the Key was pressed down within the `duration` value given, or `false` if it either isn't down, or was pressed down longer ago than then given duration.

func (*Key) DownDurationI

func (self *Key) DownDurationI(args ...interface{}) bool

DownDurationI Returns `true` if the Key was pressed down within the `duration` value given, or `false` if it either isn't down, or was pressed down longer ago than then given duration.

func (*Key) Duration

func (self *Key) Duration() int

Duration If the key is down this value holds the duration of that key press and is constantly updated. If the key is up it holds the duration of the previous down session. The number of milliseconds this key has been held down for.

func (*Key) Event

func (self *Key) Event() interface{}

Event Stores the most recent DOM event.

func (*Key) Game

func (self *Key) Game() *Game

Game A reference to the currently running game.

func (*Key) IsDown

func (self *Key) IsDown() bool

IsDown The "down" state of the key. This will remain `true` for as long as the keyboard thinks this key is held down.

func (*Key) IsUp

func (self *Key) IsUp() bool

IsUp The "up" state of the key. This will remain `true` for as long as the keyboard thinks this key is up.

func (*Key) KeyCode

func (self *Key) KeyCode() int

KeyCode The keycode of this key.

func (*Key) OnDown

func (self *Key) OnDown() *Signal

OnDown This Signal is dispatched every time this Key is pressed down. It is only dispatched once (until the key is released again).

func (*Key) OnHoldCallback

func (self *Key) OnHoldCallback() interface{}

OnHoldCallback A callback that is called while this Key is held down. Warning: Depending on refresh rate that could be 60+ times per second.

func (*Key) OnHoldContext

func (self *Key) OnHoldContext() interface{}

OnHoldContext The context under which the onHoldCallback will be called.

func (*Key) OnUp

func (self *Key) OnUp() *Signal

OnUp This Signal is dispatched every time this Key is released. It is only dispatched once (until the key is pressed and released again).

func (*Key) ProcessKeyDown

func (self *Key) ProcessKeyDown(event *KeyboardEvent)

ProcessKeyDown Called automatically by Phaser.Keyboard.

func (*Key) ProcessKeyDownI

func (self *Key) ProcessKeyDownI(args ...interface{})

ProcessKeyDownI Called automatically by Phaser.Keyboard.

func (*Key) ProcessKeyUp

func (self *Key) ProcessKeyUp(event *KeyboardEvent)

ProcessKeyUp Called automatically by Phaser.Keyboard.

func (*Key) ProcessKeyUpI

func (self *Key) ProcessKeyUpI(args ...interface{})

ProcessKeyUpI Called automatically by Phaser.Keyboard.

func (*Key) Repeats

func (self *Key) Repeats() int

Repeats If a key is held down this holds down the number of times the key has 'repeated'.

func (*Key) Reset

func (self *Key) Reset()

Reset Resets the state of this Key.

This sets isDown to false, isUp to true, resets the time to be the current time, and _enables_ the key. In addition, if it is a "hard reset", it clears clears any callbacks associated with the onDown and onUp events and removes the onHoldCallback.

func (*Key) Reset1O

func (self *Key) Reset1O(hard bool)

Reset1O Resets the state of this Key.

This sets isDown to false, isUp to true, resets the time to be the current time, and _enables_ the key. In addition, if it is a "hard reset", it clears clears any callbacks associated with the onDown and onUp events and removes the onHoldCallback.

func (*Key) ResetI

func (self *Key) ResetI(args ...interface{})

ResetI Resets the state of this Key.

This sets isDown to false, isUp to true, resets the time to be the current time, and _enables_ the key. In addition, if it is a "hard reset", it clears clears any callbacks associated with the onDown and onUp events and removes the onHoldCallback.

func (*Key) SetAltKeyA

func (self *Key) SetAltKeyA(member bool)

SetAltKeyA The down state of the ALT key, if pressed at the same time as this key.

func (*Key) SetCtrlKeyA

func (self *Key) SetCtrlKeyA(member bool)

SetCtrlKeyA The down state of the CTRL key, if pressed at the same time as this key.

func (*Key) SetDurationA

func (self *Key) SetDurationA(member int)

SetDurationA If the key is down this value holds the duration of that key press and is constantly updated. If the key is up it holds the duration of the previous down session. The number of milliseconds this key has been held down for.

func (*Key) SetEventA

func (self *Key) SetEventA(member interface{})

SetEventA Stores the most recent DOM event.

func (*Key) SetGameA

func (self *Key) SetGameA(member *Game)

SetGameA A reference to the currently running game.

func (*Key) SetIsDownA

func (self *Key) SetIsDownA(member bool)

SetIsDownA The "down" state of the key. This will remain `true` for as long as the keyboard thinks this key is held down.

func (*Key) SetIsUpA

func (self *Key) SetIsUpA(member bool)

SetIsUpA The "up" state of the key. This will remain `true` for as long as the keyboard thinks this key is up.

func (*Key) SetKeyCodeA

func (self *Key) SetKeyCodeA(member int)

SetKeyCodeA The keycode of this key.

func (*Key) SetOnDownA

func (self *Key) SetOnDownA(member *Signal)

SetOnDownA This Signal is dispatched every time this Key is pressed down. It is only dispatched once (until the key is released again).

func (*Key) SetOnHoldCallbackA

func (self *Key) SetOnHoldCallbackA(member interface{})

SetOnHoldCallbackA A callback that is called while this Key is held down. Warning: Depending on refresh rate that could be 60+ times per second.

func (*Key) SetOnHoldContextA

func (self *Key) SetOnHoldContextA(member interface{})

SetOnHoldContextA The context under which the onHoldCallback will be called.

func (*Key) SetOnUpA

func (self *Key) SetOnUpA(member *Signal)

SetOnUpA This Signal is dispatched every time this Key is released. It is only dispatched once (until the key is pressed and released again).

func (*Key) SetRepeatsA

func (self *Key) SetRepeatsA(member int)

SetRepeatsA If a key is held down this holds down the number of times the key has 'repeated'.

func (*Key) SetShiftKeyA

func (self *Key) SetShiftKeyA(member bool)

SetShiftKeyA The down state of the SHIFT key, if pressed at the same time as this key.

func (*Key) SetTimeDownA

func (self *Key) SetTimeDownA(member int)

SetTimeDownA The timestamp when the key was last pressed down. This is based on Game.time.now.

func (*Key) SetTimeUpA

func (self *Key) SetTimeUpA(member int)

SetTimeUpA The timestamp when the key was last released. This is based on Game.time.now.

func (*Key) ShiftKey

func (self *Key) ShiftKey() bool

ShiftKey The down state of the SHIFT key, if pressed at the same time as this key.

func (*Key) TimeDown

func (self *Key) TimeDown() int

TimeDown The timestamp when the key was last pressed down. This is based on Game.time.now.

func (*Key) TimeUp

func (self *Key) TimeUp() int

TimeUp The timestamp when the key was last released. This is based on Game.time.now.

func (*Key) UpDuration

func (self *Key) UpDuration() bool

UpDuration Returns `true` if the Key was pressed down within the `duration` value given, or `false` if it either isn't down, or was pressed down longer ago than then given duration.

func (*Key) UpDuration1O

func (self *Key) UpDuration1O(duration int) bool

UpDuration1O Returns `true` if the Key was pressed down within the `duration` value given, or `false` if it either isn't down, or was pressed down longer ago than then given duration.

func (*Key) UpDurationI

func (self *Key) UpDurationI(args ...interface{}) bool

UpDurationI Returns `true` if the Key was pressed down within the `duration` value given, or `false` if it either isn't down, or was pressed down longer ago than then given duration.

func (*Key) Update

func (self *Key) Update()

Update Called automatically by Phaser.Keyboard.

func (*Key) UpdateI

func (self *Key) UpdateI(args ...interface{})

UpdateI Called automatically by Phaser.Keyboard.

type KeyCode

type KeyCode struct {
	*js.Object
}

KeyCode A key code represents a physical key on a keyboard.

The KeyCode class contains commonly supported keyboard key codes which can be used as keycode`-parameters in several {@link Phaser.Keyboard} and {@link Phaser.Key} methods.

_Note_: These values should only be used indirectly, eg. as `Phaser.KeyCode.KEY`. Future versions may replace the actual values, such that they remain compatible with `keycode`-parameters. The current implementation maps to the {@link https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/keyCode KeyboardEvent.keyCode} property.

_Note_: Use `Phaser.KeyCode.KEY` instead of `Phaser.Keyboard.KEY` to refer to a key code; the latter approach is supported for compatibility.

func NewKeyCode

func NewKeyCode() *KeyCode

NewKeyCode A key code represents a physical key on a keyboard.

The KeyCode class contains commonly supported keyboard key codes which can be used as keycode`-parameters in several {@link Phaser.Keyboard} and {@link Phaser.Key} methods.

_Note_: These values should only be used indirectly, eg. as `Phaser.KeyCode.KEY`. Future versions may replace the actual values, such that they remain compatible with `keycode`-parameters. The current implementation maps to the {@link https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/keyCode KeyboardEvent.keyCode} property.

_Note_: Use `Phaser.KeyCode.KEY` instead of `Phaser.Keyboard.KEY` to refer to a key code; the latter approach is supported for compatibility.

func NewKeyCodeI

func NewKeyCodeI(args ...interface{}) *KeyCode

NewKeyCodeI A key code represents a physical key on a keyboard.

The KeyCode class contains commonly supported keyboard key codes which can be used as keycode`-parameters in several {@link Phaser.Keyboard} and {@link Phaser.Key} methods.

_Note_: These values should only be used indirectly, eg. as `Phaser.KeyCode.KEY`. Future versions may replace the actual values, such that they remain compatible with `keycode`-parameters. The current implementation maps to the {@link https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/keyCode KeyboardEvent.keyCode} property.

_Note_: Use `Phaser.KeyCode.KEY` instead of `Phaser.Keyboard.KEY` to refer to a key code; the latter approach is supported for compatibility.

func ToKeyCode

func ToKeyCode(jsStruct interface{}) *KeyCode

KeyCode Binding conversion method to KeyCode point

func (*KeyCode) A

func (self *KeyCode) A() interface{}

A empty description

func (*KeyCode) ALT

func (self *KeyCode) ALT() interface{}

ALT empty description

func (*KeyCode) B

func (self *KeyCode) B() interface{}

B empty description

func (*KeyCode) BACKSPACE

func (self *KeyCode) BACKSPACE() interface{}

BACKSPACE empty description

func (*KeyCode) BACKWARD_SLASH

func (self *KeyCode) BACKWARD_SLASH() interface{}

BACKWARD_SLASH empty description

func (*KeyCode) C

func (self *KeyCode) C() interface{}

C empty description

func (*KeyCode) CAPS_LOCK

func (self *KeyCode) CAPS_LOCK() interface{}

CAPS_LOCK empty description

func (*KeyCode) CLEAR

func (self *KeyCode) CLEAR() interface{}

CLEAR empty description

func (*KeyCode) CLOSED_BRACKET

func (self *KeyCode) CLOSED_BRACKET() interface{}

CLOSED_BRACKET empty description

func (*KeyCode) COLON

func (self *KeyCode) COLON() interface{}

COLON empty description

func (*KeyCode) COMMA

func (self *KeyCode) COMMA() interface{}

COMMA empty description

func (*KeyCode) CONTROL

func (self *KeyCode) CONTROL() interface{}

CONTROL empty description

func (*KeyCode) D

func (self *KeyCode) D() interface{}

D empty description

func (*KeyCode) DELETE

func (self *KeyCode) DELETE() interface{}

DELETE empty description

func (*KeyCode) DOWN

func (self *KeyCode) DOWN() interface{}

DOWN empty description

func (*KeyCode) E

func (self *KeyCode) E() interface{}

E empty description

func (*KeyCode) EIGHT

func (self *KeyCode) EIGHT() interface{}

EIGHT empty description

func (*KeyCode) END

func (self *KeyCode) END() interface{}

END empty description

func (*KeyCode) ENTER

func (self *KeyCode) ENTER() interface{}

ENTER empty description

func (*KeyCode) EQUALS

func (self *KeyCode) EQUALS() interface{}

EQUALS empty description

func (*KeyCode) ESC

func (self *KeyCode) ESC() interface{}

ESC empty description

func (*KeyCode) F

func (self *KeyCode) F() interface{}

F empty description

func (*KeyCode) F1

func (self *KeyCode) F1() interface{}

F1 empty description

func (*KeyCode) F10

func (self *KeyCode) F10() interface{}

F10 empty description

func (*KeyCode) F11

func (self *KeyCode) F11() interface{}

F11 empty description

func (*KeyCode) F12

func (self *KeyCode) F12() interface{}

F12 empty description

func (*KeyCode) F13

func (self *KeyCode) F13() interface{}

F13 empty description

func (*KeyCode) F14

func (self *KeyCode) F14() interface{}

F14 empty description

func (*KeyCode) F15

func (self *KeyCode) F15() interface{}

F15 empty description

func (*KeyCode) F2

func (self *KeyCode) F2() interface{}

F2 empty description

func (*KeyCode) F3

func (self *KeyCode) F3() interface{}

F3 empty description

func (*KeyCode) F4

func (self *KeyCode) F4() interface{}

F4 empty description

func (*KeyCode) F5

func (self *KeyCode) F5() interface{}

F5 empty description

func (*KeyCode) F6

func (self *KeyCode) F6() interface{}

F6 empty description

func (*KeyCode) F7

func (self *KeyCode) F7() interface{}

F7 empty description

func (*KeyCode) F8

func (self *KeyCode) F8() interface{}

F8 empty description

func (*KeyCode) F9

func (self *KeyCode) F9() interface{}

F9 empty description

func (*KeyCode) FIVE

func (self *KeyCode) FIVE() interface{}

FIVE empty description

func (*KeyCode) FOUR

func (self *KeyCode) FOUR() interface{}

FOUR empty description

func (*KeyCode) G

func (self *KeyCode) G() interface{}

G empty description

func (*KeyCode) H

func (self *KeyCode) H() interface{}

H empty description

func (*KeyCode) HELP

func (self *KeyCode) HELP() interface{}

HELP empty description

func (*KeyCode) HOME

func (self *KeyCode) HOME() interface{}

HOME empty description

func (*KeyCode) I

func (self *KeyCode) I() interface{}

I empty description

func (*KeyCode) INSERT

func (self *KeyCode) INSERT() interface{}

INSERT empty description

func (*KeyCode) J

func (self *KeyCode) J() interface{}

J empty description

func (*KeyCode) K

func (self *KeyCode) K() interface{}

K empty description

func (*KeyCode) L

func (self *KeyCode) L() interface{}

L empty description

func (*KeyCode) LEFT

func (self *KeyCode) LEFT() interface{}

LEFT empty description

func (*KeyCode) M

func (self *KeyCode) M() interface{}

M empty description

func (*KeyCode) MINUS

func (self *KeyCode) MINUS() interface{}

MINUS empty description

func (*KeyCode) N

func (self *KeyCode) N() interface{}

N empty description

func (*KeyCode) NINE

func (self *KeyCode) NINE() interface{}

NINE empty description

func (*KeyCode) NUMPAD_0

func (self *KeyCode) NUMPAD_0() interface{}

NUMPAD_0 empty description

func (*KeyCode) NUMPAD_1

func (self *KeyCode) NUMPAD_1() interface{}

NUMPAD_1 empty description

func (*KeyCode) NUMPAD_2

func (self *KeyCode) NUMPAD_2() interface{}

NUMPAD_2 empty description

func (*KeyCode) NUMPAD_3

func (self *KeyCode) NUMPAD_3() interface{}

NUMPAD_3 empty description

func (*KeyCode) NUMPAD_4

func (self *KeyCode) NUMPAD_4() interface{}

NUMPAD_4 empty description

func (*KeyCode) NUMPAD_5

func (self *KeyCode) NUMPAD_5() interface{}

NUMPAD_5 empty description

func (*KeyCode) NUMPAD_6

func (self *KeyCode) NUMPAD_6() interface{}

NUMPAD_6 empty description

func (*KeyCode) NUMPAD_7

func (self *KeyCode) NUMPAD_7() interface{}

NUMPAD_7 empty description

func (*KeyCode) NUMPAD_8

func (self *KeyCode) NUMPAD_8() interface{}

NUMPAD_8 empty description

func (*KeyCode) NUMPAD_9

func (self *KeyCode) NUMPAD_9() interface{}

NUMPAD_9 empty description

func (*KeyCode) NUMPAD_ADD

func (self *KeyCode) NUMPAD_ADD() interface{}

NUMPAD_ADD empty description

func (*KeyCode) NUMPAD_DECIMAL

func (self *KeyCode) NUMPAD_DECIMAL() interface{}

NUMPAD_DECIMAL empty description

func (*KeyCode) NUMPAD_DIVIDE

func (self *KeyCode) NUMPAD_DIVIDE() interface{}

NUMPAD_DIVIDE empty description

func (*KeyCode) NUMPAD_ENTER

func (self *KeyCode) NUMPAD_ENTER() interface{}

NUMPAD_ENTER empty description

func (*KeyCode) NUMPAD_MULTIPLY

func (self *KeyCode) NUMPAD_MULTIPLY() interface{}

NUMPAD_MULTIPLY empty description

func (*KeyCode) NUMPAD_SUBTRACT

func (self *KeyCode) NUMPAD_SUBTRACT() interface{}

NUMPAD_SUBTRACT empty description

func (*KeyCode) NUM_LOCK

func (self *KeyCode) NUM_LOCK() interface{}

NUM_LOCK empty description

func (*KeyCode) O

func (self *KeyCode) O() interface{}

O empty description

func (*KeyCode) ONE

func (self *KeyCode) ONE() interface{}

ONE empty description

func (*KeyCode) OPEN_BRACKET

func (self *KeyCode) OPEN_BRACKET() interface{}

OPEN_BRACKET empty description

func (*KeyCode) P

func (self *KeyCode) P() interface{}

P empty description

func (*KeyCode) PAGE_DOWN

func (self *KeyCode) PAGE_DOWN() interface{}

PAGE_DOWN empty description

func (*KeyCode) PAGE_UP

func (self *KeyCode) PAGE_UP() interface{}

PAGE_UP empty description

func (*KeyCode) PERIOD

func (self *KeyCode) PERIOD() interface{}

PERIOD empty description

func (*KeyCode) PLUS

func (self *KeyCode) PLUS() interface{}

PLUS empty description

func (*KeyCode) Q

func (self *KeyCode) Q() interface{}

Q empty description

func (*KeyCode) QUESTION_MARK

func (self *KeyCode) QUESTION_MARK() interface{}

QUESTION_MARK empty description

func (*KeyCode) QUOTES

func (self *KeyCode) QUOTES() interface{}

QUOTES empty description

func (*KeyCode) R

func (self *KeyCode) R() interface{}

R empty description

func (*KeyCode) RIGHT

func (self *KeyCode) RIGHT() interface{}

RIGHT empty description

func (*KeyCode) S

func (self *KeyCode) S() interface{}

S empty description

func (*KeyCode) SEVEN

func (self *KeyCode) SEVEN() interface{}

SEVEN empty description

func (*KeyCode) SHIFT

func (self *KeyCode) SHIFT() interface{}

SHIFT empty description

func (*KeyCode) SIX

func (self *KeyCode) SIX() interface{}

SIX empty description

func (*KeyCode) SPACEBAR

func (self *KeyCode) SPACEBAR() interface{}

SPACEBAR empty description

func (*KeyCode) SetAA

func (self *KeyCode) SetAA(member interface{})

SetAA empty description

func (*KeyCode) SetALTA

func (self *KeyCode) SetALTA(member interface{})

SetALTA empty description

func (*KeyCode) SetBA

func (self *KeyCode) SetBA(member interface{})

SetBA empty description

func (*KeyCode) SetBACKSPACEA

func (self *KeyCode) SetBACKSPACEA(member interface{})

SetBACKSPACEA empty description

func (*KeyCode) SetBACKWARD_SLASHA

func (self *KeyCode) SetBACKWARD_SLASHA(member interface{})

SetBACKWARD_SLASHA empty description

func (*KeyCode) SetCA

func (self *KeyCode) SetCA(member interface{})

SetCA empty description

func (*KeyCode) SetCAPS_LOCKA

func (self *KeyCode) SetCAPS_LOCKA(member interface{})

SetCAPS_LOCKA empty description

func (*KeyCode) SetCLEARA

func (self *KeyCode) SetCLEARA(member interface{})

SetCLEARA empty description

func (*KeyCode) SetCLOSED_BRACKETA

func (self *KeyCode) SetCLOSED_BRACKETA(member interface{})

SetCLOSED_BRACKETA empty description

func (*KeyCode) SetCOLONA

func (self *KeyCode) SetCOLONA(member interface{})

SetCOLONA empty description

func (*KeyCode) SetCOMMAA

func (self *KeyCode) SetCOMMAA(member interface{})

SetCOMMAA empty description

func (*KeyCode) SetCONTROLA

func (self *KeyCode) SetCONTROLA(member interface{})

SetCONTROLA empty description

func (*KeyCode) SetDA

func (self *KeyCode) SetDA(member interface{})

SetDA empty description

func (*KeyCode) SetDELETEA

func (self *KeyCode) SetDELETEA(member interface{})

SetDELETEA empty description

func (*KeyCode) SetDOWNA

func (self *KeyCode) SetDOWNA(member interface{})

SetDOWNA empty description

func (*KeyCode) SetEA

func (self *KeyCode) SetEA(member interface{})

SetEA empty description

func (*KeyCode) SetEIGHTA

func (self *KeyCode) SetEIGHTA(member interface{})

SetEIGHTA empty description

func (*KeyCode) SetENDA

func (self *KeyCode) SetENDA(member interface{})

SetENDA empty description

func (*KeyCode) SetENTERA

func (self *KeyCode) SetENTERA(member interface{})

SetENTERA empty description

func (*KeyCode) SetEQUALSA

func (self *KeyCode) SetEQUALSA(member interface{})

SetEQUALSA empty description

func (*KeyCode) SetESCA

func (self *KeyCode) SetESCA(member interface{})

SetESCA empty description

func (*KeyCode) SetF10A

func (self *KeyCode) SetF10A(member interface{})

SetF10A empty description

func (*KeyCode) SetF11A

func (self *KeyCode) SetF11A(member interface{})

SetF11A empty description

func (*KeyCode) SetF12A

func (self *KeyCode) SetF12A(member interface{})

SetF12A empty description

func (*KeyCode) SetF13A

func (self *KeyCode) SetF13A(member interface{})

SetF13A empty description

func (*KeyCode) SetF14A

func (self *KeyCode) SetF14A(member interface{})

SetF14A empty description

func (*KeyCode) SetF15A

func (self *KeyCode) SetF15A(member interface{})

SetF15A empty description

func (*KeyCode) SetF1A

func (self *KeyCode) SetF1A(member interface{})

SetF1A empty description

func (*KeyCode) SetF2A

func (self *KeyCode) SetF2A(member interface{})

SetF2A empty description

func (*KeyCode) SetF3A

func (self *KeyCode) SetF3A(member interface{})

SetF3A empty description

func (*KeyCode) SetF4A

func (self *KeyCode) SetF4A(member interface{})

SetF4A empty description

func (*KeyCode) SetF5A

func (self *KeyCode) SetF5A(member interface{})

SetF5A empty description

func (*KeyCode) SetF6A

func (self *KeyCode) SetF6A(member interface{})

SetF6A empty description

func (*KeyCode) SetF7A

func (self *KeyCode) SetF7A(member interface{})

SetF7A empty description

func (*KeyCode) SetF8A

func (self *KeyCode) SetF8A(member interface{})

SetF8A empty description

func (*KeyCode) SetF9A

func (self *KeyCode) SetF9A(member interface{})

SetF9A empty description

func (*KeyCode) SetFA

func (self *KeyCode) SetFA(member interface{})

SetFA empty description

func (*KeyCode) SetFIVEA

func (self *KeyCode) SetFIVEA(member interface{})

SetFIVEA empty description

func (*KeyCode) SetFOURA

func (self *KeyCode) SetFOURA(member interface{})

SetFOURA empty description

func (*KeyCode) SetGA

func (self *KeyCode) SetGA(member interface{})

SetGA empty description

func (*KeyCode) SetHA

func (self *KeyCode) SetHA(member interface{})

SetHA empty description

func (*KeyCode) SetHELPA

func (self *KeyCode) SetHELPA(member interface{})

SetHELPA empty description

func (*KeyCode) SetHOMEA

func (self *KeyCode) SetHOMEA(member interface{})

SetHOMEA empty description

func (*KeyCode) SetIA

func (self *KeyCode) SetIA(member interface{})

SetIA empty description

func (*KeyCode) SetINSERTA

func (self *KeyCode) SetINSERTA(member interface{})

SetINSERTA empty description

func (*KeyCode) SetJA

func (self *KeyCode) SetJA(member interface{})

SetJA empty description

func (*KeyCode) SetKA

func (self *KeyCode) SetKA(member interface{})

SetKA empty description

func (*KeyCode) SetLA

func (self *KeyCode) SetLA(member interface{})

SetLA empty description

func (*KeyCode) SetLEFTA

func (self *KeyCode) SetLEFTA(member interface{})

SetLEFTA empty description

func (*KeyCode) SetMA

func (self *KeyCode) SetMA(member interface{})

SetMA empty description

func (*KeyCode) SetMINUSA

func (self *KeyCode) SetMINUSA(member interface{})

SetMINUSA empty description

func (*KeyCode) SetNA

func (self *KeyCode) SetNA(member interface{})

SetNA empty description

func (*KeyCode) SetNINEA

func (self *KeyCode) SetNINEA(member interface{})

SetNINEA empty description

func (*KeyCode) SetNUMPAD_0A

func (self *KeyCode) SetNUMPAD_0A(member interface{})

SetNUMPAD_0A empty description

func (*KeyCode) SetNUMPAD_1A

func (self *KeyCode) SetNUMPAD_1A(member interface{})

SetNUMPAD_1A empty description

func (*KeyCode) SetNUMPAD_2A

func (self *KeyCode) SetNUMPAD_2A(member interface{})

SetNUMPAD_2A empty description

func (*KeyCode) SetNUMPAD_3A

func (self *KeyCode) SetNUMPAD_3A(member interface{})

SetNUMPAD_3A empty description

func (*KeyCode) SetNUMPAD_4A

func (self *KeyCode) SetNUMPAD_4A(member interface{})

SetNUMPAD_4A empty description

func (*KeyCode) SetNUMPAD_5A

func (self *KeyCode) SetNUMPAD_5A(member interface{})

SetNUMPAD_5A empty description

func (*KeyCode) SetNUMPAD_6A

func (self *KeyCode) SetNUMPAD_6A(member interface{})

SetNUMPAD_6A empty description

func (*KeyCode) SetNUMPAD_7A

func (self *KeyCode) SetNUMPAD_7A(member interface{})

SetNUMPAD_7A empty description

func (*KeyCode) SetNUMPAD_8A

func (self *KeyCode) SetNUMPAD_8A(member interface{})

SetNUMPAD_8A empty description

func (*KeyCode) SetNUMPAD_9A

func (self *KeyCode) SetNUMPAD_9A(member interface{})

SetNUMPAD_9A empty description

func (*KeyCode) SetNUMPAD_ADDA

func (self *KeyCode) SetNUMPAD_ADDA(member interface{})

SetNUMPAD_ADDA empty description

func (*KeyCode) SetNUMPAD_DECIMALA

func (self *KeyCode) SetNUMPAD_DECIMALA(member interface{})

SetNUMPAD_DECIMALA empty description

func (*KeyCode) SetNUMPAD_DIVIDEA

func (self *KeyCode) SetNUMPAD_DIVIDEA(member interface{})

SetNUMPAD_DIVIDEA empty description

func (*KeyCode) SetNUMPAD_ENTERA

func (self *KeyCode) SetNUMPAD_ENTERA(member interface{})

SetNUMPAD_ENTERA empty description

func (*KeyCode) SetNUMPAD_MULTIPLYA

func (self *KeyCode) SetNUMPAD_MULTIPLYA(member interface{})

SetNUMPAD_MULTIPLYA empty description

func (*KeyCode) SetNUMPAD_SUBTRACTA

func (self *KeyCode) SetNUMPAD_SUBTRACTA(member interface{})

SetNUMPAD_SUBTRACTA empty description

func (*KeyCode) SetNUM_LOCKA

func (self *KeyCode) SetNUM_LOCKA(member interface{})

SetNUM_LOCKA empty description

func (*KeyCode) SetOA

func (self *KeyCode) SetOA(member interface{})

SetOA empty description

func (*KeyCode) SetONEA

func (self *KeyCode) SetONEA(member interface{})

SetONEA empty description

func (*KeyCode) SetOPEN_BRACKETA

func (self *KeyCode) SetOPEN_BRACKETA(member interface{})

SetOPEN_BRACKETA empty description

func (*KeyCode) SetPA

func (self *KeyCode) SetPA(member interface{})

SetPA empty description

func (*KeyCode) SetPAGE_DOWNA

func (self *KeyCode) SetPAGE_DOWNA(member interface{})

SetPAGE_DOWNA empty description

func (*KeyCode) SetPAGE_UPA

func (self *KeyCode) SetPAGE_UPA(member interface{})

SetPAGE_UPA empty description

func (*KeyCode) SetPERIODA

func (self *KeyCode) SetPERIODA(member interface{})

SetPERIODA empty description

func (*KeyCode) SetPLUSA

func (self *KeyCode) SetPLUSA(member interface{})

SetPLUSA empty description

func (*KeyCode) SetQA

func (self *KeyCode) SetQA(member interface{})

SetQA empty description

func (*KeyCode) SetQUESTION_MARKA

func (self *KeyCode) SetQUESTION_MARKA(member interface{})

SetQUESTION_MARKA empty description

func (*KeyCode) SetQUOTESA

func (self *KeyCode) SetQUOTESA(member interface{})

SetQUOTESA empty description

func (*KeyCode) SetRA

func (self *KeyCode) SetRA(member interface{})

SetRA empty description

func (*KeyCode) SetRIGHTA

func (self *KeyCode) SetRIGHTA(member interface{})

SetRIGHTA empty description

func (*KeyCode) SetSA

func (self *KeyCode) SetSA(member interface{})

SetSA empty description

func (*KeyCode) SetSEVENA

func (self *KeyCode) SetSEVENA(member interface{})

SetSEVENA empty description

func (*KeyCode) SetSHIFTA

func (self *KeyCode) SetSHIFTA(member interface{})

SetSHIFTA empty description

func (*KeyCode) SetSIXA

func (self *KeyCode) SetSIXA(member interface{})

SetSIXA empty description

func (*KeyCode) SetSPACEBARA

func (self *KeyCode) SetSPACEBARA(member interface{})

SetSPACEBARA empty description

func (*KeyCode) SetTA

func (self *KeyCode) SetTA(member interface{})

SetTA empty description

func (*KeyCode) SetTABA

func (self *KeyCode) SetTABA(member interface{})

SetTABA empty description

func (*KeyCode) SetTHREEA

func (self *KeyCode) SetTHREEA(member interface{})

SetTHREEA empty description

func (*KeyCode) SetTILDEA

func (self *KeyCode) SetTILDEA(member interface{})

SetTILDEA empty description

func (*KeyCode) SetTWOA

func (self *KeyCode) SetTWOA(member interface{})

SetTWOA empty description

func (*KeyCode) SetUA

func (self *KeyCode) SetUA(member interface{})

SetUA empty description

func (*KeyCode) SetUNDERSCOREA

func (self *KeyCode) SetUNDERSCOREA(member interface{})

SetUNDERSCOREA empty description

func (*KeyCode) SetUPA

func (self *KeyCode) SetUPA(member interface{})

SetUPA empty description

func (*KeyCode) SetVA

func (self *KeyCode) SetVA(member interface{})

SetVA empty description

func (*KeyCode) SetWA

func (self *KeyCode) SetWA(member interface{})

SetWA empty description

func (*KeyCode) SetXA

func (self *KeyCode) SetXA(member interface{})

SetXA empty description

func (*KeyCode) SetYA

func (self *KeyCode) SetYA(member interface{})

SetYA empty description

func (*KeyCode) SetZA

func (self *KeyCode) SetZA(member interface{})

SetZA empty description

func (*KeyCode) SetZEROA

func (self *KeyCode) SetZEROA(member interface{})

SetZEROA empty description

func (*KeyCode) T

func (self *KeyCode) T() interface{}

T empty description

func (*KeyCode) TAB

func (self *KeyCode) TAB() interface{}

TAB empty description

func (*KeyCode) THREE

func (self *KeyCode) THREE() interface{}

THREE empty description

func (*KeyCode) TILDE

func (self *KeyCode) TILDE() interface{}

TILDE empty description

func (*KeyCode) TWO

func (self *KeyCode) TWO() interface{}

TWO empty description

func (*KeyCode) U

func (self *KeyCode) U() interface{}

U empty description

func (*KeyCode) UNDERSCORE

func (self *KeyCode) UNDERSCORE() interface{}

UNDERSCORE empty description

func (*KeyCode) UP

func (self *KeyCode) UP() interface{}

UP empty description

func (*KeyCode) V

func (self *KeyCode) V() interface{}

V empty description

func (*KeyCode) W

func (self *KeyCode) W() interface{}

W empty description

func (*KeyCode) X

func (self *KeyCode) X() interface{}

X empty description

func (*KeyCode) Y

func (self *KeyCode) Y() interface{}

Y empty description

func (*KeyCode) Z

func (self *KeyCode) Z() interface{}

Z empty description

func (*KeyCode) ZERO

func (self *KeyCode) ZERO() interface{}

ZERO empty description

type Keyboard

type Keyboard struct {
	*js.Object
}

Keyboard The Keyboard class monitors keyboard input and dispatches keyboard events.

_Note_: many keyboards are unable to process certain combinations of keys due to hardware limitations known as ghosting. See http://www.html5gamedevs.com/topic/4876-impossible-to-use-more-than-2-keyboard-input-buttons-at-the-same-time/ for more details.

Also please be aware that certain browser extensions can disable or override Phaser keyboard handling. For example the Chrome extension vimium is known to disable Phaser from using the D key. And there are others. So please check your extensions before opening Phaser issues.

func NewKeyboard

func NewKeyboard(game *Game) *Keyboard

NewKeyboard The Keyboard class monitors keyboard input and dispatches keyboard events.

_Note_: many keyboards are unable to process certain combinations of keys due to hardware limitations known as ghosting. See http://www.html5gamedevs.com/topic/4876-impossible-to-use-more-than-2-keyboard-input-buttons-at-the-same-time/ for more details.

Also please be aware that certain browser extensions can disable or override Phaser keyboard handling. For example the Chrome extension vimium is known to disable Phaser from using the D key. And there are others. So please check your extensions before opening Phaser issues.

func NewKeyboardI

func NewKeyboardI(args ...interface{}) *Keyboard

NewKeyboardI The Keyboard class monitors keyboard input and dispatches keyboard events.

_Note_: many keyboards are unable to process certain combinations of keys due to hardware limitations known as ghosting. See http://www.html5gamedevs.com/topic/4876-impossible-to-use-more-than-2-keyboard-input-buttons-at-the-same-time/ for more details.

Also please be aware that certain browser extensions can disable or override Phaser keyboard handling. For example the Chrome extension vimium is known to disable Phaser from using the D key. And there are others. So please check your extensions before opening Phaser issues.

func ToKeyboard

func ToKeyboard(jsStruct interface{}) *Keyboard

Keyboard Binding conversion method to Keyboard point

func (*Keyboard) AddCallbacks

func (self *Keyboard) AddCallbacks(context interface{})

AddCallbacks Add callbacks to the Keyboard handler so that each time a key is pressed down or released the callbacks are activated.

func (*Keyboard) AddCallbacks1O

func (self *Keyboard) AddCallbacks1O(context interface{}, onDown interface{})

AddCallbacks1O Add callbacks to the Keyboard handler so that each time a key is pressed down or released the callbacks are activated.

func (*Keyboard) AddCallbacks2O

func (self *Keyboard) AddCallbacks2O(context interface{}, onDown interface{}, onUp interface{})

AddCallbacks2O Add callbacks to the Keyboard handler so that each time a key is pressed down or released the callbacks are activated.

func (*Keyboard) AddCallbacks3O

func (self *Keyboard) AddCallbacks3O(context interface{}, onDown interface{}, onUp interface{}, onPress interface{})

AddCallbacks3O Add callbacks to the Keyboard handler so that each time a key is pressed down or released the callbacks are activated.

func (*Keyboard) AddCallbacksI

func (self *Keyboard) AddCallbacksI(args ...interface{})

AddCallbacksI Add callbacks to the Keyboard handler so that each time a key is pressed down or released the callbacks are activated.

func (*Keyboard) AddKey

func (self *Keyboard) AddKey(keycode int) *Key

AddKey If you need more fine-grained control over a Key you can create a new Phaser.Key object via this method. The Key object can then be polled, have events attached to it, etc.

func (*Keyboard) AddKeyCapture

func (self *Keyboard) AddKeyCapture(keycode interface{})

AddKeyCapture By default when a key is pressed Phaser will not stop the event from propagating up to the browser. There are some keys this can be annoying for, like the arrow keys or space bar, which make the browser window scroll.

The `addKeyCapture` method enables consuming keyboard event for specific keys so it doesn't bubble up to the the browser and cause the default browser behavior.

Pass in either a single keycode or an array/hash of keycodes.

func (*Keyboard) AddKeyCaptureI

func (self *Keyboard) AddKeyCaptureI(args ...interface{})

AddKeyCaptureI By default when a key is pressed Phaser will not stop the event from propagating up to the browser. There are some keys this can be annoying for, like the arrow keys or space bar, which make the browser window scroll.

The `addKeyCapture` method enables consuming keyboard event for specific keys so it doesn't bubble up to the the browser and cause the default browser behavior.

Pass in either a single keycode or an array/hash of keycodes.

func (*Keyboard) AddKeyI

func (self *Keyboard) AddKeyI(args ...interface{}) *Key

AddKeyI If you need more fine-grained control over a Key you can create a new Phaser.Key object via this method. The Key object can then be polled, have events attached to it, etc.

func (*Keyboard) AddKeys

func (self *Keyboard) AddKeys(keys interface{}) interface{}

AddKeys A practical way to create an object containing user selected hotkeys.

For example,

addKeys( { 'up': Phaser.KeyCode.W, 'down': Phaser.KeyCode.S, 'left': Phaser.KeyCode.A, 'right': Phaser.KeyCode.D } );

would return an object containing properties (`up`, `down`, `left` and `right`) referring to {@link Phaser.Key} object.

func (*Keyboard) AddKeysI

func (self *Keyboard) AddKeysI(args ...interface{}) interface{}

AddKeysI A practical way to create an object containing user selected hotkeys.

For example,

addKeys( { 'up': Phaser.KeyCode.W, 'down': Phaser.KeyCode.S, 'left': Phaser.KeyCode.A, 'right': Phaser.KeyCode.D } );

would return an object containing properties (`up`, `down`, `left` and `right`) referring to {@link Phaser.Key} object.

func (*Keyboard) CallbackContext

func (self *Keyboard) CallbackContext() interface{}

CallbackContext The context under which the callbacks are run.

func (*Keyboard) ClearCaptures

func (self *Keyboard) ClearCaptures()

ClearCaptures Clear all set key captures.

func (*Keyboard) ClearCapturesI

func (self *Keyboard) ClearCapturesI(args ...interface{})

ClearCapturesI Clear all set key captures.

func (*Keyboard) CreateCursorKeys

func (self *Keyboard) CreateCursorKeys() interface{}

CreateCursorKeys Creates and returns an object containing 4 hotkeys for Up, Down, Left and Right.

func (*Keyboard) CreateCursorKeysI

func (self *Keyboard) CreateCursorKeysI(args ...interface{}) interface{}

CreateCursorKeysI Creates and returns an object containing 4 hotkeys for Up, Down, Left and Right.

func (*Keyboard) Destroy

func (self *Keyboard) Destroy()

Destroy Stops the Keyboard event listeners from running (keydown and keyup). They are removed from the window. Also clears all key captures and currently created Key objects.

func (*Keyboard) DestroyI

func (self *Keyboard) DestroyI(args ...interface{})

DestroyI Stops the Keyboard event listeners from running (keydown and keyup). They are removed from the window. Also clears all key captures and currently created Key objects.

func (*Keyboard) DownDuration

func (self *Keyboard) DownDuration(keycode int) bool

DownDuration Returns `true` if the Key was pressed down within the `duration` value given, or `false` if it either isn't down, or was pressed down longer ago than then given duration.

func (*Keyboard) DownDuration1O

func (self *Keyboard) DownDuration1O(keycode int, duration int) bool

DownDuration1O Returns `true` if the Key was pressed down within the `duration` value given, or `false` if it either isn't down, or was pressed down longer ago than then given duration.

func (*Keyboard) DownDurationI

func (self *Keyboard) DownDurationI(args ...interface{}) bool

DownDurationI Returns `true` if the Key was pressed down within the `duration` value given, or `false` if it either isn't down, or was pressed down longer ago than then given duration.

func (*Keyboard) Enabled

func (self *Keyboard) Enabled() bool

Enabled Keyboard input will only be processed if enabled.

func (*Keyboard) Event

func (self *Keyboard) Event() interface{}

Event The most recent DOM event from keydown or keyup. This is updated every time a new key is pressed or released.

func (*Keyboard) Game

func (self *Keyboard) Game() *Game

Game Local reference to game.

func (*Keyboard) IsDown

func (self *Keyboard) IsDown(keycode int) bool

IsDown Returns true of the key is currently pressed down. Note that it can only detect key presses on the web browser.

func (*Keyboard) IsDownI

func (self *Keyboard) IsDownI(args ...interface{}) bool

IsDownI Returns true of the key is currently pressed down. Note that it can only detect key presses on the web browser.

func (*Keyboard) LastChar

func (self *Keyboard) LastChar() string

LastChar Returns the string value of the most recently pressed key.

func (*Keyboard) LastKey

func (self *Keyboard) LastKey() *Key

LastKey Returns the most recently pressed Key. This is a Phaser.Key object and it changes every time a key is pressed.

func (*Keyboard) OnDownCallback

func (self *Keyboard) OnDownCallback() interface{}

OnDownCallback This callback is invoked every time a key is pressed down, including key repeats when a key is held down.

func (*Keyboard) OnPressCallback

func (self *Keyboard) OnPressCallback() interface{}

OnPressCallback This callback is invoked every time a DOM onkeypress event is raised, which is only for printable keys.

func (*Keyboard) OnUpCallback

func (self *Keyboard) OnUpCallback() interface{}

OnUpCallback This callback is invoked every time a key is released.

func (*Keyboard) PressEvent

func (self *Keyboard) PressEvent() interface{}

PressEvent The most recent DOM event from keypress.

func (*Keyboard) ProcessKeyDown

func (self *Keyboard) ProcessKeyDown(event *KeyboardEvent)

ProcessKeyDown Process the keydown event.

func (*Keyboard) ProcessKeyDownI

func (self *Keyboard) ProcessKeyDownI(args ...interface{})

ProcessKeyDownI Process the keydown event.

func (*Keyboard) ProcessKeyPress

func (self *Keyboard) ProcessKeyPress(event *KeyboardEvent)

ProcessKeyPress Process the keypress event.

func (*Keyboard) ProcessKeyPressI

func (self *Keyboard) ProcessKeyPressI(args ...interface{})

ProcessKeyPressI Process the keypress event.

func (*Keyboard) ProcessKeyUp

func (self *Keyboard) ProcessKeyUp(event *KeyboardEvent)

ProcessKeyUp Process the keyup event.

func (*Keyboard) ProcessKeyUpI

func (self *Keyboard) ProcessKeyUpI(args ...interface{})

ProcessKeyUpI Process the keyup event.

func (*Keyboard) RemoveKey

func (self *Keyboard) RemoveKey(keycode int)

RemoveKey Removes a Key object from the Keyboard manager.

func (*Keyboard) RemoveKeyCapture

func (self *Keyboard) RemoveKeyCapture(keycode int)

RemoveKeyCapture Removes an existing key capture.

func (*Keyboard) RemoveKeyCaptureI

func (self *Keyboard) RemoveKeyCaptureI(args ...interface{})

RemoveKeyCaptureI Removes an existing key capture.

func (*Keyboard) RemoveKeyI

func (self *Keyboard) RemoveKeyI(args ...interface{})

RemoveKeyI Removes a Key object from the Keyboard manager.

func (*Keyboard) Reset

func (self *Keyboard) Reset()

Reset Resets all Keys.

func (*Keyboard) Reset1O

func (self *Keyboard) Reset1O(hard bool)

Reset1O Resets all Keys.

func (*Keyboard) ResetI

func (self *Keyboard) ResetI(args ...interface{})

ResetI Resets all Keys.

func (*Keyboard) SetCallbackContextA

func (self *Keyboard) SetCallbackContextA(member interface{})

SetCallbackContextA The context under which the callbacks are run.

func (*Keyboard) SetEnabledA

func (self *Keyboard) SetEnabledA(member bool)

SetEnabledA Keyboard input will only be processed if enabled.

func (*Keyboard) SetEventA

func (self *Keyboard) SetEventA(member interface{})

SetEventA The most recent DOM event from keydown or keyup. This is updated every time a new key is pressed or released.

func (*Keyboard) SetGameA

func (self *Keyboard) SetGameA(member *Game)

SetGameA Local reference to game.

func (*Keyboard) SetLastCharA

func (self *Keyboard) SetLastCharA(member string)

SetLastCharA Returns the string value of the most recently pressed key.

func (*Keyboard) SetLastKeyA

func (self *Keyboard) SetLastKeyA(member *Key)

SetLastKeyA Returns the most recently pressed Key. This is a Phaser.Key object and it changes every time a key is pressed.

func (*Keyboard) SetOnDownCallbackA

func (self *Keyboard) SetOnDownCallbackA(member interface{})

SetOnDownCallbackA This callback is invoked every time a key is pressed down, including key repeats when a key is held down.

func (*Keyboard) SetOnPressCallbackA

func (self *Keyboard) SetOnPressCallbackA(member interface{})

SetOnPressCallbackA This callback is invoked every time a DOM onkeypress event is raised, which is only for printable keys.

func (*Keyboard) SetOnUpCallbackA

func (self *Keyboard) SetOnUpCallbackA(member interface{})

SetOnUpCallbackA This callback is invoked every time a key is released.

func (*Keyboard) SetPressEventA

func (self *Keyboard) SetPressEventA(member interface{})

SetPressEventA The most recent DOM event from keypress.

func (*Keyboard) Start

func (self *Keyboard) Start()

Start Starts the Keyboard event listeners running (keydown and keyup). They are attached to the window. This is called automatically by Phaser.Input and should not normally be invoked directly.

func (*Keyboard) StartI

func (self *Keyboard) StartI(args ...interface{})

StartI Starts the Keyboard event listeners running (keydown and keyup). They are attached to the window. This is called automatically by Phaser.Input and should not normally be invoked directly.

func (*Keyboard) Stop

func (self *Keyboard) Stop()

Stop Stops the Keyboard event listeners from running (keydown, keyup and keypress). They are removed from the window.

func (*Keyboard) StopI

func (self *Keyboard) StopI(args ...interface{})

StopI Stops the Keyboard event listeners from running (keydown, keyup and keypress). They are removed from the window.

func (*Keyboard) UpDuration

func (self *Keyboard) UpDuration(keycode interface{}) bool

UpDuration Returns `true` if the Key was pressed down within the `duration` value given, or `false` if it either isn't down, or was pressed down longer ago than then given duration.

func (*Keyboard) UpDuration1O

func (self *Keyboard) UpDuration1O(keycode interface{}, duration int) bool

UpDuration1O Returns `true` if the Key was pressed down within the `duration` value given, or `false` if it either isn't down, or was pressed down longer ago than then given duration.

func (*Keyboard) UpDurationI

func (self *Keyboard) UpDurationI(args ...interface{}) bool

UpDurationI Returns `true` if the Key was pressed down within the `duration` value given, or `false` if it either isn't down, or was pressed down longer ago than then given duration.

func (*Keyboard) Update

func (self *Keyboard) Update()

Update Updates all currently defined keys.

func (*Keyboard) UpdateI

func (self *Keyboard) UpdateI(args ...interface{})

UpdateI Updates all currently defined keys.

type KeyboardEvent

type KeyboardEvent struct{ *js.Object }

type Line

type Line struct {
	*js.Object
}

Line Creates a new Line object with a start and an end point.

func NewLine

func NewLine() *Line

NewLine Creates a new Line object with a start and an end point.

func NewLine1O

func NewLine1O(x1 int) *Line

NewLine1O Creates a new Line object with a start and an end point.

func NewLine2O

func NewLine2O(x1 int, y1 int) *Line

NewLine2O Creates a new Line object with a start and an end point.

func NewLine3O

func NewLine3O(x1 int, y1 int, x2 int) *Line

NewLine3O Creates a new Line object with a start and an end point.

func NewLine4O

func NewLine4O(x1 int, y1 int, x2 int, y2 int) *Line

NewLine4O Creates a new Line object with a start and an end point.

func NewLineI

func NewLineI(args ...interface{}) *Line

NewLineI Creates a new Line object with a start and an end point.

func ToLine

func ToLine(jsStruct interface{}) *Line

Line Binding conversion method to Line point

func (*Line) Angle

func (self *Line) Angle() int

Angle Gets the angle of the line in radians.

func (*Line) Bottom

func (self *Line) Bottom() int

Bottom Gets the bottom-most point of this line.

func (*Line) CenterOn

func (self *Line) CenterOn(x int, y int) *Line

CenterOn Centers this Line on the given coordinates.

The line is centered by positioning the start and end points so that the lines midpoint matches the coordinates given.

func (*Line) CenterOnI

func (self *Line) CenterOnI(args ...interface{}) *Line

CenterOnI Centers this Line on the given coordinates.

The line is centered by positioning the start and end points so that the lines midpoint matches the coordinates given.

func (*Line) Clone

func (self *Line) Clone(output *Line) *Line

Clone Returns a new Line object with the same values for the start and end properties as this Line object.

func (*Line) CloneI

func (self *Line) CloneI(args ...interface{}) *Line

CloneI Returns a new Line object with the same values for the start and end properties as this Line object.

func (*Line) CoordinatesOnLine

func (self *Line) CoordinatesOnLine() []interface{}

CoordinatesOnLine Using Bresenham's line algorithm this will return an array of all coordinates on this line. The start and end points are rounded before this runs as the algorithm works on integers.

func (*Line) CoordinatesOnLine1O

func (self *Line) CoordinatesOnLine1O(stepRate int) []interface{}

CoordinatesOnLine1O Using Bresenham's line algorithm this will return an array of all coordinates on this line. The start and end points are rounded before this runs as the algorithm works on integers.

func (*Line) CoordinatesOnLine2O

func (self *Line) CoordinatesOnLine2O(stepRate int, results []interface{}) []interface{}

CoordinatesOnLine2O Using Bresenham's line algorithm this will return an array of all coordinates on this line. The start and end points are rounded before this runs as the algorithm works on integers.

func (*Line) CoordinatesOnLineI

func (self *Line) CoordinatesOnLineI(args ...interface{}) []interface{}

CoordinatesOnLineI Using Bresenham's line algorithm this will return an array of all coordinates on this line. The start and end points are rounded before this runs as the algorithm works on integers.

func (*Line) End

func (self *Line) End() *Point

End The end point of the line.

func (*Line) FromAngle

func (self *Line) FromAngle(x int, y int, angle int, length int) *Line

FromAngle Sets this line to start at the given `x` and `y` coordinates and for the segment to extend at `angle` for the given `length`.

func (*Line) FromAngleI

func (self *Line) FromAngleI(args ...interface{}) *Line

FromAngleI Sets this line to start at the given `x` and `y` coordinates and for the segment to extend at `angle` for the given `length`.

func (*Line) FromSprite

func (self *Line) FromSprite(startSprite *Sprite, endSprite *Sprite) *Line

FromSprite Sets the line to match the x/y coordinates of the two given sprites. Can optionally be calculated from their center coordinates.

func (*Line) FromSprite1O

func (self *Line) FromSprite1O(startSprite *Sprite, endSprite *Sprite, useCenter bool) *Line

FromSprite1O Sets the line to match the x/y coordinates of the two given sprites. Can optionally be calculated from their center coordinates.

func (*Line) FromSpriteI

func (self *Line) FromSpriteI(args ...interface{}) *Line

FromSpriteI Sets the line to match the x/y coordinates of the two given sprites. Can optionally be calculated from their center coordinates.

func (*Line) Height

func (self *Line) Height() int

Height Gets the height of this bounds of this line.

func (*Line) Intersects

func (self *Line) Intersects(line *Line) *Point

Intersects Checks for intersection between this line and another Line. If asSegment is true it will check for segment intersection. If asSegment is false it will check for line intersection. Returns the intersection segment of AB and EF as a Point, or null if there is no intersection.

func (*Line) Intersects1O

func (self *Line) Intersects1O(line *Line, asSegment bool) *Point

Intersects1O Checks for intersection between this line and another Line. If asSegment is true it will check for segment intersection. If asSegment is false it will check for line intersection. Returns the intersection segment of AB and EF as a Point, or null if there is no intersection.

func (*Line) Intersects2O

func (self *Line) Intersects2O(line *Line, asSegment bool, result *Point) *Point

Intersects2O Checks for intersection between this line and another Line. If asSegment is true it will check for segment intersection. If asSegment is false it will check for line intersection. Returns the intersection segment of AB and EF as a Point, or null if there is no intersection.

func (*Line) IntersectsI

func (self *Line) IntersectsI(args ...interface{}) *Point

IntersectsI Checks for intersection between this line and another Line. If asSegment is true it will check for segment intersection. If asSegment is false it will check for line intersection. Returns the intersection segment of AB and EF as a Point, or null if there is no intersection.

func (*Line) IntersectsPoints

func (self *Line) IntersectsPoints(a *Point, b *Point, e *Point, f *Point) *Point

IntersectsPoints Checks for intersection between two lines as defined by the given start and end points. If asSegment is true it will check for line segment intersection. If asSegment is false it will check for line intersection. Returns the intersection segment of AB and EF as a Point, or null if there is no intersection. Adapted from code by Keith Hair

func (*Line) IntersectsPoints1O

func (self *Line) IntersectsPoints1O(a *Point, b *Point, e *Point, f *Point, asSegment bool) *Point

IntersectsPoints1O Checks for intersection between two lines as defined by the given start and end points. If asSegment is true it will check for line segment intersection. If asSegment is false it will check for line intersection. Returns the intersection segment of AB and EF as a Point, or null if there is no intersection. Adapted from code by Keith Hair

func (*Line) IntersectsPoints2O

func (self *Line) IntersectsPoints2O(a *Point, b *Point, e *Point, f *Point, asSegment bool, result interface{}) *Point

IntersectsPoints2O Checks for intersection between two lines as defined by the given start and end points. If asSegment is true it will check for line segment intersection. If asSegment is false it will check for line intersection. Returns the intersection segment of AB and EF as a Point, or null if there is no intersection. Adapted from code by Keith Hair

func (*Line) IntersectsPointsI

func (self *Line) IntersectsPointsI(args ...interface{}) *Point

IntersectsPointsI Checks for intersection between two lines as defined by the given start and end points. If asSegment is true it will check for line segment intersection. If asSegment is false it will check for line intersection. Returns the intersection segment of AB and EF as a Point, or null if there is no intersection. Adapted from code by Keith Hair

func (*Line) IntersectsRectangle

func (self *Line) IntersectsRectangle(line *Line, rect interface{}) bool

IntersectsRectangle Checks for intersection between the Line and a Rectangle shape, or a rectangle-like object, with public `x`, `y`, `right` and `bottom` properties, such as a Sprite or Body.

An intersection is considered valid if:

The line starts within, or ends within, the Rectangle. The line segment intersects one of the 4 rectangle edges.

The for the purposes of this function rectangles are considered 'solid'.

func (*Line) IntersectsRectangleI

func (self *Line) IntersectsRectangleI(args ...interface{}) bool

IntersectsRectangleI Checks for intersection between the Line and a Rectangle shape, or a rectangle-like object, with public `x`, `y`, `right` and `bottom` properties, such as a Sprite or Body.

An intersection is considered valid if:

The line starts within, or ends within, the Rectangle. The line segment intersects one of the 4 rectangle edges.

The for the purposes of this function rectangles are considered 'solid'.

func (*Line) Left

func (self *Line) Left() int

Left Gets the left-most point of this line.

func (*Line) Length

func (self *Line) Length() int

Length Gets the length of the line segment.

func (*Line) MidPoint

func (self *Line) MidPoint() *Point

MidPoint Returns a Point object where the x and y values correspond to the center (or midpoint) of the Line segment.

func (*Line) MidPoint1O

func (self *Line) MidPoint1O(out *Point) *Point

MidPoint1O Returns a Point object where the x and y values correspond to the center (or midpoint) of the Line segment.

func (*Line) MidPointI

func (self *Line) MidPointI(args ...interface{}) *Point

MidPointI Returns a Point object where the x and y values correspond to the center (or midpoint) of the Line segment.

func (*Line) NormalAngle

func (self *Line) NormalAngle() int

NormalAngle Gets the angle in radians of the normal of this line (line.angle - 90 degrees.)

func (*Line) NormalX

func (self *Line) NormalX() int

NormalX Gets the x component of the left-hand normal of this line.

func (*Line) NormalY

func (self *Line) NormalY() int

NormalY Gets the y component of the left-hand normal of this line.

func (*Line) PerpSlope

func (self *Line) PerpSlope() int

PerpSlope Gets the perpendicular slope of the line (x/y).

func (*Line) PointOnLine

func (self *Line) PointOnLine(x int, y int) bool

PointOnLine Tests if the given coordinates fall on this line. See pointOnSegment to test against just the line segment.

func (*Line) PointOnLineI

func (self *Line) PointOnLineI(args ...interface{}) bool

PointOnLineI Tests if the given coordinates fall on this line. See pointOnSegment to test against just the line segment.

func (*Line) PointOnSegment

func (self *Line) PointOnSegment(x int, y int) bool

PointOnSegment Tests if the given coordinates fall on this line and within the segment. See pointOnLine to test against just the line.

func (*Line) PointOnSegmentI

func (self *Line) PointOnSegmentI(args ...interface{}) bool

PointOnSegmentI Tests if the given coordinates fall on this line and within the segment. See pointOnLine to test against just the line.

func (*Line) Random

func (self *Line) Random() *Point

Random Picks a random point from anywhere on the Line segment and returns it.

func (*Line) Random1O

func (self *Line) Random1O(out interface{}) *Point

Random1O Picks a random point from anywhere on the Line segment and returns it.

func (*Line) RandomI

func (self *Line) RandomI(args ...interface{}) *Point

RandomI Picks a random point from anywhere on the Line segment and returns it.

func (*Line) Reflect

func (self *Line) Reflect(line *Line) int

Reflect Returns the reflected angle between two lines. This is the outgoing angle based on the angle of this line and the normalAngle of the given line.

func (*Line) ReflectI

func (self *Line) ReflectI(args ...interface{}) int

ReflectI Returns the reflected angle between two lines. This is the outgoing angle based on the angle of this line and the normalAngle of the given line.

func (*Line) Right

func (self *Line) Right() int

Right Gets the right-most point of this line.

func (*Line) Rotate

func (self *Line) Rotate(angle int) *Line

Rotate Rotates the line by the amount specified in `angle`.

Rotation takes place from the center of the line. If you wish to rotate around a different point see Line.rotateAround.

If you wish to rotate the ends of the Line then see Line.start.rotate or Line.end.rotate.

func (*Line) Rotate1O

func (self *Line) Rotate1O(angle int, asDegrees bool) *Line

Rotate1O Rotates the line by the amount specified in `angle`.

Rotation takes place from the center of the line. If you wish to rotate around a different point see Line.rotateAround.

If you wish to rotate the ends of the Line then see Line.start.rotate or Line.end.rotate.

func (*Line) RotateAround

func (self *Line) RotateAround(x int, y int, angle int) *Line

RotateAround Rotates the line by the amount specified in `angle`.

Rotation takes place around the coordinates given.

func (*Line) RotateAround1O

func (self *Line) RotateAround1O(x int, y int, angle int, asDegrees bool) *Line

RotateAround1O Rotates the line by the amount specified in `angle`.

Rotation takes place around the coordinates given.

func (*Line) RotateAroundI

func (self *Line) RotateAroundI(args ...interface{}) *Line

RotateAroundI Rotates the line by the amount specified in `angle`.

Rotation takes place around the coordinates given.

func (*Line) RotateI

func (self *Line) RotateI(args ...interface{}) *Line

RotateI Rotates the line by the amount specified in `angle`.

Rotation takes place from the center of the line. If you wish to rotate around a different point see Line.rotateAround.

If you wish to rotate the ends of the Line then see Line.start.rotate or Line.end.rotate.

func (*Line) SetAngleA

func (self *Line) SetAngleA(member int)

SetAngleA Gets the angle of the line in radians.

func (*Line) SetBottomA

func (self *Line) SetBottomA(member int)

SetBottomA Gets the bottom-most point of this line.

func (*Line) SetEndA

func (self *Line) SetEndA(member *Point)

SetEndA The end point of the line.

func (*Line) SetHeightA

func (self *Line) SetHeightA(member int)

SetHeightA Gets the height of this bounds of this line.

func (*Line) SetLeftA

func (self *Line) SetLeftA(member int)

SetLeftA Gets the left-most point of this line.

func (*Line) SetLengthA

func (self *Line) SetLengthA(member int)

SetLengthA Gets the length of the line segment.

func (*Line) SetNormalAngleA

func (self *Line) SetNormalAngleA(member int)

SetNormalAngleA Gets the angle in radians of the normal of this line (line.angle - 90 degrees.)

func (*Line) SetNormalXA

func (self *Line) SetNormalXA(member int)

SetNormalXA Gets the x component of the left-hand normal of this line.

func (*Line) SetNormalYA

func (self *Line) SetNormalYA(member int)

SetNormalYA Gets the y component of the left-hand normal of this line.

func (*Line) SetPerpSlopeA

func (self *Line) SetPerpSlopeA(member int)

SetPerpSlopeA Gets the perpendicular slope of the line (x/y).

func (*Line) SetRightA

func (self *Line) SetRightA(member int)

SetRightA Gets the right-most point of this line.

func (*Line) SetSlopeA

func (self *Line) SetSlopeA(member int)

SetSlopeA Gets the slope of the line (y/x).

func (*Line) SetStartA

func (self *Line) SetStartA(member *Point)

SetStartA The start point of the line.

func (*Line) SetTo

func (self *Line) SetTo() *Line

SetTo Sets the components of the Line to the specified values.

func (*Line) SetTo1O

func (self *Line) SetTo1O(x1 int) *Line

SetTo1O Sets the components of the Line to the specified values.

func (*Line) SetTo2O

func (self *Line) SetTo2O(x1 int, y1 int) *Line

SetTo2O Sets the components of the Line to the specified values.

func (*Line) SetTo3O

func (self *Line) SetTo3O(x1 int, y1 int, x2 int) *Line

SetTo3O Sets the components of the Line to the specified values.

func (*Line) SetTo4O

func (self *Line) SetTo4O(x1 int, y1 int, x2 int, y2 int) *Line

SetTo4O Sets the components of the Line to the specified values.

func (*Line) SetToI

func (self *Line) SetToI(args ...interface{}) *Line

SetToI Sets the components of the Line to the specified values.

func (*Line) SetTopA

func (self *Line) SetTopA(member int)

SetTopA Gets the top-most point of this line.

func (*Line) SetTypeA

func (self *Line) SetTypeA(member int)

SetTypeA The const type of this object.

func (*Line) SetWidthA

func (self *Line) SetWidthA(member int)

SetWidthA Gets the width of this bounds of this line.

func (*Line) SetXA

func (self *Line) SetXA(member int)

SetXA Gets the x coordinate of the top left of the bounds around this line.

func (*Line) SetYA

func (self *Line) SetYA(member int)

SetYA Gets the y coordinate of the top left of the bounds around this line.

func (*Line) Slope

func (self *Line) Slope() int

Slope Gets the slope of the line (y/x).

func (*Line) Start

func (self *Line) Start() *Point

Start The start point of the line.

func (*Line) Top

func (self *Line) Top() int

Top Gets the top-most point of this line.

func (*Line) Type

func (self *Line) Type() int

Type The const type of this object.

func (*Line) Width

func (self *Line) Width() int

Width Gets the width of this bounds of this line.

func (*Line) X

func (self *Line) X() int

X Gets the x coordinate of the top left of the bounds around this line.

func (*Line) Y

func (self *Line) Y() int

Y Gets the y coordinate of the top left of the bounds around this line.

type LinkedList

type LinkedList struct {
	*js.Object
}

LinkedList A basic Linked List data structure.

This implementation _modifies_ the `prev` and `next` properties of each item added: - The `prev` and `next` properties must be writable and should not be used for any other purpose. - Items _cannot_ be added to multiple LinkedLists at the same time. - Only objects can be added.

func NewLinkedList

func NewLinkedList() *LinkedList

NewLinkedList A basic Linked List data structure.

This implementation _modifies_ the `prev` and `next` properties of each item added: - The `prev` and `next` properties must be writable and should not be used for any other purpose. - Items _cannot_ be added to multiple LinkedLists at the same time. - Only objects can be added.

func NewLinkedListI

func NewLinkedListI(args ...interface{}) *LinkedList

NewLinkedListI A basic Linked List data structure.

This implementation _modifies_ the `prev` and `next` properties of each item added: - The `prev` and `next` properties must be writable and should not be used for any other purpose. - Items _cannot_ be added to multiple LinkedLists at the same time. - Only objects can be added.

func ToLinkedList

func ToLinkedList(jsStruct interface{}) *LinkedList

LinkedList Binding conversion method to LinkedList point

func (*LinkedList) Add

func (self *LinkedList) Add(item interface{}) interface{}

Add Adds a new element to this linked list.

func (*LinkedList) AddI

func (self *LinkedList) AddI(args ...interface{}) interface{}

AddI Adds a new element to this linked list.

func (*LinkedList) CallAll

func (self *LinkedList) CallAll(callback interface{})

CallAll Calls a function on all members of this list, using the member as the context for the callback. The function must exist on the member.

func (*LinkedList) CallAllI

func (self *LinkedList) CallAllI(args ...interface{})

CallAllI Calls a function on all members of this list, using the member as the context for the callback. The function must exist on the member.

func (*LinkedList) First

func (self *LinkedList) First() interface{}

First First element in the list.

func (*LinkedList) Last

func (self *LinkedList) Last() interface{}

Last Last element in the list.

func (*LinkedList) Next

func (self *LinkedList) Next() interface{}

Next Next element in the list.

func (*LinkedList) Prev

func (self *LinkedList) Prev() interface{}

Prev Previous element in the list.

func (*LinkedList) Remove

func (self *LinkedList) Remove(item interface{})

Remove Removes the given element from this linked list if it exists.

func (*LinkedList) RemoveI

func (self *LinkedList) RemoveI(args ...interface{})

RemoveI Removes the given element from this linked list if it exists.

func (*LinkedList) Reset

func (self *LinkedList) Reset()

Reset Resets the first, last, next and previous node pointers in this list.

func (*LinkedList) ResetI

func (self *LinkedList) ResetI(args ...interface{})

ResetI Resets the first, last, next and previous node pointers in this list.

func (*LinkedList) SetFirstA

func (self *LinkedList) SetFirstA(member interface{})

SetFirstA First element in the list.

func (*LinkedList) SetLastA

func (self *LinkedList) SetLastA(member interface{})

SetLastA Last element in the list.

func (*LinkedList) SetNextA

func (self *LinkedList) SetNextA(member interface{})

SetNextA Next element in the list.

func (*LinkedList) SetPrevA

func (self *LinkedList) SetPrevA(member interface{})

SetPrevA Previous element in the list.

func (*LinkedList) SetTotalA

func (self *LinkedList) SetTotalA(member int)

SetTotalA Number of elements in the list.

func (*LinkedList) Total

func (self *LinkedList) Total() int

Total Number of elements in the list.

type Loader

type Loader struct {
	*js.Object
}

Loader The Loader handles loading all external content such as Images, Sounds, Texture Atlases and data files.

The loader uses a combination of tag loading (eg. Image elements) and XHR and provides progress and completion callbacks.

Parallel loading (see {@link Phaser.Loader#enableParallel enableParallel}) is supported and enabled by default. Load-before behavior of parallel resources is controlled by synchronization points as discussed in {@link Phaser.Loader#withSyncPoint withSyncPoint}.

Texture Atlases can be created with tools such as [Texture Packer](https://www.codeandweb.com/texturepacker/phaser) and [Shoebox](http://renderhjs.net/shoebox/)

func NewLoader

func NewLoader(game *Game) *Loader

NewLoader The Loader handles loading all external content such as Images, Sounds, Texture Atlases and data files.

The loader uses a combination of tag loading (eg. Image elements) and XHR and provides progress and completion callbacks.

Parallel loading (see {@link Phaser.Loader#enableParallel enableParallel}) is supported and enabled by default. Load-before behavior of parallel resources is controlled by synchronization points as discussed in {@link Phaser.Loader#withSyncPoint withSyncPoint}.

Texture Atlases can be created with tools such as [Texture Packer](https://www.codeandweb.com/texturepacker/phaser) and [Shoebox](http://renderhjs.net/shoebox/)

func NewLoaderI

func NewLoaderI(args ...interface{}) *Loader

NewLoaderI The Loader handles loading all external content such as Images, Sounds, Texture Atlases and data files.

The loader uses a combination of tag loading (eg. Image elements) and XHR and provides progress and completion callbacks.

Parallel loading (see {@link Phaser.Loader#enableParallel enableParallel}) is supported and enabled by default. Load-before behavior of parallel resources is controlled by synchronization points as discussed in {@link Phaser.Loader#withSyncPoint withSyncPoint}.

Texture Atlases can be created with tools such as [Texture Packer](https://www.codeandweb.com/texturepacker/phaser) and [Shoebox](http://renderhjs.net/shoebox/)

func ToLoader

func ToLoader(jsStruct interface{}) *Loader

Loader Binding conversion method to Loader point

func (*Loader) AddSyncPoint

func (self *Loader) AddSyncPoint(type_ string, key string) *Loader

AddSyncPoint Add a synchronization point to a specific file/asset in the load queue.

This has no effect on already loaded assets.

func (*Loader) AddSyncPointI

func (self *Loader) AddSyncPointI(args ...interface{}) *Loader

AddSyncPointI Add a synchronization point to a specific file/asset in the load queue.

This has no effect on already loaded assets.

func (*Loader) AddToFileList

func (self *Loader) AddToFileList(type_ string, key string) *Loader

AddToFileList Internal function that adds a new entry to the file list. Do not call directly.

func (*Loader) AddToFileList1O

func (self *Loader) AddToFileList1O(type_ string, key string, url string) *Loader

AddToFileList1O Internal function that adds a new entry to the file list. Do not call directly.

func (*Loader) AddToFileList2O

func (self *Loader) AddToFileList2O(type_ string, key string, url string, properties interface{}) *Loader

AddToFileList2O Internal function that adds a new entry to the file list. Do not call directly.

func (*Loader) AddToFileList3O

func (self *Loader) AddToFileList3O(type_ string, key string, url string, properties interface{}, overwrite bool) *Loader

AddToFileList3O Internal function that adds a new entry to the file list. Do not call directly.

func (*Loader) AddToFileList4O

func (self *Loader) AddToFileList4O(type_ string, key string, url string, properties interface{}, overwrite bool, extension string) *Loader

AddToFileList4O Internal function that adds a new entry to the file list. Do not call directly.

func (*Loader) AddToFileListI

func (self *Loader) AddToFileListI(args ...interface{}) *Loader

AddToFileListI Internal function that adds a new entry to the file list. Do not call directly.

func (*Loader) AsyncComplete

func (self *Loader) AsyncComplete(file interface{})

AsyncComplete Informs the loader that the given file resource has been fetched and processed; or such a request has failed.

func (*Loader) AsyncComplete1O

func (self *Loader) AsyncComplete1O(file interface{}, error string)

AsyncComplete1O Informs the loader that the given file resource has been fetched and processed; or such a request has failed.

func (*Loader) AsyncCompleteI

func (self *Loader) AsyncCompleteI(args ...interface{})

AsyncCompleteI Informs the loader that the given file resource has been fetched and processed; or such a request has failed.

func (*Loader) Atlas

func (self *Loader) Atlas(key string) *Loader

Atlas Adds a Texture Atlas file to the current load queue.

To create the Texture Atlas you can use tools such as:

[Texture Packer](https://www.codeandweb.com/texturepacker/phaser) [Shoebox](http://renderhjs.net/shoebox/)

If using Texture Packer we recommend you enable "Trim sprite names". If your atlas software has an option to "rotate" the resulting frames, you must disable it.

You can choose to either load the data externally, by providing a URL to a json file. Or you can pass in a JSON object or String via the `atlasData` parameter. If you pass a String the data is automatically run through `JSON.parse` and then immediately added to the Phaser.Cache.

If URLs are provided the files are **not** loaded immediately after calling this method, but are added to the load queue.

The key must be a unique String. It is used to add the file to the Phaser.Cache upon successful load.

Retrieve the file via `Cache.getImage(key)`. JSON files are automatically parsed upon load. If you need to control when the JSON is parsed then use `Loader.text` instead and parse the JSON file as needed.

The URLs can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.

If the textureURL isn't specified then the Loader will take the key and create a filename from that. For example if the key is "player" and textureURL is null then the Loader will set the URL to be "player.png". The same is true for the atlasURL. If atlasURL isn't specified and no atlasData has been provided then the Loader will set the atlasURL to be the key. For example if the key is "player" the atlasURL will be set to "player.json".

If you do not desire this action then provide URLs and / or a data object.

func (*Loader) Atlas1O

func (self *Loader) Atlas1O(key string, textureURL string) *Loader

Atlas1O Adds a Texture Atlas file to the current load queue.

To create the Texture Atlas you can use tools such as:

[Texture Packer](https://www.codeandweb.com/texturepacker/phaser) [Shoebox](http://renderhjs.net/shoebox/)

If using Texture Packer we recommend you enable "Trim sprite names". If your atlas software has an option to "rotate" the resulting frames, you must disable it.

You can choose to either load the data externally, by providing a URL to a json file. Or you can pass in a JSON object or String via the `atlasData` parameter. If you pass a String the data is automatically run through `JSON.parse` and then immediately added to the Phaser.Cache.

If URLs are provided the files are **not** loaded immediately after calling this method, but are added to the load queue.

The key must be a unique String. It is used to add the file to the Phaser.Cache upon successful load.

Retrieve the file via `Cache.getImage(key)`. JSON files are automatically parsed upon load. If you need to control when the JSON is parsed then use `Loader.text` instead and parse the JSON file as needed.

The URLs can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.

If the textureURL isn't specified then the Loader will take the key and create a filename from that. For example if the key is "player" and textureURL is null then the Loader will set the URL to be "player.png". The same is true for the atlasURL. If atlasURL isn't specified and no atlasData has been provided then the Loader will set the atlasURL to be the key. For example if the key is "player" the atlasURL will be set to "player.json".

If you do not desire this action then provide URLs and / or a data object.

func (*Loader) Atlas2O

func (self *Loader) Atlas2O(key string, textureURL string, atlasURL string) *Loader

Atlas2O Adds a Texture Atlas file to the current load queue.

To create the Texture Atlas you can use tools such as:

[Texture Packer](https://www.codeandweb.com/texturepacker/phaser) [Shoebox](http://renderhjs.net/shoebox/)

If using Texture Packer we recommend you enable "Trim sprite names". If your atlas software has an option to "rotate" the resulting frames, you must disable it.

You can choose to either load the data externally, by providing a URL to a json file. Or you can pass in a JSON object or String via the `atlasData` parameter. If you pass a String the data is automatically run through `JSON.parse` and then immediately added to the Phaser.Cache.

If URLs are provided the files are **not** loaded immediately after calling this method, but are added to the load queue.

The key must be a unique String. It is used to add the file to the Phaser.Cache upon successful load.

Retrieve the file via `Cache.getImage(key)`. JSON files are automatically parsed upon load. If you need to control when the JSON is parsed then use `Loader.text` instead and parse the JSON file as needed.

The URLs can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.

If the textureURL isn't specified then the Loader will take the key and create a filename from that. For example if the key is "player" and textureURL is null then the Loader will set the URL to be "player.png". The same is true for the atlasURL. If atlasURL isn't specified and no atlasData has been provided then the Loader will set the atlasURL to be the key. For example if the key is "player" the atlasURL will be set to "player.json".

If you do not desire this action then provide URLs and / or a data object.

func (*Loader) Atlas3O

func (self *Loader) Atlas3O(key string, textureURL string, atlasURL string, atlasData interface{}) *Loader

Atlas3O Adds a Texture Atlas file to the current load queue.

To create the Texture Atlas you can use tools such as:

[Texture Packer](https://www.codeandweb.com/texturepacker/phaser) [Shoebox](http://renderhjs.net/shoebox/)

If using Texture Packer we recommend you enable "Trim sprite names". If your atlas software has an option to "rotate" the resulting frames, you must disable it.

You can choose to either load the data externally, by providing a URL to a json file. Or you can pass in a JSON object or String via the `atlasData` parameter. If you pass a String the data is automatically run through `JSON.parse` and then immediately added to the Phaser.Cache.

If URLs are provided the files are **not** loaded immediately after calling this method, but are added to the load queue.

The key must be a unique String. It is used to add the file to the Phaser.Cache upon successful load.

Retrieve the file via `Cache.getImage(key)`. JSON files are automatically parsed upon load. If you need to control when the JSON is parsed then use `Loader.text` instead and parse the JSON file as needed.

The URLs can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.

If the textureURL isn't specified then the Loader will take the key and create a filename from that. For example if the key is "player" and textureURL is null then the Loader will set the URL to be "player.png". The same is true for the atlasURL. If atlasURL isn't specified and no atlasData has been provided then the Loader will set the atlasURL to be the key. For example if the key is "player" the atlasURL will be set to "player.json".

If you do not desire this action then provide URLs and / or a data object.

func (*Loader) Atlas4O

func (self *Loader) Atlas4O(key string, textureURL string, atlasURL string, atlasData interface{}, format int) *Loader

Atlas4O Adds a Texture Atlas file to the current load queue.

To create the Texture Atlas you can use tools such as:

[Texture Packer](https://www.codeandweb.com/texturepacker/phaser) [Shoebox](http://renderhjs.net/shoebox/)

If using Texture Packer we recommend you enable "Trim sprite names". If your atlas software has an option to "rotate" the resulting frames, you must disable it.

You can choose to either load the data externally, by providing a URL to a json file. Or you can pass in a JSON object or String via the `atlasData` parameter. If you pass a String the data is automatically run through `JSON.parse` and then immediately added to the Phaser.Cache.

If URLs are provided the files are **not** loaded immediately after calling this method, but are added to the load queue.

The key must be a unique String. It is used to add the file to the Phaser.Cache upon successful load.

Retrieve the file via `Cache.getImage(key)`. JSON files are automatically parsed upon load. If you need to control when the JSON is parsed then use `Loader.text` instead and parse the JSON file as needed.

The URLs can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.

If the textureURL isn't specified then the Loader will take the key and create a filename from that. For example if the key is "player" and textureURL is null then the Loader will set the URL to be "player.png". The same is true for the atlasURL. If atlasURL isn't specified and no atlasData has been provided then the Loader will set the atlasURL to be the key. For example if the key is "player" the atlasURL will be set to "player.json".

If you do not desire this action then provide URLs and / or a data object.

func (*Loader) AtlasI

func (self *Loader) AtlasI(args ...interface{}) *Loader

AtlasI Adds a Texture Atlas file to the current load queue.

To create the Texture Atlas you can use tools such as:

[Texture Packer](https://www.codeandweb.com/texturepacker/phaser) [Shoebox](http://renderhjs.net/shoebox/)

If using Texture Packer we recommend you enable "Trim sprite names". If your atlas software has an option to "rotate" the resulting frames, you must disable it.

You can choose to either load the data externally, by providing a URL to a json file. Or you can pass in a JSON object or String via the `atlasData` parameter. If you pass a String the data is automatically run through `JSON.parse` and then immediately added to the Phaser.Cache.

If URLs are provided the files are **not** loaded immediately after calling this method, but are added to the load queue.

The key must be a unique String. It is used to add the file to the Phaser.Cache upon successful load.

Retrieve the file via `Cache.getImage(key)`. JSON files are automatically parsed upon load. If you need to control when the JSON is parsed then use `Loader.text` instead and parse the JSON file as needed.

The URLs can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.

If the textureURL isn't specified then the Loader will take the key and create a filename from that. For example if the key is "player" and textureURL is null then the Loader will set the URL to be "player.png". The same is true for the atlasURL. If atlasURL isn't specified and no atlasData has been provided then the Loader will set the atlasURL to be the key. For example if the key is "player" the atlasURL will be set to "player.json".

If you do not desire this action then provide URLs and / or a data object.

func (*Loader) AtlasJSONArray

func (self *Loader) AtlasJSONArray(key string) *Loader

AtlasJSONArray Adds a Texture Atlas file to the current load queue.

Unlike `Loader.atlasJSONHash` this call expects the atlas data to be in a JSON Array format.

To create the Texture Atlas you can use tools such as:

[Texture Packer](https://www.codeandweb.com/texturepacker/phaser) [Shoebox](http://renderhjs.net/shoebox/)

If using Texture Packer we recommend you enable "Trim sprite names". If your atlas software has an option to "rotate" the resulting frames, you must disable it.

You can choose to either load the data externally, by providing a URL to a json file. Or you can pass in a JSON object or String via the `atlasData` parameter. If you pass a String the data is automatically run through `JSON.parse` and then immediately added to the Phaser.Cache.

If URLs are provided the files are **not** loaded immediately after calling this method, but are added to the load queue.

The key must be a unique String. It is used to add the file to the Phaser.Cache upon successful load.

Retrieve the file via `Cache.getImage(key)`. JSON files are automatically parsed upon load. If you need to control when the JSON is parsed then use `Loader.text` instead and parse the JSON file as needed.

The URLs can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.

If the textureURL isn't specified then the Loader will take the key and create a filename from that. For example if the key is "player" and textureURL is null then the Loader will set the URL to be "player.png". The same is true for the atlasURL. If atlasURL isn't specified and no atlasData has been provided then the Loader will set the atlasURL to be the key. For example if the key is "player" the atlasURL will be set to "player.json".

If you do not desire this action then provide URLs and / or a data object.

func (*Loader) AtlasJSONArray1O

func (self *Loader) AtlasJSONArray1O(key string, textureURL string) *Loader

AtlasJSONArray1O Adds a Texture Atlas file to the current load queue.

Unlike `Loader.atlasJSONHash` this call expects the atlas data to be in a JSON Array format.

To create the Texture Atlas you can use tools such as:

[Texture Packer](https://www.codeandweb.com/texturepacker/phaser) [Shoebox](http://renderhjs.net/shoebox/)

If using Texture Packer we recommend you enable "Trim sprite names". If your atlas software has an option to "rotate" the resulting frames, you must disable it.

You can choose to either load the data externally, by providing a URL to a json file. Or you can pass in a JSON object or String via the `atlasData` parameter. If you pass a String the data is automatically run through `JSON.parse` and then immediately added to the Phaser.Cache.

If URLs are provided the files are **not** loaded immediately after calling this method, but are added to the load queue.

The key must be a unique String. It is used to add the file to the Phaser.Cache upon successful load.

Retrieve the file via `Cache.getImage(key)`. JSON files are automatically parsed upon load. If you need to control when the JSON is parsed then use `Loader.text` instead and parse the JSON file as needed.

The URLs can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.

If the textureURL isn't specified then the Loader will take the key and create a filename from that. For example if the key is "player" and textureURL is null then the Loader will set the URL to be "player.png". The same is true for the atlasURL. If atlasURL isn't specified and no atlasData has been provided then the Loader will set the atlasURL to be the key. For example if the key is "player" the atlasURL will be set to "player.json".

If you do not desire this action then provide URLs and / or a data object.

func (*Loader) AtlasJSONArray2O

func (self *Loader) AtlasJSONArray2O(key string, textureURL string, atlasURL string) *Loader

AtlasJSONArray2O Adds a Texture Atlas file to the current load queue.

Unlike `Loader.atlasJSONHash` this call expects the atlas data to be in a JSON Array format.

To create the Texture Atlas you can use tools such as:

[Texture Packer](https://www.codeandweb.com/texturepacker/phaser) [Shoebox](http://renderhjs.net/shoebox/)

If using Texture Packer we recommend you enable "Trim sprite names". If your atlas software has an option to "rotate" the resulting frames, you must disable it.

You can choose to either load the data externally, by providing a URL to a json file. Or you can pass in a JSON object or String via the `atlasData` parameter. If you pass a String the data is automatically run through `JSON.parse` and then immediately added to the Phaser.Cache.

If URLs are provided the files are **not** loaded immediately after calling this method, but are added to the load queue.

The key must be a unique String. It is used to add the file to the Phaser.Cache upon successful load.

Retrieve the file via `Cache.getImage(key)`. JSON files are automatically parsed upon load. If you need to control when the JSON is parsed then use `Loader.text` instead and parse the JSON file as needed.

The URLs can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.

If the textureURL isn't specified then the Loader will take the key and create a filename from that. For example if the key is "player" and textureURL is null then the Loader will set the URL to be "player.png". The same is true for the atlasURL. If atlasURL isn't specified and no atlasData has been provided then the Loader will set the atlasURL to be the key. For example if the key is "player" the atlasURL will be set to "player.json".

If you do not desire this action then provide URLs and / or a data object.

func (*Loader) AtlasJSONArray3O

func (self *Loader) AtlasJSONArray3O(key string, textureURL string, atlasURL string, atlasData interface{}) *Loader

AtlasJSONArray3O Adds a Texture Atlas file to the current load queue.

Unlike `Loader.atlasJSONHash` this call expects the atlas data to be in a JSON Array format.

To create the Texture Atlas you can use tools such as:

[Texture Packer](https://www.codeandweb.com/texturepacker/phaser) [Shoebox](http://renderhjs.net/shoebox/)

If using Texture Packer we recommend you enable "Trim sprite names". If your atlas software has an option to "rotate" the resulting frames, you must disable it.

You can choose to either load the data externally, by providing a URL to a json file. Or you can pass in a JSON object or String via the `atlasData` parameter. If you pass a String the data is automatically run through `JSON.parse` and then immediately added to the Phaser.Cache.

If URLs are provided the files are **not** loaded immediately after calling this method, but are added to the load queue.

The key must be a unique String. It is used to add the file to the Phaser.Cache upon successful load.

Retrieve the file via `Cache.getImage(key)`. JSON files are automatically parsed upon load. If you need to control when the JSON is parsed then use `Loader.text` instead and parse the JSON file as needed.

The URLs can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.

If the textureURL isn't specified then the Loader will take the key and create a filename from that. For example if the key is "player" and textureURL is null then the Loader will set the URL to be "player.png". The same is true for the atlasURL. If atlasURL isn't specified and no atlasData has been provided then the Loader will set the atlasURL to be the key. For example if the key is "player" the atlasURL will be set to "player.json".

If you do not desire this action then provide URLs and / or a data object.

func (*Loader) AtlasJSONArrayI

func (self *Loader) AtlasJSONArrayI(args ...interface{}) *Loader

AtlasJSONArrayI Adds a Texture Atlas file to the current load queue.

Unlike `Loader.atlasJSONHash` this call expects the atlas data to be in a JSON Array format.

To create the Texture Atlas you can use tools such as:

[Texture Packer](https://www.codeandweb.com/texturepacker/phaser) [Shoebox](http://renderhjs.net/shoebox/)

If using Texture Packer we recommend you enable "Trim sprite names". If your atlas software has an option to "rotate" the resulting frames, you must disable it.

You can choose to either load the data externally, by providing a URL to a json file. Or you can pass in a JSON object or String via the `atlasData` parameter. If you pass a String the data is automatically run through `JSON.parse` and then immediately added to the Phaser.Cache.

If URLs are provided the files are **not** loaded immediately after calling this method, but are added to the load queue.

The key must be a unique String. It is used to add the file to the Phaser.Cache upon successful load.

Retrieve the file via `Cache.getImage(key)`. JSON files are automatically parsed upon load. If you need to control when the JSON is parsed then use `Loader.text` instead and parse the JSON file as needed.

The URLs can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.

If the textureURL isn't specified then the Loader will take the key and create a filename from that. For example if the key is "player" and textureURL is null then the Loader will set the URL to be "player.png". The same is true for the atlasURL. If atlasURL isn't specified and no atlasData has been provided then the Loader will set the atlasURL to be the key. For example if the key is "player" the atlasURL will be set to "player.json".

If you do not desire this action then provide URLs and / or a data object.

func (*Loader) AtlasJSONHash

func (self *Loader) AtlasJSONHash(key string) *Loader

AtlasJSONHash Adds a Texture Atlas file to the current load queue.

Unlike `Loader.atlas` this call expects the atlas data to be in a JSON Hash format.

To create the Texture Atlas you can use tools such as:

[Texture Packer](https://www.codeandweb.com/texturepacker/phaser) [Shoebox](http://renderhjs.net/shoebox/)

If using Texture Packer we recommend you enable "Trim sprite names". If your atlas software has an option to "rotate" the resulting frames, you must disable it.

You can choose to either load the data externally, by providing a URL to a json file. Or you can pass in a JSON object or String via the `atlasData` parameter. If you pass a String the data is automatically run through `JSON.parse` and then immediately added to the Phaser.Cache.

If URLs are provided the files are **not** loaded immediately after calling this method, but are added to the load queue.

The key must be a unique String. It is used to add the file to the Phaser.Cache upon successful load.

Retrieve the file via `Cache.getImage(key)`. JSON files are automatically parsed upon load. If you need to control when the JSON is parsed then use `Loader.text` instead and parse the JSON file as needed.

The URLs can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.

If the textureURL isn't specified then the Loader will take the key and create a filename from that. For example if the key is "player" and textureURL is null then the Loader will set the URL to be "player.png". The same is true for the atlasURL. If atlasURL isn't specified and no atlasData has been provided then the Loader will set the atlasURL to be the key. For example if the key is "player" the atlasURL will be set to "player.json".

If you do not desire this action then provide URLs and / or a data object.

func (*Loader) AtlasJSONHash1O

func (self *Loader) AtlasJSONHash1O(key string, textureURL string) *Loader

AtlasJSONHash1O Adds a Texture Atlas file to the current load queue.

Unlike `Loader.atlas` this call expects the atlas data to be in a JSON Hash format.

To create the Texture Atlas you can use tools such as:

[Texture Packer](https://www.codeandweb.com/texturepacker/phaser) [Shoebox](http://renderhjs.net/shoebox/)

If using Texture Packer we recommend you enable "Trim sprite names". If your atlas software has an option to "rotate" the resulting frames, you must disable it.

You can choose to either load the data externally, by providing a URL to a json file. Or you can pass in a JSON object or String via the `atlasData` parameter. If you pass a String the data is automatically run through `JSON.parse` and then immediately added to the Phaser.Cache.

If URLs are provided the files are **not** loaded immediately after calling this method, but are added to the load queue.

The key must be a unique String. It is used to add the file to the Phaser.Cache upon successful load.

Retrieve the file via `Cache.getImage(key)`. JSON files are automatically parsed upon load. If you need to control when the JSON is parsed then use `Loader.text` instead and parse the JSON file as needed.

The URLs can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.

If the textureURL isn't specified then the Loader will take the key and create a filename from that. For example if the key is "player" and textureURL is null then the Loader will set the URL to be "player.png". The same is true for the atlasURL. If atlasURL isn't specified and no atlasData has been provided then the Loader will set the atlasURL to be the key. For example if the key is "player" the atlasURL will be set to "player.json".

If you do not desire this action then provide URLs and / or a data object.

func (*Loader) AtlasJSONHash2O

func (self *Loader) AtlasJSONHash2O(key string, textureURL string, atlasURL string) *Loader

AtlasJSONHash2O Adds a Texture Atlas file to the current load queue.

Unlike `Loader.atlas` this call expects the atlas data to be in a JSON Hash format.

To create the Texture Atlas you can use tools such as:

[Texture Packer](https://www.codeandweb.com/texturepacker/phaser) [Shoebox](http://renderhjs.net/shoebox/)

If using Texture Packer we recommend you enable "Trim sprite names". If your atlas software has an option to "rotate" the resulting frames, you must disable it.

You can choose to either load the data externally, by providing a URL to a json file. Or you can pass in a JSON object or String via the `atlasData` parameter. If you pass a String the data is automatically run through `JSON.parse` and then immediately added to the Phaser.Cache.

If URLs are provided the files are **not** loaded immediately after calling this method, but are added to the load queue.

The key must be a unique String. It is used to add the file to the Phaser.Cache upon successful load.

Retrieve the file via `Cache.getImage(key)`. JSON files are automatically parsed upon load. If you need to control when the JSON is parsed then use `Loader.text` instead and parse the JSON file as needed.

The URLs can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.

If the textureURL isn't specified then the Loader will take the key and create a filename from that. For example if the key is "player" and textureURL is null then the Loader will set the URL to be "player.png". The same is true for the atlasURL. If atlasURL isn't specified and no atlasData has been provided then the Loader will set the atlasURL to be the key. For example if the key is "player" the atlasURL will be set to "player.json".

If you do not desire this action then provide URLs and / or a data object.

func (*Loader) AtlasJSONHash3O

func (self *Loader) AtlasJSONHash3O(key string, textureURL string, atlasURL string, atlasData interface{}) *Loader

AtlasJSONHash3O Adds a Texture Atlas file to the current load queue.

Unlike `Loader.atlas` this call expects the atlas data to be in a JSON Hash format.

To create the Texture Atlas you can use tools such as:

[Texture Packer](https://www.codeandweb.com/texturepacker/phaser) [Shoebox](http://renderhjs.net/shoebox/)

If using Texture Packer we recommend you enable "Trim sprite names". If your atlas software has an option to "rotate" the resulting frames, you must disable it.

You can choose to either load the data externally, by providing a URL to a json file. Or you can pass in a JSON object or String via the `atlasData` parameter. If you pass a String the data is automatically run through `JSON.parse` and then immediately added to the Phaser.Cache.

If URLs are provided the files are **not** loaded immediately after calling this method, but are added to the load queue.

The key must be a unique String. It is used to add the file to the Phaser.Cache upon successful load.

Retrieve the file via `Cache.getImage(key)`. JSON files are automatically parsed upon load. If you need to control when the JSON is parsed then use `Loader.text` instead and parse the JSON file as needed.

The URLs can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.

If the textureURL isn't specified then the Loader will take the key and create a filename from that. For example if the key is "player" and textureURL is null then the Loader will set the URL to be "player.png". The same is true for the atlasURL. If atlasURL isn't specified and no atlasData has been provided then the Loader will set the atlasURL to be the key. For example if the key is "player" the atlasURL will be set to "player.json".

If you do not desire this action then provide URLs and / or a data object.

func (*Loader) AtlasJSONHashI

func (self *Loader) AtlasJSONHashI(args ...interface{}) *Loader

AtlasJSONHashI Adds a Texture Atlas file to the current load queue.

Unlike `Loader.atlas` this call expects the atlas data to be in a JSON Hash format.

To create the Texture Atlas you can use tools such as:

[Texture Packer](https://www.codeandweb.com/texturepacker/phaser) [Shoebox](http://renderhjs.net/shoebox/)

If using Texture Packer we recommend you enable "Trim sprite names". If your atlas software has an option to "rotate" the resulting frames, you must disable it.

You can choose to either load the data externally, by providing a URL to a json file. Or you can pass in a JSON object or String via the `atlasData` parameter. If you pass a String the data is automatically run through `JSON.parse` and then immediately added to the Phaser.Cache.

If URLs are provided the files are **not** loaded immediately after calling this method, but are added to the load queue.

The key must be a unique String. It is used to add the file to the Phaser.Cache upon successful load.

Retrieve the file via `Cache.getImage(key)`. JSON files are automatically parsed upon load. If you need to control when the JSON is parsed then use `Loader.text` instead and parse the JSON file as needed.

The URLs can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.

If the textureURL isn't specified then the Loader will take the key and create a filename from that. For example if the key is "player" and textureURL is null then the Loader will set the URL to be "player.png". The same is true for the atlasURL. If atlasURL isn't specified and no atlasData has been provided then the Loader will set the atlasURL to be the key. For example if the key is "player" the atlasURL will be set to "player.json".

If you do not desire this action then provide URLs and / or a data object.

func (*Loader) AtlasXML

func (self *Loader) AtlasXML(key string) *Loader

AtlasXML Adds a Texture Atlas file to the current load queue.

This call expects the atlas data to be in the Starling XML data format.

To create the Texture Atlas you can use tools such as:

[Texture Packer](https://www.codeandweb.com/texturepacker/phaser) [Shoebox](http://renderhjs.net/shoebox/)

If using Texture Packer we recommend you enable "Trim sprite names". If your atlas software has an option to "rotate" the resulting frames, you must disable it.

You can choose to either load the data externally, by providing a URL to an xml file. Or you can pass in an XML object or String via the `atlasData` parameter. If you pass a String the data is automatically run through `Loader.parseXML` and then immediately added to the Phaser.Cache.

If URLs are provided the files are **not** loaded immediately after calling this method, but are added to the load queue.

The key must be a unique String. It is used to add the file to the Phaser.Cache upon successful load.

Retrieve the file via `Cache.getImage(key)`. XML files are automatically parsed upon load. If you need to control when the XML is parsed then use `Loader.text` instead and parse the XML file as needed.

The URLs can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.

If the textureURL isn't specified then the Loader will take the key and create a filename from that. For example if the key is "player" and textureURL is null then the Loader will set the URL to be "player.png". The same is true for the atlasURL. If atlasURL isn't specified and no atlasData has been provided then the Loader will set the atlasURL to be the key. For example if the key is "player" the atlasURL will be set to "player.xml".

If you do not desire this action then provide URLs and / or a data object.

func (*Loader) AtlasXML1O

func (self *Loader) AtlasXML1O(key string, textureURL string) *Loader

AtlasXML1O Adds a Texture Atlas file to the current load queue.

This call expects the atlas data to be in the Starling XML data format.

To create the Texture Atlas you can use tools such as:

[Texture Packer](https://www.codeandweb.com/texturepacker/phaser) [Shoebox](http://renderhjs.net/shoebox/)

If using Texture Packer we recommend you enable "Trim sprite names". If your atlas software has an option to "rotate" the resulting frames, you must disable it.

You can choose to either load the data externally, by providing a URL to an xml file. Or you can pass in an XML object or String via the `atlasData` parameter. If you pass a String the data is automatically run through `Loader.parseXML` and then immediately added to the Phaser.Cache.

If URLs are provided the files are **not** loaded immediately after calling this method, but are added to the load queue.

The key must be a unique String. It is used to add the file to the Phaser.Cache upon successful load.

Retrieve the file via `Cache.getImage(key)`. XML files are automatically parsed upon load. If you need to control when the XML is parsed then use `Loader.text` instead and parse the XML file as needed.

The URLs can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.

If the textureURL isn't specified then the Loader will take the key and create a filename from that. For example if the key is "player" and textureURL is null then the Loader will set the URL to be "player.png". The same is true for the atlasURL. If atlasURL isn't specified and no atlasData has been provided then the Loader will set the atlasURL to be the key. For example if the key is "player" the atlasURL will be set to "player.xml".

If you do not desire this action then provide URLs and / or a data object.

func (*Loader) AtlasXML2O

func (self *Loader) AtlasXML2O(key string, textureURL string, atlasURL string) *Loader

AtlasXML2O Adds a Texture Atlas file to the current load queue.

This call expects the atlas data to be in the Starling XML data format.

To create the Texture Atlas you can use tools such as:

[Texture Packer](https://www.codeandweb.com/texturepacker/phaser) [Shoebox](http://renderhjs.net/shoebox/)

If using Texture Packer we recommend you enable "Trim sprite names". If your atlas software has an option to "rotate" the resulting frames, you must disable it.

You can choose to either load the data externally, by providing a URL to an xml file. Or you can pass in an XML object or String via the `atlasData` parameter. If you pass a String the data is automatically run through `Loader.parseXML` and then immediately added to the Phaser.Cache.

If URLs are provided the files are **not** loaded immediately after calling this method, but are added to the load queue.

The key must be a unique String. It is used to add the file to the Phaser.Cache upon successful load.

Retrieve the file via `Cache.getImage(key)`. XML files are automatically parsed upon load. If you need to control when the XML is parsed then use `Loader.text` instead and parse the XML file as needed.

The URLs can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.

If the textureURL isn't specified then the Loader will take the key and create a filename from that. For example if the key is "player" and textureURL is null then the Loader will set the URL to be "player.png". The same is true for the atlasURL. If atlasURL isn't specified and no atlasData has been provided then the Loader will set the atlasURL to be the key. For example if the key is "player" the atlasURL will be set to "player.xml".

If you do not desire this action then provide URLs and / or a data object.

func (*Loader) AtlasXML3O

func (self *Loader) AtlasXML3O(key string, textureURL string, atlasURL string, atlasData interface{}) *Loader

AtlasXML3O Adds a Texture Atlas file to the current load queue.

This call expects the atlas data to be in the Starling XML data format.

To create the Texture Atlas you can use tools such as:

[Texture Packer](https://www.codeandweb.com/texturepacker/phaser) [Shoebox](http://renderhjs.net/shoebox/)

If using Texture Packer we recommend you enable "Trim sprite names". If your atlas software has an option to "rotate" the resulting frames, you must disable it.

You can choose to either load the data externally, by providing a URL to an xml file. Or you can pass in an XML object or String via the `atlasData` parameter. If you pass a String the data is automatically run through `Loader.parseXML` and then immediately added to the Phaser.Cache.

If URLs are provided the files are **not** loaded immediately after calling this method, but are added to the load queue.

The key must be a unique String. It is used to add the file to the Phaser.Cache upon successful load.

Retrieve the file via `Cache.getImage(key)`. XML files are automatically parsed upon load. If you need to control when the XML is parsed then use `Loader.text` instead and parse the XML file as needed.

The URLs can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.

If the textureURL isn't specified then the Loader will take the key and create a filename from that. For example if the key is "player" and textureURL is null then the Loader will set the URL to be "player.png". The same is true for the atlasURL. If atlasURL isn't specified and no atlasData has been provided then the Loader will set the atlasURL to be the key. For example if the key is "player" the atlasURL will be set to "player.xml".

If you do not desire this action then provide URLs and / or a data object.

func (*Loader) AtlasXMLI

func (self *Loader) AtlasXMLI(args ...interface{}) *Loader

AtlasXMLI Adds a Texture Atlas file to the current load queue.

This call expects the atlas data to be in the Starling XML data format.

To create the Texture Atlas you can use tools such as:

[Texture Packer](https://www.codeandweb.com/texturepacker/phaser) [Shoebox](http://renderhjs.net/shoebox/)

If using Texture Packer we recommend you enable "Trim sprite names". If your atlas software has an option to "rotate" the resulting frames, you must disable it.

You can choose to either load the data externally, by providing a URL to an xml file. Or you can pass in an XML object or String via the `atlasData` parameter. If you pass a String the data is automatically run through `Loader.parseXML` and then immediately added to the Phaser.Cache.

If URLs are provided the files are **not** loaded immediately after calling this method, but are added to the load queue.

The key must be a unique String. It is used to add the file to the Phaser.Cache upon successful load.

Retrieve the file via `Cache.getImage(key)`. XML files are automatically parsed upon load. If you need to control when the XML is parsed then use `Loader.text` instead and parse the XML file as needed.

The URLs can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.

If the textureURL isn't specified then the Loader will take the key and create a filename from that. For example if the key is "player" and textureURL is null then the Loader will set the URL to be "player.png". The same is true for the atlasURL. If atlasURL isn't specified and no atlasData has been provided then the Loader will set the atlasURL to be the key. For example if the key is "player" the atlasURL will be set to "player.xml".

If you do not desire this action then provide URLs and / or a data object.

func (*Loader) Audio

func (self *Loader) Audio(key string, urls interface{}) *Loader

Audio Adds an audio file to the current load queue.

The file is **not** loaded immediately after calling this method. The file is added to the queue ready to be loaded when the loader starts.

The key must be a unique String. It is used to add the file to the Phaser.Cache upon successful load.

Retrieve the file via `Cache.getSound(key)`.

The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.

Mobile warning: There are some mobile devices (certain iPad 2 and iPad Mini revisions) that cannot play 48000 Hz audio. When they try to play the audio becomes extremely distorted and buzzes, eventually crashing the sound system. The solution is to use a lower encoding rate such as 44100 Hz.

func (*Loader) Audio1O

func (self *Loader) Audio1O(key string, urls interface{}, autoDecode bool) *Loader

Audio1O Adds an audio file to the current load queue.

The file is **not** loaded immediately after calling this method. The file is added to the queue ready to be loaded when the loader starts.

The key must be a unique String. It is used to add the file to the Phaser.Cache upon successful load.

Retrieve the file via `Cache.getSound(key)`.

The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.

Mobile warning: There are some mobile devices (certain iPad 2 and iPad Mini revisions) that cannot play 48000 Hz audio. When they try to play the audio becomes extremely distorted and buzzes, eventually crashing the sound system. The solution is to use a lower encoding rate such as 44100 Hz.

func (*Loader) AudioI

func (self *Loader) AudioI(args ...interface{}) *Loader

AudioI Adds an audio file to the current load queue.

The file is **not** loaded immediately after calling this method. The file is added to the queue ready to be loaded when the loader starts.

The key must be a unique String. It is used to add the file to the Phaser.Cache upon successful load.

Retrieve the file via `Cache.getSound(key)`.

The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.

Mobile warning: There are some mobile devices (certain iPad 2 and iPad Mini revisions) that cannot play 48000 Hz audio. When they try to play the audio becomes extremely distorted and buzzes, eventually crashing the sound system. The solution is to use a lower encoding rate such as 44100 Hz.

func (*Loader) AudioSprite

func (self *Loader) AudioSprite(key string, urls interface{}) *Loader

AudioSprite Adds an audio sprite file to the current load queue.

The file is **not** loaded immediately after calling this method. The file is added to the queue ready to be loaded when the loader starts.

The key must be a unique String. It is used to add the file to the Phaser.Cache upon successful load.

Audio Sprites are a combination of audio files and a JSON configuration.

The JSON follows the format of that created by https://github.com/tonistiigi/audiosprite

Retrieve the file via `Cache.getSoundData(key)`.

The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.

func (*Loader) AudioSprite1O

func (self *Loader) AudioSprite1O(key string, urls interface{}, jsonURL string) *Loader

AudioSprite1O Adds an audio sprite file to the current load queue.

The file is **not** loaded immediately after calling this method. The file is added to the queue ready to be loaded when the loader starts.

The key must be a unique String. It is used to add the file to the Phaser.Cache upon successful load.

Audio Sprites are a combination of audio files and a JSON configuration.

The JSON follows the format of that created by https://github.com/tonistiigi/audiosprite

Retrieve the file via `Cache.getSoundData(key)`.

The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.

func (*Loader) AudioSprite2O

func (self *Loader) AudioSprite2O(key string, urls interface{}, jsonURL string, jsonData interface{}) *Loader

AudioSprite2O Adds an audio sprite file to the current load queue.

The file is **not** loaded immediately after calling this method. The file is added to the queue ready to be loaded when the loader starts.

The key must be a unique String. It is used to add the file to the Phaser.Cache upon successful load.

Audio Sprites are a combination of audio files and a JSON configuration.

The JSON follows the format of that created by https://github.com/tonistiigi/audiosprite

Retrieve the file via `Cache.getSoundData(key)`.

The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.

func (*Loader) AudioSprite3O

func (self *Loader) AudioSprite3O(key string, urls interface{}, jsonURL string, jsonData interface{}, autoDecode bool) *Loader

AudioSprite3O Adds an audio sprite file to the current load queue.

The file is **not** loaded immediately after calling this method. The file is added to the queue ready to be loaded when the loader starts.

The key must be a unique String. It is used to add the file to the Phaser.Cache upon successful load.

Audio Sprites are a combination of audio files and a JSON configuration.

The JSON follows the format of that created by https://github.com/tonistiigi/audiosprite

Retrieve the file via `Cache.getSoundData(key)`.

The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.

func (*Loader) AudioSpriteI

func (self *Loader) AudioSpriteI(args ...interface{}) *Loader

AudioSpriteI Adds an audio sprite file to the current load queue.

The file is **not** loaded immediately after calling this method. The file is added to the queue ready to be loaded when the loader starts.

The key must be a unique String. It is used to add the file to the Phaser.Cache upon successful load.

Audio Sprites are a combination of audio files and a JSON configuration.

The JSON follows the format of that created by https://github.com/tonistiigi/audiosprite

Retrieve the file via `Cache.getSoundData(key)`.

The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.

func (*Loader) Audiosprite

func (self *Loader) Audiosprite(key string, urls interface{}) *Loader

Audiosprite A legacy alias for Loader.audioSprite. Please see that method for documentation.

func (*Loader) Audiosprite1O

func (self *Loader) Audiosprite1O(key string, urls interface{}, jsonURL string) *Loader

Audiosprite1O A legacy alias for Loader.audioSprite. Please see that method for documentation.

func (*Loader) Audiosprite2O

func (self *Loader) Audiosprite2O(key string, urls interface{}, jsonURL string, jsonData interface{}) *Loader

Audiosprite2O A legacy alias for Loader.audioSprite. Please see that method for documentation.

func (*Loader) Audiosprite3O

func (self *Loader) Audiosprite3O(key string, urls interface{}, jsonURL string, jsonData interface{}, autoDecode bool) *Loader

Audiosprite3O A legacy alias for Loader.audioSprite. Please see that method for documentation.

func (*Loader) AudiospriteI

func (self *Loader) AudiospriteI(args ...interface{}) *Loader

AudiospriteI A legacy alias for Loader.audioSprite. Please see that method for documentation.

func (*Loader) BaseURL

func (self *Loader) BaseURL() string

BaseURL If you want to append a URL before the path of any asset you can set this here. Useful if allowing the asset base url to be configured outside of the game code. The string _must_ end with a "/".

func (*Loader) Binary

func (self *Loader) Binary(key string) *Loader

Binary Adds a binary file to the current load queue.

The file is **not** loaded immediately after calling this method. The file is added to the queue ready to be loaded when the loader starts.

The key must be a unique String. It is used to add the file to the Phaser.Cache upon successful load.

Retrieve the file via `Cache.getBinary(key)`.

The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.

If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is "alien" and no URL is given then the Loader will set the URL to be "alien.bin". It will always add `.bin` as the extension. If you do not desire this action then provide a URL.

It will be loaded via xhr with a responseType of "arraybuffer". You can specify an optional callback to process the file after load. When the callback is called it will be passed 2 parameters: the key of the file and the file data.

WARNING: If a callback is specified the data will be set to whatever it returns. Always return the data object, even if you didn't modify it.

func (*Loader) Binary1O

func (self *Loader) Binary1O(key string, url string) *Loader

Binary1O Adds a binary file to the current load queue.

The file is **not** loaded immediately after calling this method. The file is added to the queue ready to be loaded when the loader starts.

The key must be a unique String. It is used to add the file to the Phaser.Cache upon successful load.

Retrieve the file via `Cache.getBinary(key)`.

The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.

If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is "alien" and no URL is given then the Loader will set the URL to be "alien.bin". It will always add `.bin` as the extension. If you do not desire this action then provide a URL.

It will be loaded via xhr with a responseType of "arraybuffer". You can specify an optional callback to process the file after load. When the callback is called it will be passed 2 parameters: the key of the file and the file data.

WARNING: If a callback is specified the data will be set to whatever it returns. Always return the data object, even if you didn't modify it.

func (*Loader) Binary2O

func (self *Loader) Binary2O(key string, url string, callback interface{}) *Loader

Binary2O Adds a binary file to the current load queue.

The file is **not** loaded immediately after calling this method. The file is added to the queue ready to be loaded when the loader starts.

The key must be a unique String. It is used to add the file to the Phaser.Cache upon successful load.

Retrieve the file via `Cache.getBinary(key)`.

The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.

If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is "alien" and no URL is given then the Loader will set the URL to be "alien.bin". It will always add `.bin` as the extension. If you do not desire this action then provide a URL.

It will be loaded via xhr with a responseType of "arraybuffer". You can specify an optional callback to process the file after load. When the callback is called it will be passed 2 parameters: the key of the file and the file data.

WARNING: If a callback is specified the data will be set to whatever it returns. Always return the data object, even if you didn't modify it.

func (*Loader) Binary3O

func (self *Loader) Binary3O(key string, url string, callback interface{}, callbackContext interface{}) *Loader

Binary3O Adds a binary file to the current load queue.

The file is **not** loaded immediately after calling this method. The file is added to the queue ready to be loaded when the loader starts.

The key must be a unique String. It is used to add the file to the Phaser.Cache upon successful load.

Retrieve the file via `Cache.getBinary(key)`.

The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.

If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is "alien" and no URL is given then the Loader will set the URL to be "alien.bin". It will always add `.bin` as the extension. If you do not desire this action then provide a URL.

It will be loaded via xhr with a responseType of "arraybuffer". You can specify an optional callback to process the file after load. When the callback is called it will be passed 2 parameters: the key of the file and the file data.

WARNING: If a callback is specified the data will be set to whatever it returns. Always return the data object, even if you didn't modify it.

func (*Loader) BinaryI

func (self *Loader) BinaryI(args ...interface{}) *Loader

BinaryI Adds a binary file to the current load queue.

The file is **not** loaded immediately after calling this method. The file is added to the queue ready to be loaded when the loader starts.

The key must be a unique String. It is used to add the file to the Phaser.Cache upon successful load.

Retrieve the file via `Cache.getBinary(key)`.

The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.

If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is "alien" and no URL is given then the Loader will set the URL to be "alien.bin". It will always add `.bin` as the extension. If you do not desire this action then provide a URL.

It will be loaded via xhr with a responseType of "arraybuffer". You can specify an optional callback to process the file after load. When the callback is called it will be passed 2 parameters: the key of the file and the file data.

WARNING: If a callback is specified the data will be set to whatever it returns. Always return the data object, even if you didn't modify it.

func (*Loader) BitmapFont

func (self *Loader) BitmapFont(key string, textureURL string, atlasURL string, atlasData interface{}) *Loader

BitmapFont Adds Bitmap Font files to the current load queue.

To create the Bitmap Font files you can use:

BMFont (Windows, free): http://www.angelcode.com/products/bmfont/ Glyph Designer (OS X, commercial): http://www.71squared.com/en/glyphdesigner Littera (Web-based, free): http://kvazars.com/littera/

You can choose to either load the data externally, by providing a URL to an xml file. Or you can pass in an XML object or String via the `xmlData` parameter. If you pass a String the data is automatically run through `Loader.parseXML` and then immediately added to the Phaser.Cache.

If URLs are provided the files are **not** loaded immediately after calling this method, but are added to the load queue.

The key must be a unique String. It is used to add the file to the Phaser.Cache upon successful load.

Retrieve the file via `Cache.getBitmapFont(key)`. XML files are automatically parsed upon load. If you need to control when the XML is parsed then use `Loader.text` instead and parse the XML file as needed.

The URLs can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.

If the textureURL isn't specified then the Loader will take the key and create a filename from that. For example if the key is "megaFont" and textureURL is null then the Loader will set the URL to be "megaFont.png". The same is true for the atlasURL. If atlasURL isn't specified and no atlasData has been provided then the Loader will set the atlasURL to be the key. For example if the key is "megaFont" the atlasURL will be set to "megaFont.xml".

If you do not desire this action then provide URLs and / or a data object.

func (*Loader) BitmapFont1O

func (self *Loader) BitmapFont1O(key string, textureURL string, atlasURL string, atlasData interface{}, xSpacing int) *Loader

BitmapFont1O Adds Bitmap Font files to the current load queue.

To create the Bitmap Font files you can use:

BMFont (Windows, free): http://www.angelcode.com/products/bmfont/ Glyph Designer (OS X, commercial): http://www.71squared.com/en/glyphdesigner Littera (Web-based, free): http://kvazars.com/littera/

You can choose to either load the data externally, by providing a URL to an xml file. Or you can pass in an XML object or String via the `xmlData` parameter. If you pass a String the data is automatically run through `Loader.parseXML` and then immediately added to the Phaser.Cache.

If URLs are provided the files are **not** loaded immediately after calling this method, but are added to the load queue.

The key must be a unique String. It is used to add the file to the Phaser.Cache upon successful load.

Retrieve the file via `Cache.getBitmapFont(key)`. XML files are automatically parsed upon load. If you need to control when the XML is parsed then use `Loader.text` instead and parse the XML file as needed.

The URLs can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.

If the textureURL isn't specified then the Loader will take the key and create a filename from that. For example if the key is "megaFont" and textureURL is null then the Loader will set the URL to be "megaFont.png". The same is true for the atlasURL. If atlasURL isn't specified and no atlasData has been provided then the Loader will set the atlasURL to be the key. For example if the key is "megaFont" the atlasURL will be set to "megaFont.xml".

If you do not desire this action then provide URLs and / or a data object.

func (*Loader) BitmapFont2O

func (self *Loader) BitmapFont2O(key string, textureURL string, atlasURL string, atlasData interface{}, xSpacing int, ySpacing int) *Loader

BitmapFont2O Adds Bitmap Font files to the current load queue.

To create the Bitmap Font files you can use:

BMFont (Windows, free): http://www.angelcode.com/products/bmfont/ Glyph Designer (OS X, commercial): http://www.71squared.com/en/glyphdesigner Littera (Web-based, free): http://kvazars.com/littera/

You can choose to either load the data externally, by providing a URL to an xml file. Or you can pass in an XML object or String via the `xmlData` parameter. If you pass a String the data is automatically run through `Loader.parseXML` and then immediately added to the Phaser.Cache.

If URLs are provided the files are **not** loaded immediately after calling this method, but are added to the load queue.

The key must be a unique String. It is used to add the file to the Phaser.Cache upon successful load.

Retrieve the file via `Cache.getBitmapFont(key)`. XML files are automatically parsed upon load. If you need to control when the XML is parsed then use `Loader.text` instead and parse the XML file as needed.

The URLs can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.

If the textureURL isn't specified then the Loader will take the key and create a filename from that. For example if the key is "megaFont" and textureURL is null then the Loader will set the URL to be "megaFont.png". The same is true for the atlasURL. If atlasURL isn't specified and no atlasData has been provided then the Loader will set the atlasURL to be the key. For example if the key is "megaFont" the atlasURL will be set to "megaFont.xml".

If you do not desire this action then provide URLs and / or a data object.

func (*Loader) BitmapFontI

func (self *Loader) BitmapFontI(args ...interface{}) *Loader

BitmapFontI Adds Bitmap Font files to the current load queue.

To create the Bitmap Font files you can use:

BMFont (Windows, free): http://www.angelcode.com/products/bmfont/ Glyph Designer (OS X, commercial): http://www.71squared.com/en/glyphdesigner Littera (Web-based, free): http://kvazars.com/littera/

You can choose to either load the data externally, by providing a URL to an xml file. Or you can pass in an XML object or String via the `xmlData` parameter. If you pass a String the data is automatically run through `Loader.parseXML` and then immediately added to the Phaser.Cache.

If URLs are provided the files are **not** loaded immediately after calling this method, but are added to the load queue.

The key must be a unique String. It is used to add the file to the Phaser.Cache upon successful load.

Retrieve the file via `Cache.getBitmapFont(key)`. XML files are automatically parsed upon load. If you need to control when the XML is parsed then use `Loader.text` instead and parse the XML file as needed.

The URLs can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.

If the textureURL isn't specified then the Loader will take the key and create a filename from that. For example if the key is "megaFont" and textureURL is null then the Loader will set the URL to be "megaFont.png". The same is true for the atlasURL. If atlasURL isn't specified and no atlasData has been provided then the Loader will set the atlasURL to be the key. For example if the key is "megaFont" the atlasURL will be set to "megaFont.xml".

If you do not desire this action then provide URLs and / or a data object.

func (*Loader) Cache

func (self *Loader) Cache() *Cache

Cache Local reference to the Phaser.Cache.

func (*Loader) CheckKeyExists

func (self *Loader) CheckKeyExists(type_ string, key string) bool

CheckKeyExists Check whether a file/asset with a specific key is queued to be loaded.

To access a loaded asset use Phaser.Cache, eg. {@link Phaser.Cache#checkImageKey}

func (*Loader) CheckKeyExistsI

func (self *Loader) CheckKeyExistsI(args ...interface{}) bool

CheckKeyExistsI Check whether a file/asset with a specific key is queued to be loaded.

To access a loaded asset use Phaser.Cache, eg. {@link Phaser.Cache#checkImageKey}

func (*Loader) CrossOrigin

func (self *Loader) CrossOrigin() interface{}

CrossOrigin The crossOrigin value applied to loaded images. Very often this needs to be set to 'anonymous'.

func (*Loader) CsvLoadComplete

func (self *Loader) CsvLoadComplete(file interface{}, xhr *XMLHttpRequest)

CsvLoadComplete Successfully loaded a CSV file - only used for certain types.

func (*Loader) CsvLoadCompleteI

func (self *Loader) CsvLoadCompleteI(args ...interface{})

CsvLoadCompleteI Successfully loaded a CSV file - only used for certain types.

func (*Loader) EnableParallel

func (self *Loader) EnableParallel() bool

EnableParallel If true (the default) then parallel downloading will be enabled.

To disable all parallel downloads this must be set to false prior to any resource being loaded.

func (*Loader) FileComplete

func (self *Loader) FileComplete(file interface{}, xhr *XMLHttpRequest)

FileComplete Called when a file/resources had been downloaded and needs to be processed further.

func (*Loader) FileCompleteI

func (self *Loader) FileCompleteI(args ...interface{})

FileCompleteI Called when a file/resources had been downloaded and needs to be processed further.

func (*Loader) FileError

func (self *Loader) FileError(file interface{}, xhr *XMLHttpRequest, reason string)

FileError Error occurred when loading a file.

func (*Loader) FileErrorI

func (self *Loader) FileErrorI(args ...interface{})

FileErrorI Error occurred when loading a file.

func (*Loader) FinishedLoading

func (self *Loader) FinishedLoading()

FinishedLoading The loading is all finished.

func (*Loader) FinishedLoading1O

func (self *Loader) FinishedLoading1O(abnormal bool)

FinishedLoading1O The loading is all finished.

func (*Loader) FinishedLoadingI

func (self *Loader) FinishedLoadingI(args ...interface{})

FinishedLoadingI The loading is all finished.

func (*Loader) Game

func (self *Loader) Game() *Game

Game Local reference to game.

func (*Loader) GetAsset

func (self *Loader) GetAsset(type_ string, key string) interface{}

GetAsset Find a file/asset with a specific key.

Only assets in the download file queue will be found.

func (*Loader) GetAssetI

func (self *Loader) GetAssetI(args ...interface{}) interface{}

GetAssetI Find a file/asset with a specific key.

Only assets in the download file queue will be found.

func (*Loader) GetAssetIndex

func (self *Loader) GetAssetIndex(type_ string, key string) int

GetAssetIndex Get the queue-index of the file/asset with a specific key.

Only assets in the download file queue will be found.

func (*Loader) GetAssetIndexI

func (self *Loader) GetAssetIndexI(args ...interface{}) int

GetAssetIndexI Get the queue-index of the file/asset with a specific key.

Only assets in the download file queue will be found.

func (*Loader) GetAudioURL

func (self *Loader) GetAudioURL(urls interface{}) string

GetAudioURL Give a bunch of URLs, return the first URL that has an extension this device thinks it can play.

It is assumed that the device can play "blob:" or "data:" URIs - There is no mime-type checking on data URIs.

func (*Loader) GetAudioURLI

func (self *Loader) GetAudioURLI(args ...interface{}) string

GetAudioURLI Give a bunch of URLs, return the first URL that has an extension this device thinks it can play.

It is assumed that the device can play "blob:" or "data:" URIs - There is no mime-type checking on data URIs.

func (*Loader) GetVideoURL

func (self *Loader) GetVideoURL(urls interface{}) string

GetVideoURL Give a bunch of URLs, return the first URL that has an extension this device thinks it can play.

It is assumed that the device can play "blob:" or "data:" URIs - There is no mime-type checking on data URIs.

func (*Loader) GetVideoURLI

func (self *Loader) GetVideoURLI(args ...interface{}) string

GetVideoURLI Give a bunch of URLs, return the first URL that has an extension this device thinks it can play.

It is assumed that the device can play "blob:" or "data:" URIs - There is no mime-type checking on data URIs.

func (*Loader) HasLoaded

func (self *Loader) HasLoaded() bool

HasLoaded True if all assets in the queue have finished loading.

func (*Loader) Headers

func (self *Loader) Headers() interface{}

Headers Used to map the application mime-types to to the Accept header in XHR requests. If you don't require these mappings, or they cause problems on your server, then remove them from the headers object and the XHR request will not try to use them.

This object can also be used to set the `X-Requested-With` header to `XMLHttpRequest` (or any other value you need). To enable this do:

`this.load.headers.requestedWith = 'XMLHttpRequest'`

before adding anything to the Loader. The XHR loader will then call:

`setRequestHeader('X-Requested-With', this.headers['requestedWith'])`

func (*Loader) Image

func (self *Loader) Image(key string) *Loader

Image Adds an Image to the current load queue.

The file is **not** loaded immediately after calling this method. The file is added to the queue ready to be loaded when the loader starts.

Phaser can load all common image types: png, jpg, gif and any other format the browser can natively handle.

The key must be a unique String. It is used to add the file to the Phaser.Cache upon successful load.

Retrieve the image via `Cache.getImage(key)`

The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.

If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is "alien" and no URL is given then the Loader will set the URL to be "alien.png". It will always add `.png` as the extension. If you do not desire this action then provide a URL.

func (*Loader) Image1O

func (self *Loader) Image1O(key string, url string) *Loader

Image1O Adds an Image to the current load queue.

The file is **not** loaded immediately after calling this method. The file is added to the queue ready to be loaded when the loader starts.

Phaser can load all common image types: png, jpg, gif and any other format the browser can natively handle.

The key must be a unique String. It is used to add the file to the Phaser.Cache upon successful load.

Retrieve the image via `Cache.getImage(key)`

The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.

If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is "alien" and no URL is given then the Loader will set the URL to be "alien.png". It will always add `.png` as the extension. If you do not desire this action then provide a URL.

func (*Loader) Image2O

func (self *Loader) Image2O(key string, url string, overwrite bool) *Loader

Image2O Adds an Image to the current load queue.

The file is **not** loaded immediately after calling this method. The file is added to the queue ready to be loaded when the loader starts.

Phaser can load all common image types: png, jpg, gif and any other format the browser can natively handle.

The key must be a unique String. It is used to add the file to the Phaser.Cache upon successful load.

Retrieve the image via `Cache.getImage(key)`

The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.

If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is "alien" and no URL is given then the Loader will set the URL to be "alien.png". It will always add `.png` as the extension. If you do not desire this action then provide a URL.

func (*Loader) ImageI

func (self *Loader) ImageI(args ...interface{}) *Loader

ImageI Adds an Image to the current load queue.

The file is **not** loaded immediately after calling this method. The file is added to the queue ready to be loaded when the loader starts.

Phaser can load all common image types: png, jpg, gif and any other format the browser can natively handle.

The key must be a unique String. It is used to add the file to the Phaser.Cache upon successful load.

Retrieve the image via `Cache.getImage(key)`

The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.

If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is "alien" and no URL is given then the Loader will set the URL to be "alien.png". It will always add `.png` as the extension. If you do not desire this action then provide a URL.

func (*Loader) Images

func (self *Loader) Images(keys []interface{}) *Loader

Images Adds an array of images to the current load queue.

It works by passing each element of the array to the Loader.image method.

The files are **not** loaded immediately after calling this method. The files are added to the queue ready to be loaded when the loader starts.

Phaser can load all common image types: png, jpg, gif and any other format the browser can natively handle.

The keys must be unique Strings. They are used to add the files to the Phaser.Cache upon successful load.

Retrieve the images via `Cache.getImage(key)`

The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.

If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is "alien" and no URL is given then the Loader will set the URL to be "alien.png". It will always add `.png` as the extension. If you do not desire this action then provide a URL.

func (*Loader) Images1O

func (self *Loader) Images1O(keys []interface{}, urls []interface{}) *Loader

Images1O Adds an array of images to the current load queue.

It works by passing each element of the array to the Loader.image method.

The files are **not** loaded immediately after calling this method. The files are added to the queue ready to be loaded when the loader starts.

Phaser can load all common image types: png, jpg, gif and any other format the browser can natively handle.

The keys must be unique Strings. They are used to add the files to the Phaser.Cache upon successful load.

Retrieve the images via `Cache.getImage(key)`

The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.

If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is "alien" and no URL is given then the Loader will set the URL to be "alien.png". It will always add `.png` as the extension. If you do not desire this action then provide a URL.

func (*Loader) ImagesI

func (self *Loader) ImagesI(args ...interface{}) *Loader

ImagesI Adds an array of images to the current load queue.

It works by passing each element of the array to the Loader.image method.

The files are **not** loaded immediately after calling this method. The files are added to the queue ready to be loaded when the loader starts.

Phaser can load all common image types: png, jpg, gif and any other format the browser can natively handle.

The keys must be unique Strings. They are used to add the files to the Phaser.Cache upon successful load.

Retrieve the images via `Cache.getImage(key)`

The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.

If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is "alien" and no URL is given then the Loader will set the URL to be "alien.png". It will always add `.png` as the extension. If you do not desire this action then provide a URL.

func (*Loader) IsLoading

func (self *Loader) IsLoading() bool

IsLoading True if the Loader is in the process of loading the queue.

func (*Loader) Json

func (self *Loader) Json(key string) *Loader

Json Adds a JSON file to the current load queue.

The file is **not** loaded immediately after calling this method. The file is added to the queue ready to be loaded when the loader starts.

The key must be a unique String. It is used to add the file to the Phaser.Cache upon successful load.

Retrieve the file via `Cache.getJSON(key)`. JSON files are automatically parsed upon load. If you need to control when the JSON is parsed then use `Loader.text` instead and parse the text file as needed.

The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.

If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is "alien" and no URL is given then the Loader will set the URL to be "alien.json". It will always add `.json` as the extension. If you do not desire this action then provide a URL.

func (*Loader) Json1O

func (self *Loader) Json1O(key string, url string) *Loader

Json1O Adds a JSON file to the current load queue.

The file is **not** loaded immediately after calling this method. The file is added to the queue ready to be loaded when the loader starts.

The key must be a unique String. It is used to add the file to the Phaser.Cache upon successful load.

Retrieve the file via `Cache.getJSON(key)`. JSON files are automatically parsed upon load. If you need to control when the JSON is parsed then use `Loader.text` instead and parse the text file as needed.

The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.

If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is "alien" and no URL is given then the Loader will set the URL to be "alien.json". It will always add `.json` as the extension. If you do not desire this action then provide a URL.

func (*Loader) Json2O

func (self *Loader) Json2O(key string, url string, overwrite bool) *Loader

Json2O Adds a JSON file to the current load queue.

The file is **not** loaded immediately after calling this method. The file is added to the queue ready to be loaded when the loader starts.

The key must be a unique String. It is used to add the file to the Phaser.Cache upon successful load.

Retrieve the file via `Cache.getJSON(key)`. JSON files are automatically parsed upon load. If you need to control when the JSON is parsed then use `Loader.text` instead and parse the text file as needed.

The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.

If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is "alien" and no URL is given then the Loader will set the URL to be "alien.json". It will always add `.json` as the extension. If you do not desire this action then provide a URL.

func (*Loader) JsonI

func (self *Loader) JsonI(args ...interface{}) *Loader

JsonI Adds a JSON file to the current load queue.

The file is **not** loaded immediately after calling this method. The file is added to the queue ready to be loaded when the loader starts.

The key must be a unique String. It is used to add the file to the Phaser.Cache upon successful load.

Retrieve the file via `Cache.getJSON(key)`. JSON files are automatically parsed upon load. If you need to control when the JSON is parsed then use `Loader.text` instead and parse the text file as needed.

The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.

If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is "alien" and no URL is given then the Loader will set the URL to be "alien.json". It will always add `.json` as the extension. If you do not desire this action then provide a URL.

func (*Loader) JsonLoadComplete

func (self *Loader) JsonLoadComplete(file interface{}, xhr *XMLHttpRequest)

JsonLoadComplete Successfully loaded a JSON file - only used for certain types.

func (*Loader) JsonLoadCompleteI

func (self *Loader) JsonLoadCompleteI(args ...interface{})

JsonLoadCompleteI Successfully loaded a JSON file - only used for certain types.

func (*Loader) LoadAudioTag

func (self *Loader) LoadAudioTag()

LoadAudioTag Continue async loading through an Audio tag.

func (*Loader) LoadAudioTagI

func (self *Loader) LoadAudioTagI(args ...interface{})

LoadAudioTagI Continue async loading through an Audio tag.

func (*Loader) LoadFile

func (self *Loader) LoadFile(file interface{})

LoadFile Start fetching a resource.

All code paths, async or otherwise, from this function must return to `asyncComplete`.

func (*Loader) LoadFileI

func (self *Loader) LoadFileI(args ...interface{})

LoadFileI Start fetching a resource.

All code paths, async or otherwise, from this function must return to `asyncComplete`.

func (*Loader) LoadImageTag

func (self *Loader) LoadImageTag()

LoadImageTag Continue async loading through an Image tag.

func (*Loader) LoadImageTagI

func (self *Loader) LoadImageTagI(args ...interface{})

LoadImageTagI Continue async loading through an Image tag.

func (*Loader) LoadVideoTag

func (self *Loader) LoadVideoTag()

LoadVideoTag Continue async loading through a Video tag.

func (*Loader) LoadVideoTagI

func (self *Loader) LoadVideoTagI(args ...interface{})

LoadVideoTagI Continue async loading through a Video tag.

func (*Loader) MaxParallelDownloads

func (self *Loader) MaxParallelDownloads() int

MaxParallelDownloads The number of concurrent / parallel resources to try and fetch at once.

Many current browsers limit 6 requests per domain; this is slightly conservative.

func (*Loader) NextFile

func (self *Loader) NextFile(previousFile interface{}, success bool)

NextFile Update the loading sprite progress.

func (*Loader) NextFileI

func (self *Loader) NextFileI(args ...interface{})

NextFileI Update the loading sprite progress.

func (*Loader) OnFileComplete

func (self *Loader) OnFileComplete() *Signal

OnFileComplete This event is dispatched when a file has either loaded or failed to load.

Any function bound to this will receive the following parameters:

progress, file key, success?, total loaded files, total files

Where progress is a number between 1 and 100 (inclusive) representing the percentage of the load.

func (*Loader) OnFileError

func (self *Loader) OnFileError() *Signal

OnFileError This event is dispatched when a file (or pack) errors as a result of the load request.

For files it will be triggered before `onFileComplete`. For packs it will be triggered before `onPackComplete`.

Params: `(file key, file)`

func (*Loader) OnFileStart

func (self *Loader) OnFileStart() *Signal

OnFileStart This event is dispatched immediately before a file starts loading. It's possible the file may fail (eg. download error, invalid format) after this event is sent.

Params: `(progress, file key, file url)`

func (*Loader) OnLoadComplete

func (self *Loader) OnLoadComplete() *Signal

OnLoadComplete This event is dispatched when the final file in the load queue has either loaded or failed.

func (*Loader) OnLoadStart

func (self *Loader) OnLoadStart() *Signal

OnLoadStart This event is dispatched when the loading process starts: before the first file has been requested, but after all the initial packs have been loaded.

func (*Loader) OnPackComplete

func (self *Loader) OnPackComplete() *Signal

OnPackComplete This event is dispatched when an asset pack has either loaded or failed to load.

This is called when the asset pack manifest file has loaded and successfully added its contents to the loader queue.

Params: `(pack key, success?, total packs loaded, total packs)`

func (*Loader) PHYSICS_LIME_CORONA_JSON

func (self *Loader) PHYSICS_LIME_CORONA_JSON() int

PHYSICS_LIME_CORONA_JSON empty description

func (*Loader) PHYSICS_PHASER_JSON

func (self *Loader) PHYSICS_PHASER_JSON() int

PHYSICS_PHASER_JSON empty description

func (*Loader) Pack

func (self *Loader) Pack(key string) *Loader

Pack Add a JSON resource pack ('packfile') to the Loader.

A packfile is a JSON file that contains a list of assets to the be loaded. Please see the example 'loader/asset pack' in the Phaser Examples repository.

Packs are always put before the first non-pack file that is not loaded / loading.

This means that all packs added before any loading has started are added to the front of the file queue, in the order added.

The key must be a unique String. It is used to add the file to the Phaser.Cache upon successful load.

The URL of the packfile can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.

func (*Loader) Pack1O

func (self *Loader) Pack1O(key string, url string) *Loader

Pack1O Add a JSON resource pack ('packfile') to the Loader.

A packfile is a JSON file that contains a list of assets to the be loaded. Please see the example 'loader/asset pack' in the Phaser Examples repository.

Packs are always put before the first non-pack file that is not loaded / loading.

This means that all packs added before any loading has started are added to the front of the file queue, in the order added.

The key must be a unique String. It is used to add the file to the Phaser.Cache upon successful load.

The URL of the packfile can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.

func (*Loader) Pack2O

func (self *Loader) Pack2O(key string, url string, data interface{}) *Loader

Pack2O Add a JSON resource pack ('packfile') to the Loader.

A packfile is a JSON file that contains a list of assets to the be loaded. Please see the example 'loader/asset pack' in the Phaser Examples repository.

Packs are always put before the first non-pack file that is not loaded / loading.

This means that all packs added before any loading has started are added to the front of the file queue, in the order added.

The key must be a unique String. It is used to add the file to the Phaser.Cache upon successful load.

The URL of the packfile can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.

func (*Loader) Pack3O

func (self *Loader) Pack3O(key string, url string, data interface{}, callbackContext interface{}) *Loader

Pack3O Add a JSON resource pack ('packfile') to the Loader.

A packfile is a JSON file that contains a list of assets to the be loaded. Please see the example 'loader/asset pack' in the Phaser Examples repository.

Packs are always put before the first non-pack file that is not loaded / loading.

This means that all packs added before any loading has started are added to the front of the file queue, in the order added.

The key must be a unique String. It is used to add the file to the Phaser.Cache upon successful load.

The URL of the packfile can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.

func (*Loader) PackI

func (self *Loader) PackI(args ...interface{}) *Loader

PackI Add a JSON resource pack ('packfile') to the Loader.

A packfile is a JSON file that contains a list of assets to the be loaded. Please see the example 'loader/asset pack' in the Phaser Examples repository.

Packs are always put before the first non-pack file that is not loaded / loading.

This means that all packs added before any loading has started are added to the front of the file queue, in the order added.

The key must be a unique String. It is used to add the file to the Phaser.Cache upon successful load.

The URL of the packfile can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.

func (*Loader) ParseXml

func (self *Loader) ParseXml(data string) *XMLDocument

ParseXml Parses string data as XML.

func (*Loader) ParseXmlI

func (self *Loader) ParseXmlI(args ...interface{}) *XMLDocument

ParseXmlI Parses string data as XML.

func (*Loader) Path

func (self *Loader) Path() string

Path The value of `path`, if set, is placed before any _relative_ file path given. For example:

`load.path = "images/sprites/"; load.image("ball", "ball.png"); load.image("tree", "level1/oaktree.png"); load.image("boom", "http://server.com/explode.png");`

Would load the `ball` file from `images/sprites/ball.png` and the tree from `images/sprites/level1/oaktree.png` but the file `boom` would load from the URL given as it's an absolute URL.

Please note that the path is added before the filename but *after* the baseURL (if set.)

The string _must_ end with a "/".

func (*Loader) Physics

func (self *Loader) Physics(key string) *Loader

Physics Adds a physics data file to the current load queue.

The data must be in `Lime + Corona` JSON format. [Physics Editor](https://www.codeandweb.com) by code'n'web exports in this format natively.

You can choose to either load the data externally, by providing a URL to a json file. Or you can pass in a JSON object or String via the `data` parameter. If you pass a String the data is automatically run through `JSON.parse` and then immediately added to the Phaser.Cache.

If a URL is provided the file is **not** loaded immediately after calling this method, but is added to the load queue.

The key must be a unique String. It is used to add the file to the Phaser.Cache upon successful load.

Retrieve the file via `Cache.getJSON(key)`. JSON files are automatically parsed upon load. If you need to control when the JSON is parsed then use `Loader.text` instead and parse the text file as needed.

The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.

If the URL isn't specified and no data is given then the Loader will take the key and create a filename from that. For example if the key is "alien" and no URL or data is given then the Loader will set the URL to be "alien.json". It will always use `.json` as the extension.

If you do not desire this action then provide a URL or data object.

func (*Loader) Physics1O

func (self *Loader) Physics1O(key string, url string) *Loader

Physics1O Adds a physics data file to the current load queue.

The data must be in `Lime + Corona` JSON format. [Physics Editor](https://www.codeandweb.com) by code'n'web exports in this format natively.

You can choose to either load the data externally, by providing a URL to a json file. Or you can pass in a JSON object or String via the `data` parameter. If you pass a String the data is automatically run through `JSON.parse` and then immediately added to the Phaser.Cache.

If a URL is provided the file is **not** loaded immediately after calling this method, but is added to the load queue.

The key must be a unique String. It is used to add the file to the Phaser.Cache upon successful load.

Retrieve the file via `Cache.getJSON(key)`. JSON files are automatically parsed upon load. If you need to control when the JSON is parsed then use `Loader.text` instead and parse the text file as needed.

The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.

If the URL isn't specified and no data is given then the Loader will take the key and create a filename from that. For example if the key is "alien" and no URL or data is given then the Loader will set the URL to be "alien.json". It will always use `.json` as the extension.

If you do not desire this action then provide a URL or data object.

func (*Loader) Physics2O

func (self *Loader) Physics2O(key string, url string, data interface{}) *Loader

Physics2O Adds a physics data file to the current load queue.

The data must be in `Lime + Corona` JSON format. [Physics Editor](https://www.codeandweb.com) by code'n'web exports in this format natively.

You can choose to either load the data externally, by providing a URL to a json file. Or you can pass in a JSON object or String via the `data` parameter. If you pass a String the data is automatically run through `JSON.parse` and then immediately added to the Phaser.Cache.

If a URL is provided the file is **not** loaded immediately after calling this method, but is added to the load queue.

The key must be a unique String. It is used to add the file to the Phaser.Cache upon successful load.

Retrieve the file via `Cache.getJSON(key)`. JSON files are automatically parsed upon load. If you need to control when the JSON is parsed then use `Loader.text` instead and parse the text file as needed.

The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.

If the URL isn't specified and no data is given then the Loader will take the key and create a filename from that. For example if the key is "alien" and no URL or data is given then the Loader will set the URL to be "alien.json". It will always use `.json` as the extension.

If you do not desire this action then provide a URL or data object.

func (*Loader) Physics3O

func (self *Loader) Physics3O(key string, url string, data interface{}, format string) *Loader

Physics3O Adds a physics data file to the current load queue.

The data must be in `Lime + Corona` JSON format. [Physics Editor](https://www.codeandweb.com) by code'n'web exports in this format natively.

You can choose to either load the data externally, by providing a URL to a json file. Or you can pass in a JSON object or String via the `data` parameter. If you pass a String the data is automatically run through `JSON.parse` and then immediately added to the Phaser.Cache.

If a URL is provided the file is **not** loaded immediately after calling this method, but is added to the load queue.

The key must be a unique String. It is used to add the file to the Phaser.Cache upon successful load.

Retrieve the file via `Cache.getJSON(key)`. JSON files are automatically parsed upon load. If you need to control when the JSON is parsed then use `Loader.text` instead and parse the text file as needed.

The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.

If the URL isn't specified and no data is given then the Loader will take the key and create a filename from that. For example if the key is "alien" and no URL or data is given then the Loader will set the URL to be "alien.json". It will always use `.json` as the extension.

If you do not desire this action then provide a URL or data object.

func (*Loader) PhysicsI

func (self *Loader) PhysicsI(args ...interface{}) *Loader

PhysicsI Adds a physics data file to the current load queue.

The data must be in `Lime + Corona` JSON format. [Physics Editor](https://www.codeandweb.com) by code'n'web exports in this format natively.

You can choose to either load the data externally, by providing a URL to a json file. Or you can pass in a JSON object or String via the `data` parameter. If you pass a String the data is automatically run through `JSON.parse` and then immediately added to the Phaser.Cache.

If a URL is provided the file is **not** loaded immediately after calling this method, but is added to the load queue.

The key must be a unique String. It is used to add the file to the Phaser.Cache upon successful load.

Retrieve the file via `Cache.getJSON(key)`. JSON files are automatically parsed upon load. If you need to control when the JSON is parsed then use `Loader.text` instead and parse the text file as needed.

The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.

If the URL isn't specified and no data is given then the Loader will take the key and create a filename from that. For example if the key is "alien" and no URL or data is given then the Loader will set the URL to be "alien.json". It will always use `.json` as the extension.

If you do not desire this action then provide a URL or data object.

func (*Loader) PreloadSprite

func (self *Loader) PreloadSprite() interface{}

PreloadSprite You can optionally link a progress sprite with {@link Phaser.Loader#setPreloadSprite setPreloadSprite}.

This property is an object containing: sprite, rect, direction, width and height

func (*Loader) ProcessLoadQueue

func (self *Loader) ProcessLoadQueue()

ProcessLoadQueue Process the next item(s) in the file/asset queue.

Process the queue and start loading enough items to fill up the inflight queue.

If a sync-file is encountered then subsequent asset processing is delayed until it completes. The exception to this rule is that packfiles can be downloaded (but not processed) even if there appear other sync files (ie. packs) - this enables multiple packfiles to be fetched in parallel. such as during the start phaser.

func (*Loader) ProcessLoadQueueI

func (self *Loader) ProcessLoadQueueI(args ...interface{})

ProcessLoadQueueI Process the next item(s) in the file/asset queue.

Process the queue and start loading enough items to fill up the inflight queue.

If a sync-file is encountered then subsequent asset processing is delayed until it completes. The exception to this rule is that packfiles can be downloaded (but not processed) even if there appear other sync files (ie. packs) - this enables multiple packfiles to be fetched in parallel. such as during the start phaser.

func (*Loader) ProcessPack

func (self *Loader) ProcessPack(pack interface{})

ProcessPack Process pack data. This will usually modify the file list.

func (*Loader) ProcessPackI

func (self *Loader) ProcessPackI(args ...interface{})

ProcessPackI Process pack data. This will usually modify the file list.

func (*Loader) Progress

func (self *Loader) Progress() interface{}

Progress The rounded load progress percentage value (from 0 to 100). See {@link Phaser.Loader#progressFloat}.

func (*Loader) ProgressFloat

func (self *Loader) ProgressFloat() interface{}

ProgressFloat The non-rounded load progress value (from 0.0 to 100.0).

A general indicator of the progress. It is possible for the progress to decrease, after `onLoadStart`, if more files are dynamically added.

func (*Loader) RemoveAll

func (self *Loader) RemoveAll()

RemoveAll Remove all file loading requests - this is _insufficient_ to stop current loading. Use `reset` instead.

func (*Loader) RemoveAllI

func (self *Loader) RemoveAllI(args ...interface{})

RemoveAllI Remove all file loading requests - this is _insufficient_ to stop current loading. Use `reset` instead.

func (*Loader) RemoveFile

func (self *Loader) RemoveFile(type_ string, key string)

RemoveFile Remove a file/asset from the loading queue.

A file that is loaded or has started loading cannot be removed.

func (*Loader) RemoveFileI

func (self *Loader) RemoveFileI(args ...interface{})

RemoveFileI Remove a file/asset from the loading queue.

A file that is loaded or has started loading cannot be removed.

func (*Loader) ReplaceInFileList

func (self *Loader) ReplaceInFileList(type_ string, key string, url string, properties interface{})

ReplaceInFileList Internal function that replaces an existing entry in the file list with a new one. Do not call directly.

func (*Loader) ReplaceInFileListI

func (self *Loader) ReplaceInFileListI(args ...interface{})

ReplaceInFileListI Internal function that replaces an existing entry in the file list with a new one. Do not call directly.

func (*Loader) Reset

func (self *Loader) Reset()

Reset Reset the loader and clear any queued assets. If `Loader.resetLocked` is true this operation will abort.

This will abort any loading and clear any queued assets.

Optionally you can clear any associated events.

func (*Loader) Reset1O

func (self *Loader) Reset1O(hard bool)

Reset1O Reset the loader and clear any queued assets. If `Loader.resetLocked` is true this operation will abort.

This will abort any loading and clear any queued assets.

Optionally you can clear any associated events.

func (*Loader) Reset2O

func (self *Loader) Reset2O(hard bool, clearEvents bool)

Reset2O Reset the loader and clear any queued assets. If `Loader.resetLocked` is true this operation will abort.

This will abort any loading and clear any queued assets.

Optionally you can clear any associated events.

func (*Loader) ResetI

func (self *Loader) ResetI(args ...interface{})

ResetI Reset the loader and clear any queued assets. If `Loader.resetLocked` is true this operation will abort.

This will abort any loading and clear any queued assets.

Optionally you can clear any associated events.

func (*Loader) ResetLocked

func (self *Loader) ResetLocked() bool

ResetLocked If true all calls to Loader.reset will be ignored. Useful if you need to create a load queue before swapping to a preloader state.

func (*Loader) Resize

func (self *Loader) Resize()

Resize Called automatically by ScaleManager when the game resizes in RESIZE scalemode.

This can be used to adjust the preloading sprite size, eg.

func (*Loader) ResizeI

func (self *Loader) ResizeI(args ...interface{})

ResizeI Called automatically by ScaleManager when the game resizes in RESIZE scalemode.

This can be used to adjust the preloading sprite size, eg.

func (*Loader) Script

func (self *Loader) Script(key string) *Loader

Script Adds a JavaScript file to the current load queue.

The file is **not** loaded immediately after calling this method. The file is added to the queue ready to be loaded when the loader starts.

The key must be a unique String.

The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.

If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is "alien" and no URL is given then the Loader will set the URL to be "alien.js". It will always add `.js` as the extension. If you do not desire this action then provide a URL.

Upon successful load the JavaScript is automatically turned into a script tag and executed, so be careful what you load!

A callback, which will be invoked as the script tag has been created, can also be specified. The callback must return relevant `data`.

func (*Loader) Script1O

func (self *Loader) Script1O(key string, url string) *Loader

Script1O Adds a JavaScript file to the current load queue.

The file is **not** loaded immediately after calling this method. The file is added to the queue ready to be loaded when the loader starts.

The key must be a unique String.

The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.

If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is "alien" and no URL is given then the Loader will set the URL to be "alien.js". It will always add `.js` as the extension. If you do not desire this action then provide a URL.

Upon successful load the JavaScript is automatically turned into a script tag and executed, so be careful what you load!

A callback, which will be invoked as the script tag has been created, can also be specified. The callback must return relevant `data`.

func (*Loader) Script2O

func (self *Loader) Script2O(key string, url string, callback interface{}) *Loader

Script2O Adds a JavaScript file to the current load queue.

The file is **not** loaded immediately after calling this method. The file is added to the queue ready to be loaded when the loader starts.

The key must be a unique String.

The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.

If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is "alien" and no URL is given then the Loader will set the URL to be "alien.js". It will always add `.js` as the extension. If you do not desire this action then provide a URL.

Upon successful load the JavaScript is automatically turned into a script tag and executed, so be careful what you load!

A callback, which will be invoked as the script tag has been created, can also be specified. The callback must return relevant `data`.

func (*Loader) Script3O

func (self *Loader) Script3O(key string, url string, callback interface{}, callbackContext interface{}) *Loader

Script3O Adds a JavaScript file to the current load queue.

The file is **not** loaded immediately after calling this method. The file is added to the queue ready to be loaded when the loader starts.

The key must be a unique String.

The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.

If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is "alien" and no URL is given then the Loader will set the URL to be "alien.js". It will always add `.js` as the extension. If you do not desire this action then provide a URL.

Upon successful load the JavaScript is automatically turned into a script tag and executed, so be careful what you load!

A callback, which will be invoked as the script tag has been created, can also be specified. The callback must return relevant `data`.

func (*Loader) ScriptI

func (self *Loader) ScriptI(args ...interface{}) *Loader

ScriptI Adds a JavaScript file to the current load queue.

The file is **not** loaded immediately after calling this method. The file is added to the queue ready to be loaded when the loader starts.

The key must be a unique String.

The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.

If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is "alien" and no URL is given then the Loader will set the URL to be "alien.js". It will always add `.js` as the extension. If you do not desire this action then provide a URL.

Upon successful load the JavaScript is automatically turned into a script tag and executed, so be careful what you load!

A callback, which will be invoked as the script tag has been created, can also be specified. The callback must return relevant `data`.

func (*Loader) SetBaseURLA

func (self *Loader) SetBaseURLA(member string)

SetBaseURLA If you want to append a URL before the path of any asset you can set this here. Useful if allowing the asset base url to be configured outside of the game code. The string _must_ end with a "/".

func (*Loader) SetCacheA

func (self *Loader) SetCacheA(member *Cache)

SetCacheA Local reference to the Phaser.Cache.

func (*Loader) SetCrossOriginA

func (self *Loader) SetCrossOriginA(member interface{})

SetCrossOriginA The crossOrigin value applied to loaded images. Very often this needs to be set to 'anonymous'.

func (*Loader) SetEnableParallelA

func (self *Loader) SetEnableParallelA(member bool)

SetEnableParallelA If true (the default) then parallel downloading will be enabled.

To disable all parallel downloads this must be set to false prior to any resource being loaded.

func (*Loader) SetGameA

func (self *Loader) SetGameA(member *Game)

SetGameA Local reference to game.

func (*Loader) SetHasLoadedA

func (self *Loader) SetHasLoadedA(member bool)

SetHasLoadedA True if all assets in the queue have finished loading.

func (*Loader) SetHeadersA

func (self *Loader) SetHeadersA(member interface{})

SetHeadersA Used to map the application mime-types to to the Accept header in XHR requests. If you don't require these mappings, or they cause problems on your server, then remove them from the headers object and the XHR request will not try to use them.

This object can also be used to set the `X-Requested-With` header to `XMLHttpRequest` (or any other value you need). To enable this do:

`this.load.headers.requestedWith = 'XMLHttpRequest'`

before adding anything to the Loader. The XHR loader will then call:

`setRequestHeader('X-Requested-With', this.headers['requestedWith'])`

func (*Loader) SetIsLoadingA

func (self *Loader) SetIsLoadingA(member bool)

SetIsLoadingA True if the Loader is in the process of loading the queue.

func (*Loader) SetMaxParallelDownloadsA

func (self *Loader) SetMaxParallelDownloadsA(member int)

SetMaxParallelDownloadsA The number of concurrent / parallel resources to try and fetch at once.

Many current browsers limit 6 requests per domain; this is slightly conservative.

func (*Loader) SetOnFileCompleteA

func (self *Loader) SetOnFileCompleteA(member *Signal)

SetOnFileCompleteA This event is dispatched when a file has either loaded or failed to load.

Any function bound to this will receive the following parameters:

progress, file key, success?, total loaded files, total files

Where progress is a number between 1 and 100 (inclusive) representing the percentage of the load.

func (*Loader) SetOnFileErrorA

func (self *Loader) SetOnFileErrorA(member *Signal)

SetOnFileErrorA This event is dispatched when a file (or pack) errors as a result of the load request.

For files it will be triggered before `onFileComplete`. For packs it will be triggered before `onPackComplete`.

Params: `(file key, file)`

func (*Loader) SetOnFileStartA

func (self *Loader) SetOnFileStartA(member *Signal)

SetOnFileStartA This event is dispatched immediately before a file starts loading. It's possible the file may fail (eg. download error, invalid format) after this event is sent.

Params: `(progress, file key, file url)`

func (*Loader) SetOnLoadCompleteA

func (self *Loader) SetOnLoadCompleteA(member *Signal)

SetOnLoadCompleteA This event is dispatched when the final file in the load queue has either loaded or failed.

func (*Loader) SetOnLoadStartA

func (self *Loader) SetOnLoadStartA(member *Signal)

SetOnLoadStartA This event is dispatched when the loading process starts: before the first file has been requested, but after all the initial packs have been loaded.

func (*Loader) SetOnPackCompleteA

func (self *Loader) SetOnPackCompleteA(member *Signal)

SetOnPackCompleteA This event is dispatched when an asset pack has either loaded or failed to load.

This is called when the asset pack manifest file has loaded and successfully added its contents to the loader queue.

Params: `(pack key, success?, total packs loaded, total packs)`

func (*Loader) SetPHYSICS_LIME_CORONA_JSONA

func (self *Loader) SetPHYSICS_LIME_CORONA_JSONA(member int)

SetPHYSICS_LIME_CORONA_JSONA empty description

func (*Loader) SetPHYSICS_PHASER_JSONA

func (self *Loader) SetPHYSICS_PHASER_JSONA(member int)

SetPHYSICS_PHASER_JSONA empty description

func (*Loader) SetPathA

func (self *Loader) SetPathA(member string)

SetPathA The value of `path`, if set, is placed before any _relative_ file path given. For example:

`load.path = "images/sprites/"; load.image("ball", "ball.png"); load.image("tree", "level1/oaktree.png"); load.image("boom", "http://server.com/explode.png");`

Would load the `ball` file from `images/sprites/ball.png` and the tree from `images/sprites/level1/oaktree.png` but the file `boom` would load from the URL given as it's an absolute URL.

Please note that the path is added before the filename but *after* the baseURL (if set.)

The string _must_ end with a "/".

func (*Loader) SetPreloadSprite

func (self *Loader) SetPreloadSprite(sprite interface{})

SetPreloadSprite Set a Sprite to be a "preload" sprite by passing it to this method.

A "preload" sprite will have its width or height crop adjusted based on the percentage of the loader in real-time. This allows you to easily make loading bars for games.

The sprite will automatically be made visible when calling this.

func (*Loader) SetPreloadSprite1O

func (self *Loader) SetPreloadSprite1O(sprite interface{}, direction int)

SetPreloadSprite1O Set a Sprite to be a "preload" sprite by passing it to this method.

A "preload" sprite will have its width or height crop adjusted based on the percentage of the loader in real-time. This allows you to easily make loading bars for games.

The sprite will automatically be made visible when calling this.

func (*Loader) SetPreloadSpriteA

func (self *Loader) SetPreloadSpriteA(member interface{})

SetPreloadSpriteA You can optionally link a progress sprite with {@link Phaser.Loader#setPreloadSprite setPreloadSprite}.

This property is an object containing: sprite, rect, direction, width and height

func (*Loader) SetPreloadSpriteI

func (self *Loader) SetPreloadSpriteI(args ...interface{})

SetPreloadSpriteI Set a Sprite to be a "preload" sprite by passing it to this method.

A "preload" sprite will have its width or height crop adjusted based on the percentage of the loader in real-time. This allows you to easily make loading bars for games.

The sprite will automatically be made visible when calling this.

func (*Loader) SetProgressA

func (self *Loader) SetProgressA(member interface{})

SetProgressA The rounded load progress percentage value (from 0 to 100). See {@link Phaser.Loader#progressFloat}.

func (*Loader) SetProgressFloatA

func (self *Loader) SetProgressFloatA(member interface{})

SetProgressFloatA The non-rounded load progress value (from 0.0 to 100.0).

A general indicator of the progress. It is possible for the progress to decrease, after `onLoadStart`, if more files are dynamically added.

func (*Loader) SetResetLockedA

func (self *Loader) SetResetLockedA(member bool)

SetResetLockedA If true all calls to Loader.reset will be ignored. Useful if you need to create a load queue before swapping to a preloader state.

func (*Loader) SetTEXTURE_ATLAS_JSON_ARRAYA

func (self *Loader) SetTEXTURE_ATLAS_JSON_ARRAYA(member int)

SetTEXTURE_ATLAS_JSON_ARRAYA empty description

func (*Loader) SetTEXTURE_ATLAS_JSON_HASHA

func (self *Loader) SetTEXTURE_ATLAS_JSON_HASHA(member int)

SetTEXTURE_ATLAS_JSON_HASHA empty description

func (*Loader) SetTEXTURE_ATLAS_JSON_PYXELA

func (self *Loader) SetTEXTURE_ATLAS_JSON_PYXELA(member int)

SetTEXTURE_ATLAS_JSON_PYXELA empty description

func (*Loader) SetTEXTURE_ATLAS_XML_STARLINGA

func (self *Loader) SetTEXTURE_ATLAS_XML_STARLINGA(member int)

SetTEXTURE_ATLAS_XML_STARLINGA empty description

func (*Loader) SetUseXDomainRequestA

func (self *Loader) SetUseXDomainRequestA(member bool)

SetUseXDomainRequestA If true and if the browser supports XDomainRequest, it will be used in preference for XHR.

This is only relevant for IE 9 and should _only_ be enabled for IE 9 clients when required by the server/CDN.

func (*Loader) Set_withSyncPointDepthA

func (self *Loader) Set_withSyncPointDepthA(member interface{})

Set_withSyncPointDepthA A counter: if more than zero, files will be automatically added as a synchronization point.

func (*Loader) Shader

func (self *Loader) Shader(key string) *Loader

Shader Adds a fragment shader file to the current load queue.

The file is **not** loaded immediately after calling this method. The file is added to the queue ready to be loaded when the loader starts.

The key must be a unique String. It is used to add the file to the Phaser.Cache upon successful load.

Retrieve the file via `Cache.getShader(key)`.

The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.

If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is "blur" and no URL is given then the Loader will set the URL to be "blur.frag". It will always add `.frag` as the extension. If you do not desire this action then provide a URL.

func (*Loader) Shader1O

func (self *Loader) Shader1O(key string, url string) *Loader

Shader1O Adds a fragment shader file to the current load queue.

The file is **not** loaded immediately after calling this method. The file is added to the queue ready to be loaded when the loader starts.

The key must be a unique String. It is used to add the file to the Phaser.Cache upon successful load.

Retrieve the file via `Cache.getShader(key)`.

The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.

If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is "blur" and no URL is given then the Loader will set the URL to be "blur.frag". It will always add `.frag` as the extension. If you do not desire this action then provide a URL.

func (*Loader) Shader2O

func (self *Loader) Shader2O(key string, url string, overwrite bool) *Loader

Shader2O Adds a fragment shader file to the current load queue.

The file is **not** loaded immediately after calling this method. The file is added to the queue ready to be loaded when the loader starts.

The key must be a unique String. It is used to add the file to the Phaser.Cache upon successful load.

Retrieve the file via `Cache.getShader(key)`.

The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.

If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is "blur" and no URL is given then the Loader will set the URL to be "blur.frag". It will always add `.frag` as the extension. If you do not desire this action then provide a URL.

func (*Loader) ShaderI

func (self *Loader) ShaderI(args ...interface{}) *Loader

ShaderI Adds a fragment shader file to the current load queue.

The file is **not** loaded immediately after calling this method. The file is added to the queue ready to be loaded when the loader starts.

The key must be a unique String. It is used to add the file to the Phaser.Cache upon successful load.

Retrieve the file via `Cache.getShader(key)`.

The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.

If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is "blur" and no URL is given then the Loader will set the URL to be "blur.frag". It will always add `.frag` as the extension. If you do not desire this action then provide a URL.

func (*Loader) Spritesheet

func (self *Loader) Spritesheet(key string, url string, frameWidth int, frameHeight int) *Loader

Spritesheet Adds a Sprite Sheet to the current load queue.

The file is **not** loaded immediately after calling this method. The file is added to the queue ready to be loaded when the loader starts.

To clarify the terminology that Phaser uses: A Sprite Sheet is an image containing frames, usually of an animation, that are all equal dimensions and often in sequence. For example if the frame size is 32x32 then every frame in the sprite sheet will be that size. Sometimes (outside of Phaser) the term "sprite sheet" is used to refer to a texture atlas. A Texture Atlas works by packing together images as best it can, using whatever frame sizes it likes, often with cropping and trimming the frames in the process. Software such as Texture Packer, Flash CC or Shoebox all generate texture atlases, not sprite sheets. If you've got an atlas then use `Loader.atlas` instead.

The key must be a unique String. It is used to add the image to the Phaser.Cache upon successful load.

Retrieve the file via `Cache.getImage(key)`. Sprite sheets, being image based, live in the same Cache as all other Images.

The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.

If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is "alien" and no URL is given then the Loader will set the URL to be "alien.png". It will always add `.png` as the extension. If you do not desire this action then provide a URL.

func (*Loader) Spritesheet1O

func (self *Loader) Spritesheet1O(key string, url string, frameWidth int, frameHeight int, frameMax int) *Loader

Spritesheet1O Adds a Sprite Sheet to the current load queue.

The file is **not** loaded immediately after calling this method. The file is added to the queue ready to be loaded when the loader starts.

To clarify the terminology that Phaser uses: A Sprite Sheet is an image containing frames, usually of an animation, that are all equal dimensions and often in sequence. For example if the frame size is 32x32 then every frame in the sprite sheet will be that size. Sometimes (outside of Phaser) the term "sprite sheet" is used to refer to a texture atlas. A Texture Atlas works by packing together images as best it can, using whatever frame sizes it likes, often with cropping and trimming the frames in the process. Software such as Texture Packer, Flash CC or Shoebox all generate texture atlases, not sprite sheets. If you've got an atlas then use `Loader.atlas` instead.

The key must be a unique String. It is used to add the image to the Phaser.Cache upon successful load.

Retrieve the file via `Cache.getImage(key)`. Sprite sheets, being image based, live in the same Cache as all other Images.

The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.

If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is "alien" and no URL is given then the Loader will set the URL to be "alien.png". It will always add `.png` as the extension. If you do not desire this action then provide a URL.

func (*Loader) Spritesheet2O

func (self *Loader) Spritesheet2O(key string, url string, frameWidth int, frameHeight int, frameMax int, margin int) *Loader

Spritesheet2O Adds a Sprite Sheet to the current load queue.

The file is **not** loaded immediately after calling this method. The file is added to the queue ready to be loaded when the loader starts.

To clarify the terminology that Phaser uses: A Sprite Sheet is an image containing frames, usually of an animation, that are all equal dimensions and often in sequence. For example if the frame size is 32x32 then every frame in the sprite sheet will be that size. Sometimes (outside of Phaser) the term "sprite sheet" is used to refer to a texture atlas. A Texture Atlas works by packing together images as best it can, using whatever frame sizes it likes, often with cropping and trimming the frames in the process. Software such as Texture Packer, Flash CC or Shoebox all generate texture atlases, not sprite sheets. If you've got an atlas then use `Loader.atlas` instead.

The key must be a unique String. It is used to add the image to the Phaser.Cache upon successful load.

Retrieve the file via `Cache.getImage(key)`. Sprite sheets, being image based, live in the same Cache as all other Images.

The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.

If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is "alien" and no URL is given then the Loader will set the URL to be "alien.png". It will always add `.png` as the extension. If you do not desire this action then provide a URL.

func (*Loader) Spritesheet3O

func (self *Loader) Spritesheet3O(key string, url string, frameWidth int, frameHeight int, frameMax int, margin int, spacing int) *Loader

Spritesheet3O Adds a Sprite Sheet to the current load queue.

The file is **not** loaded immediately after calling this method. The file is added to the queue ready to be loaded when the loader starts.

To clarify the terminology that Phaser uses: A Sprite Sheet is an image containing frames, usually of an animation, that are all equal dimensions and often in sequence. For example if the frame size is 32x32 then every frame in the sprite sheet will be that size. Sometimes (outside of Phaser) the term "sprite sheet" is used to refer to a texture atlas. A Texture Atlas works by packing together images as best it can, using whatever frame sizes it likes, often with cropping and trimming the frames in the process. Software such as Texture Packer, Flash CC or Shoebox all generate texture atlases, not sprite sheets. If you've got an atlas then use `Loader.atlas` instead.

The key must be a unique String. It is used to add the image to the Phaser.Cache upon successful load.

Retrieve the file via `Cache.getImage(key)`. Sprite sheets, being image based, live in the same Cache as all other Images.

The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.

If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is "alien" and no URL is given then the Loader will set the URL to be "alien.png". It will always add `.png` as the extension. If you do not desire this action then provide a URL.

func (*Loader) SpritesheetI

func (self *Loader) SpritesheetI(args ...interface{}) *Loader

SpritesheetI Adds a Sprite Sheet to the current load queue.

The file is **not** loaded immediately after calling this method. The file is added to the queue ready to be loaded when the loader starts.

To clarify the terminology that Phaser uses: A Sprite Sheet is an image containing frames, usually of an animation, that are all equal dimensions and often in sequence. For example if the frame size is 32x32 then every frame in the sprite sheet will be that size. Sometimes (outside of Phaser) the term "sprite sheet" is used to refer to a texture atlas. A Texture Atlas works by packing together images as best it can, using whatever frame sizes it likes, often with cropping and trimming the frames in the process. Software such as Texture Packer, Flash CC or Shoebox all generate texture atlases, not sprite sheets. If you've got an atlas then use `Loader.atlas` instead.

The key must be a unique String. It is used to add the image to the Phaser.Cache upon successful load.

Retrieve the file via `Cache.getImage(key)`. Sprite sheets, being image based, live in the same Cache as all other Images.

The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.

If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is "alien" and no URL is given then the Loader will set the URL to be "alien.png". It will always add `.png` as the extension. If you do not desire this action then provide a URL.

func (*Loader) Start

func (self *Loader) Start()

Start Start loading the assets. Normally you don't need to call this yourself as the StateManager will do so.

func (*Loader) StartI

func (self *Loader) StartI(args ...interface{})

StartI Start loading the assets. Normally you don't need to call this yourself as the StateManager will do so.

func (*Loader) TEXTURE_ATLAS_JSON_ARRAY

func (self *Loader) TEXTURE_ATLAS_JSON_ARRAY() int

TEXTURE_ATLAS_JSON_ARRAY empty description

func (*Loader) TEXTURE_ATLAS_JSON_HASH

func (self *Loader) TEXTURE_ATLAS_JSON_HASH() int

TEXTURE_ATLAS_JSON_HASH empty description

func (*Loader) TEXTURE_ATLAS_JSON_PYXEL

func (self *Loader) TEXTURE_ATLAS_JSON_PYXEL() int

TEXTURE_ATLAS_JSON_PYXEL empty description

func (*Loader) TEXTURE_ATLAS_XML_STARLING

func (self *Loader) TEXTURE_ATLAS_XML_STARLING() int

TEXTURE_ATLAS_XML_STARLING empty description

func (*Loader) Text

func (self *Loader) Text(key string) *Loader

Text Adds a Text file to the current load queue.

The file is **not** loaded immediately after calling this method. The file is added to the queue ready to be loaded when the loader starts.

The key must be a unique String. It is used to add the file to the Phaser.Cache upon successful load.

Retrieve the file via `Cache.getText(key)`

The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.

If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is "alien" and no URL is given then the Loader will set the URL to be "alien.txt". It will always add `.txt` as the extension. If you do not desire this action then provide a URL.

func (*Loader) Text1O

func (self *Loader) Text1O(key string, url string) *Loader

Text1O Adds a Text file to the current load queue.

The file is **not** loaded immediately after calling this method. The file is added to the queue ready to be loaded when the loader starts.

The key must be a unique String. It is used to add the file to the Phaser.Cache upon successful load.

Retrieve the file via `Cache.getText(key)`

The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.

If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is "alien" and no URL is given then the Loader will set the URL to be "alien.txt". It will always add `.txt` as the extension. If you do not desire this action then provide a URL.

func (*Loader) Text2O

func (self *Loader) Text2O(key string, url string, overwrite bool) *Loader

Text2O Adds a Text file to the current load queue.

The file is **not** loaded immediately after calling this method. The file is added to the queue ready to be loaded when the loader starts.

The key must be a unique String. It is used to add the file to the Phaser.Cache upon successful load.

Retrieve the file via `Cache.getText(key)`

The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.

If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is "alien" and no URL is given then the Loader will set the URL to be "alien.txt". It will always add `.txt` as the extension. If you do not desire this action then provide a URL.

func (*Loader) TextI

func (self *Loader) TextI(args ...interface{}) *Loader

TextI Adds a Text file to the current load queue.

The file is **not** loaded immediately after calling this method. The file is added to the queue ready to be loaded when the loader starts.

The key must be a unique String. It is used to add the file to the Phaser.Cache upon successful load.

Retrieve the file via `Cache.getText(key)`

The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.

If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is "alien" and no URL is given then the Loader will set the URL to be "alien.txt". It will always add `.txt` as the extension. If you do not desire this action then provide a URL.

func (*Loader) Tilemap

func (self *Loader) Tilemap(key string) *Loader

Tilemap Adds a Tile Map data file to the current load queue.

Phaser can load data in two different formats: CSV and Tiled JSON.

Tiled is a free software package, specifically for creating tilemaps, and is available from http://www.mapeditor.org

You can choose to either load the data externally, by providing a URL to a json file. Or you can pass in a JSON object or String via the `data` parameter. If you pass a String the data is automatically run through `JSON.parse` and then immediately added to the Phaser.Cache.

If a URL is provided the file is **not** loaded immediately after calling this method, but is added to the load queue.

The key must be a unique String. It is used to add the file to the Phaser.Cache upon successful load.

Retrieve the file via `Cache.getTilemapData(key)`. JSON files are automatically parsed upon load. If you need to control when the JSON is parsed then use `Loader.text` instead and parse the text file as needed.

The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.

If the URL isn't specified and no data is given then the Loader will take the key and create a filename from that. For example if the key is "level1" and no URL or data is given then the Loader will set the URL to be "level1.json". If you set the format to be Tilemap.CSV it will set the URL to be "level1.csv" instead.

If you do not desire this action then provide a URL or data object.

func (*Loader) Tilemap1O

func (self *Loader) Tilemap1O(key string, url string) *Loader

Tilemap1O Adds a Tile Map data file to the current load queue.

Phaser can load data in two different formats: CSV and Tiled JSON.

Tiled is a free software package, specifically for creating tilemaps, and is available from http://www.mapeditor.org

You can choose to either load the data externally, by providing a URL to a json file. Or you can pass in a JSON object or String via the `data` parameter. If you pass a String the data is automatically run through `JSON.parse` and then immediately added to the Phaser.Cache.

If a URL is provided the file is **not** loaded immediately after calling this method, but is added to the load queue.

The key must be a unique String. It is used to add the file to the Phaser.Cache upon successful load.

Retrieve the file via `Cache.getTilemapData(key)`. JSON files are automatically parsed upon load. If you need to control when the JSON is parsed then use `Loader.text` instead and parse the text file as needed.

The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.

If the URL isn't specified and no data is given then the Loader will take the key and create a filename from that. For example if the key is "level1" and no URL or data is given then the Loader will set the URL to be "level1.json". If you set the format to be Tilemap.CSV it will set the URL to be "level1.csv" instead.

If you do not desire this action then provide a URL or data object.

func (*Loader) Tilemap2O

func (self *Loader) Tilemap2O(key string, url string, data interface{}) *Loader

Tilemap2O Adds a Tile Map data file to the current load queue.

Phaser can load data in two different formats: CSV and Tiled JSON.

Tiled is a free software package, specifically for creating tilemaps, and is available from http://www.mapeditor.org

You can choose to either load the data externally, by providing a URL to a json file. Or you can pass in a JSON object or String via the `data` parameter. If you pass a String the data is automatically run through `JSON.parse` and then immediately added to the Phaser.Cache.

If a URL is provided the file is **not** loaded immediately after calling this method, but is added to the load queue.

The key must be a unique String. It is used to add the file to the Phaser.Cache upon successful load.

Retrieve the file via `Cache.getTilemapData(key)`. JSON files are automatically parsed upon load. If you need to control when the JSON is parsed then use `Loader.text` instead and parse the text file as needed.

The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.

If the URL isn't specified and no data is given then the Loader will take the key and create a filename from that. For example if the key is "level1" and no URL or data is given then the Loader will set the URL to be "level1.json". If you set the format to be Tilemap.CSV it will set the URL to be "level1.csv" instead.

If you do not desire this action then provide a URL or data object.

func (*Loader) Tilemap3O

func (self *Loader) Tilemap3O(key string, url string, data interface{}, format int) *Loader

Tilemap3O Adds a Tile Map data file to the current load queue.

Phaser can load data in two different formats: CSV and Tiled JSON.

Tiled is a free software package, specifically for creating tilemaps, and is available from http://www.mapeditor.org

You can choose to either load the data externally, by providing a URL to a json file. Or you can pass in a JSON object or String via the `data` parameter. If you pass a String the data is automatically run through `JSON.parse` and then immediately added to the Phaser.Cache.

If a URL is provided the file is **not** loaded immediately after calling this method, but is added to the load queue.

The key must be a unique String. It is used to add the file to the Phaser.Cache upon successful load.

Retrieve the file via `Cache.getTilemapData(key)`. JSON files are automatically parsed upon load. If you need to control when the JSON is parsed then use `Loader.text` instead and parse the text file as needed.

The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.

If the URL isn't specified and no data is given then the Loader will take the key and create a filename from that. For example if the key is "level1" and no URL or data is given then the Loader will set the URL to be "level1.json". If you set the format to be Tilemap.CSV it will set the URL to be "level1.csv" instead.

If you do not desire this action then provide a URL or data object.

func (*Loader) TilemapI

func (self *Loader) TilemapI(args ...interface{}) *Loader

TilemapI Adds a Tile Map data file to the current load queue.

Phaser can load data in two different formats: CSV and Tiled JSON.

Tiled is a free software package, specifically for creating tilemaps, and is available from http://www.mapeditor.org

You can choose to either load the data externally, by providing a URL to a json file. Or you can pass in a JSON object or String via the `data` parameter. If you pass a String the data is automatically run through `JSON.parse` and then immediately added to the Phaser.Cache.

If a URL is provided the file is **not** loaded immediately after calling this method, but is added to the load queue.

The key must be a unique String. It is used to add the file to the Phaser.Cache upon successful load.

Retrieve the file via `Cache.getTilemapData(key)`. JSON files are automatically parsed upon load. If you need to control when the JSON is parsed then use `Loader.text` instead and parse the text file as needed.

The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.

If the URL isn't specified and no data is given then the Loader will take the key and create a filename from that. For example if the key is "level1" and no URL or data is given then the Loader will set the URL to be "level1.json". If you set the format to be Tilemap.CSV it will set the URL to be "level1.csv" instead.

If you do not desire this action then provide a URL or data object.

func (*Loader) TotalLoadedFiles

func (self *Loader) TotalLoadedFiles() int

TotalLoadedFiles Returns the number of files that have already been loaded, even if they errored.

func (*Loader) TotalLoadedFilesI

func (self *Loader) TotalLoadedFilesI(args ...interface{}) int

TotalLoadedFilesI Returns the number of files that have already been loaded, even if they errored.

func (*Loader) TotalLoadedPacks

func (self *Loader) TotalLoadedPacks() int

TotalLoadedPacks Returns the number of asset packs that have already been loaded, even if they errored.

func (*Loader) TotalLoadedPacksI

func (self *Loader) TotalLoadedPacksI(args ...interface{}) int

TotalLoadedPacksI Returns the number of asset packs that have already been loaded, even if they errored.

func (*Loader) TotalQueuedFiles

func (self *Loader) TotalQueuedFiles() int

TotalQueuedFiles Returns the number of files still waiting to be processed in the load queue. This value decreases as each file in the queue is loaded.

func (*Loader) TotalQueuedFilesI

func (self *Loader) TotalQueuedFilesI(args ...interface{}) int

TotalQueuedFilesI Returns the number of files still waiting to be processed in the load queue. This value decreases as each file in the queue is loaded.

func (*Loader) TotalQueuedPacks

func (self *Loader) TotalQueuedPacks() int

TotalQueuedPacks Returns the number of asset packs still waiting to be processed in the load queue. This value decreases as each pack in the queue is loaded.

func (*Loader) TotalQueuedPacksI

func (self *Loader) TotalQueuedPacksI(args ...interface{}) int

TotalQueuedPacksI Returns the number of asset packs still waiting to be processed in the load queue. This value decreases as each pack in the queue is loaded.

func (*Loader) TransformUrl

func (self *Loader) TransformUrl(url string, file interface{}) string

TransformUrl Transforms the asset URL.

The default implementation prepends the baseURL if the url doesn't begin with http or //

func (*Loader) TransformUrlI

func (self *Loader) TransformUrlI(args ...interface{}) string

TransformUrlI Transforms the asset URL.

The default implementation prepends the baseURL if the url doesn't begin with http or //

func (*Loader) UseXDomainRequest

func (self *Loader) UseXDomainRequest() bool

UseXDomainRequest If true and if the browser supports XDomainRequest, it will be used in preference for XHR.

This is only relevant for IE 9 and should _only_ be enabled for IE 9 clients when required by the server/CDN.

func (*Loader) Video

func (self *Loader) Video(key string, urls interface{}) *Loader

Video Adds a video file to the current load queue.

The file is **not** loaded immediately after calling this method. The file is added to the queue ready to be loaded when the loader starts.

The key must be a unique String. It is used to add the file to the Phaser.Cache upon successful load.

Retrieve the file via `Cache.getVideo(key)`.

The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.

You don't need to preload a video in order to play it in your game. See `Video.createVideoFromURL` for details.

func (*Loader) Video1O

func (self *Loader) Video1O(key string, urls interface{}, loadEvent string) *Loader

Video1O Adds a video file to the current load queue.

The file is **not** loaded immediately after calling this method. The file is added to the queue ready to be loaded when the loader starts.

The key must be a unique String. It is used to add the file to the Phaser.Cache upon successful load.

Retrieve the file via `Cache.getVideo(key)`.

The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.

You don't need to preload a video in order to play it in your game. See `Video.createVideoFromURL` for details.

func (*Loader) Video2O

func (self *Loader) Video2O(key string, urls interface{}, loadEvent string, asBlob bool) *Loader

Video2O Adds a video file to the current load queue.

The file is **not** loaded immediately after calling this method. The file is added to the queue ready to be loaded when the loader starts.

The key must be a unique String. It is used to add the file to the Phaser.Cache upon successful load.

Retrieve the file via `Cache.getVideo(key)`.

The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.

You don't need to preload a video in order to play it in your game. See `Video.createVideoFromURL` for details.

func (*Loader) VideoI

func (self *Loader) VideoI(args ...interface{}) *Loader

VideoI Adds a video file to the current load queue.

The file is **not** loaded immediately after calling this method. The file is added to the queue ready to be loaded when the loader starts.

The key must be a unique String. It is used to add the file to the Phaser.Cache upon successful load.

Retrieve the file via `Cache.getVideo(key)`.

The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.

You don't need to preload a video in order to play it in your game. See `Video.createVideoFromURL` for details.

func (*Loader) WithSyncPoints

func (self *Loader) WithSyncPoints(callback interface{}) *Loader

WithSyncPoints Add a synchronization point to the assets/files added within the supplied callback.

A synchronization point denotes that an asset _must_ be completely loaded before subsequent assets can be loaded. An asset marked as a sync-point does not need to wait for previous assets to load (unless they are sync-points). Resources, such as packs, may still be downloaded around sync-points, as long as they do not finalize loading.

func (*Loader) WithSyncPoints1O

func (self *Loader) WithSyncPoints1O(callback interface{}, callbackContext interface{}) *Loader

WithSyncPoints1O Add a synchronization point to the assets/files added within the supplied callback.

A synchronization point denotes that an asset _must_ be completely loaded before subsequent assets can be loaded. An asset marked as a sync-point does not need to wait for previous assets to load (unless they are sync-points). Resources, such as packs, may still be downloaded around sync-points, as long as they do not finalize loading.

func (*Loader) WithSyncPointsI

func (self *Loader) WithSyncPointsI(args ...interface{}) *Loader

WithSyncPointsI Add a synchronization point to the assets/files added within the supplied callback.

A synchronization point denotes that an asset _must_ be completely loaded before subsequent assets can be loaded. An asset marked as a sync-point does not need to wait for previous assets to load (unless they are sync-points). Resources, such as packs, may still be downloaded around sync-points, as long as they do not finalize loading.

func (*Loader) XhrLoad

func (self *Loader) XhrLoad(file interface{}, url string, type_ string, onload interface{})

XhrLoad Starts the xhr loader.

This is designed specifically to use with asset file processing.

func (*Loader) XhrLoad1O

func (self *Loader) XhrLoad1O(file interface{}, url string, type_ string, onload interface{}, onerror interface{})

XhrLoad1O Starts the xhr loader.

This is designed specifically to use with asset file processing.

func (*Loader) XhrLoadI

func (self *Loader) XhrLoadI(args ...interface{})

XhrLoadI Starts the xhr loader.

This is designed specifically to use with asset file processing.

func (*Loader) Xml

func (self *Loader) Xml(key string) *Loader

Xml Adds an XML file to the current load queue.

The file is **not** loaded immediately after calling this method. The file is added to the queue ready to be loaded when the loader starts.

The key must be a unique String. It is used to add the file to the Phaser.Cache upon successful load.

Retrieve the file via `Cache.getXML(key)`.

The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.

If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is "alien" and no URL is given then the Loader will set the URL to be "alien.xml". It will always add `.xml` as the extension. If you do not desire this action then provide a URL.

func (*Loader) Xml1O

func (self *Loader) Xml1O(key string, url string) *Loader

Xml1O Adds an XML file to the current load queue.

The file is **not** loaded immediately after calling this method. The file is added to the queue ready to be loaded when the loader starts.

The key must be a unique String. It is used to add the file to the Phaser.Cache upon successful load.

Retrieve the file via `Cache.getXML(key)`.

The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.

If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is "alien" and no URL is given then the Loader will set the URL to be "alien.xml". It will always add `.xml` as the extension. If you do not desire this action then provide a URL.

func (*Loader) Xml2O

func (self *Loader) Xml2O(key string, url string, overwrite bool) *Loader

Xml2O Adds an XML file to the current load queue.

The file is **not** loaded immediately after calling this method. The file is added to the queue ready to be loaded when the loader starts.

The key must be a unique String. It is used to add the file to the Phaser.Cache upon successful load.

Retrieve the file via `Cache.getXML(key)`.

The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.

If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is "alien" and no URL is given then the Loader will set the URL to be "alien.xml". It will always add `.xml` as the extension. If you do not desire this action then provide a URL.

func (*Loader) XmlI

func (self *Loader) XmlI(args ...interface{}) *Loader

XmlI Adds an XML file to the current load queue.

The file is **not** loaded immediately after calling this method. The file is added to the queue ready to be loaded when the loader starts.

The key must be a unique String. It is used to add the file to the Phaser.Cache upon successful load.

Retrieve the file via `Cache.getXML(key)`.

The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.

If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is "alien" and no URL is given then the Loader will set the URL to be "alien.xml". It will always add `.xml` as the extension. If you do not desire this action then provide a URL.

func (*Loader) XmlLoadComplete

func (self *Loader) XmlLoadComplete(file interface{}, xhr *XMLHttpRequest)

XmlLoadComplete Successfully loaded an XML file - only used for certain types.

func (*Loader) XmlLoadCompleteI

func (self *Loader) XmlLoadCompleteI(args ...interface{})

XmlLoadCompleteI Successfully loaded an XML file - only used for certain types.

type LoaderParser

type LoaderParser struct {
	*js.Object
}

LoaderParser Phaser.LoaderParser parses data objects from Phaser.Loader that need more preparation before they can be inserted into the Cache.

func NewLoaderParser

func NewLoaderParser() *LoaderParser

NewLoaderParser Phaser.LoaderParser parses data objects from Phaser.Loader that need more preparation before they can be inserted into the Cache.

func NewLoaderParserI

func NewLoaderParserI(args ...interface{}) *LoaderParser

NewLoaderParserI Phaser.LoaderParser parses data objects from Phaser.Loader that need more preparation before they can be inserted into the Cache.

func ToLoaderParser

func ToLoaderParser(jsStruct interface{}) *LoaderParser

LoaderParser Binding conversion method to LoaderParser point

func (*LoaderParser) BitmapFont

func (self *LoaderParser) BitmapFont(xml interface{}, baseTexture *BaseTexture) interface{}

BitmapFont Alias for xmlBitmapFont, for backwards compatibility.

func (*LoaderParser) BitmapFont1O

func (self *LoaderParser) BitmapFont1O(xml interface{}, baseTexture *BaseTexture, xSpacing int) interface{}

BitmapFont1O Alias for xmlBitmapFont, for backwards compatibility.

func (*LoaderParser) BitmapFont2O

func (self *LoaderParser) BitmapFont2O(xml interface{}, baseTexture *BaseTexture, xSpacing int, ySpacing int) interface{}

BitmapFont2O Alias for xmlBitmapFont, for backwards compatibility.

func (*LoaderParser) BitmapFontI

func (self *LoaderParser) BitmapFontI(args ...interface{}) interface{}

BitmapFontI Alias for xmlBitmapFont, for backwards compatibility.

func (*LoaderParser) FinalizeBitmapFont

func (self *LoaderParser) FinalizeBitmapFont(baseTexture *BaseTexture, bitmapFontData interface{}) interface{}

FinalizeBitmapFont Finalize Bitmap Font parsing.

func (*LoaderParser) FinalizeBitmapFontI

func (self *LoaderParser) FinalizeBitmapFontI(args ...interface{}) interface{}

FinalizeBitmapFontI Finalize Bitmap Font parsing.

func (*LoaderParser) JsonBitmapFont

func (self *LoaderParser) JsonBitmapFont(json interface{}, baseTexture *BaseTexture) interface{}

JsonBitmapFont Parse a Bitmap Font from a JSON file.

func (*LoaderParser) JsonBitmapFont1O

func (self *LoaderParser) JsonBitmapFont1O(json interface{}, baseTexture *BaseTexture, xSpacing int) interface{}

JsonBitmapFont1O Parse a Bitmap Font from a JSON file.

func (*LoaderParser) JsonBitmapFont2O

func (self *LoaderParser) JsonBitmapFont2O(json interface{}, baseTexture *BaseTexture, xSpacing int, ySpacing int) interface{}

JsonBitmapFont2O Parse a Bitmap Font from a JSON file.

func (*LoaderParser) JsonBitmapFontI

func (self *LoaderParser) JsonBitmapFontI(args ...interface{}) interface{}

JsonBitmapFontI Parse a Bitmap Font from a JSON file.

func (*LoaderParser) XmlBitmapFont

func (self *LoaderParser) XmlBitmapFont(xml interface{}, baseTexture *BaseTexture) interface{}

XmlBitmapFont Parse a Bitmap Font from an XML file.

func (*LoaderParser) XmlBitmapFont1O

func (self *LoaderParser) XmlBitmapFont1O(xml interface{}, baseTexture *BaseTexture, xSpacing int) interface{}

XmlBitmapFont1O Parse a Bitmap Font from an XML file.

func (*LoaderParser) XmlBitmapFont2O

func (self *LoaderParser) XmlBitmapFont2O(xml interface{}, baseTexture *BaseTexture, xSpacing int, ySpacing int) interface{}

XmlBitmapFont2O Parse a Bitmap Font from an XML file.

func (*LoaderParser) XmlBitmapFontI

func (self *LoaderParser) XmlBitmapFontI(args ...interface{}) interface{}

XmlBitmapFontI Parse a Bitmap Font from an XML file.

type MSPointer

type MSPointer struct {
	*js.Object
}

MSPointer The MSPointer class handles Microsoft touch interactions with the game and the resulting Pointer objects.

It will work only in Internet Explorer 10+ and Windows Store or Windows Phone 8 apps using JavaScript. http://msdn.microsoft.com/en-us/library/ie/hh673557(v=vs.85).aspx

You should not normally access this class directly, but instead use a Phaser.Pointer object which normalises all game input for you including accurate button handling.

Please note that at the current time of writing Phaser does not yet support chorded button interactions: http://www.w3.org/TR/pointerevents/#chorded-button-interactions

func NewMSPointer

func NewMSPointer(game *Game) *MSPointer

NewMSPointer The MSPointer class handles Microsoft touch interactions with the game and the resulting Pointer objects.

It will work only in Internet Explorer 10+ and Windows Store or Windows Phone 8 apps using JavaScript. http://msdn.microsoft.com/en-us/library/ie/hh673557(v=vs.85).aspx

You should not normally access this class directly, but instead use a Phaser.Pointer object which normalises all game input for you including accurate button handling.

Please note that at the current time of writing Phaser does not yet support chorded button interactions: http://www.w3.org/TR/pointerevents/#chorded-button-interactions

func NewMSPointerI

func NewMSPointerI(args ...interface{}) *MSPointer

NewMSPointerI The MSPointer class handles Microsoft touch interactions with the game and the resulting Pointer objects.

It will work only in Internet Explorer 10+ and Windows Store or Windows Phone 8 apps using JavaScript. http://msdn.microsoft.com/en-us/library/ie/hh673557(v=vs.85).aspx

You should not normally access this class directly, but instead use a Phaser.Pointer object which normalises all game input for you including accurate button handling.

Please note that at the current time of writing Phaser does not yet support chorded button interactions: http://www.w3.org/TR/pointerevents/#chorded-button-interactions

func ToMSPointer

func ToMSPointer(jsStruct interface{}) *MSPointer

MSPointer Binding conversion method to MSPointer point

func (*MSPointer) Button

func (self *MSPointer) Button() int

Button This property was removed in Phaser 2.4 and should no longer be used. Instead please see the Pointer button properties such as `Pointer.leftButton`, `Pointer.rightButton` and so on. Or Pointer.button holds the DOM event button value if you require that.

func (*MSPointer) CallbackContext

func (self *MSPointer) CallbackContext() interface{}

CallbackContext The context under which callbacks are called (defaults to game).

func (*MSPointer) Capture

func (self *MSPointer) Capture() bool

Capture If true the Pointer events will have event.preventDefault applied to them, if false they will propagate fully.

func (*MSPointer) Enabled

func (self *MSPointer) Enabled() bool

Enabled MSPointer input will only be processed if enabled.

func (*MSPointer) Event

func (self *MSPointer) Event() interface{}

Event The browser MSPointer DOM event. Will be null if no event has ever been received. Access this property only inside a Pointer event handler and do not keep references to it.

func (*MSPointer) Game

func (self *MSPointer) Game() *Game

Game A reference to the currently running game.

func (*MSPointer) Input

func (self *MSPointer) Input() *Input

Input A reference to the Phaser Input Manager.

func (*MSPointer) OnPointerDown

func (self *MSPointer) OnPointerDown(event *PointerEvent)

OnPointerDown The function that handles the PointerDown event.

func (*MSPointer) OnPointerDownI

func (self *MSPointer) OnPointerDownI(args ...interface{})

OnPointerDownI The function that handles the PointerDown event.

func (*MSPointer) OnPointerMove

func (self *MSPointer) OnPointerMove(event *PointerEvent)

OnPointerMove The function that handles the PointerMove event.

func (*MSPointer) OnPointerMoveI

func (self *MSPointer) OnPointerMoveI(args ...interface{})

OnPointerMoveI The function that handles the PointerMove event.

func (*MSPointer) OnPointerOut

func (self *MSPointer) OnPointerOut(event *PointerEvent)

OnPointerOut The internal method that handles the pointer out event from the browser.

func (*MSPointer) OnPointerOutI

func (self *MSPointer) OnPointerOutI(args ...interface{})

OnPointerOutI The internal method that handles the pointer out event from the browser.

func (*MSPointer) OnPointerUp

func (self *MSPointer) OnPointerUp(event *PointerEvent)

OnPointerUp The function that handles the PointerUp event.

func (*MSPointer) OnPointerUpGlobal

func (self *MSPointer) OnPointerUpGlobal(event *PointerEvent)

OnPointerUpGlobal The internal method that handles the mouse up event from the window.

func (*MSPointer) OnPointerUpGlobalI

func (self *MSPointer) OnPointerUpGlobalI(args ...interface{})

OnPointerUpGlobalI The internal method that handles the mouse up event from the window.

func (*MSPointer) OnPointerUpI

func (self *MSPointer) OnPointerUpI(args ...interface{})

OnPointerUpI The function that handles the PointerUp event.

func (*MSPointer) PointerDownCallback

func (self *MSPointer) PointerDownCallback() interface{}

PointerDownCallback A callback that can be fired on a MSPointerDown event.

func (*MSPointer) PointerMoveCallback

func (self *MSPointer) PointerMoveCallback() interface{}

PointerMoveCallback A callback that can be fired on a MSPointerMove event.

func (*MSPointer) PointerUpCallback

func (self *MSPointer) PointerUpCallback() interface{}

PointerUpCallback A callback that can be fired on a MSPointerUp event.

func (*MSPointer) SetButtonA

func (self *MSPointer) SetButtonA(member int)

SetButtonA This property was removed in Phaser 2.4 and should no longer be used. Instead please see the Pointer button properties such as `Pointer.leftButton`, `Pointer.rightButton` and so on. Or Pointer.button holds the DOM event button value if you require that.

func (*MSPointer) SetCallbackContextA

func (self *MSPointer) SetCallbackContextA(member interface{})

SetCallbackContextA The context under which callbacks are called (defaults to game).

func (*MSPointer) SetCaptureA

func (self *MSPointer) SetCaptureA(member bool)

SetCaptureA If true the Pointer events will have event.preventDefault applied to them, if false they will propagate fully.

func (*MSPointer) SetEnabledA

func (self *MSPointer) SetEnabledA(member bool)

SetEnabledA MSPointer input will only be processed if enabled.

func (*MSPointer) SetEventA

func (self *MSPointer) SetEventA(member interface{})

SetEventA The browser MSPointer DOM event. Will be null if no event has ever been received. Access this property only inside a Pointer event handler and do not keep references to it.

func (*MSPointer) SetGameA

func (self *MSPointer) SetGameA(member *Game)

SetGameA A reference to the currently running game.

func (*MSPointer) SetInputA

func (self *MSPointer) SetInputA(member *Input)

SetInputA A reference to the Phaser Input Manager.

func (*MSPointer) SetPointerDownCallbackA

func (self *MSPointer) SetPointerDownCallbackA(member interface{})

SetPointerDownCallbackA A callback that can be fired on a MSPointerDown event.

func (*MSPointer) SetPointerMoveCallbackA

func (self *MSPointer) SetPointerMoveCallbackA(member interface{})

SetPointerMoveCallbackA A callback that can be fired on a MSPointerMove event.

func (*MSPointer) SetPointerUpCallbackA

func (self *MSPointer) SetPointerUpCallbackA(member interface{})

SetPointerUpCallbackA A callback that can be fired on a MSPointerUp event.

func (*MSPointer) Start

func (self *MSPointer) Start()

Start Starts the event listeners running.

func (*MSPointer) StartI

func (self *MSPointer) StartI(args ...interface{})

StartI Starts the event listeners running.

func (*MSPointer) Stop

func (self *MSPointer) Stop()

Stop Stop the event listeners.

func (*MSPointer) StopI

func (self *MSPointer) StopI(args ...interface{})

StopI Stop the event listeners.

type Mat2

type Mat2 struct {
	*js.Object
}

Mat2 empty description

func NewMat2

func NewMat2() *Mat2

NewMat2 empty description

func NewMat2I

func NewMat2I(args ...interface{}) *Mat2

NewMat2I empty description

func ToMat2

func ToMat2(jsStruct interface{}) *Mat2

Mat2 Binding conversion method to Mat2 point

type Mat2d

type Mat2d struct {
	*js.Object
}

Mat2d A mat2d contains six elements defined as: <pre> [a, c, tx,

b, d, ty]

</pre> This is a short form for the 3x3 matrix: <pre> [a, c, tx,

b, d, ty,
0, 0, 1]

</pre> The last row is ignored so the array is shorter and operations are faster.

func NewMat2d

func NewMat2d() *Mat2d

NewMat2d A mat2d contains six elements defined as: <pre> [a, c, tx,

b, d, ty]

</pre> This is a short form for the 3x3 matrix: <pre> [a, c, tx,

b, d, ty,
0, 0, 1]

</pre> The last row is ignored so the array is shorter and operations are faster.

func NewMat2dI

func NewMat2dI(args ...interface{}) *Mat2d

NewMat2dI A mat2d contains six elements defined as: <pre> [a, c, tx,

b, d, ty]

</pre> This is a short form for the 3x3 matrix: <pre> [a, c, tx,

b, d, ty,
0, 0, 1]

</pre> The last row is ignored so the array is shorter and operations are faster.

func ToMat2d

func ToMat2d(jsStruct interface{}) *Mat2d

Mat2d Binding conversion method to Mat2d point

type Mat3

type Mat3 struct {
	*js.Object
}

Mat3 empty description

func NewMat3

func NewMat3() *Mat3

NewMat3 empty description

func NewMat3I

func NewMat3I(args ...interface{}) *Mat3

NewMat3I empty description

func ToMat3

func ToMat3(jsStruct interface{}) *Mat3

Mat3 Binding conversion method to Mat3 point

type Mat4

type Mat4 struct {
	*js.Object
}

Mat4 empty description

func NewMat4

func NewMat4() *Mat4

NewMat4 empty description

func NewMat4I

func NewMat4I(args ...interface{}) *Mat4

NewMat4I empty description

func ToMat4

func ToMat4(jsStruct interface{}) *Mat4

Mat4 Binding conversion method to Mat4 point

type Math

type Math struct {
	*js.Object
}

Math A collection of useful mathematical functions.

These are normally accessed through `game.math`.

func NewMath

func NewMath() *Math

NewMath A collection of useful mathematical functions.

These are normally accessed through `game.math`.

func NewMathI

func NewMathI(args ...interface{}) *Math

NewMathI A collection of useful mathematical functions.

These are normally accessed through `game.math`.

func ToMath

func ToMath(jsStruct interface{}) *Math

Math Binding conversion method to Math point

func (*Math) AngleBetween

func (self *Math) AngleBetween(x1 int, y1 int, x2 int, y2 int) int

AngleBetween Find the angle of a segment from (x1, y1) -> (x2, y2).

func (*Math) AngleBetweenI

func (self *Math) AngleBetweenI(args ...interface{}) int

AngleBetweenI Find the angle of a segment from (x1, y1) -> (x2, y2).

func (*Math) AngleBetweenPoints

func (self *Math) AngleBetweenPoints(point1 *Point, point2 *Point) int

AngleBetweenPoints Find the angle of a segment from (point1.x, point1.y) -> (point2.x, point2.y).

func (*Math) AngleBetweenPointsI

func (self *Math) AngleBetweenPointsI(args ...interface{}) int

AngleBetweenPointsI Find the angle of a segment from (point1.x, point1.y) -> (point2.x, point2.y).

func (*Math) AngleBetweenPointsY

func (self *Math) AngleBetweenPointsY(point1 *Point, point2 *Point) int

AngleBetweenPointsY Find the angle of a segment from (point1.x, point1.y) -> (point2.x, point2.y).

func (*Math) AngleBetweenPointsYI

func (self *Math) AngleBetweenPointsYI(args ...interface{}) int

AngleBetweenPointsYI Find the angle of a segment from (point1.x, point1.y) -> (point2.x, point2.y).

func (*Math) AngleBetweenY

func (self *Math) AngleBetweenY(x1 int, y1 int, x2 int, y2 int) int

AngleBetweenY Find the angle of a segment from (x1, y1) -> (x2, y2).

The difference between this method and Math.angleBetween is that this assumes the y coordinate travels down the screen.

func (*Math) AngleBetweenYI

func (self *Math) AngleBetweenYI(args ...interface{}) int

AngleBetweenYI Find the angle of a segment from (x1, y1) -> (x2, y2).

The difference between this method and Math.angleBetween is that this assumes the y coordinate travels down the screen.

func (*Math) Average

func (self *Math) Average() int

Average Averages all values passed to the function and returns the result.

func (*Math) AverageI

func (self *Math) AverageI(args ...interface{}) int

AverageI Averages all values passed to the function and returns the result.

func (*Math) Bernstein

func (self *Math) Bernstein(n int, i int) int

Bernstein empty description

func (*Math) BernsteinI

func (self *Math) BernsteinI(args ...interface{}) int

BernsteinI empty description

func (*Math) Between

func (self *Math) Between(min int, max int) int

Between Returns a number between the `min` and `max` values.

func (*Math) BetweenI

func (self *Math) BetweenI(args ...interface{}) int

BetweenI Returns a number between the `min` and `max` values.

func (*Math) BezierInterpolation

func (self *Math) BezierInterpolation(v []interface{}, k int) int

BezierInterpolation A Bezier Interpolation Method, mostly used by Phaser.Tween.

func (*Math) BezierInterpolationI

func (self *Math) BezierInterpolationI(args ...interface{}) int

BezierInterpolationI A Bezier Interpolation Method, mostly used by Phaser.Tween.

func (*Math) CatmullRom

func (self *Math) CatmullRom(p0 int, p1 int, p2 int, p3 int, t int) int

CatmullRom Calculates a catmum rom value.

func (*Math) CatmullRomI

func (self *Math) CatmullRomI(args ...interface{}) int

CatmullRomI Calculates a catmum rom value.

func (*Math) CatmullRomInterpolation

func (self *Math) CatmullRomInterpolation(v []interface{}, k int) int

CatmullRomInterpolation A Catmull Rom Interpolation Method, mostly used by Phaser.Tween.

func (*Math) CatmullRomInterpolationI

func (self *Math) CatmullRomInterpolationI(args ...interface{}) int

CatmullRomInterpolationI A Catmull Rom Interpolation Method, mostly used by Phaser.Tween.

func (*Math) CeilTo

func (self *Math) CeilTo(value int) int

CeilTo Ceils to some place comparative to a `base`, default is 10 for decimal place. The `place` is represented by the power applied to `base` to get that place.

func (*Math) CeilTo1O

func (self *Math) CeilTo1O(value int, place int) int

CeilTo1O Ceils to some place comparative to a `base`, default is 10 for decimal place. The `place` is represented by the power applied to `base` to get that place.

func (*Math) CeilTo2O

func (self *Math) CeilTo2O(value int, place int, base int) int

CeilTo2O Ceils to some place comparative to a `base`, default is 10 for decimal place. The `place` is represented by the power applied to `base` to get that place.

func (*Math) CeilToI

func (self *Math) CeilToI(args ...interface{}) int

CeilToI Ceils to some place comparative to a `base`, default is 10 for decimal place. The `place` is represented by the power applied to `base` to get that place.

func (*Math) Clamp

func (self *Math) Clamp(v float64, min float64, max float64) int

Clamp Force a value within the boundaries by clamping it to the range `min`, `max`.

func (*Math) ClampBottom

func (self *Math) ClampBottom(x int, a int) int

ClampBottom Clamp `x` to the range `[a, Infinity)`. Roughly the same as `Math.max(x, a)`, except for NaN handling.

func (*Math) ClampBottomI

func (self *Math) ClampBottomI(args ...interface{}) int

ClampBottomI Clamp `x` to the range `[a, Infinity)`. Roughly the same as `Math.max(x, a)`, except for NaN handling.

func (*Math) ClampI

func (self *Math) ClampI(args ...interface{}) int

ClampI Force a value within the boundaries by clamping it to the range `min`, `max`.

func (*Math) DegToRad

func (self *Math) DegToRad(degrees int) int

DegToRad Convert degrees to radians.

func (*Math) DegToRadI

func (self *Math) DegToRadI(args ...interface{}) int

DegToRadI Convert degrees to radians.

func (*Math) Difference

func (self *Math) Difference(a int, b int) int

Difference The absolute difference between two values.

func (*Math) DifferenceI

func (self *Math) DifferenceI(args ...interface{}) int

DifferenceI The absolute difference between two values.

func (*Math) Distance

func (self *Math) Distance(x1 int, y1 int, x2 int, y2 int) int

Distance Returns the euclidian distance between the two given set of coordinates.

func (*Math) DistanceI

func (self *Math) DistanceI(args ...interface{}) int

DistanceI Returns the euclidian distance between the two given set of coordinates.

func (*Math) DistancePow

func (self *Math) DistancePow(x1 int, y1 int, x2 int, y2 int) int

DistancePow Returns the distance between the two given set of coordinates at the power given.

func (*Math) DistancePow1O

func (self *Math) DistancePow1O(x1 int, y1 int, x2 int, y2 int, pow int) int

DistancePow1O Returns the distance between the two given set of coordinates at the power given.

func (*Math) DistancePowI

func (self *Math) DistancePowI(args ...interface{}) int

DistancePowI Returns the distance between the two given set of coordinates at the power given.

func (*Math) DistanceSq

func (self *Math) DistanceSq(x1 int, y1 int, x2 int, y2 int) int

DistanceSq Returns the euclidean distance squared between the two given set of coordinates (cuts out a square root operation before returning).

func (*Math) DistanceSqI

func (self *Math) DistanceSqI(args ...interface{}) int

DistanceSqI Returns the euclidean distance squared between the two given set of coordinates (cuts out a square root operation before returning).

func (*Math) Factorial

func (self *Math) Factorial(value int) int

Factorial empty description

func (*Math) FactorialI

func (self *Math) FactorialI(args ...interface{}) int

FactorialI empty description

func (*Math) FloorTo

func (self *Math) FloorTo(value int) int

FloorTo Floors to some place comparative to a `base`, default is 10 for decimal place. The `place` is represented by the power applied to `base` to get that place.

func (*Math) FloorTo1O

func (self *Math) FloorTo1O(value int, place int) int

FloorTo1O Floors to some place comparative to a `base`, default is 10 for decimal place. The `place` is represented by the power applied to `base` to get that place.

func (*Math) FloorTo2O

func (self *Math) FloorTo2O(value int, place int, base int) int

FloorTo2O Floors to some place comparative to a `base`, default is 10 for decimal place. The `place` is represented by the power applied to `base` to get that place.

func (*Math) FloorToI

func (self *Math) FloorToI(args ...interface{}) int

FloorToI Floors to some place comparative to a `base`, default is 10 for decimal place. The `place` is represented by the power applied to `base` to get that place.

func (*Math) FuzzyCeil

func (self *Math) FuzzyCeil(val int) int

FuzzyCeil Applies a fuzzy ceil to the given value.

func (*Math) FuzzyCeil1O

func (self *Math) FuzzyCeil1O(val int, epsilon int) int

FuzzyCeil1O Applies a fuzzy ceil to the given value.

func (*Math) FuzzyCeilI

func (self *Math) FuzzyCeilI(args ...interface{}) int

FuzzyCeilI Applies a fuzzy ceil to the given value.

func (*Math) FuzzyEqual

func (self *Math) FuzzyEqual(a int, b int) bool

FuzzyEqual Two number are fuzzyEqual if their difference is less than epsilon.

func (*Math) FuzzyEqual1O

func (self *Math) FuzzyEqual1O(a int, b int, epsilon int) bool

FuzzyEqual1O Two number are fuzzyEqual if their difference is less than epsilon.

func (*Math) FuzzyEqualI

func (self *Math) FuzzyEqualI(args ...interface{}) bool

FuzzyEqualI Two number are fuzzyEqual if their difference is less than epsilon.

func (*Math) FuzzyFloor

func (self *Math) FuzzyFloor(val int) int

FuzzyFloor Applies a fuzzy floor to the given value.

func (*Math) FuzzyFloor1O

func (self *Math) FuzzyFloor1O(val int, epsilon int) int

FuzzyFloor1O Applies a fuzzy floor to the given value.

func (*Math) FuzzyFloorI

func (self *Math) FuzzyFloorI(args ...interface{}) int

FuzzyFloorI Applies a fuzzy floor to the given value.

func (*Math) FuzzyGreaterThan

func (self *Math) FuzzyGreaterThan(a int, b int) bool

FuzzyGreaterThan `a` is fuzzyGreaterThan `b` if it is more than b - epsilon.

func (*Math) FuzzyGreaterThan1O

func (self *Math) FuzzyGreaterThan1O(a int, b int, epsilon int) bool

FuzzyGreaterThan1O `a` is fuzzyGreaterThan `b` if it is more than b - epsilon.

func (*Math) FuzzyGreaterThanI

func (self *Math) FuzzyGreaterThanI(args ...interface{}) bool

FuzzyGreaterThanI `a` is fuzzyGreaterThan `b` if it is more than b - epsilon.

func (*Math) FuzzyLessThan

func (self *Math) FuzzyLessThan(a int, b int) bool

FuzzyLessThan `a` is fuzzyLessThan `b` if it is less than b + epsilon.

func (*Math) FuzzyLessThan1O

func (self *Math) FuzzyLessThan1O(a int, b int, epsilon int) bool

FuzzyLessThan1O `a` is fuzzyLessThan `b` if it is less than b + epsilon.

func (*Math) FuzzyLessThanI

func (self *Math) FuzzyLessThanI(args ...interface{}) bool

FuzzyLessThanI `a` is fuzzyLessThan `b` if it is less than b + epsilon.

func (*Math) GetShortestAngle

func (self *Math) GetShortestAngle(angle1 int, angle2 int) int

GetShortestAngle Gets the shortest angle between `angle1` and `angle2`. Both angles must be in the range -180 to 180, which is the same clamped range that `sprite.angle` uses, so you can pass in two sprite angles to this method, and get the shortest angle back between the two of them.

The angle returned will be in the same range. If the returned angle is greater than 0 then it's a counter-clockwise rotation, if < 0 then it's a clockwise rotation.

func (*Math) GetShortestAngleI

func (self *Math) GetShortestAngleI(args ...interface{}) int

GetShortestAngleI Gets the shortest angle between `angle1` and `angle2`. Both angles must be in the range -180 to 180, which is the same clamped range that `sprite.angle` uses, so you can pass in two sprite angles to this method, and get the shortest angle back between the two of them.

The angle returned will be in the same range. If the returned angle is greater than 0 then it's a counter-clockwise rotation, if < 0 then it's a clockwise rotation.

func (*Math) IsEven

func (self *Math) IsEven(n int) bool

IsEven Returns true if the number given is even.

func (*Math) IsEvenI

func (self *Math) IsEvenI(args ...interface{}) bool

IsEvenI Returns true if the number given is even.

func (*Math) IsOdd

func (self *Math) IsOdd(n int) bool

IsOdd Returns true if the number given is odd.

func (*Math) IsOddI

func (self *Math) IsOddI(args ...interface{}) bool

IsOddI Returns true if the number given is odd.

func (*Math) Linear

func (self *Math) Linear(p0 int, p1 int, t int) int

Linear Calculates a linear (interpolation) value over t.

func (*Math) LinearI

func (self *Math) LinearI(args ...interface{}) int

LinearI Calculates a linear (interpolation) value over t.

func (*Math) LinearInterpolation

func (self *Math) LinearInterpolation(v []interface{}, k int) int

LinearInterpolation A Linear Interpolation Method, mostly used by Phaser.Tween.

func (*Math) LinearInterpolationI

func (self *Math) LinearInterpolationI(args ...interface{}) int

LinearInterpolationI A Linear Interpolation Method, mostly used by Phaser.Tween.

func (*Math) MapLinear

func (self *Math) MapLinear(x int, a1 int, a2 int, b1 int, b2 int) int

MapLinear Linear mapping from range <a1, a2> to range <b1, b2>

func (*Math) MapLinearI

func (self *Math) MapLinearI(args ...interface{}) int

MapLinearI Linear mapping from range <a1, a2> to range <b1, b2>

func (*Math) Max

func (self *Math) Max() int

Max Variation of Math.max that can be passed either an array of numbers or the numbers as parameters.

Prefer the standard `Math.max` function when appropriate.

func (*Math) MaxAdd

func (self *Math) MaxAdd(value int, amount int, max int) int

MaxAdd Adds the given amount to the value, but never lets the value go over the specified maximum.

func (*Math) MaxAddI

func (self *Math) MaxAddI(args ...interface{}) int

MaxAddI Adds the given amount to the value, but never lets the value go over the specified maximum.

func (*Math) MaxI

func (self *Math) MaxI(args ...interface{}) int

MaxI Variation of Math.max that can be passed either an array of numbers or the numbers as parameters.

Prefer the standard `Math.max` function when appropriate.

func (*Math) MaxProperty

func (self *Math) MaxProperty() int

MaxProperty Variation of Math.max that can be passed a property and either an array of objects or the objects as parameters. It will find the largest matching property value from the given objects.

func (*Math) MaxPropertyI

func (self *Math) MaxPropertyI(args ...interface{}) int

MaxPropertyI Variation of Math.max that can be passed a property and either an array of objects or the objects as parameters. It will find the largest matching property value from the given objects.

func (*Math) Min

func (self *Math) Min() int

Min Variation of Math.min that can be passed either an array of numbers or the numbers as parameters.

Prefer the standard `Math.min` function when appropriate.

func (*Math) MinI

func (self *Math) MinI(args ...interface{}) int

MinI Variation of Math.min that can be passed either an array of numbers or the numbers as parameters.

Prefer the standard `Math.min` function when appropriate.

func (*Math) MinProperty

func (self *Math) MinProperty() int

MinProperty Variation of Math.min that can be passed a property and either an array of objects or the objects as parameters. It will find the lowest matching property value from the given objects.

func (*Math) MinPropertyI

func (self *Math) MinPropertyI(args ...interface{}) int

MinPropertyI Variation of Math.min that can be passed a property and either an array of objects or the objects as parameters. It will find the lowest matching property value from the given objects.

func (*Math) MinSub

func (self *Math) MinSub(value int, amount int, min int) int

MinSub Subtracts the given amount from the value, but never lets the value go below the specified minimum.

func (*Math) MinSubI

func (self *Math) MinSubI(args ...interface{}) int

MinSubI Subtracts the given amount from the value, but never lets the value go below the specified minimum.

func (*Math) NormalizeAngle

func (self *Math) NormalizeAngle(angleRad int) int

NormalizeAngle Normalizes an angle to the [0,2pi) range.

func (*Math) NormalizeAngleI

func (self *Math) NormalizeAngleI(args ...interface{}) int

NormalizeAngleI Normalizes an angle to the [0,2pi) range.

func (*Math) PI2

func (self *Math) PI2() interface{}

PI2 Twice PI.

func (*Math) Percent

func (self *Math) Percent(a int, b int) int

Percent Work out what percentage value `a` is of value `b` using the given base.

func (*Math) Percent1O

func (self *Math) Percent1O(a int, b int, base int) int

Percent1O Work out what percentage value `a` is of value `b` using the given base.

func (*Math) PercentI

func (self *Math) PercentI(args ...interface{}) int

PercentI Work out what percentage value `a` is of value `b` using the given base.

func (*Math) RadToDeg

func (self *Math) RadToDeg(radians int) int

RadToDeg Convert radians to degrees.

func (*Math) RadToDegI

func (self *Math) RadToDegI(args ...interface{}) int

RadToDegI Convert radians to degrees.

func (*Math) ReverseAngle

func (self *Math) ReverseAngle(angleRad int) int

ReverseAngle Reverses an angle.

func (*Math) ReverseAngleI

func (self *Math) ReverseAngleI(args ...interface{}) int

ReverseAngleI Reverses an angle.

func (*Math) RotateToAngle

func (self *Math) RotateToAngle(currentAngle int, targetAngle int) int

RotateToAngle Rotates currentAngle towards targetAngle, taking the shortest rotation distance. The lerp argument is the amount to rotate by in this call.

func (*Math) RotateToAngle1O

func (self *Math) RotateToAngle1O(currentAngle int, targetAngle int, lerp int) int

RotateToAngle1O Rotates currentAngle towards targetAngle, taking the shortest rotation distance. The lerp argument is the amount to rotate by in this call.

func (*Math) RotateToAngleI

func (self *Math) RotateToAngleI(args ...interface{}) int

RotateToAngleI Rotates currentAngle towards targetAngle, taking the shortest rotation distance. The lerp argument is the amount to rotate by in this call.

func (*Math) RoundAwayFromZero

func (self *Math) RoundAwayFromZero(value int) int

RoundAwayFromZero Round to the next whole number _away_ from zero.

func (*Math) RoundAwayFromZeroI

func (self *Math) RoundAwayFromZeroI(args ...interface{}) int

RoundAwayFromZeroI Round to the next whole number _away_ from zero.

func (*Math) RoundTo

func (self *Math) RoundTo(value int) int

RoundTo Round to some place comparative to a `base`, default is 10 for decimal place. The `place` is represented by the power applied to `base` to get that place.

e.g. 2000/7 ~= 285.714285714285714285714 ~= (bin)100011101.1011011011011011

roundTo(2000/7,3) === 0
roundTo(2000/7,2) == 300
roundTo(2000/7,1) == 290
roundTo(2000/7,0) == 286
roundTo(2000/7,-1) == 285.7
roundTo(2000/7,-2) == 285.71
roundTo(2000/7,-3) == 285.714
roundTo(2000/7,-4) == 285.7143
roundTo(2000/7,-5) == 285.71429

roundTo(2000/7,3,2)  == 288       -- 100100000
roundTo(2000/7,2,2)  == 284       -- 100011100
roundTo(2000/7,1,2)  == 286       -- 100011110
roundTo(2000/7,0,2)  == 286       -- 100011110
roundTo(2000/7,-1,2) == 285.5     -- 100011101.1
roundTo(2000/7,-2,2) == 285.75    -- 100011101.11
roundTo(2000/7,-3,2) == 285.75    -- 100011101.11
roundTo(2000/7,-4,2) == 285.6875  -- 100011101.1011
roundTo(2000/7,-5,2) == 285.71875 -- 100011101.10111

Note what occurs when we round to the 3rd space (8ths place), 100100000, this is to be assumed because we are rounding 100011.1011011011011011 which rounds up.

func (*Math) RoundTo1O

func (self *Math) RoundTo1O(value int, place int) int

RoundTo1O Round to some place comparative to a `base`, default is 10 for decimal place. The `place` is represented by the power applied to `base` to get that place.

e.g. 2000/7 ~= 285.714285714285714285714 ~= (bin)100011101.1011011011011011

roundTo(2000/7,3) === 0
roundTo(2000/7,2) == 300
roundTo(2000/7,1) == 290
roundTo(2000/7,0) == 286
roundTo(2000/7,-1) == 285.7
roundTo(2000/7,-2) == 285.71
roundTo(2000/7,-3) == 285.714
roundTo(2000/7,-4) == 285.7143
roundTo(2000/7,-5) == 285.71429

roundTo(2000/7,3,2)  == 288       -- 100100000
roundTo(2000/7,2,2)  == 284       -- 100011100
roundTo(2000/7,1,2)  == 286       -- 100011110
roundTo(2000/7,0,2)  == 286       -- 100011110
roundTo(2000/7,-1,2) == 285.5     -- 100011101.1
roundTo(2000/7,-2,2) == 285.75    -- 100011101.11
roundTo(2000/7,-3,2) == 285.75    -- 100011101.11
roundTo(2000/7,-4,2) == 285.6875  -- 100011101.1011
roundTo(2000/7,-5,2) == 285.71875 -- 100011101.10111

Note what occurs when we round to the 3rd space (8ths place), 100100000, this is to be assumed because we are rounding 100011.1011011011011011 which rounds up.

func (*Math) RoundTo2O

func (self *Math) RoundTo2O(value int, place int, base int) int

RoundTo2O Round to some place comparative to a `base`, default is 10 for decimal place. The `place` is represented by the power applied to `base` to get that place.

e.g. 2000/7 ~= 285.714285714285714285714 ~= (bin)100011101.1011011011011011

roundTo(2000/7,3) === 0
roundTo(2000/7,2) == 300
roundTo(2000/7,1) == 290
roundTo(2000/7,0) == 286
roundTo(2000/7,-1) == 285.7
roundTo(2000/7,-2) == 285.71
roundTo(2000/7,-3) == 285.714
roundTo(2000/7,-4) == 285.7143
roundTo(2000/7,-5) == 285.71429

roundTo(2000/7,3,2)  == 288       -- 100100000
roundTo(2000/7,2,2)  == 284       -- 100011100
roundTo(2000/7,1,2)  == 286       -- 100011110
roundTo(2000/7,0,2)  == 286       -- 100011110
roundTo(2000/7,-1,2) == 285.5     -- 100011101.1
roundTo(2000/7,-2,2) == 285.75    -- 100011101.11
roundTo(2000/7,-3,2) == 285.75    -- 100011101.11
roundTo(2000/7,-4,2) == 285.6875  -- 100011101.1011
roundTo(2000/7,-5,2) == 285.71875 -- 100011101.10111

Note what occurs when we round to the 3rd space (8ths place), 100100000, this is to be assumed because we are rounding 100011.1011011011011011 which rounds up.

func (*Math) RoundToI

func (self *Math) RoundToI(args ...interface{}) int

RoundToI Round to some place comparative to a `base`, default is 10 for decimal place. The `place` is represented by the power applied to `base` to get that place.

e.g. 2000/7 ~= 285.714285714285714285714 ~= (bin)100011101.1011011011011011

roundTo(2000/7,3) === 0
roundTo(2000/7,2) == 300
roundTo(2000/7,1) == 290
roundTo(2000/7,0) == 286
roundTo(2000/7,-1) == 285.7
roundTo(2000/7,-2) == 285.71
roundTo(2000/7,-3) == 285.714
roundTo(2000/7,-4) == 285.7143
roundTo(2000/7,-5) == 285.71429

roundTo(2000/7,3,2)  == 288       -- 100100000
roundTo(2000/7,2,2)  == 284       -- 100011100
roundTo(2000/7,1,2)  == 286       -- 100011110
roundTo(2000/7,0,2)  == 286       -- 100011110
roundTo(2000/7,-1,2) == 285.5     -- 100011101.1
roundTo(2000/7,-2,2) == 285.75    -- 100011101.11
roundTo(2000/7,-3,2) == 285.75    -- 100011101.11
roundTo(2000/7,-4,2) == 285.6875  -- 100011101.1011
roundTo(2000/7,-5,2) == 285.71875 -- 100011101.10111

Note what occurs when we round to the 3rd space (8ths place), 100100000, this is to be assumed because we are rounding 100011.1011011011011011 which rounds up.

func (*Math) SetPI2A

func (self *Math) SetPI2A(member interface{})

SetPI2A Twice PI.

func (*Math) Shear

func (self *Math) Shear(n int) int

Shear empty description

func (*Math) ShearI

func (self *Math) ShearI(args ...interface{}) int

ShearI empty description

func (*Math) Sign

func (self *Math) Sign(x int) int

Sign A value representing the sign of the value: -1 for negative, +1 for positive, 0 if value is 0.

This works differently from `Math.sign` for values of NaN and -0, etc.

func (*Math) SignI

func (self *Math) SignI(args ...interface{}) int

SignI A value representing the sign of the value: -1 for negative, +1 for positive, 0 if value is 0.

This works differently from `Math.sign` for values of NaN and -0, etc.

func (*Math) SinCosGenerator

func (self *Math) SinCosGenerator(length int, sinAmplitude int, cosAmplitude int, frequency int) interface{}

SinCosGenerator Generate a sine and cosine table simultaneously and extremely quickly. The parameters allow you to specify the length, amplitude and frequency of the wave. This generator is fast enough to be used in real-time. Code based on research by Franky of scene.at

func (*Math) SinCosGeneratorI

func (self *Math) SinCosGeneratorI(args ...interface{}) interface{}

SinCosGeneratorI Generate a sine and cosine table simultaneously and extremely quickly. The parameters allow you to specify the length, amplitude and frequency of the wave. This generator is fast enough to be used in real-time. Code based on research by Franky of scene.at

func (*Math) Smootherstep

func (self *Math) Smootherstep(x float64, min float64, max float64) float64

Smootherstep Smootherstep function as detailed at http://en.wikipedia.org/wiki/Smoothstep

func (*Math) SmootherstepI

func (self *Math) SmootherstepI(args ...interface{}) float64

SmootherstepI Smootherstep function as detailed at http://en.wikipedia.org/wiki/Smoothstep

func (*Math) Smoothstep

func (self *Math) Smoothstep(x float64, min float64, max float64) float64

Smoothstep Smoothstep function as detailed at http://en.wikipedia.org/wiki/Smoothstep

func (*Math) SmoothstepI

func (self *Math) SmoothstepI(args ...interface{}) float64

SmoothstepI Smoothstep function as detailed at http://en.wikipedia.org/wiki/Smoothstep

func (*Math) SnapTo

func (self *Math) SnapTo(input int, gap int) int

SnapTo Snap a value to nearest grid slice, using rounding.

Example: if you have an interval gap of 5 and a position of 12... you will snap to 10 whereas 14 will snap to 15.

func (*Math) SnapTo1O

func (self *Math) SnapTo1O(input int, gap int, start int) int

SnapTo1O Snap a value to nearest grid slice, using rounding.

Example: if you have an interval gap of 5 and a position of 12... you will snap to 10 whereas 14 will snap to 15.

func (*Math) SnapToCeil

func (self *Math) SnapToCeil(input int, gap int) int

SnapToCeil Snap a value to nearest grid slice, using ceil.

Example: if you have an interval gap of 5 and a position of 12... you will snap to 15. As will 14 will snap to 15... but 16 will snap to 20.

func (*Math) SnapToCeil1O

func (self *Math) SnapToCeil1O(input int, gap int, start int) int

SnapToCeil1O Snap a value to nearest grid slice, using ceil.

Example: if you have an interval gap of 5 and a position of 12... you will snap to 15. As will 14 will snap to 15... but 16 will snap to 20.

func (*Math) SnapToCeilI

func (self *Math) SnapToCeilI(args ...interface{}) int

SnapToCeilI Snap a value to nearest grid slice, using ceil.

Example: if you have an interval gap of 5 and a position of 12... you will snap to 15. As will 14 will snap to 15... but 16 will snap to 20.

func (*Math) SnapToFloor

func (self *Math) SnapToFloor(input int, gap int) int

SnapToFloor Snap a value to nearest grid slice, using floor.

Example: if you have an interval gap of 5 and a position of 12... you will snap to 10. As will 14 snap to 10... but 16 will snap to 15.

func (*Math) SnapToFloor1O

func (self *Math) SnapToFloor1O(input int, gap int, start int) int

SnapToFloor1O Snap a value to nearest grid slice, using floor.

Example: if you have an interval gap of 5 and a position of 12... you will snap to 10. As will 14 snap to 10... but 16 will snap to 15.

func (*Math) SnapToFloorI

func (self *Math) SnapToFloorI(args ...interface{}) int

SnapToFloorI Snap a value to nearest grid slice, using floor.

Example: if you have an interval gap of 5 and a position of 12... you will snap to 10. As will 14 snap to 10... but 16 will snap to 15.

func (*Math) SnapToI

func (self *Math) SnapToI(args ...interface{}) int

SnapToI Snap a value to nearest grid slice, using rounding.

Example: if you have an interval gap of 5 and a position of 12... you will snap to 10 whereas 14 will snap to 15.

func (*Math) Within

func (self *Math) Within(a int, b int, tolerance int) bool

Within Checks if two values are within the given tolerance of each other.

func (*Math) WithinI

func (self *Math) WithinI(args ...interface{}) bool

WithinI Checks if two values are within the given tolerance of each other.

func (*Math) Wrap

func (self *Math) Wrap(value int, min int, max int) int

Wrap Ensures that the value always stays between min and max, by wrapping the value around.

If `max` is not larger than `min` the result is 0.

func (*Math) WrapAngle

func (self *Math) WrapAngle(angle int) int

WrapAngle Keeps an angle value between -180 and +180; or -PI and PI if radians.

func (*Math) WrapAngle1O

func (self *Math) WrapAngle1O(angle int, radians bool) int

WrapAngle1O Keeps an angle value between -180 and +180; or -PI and PI if radians.

func (*Math) WrapAngleI

func (self *Math) WrapAngleI(args ...interface{}) int

WrapAngleI Keeps an angle value between -180 and +180; or -PI and PI if radians.

func (*Math) WrapI

func (self *Math) WrapI(args ...interface{}) int

WrapI Ensures that the value always stays between min and max, by wrapping the value around.

If `max` is not larger than `min` the result is 0.

func (*Math) WrapValue

func (self *Math) WrapValue(value int, amount int, max int) int

WrapValue Adds value to amount and ensures that the result always stays between 0 and max, by wrapping the value around.

Values _must_ be positive integers, and are passed through Math.abs. See {@link Phaser.Math#wrap} for an alternative.

func (*Math) WrapValueI

func (self *Math) WrapValueI(args ...interface{}) int

WrapValueI Adds value to amount and ensures that the result always stays between 0 and max, by wrapping the value around.

Values _must_ be positive integers, and are passed through Math.abs. See {@link Phaser.Math#wrap} for an alternative.

type Matrix

type Matrix struct {
	*js.Object
}

Matrix The Matrix is a 3x3 matrix mostly used for display transforms within the renderer.

It is represented like so:

| a | b | tx | | c | d | ty | | 0 | 0 | 1 |

func NewMatrix

func NewMatrix() *Matrix

NewMatrix The Matrix is a 3x3 matrix mostly used for display transforms within the renderer.

It is represented like so:

| a | b | tx | | c | d | ty | | 0 | 0 | 1 |

func NewMatrix1O

func NewMatrix1O(a int) *Matrix

NewMatrix1O The Matrix is a 3x3 matrix mostly used for display transforms within the renderer.

It is represented like so:

| a | b | tx | | c | d | ty | | 0 | 0 | 1 |

func NewMatrix2O

func NewMatrix2O(a int, b int) *Matrix

NewMatrix2O The Matrix is a 3x3 matrix mostly used for display transforms within the renderer.

It is represented like so:

| a | b | tx | | c | d | ty | | 0 | 0 | 1 |

func NewMatrix3O

func NewMatrix3O(a int, b int, c int) *Matrix

NewMatrix3O The Matrix is a 3x3 matrix mostly used for display transforms within the renderer.

It is represented like so:

| a | b | tx | | c | d | ty | | 0 | 0 | 1 |

func NewMatrix4O

func NewMatrix4O(a int, b int, c int, d int) *Matrix

NewMatrix4O The Matrix is a 3x3 matrix mostly used for display transforms within the renderer.

It is represented like so:

| a | b | tx | | c | d | ty | | 0 | 0 | 1 |

func NewMatrix5O

func NewMatrix5O(a int, b int, c int, d int, tx int) *Matrix

NewMatrix5O The Matrix is a 3x3 matrix mostly used for display transforms within the renderer.

It is represented like so:

| a | b | tx | | c | d | ty | | 0 | 0 | 1 |

func NewMatrix6O

func NewMatrix6O(a int, b int, c int, d int, tx int, ty int) *Matrix

NewMatrix6O The Matrix is a 3x3 matrix mostly used for display transforms within the renderer.

It is represented like so:

| a | b | tx | | c | d | ty | | 0 | 0 | 1 |

func NewMatrixI

func NewMatrixI(args ...interface{}) *Matrix

NewMatrixI The Matrix is a 3x3 matrix mostly used for display transforms within the renderer.

It is represented like so:

| a | b | tx | | c | d | ty | | 0 | 0 | 1 |

func ToMatrix

func ToMatrix(jsStruct interface{}) *Matrix

Matrix Binding conversion method to Matrix point

func (*Matrix) A

func (self *Matrix) A() int

A empty description

func (*Matrix) Append

func (self *Matrix) Append(matrix *Matrix) *Matrix

Append Appends the given Matrix to this Matrix.

func (*Matrix) AppendI

func (self *Matrix) AppendI(args ...interface{}) *Matrix

AppendI Appends the given Matrix to this Matrix.

func (*Matrix) Apply

func (self *Matrix) Apply(pos *Point) *Point

Apply Get a new position with the current transformation applied.

Can be used to go from a childs coordinate space to the world coordinate space (e.g. rendering)

func (*Matrix) Apply1O

func (self *Matrix) Apply1O(pos *Point, newPos *Point) *Point

Apply1O Get a new position with the current transformation applied.

Can be used to go from a childs coordinate space to the world coordinate space (e.g. rendering)

func (*Matrix) ApplyI

func (self *Matrix) ApplyI(args ...interface{}) *Point

ApplyI Get a new position with the current transformation applied.

Can be used to go from a childs coordinate space to the world coordinate space (e.g. rendering)

func (*Matrix) ApplyInverse

func (self *Matrix) ApplyInverse(pos *Point) *Point

ApplyInverse Get a new position with the inverse of the current transformation applied.

Can be used to go from the world coordinate space to a childs coordinate space. (e.g. input)

func (*Matrix) ApplyInverse1O

func (self *Matrix) ApplyInverse1O(pos *Point, newPos *Point) *Point

ApplyInverse1O Get a new position with the inverse of the current transformation applied.

Can be used to go from the world coordinate space to a childs coordinate space. (e.g. input)

func (*Matrix) ApplyInverseI

func (self *Matrix) ApplyInverseI(args ...interface{}) *Point

ApplyInverseI Get a new position with the inverse of the current transformation applied.

Can be used to go from the world coordinate space to a childs coordinate space. (e.g. input)

func (*Matrix) B

func (self *Matrix) B() int

B empty description

func (*Matrix) C

func (self *Matrix) C() int

C empty description

func (*Matrix) Clone

func (self *Matrix) Clone() *Matrix

Clone Creates a new Matrix object based on the values of this Matrix. If you provide the output parameter the values of this Matrix will be copied over to it. If the output parameter is blank a new Matrix object will be created.

func (*Matrix) Clone1O

func (self *Matrix) Clone1O(output *Matrix) *Matrix

Clone1O Creates a new Matrix object based on the values of this Matrix. If you provide the output parameter the values of this Matrix will be copied over to it. If the output parameter is blank a new Matrix object will be created.

func (*Matrix) CloneI

func (self *Matrix) CloneI(args ...interface{}) *Matrix

CloneI Creates a new Matrix object based on the values of this Matrix. If you provide the output parameter the values of this Matrix will be copied over to it. If the output parameter is blank a new Matrix object will be created.

func (*Matrix) CopyFrom

func (self *Matrix) CopyFrom(matrix *Matrix) *Matrix

CopyFrom Copies the properties from the given Matrix into this Matrix.

func (*Matrix) CopyFromI

func (self *Matrix) CopyFromI(args ...interface{}) *Matrix

CopyFromI Copies the properties from the given Matrix into this Matrix.

func (*Matrix) CopyTo

func (self *Matrix) CopyTo(matrix *Matrix) *Matrix

CopyTo Copies the properties from this Matrix to the given Matrix.

func (*Matrix) CopyToI

func (self *Matrix) CopyToI(args ...interface{}) *Matrix

CopyToI Copies the properties from this Matrix to the given Matrix.

func (*Matrix) D

func (self *Matrix) D() int

D empty description

func (*Matrix) FromArray

func (self *Matrix) FromArray(array []interface{}) *Matrix

FromArray Sets the values of this Matrix to the values in the given array.

The Array elements should be set as follows:

a = array[0] b = array[1] c = array[3] d = array[4] tx = array[2] ty = array[5]

func (*Matrix) FromArrayI

func (self *Matrix) FromArrayI(args ...interface{}) *Matrix

FromArrayI Sets the values of this Matrix to the values in the given array.

The Array elements should be set as follows:

a = array[0] b = array[1] c = array[3] d = array[4] tx = array[2] ty = array[5]

func (*Matrix) Identity

func (self *Matrix) Identity() *Matrix

Identity Resets this Matrix to an identity (default) matrix.

func (*Matrix) IdentityI

func (self *Matrix) IdentityI(args ...interface{}) *Matrix

IdentityI Resets this Matrix to an identity (default) matrix.

func (*Matrix) Rotate

func (self *Matrix) Rotate(angle int) *Matrix

Rotate Applies a rotation transformation to this matrix.

func (*Matrix) RotateI

func (self *Matrix) RotateI(args ...interface{}) *Matrix

RotateI Applies a rotation transformation to this matrix.

func (*Matrix) Scale

func (self *Matrix) Scale(x int, y int) *Matrix

Scale Applies a scale transformation to this matrix.

func (*Matrix) ScaleI

func (self *Matrix) ScaleI(args ...interface{}) *Matrix

ScaleI Applies a scale transformation to this matrix.

func (*Matrix) SetAA

func (self *Matrix) SetAA(member int)

SetAA empty description

func (*Matrix) SetBA

func (self *Matrix) SetBA(member int)

SetBA empty description

func (*Matrix) SetCA

func (self *Matrix) SetCA(member int)

SetCA empty description

func (*Matrix) SetDA

func (self *Matrix) SetDA(member int)

SetDA empty description

func (*Matrix) SetTo

func (self *Matrix) SetTo(a int, b int, c int, d int, tx int, ty int) *Matrix

SetTo Sets the values of this Matrix to the given values.

func (*Matrix) SetToI

func (self *Matrix) SetToI(args ...interface{}) *Matrix

SetToI Sets the values of this Matrix to the given values.

func (*Matrix) SetTxA

func (self *Matrix) SetTxA(member int)

SetTxA empty description

func (*Matrix) SetTyA

func (self *Matrix) SetTyA(member int)

SetTyA empty description

func (*Matrix) SetTypeA

func (self *Matrix) SetTypeA(member int)

SetTypeA The const type of this object.

func (*Matrix) ToArray

func (self *Matrix) ToArray() *Float32Array

ToArray Creates a Float32 Array with values populated from this Matrix object.

func (*Matrix) ToArray1O

func (self *Matrix) ToArray1O(transpose bool) *Float32Array

ToArray1O Creates a Float32 Array with values populated from this Matrix object.

func (*Matrix) ToArray2O

func (self *Matrix) ToArray2O(transpose bool, array *Float32Array) *Float32Array

ToArray2O Creates a Float32 Array with values populated from this Matrix object.

func (*Matrix) ToArrayI

func (self *Matrix) ToArrayI(args ...interface{}) *Float32Array

ToArrayI Creates a Float32 Array with values populated from this Matrix object.

func (*Matrix) Translate

func (self *Matrix) Translate(x int, y int) *Matrix

Translate Translates the matrix on the x and y. This is the same as Matrix.tx += x.

func (*Matrix) TranslateI

func (self *Matrix) TranslateI(args ...interface{}) *Matrix

TranslateI Translates the matrix on the x and y. This is the same as Matrix.tx += x.

func (*Matrix) Tx

func (self *Matrix) Tx() int

Tx empty description

func (*Matrix) Ty

func (self *Matrix) Ty() int

Ty empty description

func (*Matrix) Type

func (self *Matrix) Type() int

Type The const type of this object.

type MediaStream

type MediaStream struct{ *js.Object }

type Mouse

type Mouse struct {
	*js.Object
}

Mouse The Mouse class is responsible for handling all aspects of mouse interaction with the browser.

It captures and processes mouse events that happen on the game canvas object. It also adds a single `mouseup` listener to `window` which is used to capture the mouse being released when not over the game.

You should not normally access this class directly, but instead use a Phaser.Pointer object which normalises all game input for you, including accurate button handling.

func NewMouse

func NewMouse(game *Game) *Mouse

NewMouse The Mouse class is responsible for handling all aspects of mouse interaction with the browser.

It captures and processes mouse events that happen on the game canvas object. It also adds a single `mouseup` listener to `window` which is used to capture the mouse being released when not over the game.

You should not normally access this class directly, but instead use a Phaser.Pointer object which normalises all game input for you, including accurate button handling.

func NewMouseI

func NewMouseI(args ...interface{}) *Mouse

NewMouseI The Mouse class is responsible for handling all aspects of mouse interaction with the browser.

It captures and processes mouse events that happen on the game canvas object. It also adds a single `mouseup` listener to `window` which is used to capture the mouse being released when not over the game.

You should not normally access this class directly, but instead use a Phaser.Pointer object which normalises all game input for you, including accurate button handling.

func ToMouse

func ToMouse(jsStruct interface{}) *Mouse

Mouse Binding conversion method to Mouse point

func (*Mouse) BACK_BUTTON

func (self *Mouse) BACK_BUTTON() int

BACK_BUTTON empty description

func (*Mouse) Button

func (self *Mouse) Button() int

Button This property was removed in Phaser 2.4 and should no longer be used. Instead please see the Pointer button properties such as `Pointer.leftButton`, `Pointer.rightButton` and so on. Or Pointer.button holds the DOM event button value if you require that.

func (*Mouse) CallbackContext

func (self *Mouse) CallbackContext() interface{}

CallbackContext The context under which callbacks are called.

func (*Mouse) Capture

func (self *Mouse) Capture() bool

Capture If true the DOM mouse events will have event.preventDefault applied to them, if false they will propagate fully.

func (*Mouse) Enabled

func (self *Mouse) Enabled() bool

Enabled Mouse input will only be processed if enabled.

func (*Mouse) Event

func (self *Mouse) Event() interface{}

Event The browser mouse DOM event. Will be null if no mouse event has ever been received. Access this property only inside a Mouse event handler and do not keep references to it.

func (*Mouse) FORWARD_BUTTON

func (self *Mouse) FORWARD_BUTTON() int

FORWARD_BUTTON empty description

func (*Mouse) Game

func (self *Mouse) Game() *Game

Game A reference to the currently running game.

func (*Mouse) Input

func (self *Mouse) Input() *Input

Input A reference to the Phaser Input Manager.

func (*Mouse) LEFT_BUTTON

func (self *Mouse) LEFT_BUTTON() int

LEFT_BUTTON empty description

func (*Mouse) Locked

func (self *Mouse) Locked() bool

Locked If the mouse has been Pointer Locked successfully this will be set to true.

func (*Mouse) MIDDLE_BUTTON

func (self *Mouse) MIDDLE_BUTTON() int

MIDDLE_BUTTON empty description

func (*Mouse) MouseDownCallback

func (self *Mouse) MouseDownCallback() interface{}

MouseDownCallback A callback that can be fired when the mouse is pressed down.

func (*Mouse) MouseOutCallback

func (self *Mouse) MouseOutCallback() interface{}

MouseOutCallback A callback that can be fired when the mouse is no longer over the game canvas.

func (*Mouse) MouseOverCallback

func (self *Mouse) MouseOverCallback() interface{}

MouseOverCallback A callback that can be fired when the mouse enters the game canvas (usually after a mouseout).

func (*Mouse) MouseUpCallback

func (self *Mouse) MouseUpCallback() interface{}

MouseUpCallback A callback that can be fired when the mouse is released from a pressed down state.

func (*Mouse) MouseWheelCallback

func (self *Mouse) MouseWheelCallback() interface{}

MouseWheelCallback A callback that can be fired when the mousewheel is used.

func (*Mouse) NO_BUTTON

func (self *Mouse) NO_BUTTON() int

NO_BUTTON empty description

func (*Mouse) OnMouseDown

func (self *Mouse) OnMouseDown(event *MouseEvent)

OnMouseDown The internal method that handles the mouse down event from the browser.

func (*Mouse) OnMouseDownI

func (self *Mouse) OnMouseDownI(args ...interface{})

OnMouseDownI The internal method that handles the mouse down event from the browser.

func (*Mouse) OnMouseMove

func (self *Mouse) OnMouseMove(event *MouseEvent)

OnMouseMove The internal method that handles the mouse move event from the browser.

func (*Mouse) OnMouseMoveI

func (self *Mouse) OnMouseMoveI(args ...interface{})

OnMouseMoveI The internal method that handles the mouse move event from the browser.

func (*Mouse) OnMouseOut

func (self *Mouse) OnMouseOut(event *MouseEvent)

OnMouseOut The internal method that handles the mouse out event from the browser.

func (*Mouse) OnMouseOutGlobal

func (self *Mouse) OnMouseOutGlobal(event *MouseEvent)

OnMouseOutGlobal The internal method that handles the mouse out event from the window.

func (*Mouse) OnMouseOutGlobalI

func (self *Mouse) OnMouseOutGlobalI(args ...interface{})

OnMouseOutGlobalI The internal method that handles the mouse out event from the window.

func (*Mouse) OnMouseOutI

func (self *Mouse) OnMouseOutI(args ...interface{})

OnMouseOutI The internal method that handles the mouse out event from the browser.

func (*Mouse) OnMouseOver

func (self *Mouse) OnMouseOver(event *MouseEvent)

OnMouseOver The internal method that handles the mouse over event from the browser.

func (*Mouse) OnMouseOverI

func (self *Mouse) OnMouseOverI(args ...interface{})

OnMouseOverI The internal method that handles the mouse over event from the browser.

func (*Mouse) OnMouseUp

func (self *Mouse) OnMouseUp(event *MouseEvent)

OnMouseUp The internal method that handles the mouse up event from the browser.

func (*Mouse) OnMouseUpGlobal

func (self *Mouse) OnMouseUpGlobal(event *MouseEvent)

OnMouseUpGlobal The internal method that handles the mouse up event from the window.

func (*Mouse) OnMouseUpGlobalI

func (self *Mouse) OnMouseUpGlobalI(args ...interface{})

OnMouseUpGlobalI The internal method that handles the mouse up event from the window.

func (*Mouse) OnMouseUpI

func (self *Mouse) OnMouseUpI(args ...interface{})

OnMouseUpI The internal method that handles the mouse up event from the browser.

func (*Mouse) OnMouseWheel

func (self *Mouse) OnMouseWheel(event *MouseEvent)

OnMouseWheel The internal method that handles the mouse wheel event from the browser.

func (*Mouse) OnMouseWheelI

func (self *Mouse) OnMouseWheelI(args ...interface{})

OnMouseWheelI The internal method that handles the mouse wheel event from the browser.

func (*Mouse) PointerLock

func (self *Mouse) PointerLock() *Signal

PointerLock This event is dispatched when the browser enters or leaves pointer lock state.

func (*Mouse) PointerLockChange

func (self *Mouse) PointerLockChange(event *Event)

PointerLockChange Internal pointerLockChange handler.

func (*Mouse) PointerLockChangeI

func (self *Mouse) PointerLockChangeI(args ...interface{})

PointerLockChangeI Internal pointerLockChange handler.

func (*Mouse) RIGHT_BUTTON

func (self *Mouse) RIGHT_BUTTON() int

RIGHT_BUTTON empty description

func (*Mouse) ReleasePointerLock

func (self *Mouse) ReleasePointerLock()

ReleasePointerLock Internal release pointer lock handler.

func (*Mouse) ReleasePointerLockI

func (self *Mouse) ReleasePointerLockI(args ...interface{})

ReleasePointerLockI Internal release pointer lock handler.

func (*Mouse) RequestPointerLock

func (self *Mouse) RequestPointerLock()

RequestPointerLock If the browser supports it you can request that the pointer be locked to the browser window. This is classically known as 'FPS controls', where the pointer can't leave the browser until the user presses an exit key. If the browser successfully enters a locked state the event Phaser.Mouse.pointerLock will be dispatched and the first parameter will be 'true'.

func (*Mouse) RequestPointerLockI

func (self *Mouse) RequestPointerLockI(args ...interface{})

RequestPointerLockI If the browser supports it you can request that the pointer be locked to the browser window. This is classically known as 'FPS controls', where the pointer can't leave the browser until the user presses an exit key. If the browser successfully enters a locked state the event Phaser.Mouse.pointerLock will be dispatched and the first parameter will be 'true'.

func (*Mouse) SetBACK_BUTTONA

func (self *Mouse) SetBACK_BUTTONA(member int)

SetBACK_BUTTONA empty description

func (*Mouse) SetButtonA

func (self *Mouse) SetButtonA(member int)

SetButtonA This property was removed in Phaser 2.4 and should no longer be used. Instead please see the Pointer button properties such as `Pointer.leftButton`, `Pointer.rightButton` and so on. Or Pointer.button holds the DOM event button value if you require that.

func (*Mouse) SetCallbackContextA

func (self *Mouse) SetCallbackContextA(member interface{})

SetCallbackContextA The context under which callbacks are called.

func (*Mouse) SetCaptureA

func (self *Mouse) SetCaptureA(member bool)

SetCaptureA If true the DOM mouse events will have event.preventDefault applied to them, if false they will propagate fully.

func (*Mouse) SetEnabledA

func (self *Mouse) SetEnabledA(member bool)

SetEnabledA Mouse input will only be processed if enabled.

func (*Mouse) SetEventA

func (self *Mouse) SetEventA(member interface{})

SetEventA The browser mouse DOM event. Will be null if no mouse event has ever been received. Access this property only inside a Mouse event handler and do not keep references to it.

func (*Mouse) SetFORWARD_BUTTONA

func (self *Mouse) SetFORWARD_BUTTONA(member int)

SetFORWARD_BUTTONA empty description

func (*Mouse) SetGameA

func (self *Mouse) SetGameA(member *Game)

SetGameA A reference to the currently running game.

func (*Mouse) SetInputA

func (self *Mouse) SetInputA(member *Input)

SetInputA A reference to the Phaser Input Manager.

func (*Mouse) SetLEFT_BUTTONA

func (self *Mouse) SetLEFT_BUTTONA(member int)

SetLEFT_BUTTONA empty description

func (*Mouse) SetLockedA

func (self *Mouse) SetLockedA(member bool)

SetLockedA If the mouse has been Pointer Locked successfully this will be set to true.

func (*Mouse) SetMIDDLE_BUTTONA

func (self *Mouse) SetMIDDLE_BUTTONA(member int)

SetMIDDLE_BUTTONA empty description

func (*Mouse) SetMouseDownCallbackA

func (self *Mouse) SetMouseDownCallbackA(member interface{})

SetMouseDownCallbackA A callback that can be fired when the mouse is pressed down.

func (*Mouse) SetMouseOutCallbackA

func (self *Mouse) SetMouseOutCallbackA(member interface{})

SetMouseOutCallbackA A callback that can be fired when the mouse is no longer over the game canvas.

func (*Mouse) SetMouseOverCallbackA

func (self *Mouse) SetMouseOverCallbackA(member interface{})

SetMouseOverCallbackA A callback that can be fired when the mouse enters the game canvas (usually after a mouseout).

func (*Mouse) SetMouseUpCallbackA

func (self *Mouse) SetMouseUpCallbackA(member interface{})

SetMouseUpCallbackA A callback that can be fired when the mouse is released from a pressed down state.

func (*Mouse) SetMouseWheelCallbackA

func (self *Mouse) SetMouseWheelCallbackA(member interface{})

SetMouseWheelCallbackA A callback that can be fired when the mousewheel is used.

func (*Mouse) SetNO_BUTTONA

func (self *Mouse) SetNO_BUTTONA(member int)

SetNO_BUTTONA empty description

func (*Mouse) SetPointerLockA

func (self *Mouse) SetPointerLockA(member *Signal)

SetPointerLockA This event is dispatched when the browser enters or leaves pointer lock state.

func (*Mouse) SetRIGHT_BUTTONA

func (self *Mouse) SetRIGHT_BUTTONA(member int)

SetRIGHT_BUTTONA empty description

func (*Mouse) SetStopOnGameOutA

func (self *Mouse) SetStopOnGameOutA(member bool)

SetStopOnGameOutA If true Pointer.stop will be called if the mouse leaves the game canvas.

func (*Mouse) SetWHEEL_DOWNA

func (self *Mouse) SetWHEEL_DOWNA(member int)

SetWHEEL_DOWNA empty description

func (*Mouse) SetWHEEL_UPA

func (self *Mouse) SetWHEEL_UPA(member int)

SetWHEEL_UPA empty description

func (*Mouse) SetWheelDeltaA

func (self *Mouse) SetWheelDeltaA(member int)

SetWheelDeltaA The direction of the _last_ mousewheel usage 1 for up -1 for down.

func (*Mouse) Start

func (self *Mouse) Start()

Start Starts the event listeners running.

func (*Mouse) StartI

func (self *Mouse) StartI(args ...interface{})

StartI Starts the event listeners running.

func (*Mouse) Stop

func (self *Mouse) Stop()

Stop Stop the event listeners.

func (*Mouse) StopI

func (self *Mouse) StopI(args ...interface{})

StopI Stop the event listeners.

func (*Mouse) StopOnGameOut

func (self *Mouse) StopOnGameOut() bool

StopOnGameOut If true Pointer.stop will be called if the mouse leaves the game canvas.

func (*Mouse) WHEEL_DOWN

func (self *Mouse) WHEEL_DOWN() int

WHEEL_DOWN empty description

func (*Mouse) WHEEL_UP

func (self *Mouse) WHEEL_UP() int

WHEEL_UP empty description

func (*Mouse) WheelDelta

func (self *Mouse) WheelDelta() int

WheelDelta The direction of the _last_ mousewheel usage 1 for up -1 for down.

func (*Mouse) WheelEventProxy

func (self *Mouse) WheelEventProxy(scaleFactor int, deltaMode int)

WheelEventProxy A purely internal event support class to proxy 'wheelscroll' and 'DOMMouseWheel' events to 'wheel'-like events.

See https://developer.mozilla.org/en-US/docs/Web/Events/mousewheel for choosing a scale and delta mode.

func (*Mouse) WheelEventProxyI

func (self *Mouse) WheelEventProxyI(args ...interface{})

WheelEventProxyI A purely internal event support class to proxy 'wheelscroll' and 'DOMMouseWheel' events to 'wheel'-like events.

See https://developer.mozilla.org/en-US/docs/Web/Events/mousewheel for choosing a scale and delta mode.

type MouseEvent

type MouseEvent struct{ *js.Object }

type Net

type Net struct {
	*js.Object
}

Net Phaser.Net handles browser URL related tasks such as checking host names, domain names and query string manipulation.

func NewNet

func NewNet(game *Game) *Net

NewNet Phaser.Net handles browser URL related tasks such as checking host names, domain names and query string manipulation.

func NewNetI

func NewNetI(args ...interface{}) *Net

NewNetI Phaser.Net handles browser URL related tasks such as checking host names, domain names and query string manipulation.

func ToNet

func ToNet(jsStruct interface{}) *Net

Net Binding conversion method to Net point

func (*Net) CheckDomainName

func (self *Net) CheckDomainName(domain string) bool

CheckDomainName Compares the given domain name against the hostname of the browser containing the game. If the domain name is found it returns true. You can specify a part of a domain, for example 'google' would match 'google.com', 'google.co.uk', etc. Do not include 'http://' at the start.

func (*Net) CheckDomainNameI

func (self *Net) CheckDomainNameI(args ...interface{}) bool

CheckDomainNameI Compares the given domain name against the hostname of the browser containing the game. If the domain name is found it returns true. You can specify a part of a domain, for example 'google' would match 'google.com', 'google.co.uk', etc. Do not include 'http://' at the start.

func (*Net) DecodeURI

func (self *Net) DecodeURI(value string) string

DecodeURI Takes a Uniform Resource Identifier (URI) component (previously created by encodeURIComponent or by a similar routine) and decodes it, replacing \ with spaces in the return. Used internally by the Net classes.

func (*Net) DecodeURII

func (self *Net) DecodeURII(args ...interface{}) string

DecodeURII Takes a Uniform Resource Identifier (URI) component (previously created by encodeURIComponent or by a similar routine) and decodes it, replacing \ with spaces in the return. Used internally by the Net classes.

func (*Net) GetHostName

func (self *Net) GetHostName() string

GetHostName Returns the hostname given by the browser.

func (*Net) GetHostNameI

func (self *Net) GetHostNameI(args ...interface{}) string

GetHostNameI Returns the hostname given by the browser.

func (*Net) GetQueryString

func (self *Net) GetQueryString() interface{}

GetQueryString Returns the Query String as an object. If you specify a parameter it will return just the value of that parameter, should it exist.

func (*Net) GetQueryString1O

func (self *Net) GetQueryString1O(parameter string) interface{}

GetQueryString1O Returns the Query String as an object. If you specify a parameter it will return just the value of that parameter, should it exist.

func (*Net) GetQueryStringI

func (self *Net) GetQueryStringI(args ...interface{}) interface{}

GetQueryStringI Returns the Query String as an object. If you specify a parameter it will return just the value of that parameter, should it exist.

func (*Net) UpdateQueryString

func (self *Net) UpdateQueryString(key string, value string, redirect bool, url string) string

UpdateQueryString Updates a value on the Query String and returns it in full. If the value doesn't already exist it is set. If the value exists it is replaced with the new value given. If you don't provide a new value it is removed from the query string. Optionally you can redirect to the new url, or just return it as a string.

func (*Net) UpdateQueryStringI

func (self *Net) UpdateQueryStringI(args ...interface{}) string

UpdateQueryStringI Updates a value on the Query String and returns it in full. If the value doesn't already exist it is set. If the value exists it is replaced with the new value given. If you don't provide a new value it is removed from the query string. Optionally you can redirect to the new url, or just return it as a string.

type P2Body

type P2Body struct{ *js.Object }

type P2Box

type P2Box struct{ *js.Object }

type P2Capsule

type P2Capsule struct{ *js.Object }

type P2Circle

type P2Circle struct{ *js.Object }

type P2ContactMaterial

type P2ContactMaterial struct{ *js.Object }

type P2Line

type P2Line struct{ *js.Object }

type P2LinearSpring

type P2LinearSpring struct{ *js.Object }

type P2Particle

type P2Particle struct{ *js.Object }

type P2Plane

type P2Plane struct{ *js.Object }

type P2Rectangle

type P2Rectangle struct{ *js.Object }

type P2RotationalSpring

type P2RotationalSpring struct{ *js.Object }

type P2Shape

type P2Shape struct{ *js.Object }

type P2World

type P2World struct{ *js.Object }

type PIXI

type PIXI struct {
	*js.Object
}

PIXI Namespace-class for [pixi.js](http://www.pixijs.com/).

Contains assorted static properties and enumerations.

func NewPIXI

func NewPIXI() *PIXI

NewPIXI Namespace-class for [pixi.js](http://www.pixijs.com/).

Contains assorted static properties and enumerations.

func NewPIXII

func NewPIXII(args ...interface{}) *PIXI

NewPIXII Namespace-class for [pixi.js](http://www.pixijs.com/).

Contains assorted static properties and enumerations.

func ToPIXI

func ToPIXI(jsStruct interface{}) *PIXI

PIXI Binding conversion method to PIXI point

func (*PIXI) CANVAS_RENDERER

func (self *PIXI) CANVAS_RENDERER() int

CANVAS_RENDERER empty description

func (*PIXI) CanUseNewCanvasBlendModes

func (self *PIXI) CanUseNewCanvasBlendModes() bool

CanUseNewCanvasBlendModes Checks whether the Canvas BlendModes are supported by the current browser for drawImage

func (*PIXI) CanUseNewCanvasBlendModesI

func (self *PIXI) CanUseNewCanvasBlendModesI(args ...interface{}) bool

CanUseNewCanvasBlendModesI Checks whether the Canvas BlendModes are supported by the current browser for drawImage

func (*PIXI) DEG_TO_RAD

func (self *PIXI) DEG_TO_RAD() int

DEG_TO_RAD empty description

func (*PIXI) DefaultRenderOptions

func (self *PIXI) DefaultRenderOptions() interface{}

DefaultRenderOptions The default render options if none are supplied to

{{#crossLink "WebGLRenderer"}}{{/crossLink}} or {{#crossLink "CanvasRenderer"}}{{/crossLink}}.

func (*PIXI) Game

func (self *PIXI) Game() *PhaserGame

Game A reference to the Phaser Game instance that owns this Pixi renderer.

func (*PIXI) GetNextPowerOfTwo

func (self *PIXI) GetNextPowerOfTwo(number int) int

GetNextPowerOfTwo Given a number, this function returns the closest number that is a power of two

this function is taken from Starling Framework as its pretty neat ;)

func (*PIXI) GetNextPowerOfTwoI

func (self *PIXI) GetNextPowerOfTwoI(args ...interface{}) int

GetNextPowerOfTwoI Given a number, this function returns the closest number that is a power of two

this function is taken from Starling Framework as its pretty neat ;)

func (*PIXI) Hex2rgb

func (self *PIXI) Hex2rgb(hex int)

Hex2rgb Converts a hex color number to an [R, G, B] array

func (*PIXI) Hex2rgbI

func (self *PIXI) Hex2rgbI(args ...interface{})

Hex2rgbI Converts a hex color number to an [R, G, B] array

func (*PIXI) IsPowerOfTwo

func (self *PIXI) IsPowerOfTwo(width int, height int) bool

IsPowerOfTwo checks if the given width and height make a power of two texture

func (*PIXI) IsPowerOfTwoI

func (self *PIXI) IsPowerOfTwoI(args ...interface{}) bool

IsPowerOfTwoI checks if the given width and height make a power of two texture

func (*PIXI) PI_2

func (self *PIXI) PI_2() int

PI_2 empty description

func (*PIXI) RAD_TO_DEG

func (self *PIXI) RAD_TO_DEG() int

RAD_TO_DEG empty description

func (*PIXI) RETINA_PREFIX

func (self *PIXI) RETINA_PREFIX() string

RETINA_PREFIX empty description

func (*PIXI) Rgb2hex

func (self *PIXI) Rgb2hex(rgb []interface{})

Rgb2hex Converts a color as an [R, G, B] array to a hex number

func (*PIXI) Rgb2hexI

func (self *PIXI) Rgb2hexI(args ...interface{})

Rgb2hexI Converts a color as an [R, G, B] array to a hex number

func (*PIXI) SetCANVAS_RENDERERA

func (self *PIXI) SetCANVAS_RENDERERA(member int)

SetCANVAS_RENDERERA empty description

func (*PIXI) SetDEG_TO_RADA

func (self *PIXI) SetDEG_TO_RADA(member int)

SetDEG_TO_RADA empty description

func (*PIXI) SetDefaultRenderOptionsA

func (self *PIXI) SetDefaultRenderOptionsA(member interface{})

SetDefaultRenderOptionsA The default render options if none are supplied to

{{#crossLink "WebGLRenderer"}}{{/crossLink}} or {{#crossLink "CanvasRenderer"}}{{/crossLink}}.

func (*PIXI) SetGameA

func (self *PIXI) SetGameA(member *PhaserGame)

SetGameA A reference to the Phaser Game instance that owns this Pixi renderer.

func (*PIXI) SetPI_2A

func (self *PIXI) SetPI_2A(member int)

SetPI_2A empty description

func (*PIXI) SetRAD_TO_DEGA

func (self *PIXI) SetRAD_TO_DEGA(member int)

SetRAD_TO_DEGA empty description

func (*PIXI) SetRETINA_PREFIXA

func (self *PIXI) SetRETINA_PREFIXA(member string)

SetRETINA_PREFIXA empty description

func (*PIXI) SetVERSIONA

func (self *PIXI) SetVERSIONA(member string)

SetVERSIONA Version of pixi that is loaded.

func (*PIXI) SetWEBGL_RENDERERA

func (self *PIXI) SetWEBGL_RENDERERA(member int)

SetWEBGL_RENDERERA empty description

func (*PIXI) VERSION

func (self *PIXI) VERSION() string

VERSION Version of pixi that is loaded.

func (*PIXI) WEBGL_RENDERER

func (self *PIXI) WEBGL_RENDERER() int

WEBGL_RENDERER empty description

type PIXICanvasBuffer

type PIXICanvasBuffer CanvasBuffer

type PIXIDisplayObjectContainer

type PIXIDisplayObjectContainer DisplayObjectContainer

type PIXIGraphics

type PIXIGraphics Graphics

type PIXIMatrix

type PIXIMatrix Matrix

type PIXIPoint

type PIXIPoint Point

PIXI

type PIXIStage

type PIXIStage Stage

type PIXITexture

type PIXITexture Texture

type Particle

type Particle struct {
	*js.Object
}

Particle Create a new `Particle` object. Particles are extended Sprites that are emitted by a particle emitter such as Phaser.Particles.Arcade.Emitter.

func NewParticle

func NewParticle(game *Game, x int, y int, key interface{}, frame interface{}) *Particle

NewParticle Create a new `Particle` object. Particles are extended Sprites that are emitted by a particle emitter such as Phaser.Particles.Arcade.Emitter.

func NewParticleI

func NewParticleI(args ...interface{}) *Particle

NewParticleI Create a new `Particle` object. Particles are extended Sprites that are emitted by a particle emitter such as Phaser.Particles.Arcade.Emitter.

func ToParticle

func ToParticle(jsStruct interface{}) *Particle

Particle Binding conversion method to Particle point

func (*Particle) AddChild

func (self *Particle) AddChild(child *DisplayObject) *DisplayObject

AddChild Adds a child to the container.

func (*Particle) AddChildAt

func (self *Particle) AddChildAt(child *DisplayObject, index int) *DisplayObject

AddChildAt Adds a child to the container at a specified index. If the index is out of bounds an error will be thrown

func (*Particle) AddChildAtI

func (self *Particle) AddChildAtI(args ...interface{}) *DisplayObject

AddChildAtI Adds a child to the container at a specified index. If the index is out of bounds an error will be thrown

func (*Particle) AddChildI

func (self *Particle) AddChildI(args ...interface{}) *DisplayObject

AddChildI Adds a child to the container.

func (*Particle) AlignIn

func (self *Particle) AlignIn(container interface{}) interface{}

AlignIn Aligns this Game Object within another Game Object, or Rectangle, known as the 'container', to one of 9 possible positions.

The container must be a Game Object, or Phaser.Rectangle object. This can include properties such as `World.bounds` or `Camera.view`, for aligning Game Objects within the world and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText, TileSprites or Buttons.

Please note that aligning a Sprite to another Game Object does **not** make it a child of the container. It simply modifies its position coordinates so it aligns with it.

The position constants you can use are:

`Phaser.TOP_LEFT`, `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

The Game Objects are placed in such a way that their _bounds_ align with the container, taking into consideration rotation, scale and the anchor property. This allows you to neatly align Game Objects, irrespective of their position value.

The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final aligned position of the Game Object. For example:

`sprite.alignIn(background, Phaser.BOTTOM_RIGHT, -20, -20)`

Would align the `sprite` to the bottom-right, but moved 20 pixels in from the corner. Think of the offsets as applying an adjustment to the containers bounds before the alignment takes place. So providing a negative offset will 'shrink' the container bounds by that amount, and providing a positive one expands it.

func (*Particle) AlignIn1O

func (self *Particle) AlignIn1O(container interface{}, position int) interface{}

AlignIn1O Aligns this Game Object within another Game Object, or Rectangle, known as the 'container', to one of 9 possible positions.

The container must be a Game Object, or Phaser.Rectangle object. This can include properties such as `World.bounds` or `Camera.view`, for aligning Game Objects within the world and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText, TileSprites or Buttons.

Please note that aligning a Sprite to another Game Object does **not** make it a child of the container. It simply modifies its position coordinates so it aligns with it.

The position constants you can use are:

`Phaser.TOP_LEFT`, `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

The Game Objects are placed in such a way that their _bounds_ align with the container, taking into consideration rotation, scale and the anchor property. This allows you to neatly align Game Objects, irrespective of their position value.

The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final aligned position of the Game Object. For example:

`sprite.alignIn(background, Phaser.BOTTOM_RIGHT, -20, -20)`

Would align the `sprite` to the bottom-right, but moved 20 pixels in from the corner. Think of the offsets as applying an adjustment to the containers bounds before the alignment takes place. So providing a negative offset will 'shrink' the container bounds by that amount, and providing a positive one expands it.

func (*Particle) AlignIn2O

func (self *Particle) AlignIn2O(container interface{}, position int, offsetX int) interface{}

AlignIn2O Aligns this Game Object within another Game Object, or Rectangle, known as the 'container', to one of 9 possible positions.

The container must be a Game Object, or Phaser.Rectangle object. This can include properties such as `World.bounds` or `Camera.view`, for aligning Game Objects within the world and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText, TileSprites or Buttons.

Please note that aligning a Sprite to another Game Object does **not** make it a child of the container. It simply modifies its position coordinates so it aligns with it.

The position constants you can use are:

`Phaser.TOP_LEFT`, `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

The Game Objects are placed in such a way that their _bounds_ align with the container, taking into consideration rotation, scale and the anchor property. This allows you to neatly align Game Objects, irrespective of their position value.

The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final aligned position of the Game Object. For example:

`sprite.alignIn(background, Phaser.BOTTOM_RIGHT, -20, -20)`

Would align the `sprite` to the bottom-right, but moved 20 pixels in from the corner. Think of the offsets as applying an adjustment to the containers bounds before the alignment takes place. So providing a negative offset will 'shrink' the container bounds by that amount, and providing a positive one expands it.

func (*Particle) AlignIn3O

func (self *Particle) AlignIn3O(container interface{}, position int, offsetX int, offsetY int) interface{}

AlignIn3O Aligns this Game Object within another Game Object, or Rectangle, known as the 'container', to one of 9 possible positions.

The container must be a Game Object, or Phaser.Rectangle object. This can include properties such as `World.bounds` or `Camera.view`, for aligning Game Objects within the world and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText, TileSprites or Buttons.

Please note that aligning a Sprite to another Game Object does **not** make it a child of the container. It simply modifies its position coordinates so it aligns with it.

The position constants you can use are:

`Phaser.TOP_LEFT`, `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

The Game Objects are placed in such a way that their _bounds_ align with the container, taking into consideration rotation, scale and the anchor property. This allows you to neatly align Game Objects, irrespective of their position value.

The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final aligned position of the Game Object. For example:

`sprite.alignIn(background, Phaser.BOTTOM_RIGHT, -20, -20)`

Would align the `sprite` to the bottom-right, but moved 20 pixels in from the corner. Think of the offsets as applying an adjustment to the containers bounds before the alignment takes place. So providing a negative offset will 'shrink' the container bounds by that amount, and providing a positive one expands it.

func (*Particle) AlignInI

func (self *Particle) AlignInI(args ...interface{}) interface{}

AlignInI Aligns this Game Object within another Game Object, or Rectangle, known as the 'container', to one of 9 possible positions.

The container must be a Game Object, or Phaser.Rectangle object. This can include properties such as `World.bounds` or `Camera.view`, for aligning Game Objects within the world and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText, TileSprites or Buttons.

Please note that aligning a Sprite to another Game Object does **not** make it a child of the container. It simply modifies its position coordinates so it aligns with it.

The position constants you can use are:

`Phaser.TOP_LEFT`, `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

The Game Objects are placed in such a way that their _bounds_ align with the container, taking into consideration rotation, scale and the anchor property. This allows you to neatly align Game Objects, irrespective of their position value.

The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final aligned position of the Game Object. For example:

`sprite.alignIn(background, Phaser.BOTTOM_RIGHT, -20, -20)`

Would align the `sprite` to the bottom-right, but moved 20 pixels in from the corner. Think of the offsets as applying an adjustment to the containers bounds before the alignment takes place. So providing a negative offset will 'shrink' the container bounds by that amount, and providing a positive one expands it.

func (*Particle) AlignTo

func (self *Particle) AlignTo(parent interface{}) interface{}

AlignTo Aligns this Game Object to the side of another Game Object, or Rectangle, known as the 'parent', in one of 11 possible positions.

The parent must be a Game Object, or Phaser.Rectangle object. This can include properties such as `World.bounds` or `Camera.view`, for aligning Game Objects within the world and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText, TileSprites or Buttons.

Please note that aligning a Sprite to another Game Object does **not** make it a child of the parent. It simply modifies its position coordinates so it aligns with it.

The position constants you can use are:

`Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_TOP`, `Phaser.LEFT_CENTER`, `Phaser.LEFT_BOTTOM`, `Phaser.RIGHT_TOP`, `Phaser.RIGHT_CENTER`, `Phaser.RIGHT_BOTTOM`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

The Game Objects are placed in such a way that their _bounds_ align with the parent, taking into consideration rotation, scale and the anchor property. This allows you to neatly align Game Objects, irrespective of their position value.

The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final aligned position of the Game Object. For example:

`sprite.alignTo(background, Phaser.BOTTOM_RIGHT, -20, -20)`

Would align the `sprite` to the bottom-right, but moved 20 pixels in from the corner. Think of the offsets as applying an adjustment to the parents bounds before the alignment takes place. So providing a negative offset will 'shrink' the parent bounds by that amount, and providing a positive one expands it.

func (*Particle) AlignTo1O

func (self *Particle) AlignTo1O(parent interface{}, position int) interface{}

AlignTo1O Aligns this Game Object to the side of another Game Object, or Rectangle, known as the 'parent', in one of 11 possible positions.

The parent must be a Game Object, or Phaser.Rectangle object. This can include properties such as `World.bounds` or `Camera.view`, for aligning Game Objects within the world and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText, TileSprites or Buttons.

Please note that aligning a Sprite to another Game Object does **not** make it a child of the parent. It simply modifies its position coordinates so it aligns with it.

The position constants you can use are:

`Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_TOP`, `Phaser.LEFT_CENTER`, `Phaser.LEFT_BOTTOM`, `Phaser.RIGHT_TOP`, `Phaser.RIGHT_CENTER`, `Phaser.RIGHT_BOTTOM`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

The Game Objects are placed in such a way that their _bounds_ align with the parent, taking into consideration rotation, scale and the anchor property. This allows you to neatly align Game Objects, irrespective of their position value.

The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final aligned position of the Game Object. For example:

`sprite.alignTo(background, Phaser.BOTTOM_RIGHT, -20, -20)`

Would align the `sprite` to the bottom-right, but moved 20 pixels in from the corner. Think of the offsets as applying an adjustment to the parents bounds before the alignment takes place. So providing a negative offset will 'shrink' the parent bounds by that amount, and providing a positive one expands it.

func (*Particle) AlignTo2O

func (self *Particle) AlignTo2O(parent interface{}, position int, offsetX int) interface{}

AlignTo2O Aligns this Game Object to the side of another Game Object, or Rectangle, known as the 'parent', in one of 11 possible positions.

The parent must be a Game Object, or Phaser.Rectangle object. This can include properties such as `World.bounds` or `Camera.view`, for aligning Game Objects within the world and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText, TileSprites or Buttons.

Please note that aligning a Sprite to another Game Object does **not** make it a child of the parent. It simply modifies its position coordinates so it aligns with it.

The position constants you can use are:

`Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_TOP`, `Phaser.LEFT_CENTER`, `Phaser.LEFT_BOTTOM`, `Phaser.RIGHT_TOP`, `Phaser.RIGHT_CENTER`, `Phaser.RIGHT_BOTTOM`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

The Game Objects are placed in such a way that their _bounds_ align with the parent, taking into consideration rotation, scale and the anchor property. This allows you to neatly align Game Objects, irrespective of their position value.

The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final aligned position of the Game Object. For example:

`sprite.alignTo(background, Phaser.BOTTOM_RIGHT, -20, -20)`

Would align the `sprite` to the bottom-right, but moved 20 pixels in from the corner. Think of the offsets as applying an adjustment to the parents bounds before the alignment takes place. So providing a negative offset will 'shrink' the parent bounds by that amount, and providing a positive one expands it.

func (*Particle) AlignTo3O

func (self *Particle) AlignTo3O(parent interface{}, position int, offsetX int, offsetY int) interface{}

AlignTo3O Aligns this Game Object to the side of another Game Object, or Rectangle, known as the 'parent', in one of 11 possible positions.

The parent must be a Game Object, or Phaser.Rectangle object. This can include properties such as `World.bounds` or `Camera.view`, for aligning Game Objects within the world and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText, TileSprites or Buttons.

Please note that aligning a Sprite to another Game Object does **not** make it a child of the parent. It simply modifies its position coordinates so it aligns with it.

The position constants you can use are:

`Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_TOP`, `Phaser.LEFT_CENTER`, `Phaser.LEFT_BOTTOM`, `Phaser.RIGHT_TOP`, `Phaser.RIGHT_CENTER`, `Phaser.RIGHT_BOTTOM`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

The Game Objects are placed in such a way that their _bounds_ align with the parent, taking into consideration rotation, scale and the anchor property. This allows you to neatly align Game Objects, irrespective of their position value.

The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final aligned position of the Game Object. For example:

`sprite.alignTo(background, Phaser.BOTTOM_RIGHT, -20, -20)`

Would align the `sprite` to the bottom-right, but moved 20 pixels in from the corner. Think of the offsets as applying an adjustment to the parents bounds before the alignment takes place. So providing a negative offset will 'shrink' the parent bounds by that amount, and providing a positive one expands it.

func (*Particle) AlignToI

func (self *Particle) AlignToI(args ...interface{}) interface{}

AlignToI Aligns this Game Object to the side of another Game Object, or Rectangle, known as the 'parent', in one of 11 possible positions.

The parent must be a Game Object, or Phaser.Rectangle object. This can include properties such as `World.bounds` or `Camera.view`, for aligning Game Objects within the world and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText, TileSprites or Buttons.

Please note that aligning a Sprite to another Game Object does **not** make it a child of the parent. It simply modifies its position coordinates so it aligns with it.

The position constants you can use are:

`Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_TOP`, `Phaser.LEFT_CENTER`, `Phaser.LEFT_BOTTOM`, `Phaser.RIGHT_TOP`, `Phaser.RIGHT_CENTER`, `Phaser.RIGHT_BOTTOM`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

The Game Objects are placed in such a way that their _bounds_ align with the parent, taking into consideration rotation, scale and the anchor property. This allows you to neatly align Game Objects, irrespective of their position value.

The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final aligned position of the Game Object. For example:

`sprite.alignTo(background, Phaser.BOTTOM_RIGHT, -20, -20)`

Would align the `sprite` to the bottom-right, but moved 20 pixels in from the corner. Think of the offsets as applying an adjustment to the parents bounds before the alignment takes place. So providing a negative offset will 'shrink' the parent bounds by that amount, and providing a positive one expands it.

func (*Particle) Alive

func (self *Particle) Alive() bool

Alive A useful flag to control if the Game Object is alive or dead.

This is set automatically by the Health components `damage` method should the object run out of health. Or you can toggle it via your game code.

This property is mostly just provided to be used by your game - it doesn't effect rendering or logic updates. However you can use `Group.getFirstAlive` in conjunction with this property for fast object pooling and recycling.

func (*Particle) AlphaData

func (self *Particle) AlphaData() []interface{}

AlphaData A reference to the alphaData array owned by the Emitter that emitted this Particle.

func (*Particle) Anchor

func (self *Particle) Anchor() *Point

Anchor The anchor sets the origin point of the texture.

The default is 0,0 this means the texture's origin is the top left

Setting than anchor to 0.5,0.5 means the textures origin is centered

Setting the anchor to 1,1 would mean the textures origin points will be the bottom right corner

func (*Particle) Angle

func (self *Particle) Angle() int

Angle The angle property is the rotation of the Game Object in *degrees* from its original orientation.

Values from 0 to 180 represent clockwise rotation; values from 0 to -180 represent counterclockwise rotation.

Values outside this range are added to or subtracted from 360 to obtain a value within the range. For example, the statement player.angle = 450 is the same as player.angle = 90.

If you wish to work in radians instead of degrees you can use the property `rotation` instead. Working in radians is slightly faster as it doesn't have to perform any calculations.

func (*Particle) Animations

func (self *Particle) Animations() *AnimationManager

Animations If the Game Object is enabled for animation (such as a Phaser.Sprite) this is a reference to its AnimationManager instance. Through it you can create, play, pause and stop animations.

func (*Particle) AutoAlpha

func (self *Particle) AutoAlpha() bool

AutoAlpha If this Particle automatically changes alpha this is set to true by Particle.setAlphaData.

func (*Particle) AutoCull

func (self *Particle) AutoCull() bool

AutoCull A Game Object with `autoCull` set to true will check its bounds against the World Camera every frame. If it is not intersecting the Camera bounds at any point then it has its `renderable` property set to `false`. This keeps the Game Object alive and still processing updates, but forces it to skip the render step entirely.

This is a relatively expensive operation, especially if enabled on hundreds of Game Objects. So enable it only if you know it's required, or you have tested performance and find it acceptable.

func (*Particle) AutoScale

func (self *Particle) AutoScale() bool

AutoScale If this Particle automatically scales this is set to true by Particle.setScaleData.

func (*Particle) BlendMode

func (self *Particle) BlendMode() int

BlendMode The blend mode to be applied to the sprite. Set to PIXI.blendModes.NORMAL to remove any blend mode.

Warning: You cannot have a blend mode and a filter active on the same Sprite. Doing so will render the sprite invisible.

func (*Particle) Body

func (self *Particle) Body() interface{}

Body `body` is the Game Objects physics body. Once a Game Object is enabled for physics you access all associated properties and methods via it.

By default Game Objects won't add themselves to any physics system and their `body` property will be `null`.

To enable this Game Object for physics you need to call `game.physics.enable(object, system)` where `object` is this object and `system` is the Physics system you are using. If none is given it defaults to `Phaser.Physics.Arcade`.

You can alternatively call `game.physics.arcade.enable(object)`, or add this Game Object to a physics enabled Group.

Important: Enabling a Game Object for P2 or Ninja physics will automatically set its `anchor` property to 0.5, so the physics body is centered on the Game Object.

If you need a different result then adjust or re-create the Body shape offsets manually or reset the anchor after enabling physics.

func (*Particle) Bottom

func (self *Particle) Bottom() int

Bottom The sum of the y and height properties. This is the same as `y + height - offsetY`.

func (*Particle) BringToTop

func (self *Particle) BringToTop() *DisplayObject

BringToTop Brings this Game Object to the top of its parents display list. Visually this means it will render over the top of any old child in the same Group.

If this Game Object hasn't been added to a custom Group then this method will bring it to the top of the Game World, because the World is the root Group from which all Game Objects descend.

func (*Particle) BringToTopI

func (self *Particle) BringToTopI(args ...interface{}) *DisplayObject

BringToTopI Brings this Game Object to the top of its parents display list. Visually this means it will render over the top of any old child in the same Group.

If this Game Object hasn't been added to a custom Group then this method will bring it to the top of the Game World, because the World is the root Group from which all Game Objects descend.

func (*Particle) CameraOffset

func (self *Particle) CameraOffset() *Point

CameraOffset The x/y coordinate offset applied to the top-left of the camera that this Game Object will be drawn at if `fixedToCamera` is true.

The values are relative to the top-left of the camera view and in addition to any parent of the Game Object on the display list.

func (*Particle) CenterX

func (self *Particle) CenterX() int

CenterX The center x coordinate of the Game Object. This is the same as `(x - offsetX) + (width / 2)`.

func (*Particle) CenterY

func (self *Particle) CenterY() int

CenterY The center y coordinate of the Game Object. This is the same as `(y - offsetY) + (height / 2)`.

func (*Particle) CheckTransform

func (self *Particle) CheckTransform(wt *Matrix)

CheckTransform Adjust scaling limits, if set, to this Game Object.

func (*Particle) CheckTransformI

func (self *Particle) CheckTransformI(args ...interface{})

CheckTransformI Adjust scaling limits, if set, to this Game Object.

func (*Particle) CheckWorldBounds

func (self *Particle) CheckWorldBounds() bool

CheckWorldBounds If this is set to `true` the Game Object checks if it is within the World bounds each frame.

When it is no longer intersecting the world bounds it dispatches the `onOutOfBounds` event.

If it was *previously* out of bounds but is now intersecting the world bounds again it dispatches the `onEnterBounds` event.

It also optionally kills the Game Object if `outOfBoundsKill` is `true`.

When `checkWorldBounds` is enabled it forces the Game Object to calculate its full bounds every frame.

This is a relatively expensive operation, especially if enabled on hundreds of Game Objects. So enable it only if you know it's required, or you have tested performance and find it acceptable.

func (*Particle) Children

func (self *Particle) Children() []DisplayObject

Children [read-only] The array of children of this container.

func (*Particle) Components

func (self *Particle) Components() interface{}

Components The components this Game Object has installed.

func (*Particle) Contains

func (self *Particle) Contains(child *DisplayObject) bool

Contains Determines whether the specified display object is a child of the DisplayObjectContainer instance or the instance itself.

func (*Particle) ContainsI

func (self *Particle) ContainsI(args ...interface{}) bool

ContainsI Determines whether the specified display object is a child of the DisplayObjectContainer instance or the instance itself.

func (*Particle) Crop

func (self *Particle) Crop(rect *Rectangle)

Crop Crop allows you to crop the texture being used to display this Game Object. Setting a crop rectangle modifies the core texture frame. The Game Object width and height properties will be adjusted accordingly.

Cropping takes place from the top-left and can be modified in real-time either by providing an updated rectangle object to this method, or by modifying `cropRect` property directly and then calling `updateCrop`.

The rectangle object given to this method can be either a `Phaser.Rectangle` or any other object so long as it has public `x`, `y`, `width`, `height`, `right` and `bottom` properties.

A reference to the rectangle is stored in `cropRect` unless the `copy` parameter is `true`, in which case the values are duplicated to a local object.

func (*Particle) Crop1O

func (self *Particle) Crop1O(rect *Rectangle, copy bool)

Crop1O Crop allows you to crop the texture being used to display this Game Object. Setting a crop rectangle modifies the core texture frame. The Game Object width and height properties will be adjusted accordingly.

Cropping takes place from the top-left and can be modified in real-time either by providing an updated rectangle object to this method, or by modifying `cropRect` property directly and then calling `updateCrop`.

The rectangle object given to this method can be either a `Phaser.Rectangle` or any other object so long as it has public `x`, `y`, `width`, `height`, `right` and `bottom` properties.

A reference to the rectangle is stored in `cropRect` unless the `copy` parameter is `true`, in which case the values are duplicated to a local object.

func (*Particle) CropI

func (self *Particle) CropI(args ...interface{})

CropI Crop allows you to crop the texture being used to display this Game Object. Setting a crop rectangle modifies the core texture frame. The Game Object width and height properties will be adjusted accordingly.

Cropping takes place from the top-left and can be modified in real-time either by providing an updated rectangle object to this method, or by modifying `cropRect` property directly and then calling `updateCrop`.

The rectangle object given to this method can be either a `Phaser.Rectangle` or any other object so long as it has public `x`, `y`, `width`, `height`, `right` and `bottom` properties.

A reference to the rectangle is stored in `cropRect` unless the `copy` parameter is `true`, in which case the values are duplicated to a local object.

func (*Particle) CropRect

func (self *Particle) CropRect() *Rectangle

CropRect The Rectangle used to crop the texture this Game Object uses. Set this property via `crop`. If you modify this property directly you must call `updateCrop` in order to have the change take effect.

func (*Particle) Damage

func (self *Particle) Damage() interface{}

Damage Damages the Game Object. This removes the given amount of health from the `health` property.

If health is taken below or is equal to zero then the `kill` method is called.

func (*Particle) Data

func (self *Particle) Data() interface{}

Data An empty Object that belongs to this Game Object. This value isn't ever used internally by Phaser, but may be used by your own code, or by Phaser Plugins, to store data that needs to be associated with the Game Object, without polluting the Game Object directly.

func (*Particle) Debug

func (self *Particle) Debug() bool

Debug A debug flag designed for use with `Game.enableStep`.

func (*Particle) DeltaX

func (self *Particle) DeltaX() int

DeltaX Returns the delta x value. The difference between world.x now and in the previous frame.

The value will be positive if the Game Object has moved to the right or negative if to the left.

func (*Particle) DeltaY

func (self *Particle) DeltaY() int

DeltaY Returns the delta y value. The difference between world.y now and in the previous frame.

The value will be positive if the Game Object has moved down or negative if up.

func (*Particle) DeltaZ

func (self *Particle) DeltaZ() int

DeltaZ Returns the delta z value. The difference between rotation now and in the previous frame. The delta value.

func (*Particle) Destroy

func (self *Particle) Destroy()

Destroy Destroys the Game Object. This removes it from its parent group, destroys the input, event and animation handlers if present and nulls its reference to `game`, freeing it up for garbage collection.

If this Game Object has the Events component it will also dispatch the `onDestroy` event.

You can optionally also destroy the BaseTexture this Game Object is using. Be careful if you've more than one Game Object sharing the same BaseTexture.

func (*Particle) Destroy1O

func (self *Particle) Destroy1O(destroyChildren bool)

Destroy1O Destroys the Game Object. This removes it from its parent group, destroys the input, event and animation handlers if present and nulls its reference to `game`, freeing it up for garbage collection.

If this Game Object has the Events component it will also dispatch the `onDestroy` event.

You can optionally also destroy the BaseTexture this Game Object is using. Be careful if you've more than one Game Object sharing the same BaseTexture.

func (*Particle) Destroy2O

func (self *Particle) Destroy2O(destroyChildren bool, destroyTexture bool)

Destroy2O Destroys the Game Object. This removes it from its parent group, destroys the input, event and animation handlers if present and nulls its reference to `game`, freeing it up for garbage collection.

If this Game Object has the Events component it will also dispatch the `onDestroy` event.

You can optionally also destroy the BaseTexture this Game Object is using. Be careful if you've more than one Game Object sharing the same BaseTexture.

func (*Particle) DestroyI

func (self *Particle) DestroyI(args ...interface{})

DestroyI Destroys the Game Object. This removes it from its parent group, destroys the input, event and animation handlers if present and nulls its reference to `game`, freeing it up for garbage collection.

If this Game Object has the Events component it will also dispatch the `onDestroy` event.

You can optionally also destroy the BaseTexture this Game Object is using. Be careful if you've more than one Game Object sharing the same BaseTexture.

func (*Particle) DestroyPhase

func (self *Particle) DestroyPhase() bool

DestroyPhase As a Game Object runs through its destroy method this flag is set to true, and can be checked in any sub-systems or plugins it is being destroyed from.

func (*Particle) Events

func (self *Particle) Events() *Events

Events All Phaser Game Objects have an Events class which contains all of the events that are dispatched when certain things happen to this Game Object, or any of its components.

func (*Particle) Exists

func (self *Particle) Exists() bool

Exists Controls if this Sprite is processed by the core Phaser game loops and Group loops.

func (*Particle) FixedToCamera

func (self *Particle) FixedToCamera() bool

FixedToCamera A Game Object that is "fixed" to the camera uses its x/y coordinates as offsets from the top left of the camera during rendering.

The values are adjusted at the rendering stage, overriding the Game Objects actual world position.

The end result is that the Game Object will appear to be 'fixed' to the camera, regardless of where in the game world the camera is viewing. This is useful if for example this Game Object is a UI item that you wish to be visible at all times regardless where in the world the camera is.

The offsets are stored in the `cameraOffset` property.

Note that the `cameraOffset` values are in addition to any parent of this Game Object on the display list.

Be careful not to set `fixedToCamera` on Game Objects which are in Groups that already have `fixedToCamera` enabled on them.

func (*Particle) Frame

func (self *Particle) Frame() int

Frame Gets or sets the current frame index of the texture being used to render this Game Object.

To change the frame set `frame` to the index of the new frame in the sprite sheet you wish this Game Object to use, for example: `player.frame = 4`.

If the frame index given doesn't exist it will revert to the first frame found in the texture.

If you are using a texture atlas then you should use the `frameName` property instead.

If you wish to fully replace the texture being used see `loadTexture`.

func (*Particle) FrameName

func (self *Particle) FrameName() string

FrameName Gets or sets the current frame name of the texture being used to render this Game Object.

To change the frame set `frameName` to the name of the new frame in the texture atlas you wish this Game Object to use, for example: `player.frameName = "idle"`.

If the frame name given doesn't exist it will revert to the first frame found in the texture and throw a console warning.

If you are using a sprite sheet then you should use the `frame` property instead.

If you wish to fully replace the texture being used see `loadTexture`.

func (*Particle) Fresh

func (self *Particle) Fresh() bool

Fresh A Game Object is considered `fresh` if it has just been created or reset and is yet to receive a renderer transform update. This property is mostly used internally by the physics systems, but is exposed for the use of plugins.

func (*Particle) Game

func (self *Particle) Game() *Game

Game A reference to the currently running Game.

func (*Particle) GetBounds

func (self *Particle) GetBounds(matrix *Matrix) *Rectangle

GetBounds Returns the bounds of the Sprite as a rectangle.

The bounds calculation takes the worldTransform into account.

It is important to note that the transform is not updated when you call this method.

So if this Sprite is the child of a Display Object which has had its transform

updated since the last render pass, those changes will not yet have been applied

to this Sprites worldTransform. If you need to ensure that all parent transforms

are factored into this getBounds operation then you should call `updateTransform`

on the root most object in this Sprites display list first.

func (*Particle) GetBoundsI

func (self *Particle) GetBoundsI(args ...interface{}) *Rectangle

GetBoundsI Returns the bounds of the Sprite as a rectangle.

The bounds calculation takes the worldTransform into account.

It is important to note that the transform is not updated when you call this method.

So if this Sprite is the child of a Display Object which has had its transform

updated since the last render pass, those changes will not yet have been applied

to this Sprites worldTransform. If you need to ensure that all parent transforms

are factored into this getBounds operation then you should call `updateTransform`

on the root most object in this Sprites display list first.

func (*Particle) GetChildAt

func (self *Particle) GetChildAt(index int) *DisplayObject

GetChildAt Returns the child at the specified index

func (*Particle) GetChildAtI

func (self *Particle) GetChildAtI(args ...interface{}) *DisplayObject

GetChildAtI Returns the child at the specified index

func (*Particle) GetChildIndex

func (self *Particle) GetChildIndex(child *DisplayObject) int

GetChildIndex Returns the index position of a child DisplayObject instance

func (*Particle) GetChildIndexI

func (self *Particle) GetChildIndexI(args ...interface{}) int

GetChildIndexI Returns the index position of a child DisplayObject instance

func (*Particle) GetLocalBounds

func (self *Particle) GetLocalBounds() *Rectangle

GetLocalBounds Retrieves the non-global local bounds of the Sprite as a rectangle. The calculation takes all visible children into consideration.

func (*Particle) GetLocalBoundsI

func (self *Particle) GetLocalBoundsI(args ...interface{}) *Rectangle

GetLocalBoundsI Retrieves the non-global local bounds of the Sprite as a rectangle. The calculation takes all visible children into consideration.

func (*Particle) Heal

func (self *Particle) Heal() interface{}

Heal Heal the Game Object. This adds the given amount of health to the `health` property.

func (*Particle) Health

func (self *Particle) Health() int

Health The Game Objects health value. This is a handy property for setting and manipulating health on a Game Object.

It can be used in combination with the `damage` method or modified directly.

func (*Particle) Height

func (self *Particle) Height() int

Height The height of the sprite, setting this will actually modify the scale to achieve the value set

func (*Particle) IgnoreChildInput

func (self *Particle) IgnoreChildInput() bool

IgnoreChildInput If `ignoreChildInput` is `false` it will allow this objects _children_ to be considered as valid for Input events.

If this property is `true` then the children will _not_ be considered as valid for Input events.

Note that this property isn't recursive: only immediate children are influenced, it doesn't scan further down.

func (*Particle) InCamera

func (self *Particle) InCamera() bool

InCamera Checks if the Game Objects bounds intersect with the Game Camera bounds. Returns `true` if they do, otherwise `false` if fully outside of the Cameras bounds.

func (*Particle) InWorld

func (self *Particle) InWorld() bool

InWorld Checks if the Game Objects bounds are within, or intersect at any point with the Game World bounds.

func (*Particle) Input

func (self *Particle) Input() interface{}

Input The Input Handler for this Game Object.

By default it is disabled. If you wish this Game Object to process input events you should enable it with: `inputEnabled = true`.

After you have done this, this property will be a reference to the Phaser InputHandler.

func (*Particle) InputEnabled

func (self *Particle) InputEnabled() bool

InputEnabled By default a Game Object won't process any input events. By setting `inputEnabled` to true a Phaser.InputHandler is created for this Game Object and it will then start to process click / touch events and more.

You can then access the Input Handler via `this.input`.

Note that Input related events are dispatched from `this.events`, i.e.: `events.onInputDown`.

If you set this property to false it will stop the Input Handler from processing any more input events.

If you want to _temporarily_ disable input for a Game Object, then it's better to set `input.enabled = false`, as it won't reset any of the Input Handlers internal properties. You can then toggle this back on as needed.

func (*Particle) Key

func (self *Particle) Key() interface{}

Key The key of the image or texture used by this Game Object during rendering. If it is a string it's the string used to retrieve the texture from the Phaser Image Cache. It can also be an instance of a RenderTexture, BitmapData, Video or PIXI.Texture. If a Game Object is created without a key it is automatically assigned the key `__default` which is a 32x32 transparent PNG stored within the Cache. If a Game Object is given a key which doesn't exist in the Image Cache it is re-assigned the key `__missing` which is a 32x32 PNG of a green box with a line through it.

func (*Particle) Kill

func (self *Particle) Kill() *DisplayObject

Kill Kills a Game Object. A killed Game Object has its `alive`, `exists` and `visible` properties all set to false.

It will dispatch the `onKilled` event. You can listen to `events.onKilled` for the signal.

Note that killing a Game Object is a way for you to quickly recycle it in an object pool, it doesn't destroy the object or free it up from memory.

If you don't need this Game Object any more you should call `destroy` instead.

func (*Particle) KillI

func (self *Particle) KillI(args ...interface{}) *DisplayObject

KillI Kills a Game Object. A killed Game Object has its `alive`, `exists` and `visible` properties all set to false.

It will dispatch the `onKilled` event. You can listen to `events.onKilled` for the signal.

Note that killing a Game Object is a way for you to quickly recycle it in an object pool, it doesn't destroy the object or free it up from memory.

If you don't need this Game Object any more you should call `destroy` instead.

func (*Particle) Left

func (self *Particle) Left() int

Left The left coordinate of the Game Object. This is the same as `x - offsetX`.

func (*Particle) Lifespan

func (self *Particle) Lifespan() int

Lifespan The lifespan allows you to give a Game Object a lifespan in milliseconds.

Once the Game Object is 'born' you can set this to a positive value.

It is automatically decremented by the millisecond equivalent of `game.time.physicsElapsed` each frame. When it reaches zero it will call the `kill` method.

Very handy for particles, bullets, collectibles, or any other short-lived entity.

func (*Particle) LoadTexture

func (self *Particle) LoadTexture(key interface{})

LoadTexture Changes the base texture the Game Object is using. The old texture is removed and the new one is referenced or fetched from the Cache.

If your Game Object is using a frame from a texture atlas and you just wish to change to another frame, then see the `frame` or `frameName` properties instead.

You should only use `loadTexture` if you want to replace the base texture entirely.

Calling this method causes a WebGL texture update, so use sparingly or in low-intensity portions of your game, or if you know the new texture is already on the GPU.

You can use the new const `Phaser.PENDING_ATLAS` as the texture key for any sprite. Doing this then sets the key to be the `frame` argument (the frame is set to zero).

This allows you to create sprites using `load.image` during development, and then change them to use a Texture Atlas later in development by simply searching your code for 'PENDING_ATLAS' and swapping it to be the key of the atlas data.

Note: You cannot use a RenderTexture as a texture for a TileSprite.

func (*Particle) LoadTexture1O

func (self *Particle) LoadTexture1O(key interface{}, frame interface{})

LoadTexture1O Changes the base texture the Game Object is using. The old texture is removed and the new one is referenced or fetched from the Cache.

If your Game Object is using a frame from a texture atlas and you just wish to change to another frame, then see the `frame` or `frameName` properties instead.

You should only use `loadTexture` if you want to replace the base texture entirely.

Calling this method causes a WebGL texture update, so use sparingly or in low-intensity portions of your game, or if you know the new texture is already on the GPU.

You can use the new const `Phaser.PENDING_ATLAS` as the texture key for any sprite. Doing this then sets the key to be the `frame` argument (the frame is set to zero).

This allows you to create sprites using `load.image` during development, and then change them to use a Texture Atlas later in development by simply searching your code for 'PENDING_ATLAS' and swapping it to be the key of the atlas data.

Note: You cannot use a RenderTexture as a texture for a TileSprite.

func (*Particle) LoadTexture2O

func (self *Particle) LoadTexture2O(key interface{}, frame interface{}, stopAnimation bool)

LoadTexture2O Changes the base texture the Game Object is using. The old texture is removed and the new one is referenced or fetched from the Cache.

If your Game Object is using a frame from a texture atlas and you just wish to change to another frame, then see the `frame` or `frameName` properties instead.

You should only use `loadTexture` if you want to replace the base texture entirely.

Calling this method causes a WebGL texture update, so use sparingly or in low-intensity portions of your game, or if you know the new texture is already on the GPU.

You can use the new const `Phaser.PENDING_ATLAS` as the texture key for any sprite. Doing this then sets the key to be the `frame` argument (the frame is set to zero).

This allows you to create sprites using `load.image` during development, and then change them to use a Texture Atlas later in development by simply searching your code for 'PENDING_ATLAS' and swapping it to be the key of the atlas data.

Note: You cannot use a RenderTexture as a texture for a TileSprite.

func (*Particle) LoadTextureI

func (self *Particle) LoadTextureI(args ...interface{})

LoadTextureI Changes the base texture the Game Object is using. The old texture is removed and the new one is referenced or fetched from the Cache.

If your Game Object is using a frame from a texture atlas and you just wish to change to another frame, then see the `frame` or `frameName` properties instead.

You should only use `loadTexture` if you want to replace the base texture entirely.

Calling this method causes a WebGL texture update, so use sparingly or in low-intensity portions of your game, or if you know the new texture is already on the GPU.

You can use the new const `Phaser.PENDING_ATLAS` as the texture key for any sprite. Doing this then sets the key to be the `frame` argument (the frame is set to zero).

This allows you to create sprites using `load.image` during development, and then change them to use a Texture Atlas later in development by simply searching your code for 'PENDING_ATLAS' and swapping it to be the key of the atlas data.

Note: You cannot use a RenderTexture as a texture for a TileSprite.

func (*Particle) MaxHealth

func (self *Particle) MaxHealth() int

MaxHealth The Game Objects maximum health value. This works in combination with the `heal` method to ensure the health value never exceeds the maximum.

func (*Particle) MoveDown

func (self *Particle) MoveDown() *DisplayObject

MoveDown Moves this Game Object down one place in its parents display list. This call has no effect if the Game Object is already at the bottom of the display list.

If this Game Object hasn't been added to a custom Group then this method will move it one object down within the Game World, because the World is the root Group from which all Game Objects descend.

func (*Particle) MoveDownI

func (self *Particle) MoveDownI(args ...interface{}) *DisplayObject

MoveDownI Moves this Game Object down one place in its parents display list. This call has no effect if the Game Object is already at the bottom of the display list.

If this Game Object hasn't been added to a custom Group then this method will move it one object down within the Game World, because the World is the root Group from which all Game Objects descend.

func (*Particle) MoveUp

func (self *Particle) MoveUp() *DisplayObject

MoveUp Moves this Game Object up one place in its parents display list. This call has no effect if the Game Object is already at the top of the display list.

If this Game Object hasn't been added to a custom Group then this method will move it one object up within the Game World, because the World is the root Group from which all Game Objects descend.

func (*Particle) MoveUpI

func (self *Particle) MoveUpI(args ...interface{}) *DisplayObject

MoveUpI Moves this Game Object up one place in its parents display list. This call has no effect if the Game Object is already at the top of the display list.

If this Game Object hasn't been added to a custom Group then this method will move it one object up within the Game World, because the World is the root Group from which all Game Objects descend.

func (*Particle) Name

func (self *Particle) Name() string

Name A user defined name given to this Game Object. This value isn't ever used internally by Phaser, it is meant as a game level property.

func (*Particle) OffsetX

func (self *Particle) OffsetX() int

OffsetX The amount the Game Object is visually offset from its x coordinate. This is the same as `width * anchor.x`. It will only be > 0 if anchor.x is not equal to zero.

func (*Particle) OffsetY

func (self *Particle) OffsetY() int

OffsetY The amount the Game Object is visually offset from its y coordinate. This is the same as `height * anchor.y`. It will only be > 0 if anchor.y is not equal to zero.

func (*Particle) OnEmit

func (self *Particle) OnEmit()

OnEmit Called by the Emitter when this particle is emitted. Left empty for you to over-ride as required.

func (*Particle) OnEmitI

func (self *Particle) OnEmitI(args ...interface{})

OnEmitI Called by the Emitter when this particle is emitted. Left empty for you to over-ride as required.

func (*Particle) OnTextureUpdate

func (self *Particle) OnTextureUpdate(event interface{})

OnTextureUpdate When the texture is updated, this event will fire to update the scale and frame

func (*Particle) OnTextureUpdateI

func (self *Particle) OnTextureUpdateI(args ...interface{})

OnTextureUpdateI When the texture is updated, this event will fire to update the scale and frame

func (*Particle) OutOfBoundsKill

func (self *Particle) OutOfBoundsKill() bool

OutOfBoundsKill If this and the `checkWorldBounds` property are both set to `true` then the `kill` method is called as soon as `inWorld` returns false.

func (*Particle) OutOfCameraBoundsKill

func (self *Particle) OutOfCameraBoundsKill() bool

OutOfCameraBoundsKill If this and the `autoCull` property are both set to `true`, then the `kill` method is called as soon as the Game Object leaves the camera bounds.

func (*Particle) Overlap

func (self *Particle) Overlap(displayObject interface{}) bool

Overlap Checks to see if the bounds of this Game Object overlaps with the bounds of the given Display Object, which can be a Sprite, Image, TileSprite or anything that extends those such as Button or provides a `getBounds` method and result.

This check ignores the `hitArea` property if set and runs a `getBounds` comparison on both objects to determine the result.

Therefore it's relatively expensive to use in large quantities, i.e. with lots of Sprites at a high frequency. It should be fine for low-volume testing where physics isn't required.

func (*Particle) OverlapI

func (self *Particle) OverlapI(args ...interface{}) bool

OverlapI Checks to see if the bounds of this Game Object overlaps with the bounds of the given Display Object, which can be a Sprite, Image, TileSprite or anything that extends those such as Button or provides a `getBounds` method and result.

This check ignores the `hitArea` property if set and runs a `getBounds` comparison on both objects to determine the result.

Therefore it's relatively expensive to use in large quantities, i.e. with lots of Sprites at a high frequency. It should be fine for low-volume testing where physics isn't required.

func (*Particle) PendingDestroy

func (self *Particle) PendingDestroy() bool

PendingDestroy A Game Object is that is pendingDestroy is flagged to have its destroy method called on the next logic update. You can set it directly to allow you to flag an object to be destroyed on its next update.

This is extremely useful if you wish to destroy an object from within one of its own callbacks such as with Buttons or other Input events.

func (*Particle) PhysicsType

func (self *Particle) PhysicsType() int

PhysicsType The const physics body type of this object.

func (*Particle) Play

func (self *Particle) Play(name string) *Animation

Play Plays an Animation.

The animation should have previously been created via `animations.add`.

If the animation is already playing calling this again won't do anything. If you need to reset an already running animation do so directly on the Animation object itself or via `AnimationManager.stop`.

func (*Particle) Play1O

func (self *Particle) Play1O(name string, frameRate int) *Animation

Play1O Plays an Animation.

The animation should have previously been created via `animations.add`.

If the animation is already playing calling this again won't do anything. If you need to reset an already running animation do so directly on the Animation object itself or via `AnimationManager.stop`.

func (*Particle) Play2O

func (self *Particle) Play2O(name string, frameRate int, loop bool) *Animation

Play2O Plays an Animation.

The animation should have previously been created via `animations.add`.

If the animation is already playing calling this again won't do anything. If you need to reset an already running animation do so directly on the Animation object itself or via `AnimationManager.stop`.

func (*Particle) Play3O

func (self *Particle) Play3O(name string, frameRate int, loop bool, killOnComplete bool) *Animation

Play3O Plays an Animation.

The animation should have previously been created via `animations.add`.

If the animation is already playing calling this again won't do anything. If you need to reset an already running animation do so directly on the Animation object itself or via `AnimationManager.stop`.

func (*Particle) PlayI

func (self *Particle) PlayI(args ...interface{}) *Animation

PlayI Plays an Animation.

The animation should have previously been created via `animations.add`.

If the animation is already playing calling this again won't do anything. If you need to reset an already running animation do so directly on the Animation object itself or via `AnimationManager.stop`.

func (*Particle) PostUpdate

func (self *Particle) PostUpdate()

PostUpdate Internal method called by the World postUpdate cycle.

func (*Particle) PostUpdateI

func (self *Particle) PostUpdateI(args ...interface{})

PostUpdateI Internal method called by the World postUpdate cycle.

func (*Particle) PreUpdate

func (self *Particle) PreUpdate() bool

PreUpdate Automatically called by World.preUpdate.

func (*Particle) PreUpdateI

func (self *Particle) PreUpdateI(args ...interface{}) bool

PreUpdateI Automatically called by World.preUpdate.

func (*Particle) PreviousPosition

func (self *Particle) PreviousPosition() *Point

PreviousPosition The position the Game Object was located in the previous frame.

func (*Particle) PreviousRotation

func (self *Particle) PreviousRotation() int

PreviousRotation The rotation the Game Object was in set to in the previous frame. Value is in radians.

func (*Particle) RemoveChild

func (self *Particle) RemoveChild(child *DisplayObject) *DisplayObject

RemoveChild Removes a child from the container.

func (*Particle) RemoveChildAt

func (self *Particle) RemoveChildAt(index int) *DisplayObject

RemoveChildAt Removes a child from the specified index position.

func (*Particle) RemoveChildAtI

func (self *Particle) RemoveChildAtI(args ...interface{}) *DisplayObject

RemoveChildAtI Removes a child from the specified index position.

func (*Particle) RemoveChildI

func (self *Particle) RemoveChildI(args ...interface{}) *DisplayObject

RemoveChildI Removes a child from the container.

func (*Particle) RemoveChildren

func (self *Particle) RemoveChildren(beginIndex int, endIndex int)

RemoveChildren Removes all children from this container that are within the begin and end indexes.

func (*Particle) RemoveChildrenI

func (self *Particle) RemoveChildrenI(args ...interface{})

RemoveChildrenI Removes all children from this container that are within the begin and end indexes.

func (*Particle) RenderOrderID

func (self *Particle) RenderOrderID() int

RenderOrderID The render order ID is used internally by the renderer and Input Manager and should not be modified. This property is mostly used internally by the renderers, but is exposed for the use of plugins.

func (*Particle) Reset

func (self *Particle) Reset(x int, y int) *Particle

Reset Resets the Particle. This places the Particle at the given x/y world coordinates and then sets alive, exists, visible and renderable all to true. Also resets the outOfBounds state and health values. If the Particle has a physics body that too is reset.

func (*Particle) Reset1O

func (self *Particle) Reset1O(x int, y int, health int) *Particle

Reset1O Resets the Particle. This places the Particle at the given x/y world coordinates and then sets alive, exists, visible and renderable all to true. Also resets the outOfBounds state and health values. If the Particle has a physics body that too is reset.

func (*Particle) ResetFrame

func (self *Particle) ResetFrame()

ResetFrame Resets the texture frame dimensions that the Game Object uses for rendering.

func (*Particle) ResetFrameI

func (self *Particle) ResetFrameI(args ...interface{})

ResetFrameI Resets the texture frame dimensions that the Game Object uses for rendering.

func (*Particle) ResetI

func (self *Particle) ResetI(args ...interface{}) *Particle

ResetI Resets the Particle. This places the Particle at the given x/y world coordinates and then sets alive, exists, visible and renderable all to true. Also resets the outOfBounds state and health values. If the Particle has a physics body that too is reset.

func (*Particle) ResizeFrame

func (self *Particle) ResizeFrame(parent interface{}, width int, height int)

ResizeFrame Resizes the Frame dimensions that the Game Object uses for rendering.

You shouldn't normally need to ever call this, but in the case of special texture types such as Video or BitmapData it can be useful to adjust the dimensions directly in this way.

func (*Particle) ResizeFrameI

func (self *Particle) ResizeFrameI(args ...interface{})

ResizeFrameI Resizes the Frame dimensions that the Game Object uses for rendering.

You shouldn't normally need to ever call this, but in the case of special texture types such as Video or BitmapData it can be useful to adjust the dimensions directly in this way.

func (*Particle) Revive

func (self *Particle) Revive() *DisplayObject

Revive Brings a 'dead' Game Object back to life, optionally resetting its health value in the process.

A resurrected Game Object has its `alive`, `exists` and `visible` properties all set to true.

It will dispatch the `onRevived` event. Listen to `events.onRevived` for the signal.

func (*Particle) Revive1O

func (self *Particle) Revive1O(health int) *DisplayObject

Revive1O Brings a 'dead' Game Object back to life, optionally resetting its health value in the process.

A resurrected Game Object has its `alive`, `exists` and `visible` properties all set to true.

It will dispatch the `onRevived` event. Listen to `events.onRevived` for the signal.

func (*Particle) ReviveI

func (self *Particle) ReviveI(args ...interface{}) *DisplayObject

ReviveI Brings a 'dead' Game Object back to life, optionally resetting its health value in the process.

A resurrected Game Object has its `alive`, `exists` and `visible` properties all set to true.

It will dispatch the `onRevived` event. Listen to `events.onRevived` for the signal.

func (*Particle) Right

func (self *Particle) Right() int

Right The right coordinate of the Game Object. This is the same as `x + width - offsetX`.

func (*Particle) ScaleData

func (self *Particle) ScaleData() []interface{}

ScaleData A reference to the scaleData array owned by the Emitter that emitted this Particle.

func (*Particle) ScaleMax

func (self *Particle) ScaleMax() *Point

ScaleMax The maximum scale this Game Object will scale up to.

It allows you to prevent a parent from scaling this Game Object higher than the given value.

Set it to `null` to remove the limit.

func (*Particle) ScaleMin

func (self *Particle) ScaleMin() *Point

ScaleMin The minimum scale this Game Object will scale down to.

It allows you to prevent a parent from scaling this Game Object lower than the given value.

Set it to `null` to remove the limit.

func (*Particle) SendToBack

func (self *Particle) SendToBack() *DisplayObject

SendToBack Sends this Game Object to the bottom of its parents display list. Visually this means it will render below all other children in the same Group.

If this Game Object hasn't been added to a custom Group then this method will send it to the bottom of the Game World, because the World is the root Group from which all Game Objects descend.

func (*Particle) SendToBackI

func (self *Particle) SendToBackI(args ...interface{}) *DisplayObject

SendToBackI Sends this Game Object to the bottom of its parents display list. Visually this means it will render below all other children in the same Group.

If this Game Object hasn't been added to a custom Group then this method will send it to the bottom of the Game World, because the World is the root Group from which all Game Objects descend.

func (*Particle) SetAliveA

func (self *Particle) SetAliveA(member bool)

SetAliveA A useful flag to control if the Game Object is alive or dead.

This is set automatically by the Health components `damage` method should the object run out of health. Or you can toggle it via your game code.

This property is mostly just provided to be used by your game - it doesn't effect rendering or logic updates. However you can use `Group.getFirstAlive` in conjunction with this property for fast object pooling and recycling.

func (*Particle) SetAlphaData

func (self *Particle) SetAlphaData()

SetAlphaData Called by the Emitter if autoAlpha has been enabled. Passes over the alpha ease data and resets the alpha counter.

func (*Particle) SetAlphaDataA

func (self *Particle) SetAlphaDataA(member []interface{})

SetAlphaDataA A reference to the alphaData array owned by the Emitter that emitted this Particle.

func (*Particle) SetAlphaDataI

func (self *Particle) SetAlphaDataI(args ...interface{})

SetAlphaDataI Called by the Emitter if autoAlpha has been enabled. Passes over the alpha ease data and resets the alpha counter.

func (*Particle) SetAnchorA

func (self *Particle) SetAnchorA(member *Point)

SetAnchorA The anchor sets the origin point of the texture.

The default is 0,0 this means the texture's origin is the top left

Setting than anchor to 0.5,0.5 means the textures origin is centered

Setting the anchor to 1,1 would mean the textures origin points will be the bottom right corner

func (*Particle) SetAngleA

func (self *Particle) SetAngleA(member int)

SetAngleA The angle property is the rotation of the Game Object in *degrees* from its original orientation.

Values from 0 to 180 represent clockwise rotation; values from 0 to -180 represent counterclockwise rotation.

Values outside this range are added to or subtracted from 360 to obtain a value within the range. For example, the statement player.angle = 450 is the same as player.angle = 90.

If you wish to work in radians instead of degrees you can use the property `rotation` instead. Working in radians is slightly faster as it doesn't have to perform any calculations.

func (*Particle) SetAnimationsA

func (self *Particle) SetAnimationsA(member *AnimationManager)

SetAnimationsA If the Game Object is enabled for animation (such as a Phaser.Sprite) this is a reference to its AnimationManager instance. Through it you can create, play, pause and stop animations.

func (*Particle) SetAutoAlphaA

func (self *Particle) SetAutoAlphaA(member bool)

SetAutoAlphaA If this Particle automatically changes alpha this is set to true by Particle.setAlphaData.

func (*Particle) SetAutoCullA

func (self *Particle) SetAutoCullA(member bool)

SetAutoCullA A Game Object with `autoCull` set to true will check its bounds against the World Camera every frame. If it is not intersecting the Camera bounds at any point then it has its `renderable` property set to `false`. This keeps the Game Object alive and still processing updates, but forces it to skip the render step entirely.

This is a relatively expensive operation, especially if enabled on hundreds of Game Objects. So enable it only if you know it's required, or you have tested performance and find it acceptable.

func (*Particle) SetAutoScaleA

func (self *Particle) SetAutoScaleA(member bool)

SetAutoScaleA If this Particle automatically scales this is set to true by Particle.setScaleData.

func (*Particle) SetBlendModeA

func (self *Particle) SetBlendModeA(member int)

SetBlendModeA The blend mode to be applied to the sprite. Set to PIXI.blendModes.NORMAL to remove any blend mode.

Warning: You cannot have a blend mode and a filter active on the same Sprite. Doing so will render the sprite invisible.

func (*Particle) SetBodyA

func (self *Particle) SetBodyA(member interface{})

SetBodyA `body` is the Game Objects physics body. Once a Game Object is enabled for physics you access all associated properties and methods via it.

By default Game Objects won't add themselves to any physics system and their `body` property will be `null`.

To enable this Game Object for physics you need to call `game.physics.enable(object, system)` where `object` is this object and `system` is the Physics system you are using. If none is given it defaults to `Phaser.Physics.Arcade`.

You can alternatively call `game.physics.arcade.enable(object)`, or add this Game Object to a physics enabled Group.

Important: Enabling a Game Object for P2 or Ninja physics will automatically set its `anchor` property to 0.5, so the physics body is centered on the Game Object.

If you need a different result then adjust or re-create the Body shape offsets manually or reset the anchor after enabling physics.

func (*Particle) SetBottomA

func (self *Particle) SetBottomA(member int)

SetBottomA The sum of the y and height properties. This is the same as `y + height - offsetY`.

func (*Particle) SetCameraOffsetA

func (self *Particle) SetCameraOffsetA(member *Point)

SetCameraOffsetA The x/y coordinate offset applied to the top-left of the camera that this Game Object will be drawn at if `fixedToCamera` is true.

The values are relative to the top-left of the camera view and in addition to any parent of the Game Object on the display list.

func (*Particle) SetCenterXA

func (self *Particle) SetCenterXA(member int)

SetCenterXA The center x coordinate of the Game Object. This is the same as `(x - offsetX) + (width / 2)`.

func (*Particle) SetCenterYA

func (self *Particle) SetCenterYA(member int)

SetCenterYA The center y coordinate of the Game Object. This is the same as `(y - offsetY) + (height / 2)`.

func (*Particle) SetCheckWorldBoundsA

func (self *Particle) SetCheckWorldBoundsA(member bool)

SetCheckWorldBoundsA If this is set to `true` the Game Object checks if it is within the World bounds each frame.

When it is no longer intersecting the world bounds it dispatches the `onOutOfBounds` event.

If it was *previously* out of bounds but is now intersecting the world bounds again it dispatches the `onEnterBounds` event.

It also optionally kills the Game Object if `outOfBoundsKill` is `true`.

When `checkWorldBounds` is enabled it forces the Game Object to calculate its full bounds every frame.

This is a relatively expensive operation, especially if enabled on hundreds of Game Objects. So enable it only if you know it's required, or you have tested performance and find it acceptable.

func (*Particle) SetChildIndex

func (self *Particle) SetChildIndex(child *DisplayObject, index int)

SetChildIndex Changes the position of an existing child in the display object container

func (*Particle) SetChildIndexI

func (self *Particle) SetChildIndexI(args ...interface{})

SetChildIndexI Changes the position of an existing child in the display object container

func (*Particle) SetChildrenA

func (self *Particle) SetChildrenA(member []DisplayObject)

SetChildrenA [read-only] The array of children of this container.

func (*Particle) SetComponentsA

func (self *Particle) SetComponentsA(member interface{})

SetComponentsA The components this Game Object has installed.

func (*Particle) SetCropRectA

func (self *Particle) SetCropRectA(member *Rectangle)

SetCropRectA The Rectangle used to crop the texture this Game Object uses. Set this property via `crop`. If you modify this property directly you must call `updateCrop` in order to have the change take effect.

func (*Particle) SetDamageA

func (self *Particle) SetDamageA(member interface{})

SetDamageA Damages the Game Object. This removes the given amount of health from the `health` property.

If health is taken below or is equal to zero then the `kill` method is called.

func (*Particle) SetDataA

func (self *Particle) SetDataA(member interface{})

SetDataA An empty Object that belongs to this Game Object. This value isn't ever used internally by Phaser, but may be used by your own code, or by Phaser Plugins, to store data that needs to be associated with the Game Object, without polluting the Game Object directly.

func (*Particle) SetDebugA

func (self *Particle) SetDebugA(member bool)

SetDebugA A debug flag designed for use with `Game.enableStep`.

func (*Particle) SetDeltaXA

func (self *Particle) SetDeltaXA(member int)

SetDeltaXA Returns the delta x value. The difference between world.x now and in the previous frame.

The value will be positive if the Game Object has moved to the right or negative if to the left.

func (*Particle) SetDeltaYA

func (self *Particle) SetDeltaYA(member int)

SetDeltaYA Returns the delta y value. The difference between world.y now and in the previous frame.

The value will be positive if the Game Object has moved down or negative if up.

func (*Particle) SetDeltaZA

func (self *Particle) SetDeltaZA(member int)

SetDeltaZA Returns the delta z value. The difference between rotation now and in the previous frame. The delta value.

func (*Particle) SetDestroyPhaseA

func (self *Particle) SetDestroyPhaseA(member bool)

SetDestroyPhaseA As a Game Object runs through its destroy method this flag is set to true, and can be checked in any sub-systems or plugins it is being destroyed from.

func (*Particle) SetEventsA

func (self *Particle) SetEventsA(member *Events)

SetEventsA All Phaser Game Objects have an Events class which contains all of the events that are dispatched when certain things happen to this Game Object, or any of its components.

func (*Particle) SetExistsA

func (self *Particle) SetExistsA(member bool)

SetExistsA Controls if this Sprite is processed by the core Phaser game loops and Group loops.

func (*Particle) SetFixedToCameraA

func (self *Particle) SetFixedToCameraA(member bool)

SetFixedToCameraA A Game Object that is "fixed" to the camera uses its x/y coordinates as offsets from the top left of the camera during rendering.

The values are adjusted at the rendering stage, overriding the Game Objects actual world position.

The end result is that the Game Object will appear to be 'fixed' to the camera, regardless of where in the game world the camera is viewing. This is useful if for example this Game Object is a UI item that you wish to be visible at all times regardless where in the world the camera is.

The offsets are stored in the `cameraOffset` property.

Note that the `cameraOffset` values are in addition to any parent of this Game Object on the display list.

Be careful not to set `fixedToCamera` on Game Objects which are in Groups that already have `fixedToCamera` enabled on them.

func (*Particle) SetFrame

func (self *Particle) SetFrame(frame *Frame)

SetFrame Sets the texture frame the Game Object uses for rendering.

This is primarily an internal method used by `loadTexture`, but is exposed for the use of plugins and custom classes.

func (*Particle) SetFrameA

func (self *Particle) SetFrameA(member int)

SetFrameA Gets or sets the current frame index of the texture being used to render this Game Object.

To change the frame set `frame` to the index of the new frame in the sprite sheet you wish this Game Object to use, for example: `player.frame = 4`.

If the frame index given doesn't exist it will revert to the first frame found in the texture.

If you are using a texture atlas then you should use the `frameName` property instead.

If you wish to fully replace the texture being used see `loadTexture`.

func (*Particle) SetFrameI

func (self *Particle) SetFrameI(args ...interface{})

SetFrameI Sets the texture frame the Game Object uses for rendering.

This is primarily an internal method used by `loadTexture`, but is exposed for the use of plugins and custom classes.

func (*Particle) SetFrameNameA

func (self *Particle) SetFrameNameA(member string)

SetFrameNameA Gets or sets the current frame name of the texture being used to render this Game Object.

To change the frame set `frameName` to the name of the new frame in the texture atlas you wish this Game Object to use, for example: `player.frameName = "idle"`.

If the frame name given doesn't exist it will revert to the first frame found in the texture and throw a console warning.

If you are using a sprite sheet then you should use the `frame` property instead.

If you wish to fully replace the texture being used see `loadTexture`.

func (*Particle) SetFreshA

func (self *Particle) SetFreshA(member bool)

SetFreshA A Game Object is considered `fresh` if it has just been created or reset and is yet to receive a renderer transform update. This property is mostly used internally by the physics systems, but is exposed for the use of plugins.

func (*Particle) SetGameA

func (self *Particle) SetGameA(member *Game)

SetGameA A reference to the currently running Game.

func (*Particle) SetHealA

func (self *Particle) SetHealA(member interface{})

SetHealA Heal the Game Object. This adds the given amount of health to the `health` property.

func (*Particle) SetHealth

func (self *Particle) SetHealth() interface{}

SetHealth Sets the health property of the Game Object to the given amount. Will never exceed the `maxHealth` value.

func (*Particle) SetHealthA

func (self *Particle) SetHealthA(member int)

SetHealthA The Game Objects health value. This is a handy property for setting and manipulating health on a Game Object.

It can be used in combination with the `damage` method or modified directly.

func (*Particle) SetHeightA

func (self *Particle) SetHeightA(member int)

SetHeightA The height of the sprite, setting this will actually modify the scale to achieve the value set

func (*Particle) SetIgnoreChildInputA

func (self *Particle) SetIgnoreChildInputA(member bool)

SetIgnoreChildInputA If `ignoreChildInput` is `false` it will allow this objects _children_ to be considered as valid for Input events.

If this property is `true` then the children will _not_ be considered as valid for Input events.

Note that this property isn't recursive: only immediate children are influenced, it doesn't scan further down.

func (*Particle) SetInCameraA

func (self *Particle) SetInCameraA(member bool)

SetInCameraA Checks if the Game Objects bounds intersect with the Game Camera bounds. Returns `true` if they do, otherwise `false` if fully outside of the Cameras bounds.

func (*Particle) SetInWorldA

func (self *Particle) SetInWorldA(member bool)

SetInWorldA Checks if the Game Objects bounds are within, or intersect at any point with the Game World bounds.

func (*Particle) SetInputA

func (self *Particle) SetInputA(member interface{})

SetInputA The Input Handler for this Game Object.

By default it is disabled. If you wish this Game Object to process input events you should enable it with: `inputEnabled = true`.

After you have done this, this property will be a reference to the Phaser InputHandler.

func (*Particle) SetInputEnabledA

func (self *Particle) SetInputEnabledA(member bool)

SetInputEnabledA By default a Game Object won't process any input events. By setting `inputEnabled` to true a Phaser.InputHandler is created for this Game Object and it will then start to process click / touch events and more.

You can then access the Input Handler via `this.input`.

Note that Input related events are dispatched from `this.events`, i.e.: `events.onInputDown`.

If you set this property to false it will stop the Input Handler from processing any more input events.

If you want to _temporarily_ disable input for a Game Object, then it's better to set `input.enabled = false`, as it won't reset any of the Input Handlers internal properties. You can then toggle this back on as needed.

func (*Particle) SetKeyA

func (self *Particle) SetKeyA(member interface{})

SetKeyA The key of the image or texture used by this Game Object during rendering. If it is a string it's the string used to retrieve the texture from the Phaser Image Cache. It can also be an instance of a RenderTexture, BitmapData, Video or PIXI.Texture. If a Game Object is created without a key it is automatically assigned the key `__default` which is a 32x32 transparent PNG stored within the Cache. If a Game Object is given a key which doesn't exist in the Image Cache it is re-assigned the key `__missing` which is a 32x32 PNG of a green box with a line through it.

func (*Particle) SetLeftA

func (self *Particle) SetLeftA(member int)

SetLeftA The left coordinate of the Game Object. This is the same as `x - offsetX`.

func (*Particle) SetLifespanA

func (self *Particle) SetLifespanA(member int)

SetLifespanA The lifespan allows you to give a Game Object a lifespan in milliseconds.

Once the Game Object is 'born' you can set this to a positive value.

It is automatically decremented by the millisecond equivalent of `game.time.physicsElapsed` each frame. When it reaches zero it will call the `kill` method.

Very handy for particles, bullets, collectibles, or any other short-lived entity.

func (*Particle) SetMaxHealthA

func (self *Particle) SetMaxHealthA(member int)

SetMaxHealthA The Game Objects maximum health value. This works in combination with the `heal` method to ensure the health value never exceeds the maximum.

func (*Particle) SetNameA

func (self *Particle) SetNameA(member string)

SetNameA A user defined name given to this Game Object. This value isn't ever used internally by Phaser, it is meant as a game level property.

func (*Particle) SetOffsetXA

func (self *Particle) SetOffsetXA(member int)

SetOffsetXA The amount the Game Object is visually offset from its x coordinate. This is the same as `width * anchor.x`. It will only be > 0 if anchor.x is not equal to zero.

func (*Particle) SetOffsetYA

func (self *Particle) SetOffsetYA(member int)

SetOffsetYA The amount the Game Object is visually offset from its y coordinate. This is the same as `height * anchor.y`. It will only be > 0 if anchor.y is not equal to zero.

func (*Particle) SetOutOfBoundsKillA

func (self *Particle) SetOutOfBoundsKillA(member bool)

SetOutOfBoundsKillA If this and the `checkWorldBounds` property are both set to `true` then the `kill` method is called as soon as `inWorld` returns false.

func (*Particle) SetOutOfCameraBoundsKillA

func (self *Particle) SetOutOfCameraBoundsKillA(member bool)

SetOutOfCameraBoundsKillA If this and the `autoCull` property are both set to `true`, then the `kill` method is called as soon as the Game Object leaves the camera bounds.

func (*Particle) SetPendingDestroyA

func (self *Particle) SetPendingDestroyA(member bool)

SetPendingDestroyA A Game Object is that is pendingDestroy is flagged to have its destroy method called on the next logic update. You can set it directly to allow you to flag an object to be destroyed on its next update.

This is extremely useful if you wish to destroy an object from within one of its own callbacks such as with Buttons or other Input events.

func (*Particle) SetPhysicsTypeA

func (self *Particle) SetPhysicsTypeA(member int)

SetPhysicsTypeA The const physics body type of this object.

func (*Particle) SetPreviousPositionA

func (self *Particle) SetPreviousPositionA(member *Point)

SetPreviousPositionA The position the Game Object was located in the previous frame.

func (*Particle) SetPreviousRotationA

func (self *Particle) SetPreviousRotationA(member int)

SetPreviousRotationA The rotation the Game Object was in set to in the previous frame. Value is in radians.

func (*Particle) SetRenderOrderIDA

func (self *Particle) SetRenderOrderIDA(member int)

SetRenderOrderIDA The render order ID is used internally by the renderer and Input Manager and should not be modified. This property is mostly used internally by the renderers, but is exposed for the use of plugins.

func (*Particle) SetRightA

func (self *Particle) SetRightA(member int)

SetRightA The right coordinate of the Game Object. This is the same as `x + width - offsetX`.

func (*Particle) SetScaleData

func (self *Particle) SetScaleData()

SetScaleData Called by the Emitter if autoScale has been enabled. Passes over the scale ease data and resets the scale counter.

func (*Particle) SetScaleDataA

func (self *Particle) SetScaleDataA(member []interface{})

SetScaleDataA A reference to the scaleData array owned by the Emitter that emitted this Particle.

func (*Particle) SetScaleDataI

func (self *Particle) SetScaleDataI(args ...interface{})

SetScaleDataI Called by the Emitter if autoScale has been enabled. Passes over the scale ease data and resets the scale counter.

func (*Particle) SetScaleMaxA

func (self *Particle) SetScaleMaxA(member *Point)

SetScaleMaxA The maximum scale this Game Object will scale up to.

It allows you to prevent a parent from scaling this Game Object higher than the given value.

Set it to `null` to remove the limit.

func (*Particle) SetScaleMinA

func (self *Particle) SetScaleMinA(member *Point)

SetScaleMinA The minimum scale this Game Object will scale down to.

It allows you to prevent a parent from scaling this Game Object lower than the given value.

Set it to `null` to remove the limit.

func (*Particle) SetScaleMinMax

func (self *Particle) SetScaleMinMax(minX interface{}, minY interface{}, maxX interface{}, maxY interface{})

SetScaleMinMax Sets the scaleMin and scaleMax values. These values are used to limit how far this Game Object will scale based on its parent.

For example if this Game Object has a `minScale` value of 1 and its parent has a `scale` value of 0.5, the 0.5 will be ignored and the scale value of 1 will be used, as the parents scale is lower than the minimum scale this Game Object should adhere to.

By setting these values you can carefully control how Game Objects deal with responsive scaling.

If only one parameter is given then that value will be used for both scaleMin and scaleMax: `setScaleMinMax(1)` = scaleMin.x, scaleMin.y, scaleMax.x and scaleMax.y all = 1

If only two parameters are given the first is set as scaleMin.x and y and the second as scaleMax.x and y: `setScaleMinMax(0.5, 2)` = scaleMin.x and y = 0.5 and scaleMax.x and y = 2

If you wish to set `scaleMin` with different values for x and y then either modify Game Object.scaleMin directly, or pass `null` for the `maxX` and `maxY` parameters.

Call `setScaleMinMax(null)` to clear all previously set values.

func (*Particle) SetScaleMinMaxI

func (self *Particle) SetScaleMinMaxI(args ...interface{})

SetScaleMinMaxI Sets the scaleMin and scaleMax values. These values are used to limit how far this Game Object will scale based on its parent.

For example if this Game Object has a `minScale` value of 1 and its parent has a `scale` value of 0.5, the 0.5 will be ignored and the scale value of 1 will be used, as the parents scale is lower than the minimum scale this Game Object should adhere to.

By setting these values you can carefully control how Game Objects deal with responsive scaling.

If only one parameter is given then that value will be used for both scaleMin and scaleMax: `setScaleMinMax(1)` = scaleMin.x, scaleMin.y, scaleMax.x and scaleMax.y all = 1

If only two parameters are given the first is set as scaleMin.x and y and the second as scaleMax.x and y: `setScaleMinMax(0.5, 2)` = scaleMin.x and y = 0.5 and scaleMax.x and y = 2

If you wish to set `scaleMin` with different values for x and y then either modify Game Object.scaleMin directly, or pass `null` for the `maxX` and `maxY` parameters.

Call `setScaleMinMax(null)` to clear all previously set values.

func (*Particle) SetSetHealthA

func (self *Particle) SetSetHealthA(member interface{})

SetSetHealthA Sets the health property of the Game Object to the given amount. Will never exceed the `maxHealth` value.

func (*Particle) SetShaderA

func (self *Particle) SetShaderA(member *AbstractFilter)

SetShaderA The shader that will be used to render this Sprite.

Set to null to remove a current shader.

func (*Particle) SetSmoothedA

func (self *Particle) SetSmoothedA(member bool)

SetSmoothedA Enable or disable texture smoothing for this Game Object.

It only takes effect if the Game Object is using an image based texture.

Smoothing is enabled by default.

func (*Particle) SetTexture

func (self *Particle) SetTexture(texture *Texture)

SetTexture Sets the texture of the sprite. Be warned that this doesn't remove or destroy the previous

texture this Sprite was using.

func (*Particle) SetTexture1O

func (self *Particle) SetTexture1O(texture *Texture, destroy bool)

SetTexture1O Sets the texture of the sprite. Be warned that this doesn't remove or destroy the previous

texture this Sprite was using.

func (*Particle) SetTextureA

func (self *Particle) SetTextureA(member *Texture)

SetTextureA The texture that the sprite is using

func (*Particle) SetTextureI

func (self *Particle) SetTextureI(args ...interface{})

SetTextureI Sets the texture of the sprite. Be warned that this doesn't remove or destroy the previous

texture this Sprite was using.

func (*Particle) SetTintA

func (self *Particle) SetTintA(member int)

SetTintA The tint applied to the sprite. This is a hex value. A value of 0xFFFFFF will remove any tint effect.

func (*Particle) SetTintedTextureA

func (self *Particle) SetTintedTextureA(member *Canvas)

SetTintedTextureA A canvas that contains the tinted version of the Sprite (in Canvas mode, WebGL doesn't populate this)

func (*Particle) SetTopA

func (self *Particle) SetTopA(member int)

SetTopA The y coordinate of the Game Object. This is the same as `y - offsetY`.

func (*Particle) SetTransformCallbackA

func (self *Particle) SetTransformCallbackA(member interface{})

SetTransformCallbackA The callback that will apply any scale limiting to the worldTransform.

func (*Particle) SetTransformCallbackContextA

func (self *Particle) SetTransformCallbackContextA(member interface{})

SetTransformCallbackContextA The context under which `transformCallback` is called.

func (*Particle) SetTypeA

func (self *Particle) SetTypeA(member int)

SetTypeA The const type of this object.

func (*Particle) SetWidthA

func (self *Particle) SetWidthA(member int)

SetWidthA The width of the sprite, setting this will actually modify the scale to achieve the value set

func (*Particle) SetWorldA

func (self *Particle) SetWorldA(member *Point)

SetWorldA The world coordinates of this Game Object in pixels. Depending on where in the display list this Game Object is placed this value can differ from `position`, which contains the x/y coordinates relative to the Game Objects parent.

func (*Particle) SetXA

func (self *Particle) SetXA(member int)

SetXA The position of the Game Object on the x axis relative to the local coordinates of the parent.

func (*Particle) SetYA

func (self *Particle) SetYA(member int)

SetYA The position of the Game Object on the y axis relative to the local coordinates of the parent.

func (*Particle) SetZA

func (self *Particle) SetZA(member int)

SetZA The z depth of this Game Object within its parent Group. No two objects in a Group can have the same z value. This value is adjusted automatically whenever the Group hierarchy changes. If you wish to re-order the layering of a Game Object then see methods like Group.moveUp or Group.bringToTop.

func (*Particle) Shader

func (self *Particle) Shader() *AbstractFilter

Shader The shader that will be used to render this Sprite.

Set to null to remove a current shader.

func (*Particle) Smoothed

func (self *Particle) Smoothed() bool

Smoothed Enable or disable texture smoothing for this Game Object.

It only takes effect if the Game Object is using an image based texture.

Smoothing is enabled by default.

func (*Particle) SwapChildren

func (self *Particle) SwapChildren(child *DisplayObject, child2 *DisplayObject)

SwapChildren Swaps the position of 2 Display Objects within this container.

func (*Particle) SwapChildrenI

func (self *Particle) SwapChildrenI(args ...interface{})

SwapChildrenI Swaps the position of 2 Display Objects within this container.

func (*Particle) Texture

func (self *Particle) Texture() *Texture

Texture The texture that the sprite is using

func (*Particle) Tint

func (self *Particle) Tint() int

Tint The tint applied to the sprite. This is a hex value. A value of 0xFFFFFF will remove any tint effect.

func (*Particle) TintedTexture

func (self *Particle) TintedTexture() *Canvas

TintedTexture A canvas that contains the tinted version of the Sprite (in Canvas mode, WebGL doesn't populate this)

func (*Particle) Top

func (self *Particle) Top() int

Top The y coordinate of the Game Object. This is the same as `y - offsetY`.

func (*Particle) TransformCallback

func (self *Particle) TransformCallback() interface{}

TransformCallback The callback that will apply any scale limiting to the worldTransform.

func (*Particle) TransformCallbackContext

func (self *Particle) TransformCallbackContext() interface{}

TransformCallbackContext The context under which `transformCallback` is called.

func (*Particle) Type

func (self *Particle) Type() int

Type The const type of this object.

func (*Particle) Update

func (self *Particle) Update()

Update Updates the Particle scale or alpha if autoScale and autoAlpha are set.

func (*Particle) UpdateCrop

func (self *Particle) UpdateCrop()

UpdateCrop If you have set a crop rectangle on this Game Object via `crop` and since modified the `cropRect` property, or the rectangle it references, then you need to update the crop frame by calling this method.

func (*Particle) UpdateCropI

func (self *Particle) UpdateCropI(args ...interface{})

UpdateCropI If you have set a crop rectangle on this Game Object via `crop` and since modified the `cropRect` property, or the rectangle it references, then you need to update the crop frame by calling this method.

func (*Particle) UpdateI

func (self *Particle) UpdateI(args ...interface{})

UpdateI Updates the Particle scale or alpha if autoScale and autoAlpha are set.

func (*Particle) Width

func (self *Particle) Width() int

Width The width of the sprite, setting this will actually modify the scale to achieve the value set

func (*Particle) World

func (self *Particle) World() *Point

World The world coordinates of this Game Object in pixels. Depending on where in the display list this Game Object is placed this value can differ from `position`, which contains the x/y coordinates relative to the Game Objects parent.

func (*Particle) X

func (self *Particle) X() int

X The position of the Game Object on the x axis relative to the local coordinates of the parent.

func (*Particle) Y

func (self *Particle) Y() int

Y The position of the Game Object on the y axis relative to the local coordinates of the parent.

func (*Particle) Z

func (self *Particle) Z() int

Z The z depth of this Game Object within its parent Group. No two objects in a Group can have the same z value. This value is adjusted automatically whenever the Group hierarchy changes. If you wish to re-order the layering of a Game Object then see methods like Group.moveUp or Group.bringToTop.

type Particles

type Particles struct {
	*js.Object
}

Particles Phaser.Particles is the Particle Manager for the game. It is called during the game update loop and in turn updates any Emitters attached to it.

func NewParticles

func NewParticles(game *Game) *Particles

NewParticles Phaser.Particles is the Particle Manager for the game. It is called during the game update loop and in turn updates any Emitters attached to it.

func NewParticlesI

func NewParticlesI(args ...interface{}) *Particles

NewParticlesI Phaser.Particles is the Particle Manager for the game. It is called during the game update loop and in turn updates any Emitters attached to it.

func ToParticles

func ToParticles(jsStruct interface{}) *Particles

Particles Binding conversion method to Particles point

func (*Particles) Add

func (self *Particles) Add(emitter *Emitter) *Emitter

Add Adds a new Particle Emitter to the Particle Manager.

func (*Particles) AddI

func (self *Particles) AddI(args ...interface{}) *Emitter

AddI Adds a new Particle Emitter to the Particle Manager.

func (*Particles) Emitters

func (self *Particles) Emitters() interface{}

Emitters Internal emitters store.

func (*Particles) Game

func (self *Particles) Game() *Game

Game A reference to the currently running Game.

func (*Particles) ID

func (self *Particles) ID() int

ID -

func (*Particles) Remove

func (self *Particles) Remove(emitter *Emitter)

Remove Removes an existing Particle Emitter from the Particle Manager.

func (*Particles) RemoveI

func (self *Particles) RemoveI(args ...interface{})

RemoveI Removes an existing Particle Emitter from the Particle Manager.

func (*Particles) SetEmittersA

func (self *Particles) SetEmittersA(member interface{})

SetEmittersA Internal emitters store.

func (*Particles) SetGameA

func (self *Particles) SetGameA(member *Game)

SetGameA A reference to the currently running Game.

func (*Particles) SetIDA

func (self *Particles) SetIDA(member int)

SetIDA -

func (*Particles) Update

func (self *Particles) Update()

Update Called by the core game loop. Updates all Emitters who have their exists value set to true.

func (*Particles) UpdateI

func (self *Particles) UpdateI(args ...interface{})

UpdateI Called by the core game loop. Updates all Emitters who have their exists value set to true.

type ParticlesArcade

type ParticlesArcade struct {
	*js.Object
}

ParticlesArcade Arcade Particles is a Particle System integrated with Arcade Physics.

func NewParticlesArcade

func NewParticlesArcade() *ParticlesArcade

NewParticlesArcade Arcade Particles is a Particle System integrated with Arcade Physics.

func NewParticlesArcadeI

func NewParticlesArcadeI(args ...interface{}) *ParticlesArcade

NewParticlesArcadeI Arcade Particles is a Particle System integrated with Arcade Physics.

func ToParticlesArcade

func ToParticlesArcade(jsStruct interface{}) *ParticlesArcade

ParticlesArcade Binding conversion method to ParticlesArcade point

type ParticlesArcadeEmitter

type ParticlesArcadeEmitter struct {
	*js.Object
}

ParticlesArcadeEmitter Emitter is a lightweight particle emitter that uses Arcade Physics. It can be used for one-time explosions or for continuous effects like rain and fire. All it really does is launch Particle objects out at set intervals, and fixes their positions and velocities accordingly.

func NewParticlesArcadeEmitter

func NewParticlesArcadeEmitter(game *Game) *ParticlesArcadeEmitter

NewParticlesArcadeEmitter Emitter is a lightweight particle emitter that uses Arcade Physics. It can be used for one-time explosions or for continuous effects like rain and fire. All it really does is launch Particle objects out at set intervals, and fixes their positions and velocities accordingly.

func NewParticlesArcadeEmitter1O

func NewParticlesArcadeEmitter1O(game *Game, x int) *ParticlesArcadeEmitter

NewParticlesArcadeEmitter1O Emitter is a lightweight particle emitter that uses Arcade Physics. It can be used for one-time explosions or for continuous effects like rain and fire. All it really does is launch Particle objects out at set intervals, and fixes their positions and velocities accordingly.

func NewParticlesArcadeEmitter2O

func NewParticlesArcadeEmitter2O(game *Game, x int, y int) *ParticlesArcadeEmitter

NewParticlesArcadeEmitter2O Emitter is a lightweight particle emitter that uses Arcade Physics. It can be used for one-time explosions or for continuous effects like rain and fire. All it really does is launch Particle objects out at set intervals, and fixes their positions and velocities accordingly.

func NewParticlesArcadeEmitter3O

func NewParticlesArcadeEmitter3O(game *Game, x int, y int, maxParticles int) *ParticlesArcadeEmitter

NewParticlesArcadeEmitter3O Emitter is a lightweight particle emitter that uses Arcade Physics. It can be used for one-time explosions or for continuous effects like rain and fire. All it really does is launch Particle objects out at set intervals, and fixes their positions and velocities accordingly.

func NewParticlesArcadeEmitterI

func NewParticlesArcadeEmitterI(args ...interface{}) *ParticlesArcadeEmitter

NewParticlesArcadeEmitterI Emitter is a lightweight particle emitter that uses Arcade Physics. It can be used for one-time explosions or for continuous effects like rain and fire. All it really does is launch Particle objects out at set intervals, and fixes their positions and velocities accordingly.

func ToParticlesArcadeEmitter

func ToParticlesArcadeEmitter(jsStruct interface{}) *ParticlesArcadeEmitter

ParticlesArcadeEmitter Binding conversion method to ParticlesArcadeEmitter point

func (*ParticlesArcadeEmitter) Add

Add Adds an existing object as the top child in this group.

The child is automatically added to the top of the group, and is displayed above every previous child.

Or if the _optional_ index is specified, the child is added at the location specified by the index value, this allows you to control child ordering.

If the child was already in this Group, it is simply returned, and nothing else happens to it.

If `Group.enableBody` is set, then a physics body will be created on the object, so long as one does not already exist.

If `Group.inputEnableChildren` is set, then an Input Handler will be created on the object, so long as one does not already exist.

Use {@link Phaser.Group#addAt addAt} to control where a child is added. Use {@link Phaser.Group#create create} to create and add a new child.

func (*ParticlesArcadeEmitter) Add1O

func (self *ParticlesArcadeEmitter) Add1O(child *DisplayObject, silent bool) *DisplayObject

Add1O Adds an existing object as the top child in this group.

The child is automatically added to the top of the group, and is displayed above every previous child.

Or if the _optional_ index is specified, the child is added at the location specified by the index value, this allows you to control child ordering.

If the child was already in this Group, it is simply returned, and nothing else happens to it.

If `Group.enableBody` is set, then a physics body will be created on the object, so long as one does not already exist.

If `Group.inputEnableChildren` is set, then an Input Handler will be created on the object, so long as one does not already exist.

Use {@link Phaser.Group#addAt addAt} to control where a child is added. Use {@link Phaser.Group#create create} to create and add a new child.

func (*ParticlesArcadeEmitter) Add2O

func (self *ParticlesArcadeEmitter) Add2O(child *DisplayObject, silent bool, index int) *DisplayObject

Add2O Adds an existing object as the top child in this group.

The child is automatically added to the top of the group, and is displayed above every previous child.

Or if the _optional_ index is specified, the child is added at the location specified by the index value, this allows you to control child ordering.

If the child was already in this Group, it is simply returned, and nothing else happens to it.

If `Group.enableBody` is set, then a physics body will be created on the object, so long as one does not already exist.

If `Group.inputEnableChildren` is set, then an Input Handler will be created on the object, so long as one does not already exist.

Use {@link Phaser.Group#addAt addAt} to control where a child is added. Use {@link Phaser.Group#create create} to create and add a new child.

func (*ParticlesArcadeEmitter) AddAll

func (self *ParticlesArcadeEmitter) AddAll(property string, amount int, checkAlive bool, checkVisible bool)

AddAll Adds the amount to the given property on all children in this group.

`Group.addAll('x', 10)` will add 10 to the child.x value for each child.

func (*ParticlesArcadeEmitter) AddAllI

func (self *ParticlesArcadeEmitter) AddAllI(args ...interface{})

AddAllI Adds the amount to the given property on all children in this group.

`Group.addAll('x', 10)` will add 10 to the child.x value for each child.

func (*ParticlesArcadeEmitter) AddAt

func (self *ParticlesArcadeEmitter) AddAt(child *DisplayObject) *DisplayObject

AddAt Adds an existing object to this group.

The child is added to the group at the location specified by the index value, this allows you to control child ordering.

If `Group.enableBody` is set, then a physics body will be created on the object, so long as one does not already exist.

If `Group.inputEnableChildren` is set, then an Input Handler will be created on the object, so long as one does not already exist.

func (*ParticlesArcadeEmitter) AddAt1O

func (self *ParticlesArcadeEmitter) AddAt1O(child *DisplayObject, index int) *DisplayObject

AddAt1O Adds an existing object to this group.

The child is added to the group at the location specified by the index value, this allows you to control child ordering.

If `Group.enableBody` is set, then a physics body will be created on the object, so long as one does not already exist.

If `Group.inputEnableChildren` is set, then an Input Handler will be created on the object, so long as one does not already exist.

func (*ParticlesArcadeEmitter) AddAt2O

func (self *ParticlesArcadeEmitter) AddAt2O(child *DisplayObject, index int, silent bool) *DisplayObject

AddAt2O Adds an existing object to this group.

The child is added to the group at the location specified by the index value, this allows you to control child ordering.

If `Group.enableBody` is set, then a physics body will be created on the object, so long as one does not already exist.

If `Group.inputEnableChildren` is set, then an Input Handler will be created on the object, so long as one does not already exist.

func (*ParticlesArcadeEmitter) AddAtI

func (self *ParticlesArcadeEmitter) AddAtI(args ...interface{}) *DisplayObject

AddAtI Adds an existing object to this group.

The child is added to the group at the location specified by the index value, this allows you to control child ordering.

If `Group.enableBody` is set, then a physics body will be created on the object, so long as one does not already exist.

If `Group.inputEnableChildren` is set, then an Input Handler will be created on the object, so long as one does not already exist.

func (*ParticlesArcadeEmitter) AddChild

func (self *ParticlesArcadeEmitter) AddChild(child *DisplayObject) *DisplayObject

AddChild Adds a child to the container.

func (*ParticlesArcadeEmitter) AddChildAt

func (self *ParticlesArcadeEmitter) AddChildAt(child *DisplayObject, index int) *DisplayObject

AddChildAt Adds a child to the container at a specified index. If the index is out of bounds an error will be thrown

func (*ParticlesArcadeEmitter) AddChildAtI

func (self *ParticlesArcadeEmitter) AddChildAtI(args ...interface{}) *DisplayObject

AddChildAtI Adds a child to the container at a specified index. If the index is out of bounds an error will be thrown

func (*ParticlesArcadeEmitter) AddChildI

func (self *ParticlesArcadeEmitter) AddChildI(args ...interface{}) *DisplayObject

AddChildI Adds a child to the container.

func (*ParticlesArcadeEmitter) AddI

func (self *ParticlesArcadeEmitter) AddI(args ...interface{}) *DisplayObject

AddI Adds an existing object as the top child in this group.

The child is automatically added to the top of the group, and is displayed above every previous child.

Or if the _optional_ index is specified, the child is added at the location specified by the index value, this allows you to control child ordering.

If the child was already in this Group, it is simply returned, and nothing else happens to it.

If `Group.enableBody` is set, then a physics body will be created on the object, so long as one does not already exist.

If `Group.inputEnableChildren` is set, then an Input Handler will be created on the object, so long as one does not already exist.

Use {@link Phaser.Group#addAt addAt} to control where a child is added. Use {@link Phaser.Group#create create} to create and add a new child.

func (*ParticlesArcadeEmitter) AddMultiple

func (self *ParticlesArcadeEmitter) AddMultiple(children interface{}) interface{}

AddMultiple Adds an array of existing Display Objects to this Group.

The Display Objects are automatically added to the top of this Group, and will render on-top of everything already in this Group.

As well as an array you can also pass another Group as the first argument. In this case all of the children from that Group will be removed from it and added into this Group.

If `Group.enableBody` is set, then a physics body will be created on the objects, so long as one does not already exist.

If `Group.inputEnableChildren` is set, then an Input Handler will be created on the objects, so long as one does not already exist.

func (*ParticlesArcadeEmitter) AddMultiple1O

func (self *ParticlesArcadeEmitter) AddMultiple1O(children interface{}, silent bool) interface{}

AddMultiple1O Adds an array of existing Display Objects to this Group.

The Display Objects are automatically added to the top of this Group, and will render on-top of everything already in this Group.

As well as an array you can also pass another Group as the first argument. In this case all of the children from that Group will be removed from it and added into this Group.

If `Group.enableBody` is set, then a physics body will be created on the objects, so long as one does not already exist.

If `Group.inputEnableChildren` is set, then an Input Handler will be created on the objects, so long as one does not already exist.

func (*ParticlesArcadeEmitter) AddMultipleI

func (self *ParticlesArcadeEmitter) AddMultipleI(args ...interface{}) interface{}

AddMultipleI Adds an array of existing Display Objects to this Group.

The Display Objects are automatically added to the top of this Group, and will render on-top of everything already in this Group.

As well as an array you can also pass another Group as the first argument. In this case all of the children from that Group will be removed from it and added into this Group.

If `Group.enableBody` is set, then a physics body will be created on the objects, so long as one does not already exist.

If `Group.inputEnableChildren` is set, then an Input Handler will be created on the objects, so long as one does not already exist.

func (*ParticlesArcadeEmitter) AddToHash

func (self *ParticlesArcadeEmitter) AddToHash(child *DisplayObject) bool

AddToHash Adds a child of this Group into the hash array. This call will return false if the child is not a child of this Group, or is already in the hash.

func (*ParticlesArcadeEmitter) AddToHashI

func (self *ParticlesArcadeEmitter) AddToHashI(args ...interface{}) bool

AddToHashI Adds a child of this Group into the hash array. This call will return false if the child is not a child of this Group, or is already in the hash.

func (*ParticlesArcadeEmitter) Align

func (self *ParticlesArcadeEmitter) Align(width int, height int, cellWidth int, cellHeight int) bool

Align This method iterates through all children in the Group (regardless if they are visible or exist) and then changes their position so they are arranged in a Grid formation. Children must have the `alignTo` method in order to be positioned by this call. All default Phaser Game Objects have this.

The grid dimensions are determined by the first four arguments. The `width` and `height` arguments relate to the width and height of the grid respectively.

For example if the Group had 100 children in it:

`Group.align(10, 10, 32, 32)`

This will align all of the children into a grid formation of 10x10, using 32 pixels per grid cell. If you want a wider grid, you could do:

`Group.align(25, 4, 32, 32)`

This will align the children into a grid of 25x4, again using 32 pixels per grid cell.

You can choose to set _either_ the `width` or `height` value to -1. Doing so tells the method to keep on aligning children until there are no children left. For example if this Group had 48 children in it, the following:

`Group.align(-1, 8, 32, 32)`

... will align the children so that there are 8 children vertically (the second argument), and each row will contain 6 sprites, except the last one, which will contain 5 (totaling 48)

You can also do:

`Group.align(10, -1, 32, 32)`

In this case it will create a grid 10 wide, and as tall as it needs to be in order to fit all of the children in.

The `position` property allows you to control where in each grid cell the child is positioned. This is a constant and can be one of `Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` or `Phaser.BOTTOM_RIGHT`.

The final argument; `offset` lets you start the alignment from a specific child index.

func (*ParticlesArcadeEmitter) Align1O

func (self *ParticlesArcadeEmitter) Align1O(width int, height int, cellWidth int, cellHeight int, position int) bool

Align1O This method iterates through all children in the Group (regardless if they are visible or exist) and then changes their position so they are arranged in a Grid formation. Children must have the `alignTo` method in order to be positioned by this call. All default Phaser Game Objects have this.

The grid dimensions are determined by the first four arguments. The `width` and `height` arguments relate to the width and height of the grid respectively.

For example if the Group had 100 children in it:

`Group.align(10, 10, 32, 32)`

This will align all of the children into a grid formation of 10x10, using 32 pixels per grid cell. If you want a wider grid, you could do:

`Group.align(25, 4, 32, 32)`

This will align the children into a grid of 25x4, again using 32 pixels per grid cell.

You can choose to set _either_ the `width` or `height` value to -1. Doing so tells the method to keep on aligning children until there are no children left. For example if this Group had 48 children in it, the following:

`Group.align(-1, 8, 32, 32)`

... will align the children so that there are 8 children vertically (the second argument), and each row will contain 6 sprites, except the last one, which will contain 5 (totaling 48)

You can also do:

`Group.align(10, -1, 32, 32)`

In this case it will create a grid 10 wide, and as tall as it needs to be in order to fit all of the children in.

The `position` property allows you to control where in each grid cell the child is positioned. This is a constant and can be one of `Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` or `Phaser.BOTTOM_RIGHT`.

The final argument; `offset` lets you start the alignment from a specific child index.

func (*ParticlesArcadeEmitter) Align2O

func (self *ParticlesArcadeEmitter) Align2O(width int, height int, cellWidth int, cellHeight int, position int, offset int) bool

Align2O This method iterates through all children in the Group (regardless if they are visible or exist) and then changes their position so they are arranged in a Grid formation. Children must have the `alignTo` method in order to be positioned by this call. All default Phaser Game Objects have this.

The grid dimensions are determined by the first four arguments. The `width` and `height` arguments relate to the width and height of the grid respectively.

For example if the Group had 100 children in it:

`Group.align(10, 10, 32, 32)`

This will align all of the children into a grid formation of 10x10, using 32 pixels per grid cell. If you want a wider grid, you could do:

`Group.align(25, 4, 32, 32)`

This will align the children into a grid of 25x4, again using 32 pixels per grid cell.

You can choose to set _either_ the `width` or `height` value to -1. Doing so tells the method to keep on aligning children until there are no children left. For example if this Group had 48 children in it, the following:

`Group.align(-1, 8, 32, 32)`

... will align the children so that there are 8 children vertically (the second argument), and each row will contain 6 sprites, except the last one, which will contain 5 (totaling 48)

You can also do:

`Group.align(10, -1, 32, 32)`

In this case it will create a grid 10 wide, and as tall as it needs to be in order to fit all of the children in.

The `position` property allows you to control where in each grid cell the child is positioned. This is a constant and can be one of `Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` or `Phaser.BOTTOM_RIGHT`.

The final argument; `offset` lets you start the alignment from a specific child index.

func (*ParticlesArcadeEmitter) AlignI

func (self *ParticlesArcadeEmitter) AlignI(args ...interface{}) bool

AlignI This method iterates through all children in the Group (regardless if they are visible or exist) and then changes their position so they are arranged in a Grid formation. Children must have the `alignTo` method in order to be positioned by this call. All default Phaser Game Objects have this.

The grid dimensions are determined by the first four arguments. The `width` and `height` arguments relate to the width and height of the grid respectively.

For example if the Group had 100 children in it:

`Group.align(10, 10, 32, 32)`

This will align all of the children into a grid formation of 10x10, using 32 pixels per grid cell. If you want a wider grid, you could do:

`Group.align(25, 4, 32, 32)`

This will align the children into a grid of 25x4, again using 32 pixels per grid cell.

You can choose to set _either_ the `width` or `height` value to -1. Doing so tells the method to keep on aligning children until there are no children left. For example if this Group had 48 children in it, the following:

`Group.align(-1, 8, 32, 32)`

... will align the children so that there are 8 children vertically (the second argument), and each row will contain 6 sprites, except the last one, which will contain 5 (totaling 48)

You can also do:

`Group.align(10, -1, 32, 32)`

In this case it will create a grid 10 wide, and as tall as it needs to be in order to fit all of the children in.

The `position` property allows you to control where in each grid cell the child is positioned. This is a constant and can be one of `Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` or `Phaser.BOTTOM_RIGHT`.

The final argument; `offset` lets you start the alignment from a specific child index.

func (*ParticlesArcadeEmitter) AlignIn

func (self *ParticlesArcadeEmitter) AlignIn(container interface{}) *Group

AlignIn Aligns this Group within another Game Object, or Rectangle, known as the 'container', to one of 9 possible positions.

The container must be a Game Object, or Phaser.Rectangle object. This can include properties such as `World.bounds` or `Camera.view`, for aligning Groups within the world and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText, TileSprites or Buttons.

Please note that aligning a Group to another Game Object does **not** make it a child of the container. It simply modifies its position coordinates so it aligns with it.

The position constants you can use are:

`Phaser.TOP_LEFT`, `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

Groups are placed in such a way that their _bounds_ align with the container, taking into consideration rotation and scale of its children. This allows you to neatly align Groups, irrespective of their position value.

The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final aligned position of the Group. For example:

`group.alignIn(background, Phaser.BOTTOM_RIGHT, -20, -20)`

Would align the `group` to the bottom-right, but moved 20 pixels in from the corner. Think of the offsets as applying an adjustment to the containers bounds before the alignment takes place. So providing a negative offset will 'shrink' the container bounds by that amount, and providing a positive one expands it.

func (*ParticlesArcadeEmitter) AlignIn1O

func (self *ParticlesArcadeEmitter) AlignIn1O(container interface{}, position int) *Group

AlignIn1O Aligns this Group within another Game Object, or Rectangle, known as the 'container', to one of 9 possible positions.

The container must be a Game Object, or Phaser.Rectangle object. This can include properties such as `World.bounds` or `Camera.view`, for aligning Groups within the world and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText, TileSprites or Buttons.

Please note that aligning a Group to another Game Object does **not** make it a child of the container. It simply modifies its position coordinates so it aligns with it.

The position constants you can use are:

`Phaser.TOP_LEFT`, `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

Groups are placed in such a way that their _bounds_ align with the container, taking into consideration rotation and scale of its children. This allows you to neatly align Groups, irrespective of their position value.

The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final aligned position of the Group. For example:

`group.alignIn(background, Phaser.BOTTOM_RIGHT, -20, -20)`

Would align the `group` to the bottom-right, but moved 20 pixels in from the corner. Think of the offsets as applying an adjustment to the containers bounds before the alignment takes place. So providing a negative offset will 'shrink' the container bounds by that amount, and providing a positive one expands it.

func (*ParticlesArcadeEmitter) AlignIn2O

func (self *ParticlesArcadeEmitter) AlignIn2O(container interface{}, position int, offsetX int) *Group

AlignIn2O Aligns this Group within another Game Object, or Rectangle, known as the 'container', to one of 9 possible positions.

The container must be a Game Object, or Phaser.Rectangle object. This can include properties such as `World.bounds` or `Camera.view`, for aligning Groups within the world and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText, TileSprites or Buttons.

Please note that aligning a Group to another Game Object does **not** make it a child of the container. It simply modifies its position coordinates so it aligns with it.

The position constants you can use are:

`Phaser.TOP_LEFT`, `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

Groups are placed in such a way that their _bounds_ align with the container, taking into consideration rotation and scale of its children. This allows you to neatly align Groups, irrespective of their position value.

The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final aligned position of the Group. For example:

`group.alignIn(background, Phaser.BOTTOM_RIGHT, -20, -20)`

Would align the `group` to the bottom-right, but moved 20 pixels in from the corner. Think of the offsets as applying an adjustment to the containers bounds before the alignment takes place. So providing a negative offset will 'shrink' the container bounds by that amount, and providing a positive one expands it.

func (*ParticlesArcadeEmitter) AlignIn3O

func (self *ParticlesArcadeEmitter) AlignIn3O(container interface{}, position int, offsetX int, offsetY int) *Group

AlignIn3O Aligns this Group within another Game Object, or Rectangle, known as the 'container', to one of 9 possible positions.

The container must be a Game Object, or Phaser.Rectangle object. This can include properties such as `World.bounds` or `Camera.view`, for aligning Groups within the world and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText, TileSprites or Buttons.

Please note that aligning a Group to another Game Object does **not** make it a child of the container. It simply modifies its position coordinates so it aligns with it.

The position constants you can use are:

`Phaser.TOP_LEFT`, `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

Groups are placed in such a way that their _bounds_ align with the container, taking into consideration rotation and scale of its children. This allows you to neatly align Groups, irrespective of their position value.

The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final aligned position of the Group. For example:

`group.alignIn(background, Phaser.BOTTOM_RIGHT, -20, -20)`

Would align the `group` to the bottom-right, but moved 20 pixels in from the corner. Think of the offsets as applying an adjustment to the containers bounds before the alignment takes place. So providing a negative offset will 'shrink' the container bounds by that amount, and providing a positive one expands it.

func (*ParticlesArcadeEmitter) AlignInI

func (self *ParticlesArcadeEmitter) AlignInI(args ...interface{}) *Group

AlignInI Aligns this Group within another Game Object, or Rectangle, known as the 'container', to one of 9 possible positions.

The container must be a Game Object, or Phaser.Rectangle object. This can include properties such as `World.bounds` or `Camera.view`, for aligning Groups within the world and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText, TileSprites or Buttons.

Please note that aligning a Group to another Game Object does **not** make it a child of the container. It simply modifies its position coordinates so it aligns with it.

The position constants you can use are:

`Phaser.TOP_LEFT`, `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

Groups are placed in such a way that their _bounds_ align with the container, taking into consideration rotation and scale of its children. This allows you to neatly align Groups, irrespective of their position value.

The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final aligned position of the Group. For example:

`group.alignIn(background, Phaser.BOTTOM_RIGHT, -20, -20)`

Would align the `group` to the bottom-right, but moved 20 pixels in from the corner. Think of the offsets as applying an adjustment to the containers bounds before the alignment takes place. So providing a negative offset will 'shrink' the container bounds by that amount, and providing a positive one expands it.

func (*ParticlesArcadeEmitter) AlignTo

func (self *ParticlesArcadeEmitter) AlignTo(parent interface{}) *Group

AlignTo Aligns this Group to the side of another Game Object, or Rectangle, known as the 'parent', in one of 11 possible positions.

The parent must be a Game Object, or Phaser.Rectangle object. This can include properties such as `World.bounds` or `Camera.view`, for aligning Groups within the world and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText, TileSprites or Buttons.

Please note that aligning a Group to another Game Object does **not** make it a child of the parent. It simply modifies its position coordinates so it aligns with it.

The position constants you can use are:

`Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_TOP`, `Phaser.LEFT_CENTER`, `Phaser.LEFT_BOTTOM`, `Phaser.RIGHT_TOP`, `Phaser.RIGHT_CENTER`, `Phaser.RIGHT_BOTTOM`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

Groups are placed in such a way that their _bounds_ align with the parent, taking into consideration rotation and scale of the children. This allows you to neatly align Groups, irrespective of their position value.

The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final aligned position of the Group. For example:

`group.alignTo(background, Phaser.BOTTOM_RIGHT, -20, -20)`

Would align the `group` to the bottom-right, but moved 20 pixels in from the corner. Think of the offsets as applying an adjustment to the parents bounds before the alignment takes place. So providing a negative offset will 'shrink' the parent bounds by that amount, and providing a positive one expands it.

func (*ParticlesArcadeEmitter) AlignTo1O

func (self *ParticlesArcadeEmitter) AlignTo1O(parent interface{}, position int) *Group

AlignTo1O Aligns this Group to the side of another Game Object, or Rectangle, known as the 'parent', in one of 11 possible positions.

The parent must be a Game Object, or Phaser.Rectangle object. This can include properties such as `World.bounds` or `Camera.view`, for aligning Groups within the world and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText, TileSprites or Buttons.

Please note that aligning a Group to another Game Object does **not** make it a child of the parent. It simply modifies its position coordinates so it aligns with it.

The position constants you can use are:

`Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_TOP`, `Phaser.LEFT_CENTER`, `Phaser.LEFT_BOTTOM`, `Phaser.RIGHT_TOP`, `Phaser.RIGHT_CENTER`, `Phaser.RIGHT_BOTTOM`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

Groups are placed in such a way that their _bounds_ align with the parent, taking into consideration rotation and scale of the children. This allows you to neatly align Groups, irrespective of their position value.

The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final aligned position of the Group. For example:

`group.alignTo(background, Phaser.BOTTOM_RIGHT, -20, -20)`

Would align the `group` to the bottom-right, but moved 20 pixels in from the corner. Think of the offsets as applying an adjustment to the parents bounds before the alignment takes place. So providing a negative offset will 'shrink' the parent bounds by that amount, and providing a positive one expands it.

func (*ParticlesArcadeEmitter) AlignTo2O

func (self *ParticlesArcadeEmitter) AlignTo2O(parent interface{}, position int, offsetX int) *Group

AlignTo2O Aligns this Group to the side of another Game Object, or Rectangle, known as the 'parent', in one of 11 possible positions.

The parent must be a Game Object, or Phaser.Rectangle object. This can include properties such as `World.bounds` or `Camera.view`, for aligning Groups within the world and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText, TileSprites or Buttons.

Please note that aligning a Group to another Game Object does **not** make it a child of the parent. It simply modifies its position coordinates so it aligns with it.

The position constants you can use are:

`Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_TOP`, `Phaser.LEFT_CENTER`, `Phaser.LEFT_BOTTOM`, `Phaser.RIGHT_TOP`, `Phaser.RIGHT_CENTER`, `Phaser.RIGHT_BOTTOM`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

Groups are placed in such a way that their _bounds_ align with the parent, taking into consideration rotation and scale of the children. This allows you to neatly align Groups, irrespective of their position value.

The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final aligned position of the Group. For example:

`group.alignTo(background, Phaser.BOTTOM_RIGHT, -20, -20)`

Would align the `group` to the bottom-right, but moved 20 pixels in from the corner. Think of the offsets as applying an adjustment to the parents bounds before the alignment takes place. So providing a negative offset will 'shrink' the parent bounds by that amount, and providing a positive one expands it.

func (*ParticlesArcadeEmitter) AlignTo3O

func (self *ParticlesArcadeEmitter) AlignTo3O(parent interface{}, position int, offsetX int, offsetY int) *Group

AlignTo3O Aligns this Group to the side of another Game Object, or Rectangle, known as the 'parent', in one of 11 possible positions.

The parent must be a Game Object, or Phaser.Rectangle object. This can include properties such as `World.bounds` or `Camera.view`, for aligning Groups within the world and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText, TileSprites or Buttons.

Please note that aligning a Group to another Game Object does **not** make it a child of the parent. It simply modifies its position coordinates so it aligns with it.

The position constants you can use are:

`Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_TOP`, `Phaser.LEFT_CENTER`, `Phaser.LEFT_BOTTOM`, `Phaser.RIGHT_TOP`, `Phaser.RIGHT_CENTER`, `Phaser.RIGHT_BOTTOM`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

Groups are placed in such a way that their _bounds_ align with the parent, taking into consideration rotation and scale of the children. This allows you to neatly align Groups, irrespective of their position value.

The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final aligned position of the Group. For example:

`group.alignTo(background, Phaser.BOTTOM_RIGHT, -20, -20)`

Would align the `group` to the bottom-right, but moved 20 pixels in from the corner. Think of the offsets as applying an adjustment to the parents bounds before the alignment takes place. So providing a negative offset will 'shrink' the parent bounds by that amount, and providing a positive one expands it.

func (*ParticlesArcadeEmitter) AlignToI

func (self *ParticlesArcadeEmitter) AlignToI(args ...interface{}) *Group

AlignToI Aligns this Group to the side of another Game Object, or Rectangle, known as the 'parent', in one of 11 possible positions.

The parent must be a Game Object, or Phaser.Rectangle object. This can include properties such as `World.bounds` or `Camera.view`, for aligning Groups within the world and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText, TileSprites or Buttons.

Please note that aligning a Group to another Game Object does **not** make it a child of the parent. It simply modifies its position coordinates so it aligns with it.

The position constants you can use are:

`Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_TOP`, `Phaser.LEFT_CENTER`, `Phaser.LEFT_BOTTOM`, `Phaser.RIGHT_TOP`, `Phaser.RIGHT_CENTER`, `Phaser.RIGHT_BOTTOM`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

Groups are placed in such a way that their _bounds_ align with the parent, taking into consideration rotation and scale of the children. This allows you to neatly align Groups, irrespective of their position value.

The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final aligned position of the Group. For example:

`group.alignTo(background, Phaser.BOTTOM_RIGHT, -20, -20)`

Would align the `group` to the bottom-right, but moved 20 pixels in from the corner. Think of the offsets as applying an adjustment to the parents bounds before the alignment takes place. So providing a negative offset will 'shrink' the parent bounds by that amount, and providing a positive one expands it.

func (*ParticlesArcadeEmitter) Alive

func (self *ParticlesArcadeEmitter) Alive() bool

Alive The alive property is useful for Groups that are children of other Groups and need to be included/excluded in checks like forEachAlive.

func (*ParticlesArcadeEmitter) Alpha

func (self *ParticlesArcadeEmitter) Alpha() int

Alpha The alpha value of the group container.

func (*ParticlesArcadeEmitter) AlphaData

func (self *ParticlesArcadeEmitter) AlphaData() []interface{}

AlphaData An array of the calculated alpha easing data applied to particles with alphaRates > 0.

func (*ParticlesArcadeEmitter) Angle

func (self *ParticlesArcadeEmitter) Angle() int

Angle The angle of rotation of the group container, in degrees.

This adjusts the group itself by modifying its local rotation transform.

This has no impact on the rotation/angle properties of the children, but it will update their worldTransform and on-screen orientation and position.

func (*ParticlesArcadeEmitter) AngularDrag

func (self *ParticlesArcadeEmitter) AngularDrag() int

AngularDrag The angular drag component of particles launched from the emitter if they are rotating.

func (*ParticlesArcadeEmitter) Area

func (self *ParticlesArcadeEmitter) Area() *Rectangle

Area The area of the emitter. Particles can be randomly generated from anywhere within this rectangle.

func (*ParticlesArcadeEmitter) AscendingSortHandler

func (self *ParticlesArcadeEmitter) AscendingSortHandler(a interface{}, b interface{})

AscendingSortHandler An internal helper function for the sort process.

func (*ParticlesArcadeEmitter) AscendingSortHandlerI

func (self *ParticlesArcadeEmitter) AscendingSortHandlerI(args ...interface{})

AscendingSortHandlerI An internal helper function for the sort process.

func (*ParticlesArcadeEmitter) At

func (self *ParticlesArcadeEmitter) At(object interface{}) *ParticlesArcadeEmitter

At Change the emitters center to match the center of any object with a `center` property, such as a Sprite. If the object doesn't have a center property it will be set to object.x + object.width / 2

func (*ParticlesArcadeEmitter) AtI

func (self *ParticlesArcadeEmitter) AtI(args ...interface{}) *ParticlesArcadeEmitter

AtI Change the emitters center to match the center of any object with a `center` property, such as a Sprite. If the object doesn't have a center property it will be set to object.x + object.width / 2

func (*ParticlesArcadeEmitter) AutoAlpha

func (self *ParticlesArcadeEmitter) AutoAlpha() bool

AutoAlpha When a new Particle is emitted this controls if it will automatically change alpha. Use Emitter.setAlpha to configure.

func (*ParticlesArcadeEmitter) AutoScale

func (self *ParticlesArcadeEmitter) AutoScale() bool

AutoScale When a new Particle is emitted this controls if it will automatically scale in size. Use Emitter.setScale to configure.

func (*ParticlesArcadeEmitter) BlendMode

func (self *ParticlesArcadeEmitter) BlendMode() int

BlendMode The blendMode as set on the particle when emitted from the Emitter. Defaults to NORMAL. Needs browser capable of supporting canvas blend-modes (most not available in WebGL)

func (*ParticlesArcadeEmitter) Bottom

func (self *ParticlesArcadeEmitter) Bottom() int

Bottom Gets the bottom position of the Emitter.

func (*ParticlesArcadeEmitter) Bounce

func (self *ParticlesArcadeEmitter) Bounce() *Point

Bounce How much each particle should bounce on each axis. 1 = full bounce, 0 = no bounce.

func (*ParticlesArcadeEmitter) BringToTop

func (self *ParticlesArcadeEmitter) BringToTop(child interface{}) interface{}

BringToTop Brings the given child to the top of this group so it renders above all other children.

func (*ParticlesArcadeEmitter) BringToTopI

func (self *ParticlesArcadeEmitter) BringToTopI(args ...interface{}) interface{}

BringToTopI Brings the given child to the top of this group so it renders above all other children.

func (*ParticlesArcadeEmitter) CallAll

func (self *ParticlesArcadeEmitter) CallAll(method string, context string, args interface{})

CallAll Calls a function, specified by name, on all on children.

The function is called for all children regardless if they are dead or alive (see callAllExists for different options). After the method parameter and context you can add as many extra parameters as you like, which will all be passed to the child.

func (*ParticlesArcadeEmitter) CallAllExists

func (self *ParticlesArcadeEmitter) CallAllExists(callback string, existsValue bool, parameter interface{})

CallAllExists Calls a function, specified by name, on all children in the group who exist (or do not exist).

After the existsValue parameter you can add as many parameters as you like, which will all be passed to the child callback.

func (*ParticlesArcadeEmitter) CallAllExistsI

func (self *ParticlesArcadeEmitter) CallAllExistsI(args ...interface{})

CallAllExistsI Calls a function, specified by name, on all children in the group who exist (or do not exist).

After the existsValue parameter you can add as many parameters as you like, which will all be passed to the child callback.

func (*ParticlesArcadeEmitter) CallAllI

func (self *ParticlesArcadeEmitter) CallAllI(args ...interface{})

CallAllI Calls a function, specified by name, on all on children.

The function is called for all children regardless if they are dead or alive (see callAllExists for different options). After the method parameter and context you can add as many extra parameters as you like, which will all be passed to the child.

func (*ParticlesArcadeEmitter) CallbackFromArray

func (self *ParticlesArcadeEmitter) CallbackFromArray(child interface{}, callback []interface{}, length int)

CallbackFromArray Returns a reference to a function that exists on a child of the group based on the given callback array.

func (*ParticlesArcadeEmitter) CallbackFromArrayI

func (self *ParticlesArcadeEmitter) CallbackFromArrayI(args ...interface{})

CallbackFromArrayI Returns a reference to a function that exists on a child of the group based on the given callback array.

func (*ParticlesArcadeEmitter) CameraOffset

func (self *ParticlesArcadeEmitter) CameraOffset() *Point

CameraOffset If this object is {@link Phaser.Group#fixedToCamera fixedToCamera} then this stores the x/y position offset relative to the top-left of the camera view. If the parent of this Group is also `fixedToCamera` then the offset here is in addition to that and should typically be disabled.

func (*ParticlesArcadeEmitter) CenterX

func (self *ParticlesArcadeEmitter) CenterX() int

CenterX The center x coordinate of this Group.

It is derived by calling `getBounds`, calculating the Groups dimensions based on its visible children.

func (*ParticlesArcadeEmitter) CenterY

func (self *ParticlesArcadeEmitter) CenterY() int

CenterY The center y coordinate of this Group.

It is derived by calling `getBounds`, calculating the Groups dimensions based on its visible children.

func (*ParticlesArcadeEmitter) CheckAll

func (self *ParticlesArcadeEmitter) CheckAll(key string, value interface{})

CheckAll Quickly check that the same property across all children of this group is equal to the given value.

This call doesn't descend down children, so if you have a Group inside of this group, the property will be checked on the group but not its children.

func (*ParticlesArcadeEmitter) CheckAll1O

func (self *ParticlesArcadeEmitter) CheckAll1O(key string, value interface{}, checkAlive bool)

CheckAll1O Quickly check that the same property across all children of this group is equal to the given value.

This call doesn't descend down children, so if you have a Group inside of this group, the property will be checked on the group but not its children.

func (*ParticlesArcadeEmitter) CheckAll2O

func (self *ParticlesArcadeEmitter) CheckAll2O(key string, value interface{}, checkAlive bool, checkVisible bool)

CheckAll2O Quickly check that the same property across all children of this group is equal to the given value.

This call doesn't descend down children, so if you have a Group inside of this group, the property will be checked on the group but not its children.

func (*ParticlesArcadeEmitter) CheckAll3O

func (self *ParticlesArcadeEmitter) CheckAll3O(key string, value interface{}, checkAlive bool, checkVisible bool, force bool)

CheckAll3O Quickly check that the same property across all children of this group is equal to the given value.

This call doesn't descend down children, so if you have a Group inside of this group, the property will be checked on the group but not its children.

func (*ParticlesArcadeEmitter) CheckAllI

func (self *ParticlesArcadeEmitter) CheckAllI(args ...interface{})

CheckAllI Quickly check that the same property across all children of this group is equal to the given value.

This call doesn't descend down children, so if you have a Group inside of this group, the property will be checked on the group but not its children.

func (*ParticlesArcadeEmitter) CheckProperty

func (self *ParticlesArcadeEmitter) CheckProperty(child interface{}, key []interface{}, value interface{}) bool

CheckProperty Checks a property for the given value on the child.

func (*ParticlesArcadeEmitter) CheckProperty1O

func (self *ParticlesArcadeEmitter) CheckProperty1O(child interface{}, key []interface{}, value interface{}, force bool) bool

CheckProperty1O Checks a property for the given value on the child.

func (*ParticlesArcadeEmitter) CheckPropertyI

func (self *ParticlesArcadeEmitter) CheckPropertyI(args ...interface{}) bool

CheckPropertyI Checks a property for the given value on the child.

func (*ParticlesArcadeEmitter) Children

func (self *ParticlesArcadeEmitter) Children() []DisplayObject

Children [read-only] The array of children of this container.

func (*ParticlesArcadeEmitter) ClassType

func (self *ParticlesArcadeEmitter) ClassType() interface{}

ClassType The type of objects that will be created when using {@link Phaser.Group#create create} or {@link Phaser.Group#createMultiple createMultiple}.

Any object may be used but it should extend either Sprite or Image and accept the same constructor arguments: when a new object is created it is passed the following parameters to its constructor: `(game, x, y, key, frame)`.

func (*ParticlesArcadeEmitter) Contains

func (self *ParticlesArcadeEmitter) Contains(child *DisplayObject) bool

Contains Determines whether the specified display object is a child of the DisplayObjectContainer instance or the instance itself.

func (*ParticlesArcadeEmitter) ContainsI

func (self *ParticlesArcadeEmitter) ContainsI(args ...interface{}) bool

ContainsI Determines whether the specified display object is a child of the DisplayObjectContainer instance or the instance itself.

func (*ParticlesArcadeEmitter) CountDead

func (self *ParticlesArcadeEmitter) CountDead() int

CountDead Get the number of dead children in this group.

func (*ParticlesArcadeEmitter) CountDeadI

func (self *ParticlesArcadeEmitter) CountDeadI(args ...interface{}) int

CountDeadI Get the number of dead children in this group.

func (*ParticlesArcadeEmitter) CountLiving

func (self *ParticlesArcadeEmitter) CountLiving() int

CountLiving Get the number of living children in this group.

func (*ParticlesArcadeEmitter) CountLivingI

func (self *ParticlesArcadeEmitter) CountLivingI(args ...interface{}) int

CountLivingI Get the number of living children in this group.

func (*ParticlesArcadeEmitter) Create

func (self *ParticlesArcadeEmitter) Create(x int, y int) *DisplayObject

Create Creates a new Phaser.Sprite object and adds it to the top of this group.

Use {@link Phaser.Group#classType classType} to change the type of object created.

The child is automatically added to the top of the group, and is displayed above every previous child.

Or if the _optional_ index is specified, the child is added at the location specified by the index value, this allows you to control child ordering.

If `Group.enableBody` is set, then a physics body will be created on the object, so long as one does not already exist.

If `Group.inputEnableChildren` is set, then an Input Handler will be created on the object, so long as one does not already exist.

func (*ParticlesArcadeEmitter) Create1O

func (self *ParticlesArcadeEmitter) Create1O(x int, y int, key interface{}) *DisplayObject

Create1O Creates a new Phaser.Sprite object and adds it to the top of this group.

Use {@link Phaser.Group#classType classType} to change the type of object created.

The child is automatically added to the top of the group, and is displayed above every previous child.

Or if the _optional_ index is specified, the child is added at the location specified by the index value, this allows you to control child ordering.

If `Group.enableBody` is set, then a physics body will be created on the object, so long as one does not already exist.

If `Group.inputEnableChildren` is set, then an Input Handler will be created on the object, so long as one does not already exist.

func (*ParticlesArcadeEmitter) Create2O

func (self *ParticlesArcadeEmitter) Create2O(x int, y int, key interface{}, frame interface{}) *DisplayObject

Create2O Creates a new Phaser.Sprite object and adds it to the top of this group.

Use {@link Phaser.Group#classType classType} to change the type of object created.

The child is automatically added to the top of the group, and is displayed above every previous child.

Or if the _optional_ index is specified, the child is added at the location specified by the index value, this allows you to control child ordering.

If `Group.enableBody` is set, then a physics body will be created on the object, so long as one does not already exist.

If `Group.inputEnableChildren` is set, then an Input Handler will be created on the object, so long as one does not already exist.

func (*ParticlesArcadeEmitter) Create3O

func (self *ParticlesArcadeEmitter) Create3O(x int, y int, key interface{}, frame interface{}, exists bool) *DisplayObject

Create3O Creates a new Phaser.Sprite object and adds it to the top of this group.

Use {@link Phaser.Group#classType classType} to change the type of object created.

The child is automatically added to the top of the group, and is displayed above every previous child.

Or if the _optional_ index is specified, the child is added at the location specified by the index value, this allows you to control child ordering.

If `Group.enableBody` is set, then a physics body will be created on the object, so long as one does not already exist.

If `Group.inputEnableChildren` is set, then an Input Handler will be created on the object, so long as one does not already exist.

func (*ParticlesArcadeEmitter) Create4O

func (self *ParticlesArcadeEmitter) Create4O(x int, y int, key interface{}, frame interface{}, exists bool, index int) *DisplayObject

Create4O Creates a new Phaser.Sprite object and adds it to the top of this group.

Use {@link Phaser.Group#classType classType} to change the type of object created.

The child is automatically added to the top of the group, and is displayed above every previous child.

Or if the _optional_ index is specified, the child is added at the location specified by the index value, this allows you to control child ordering.

If `Group.enableBody` is set, then a physics body will be created on the object, so long as one does not already exist.

If `Group.inputEnableChildren` is set, then an Input Handler will be created on the object, so long as one does not already exist.

func (*ParticlesArcadeEmitter) CreateI

func (self *ParticlesArcadeEmitter) CreateI(args ...interface{}) *DisplayObject

CreateI Creates a new Phaser.Sprite object and adds it to the top of this group.

Use {@link Phaser.Group#classType classType} to change the type of object created.

The child is automatically added to the top of the group, and is displayed above every previous child.

Or if the _optional_ index is specified, the child is added at the location specified by the index value, this allows you to control child ordering.

If `Group.enableBody` is set, then a physics body will be created on the object, so long as one does not already exist.

If `Group.inputEnableChildren` is set, then an Input Handler will be created on the object, so long as one does not already exist.

func (*ParticlesArcadeEmitter) CreateMultiple

func (self *ParticlesArcadeEmitter) CreateMultiple(quantity int, key interface{}) []interface{}

CreateMultiple Creates multiple Phaser.Sprite objects and adds them to the top of this Group.

This method is useful if you need to quickly generate a pool of sprites, such as bullets.

Use {@link Phaser.Group#classType classType} to change the type of object created.

You can provide an array as the `key` and / or `frame` arguments. When you do this it will create `quantity` Sprites for every key (and frame) in the arrays.

For example:

`createMultiple(25, ['ball', 'carrot'])`

In the above code there are 2 keys (ball and carrot) which means that 50 sprites will be created in total, 25 of each. You can also have the `frame` as an array:

`createMultiple(5, 'bricks', [0, 1, 2, 3])`

In the above there is one key (bricks), which is a sprite sheet. The frames array tells this method to use frames 0, 1, 2 and 3. So in total it will create 20 sprites, because the quantity was set to 5, so that is 5 brick sprites of frame 0, 5 brick sprites with frame 1, and so on.

If you set both the key and frame arguments to be arrays then understand it will create a total quantity of sprites equal to the size of both arrays times each other. I.e.:

`createMultiple(20, ['diamonds', 'balls'], [0, 1, 2])`

The above will create 20 'diamonds' of frame 0, 20 with frame 1 and 20 with frame 2. It will then create 20 'balls' of frame 0, 20 with frame 1 and 20 with frame 2. In total it will have created 120 sprites.

By default the Sprites will have their `exists` property set to `false`, and they will be positioned at 0x0, relative to the `Group.x / y` values.

If `Group.enableBody` is set, then a physics body will be created on the objects, so long as one does not already exist.

If `Group.inputEnableChildren` is set, then an Input Handler will be created on the objects, so long as one does not already exist.

func (*ParticlesArcadeEmitter) CreateMultiple1O

func (self *ParticlesArcadeEmitter) CreateMultiple1O(quantity int, key interface{}, frame interface{}) []interface{}

CreateMultiple1O Creates multiple Phaser.Sprite objects and adds them to the top of this Group.

This method is useful if you need to quickly generate a pool of sprites, such as bullets.

Use {@link Phaser.Group#classType classType} to change the type of object created.

You can provide an array as the `key` and / or `frame` arguments. When you do this it will create `quantity` Sprites for every key (and frame) in the arrays.

For example:

`createMultiple(25, ['ball', 'carrot'])`

In the above code there are 2 keys (ball and carrot) which means that 50 sprites will be created in total, 25 of each. You can also have the `frame` as an array:

`createMultiple(5, 'bricks', [0, 1, 2, 3])`

In the above there is one key (bricks), which is a sprite sheet. The frames array tells this method to use frames 0, 1, 2 and 3. So in total it will create 20 sprites, because the quantity was set to 5, so that is 5 brick sprites of frame 0, 5 brick sprites with frame 1, and so on.

If you set both the key and frame arguments to be arrays then understand it will create a total quantity of sprites equal to the size of both arrays times each other. I.e.:

`createMultiple(20, ['diamonds', 'balls'], [0, 1, 2])`

The above will create 20 'diamonds' of frame 0, 20 with frame 1 and 20 with frame 2. It will then create 20 'balls' of frame 0, 20 with frame 1 and 20 with frame 2. In total it will have created 120 sprites.

By default the Sprites will have their `exists` property set to `false`, and they will be positioned at 0x0, relative to the `Group.x / y` values.

If `Group.enableBody` is set, then a physics body will be created on the objects, so long as one does not already exist.

If `Group.inputEnableChildren` is set, then an Input Handler will be created on the objects, so long as one does not already exist.

func (*ParticlesArcadeEmitter) CreateMultiple2O

func (self *ParticlesArcadeEmitter) CreateMultiple2O(quantity int, key interface{}, frame interface{}, exists bool) []interface{}

CreateMultiple2O Creates multiple Phaser.Sprite objects and adds them to the top of this Group.

This method is useful if you need to quickly generate a pool of sprites, such as bullets.

Use {@link Phaser.Group#classType classType} to change the type of object created.

You can provide an array as the `key` and / or `frame` arguments. When you do this it will create `quantity` Sprites for every key (and frame) in the arrays.

For example:

`createMultiple(25, ['ball', 'carrot'])`

In the above code there are 2 keys (ball and carrot) which means that 50 sprites will be created in total, 25 of each. You can also have the `frame` as an array:

`createMultiple(5, 'bricks', [0, 1, 2, 3])`

In the above there is one key (bricks), which is a sprite sheet. The frames array tells this method to use frames 0, 1, 2 and 3. So in total it will create 20 sprites, because the quantity was set to 5, so that is 5 brick sprites of frame 0, 5 brick sprites with frame 1, and so on.

If you set both the key and frame arguments to be arrays then understand it will create a total quantity of sprites equal to the size of both arrays times each other. I.e.:

`createMultiple(20, ['diamonds', 'balls'], [0, 1, 2])`

The above will create 20 'diamonds' of frame 0, 20 with frame 1 and 20 with frame 2. It will then create 20 'balls' of frame 0, 20 with frame 1 and 20 with frame 2. In total it will have created 120 sprites.

By default the Sprites will have their `exists` property set to `false`, and they will be positioned at 0x0, relative to the `Group.x / y` values.

If `Group.enableBody` is set, then a physics body will be created on the objects, so long as one does not already exist.

If `Group.inputEnableChildren` is set, then an Input Handler will be created on the objects, so long as one does not already exist.

func (*ParticlesArcadeEmitter) CreateMultipleI

func (self *ParticlesArcadeEmitter) CreateMultipleI(args ...interface{}) []interface{}

CreateMultipleI Creates multiple Phaser.Sprite objects and adds them to the top of this Group.

This method is useful if you need to quickly generate a pool of sprites, such as bullets.

Use {@link Phaser.Group#classType classType} to change the type of object created.

You can provide an array as the `key` and / or `frame` arguments. When you do this it will create `quantity` Sprites for every key (and frame) in the arrays.

For example:

`createMultiple(25, ['ball', 'carrot'])`

In the above code there are 2 keys (ball and carrot) which means that 50 sprites will be created in total, 25 of each. You can also have the `frame` as an array:

`createMultiple(5, 'bricks', [0, 1, 2, 3])`

In the above there is one key (bricks), which is a sprite sheet. The frames array tells this method to use frames 0, 1, 2 and 3. So in total it will create 20 sprites, because the quantity was set to 5, so that is 5 brick sprites of frame 0, 5 brick sprites with frame 1, and so on.

If you set both the key and frame arguments to be arrays then understand it will create a total quantity of sprites equal to the size of both arrays times each other. I.e.:

`createMultiple(20, ['diamonds', 'balls'], [0, 1, 2])`

The above will create 20 'diamonds' of frame 0, 20 with frame 1 and 20 with frame 2. It will then create 20 'balls' of frame 0, 20 with frame 1 and 20 with frame 2. In total it will have created 120 sprites.

By default the Sprites will have their `exists` property set to `false`, and they will be positioned at 0x0, relative to the `Group.x / y` values.

If `Group.enableBody` is set, then a physics body will be created on the objects, so long as one does not already exist.

If `Group.inputEnableChildren` is set, then an Input Handler will be created on the objects, so long as one does not already exist.

func (*ParticlesArcadeEmitter) Cursor

func (self *ParticlesArcadeEmitter) Cursor() *DisplayObject

Cursor The current display object that the group cursor is pointing to, if any. (Can be set manually.)

The cursor is a way to iterate through the children in a Group using {@link Phaser.Group#next next} and {@link Phaser.Group#previous previous}.

func (*ParticlesArcadeEmitter) CursorIndex

func (self *ParticlesArcadeEmitter) CursorIndex() int

CursorIndex The current index of the Group cursor. Advance it with Group.next.

func (*ParticlesArcadeEmitter) CustomSort

func (self *ParticlesArcadeEmitter) CustomSort(sortHandler interface{})

CustomSort Sort the children in the group according to custom sort function.

The `sortHandler` is provided the two parameters: the two children involved in the comparison (a and b). It should return -1 if `a > b`, 1 if `a < b` or 0 if `a === b`.

func (*ParticlesArcadeEmitter) CustomSort1O

func (self *ParticlesArcadeEmitter) CustomSort1O(sortHandler interface{}, context interface{})

CustomSort1O Sort the children in the group according to custom sort function.

The `sortHandler` is provided the two parameters: the two children involved in the comparison (a and b). It should return -1 if `a > b`, 1 if `a < b` or 0 if `a === b`.

func (*ParticlesArcadeEmitter) CustomSortI

func (self *ParticlesArcadeEmitter) CustomSortI(args ...interface{})

CustomSortI Sort the children in the group according to custom sort function.

The `sortHandler` is provided the two parameters: the two children involved in the comparison (a and b). It should return -1 if `a > b`, 1 if `a < b` or 0 if `a === b`.

func (*ParticlesArcadeEmitter) DescendingSortHandler

func (self *ParticlesArcadeEmitter) DescendingSortHandler(a interface{}, b interface{})

DescendingSortHandler An internal helper function for the sort process.

func (*ParticlesArcadeEmitter) DescendingSortHandlerI

func (self *ParticlesArcadeEmitter) DescendingSortHandlerI(args ...interface{})

DescendingSortHandlerI An internal helper function for the sort process.

func (*ParticlesArcadeEmitter) Destroy

func (self *ParticlesArcadeEmitter) Destroy()

Destroy Destroys this Emitter, all associated child Particles and then removes itself from the Particle Manager.

func (*ParticlesArcadeEmitter) DestroyI

func (self *ParticlesArcadeEmitter) DestroyI(args ...interface{})

DestroyI Destroys this Emitter, all associated child Particles and then removes itself from the Particle Manager.

func (*ParticlesArcadeEmitter) DivideAll

func (self *ParticlesArcadeEmitter) DivideAll(property string, amount int, checkAlive bool, checkVisible bool)

DivideAll Divides the given property by the amount on all children in this group.

`Group.divideAll('x', 2)` will half the child.x value for each child.

func (*ParticlesArcadeEmitter) DivideAllI

func (self *ParticlesArcadeEmitter) DivideAllI(args ...interface{})

DivideAllI Divides the given property by the amount on all children in this group.

`Group.divideAll('x', 2)` will half the child.x value for each child.

func (*ParticlesArcadeEmitter) EmitParticle

func (self *ParticlesArcadeEmitter) EmitParticle() bool

EmitParticle This function is used internally to emit the next particle in the queue.

However it can also be called externally to emit a particle.

When called externally you can use the arguments to override any defaults the Emitter has set.

func (*ParticlesArcadeEmitter) EmitParticle1O

func (self *ParticlesArcadeEmitter) EmitParticle1O(x int) bool

EmitParticle1O This function is used internally to emit the next particle in the queue.

However it can also be called externally to emit a particle.

When called externally you can use the arguments to override any defaults the Emitter has set.

func (*ParticlesArcadeEmitter) EmitParticle2O

func (self *ParticlesArcadeEmitter) EmitParticle2O(x int, y int) bool

EmitParticle2O This function is used internally to emit the next particle in the queue.

However it can also be called externally to emit a particle.

When called externally you can use the arguments to override any defaults the Emitter has set.

func (*ParticlesArcadeEmitter) EmitParticle3O

func (self *ParticlesArcadeEmitter) EmitParticle3O(x int, y int, key interface{}) bool

EmitParticle3O This function is used internally to emit the next particle in the queue.

However it can also be called externally to emit a particle.

When called externally you can use the arguments to override any defaults the Emitter has set.

func (*ParticlesArcadeEmitter) EmitParticle4O

func (self *ParticlesArcadeEmitter) EmitParticle4O(x int, y int, key interface{}, frame interface{}) bool

EmitParticle4O This function is used internally to emit the next particle in the queue.

However it can also be called externally to emit a particle.

When called externally you can use the arguments to override any defaults the Emitter has set.

func (*ParticlesArcadeEmitter) EmitParticleI

func (self *ParticlesArcadeEmitter) EmitParticleI(args ...interface{}) bool

EmitParticleI This function is used internally to emit the next particle in the queue.

However it can also be called externally to emit a particle.

When called externally you can use the arguments to override any defaults the Emitter has set.

func (*ParticlesArcadeEmitter) EmitX

func (self *ParticlesArcadeEmitter) EmitX() int

EmitX The point the particles are emitted from. Emitter.x and Emitter.y control the containers location, which updates all current particles Emitter.emitX and Emitter.emitY control the emission location relative to the x/y position.

func (*ParticlesArcadeEmitter) EmitY

func (self *ParticlesArcadeEmitter) EmitY() int

EmitY The point the particles are emitted from. Emitter.x and Emitter.y control the containers location, which updates all current particles Emitter.emitX and Emitter.emitY control the emission location relative to the x/y position.

func (*ParticlesArcadeEmitter) EnableBody

func (self *ParticlesArcadeEmitter) EnableBody() bool

EnableBody If true all Sprites created by, or added to this group, will have a physics body enabled on them.

If there are children already in the Group at the time you set this property, they are not changed.

The default body type is controlled with {@link Phaser.Group#physicsBodyType physicsBodyType}.

func (*ParticlesArcadeEmitter) EnableBodyDebug

func (self *ParticlesArcadeEmitter) EnableBodyDebug() bool

EnableBodyDebug If true when a physics body is created (via {@link Phaser.Group#enableBody enableBody}) it will create a physics debug object as well.

This only works for P2 bodies.

func (*ParticlesArcadeEmitter) Exists

func (self *ParticlesArcadeEmitter) Exists() bool

Exists If exists is true the group is updated, otherwise it is skipped.

func (*ParticlesArcadeEmitter) Explode

Explode Call this function to emit the given quantity of particles at all once (an explosion)

func (*ParticlesArcadeEmitter) Explode1O

func (self *ParticlesArcadeEmitter) Explode1O(lifespan int) *ParticlesArcadeEmitter

Explode1O Call this function to emit the given quantity of particles at all once (an explosion)

func (*ParticlesArcadeEmitter) Explode2O

func (self *ParticlesArcadeEmitter) Explode2O(lifespan int, quantity int) *ParticlesArcadeEmitter

Explode2O Call this function to emit the given quantity of particles at all once (an explosion)

func (*ParticlesArcadeEmitter) ExplodeI

func (self *ParticlesArcadeEmitter) ExplodeI(args ...interface{}) *ParticlesArcadeEmitter

ExplodeI Call this function to emit the given quantity of particles at all once (an explosion)

func (*ParticlesArcadeEmitter) Filter

func (self *ParticlesArcadeEmitter) Filter(predicate interface{}) *ArraySet

Filter Find children matching a certain predicate.

For example:

var healthyList = Group.filter(function(child, index, children) {
    return child.health > 10 ? true : false;
}, true);
healthyList.callAll('attack');

Note: Currently this will skip any children which are Groups themselves.

func (*ParticlesArcadeEmitter) Filter1O

func (self *ParticlesArcadeEmitter) Filter1O(predicate interface{}, checkExists bool) *ArraySet

Filter1O Find children matching a certain predicate.

For example:

var healthyList = Group.filter(function(child, index, children) {
    return child.health > 10 ? true : false;
}, true);
healthyList.callAll('attack');

Note: Currently this will skip any children which are Groups themselves.

func (*ParticlesArcadeEmitter) FilterI

func (self *ParticlesArcadeEmitter) FilterI(args ...interface{}) *ArraySet

FilterI Find children matching a certain predicate.

For example:

var healthyList = Group.filter(function(child, index, children) {
    return child.health > 10 ? true : false;
}, true);
healthyList.callAll('attack');

Note: Currently this will skip any children which are Groups themselves.

func (*ParticlesArcadeEmitter) FixedToCamera

func (self *ParticlesArcadeEmitter) FixedToCamera() bool

FixedToCamera A Group that is fixed to the camera uses its x/y coordinates as offsets from the top left of the camera. These are stored in Group.cameraOffset.

Note that the cameraOffset values are in addition to any parent in the display list. So if this Group was in a Group that has x: 200, then this will be added to the cameraOffset.x

func (*ParticlesArcadeEmitter) Flow

Flow Call this function to start emitting a flow of particles at the given frequency. It will carry on going until the total given is reached. Each time the flow is run the quantity number of particles will be emitted together. If you set the total to be 20 and quantity to be 5 then flow will emit 4 times in total (4 x 5 = 20 total) If you set the total to be -1 then no quantity cap is used and it will keep emitting.

func (*ParticlesArcadeEmitter) Flow1O

func (self *ParticlesArcadeEmitter) Flow1O(lifespan int) *ParticlesArcadeEmitter

Flow1O Call this function to start emitting a flow of particles at the given frequency. It will carry on going until the total given is reached. Each time the flow is run the quantity number of particles will be emitted together. If you set the total to be 20 and quantity to be 5 then flow will emit 4 times in total (4 x 5 = 20 total) If you set the total to be -1 then no quantity cap is used and it will keep emitting.

func (*ParticlesArcadeEmitter) Flow2O

func (self *ParticlesArcadeEmitter) Flow2O(lifespan int, frequency int) *ParticlesArcadeEmitter

Flow2O Call this function to start emitting a flow of particles at the given frequency. It will carry on going until the total given is reached. Each time the flow is run the quantity number of particles will be emitted together. If you set the total to be 20 and quantity to be 5 then flow will emit 4 times in total (4 x 5 = 20 total) If you set the total to be -1 then no quantity cap is used and it will keep emitting.

func (*ParticlesArcadeEmitter) Flow3O

func (self *ParticlesArcadeEmitter) Flow3O(lifespan int, frequency int, quantity int) *ParticlesArcadeEmitter

Flow3O Call this function to start emitting a flow of particles at the given frequency. It will carry on going until the total given is reached. Each time the flow is run the quantity number of particles will be emitted together. If you set the total to be 20 and quantity to be 5 then flow will emit 4 times in total (4 x 5 = 20 total) If you set the total to be -1 then no quantity cap is used and it will keep emitting.

func (*ParticlesArcadeEmitter) Flow4O

func (self *ParticlesArcadeEmitter) Flow4O(lifespan int, frequency int, quantity int, total int) *ParticlesArcadeEmitter

Flow4O Call this function to start emitting a flow of particles at the given frequency. It will carry on going until the total given is reached. Each time the flow is run the quantity number of particles will be emitted together. If you set the total to be 20 and quantity to be 5 then flow will emit 4 times in total (4 x 5 = 20 total) If you set the total to be -1 then no quantity cap is used and it will keep emitting.

func (*ParticlesArcadeEmitter) Flow5O

func (self *ParticlesArcadeEmitter) Flow5O(lifespan int, frequency int, quantity int, total int, immediate bool) *ParticlesArcadeEmitter

Flow5O Call this function to start emitting a flow of particles at the given frequency. It will carry on going until the total given is reached. Each time the flow is run the quantity number of particles will be emitted together. If you set the total to be 20 and quantity to be 5 then flow will emit 4 times in total (4 x 5 = 20 total) If you set the total to be -1 then no quantity cap is used and it will keep emitting.

func (*ParticlesArcadeEmitter) FlowI

func (self *ParticlesArcadeEmitter) FlowI(args ...interface{}) *ParticlesArcadeEmitter

FlowI Call this function to start emitting a flow of particles at the given frequency. It will carry on going until the total given is reached. Each time the flow is run the quantity number of particles will be emitted together. If you set the total to be 20 and quantity to be 5 then flow will emit 4 times in total (4 x 5 = 20 total) If you set the total to be -1 then no quantity cap is used and it will keep emitting.

func (*ParticlesArcadeEmitter) ForEach

func (self *ParticlesArcadeEmitter) ForEach(callback interface{}, callbackContext interface{})

ForEach Call a function on each child in this group.

Additional arguments for the callback can be specified after the `checkExists` parameter. For example,

Group.forEach(awardBonusGold, this, true, 100, 500)

would invoke `awardBonusGold` function with the parameters `(child, 100, 500)`.

Note: This check will skip any children which are Groups themselves.

func (*ParticlesArcadeEmitter) ForEach1O

func (self *ParticlesArcadeEmitter) ForEach1O(callback interface{}, callbackContext interface{}, checkExists bool)

ForEach1O Call a function on each child in this group.

Additional arguments for the callback can be specified after the `checkExists` parameter. For example,

Group.forEach(awardBonusGold, this, true, 100, 500)

would invoke `awardBonusGold` function with the parameters `(child, 100, 500)`.

Note: This check will skip any children which are Groups themselves.

func (*ParticlesArcadeEmitter) ForEach2O

func (self *ParticlesArcadeEmitter) ForEach2O(callback interface{}, callbackContext interface{}, checkExists bool, args interface{})

ForEach2O Call a function on each child in this group.

Additional arguments for the callback can be specified after the `checkExists` parameter. For example,

Group.forEach(awardBonusGold, this, true, 100, 500)

would invoke `awardBonusGold` function with the parameters `(child, 100, 500)`.

Note: This check will skip any children which are Groups themselves.

func (*ParticlesArcadeEmitter) ForEachAlive

func (self *ParticlesArcadeEmitter) ForEachAlive(callback interface{}, callbackContext interface{})

ForEachAlive Call a function on each alive child in this group.

See {@link Phaser.Group#forEach forEach} for details.

func (*ParticlesArcadeEmitter) ForEachAlive1O

func (self *ParticlesArcadeEmitter) ForEachAlive1O(callback interface{}, callbackContext interface{}, args interface{})

ForEachAlive1O Call a function on each alive child in this group.

See {@link Phaser.Group#forEach forEach} for details.

func (*ParticlesArcadeEmitter) ForEachAliveI

func (self *ParticlesArcadeEmitter) ForEachAliveI(args ...interface{})

ForEachAliveI Call a function on each alive child in this group.

See {@link Phaser.Group#forEach forEach} for details.

func (*ParticlesArcadeEmitter) ForEachDead

func (self *ParticlesArcadeEmitter) ForEachDead(callback interface{}, callbackContext interface{})

ForEachDead Call a function on each dead child in this group.

See {@link Phaser.Group#forEach forEach} for details.

func (*ParticlesArcadeEmitter) ForEachDead1O

func (self *ParticlesArcadeEmitter) ForEachDead1O(callback interface{}, callbackContext interface{}, args interface{})

ForEachDead1O Call a function on each dead child in this group.

See {@link Phaser.Group#forEach forEach} for details.

func (*ParticlesArcadeEmitter) ForEachDeadI

func (self *ParticlesArcadeEmitter) ForEachDeadI(args ...interface{})

ForEachDeadI Call a function on each dead child in this group.

See {@link Phaser.Group#forEach forEach} for details.

func (*ParticlesArcadeEmitter) ForEachExists

func (self *ParticlesArcadeEmitter) ForEachExists(callback interface{}, callbackContext interface{})

ForEachExists Call a function on each existing child in this group.

See {@link Phaser.Group#forEach forEach} for details.

func (*ParticlesArcadeEmitter) ForEachExists1O

func (self *ParticlesArcadeEmitter) ForEachExists1O(callback interface{}, callbackContext interface{}, args interface{})

ForEachExists1O Call a function on each existing child in this group.

See {@link Phaser.Group#forEach forEach} for details.

func (*ParticlesArcadeEmitter) ForEachExistsI

func (self *ParticlesArcadeEmitter) ForEachExistsI(args ...interface{})

ForEachExistsI Call a function on each existing child in this group.

See {@link Phaser.Group#forEach forEach} for details.

func (*ParticlesArcadeEmitter) ForEachI

func (self *ParticlesArcadeEmitter) ForEachI(args ...interface{})

ForEachI Call a function on each child in this group.

Additional arguments for the callback can be specified after the `checkExists` parameter. For example,

Group.forEach(awardBonusGold, this, true, 100, 500)

would invoke `awardBonusGold` function with the parameters `(child, 100, 500)`.

Note: This check will skip any children which are Groups themselves.

func (*ParticlesArcadeEmitter) Frequency

func (self *ParticlesArcadeEmitter) Frequency() int

Frequency How often a particle is emitted in ms (if emitter is started with Explode === false).

func (*ParticlesArcadeEmitter) Game

func (self *ParticlesArcadeEmitter) Game() *Game

Game A reference to the currently running Game.

func (*ParticlesArcadeEmitter) GetAll

func (self *ParticlesArcadeEmitter) GetAll() interface{}

GetAll Returns all children in this Group.

You can optionally specify a matching criteria using the `property` and `value` arguments.

For example: `getAll('exists', true)` would return only children that have their exists property set.

Optionally you can specify a start and end index. For example if this Group had 100 children, and you set `startIndex` to 0 and `endIndex` to 50, it would return a random child from only the first 50 children in the Group.

func (*ParticlesArcadeEmitter) GetAll1O

func (self *ParticlesArcadeEmitter) GetAll1O(property string) interface{}

GetAll1O Returns all children in this Group.

You can optionally specify a matching criteria using the `property` and `value` arguments.

For example: `getAll('exists', true)` would return only children that have their exists property set.

Optionally you can specify a start and end index. For example if this Group had 100 children, and you set `startIndex` to 0 and `endIndex` to 50, it would return a random child from only the first 50 children in the Group.

func (*ParticlesArcadeEmitter) GetAll2O

func (self *ParticlesArcadeEmitter) GetAll2O(property string, value interface{}) interface{}

GetAll2O Returns all children in this Group.

You can optionally specify a matching criteria using the `property` and `value` arguments.

For example: `getAll('exists', true)` would return only children that have their exists property set.

Optionally you can specify a start and end index. For example if this Group had 100 children, and you set `startIndex` to 0 and `endIndex` to 50, it would return a random child from only the first 50 children in the Group.

func (*ParticlesArcadeEmitter) GetAll3O

func (self *ParticlesArcadeEmitter) GetAll3O(property string, value interface{}, startIndex int) interface{}

GetAll3O Returns all children in this Group.

You can optionally specify a matching criteria using the `property` and `value` arguments.

For example: `getAll('exists', true)` would return only children that have their exists property set.

Optionally you can specify a start and end index. For example if this Group had 100 children, and you set `startIndex` to 0 and `endIndex` to 50, it would return a random child from only the first 50 children in the Group.

func (*ParticlesArcadeEmitter) GetAll4O

func (self *ParticlesArcadeEmitter) GetAll4O(property string, value interface{}, startIndex int, endIndex int) interface{}

GetAll4O Returns all children in this Group.

You can optionally specify a matching criteria using the `property` and `value` arguments.

For example: `getAll('exists', true)` would return only children that have their exists property set.

Optionally you can specify a start and end index. For example if this Group had 100 children, and you set `startIndex` to 0 and `endIndex` to 50, it would return a random child from only the first 50 children in the Group.

func (*ParticlesArcadeEmitter) GetAllI

func (self *ParticlesArcadeEmitter) GetAllI(args ...interface{}) interface{}

GetAllI Returns all children in this Group.

You can optionally specify a matching criteria using the `property` and `value` arguments.

For example: `getAll('exists', true)` would return only children that have their exists property set.

Optionally you can specify a start and end index. For example if this Group had 100 children, and you set `startIndex` to 0 and `endIndex` to 50, it would return a random child from only the first 50 children in the Group.

func (*ParticlesArcadeEmitter) GetAt

func (self *ParticlesArcadeEmitter) GetAt(index int) interface{}

GetAt Returns the child found at the given index within this group.

func (*ParticlesArcadeEmitter) GetAtI

func (self *ParticlesArcadeEmitter) GetAtI(args ...interface{}) interface{}

GetAtI Returns the child found at the given index within this group.

func (*ParticlesArcadeEmitter) GetBottom

func (self *ParticlesArcadeEmitter) GetBottom() interface{}

GetBottom Returns the child at the bottom of this group.

The bottom child the child being displayed (rendered) below every other child.

func (*ParticlesArcadeEmitter) GetBottomI

func (self *ParticlesArcadeEmitter) GetBottomI(args ...interface{}) interface{}

GetBottomI Returns the child at the bottom of this group.

The bottom child the child being displayed (rendered) below every other child.

func (*ParticlesArcadeEmitter) GetBounds

func (self *ParticlesArcadeEmitter) GetBounds() *Rectangle

GetBounds Retrieves the global bounds of the displayObjectContainer as a rectangle. The bounds calculation takes all visible children into consideration.

func (*ParticlesArcadeEmitter) GetBounds1O

func (self *ParticlesArcadeEmitter) GetBounds1O(targetCoordinateSpace interface{}) *Rectangle

GetBounds1O Retrieves the global bounds of the displayObjectContainer as a rectangle. The bounds calculation takes all visible children into consideration.

func (*ParticlesArcadeEmitter) GetBoundsI

func (self *ParticlesArcadeEmitter) GetBoundsI(args ...interface{}) *Rectangle

GetBoundsI Retrieves the global bounds of the displayObjectContainer as a rectangle. The bounds calculation takes all visible children into consideration.

func (*ParticlesArcadeEmitter) GetByName

func (self *ParticlesArcadeEmitter) GetByName(name string) interface{}

GetByName Searches the Group for the first instance of a child with the `name` property matching the given argument. Should more than one child have the same name only the first instance is returned.

func (*ParticlesArcadeEmitter) GetByNameI

func (self *ParticlesArcadeEmitter) GetByNameI(args ...interface{}) interface{}

GetByNameI Searches the Group for the first instance of a child with the `name` property matching the given argument. Should more than one child have the same name only the first instance is returned.

func (*ParticlesArcadeEmitter) GetChildAt

func (self *ParticlesArcadeEmitter) GetChildAt(index int) *DisplayObject

GetChildAt Returns the child at the specified index

func (*ParticlesArcadeEmitter) GetChildAtI

func (self *ParticlesArcadeEmitter) GetChildAtI(args ...interface{}) *DisplayObject

GetChildAtI Returns the child at the specified index

func (*ParticlesArcadeEmitter) GetChildIndex

func (self *ParticlesArcadeEmitter) GetChildIndex(child *DisplayObject) int

GetChildIndex Returns the index position of a child DisplayObject instance

func (*ParticlesArcadeEmitter) GetChildIndexI

func (self *ParticlesArcadeEmitter) GetChildIndexI(args ...interface{}) int

GetChildIndexI Returns the index position of a child DisplayObject instance

func (*ParticlesArcadeEmitter) GetClosestTo

func (self *ParticlesArcadeEmitter) GetClosestTo(object interface{}) interface{}

GetClosestTo Get the closest child to given Object, with optional callback to filter children.

This can be a Sprite, Group, Image or any object with public x and y properties.

'close' is determined by the distance from the objects `x` and `y` properties compared to the childs `x` and `y` properties.

You can use the optional `callback` argument to apply your own filter to the distance checks. If the child is closer then the previous child, it will be sent to `callback` as the first argument, with the distance as the second. The callback should return `true` if it passes your filtering criteria, otherwise it should return `false`.

func (*ParticlesArcadeEmitter) GetClosestTo1O

func (self *ParticlesArcadeEmitter) GetClosestTo1O(object interface{}, callback interface{}) interface{}

GetClosestTo1O Get the closest child to given Object, with optional callback to filter children.

This can be a Sprite, Group, Image or any object with public x and y properties.

'close' is determined by the distance from the objects `x` and `y` properties compared to the childs `x` and `y` properties.

You can use the optional `callback` argument to apply your own filter to the distance checks. If the child is closer then the previous child, it will be sent to `callback` as the first argument, with the distance as the second. The callback should return `true` if it passes your filtering criteria, otherwise it should return `false`.

func (*ParticlesArcadeEmitter) GetClosestTo2O

func (self *ParticlesArcadeEmitter) GetClosestTo2O(object interface{}, callback interface{}, callbackContext interface{}) interface{}

GetClosestTo2O Get the closest child to given Object, with optional callback to filter children.

This can be a Sprite, Group, Image or any object with public x and y properties.

'close' is determined by the distance from the objects `x` and `y` properties compared to the childs `x` and `y` properties.

You can use the optional `callback` argument to apply your own filter to the distance checks. If the child is closer then the previous child, it will be sent to `callback` as the first argument, with the distance as the second. The callback should return `true` if it passes your filtering criteria, otherwise it should return `false`.

func (*ParticlesArcadeEmitter) GetClosestToI

func (self *ParticlesArcadeEmitter) GetClosestToI(args ...interface{}) interface{}

GetClosestToI Get the closest child to given Object, with optional callback to filter children.

This can be a Sprite, Group, Image or any object with public x and y properties.

'close' is determined by the distance from the objects `x` and `y` properties compared to the childs `x` and `y` properties.

You can use the optional `callback` argument to apply your own filter to the distance checks. If the child is closer then the previous child, it will be sent to `callback` as the first argument, with the distance as the second. The callback should return `true` if it passes your filtering criteria, otherwise it should return `false`.

func (*ParticlesArcadeEmitter) GetFirstAlive

func (self *ParticlesArcadeEmitter) GetFirstAlive() *DisplayObject

GetFirstAlive Get the first child that is alive (`child.alive === true`).

This is handy for choosing a squad leader, etc.

You can use the optional argument `createIfNull` to create a new Game Object if no alive ones were found in this Group.

It works by calling `Group.create` passing it the parameters given to this method, and returning the new child.

If a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child will be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.

func (*ParticlesArcadeEmitter) GetFirstAlive1O

func (self *ParticlesArcadeEmitter) GetFirstAlive1O(createIfNull bool) *DisplayObject

GetFirstAlive1O Get the first child that is alive (`child.alive === true`).

This is handy for choosing a squad leader, etc.

You can use the optional argument `createIfNull` to create a new Game Object if no alive ones were found in this Group.

It works by calling `Group.create` passing it the parameters given to this method, and returning the new child.

If a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child will be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.

func (*ParticlesArcadeEmitter) GetFirstAlive2O

func (self *ParticlesArcadeEmitter) GetFirstAlive2O(createIfNull bool, x int) *DisplayObject

GetFirstAlive2O Get the first child that is alive (`child.alive === true`).

This is handy for choosing a squad leader, etc.

You can use the optional argument `createIfNull` to create a new Game Object if no alive ones were found in this Group.

It works by calling `Group.create` passing it the parameters given to this method, and returning the new child.

If a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child will be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.

func (*ParticlesArcadeEmitter) GetFirstAlive3O

func (self *ParticlesArcadeEmitter) GetFirstAlive3O(createIfNull bool, x int, y int) *DisplayObject

GetFirstAlive3O Get the first child that is alive (`child.alive === true`).

This is handy for choosing a squad leader, etc.

You can use the optional argument `createIfNull` to create a new Game Object if no alive ones were found in this Group.

It works by calling `Group.create` passing it the parameters given to this method, and returning the new child.

If a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child will be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.

func (*ParticlesArcadeEmitter) GetFirstAlive4O

func (self *ParticlesArcadeEmitter) GetFirstAlive4O(createIfNull bool, x int, y int, key interface{}) *DisplayObject

GetFirstAlive4O Get the first child that is alive (`child.alive === true`).

This is handy for choosing a squad leader, etc.

You can use the optional argument `createIfNull` to create a new Game Object if no alive ones were found in this Group.

It works by calling `Group.create` passing it the parameters given to this method, and returning the new child.

If a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child will be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.

func (*ParticlesArcadeEmitter) GetFirstAlive5O

func (self *ParticlesArcadeEmitter) GetFirstAlive5O(createIfNull bool, x int, y int, key interface{}, frame interface{}) *DisplayObject

GetFirstAlive5O Get the first child that is alive (`child.alive === true`).

This is handy for choosing a squad leader, etc.

You can use the optional argument `createIfNull` to create a new Game Object if no alive ones were found in this Group.

It works by calling `Group.create` passing it the parameters given to this method, and returning the new child.

If a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child will be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.

func (*ParticlesArcadeEmitter) GetFirstAliveI

func (self *ParticlesArcadeEmitter) GetFirstAliveI(args ...interface{}) *DisplayObject

GetFirstAliveI Get the first child that is alive (`child.alive === true`).

This is handy for choosing a squad leader, etc.

You can use the optional argument `createIfNull` to create a new Game Object if no alive ones were found in this Group.

It works by calling `Group.create` passing it the parameters given to this method, and returning the new child.

If a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child will be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.

func (*ParticlesArcadeEmitter) GetFirstDead

func (self *ParticlesArcadeEmitter) GetFirstDead() *DisplayObject

GetFirstDead Get the first child that is dead (`child.alive === false`).

This is handy for checking if everything has been wiped out and adding to the pool as needed.

You can use the optional argument `createIfNull` to create a new Game Object if no dead ones were found in this Group.

It works by calling `Group.create` passing it the parameters given to this method, and returning the new child.

If a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child will be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.

func (*ParticlesArcadeEmitter) GetFirstDead1O

func (self *ParticlesArcadeEmitter) GetFirstDead1O(createIfNull bool) *DisplayObject

GetFirstDead1O Get the first child that is dead (`child.alive === false`).

This is handy for checking if everything has been wiped out and adding to the pool as needed.

You can use the optional argument `createIfNull` to create a new Game Object if no dead ones were found in this Group.

It works by calling `Group.create` passing it the parameters given to this method, and returning the new child.

If a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child will be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.

func (*ParticlesArcadeEmitter) GetFirstDead2O

func (self *ParticlesArcadeEmitter) GetFirstDead2O(createIfNull bool, x int) *DisplayObject

GetFirstDead2O Get the first child that is dead (`child.alive === false`).

This is handy for checking if everything has been wiped out and adding to the pool as needed.

You can use the optional argument `createIfNull` to create a new Game Object if no dead ones were found in this Group.

It works by calling `Group.create` passing it the parameters given to this method, and returning the new child.

If a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child will be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.

func (*ParticlesArcadeEmitter) GetFirstDead3O

func (self *ParticlesArcadeEmitter) GetFirstDead3O(createIfNull bool, x int, y int) *DisplayObject

GetFirstDead3O Get the first child that is dead (`child.alive === false`).

This is handy for checking if everything has been wiped out and adding to the pool as needed.

You can use the optional argument `createIfNull` to create a new Game Object if no dead ones were found in this Group.

It works by calling `Group.create` passing it the parameters given to this method, and returning the new child.

If a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child will be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.

func (*ParticlesArcadeEmitter) GetFirstDead4O

func (self *ParticlesArcadeEmitter) GetFirstDead4O(createIfNull bool, x int, y int, key interface{}) *DisplayObject

GetFirstDead4O Get the first child that is dead (`child.alive === false`).

This is handy for checking if everything has been wiped out and adding to the pool as needed.

You can use the optional argument `createIfNull` to create a new Game Object if no dead ones were found in this Group.

It works by calling `Group.create` passing it the parameters given to this method, and returning the new child.

If a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child will be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.

func (*ParticlesArcadeEmitter) GetFirstDead5O

func (self *ParticlesArcadeEmitter) GetFirstDead5O(createIfNull bool, x int, y int, key interface{}, frame interface{}) *DisplayObject

GetFirstDead5O Get the first child that is dead (`child.alive === false`).

This is handy for checking if everything has been wiped out and adding to the pool as needed.

You can use the optional argument `createIfNull` to create a new Game Object if no dead ones were found in this Group.

It works by calling `Group.create` passing it the parameters given to this method, and returning the new child.

If a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child will be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.

func (*ParticlesArcadeEmitter) GetFirstDeadI

func (self *ParticlesArcadeEmitter) GetFirstDeadI(args ...interface{}) *DisplayObject

GetFirstDeadI Get the first child that is dead (`child.alive === false`).

This is handy for checking if everything has been wiped out and adding to the pool as needed.

You can use the optional argument `createIfNull` to create a new Game Object if no dead ones were found in this Group.

It works by calling `Group.create` passing it the parameters given to this method, and returning the new child.

If a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child will be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.

func (*ParticlesArcadeEmitter) GetFirstExists

func (self *ParticlesArcadeEmitter) GetFirstExists() *DisplayObject

GetFirstExists Get the first display object that exists, or doesn't exist.

You can use the optional argument `createIfNull` to create a new Game Object if none matching your exists argument were found in this Group.

It works by calling `Group.create` passing it the parameters given to this method, and returning the new child.

If a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child will be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.

func (*ParticlesArcadeEmitter) GetFirstExists1O

func (self *ParticlesArcadeEmitter) GetFirstExists1O(exists bool) *DisplayObject

GetFirstExists1O Get the first display object that exists, or doesn't exist.

You can use the optional argument `createIfNull` to create a new Game Object if none matching your exists argument were found in this Group.

It works by calling `Group.create` passing it the parameters given to this method, and returning the new child.

If a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child will be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.

func (*ParticlesArcadeEmitter) GetFirstExists2O

func (self *ParticlesArcadeEmitter) GetFirstExists2O(exists bool, createIfNull bool) *DisplayObject

GetFirstExists2O Get the first display object that exists, or doesn't exist.

You can use the optional argument `createIfNull` to create a new Game Object if none matching your exists argument were found in this Group.

It works by calling `Group.create` passing it the parameters given to this method, and returning the new child.

If a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child will be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.

func (*ParticlesArcadeEmitter) GetFirstExists3O

func (self *ParticlesArcadeEmitter) GetFirstExists3O(exists bool, createIfNull bool, x int) *DisplayObject

GetFirstExists3O Get the first display object that exists, or doesn't exist.

You can use the optional argument `createIfNull` to create a new Game Object if none matching your exists argument were found in this Group.

It works by calling `Group.create` passing it the parameters given to this method, and returning the new child.

If a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child will be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.

func (*ParticlesArcadeEmitter) GetFirstExists4O

func (self *ParticlesArcadeEmitter) GetFirstExists4O(exists bool, createIfNull bool, x int, y int) *DisplayObject

GetFirstExists4O Get the first display object that exists, or doesn't exist.

You can use the optional argument `createIfNull` to create a new Game Object if none matching your exists argument were found in this Group.

It works by calling `Group.create` passing it the parameters given to this method, and returning the new child.

If a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child will be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.

func (*ParticlesArcadeEmitter) GetFirstExists5O

func (self *ParticlesArcadeEmitter) GetFirstExists5O(exists bool, createIfNull bool, x int, y int, key interface{}) *DisplayObject

GetFirstExists5O Get the first display object that exists, or doesn't exist.

You can use the optional argument `createIfNull` to create a new Game Object if none matching your exists argument were found in this Group.

It works by calling `Group.create` passing it the parameters given to this method, and returning the new child.

If a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child will be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.

func (*ParticlesArcadeEmitter) GetFirstExists6O

func (self *ParticlesArcadeEmitter) GetFirstExists6O(exists bool, createIfNull bool, x int, y int, key interface{}, frame interface{}) *DisplayObject

GetFirstExists6O Get the first display object that exists, or doesn't exist.

You can use the optional argument `createIfNull` to create a new Game Object if none matching your exists argument were found in this Group.

It works by calling `Group.create` passing it the parameters given to this method, and returning the new child.

If a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child will be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.

func (*ParticlesArcadeEmitter) GetFirstExistsI

func (self *ParticlesArcadeEmitter) GetFirstExistsI(args ...interface{}) *DisplayObject

GetFirstExistsI Get the first display object that exists, or doesn't exist.

You can use the optional argument `createIfNull` to create a new Game Object if none matching your exists argument were found in this Group.

It works by calling `Group.create` passing it the parameters given to this method, and returning the new child.

If a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child will be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.

func (*ParticlesArcadeEmitter) GetFurthestFrom

func (self *ParticlesArcadeEmitter) GetFurthestFrom(object interface{}) interface{}

GetFurthestFrom Get the child furthest away from the given Object, with optional callback to filter children.

This can be a Sprite, Group, Image or any object with public x and y properties.

'furthest away' is determined by the distance from the objects `x` and `y` properties compared to the childs `x` and `y` properties.

You can use the optional `callback` argument to apply your own filter to the distance checks. If the child is closer then the previous child, it will be sent to `callback` as the first argument, with the distance as the second. The callback should return `true` if it passes your filtering criteria, otherwise it should return `false`.

func (*ParticlesArcadeEmitter) GetFurthestFrom1O

func (self *ParticlesArcadeEmitter) GetFurthestFrom1O(object interface{}, callback interface{}) interface{}

GetFurthestFrom1O Get the child furthest away from the given Object, with optional callback to filter children.

This can be a Sprite, Group, Image or any object with public x and y properties.

'furthest away' is determined by the distance from the objects `x` and `y` properties compared to the childs `x` and `y` properties.

You can use the optional `callback` argument to apply your own filter to the distance checks. If the child is closer then the previous child, it will be sent to `callback` as the first argument, with the distance as the second. The callback should return `true` if it passes your filtering criteria, otherwise it should return `false`.

func (*ParticlesArcadeEmitter) GetFurthestFrom2O

func (self *ParticlesArcadeEmitter) GetFurthestFrom2O(object interface{}, callback interface{}, callbackContext interface{}) interface{}

GetFurthestFrom2O Get the child furthest away from the given Object, with optional callback to filter children.

This can be a Sprite, Group, Image or any object with public x and y properties.

'furthest away' is determined by the distance from the objects `x` and `y` properties compared to the childs `x` and `y` properties.

You can use the optional `callback` argument to apply your own filter to the distance checks. If the child is closer then the previous child, it will be sent to `callback` as the first argument, with the distance as the second. The callback should return `true` if it passes your filtering criteria, otherwise it should return `false`.

func (*ParticlesArcadeEmitter) GetFurthestFromI

func (self *ParticlesArcadeEmitter) GetFurthestFromI(args ...interface{}) interface{}

GetFurthestFromI Get the child furthest away from the given Object, with optional callback to filter children.

This can be a Sprite, Group, Image or any object with public x and y properties.

'furthest away' is determined by the distance from the objects `x` and `y` properties compared to the childs `x` and `y` properties.

You can use the optional `callback` argument to apply your own filter to the distance checks. If the child is closer then the previous child, it will be sent to `callback` as the first argument, with the distance as the second. The callback should return `true` if it passes your filtering criteria, otherwise it should return `false`.

func (*ParticlesArcadeEmitter) GetIndex

func (self *ParticlesArcadeEmitter) GetIndex(child interface{}) int

GetIndex Get the index position of the given child in this group, which should match the child's `z` property.

func (*ParticlesArcadeEmitter) GetIndexI

func (self *ParticlesArcadeEmitter) GetIndexI(args ...interface{}) int

GetIndexI Get the index position of the given child in this group, which should match the child's `z` property.

func (*ParticlesArcadeEmitter) GetLocalBounds

func (self *ParticlesArcadeEmitter) GetLocalBounds() *Rectangle

GetLocalBounds Retrieves the non-global local bounds of the displayObjectContainer as a rectangle without any transformations. The calculation takes all visible children into consideration.

func (*ParticlesArcadeEmitter) GetLocalBoundsI

func (self *ParticlesArcadeEmitter) GetLocalBoundsI(args ...interface{}) *Rectangle

GetLocalBoundsI Retrieves the non-global local bounds of the displayObjectContainer as a rectangle without any transformations. The calculation takes all visible children into consideration.

func (*ParticlesArcadeEmitter) GetRandom

func (self *ParticlesArcadeEmitter) GetRandom() interface{}

GetRandom Returns a random child from the group.

func (*ParticlesArcadeEmitter) GetRandom1O

func (self *ParticlesArcadeEmitter) GetRandom1O(startIndex int) interface{}

GetRandom1O Returns a random child from the group.

func (*ParticlesArcadeEmitter) GetRandom2O

func (self *ParticlesArcadeEmitter) GetRandom2O(startIndex int, length int) interface{}

GetRandom2O Returns a random child from the group.

func (*ParticlesArcadeEmitter) GetRandomExists

func (self *ParticlesArcadeEmitter) GetRandomExists() interface{}

GetRandomExists Returns a random child from the Group that has `exists` set to `true`.

Optionally you can specify a start and end index. For example if this Group had 100 children, and you set `startIndex` to 0 and `endIndex` to 50, it would return a random child from only the first 50 children in the Group.

func (*ParticlesArcadeEmitter) GetRandomExists1O

func (self *ParticlesArcadeEmitter) GetRandomExists1O(startIndex int) interface{}

GetRandomExists1O Returns a random child from the Group that has `exists` set to `true`.

Optionally you can specify a start and end index. For example if this Group had 100 children, and you set `startIndex` to 0 and `endIndex` to 50, it would return a random child from only the first 50 children in the Group.

func (*ParticlesArcadeEmitter) GetRandomExists2O

func (self *ParticlesArcadeEmitter) GetRandomExists2O(startIndex int, endIndex int) interface{}

GetRandomExists2O Returns a random child from the Group that has `exists` set to `true`.

Optionally you can specify a start and end index. For example if this Group had 100 children, and you set `startIndex` to 0 and `endIndex` to 50, it would return a random child from only the first 50 children in the Group.

func (*ParticlesArcadeEmitter) GetRandomExistsI

func (self *ParticlesArcadeEmitter) GetRandomExistsI(args ...interface{}) interface{}

GetRandomExistsI Returns a random child from the Group that has `exists` set to `true`.

Optionally you can specify a start and end index. For example if this Group had 100 children, and you set `startIndex` to 0 and `endIndex` to 50, it would return a random child from only the first 50 children in the Group.

func (*ParticlesArcadeEmitter) GetRandomI

func (self *ParticlesArcadeEmitter) GetRandomI(args ...interface{}) interface{}

GetRandomI Returns a random child from the group.

func (*ParticlesArcadeEmitter) GetTop

func (self *ParticlesArcadeEmitter) GetTop() interface{}

GetTop Return the child at the top of this group.

The top child is the child displayed (rendered) above every other child.

func (*ParticlesArcadeEmitter) GetTopI

func (self *ParticlesArcadeEmitter) GetTopI(args ...interface{}) interface{}

GetTopI Return the child at the top of this group.

The top child is the child displayed (rendered) above every other child.

func (*ParticlesArcadeEmitter) Gravity

func (self *ParticlesArcadeEmitter) Gravity() int

Gravity Sets the `body.gravity.y` of each particle sprite to this value on launch.

func (*ParticlesArcadeEmitter) HasProperty

func (self *ParticlesArcadeEmitter) HasProperty(child interface{}, key []string) bool

HasProperty Checks if the child has the given property.

Will scan up to 4 levels deep only.

func (*ParticlesArcadeEmitter) HasPropertyI

func (self *ParticlesArcadeEmitter) HasPropertyI(args ...interface{}) bool

HasPropertyI Checks if the child has the given property.

Will scan up to 4 levels deep only.

func (*ParticlesArcadeEmitter) Hash

func (self *ParticlesArcadeEmitter) Hash() []interface{}

Hash The hash array is an array belonging to this Group into which you can add any of its children via Group.addToHash and Group.removeFromHash.

Only children of this Group can be added to and removed from the hash.

This hash is used automatically by Phaser Arcade Physics in order to perform non z-index based destructive sorting. However if you don't use Arcade Physics, or this isn't a physics enabled Group, then you can use the hash to perform your own sorting and filtering of Group children without touching their z-index (and therefore display draw order)

func (*ParticlesArcadeEmitter) Height

func (self *ParticlesArcadeEmitter) Height() int

Height Gets or sets the height of the Emitter. This is the region in which a particle can be emitted.

func (*ParticlesArcadeEmitter) IgnoreChildInput

func (self *ParticlesArcadeEmitter) IgnoreChildInput() bool

IgnoreChildInput If `ignoreChildInput` is `false` it will allow this objects _children_ to be considered as valid for Input events.

If this property is `true` then the children will _not_ be considered as valid for Input events.

Note that this property isn't recursive: only immediate children are influenced, it doesn't scan further down.

func (*ParticlesArcadeEmitter) IgnoreDestroy

func (self *ParticlesArcadeEmitter) IgnoreDestroy() bool

IgnoreDestroy A group with `ignoreDestroy` set to `true` ignores all calls to its `destroy` method.

func (*ParticlesArcadeEmitter) InputEnableChildren

func (self *ParticlesArcadeEmitter) InputEnableChildren() bool

InputEnableChildren A Group with `inputEnableChildren` set to `true` will automatically call `inputEnabled = true` on any children _added_ to, or _created by_, this Group.

If there are children already in the Group at the time you set this property, they are not changed.

func (*ParticlesArcadeEmitter) Iterate

func (self *ParticlesArcadeEmitter) Iterate(key string, value interface{}, returnType int) interface{}

Iterate Iterates over the children of the group performing one of several actions for matched children.

A child is considered a match when it has a property, named `key`, whose value is equal to `value` according to a strict equality comparison.

The result depends on the `returnType`:

  • {@link Phaser.Group.RETURN_TOTAL RETURN_TOTAL}: The callback, if any, is applied to all matching children. The number of matched children is returned.
  • {@link Phaser.Group.RETURN_NONE RETURN_NONE}: The callback, if any, is applied to all matching children. No value is returned.
  • {@link Phaser.Group.RETURN_CHILD RETURN_CHILD}: The callback, if any, is applied to the *first* matching child and the *first* matched child is returned. If there is no matching child then null is returned.

If `args` is specified it must be an array. The matched child will be assigned to the first element and the entire array will be applied to the callback function.

func (*ParticlesArcadeEmitter) Iterate1O

func (self *ParticlesArcadeEmitter) Iterate1O(key string, value interface{}, returnType int, callback interface{}) interface{}

Iterate1O Iterates over the children of the group performing one of several actions for matched children.

A child is considered a match when it has a property, named `key`, whose value is equal to `value` according to a strict equality comparison.

The result depends on the `returnType`:

  • {@link Phaser.Group.RETURN_TOTAL RETURN_TOTAL}: The callback, if any, is applied to all matching children. The number of matched children is returned.
  • {@link Phaser.Group.RETURN_NONE RETURN_NONE}: The callback, if any, is applied to all matching children. No value is returned.
  • {@link Phaser.Group.RETURN_CHILD RETURN_CHILD}: The callback, if any, is applied to the *first* matching child and the *first* matched child is returned. If there is no matching child then null is returned.

If `args` is specified it must be an array. The matched child will be assigned to the first element and the entire array will be applied to the callback function.

func (*ParticlesArcadeEmitter) Iterate2O

func (self *ParticlesArcadeEmitter) Iterate2O(key string, value interface{}, returnType int, callback interface{}, callbackContext interface{}) interface{}

Iterate2O Iterates over the children of the group performing one of several actions for matched children.

A child is considered a match when it has a property, named `key`, whose value is equal to `value` according to a strict equality comparison.

The result depends on the `returnType`:

  • {@link Phaser.Group.RETURN_TOTAL RETURN_TOTAL}: The callback, if any, is applied to all matching children. The number of matched children is returned.
  • {@link Phaser.Group.RETURN_NONE RETURN_NONE}: The callback, if any, is applied to all matching children. No value is returned.
  • {@link Phaser.Group.RETURN_CHILD RETURN_CHILD}: The callback, if any, is applied to the *first* matching child and the *first* matched child is returned. If there is no matching child then null is returned.

If `args` is specified it must be an array. The matched child will be assigned to the first element and the entire array will be applied to the callback function.

func (*ParticlesArcadeEmitter) Iterate3O

func (self *ParticlesArcadeEmitter) Iterate3O(key string, value interface{}, returnType int, callback interface{}, callbackContext interface{}, args []interface{}) interface{}

Iterate3O Iterates over the children of the group performing one of several actions for matched children.

A child is considered a match when it has a property, named `key`, whose value is equal to `value` according to a strict equality comparison.

The result depends on the `returnType`:

  • {@link Phaser.Group.RETURN_TOTAL RETURN_TOTAL}: The callback, if any, is applied to all matching children. The number of matched children is returned.
  • {@link Phaser.Group.RETURN_NONE RETURN_NONE}: The callback, if any, is applied to all matching children. No value is returned.
  • {@link Phaser.Group.RETURN_CHILD RETURN_CHILD}: The callback, if any, is applied to the *first* matching child and the *first* matched child is returned. If there is no matching child then null is returned.

If `args` is specified it must be an array. The matched child will be assigned to the first element and the entire array will be applied to the callback function.

func (*ParticlesArcadeEmitter) IterateI

func (self *ParticlesArcadeEmitter) IterateI(args ...interface{}) interface{}

IterateI Iterates over the children of the group performing one of several actions for matched children.

A child is considered a match when it has a property, named `key`, whose value is equal to `value` according to a strict equality comparison.

The result depends on the `returnType`:

  • {@link Phaser.Group.RETURN_TOTAL RETURN_TOTAL}: The callback, if any, is applied to all matching children. The number of matched children is returned.
  • {@link Phaser.Group.RETURN_NONE RETURN_NONE}: The callback, if any, is applied to all matching children. No value is returned.
  • {@link Phaser.Group.RETURN_CHILD RETURN_CHILD}: The callback, if any, is applied to the *first* matching child and the *first* matched child is returned. If there is no matching child then null is returned.

If `args` is specified it must be an array. The matched child will be assigned to the first element and the entire array will be applied to the callback function.

func (*ParticlesArcadeEmitter) Kill

Kill Call this function to turn off all the particles and the emitter.

func (*ParticlesArcadeEmitter) KillI

func (self *ParticlesArcadeEmitter) KillI(args ...interface{}) *ParticlesArcadeEmitter

KillI Call this function to turn off all the particles and the emitter.

func (*ParticlesArcadeEmitter) Left

func (self *ParticlesArcadeEmitter) Left() int

Left Gets the left position of the Emitter.

func (*ParticlesArcadeEmitter) Length

func (self *ParticlesArcadeEmitter) Length() int

Length Total number of children in this group, regardless of exists/alive status.

func (*ParticlesArcadeEmitter) Lifespan

func (self *ParticlesArcadeEmitter) Lifespan() int

Lifespan How long each particle lives once it is emitted in ms. Default is 2 seconds. Set lifespan to 'zero' for particles to live forever.

func (*ParticlesArcadeEmitter) MakeParticles

func (self *ParticlesArcadeEmitter) MakeParticles(keys interface{}) *ParticlesArcadeEmitter

MakeParticles This function generates a new set of particles for use by this emitter. The particles are stored internally waiting to be emitted via Emitter.start.

func (*ParticlesArcadeEmitter) MakeParticles1O

func (self *ParticlesArcadeEmitter) MakeParticles1O(keys interface{}, frames interface{}) *ParticlesArcadeEmitter

MakeParticles1O This function generates a new set of particles for use by this emitter. The particles are stored internally waiting to be emitted via Emitter.start.

func (*ParticlesArcadeEmitter) MakeParticles2O

func (self *ParticlesArcadeEmitter) MakeParticles2O(keys interface{}, frames interface{}, quantity int) *ParticlesArcadeEmitter

MakeParticles2O This function generates a new set of particles for use by this emitter. The particles are stored internally waiting to be emitted via Emitter.start.

func (*ParticlesArcadeEmitter) MakeParticles3O

func (self *ParticlesArcadeEmitter) MakeParticles3O(keys interface{}, frames interface{}, quantity int, collide bool) *ParticlesArcadeEmitter

MakeParticles3O This function generates a new set of particles for use by this emitter. The particles are stored internally waiting to be emitted via Emitter.start.

func (*ParticlesArcadeEmitter) MakeParticles4O

func (self *ParticlesArcadeEmitter) MakeParticles4O(keys interface{}, frames interface{}, quantity int, collide bool, collideWorldBounds bool) *ParticlesArcadeEmitter

MakeParticles4O This function generates a new set of particles for use by this emitter. The particles are stored internally waiting to be emitted via Emitter.start.

func (*ParticlesArcadeEmitter) MakeParticlesI

func (self *ParticlesArcadeEmitter) MakeParticlesI(args ...interface{}) *ParticlesArcadeEmitter

MakeParticlesI This function generates a new set of particles for use by this emitter. The particles are stored internally waiting to be emitted via Emitter.start.

func (*ParticlesArcadeEmitter) MaxParticleAlpha

func (self *ParticlesArcadeEmitter) MaxParticleAlpha() int

MaxParticleAlpha The maximum possible alpha value of a particle.

func (*ParticlesArcadeEmitter) MaxParticleScale

func (self *ParticlesArcadeEmitter) MaxParticleScale() int

MaxParticleScale The maximum possible scale of a particle. This is applied to the X and Y axis. If you need to control each axis see maxParticleScaleX.

func (*ParticlesArcadeEmitter) MaxParticleSpeed

func (self *ParticlesArcadeEmitter) MaxParticleSpeed() *Point

MaxParticleSpeed The maximum possible velocity of a particle.

func (*ParticlesArcadeEmitter) MaxParticles

func (self *ParticlesArcadeEmitter) MaxParticles() int

MaxParticles The total number of particles in this emitter.

func (*ParticlesArcadeEmitter) MaxRotation

func (self *ParticlesArcadeEmitter) MaxRotation() int

MaxRotation The maximum possible angular velocity of a particle.

func (*ParticlesArcadeEmitter) MinParticleAlpha

func (self *ParticlesArcadeEmitter) MinParticleAlpha() int

MinParticleAlpha The minimum possible alpha value of a particle.

func (*ParticlesArcadeEmitter) MinParticleScale

func (self *ParticlesArcadeEmitter) MinParticleScale() int

MinParticleScale The minimum possible scale of a particle. This is applied to the X and Y axis. If you need to control each axis see minParticleScaleX.

func (*ParticlesArcadeEmitter) MinParticleSpeed

func (self *ParticlesArcadeEmitter) MinParticleSpeed() *Point

MinParticleSpeed The minimum possible velocity of a particle.

func (*ParticlesArcadeEmitter) MinRotation

func (self *ParticlesArcadeEmitter) MinRotation() int

MinRotation The minimum possible angular velocity of a particle.

func (*ParticlesArcadeEmitter) MoveAll

func (self *ParticlesArcadeEmitter) MoveAll(group *Group) *Group

MoveAll Moves all children from this Group to the Group given.

func (*ParticlesArcadeEmitter) MoveAll1O

func (self *ParticlesArcadeEmitter) MoveAll1O(group *Group, silent bool) *Group

MoveAll1O Moves all children from this Group to the Group given.

func (*ParticlesArcadeEmitter) MoveAllI

func (self *ParticlesArcadeEmitter) MoveAllI(args ...interface{}) *Group

MoveAllI Moves all children from this Group to the Group given.

func (*ParticlesArcadeEmitter) MoveDown

func (self *ParticlesArcadeEmitter) MoveDown(child interface{}) interface{}

MoveDown Moves the given child down one place in this group unless it's already at the bottom.

func (*ParticlesArcadeEmitter) MoveDownI

func (self *ParticlesArcadeEmitter) MoveDownI(args ...interface{}) interface{}

MoveDownI Moves the given child down one place in this group unless it's already at the bottom.

func (*ParticlesArcadeEmitter) MoveUp

func (self *ParticlesArcadeEmitter) MoveUp(child interface{}) interface{}

MoveUp Moves the given child up one place in this group unless it's already at the top.

func (*ParticlesArcadeEmitter) MoveUpI

func (self *ParticlesArcadeEmitter) MoveUpI(args ...interface{}) interface{}

MoveUpI Moves the given child up one place in this group unless it's already at the top.

func (*ParticlesArcadeEmitter) MultiplyAll

func (self *ParticlesArcadeEmitter) MultiplyAll(property string, amount int, checkAlive bool, checkVisible bool)

MultiplyAll Multiplies the given property by the amount on all children in this group.

`Group.multiplyAll('x', 2)` will x2 the child.x value for each child.

func (*ParticlesArcadeEmitter) MultiplyAllI

func (self *ParticlesArcadeEmitter) MultiplyAllI(args ...interface{})

MultiplyAllI Multiplies the given property by the amount on all children in this group.

`Group.multiplyAll('x', 2)` will x2 the child.x value for each child.

func (*ParticlesArcadeEmitter) Name

func (self *ParticlesArcadeEmitter) Name() string

Name A handy string name for this emitter. Can be set to anything.

func (*ParticlesArcadeEmitter) Next

func (self *ParticlesArcadeEmitter) Next() interface{}

Next Advances the group cursor to the next (higher) object in the group.

If the cursor is at the end of the group (top child) it is moved the start of the group (bottom child).

func (*ParticlesArcadeEmitter) NextI

func (self *ParticlesArcadeEmitter) NextI(args ...interface{}) interface{}

NextI Advances the group cursor to the next (higher) object in the group.

If the cursor is at the end of the group (top child) it is moved the start of the group (bottom child).

func (*ParticlesArcadeEmitter) On

func (self *ParticlesArcadeEmitter) On() bool

On Determines whether the emitter is currently emitting particles. It is totally safe to directly toggle this.

func (*ParticlesArcadeEmitter) OnChildInputDown

func (self *ParticlesArcadeEmitter) OnChildInputDown() *Signal

OnChildInputDown This Signal is dispatched whenever a child of this Group emits an onInputDown signal as a result of having been interacted with by a Pointer. You can bind functions to this Signal instead of to every child Sprite.

This Signal is sent 2 arguments: A reference to the Sprite that triggered the signal, and a reference to the Pointer that caused it.

func (*ParticlesArcadeEmitter) OnChildInputOut

func (self *ParticlesArcadeEmitter) OnChildInputOut() *Signal

OnChildInputOut This Signal is dispatched whenever a child of this Group emits an onInputOut signal as a result of having been interacted with by a Pointer. You can bind functions to this Signal instead of to every child Sprite.

This Signal is sent 2 arguments: A reference to the Sprite that triggered the signal, and a reference to the Pointer that caused it.

func (*ParticlesArcadeEmitter) OnChildInputOver

func (self *ParticlesArcadeEmitter) OnChildInputOver() *Signal

OnChildInputOver This Signal is dispatched whenever a child of this Group emits an onInputOver signal as a result of having been interacted with by a Pointer. You can bind functions to this Signal instead of to every child Sprite.

This Signal is sent 2 arguments: A reference to the Sprite that triggered the signal, and a reference to the Pointer that caused it.

func (*ParticlesArcadeEmitter) OnChildInputUp

func (self *ParticlesArcadeEmitter) OnChildInputUp() *Signal

OnChildInputUp This Signal is dispatched whenever a child of this Group emits an onInputUp signal as a result of having been interacted with by a Pointer. You can bind functions to this Signal instead of to every child Sprite.

This Signal is sent 3 arguments: A reference to the Sprite that triggered the signal, a reference to the Pointer that caused it, and a boolean value `isOver` that tells you if the Pointer is still over the Sprite or not.

func (*ParticlesArcadeEmitter) OnDestroy

func (self *ParticlesArcadeEmitter) OnDestroy() *Signal

OnDestroy This signal is dispatched when the group is destroyed.

func (*ParticlesArcadeEmitter) ParticleAnchor

func (self *ParticlesArcadeEmitter) ParticleAnchor() *Point

ParticleAnchor When a particle is created its anchor will be set to match this Point object (defaults to x/y: 0.5 to aid in rotation)

func (*ParticlesArcadeEmitter) ParticleBringToTop

func (self *ParticlesArcadeEmitter) ParticleBringToTop() bool

ParticleBringToTop If this is `true` then when the Particle is emitted it will be bought to the top of the Emitters display list.

func (*ParticlesArcadeEmitter) ParticleClass

func (self *ParticlesArcadeEmitter) ParticleClass() interface{}

ParticleClass For emitting your own particle class types. They must extend Phaser.Particle.

func (*ParticlesArcadeEmitter) ParticleDrag

func (self *ParticlesArcadeEmitter) ParticleDrag() *Point

ParticleDrag The X and Y drag component of particles launched from the emitter.

func (*ParticlesArcadeEmitter) ParticleSendToBack

func (self *ParticlesArcadeEmitter) ParticleSendToBack() bool

ParticleSendToBack If this is `true` then when the Particle is emitted it will be sent to the back of the Emitters display list.

func (*ParticlesArcadeEmitter) PendingDestroy

func (self *ParticlesArcadeEmitter) PendingDestroy() bool

PendingDestroy A Group is that has `pendingDestroy` set to `true` is flagged to have its destroy method called on the next logic update. You can set it directly to flag the Group to be destroyed on its next update.

This is extremely useful if you wish to destroy a Group from within one of its own callbacks or a callback of one of its children.

func (*ParticlesArcadeEmitter) PhysicsBodyType

func (self *ParticlesArcadeEmitter) PhysicsBodyType() int

PhysicsBodyType If {@link Phaser.Group#enableBody enableBody} is true this is the type of physics body that is created on new Sprites.

The valid values are {@link Phaser.Physics.ARCADE}, {@link Phaser.Physics.P2JS}, {@link Phaser.Physics.NINJA}, etc.

func (*ParticlesArcadeEmitter) PhysicsSortDirection

func (self *ParticlesArcadeEmitter) PhysicsSortDirection() int

PhysicsSortDirection If this Group contains Arcade Physics Sprites you can set a custom sort direction via this property.

It should be set to one of the Phaser.Physics.Arcade sort direction constants:

Phaser.Physics.Arcade.SORT_NONE Phaser.Physics.Arcade.LEFT_RIGHT Phaser.Physics.Arcade.RIGHT_LEFT Phaser.Physics.Arcade.TOP_BOTTOM Phaser.Physics.Arcade.BOTTOM_TOP

If set to `null` the Group will use whatever Phaser.Physics.Arcade.sortDirection is set to. This is the default behavior.

func (*ParticlesArcadeEmitter) PhysicsType

func (self *ParticlesArcadeEmitter) PhysicsType() int

PhysicsType The const physics body type of this object.

func (*ParticlesArcadeEmitter) PostUpdate

func (self *ParticlesArcadeEmitter) PostUpdate()

PostUpdate The core postUpdate - as called by World.

func (*ParticlesArcadeEmitter) PostUpdateI

func (self *ParticlesArcadeEmitter) PostUpdateI(args ...interface{})

PostUpdateI The core postUpdate - as called by World.

func (*ParticlesArcadeEmitter) PreUpdate

func (self *ParticlesArcadeEmitter) PreUpdate()

PreUpdate The core preUpdate - as called by World.

func (*ParticlesArcadeEmitter) PreUpdateI

func (self *ParticlesArcadeEmitter) PreUpdateI(args ...interface{})

PreUpdateI The core preUpdate - as called by World.

func (*ParticlesArcadeEmitter) Previous

func (self *ParticlesArcadeEmitter) Previous() interface{}

Previous Moves the group cursor to the previous (lower) child in the group.

If the cursor is at the start of the group (bottom child) it is moved to the end (top child).

func (*ParticlesArcadeEmitter) PreviousI

func (self *ParticlesArcadeEmitter) PreviousI(args ...interface{}) interface{}

PreviousI Moves the group cursor to the previous (lower) child in the group.

If the cursor is at the start of the group (bottom child) it is moved to the end (top child).

func (*ParticlesArcadeEmitter) Remove

func (self *ParticlesArcadeEmitter) Remove(child interface{}) bool

Remove Removes the given child from this group.

This will dispatch an `onRemovedFromGroup` event from the child (if it has one), and optionally destroy the child.

If the group cursor was referring to the removed child it is updated to refer to the next child.

func (*ParticlesArcadeEmitter) Remove1O

func (self *ParticlesArcadeEmitter) Remove1O(child interface{}, destroy bool) bool

Remove1O Removes the given child from this group.

This will dispatch an `onRemovedFromGroup` event from the child (if it has one), and optionally destroy the child.

If the group cursor was referring to the removed child it is updated to refer to the next child.

func (*ParticlesArcadeEmitter) Remove2O

func (self *ParticlesArcadeEmitter) Remove2O(child interface{}, destroy bool, silent bool) bool

Remove2O Removes the given child from this group.

This will dispatch an `onRemovedFromGroup` event from the child (if it has one), and optionally destroy the child.

If the group cursor was referring to the removed child it is updated to refer to the next child.

func (*ParticlesArcadeEmitter) RemoveAll

func (self *ParticlesArcadeEmitter) RemoveAll()

RemoveAll Removes all children from this Group, but does not remove the group from its parent.

The children can be optionally destroyed as they are removed.

You can also optionally also destroy the BaseTexture the Child is using. Be careful if you've more than one Game Object sharing the same BaseTexture.

func (*ParticlesArcadeEmitter) RemoveAll1O

func (self *ParticlesArcadeEmitter) RemoveAll1O(destroy bool)

RemoveAll1O Removes all children from this Group, but does not remove the group from its parent.

The children can be optionally destroyed as they are removed.

You can also optionally also destroy the BaseTexture the Child is using. Be careful if you've more than one Game Object sharing the same BaseTexture.

func (*ParticlesArcadeEmitter) RemoveAll2O

func (self *ParticlesArcadeEmitter) RemoveAll2O(destroy bool, silent bool)

RemoveAll2O Removes all children from this Group, but does not remove the group from its parent.

The children can be optionally destroyed as they are removed.

You can also optionally also destroy the BaseTexture the Child is using. Be careful if you've more than one Game Object sharing the same BaseTexture.

func (*ParticlesArcadeEmitter) RemoveAll3O

func (self *ParticlesArcadeEmitter) RemoveAll3O(destroy bool, silent bool, destroyTexture bool)

RemoveAll3O Removes all children from this Group, but does not remove the group from its parent.

The children can be optionally destroyed as they are removed.

You can also optionally also destroy the BaseTexture the Child is using. Be careful if you've more than one Game Object sharing the same BaseTexture.

func (*ParticlesArcadeEmitter) RemoveAllI

func (self *ParticlesArcadeEmitter) RemoveAllI(args ...interface{})

RemoveAllI Removes all children from this Group, but does not remove the group from its parent.

The children can be optionally destroyed as they are removed.

You can also optionally also destroy the BaseTexture the Child is using. Be careful if you've more than one Game Object sharing the same BaseTexture.

func (*ParticlesArcadeEmitter) RemoveBetween

func (self *ParticlesArcadeEmitter) RemoveBetween(startIndex int)

RemoveBetween Removes all children from this group whose index falls beteen the given startIndex and endIndex values.

func (*ParticlesArcadeEmitter) RemoveBetween1O

func (self *ParticlesArcadeEmitter) RemoveBetween1O(startIndex int, endIndex int)

RemoveBetween1O Removes all children from this group whose index falls beteen the given startIndex and endIndex values.

func (*ParticlesArcadeEmitter) RemoveBetween2O

func (self *ParticlesArcadeEmitter) RemoveBetween2O(startIndex int, endIndex int, destroy bool)

RemoveBetween2O Removes all children from this group whose index falls beteen the given startIndex and endIndex values.

func (*ParticlesArcadeEmitter) RemoveBetween3O

func (self *ParticlesArcadeEmitter) RemoveBetween3O(startIndex int, endIndex int, destroy bool, silent bool)

RemoveBetween3O Removes all children from this group whose index falls beteen the given startIndex and endIndex values.

func (*ParticlesArcadeEmitter) RemoveBetweenI

func (self *ParticlesArcadeEmitter) RemoveBetweenI(args ...interface{})

RemoveBetweenI Removes all children from this group whose index falls beteen the given startIndex and endIndex values.

func (*ParticlesArcadeEmitter) RemoveChild

func (self *ParticlesArcadeEmitter) RemoveChild(child *DisplayObject) *DisplayObject

RemoveChild Removes a child from the container.

func (*ParticlesArcadeEmitter) RemoveChildAt

func (self *ParticlesArcadeEmitter) RemoveChildAt(index int) *DisplayObject

RemoveChildAt Removes a child from the specified index position.

func (*ParticlesArcadeEmitter) RemoveChildAtI

func (self *ParticlesArcadeEmitter) RemoveChildAtI(args ...interface{}) *DisplayObject

RemoveChildAtI Removes a child from the specified index position.

func (*ParticlesArcadeEmitter) RemoveChildI

func (self *ParticlesArcadeEmitter) RemoveChildI(args ...interface{}) *DisplayObject

RemoveChildI Removes a child from the container.

func (*ParticlesArcadeEmitter) RemoveChildren

func (self *ParticlesArcadeEmitter) RemoveChildren(beginIndex int, endIndex int)

RemoveChildren Removes all children from this container that are within the begin and end indexes.

func (*ParticlesArcadeEmitter) RemoveChildrenI

func (self *ParticlesArcadeEmitter) RemoveChildrenI(args ...interface{})

RemoveChildrenI Removes all children from this container that are within the begin and end indexes.

func (*ParticlesArcadeEmitter) RemoveFromHash

func (self *ParticlesArcadeEmitter) RemoveFromHash(child *DisplayObject) bool

RemoveFromHash Removes a child of this Group from the hash array. This call will return false if the child is not in the hash.

func (*ParticlesArcadeEmitter) RemoveFromHashI

func (self *ParticlesArcadeEmitter) RemoveFromHashI(args ...interface{}) bool

RemoveFromHashI Removes a child of this Group from the hash array. This call will return false if the child is not in the hash.

func (*ParticlesArcadeEmitter) RemoveI

func (self *ParticlesArcadeEmitter) RemoveI(args ...interface{}) bool

RemoveI Removes the given child from this group.

This will dispatch an `onRemovedFromGroup` event from the child (if it has one), and optionally destroy the child.

If the group cursor was referring to the removed child it is updated to refer to the next child.

func (*ParticlesArcadeEmitter) Replace

func (self *ParticlesArcadeEmitter) Replace(oldChild interface{}, newChild interface{}) interface{}

Replace Replaces a child of this Group with the given newChild. The newChild cannot be a member of this Group.

If `Group.enableBody` is set, then a physics body will be created on the object, so long as one does not already exist.

If `Group.inputEnableChildren` is set, then an Input Handler will be created on the object, so long as one does not already exist.

func (*ParticlesArcadeEmitter) ReplaceI

func (self *ParticlesArcadeEmitter) ReplaceI(args ...interface{}) interface{}

ReplaceI Replaces a child of this Group with the given newChild. The newChild cannot be a member of this Group.

If `Group.enableBody` is set, then a physics body will be created on the object, so long as one does not already exist.

If `Group.inputEnableChildren` is set, then an Input Handler will be created on the object, so long as one does not already exist.

func (*ParticlesArcadeEmitter) ResetChild

func (self *ParticlesArcadeEmitter) ResetChild(child *DisplayObject) *DisplayObject

ResetChild Takes a child and if the `x` and `y` arguments are given it calls `child.reset(x, y)` on it.

If the `key` and optionally the `frame` arguments are given, it calls `child.loadTexture(key, frame)` on it.

The two operations are separate. For example if you just wish to load a new texture then pass `null` as the x and y values.

func (*ParticlesArcadeEmitter) ResetChild1O

func (self *ParticlesArcadeEmitter) ResetChild1O(child *DisplayObject, x int) *DisplayObject

ResetChild1O Takes a child and if the `x` and `y` arguments are given it calls `child.reset(x, y)` on it.

If the `key` and optionally the `frame` arguments are given, it calls `child.loadTexture(key, frame)` on it.

The two operations are separate. For example if you just wish to load a new texture then pass `null` as the x and y values.

func (*ParticlesArcadeEmitter) ResetChild2O

func (self *ParticlesArcadeEmitter) ResetChild2O(child *DisplayObject, x int, y int) *DisplayObject

ResetChild2O Takes a child and if the `x` and `y` arguments are given it calls `child.reset(x, y)` on it.

If the `key` and optionally the `frame` arguments are given, it calls `child.loadTexture(key, frame)` on it.

The two operations are separate. For example if you just wish to load a new texture then pass `null` as the x and y values.

func (*ParticlesArcadeEmitter) ResetChild3O

func (self *ParticlesArcadeEmitter) ResetChild3O(child *DisplayObject, x int, y int, key interface{}) *DisplayObject

ResetChild3O Takes a child and if the `x` and `y` arguments are given it calls `child.reset(x, y)` on it.

If the `key` and optionally the `frame` arguments are given, it calls `child.loadTexture(key, frame)` on it.

The two operations are separate. For example if you just wish to load a new texture then pass `null` as the x and y values.

func (*ParticlesArcadeEmitter) ResetChild4O

func (self *ParticlesArcadeEmitter) ResetChild4O(child *DisplayObject, x int, y int, key interface{}, frame interface{}) *DisplayObject

ResetChild4O Takes a child and if the `x` and `y` arguments are given it calls `child.reset(x, y)` on it.

If the `key` and optionally the `frame` arguments are given, it calls `child.loadTexture(key, frame)` on it.

The two operations are separate. For example if you just wish to load a new texture then pass `null` as the x and y values.

func (*ParticlesArcadeEmitter) ResetChildI

func (self *ParticlesArcadeEmitter) ResetChildI(args ...interface{}) *DisplayObject

ResetChildI Takes a child and if the `x` and `y` arguments are given it calls `child.reset(x, y)` on it.

If the `key` and optionally the `frame` arguments are given, it calls `child.loadTexture(key, frame)` on it.

The two operations are separate. For example if you just wish to load a new texture then pass `null` as the x and y values.

func (*ParticlesArcadeEmitter) ResetCursor

func (self *ParticlesArcadeEmitter) ResetCursor() interface{}

ResetCursor Sets the group cursor to the first child in the group.

If the optional index parameter is given it sets the cursor to the object at that index instead.

func (*ParticlesArcadeEmitter) ResetCursor1O

func (self *ParticlesArcadeEmitter) ResetCursor1O(index int) interface{}

ResetCursor1O Sets the group cursor to the first child in the group.

If the optional index parameter is given it sets the cursor to the object at that index instead.

func (*ParticlesArcadeEmitter) ResetCursorI

func (self *ParticlesArcadeEmitter) ResetCursorI(args ...interface{}) interface{}

ResetCursorI Sets the group cursor to the first child in the group.

If the optional index parameter is given it sets the cursor to the object at that index instead.

func (*ParticlesArcadeEmitter) Reverse

func (self *ParticlesArcadeEmitter) Reverse()

Reverse Reverses all children in this group.

This operation applies only to immediate children and does not propagate to subgroups.

func (*ParticlesArcadeEmitter) ReverseI

func (self *ParticlesArcadeEmitter) ReverseI(args ...interface{})

ReverseI Reverses all children in this group.

This operation applies only to immediate children and does not propagate to subgroups.

func (*ParticlesArcadeEmitter) Revive

Revive Handy for bringing game objects "back to life". Just sets alive and exists back to true.

func (*ParticlesArcadeEmitter) ReviveI

func (self *ParticlesArcadeEmitter) ReviveI(args ...interface{}) *ParticlesArcadeEmitter

ReviveI Handy for bringing game objects "back to life". Just sets alive and exists back to true.

func (*ParticlesArcadeEmitter) Right

func (self *ParticlesArcadeEmitter) Right() int

Right Gets the right position of the Emitter.

func (*ParticlesArcadeEmitter) Rotation

func (self *ParticlesArcadeEmitter) Rotation() int

Rotation The angle of rotation of the group container, in radians.

This will adjust the group container itself by modifying its rotation. This will have no impact on the rotation value of its children, but it will update their worldTransform and on-screen position.

func (*ParticlesArcadeEmitter) ScaleData

func (self *ParticlesArcadeEmitter) ScaleData() []interface{}

ScaleData An array of the calculated scale easing data applied to particles with scaleRates > 0.

func (*ParticlesArcadeEmitter) SendToBack

func (self *ParticlesArcadeEmitter) SendToBack(child interface{}) interface{}

SendToBack Sends the given child to the bottom of this group so it renders below all other children.

func (*ParticlesArcadeEmitter) SendToBackI

func (self *ParticlesArcadeEmitter) SendToBackI(args ...interface{}) interface{}

SendToBackI Sends the given child to the bottom of this group so it renders below all other children.

func (*ParticlesArcadeEmitter) Set

func (self *ParticlesArcadeEmitter) Set(child *Sprite, key string, value interface{}) bool

Set Quickly set a property on a single child of this group to a new value.

The operation parameter controls how the new value is assigned to the property, from simple replacement to addition and multiplication.

func (*ParticlesArcadeEmitter) Set1O

func (self *ParticlesArcadeEmitter) Set1O(child *Sprite, key string, value interface{}, checkAlive bool) bool

Set1O Quickly set a property on a single child of this group to a new value.

The operation parameter controls how the new value is assigned to the property, from simple replacement to addition and multiplication.

func (*ParticlesArcadeEmitter) Set2O

func (self *ParticlesArcadeEmitter) Set2O(child *Sprite, key string, value interface{}, checkAlive bool, checkVisible bool) bool

Set2O Quickly set a property on a single child of this group to a new value.

The operation parameter controls how the new value is assigned to the property, from simple replacement to addition and multiplication.

func (*ParticlesArcadeEmitter) Set3O

func (self *ParticlesArcadeEmitter) Set3O(child *Sprite, key string, value interface{}, checkAlive bool, checkVisible bool, operation int) bool

Set3O Quickly set a property on a single child of this group to a new value.

The operation parameter controls how the new value is assigned to the property, from simple replacement to addition and multiplication.

func (*ParticlesArcadeEmitter) Set4O

func (self *ParticlesArcadeEmitter) Set4O(child *Sprite, key string, value interface{}, checkAlive bool, checkVisible bool, operation int, force bool) bool

Set4O Quickly set a property on a single child of this group to a new value.

The operation parameter controls how the new value is assigned to the property, from simple replacement to addition and multiplication.

func (*ParticlesArcadeEmitter) SetAliveA

func (self *ParticlesArcadeEmitter) SetAliveA(member bool)

SetAliveA The alive property is useful for Groups that are children of other Groups and need to be included/excluded in checks like forEachAlive.

func (*ParticlesArcadeEmitter) SetAll

func (self *ParticlesArcadeEmitter) SetAll(key string, value interface{})

SetAll Quickly set the same property across all children of this group to a new value.

This call doesn't descend down children, so if you have a Group inside of this group, the property will be set on the group but not its children. If you need that ability please see `Group.setAllChildren`.

The operation parameter controls how the new value is assigned to the property, from simple replacement to addition and multiplication.

func (*ParticlesArcadeEmitter) SetAll1O

func (self *ParticlesArcadeEmitter) SetAll1O(key string, value interface{}, checkAlive bool)

SetAll1O Quickly set the same property across all children of this group to a new value.

This call doesn't descend down children, so if you have a Group inside of this group, the property will be set on the group but not its children. If you need that ability please see `Group.setAllChildren`.

The operation parameter controls how the new value is assigned to the property, from simple replacement to addition and multiplication.

func (*ParticlesArcadeEmitter) SetAll2O

func (self *ParticlesArcadeEmitter) SetAll2O(key string, value interface{}, checkAlive bool, checkVisible bool)

SetAll2O Quickly set the same property across all children of this group to a new value.

This call doesn't descend down children, so if you have a Group inside of this group, the property will be set on the group but not its children. If you need that ability please see `Group.setAllChildren`.

The operation parameter controls how the new value is assigned to the property, from simple replacement to addition and multiplication.

func (*ParticlesArcadeEmitter) SetAll3O

func (self *ParticlesArcadeEmitter) SetAll3O(key string, value interface{}, checkAlive bool, checkVisible bool, operation int)

SetAll3O Quickly set the same property across all children of this group to a new value.

This call doesn't descend down children, so if you have a Group inside of this group, the property will be set on the group but not its children. If you need that ability please see `Group.setAllChildren`.

The operation parameter controls how the new value is assigned to the property, from simple replacement to addition and multiplication.

func (*ParticlesArcadeEmitter) SetAll4O

func (self *ParticlesArcadeEmitter) SetAll4O(key string, value interface{}, checkAlive bool, checkVisible bool, operation int, force bool)

SetAll4O Quickly set the same property across all children of this group to a new value.

This call doesn't descend down children, so if you have a Group inside of this group, the property will be set on the group but not its children. If you need that ability please see `Group.setAllChildren`.

The operation parameter controls how the new value is assigned to the property, from simple replacement to addition and multiplication.

func (*ParticlesArcadeEmitter) SetAllChildren

func (self *ParticlesArcadeEmitter) SetAllChildren(key string, value interface{})

SetAllChildren Quickly set the same property across all children of this group, and any child Groups, to a new value.

If this group contains other Groups then the same property is set across their children as well, iterating down until it reaches the bottom. Unlike with `setAll` the property is NOT set on child Groups itself.

The operation parameter controls how the new value is assigned to the property, from simple replacement to addition and multiplication.

func (*ParticlesArcadeEmitter) SetAllChildren1O

func (self *ParticlesArcadeEmitter) SetAllChildren1O(key string, value interface{}, checkAlive bool)

SetAllChildren1O Quickly set the same property across all children of this group, and any child Groups, to a new value.

If this group contains other Groups then the same property is set across their children as well, iterating down until it reaches the bottom. Unlike with `setAll` the property is NOT set on child Groups itself.

The operation parameter controls how the new value is assigned to the property, from simple replacement to addition and multiplication.

func (*ParticlesArcadeEmitter) SetAllChildren2O

func (self *ParticlesArcadeEmitter) SetAllChildren2O(key string, value interface{}, checkAlive bool, checkVisible bool)

SetAllChildren2O Quickly set the same property across all children of this group, and any child Groups, to a new value.

If this group contains other Groups then the same property is set across their children as well, iterating down until it reaches the bottom. Unlike with `setAll` the property is NOT set on child Groups itself.

The operation parameter controls how the new value is assigned to the property, from simple replacement to addition and multiplication.

func (*ParticlesArcadeEmitter) SetAllChildren3O

func (self *ParticlesArcadeEmitter) SetAllChildren3O(key string, value interface{}, checkAlive bool, checkVisible bool, operation int)

SetAllChildren3O Quickly set the same property across all children of this group, and any child Groups, to a new value.

If this group contains other Groups then the same property is set across their children as well, iterating down until it reaches the bottom. Unlike with `setAll` the property is NOT set on child Groups itself.

The operation parameter controls how the new value is assigned to the property, from simple replacement to addition and multiplication.

func (*ParticlesArcadeEmitter) SetAllChildren4O

func (self *ParticlesArcadeEmitter) SetAllChildren4O(key string, value interface{}, checkAlive bool, checkVisible bool, operation int, force bool)

SetAllChildren4O Quickly set the same property across all children of this group, and any child Groups, to a new value.

If this group contains other Groups then the same property is set across their children as well, iterating down until it reaches the bottom. Unlike with `setAll` the property is NOT set on child Groups itself.

The operation parameter controls how the new value is assigned to the property, from simple replacement to addition and multiplication.

func (*ParticlesArcadeEmitter) SetAllChildrenI

func (self *ParticlesArcadeEmitter) SetAllChildrenI(args ...interface{})

SetAllChildrenI Quickly set the same property across all children of this group, and any child Groups, to a new value.

If this group contains other Groups then the same property is set across their children as well, iterating down until it reaches the bottom. Unlike with `setAll` the property is NOT set on child Groups itself.

The operation parameter controls how the new value is assigned to the property, from simple replacement to addition and multiplication.

func (*ParticlesArcadeEmitter) SetAllI

func (self *ParticlesArcadeEmitter) SetAllI(args ...interface{})

SetAllI Quickly set the same property across all children of this group to a new value.

This call doesn't descend down children, so if you have a Group inside of this group, the property will be set on the group but not its children. If you need that ability please see `Group.setAllChildren`.

The operation parameter controls how the new value is assigned to the property, from simple replacement to addition and multiplication.

func (*ParticlesArcadeEmitter) SetAlpha

SetAlpha A more compact way of setting the alpha constraints of the particles. The rate parameter, if set to a value above zero, lets you set the speed at which the Particle change in alpha from min to max. If rate is zero, which is the default, the particle won't change alpha - instead it will pick a random alpha between min and max on emit.

func (*ParticlesArcadeEmitter) SetAlpha1O

func (self *ParticlesArcadeEmitter) SetAlpha1O(min int) *ParticlesArcadeEmitter

SetAlpha1O A more compact way of setting the alpha constraints of the particles. The rate parameter, if set to a value above zero, lets you set the speed at which the Particle change in alpha from min to max. If rate is zero, which is the default, the particle won't change alpha - instead it will pick a random alpha between min and max on emit.

func (*ParticlesArcadeEmitter) SetAlpha2O

func (self *ParticlesArcadeEmitter) SetAlpha2O(min int, max int) *ParticlesArcadeEmitter

SetAlpha2O A more compact way of setting the alpha constraints of the particles. The rate parameter, if set to a value above zero, lets you set the speed at which the Particle change in alpha from min to max. If rate is zero, which is the default, the particle won't change alpha - instead it will pick a random alpha between min and max on emit.

func (*ParticlesArcadeEmitter) SetAlpha3O

func (self *ParticlesArcadeEmitter) SetAlpha3O(min int, max int, rate int) *ParticlesArcadeEmitter

SetAlpha3O A more compact way of setting the alpha constraints of the particles. The rate parameter, if set to a value above zero, lets you set the speed at which the Particle change in alpha from min to max. If rate is zero, which is the default, the particle won't change alpha - instead it will pick a random alpha between min and max on emit.

func (*ParticlesArcadeEmitter) SetAlpha4O

func (self *ParticlesArcadeEmitter) SetAlpha4O(min int, max int, rate int, ease interface{}) *ParticlesArcadeEmitter

SetAlpha4O A more compact way of setting the alpha constraints of the particles. The rate parameter, if set to a value above zero, lets you set the speed at which the Particle change in alpha from min to max. If rate is zero, which is the default, the particle won't change alpha - instead it will pick a random alpha between min and max on emit.

func (*ParticlesArcadeEmitter) SetAlpha5O

func (self *ParticlesArcadeEmitter) SetAlpha5O(min int, max int, rate int, ease interface{}, yoyo bool) *ParticlesArcadeEmitter

SetAlpha5O A more compact way of setting the alpha constraints of the particles. The rate parameter, if set to a value above zero, lets you set the speed at which the Particle change in alpha from min to max. If rate is zero, which is the default, the particle won't change alpha - instead it will pick a random alpha between min and max on emit.

func (*ParticlesArcadeEmitter) SetAlphaA

func (self *ParticlesArcadeEmitter) SetAlphaA(member int)

SetAlphaA The alpha value of the group container.

func (*ParticlesArcadeEmitter) SetAlphaDataA

func (self *ParticlesArcadeEmitter) SetAlphaDataA(member []interface{})

SetAlphaDataA An array of the calculated alpha easing data applied to particles with alphaRates > 0.

func (*ParticlesArcadeEmitter) SetAlphaI

func (self *ParticlesArcadeEmitter) SetAlphaI(args ...interface{}) *ParticlesArcadeEmitter

SetAlphaI A more compact way of setting the alpha constraints of the particles. The rate parameter, if set to a value above zero, lets you set the speed at which the Particle change in alpha from min to max. If rate is zero, which is the default, the particle won't change alpha - instead it will pick a random alpha between min and max on emit.

func (*ParticlesArcadeEmitter) SetAngleA

func (self *ParticlesArcadeEmitter) SetAngleA(member int)

SetAngleA The angle of rotation of the group container, in degrees.

This adjusts the group itself by modifying its local rotation transform.

This has no impact on the rotation/angle properties of the children, but it will update their worldTransform and on-screen orientation and position.

func (*ParticlesArcadeEmitter) SetAngularDragA

func (self *ParticlesArcadeEmitter) SetAngularDragA(member int)

SetAngularDragA The angular drag component of particles launched from the emitter if they are rotating.

func (*ParticlesArcadeEmitter) SetAreaA

func (self *ParticlesArcadeEmitter) SetAreaA(member *Rectangle)

SetAreaA The area of the emitter. Particles can be randomly generated from anywhere within this rectangle.

func (*ParticlesArcadeEmitter) SetAutoAlphaA

func (self *ParticlesArcadeEmitter) SetAutoAlphaA(member bool)

SetAutoAlphaA When a new Particle is emitted this controls if it will automatically change alpha. Use Emitter.setAlpha to configure.

func (*ParticlesArcadeEmitter) SetAutoScaleA

func (self *ParticlesArcadeEmitter) SetAutoScaleA(member bool)

SetAutoScaleA When a new Particle is emitted this controls if it will automatically scale in size. Use Emitter.setScale to configure.

func (*ParticlesArcadeEmitter) SetBlendModeA

func (self *ParticlesArcadeEmitter) SetBlendModeA(member int)

SetBlendModeA The blendMode as set on the particle when emitted from the Emitter. Defaults to NORMAL. Needs browser capable of supporting canvas blend-modes (most not available in WebGL)

func (*ParticlesArcadeEmitter) SetBottomA

func (self *ParticlesArcadeEmitter) SetBottomA(member int)

SetBottomA Gets the bottom position of the Emitter.

func (*ParticlesArcadeEmitter) SetBounceA

func (self *ParticlesArcadeEmitter) SetBounceA(member *Point)

SetBounceA How much each particle should bounce on each axis. 1 = full bounce, 0 = no bounce.

func (*ParticlesArcadeEmitter) SetCameraOffsetA

func (self *ParticlesArcadeEmitter) SetCameraOffsetA(member *Point)

SetCameraOffsetA If this object is {@link Phaser.Group#fixedToCamera fixedToCamera} then this stores the x/y position offset relative to the top-left of the camera view. If the parent of this Group is also `fixedToCamera` then the offset here is in addition to that and should typically be disabled.

func (*ParticlesArcadeEmitter) SetCenterXA

func (self *ParticlesArcadeEmitter) SetCenterXA(member int)

SetCenterXA The center x coordinate of this Group.

It is derived by calling `getBounds`, calculating the Groups dimensions based on its visible children.

func (*ParticlesArcadeEmitter) SetCenterYA

func (self *ParticlesArcadeEmitter) SetCenterYA(member int)

SetCenterYA The center y coordinate of this Group.

It is derived by calling `getBounds`, calculating the Groups dimensions based on its visible children.

func (*ParticlesArcadeEmitter) SetChildIndex

func (self *ParticlesArcadeEmitter) SetChildIndex(child *DisplayObject, index int)

SetChildIndex Changes the position of an existing child in the display object container

func (*ParticlesArcadeEmitter) SetChildIndexI

func (self *ParticlesArcadeEmitter) SetChildIndexI(args ...interface{})

SetChildIndexI Changes the position of an existing child in the display object container

func (*ParticlesArcadeEmitter) SetChildrenA

func (self *ParticlesArcadeEmitter) SetChildrenA(member []DisplayObject)

SetChildrenA [read-only] The array of children of this container.

func (*ParticlesArcadeEmitter) SetClassTypeA

func (self *ParticlesArcadeEmitter) SetClassTypeA(member interface{})

SetClassTypeA The type of objects that will be created when using {@link Phaser.Group#create create} or {@link Phaser.Group#createMultiple createMultiple}.

Any object may be used but it should extend either Sprite or Image and accept the same constructor arguments: when a new object is created it is passed the following parameters to its constructor: `(game, x, y, key, frame)`.

func (*ParticlesArcadeEmitter) SetCursorA

func (self *ParticlesArcadeEmitter) SetCursorA(member *DisplayObject)

SetCursorA The current display object that the group cursor is pointing to, if any. (Can be set manually.)

The cursor is a way to iterate through the children in a Group using {@link Phaser.Group#next next} and {@link Phaser.Group#previous previous}.

func (*ParticlesArcadeEmitter) SetCursorIndexA

func (self *ParticlesArcadeEmitter) SetCursorIndexA(member int)

SetCursorIndexA The current index of the Group cursor. Advance it with Group.next.

func (*ParticlesArcadeEmitter) SetEmitXA

func (self *ParticlesArcadeEmitter) SetEmitXA(member int)

SetEmitXA The point the particles are emitted from. Emitter.x and Emitter.y control the containers location, which updates all current particles Emitter.emitX and Emitter.emitY control the emission location relative to the x/y position.

func (*ParticlesArcadeEmitter) SetEmitYA

func (self *ParticlesArcadeEmitter) SetEmitYA(member int)

SetEmitYA The point the particles are emitted from. Emitter.x and Emitter.y control the containers location, which updates all current particles Emitter.emitX and Emitter.emitY control the emission location relative to the x/y position.

func (*ParticlesArcadeEmitter) SetEnableBodyA

func (self *ParticlesArcadeEmitter) SetEnableBodyA(member bool)

SetEnableBodyA If true all Sprites created by, or added to this group, will have a physics body enabled on them.

If there are children already in the Group at the time you set this property, they are not changed.

The default body type is controlled with {@link Phaser.Group#physicsBodyType physicsBodyType}.

func (*ParticlesArcadeEmitter) SetEnableBodyDebugA

func (self *ParticlesArcadeEmitter) SetEnableBodyDebugA(member bool)

SetEnableBodyDebugA If true when a physics body is created (via {@link Phaser.Group#enableBody enableBody}) it will create a physics debug object as well.

This only works for P2 bodies.

func (*ParticlesArcadeEmitter) SetExistsA

func (self *ParticlesArcadeEmitter) SetExistsA(member bool)

SetExistsA If exists is true the group is updated, otherwise it is skipped.

func (*ParticlesArcadeEmitter) SetFixedToCameraA

func (self *ParticlesArcadeEmitter) SetFixedToCameraA(member bool)

SetFixedToCameraA A Group that is fixed to the camera uses its x/y coordinates as offsets from the top left of the camera. These are stored in Group.cameraOffset.

Note that the cameraOffset values are in addition to any parent in the display list. So if this Group was in a Group that has x: 200, then this will be added to the cameraOffset.x

func (*ParticlesArcadeEmitter) SetFrequencyA

func (self *ParticlesArcadeEmitter) SetFrequencyA(member int)

SetFrequencyA How often a particle is emitted in ms (if emitter is started with Explode === false).

func (*ParticlesArcadeEmitter) SetGameA

func (self *ParticlesArcadeEmitter) SetGameA(member *Game)

SetGameA A reference to the currently running Game.

func (*ParticlesArcadeEmitter) SetGravityA

func (self *ParticlesArcadeEmitter) SetGravityA(member int)

SetGravityA Sets the `body.gravity.y` of each particle sprite to this value on launch.

func (*ParticlesArcadeEmitter) SetHashA

func (self *ParticlesArcadeEmitter) SetHashA(member []interface{})

SetHashA The hash array is an array belonging to this Group into which you can add any of its children via Group.addToHash and Group.removeFromHash.

Only children of this Group can be added to and removed from the hash.

This hash is used automatically by Phaser Arcade Physics in order to perform non z-index based destructive sorting. However if you don't use Arcade Physics, or this isn't a physics enabled Group, then you can use the hash to perform your own sorting and filtering of Group children without touching their z-index (and therefore display draw order)

func (*ParticlesArcadeEmitter) SetHeightA

func (self *ParticlesArcadeEmitter) SetHeightA(member int)

SetHeightA Gets or sets the height of the Emitter. This is the region in which a particle can be emitted.

func (*ParticlesArcadeEmitter) SetI

func (self *ParticlesArcadeEmitter) SetI(args ...interface{}) bool

SetI Quickly set a property on a single child of this group to a new value.

The operation parameter controls how the new value is assigned to the property, from simple replacement to addition and multiplication.

func (*ParticlesArcadeEmitter) SetIgnoreChildInputA

func (self *ParticlesArcadeEmitter) SetIgnoreChildInputA(member bool)

SetIgnoreChildInputA If `ignoreChildInput` is `false` it will allow this objects _children_ to be considered as valid for Input events.

If this property is `true` then the children will _not_ be considered as valid for Input events.

Note that this property isn't recursive: only immediate children are influenced, it doesn't scan further down.

func (*ParticlesArcadeEmitter) SetIgnoreDestroyA

func (self *ParticlesArcadeEmitter) SetIgnoreDestroyA(member bool)

SetIgnoreDestroyA A group with `ignoreDestroy` set to `true` ignores all calls to its `destroy` method.

func (*ParticlesArcadeEmitter) SetInputEnableChildrenA

func (self *ParticlesArcadeEmitter) SetInputEnableChildrenA(member bool)

SetInputEnableChildrenA A Group with `inputEnableChildren` set to `true` will automatically call `inputEnabled = true` on any children _added_ to, or _created by_, this Group.

If there are children already in the Group at the time you set this property, they are not changed.

func (*ParticlesArcadeEmitter) SetLeftA

func (self *ParticlesArcadeEmitter) SetLeftA(member int)

SetLeftA Gets the left position of the Emitter.

func (*ParticlesArcadeEmitter) SetLengthA

func (self *ParticlesArcadeEmitter) SetLengthA(member int)

SetLengthA Total number of children in this group, regardless of exists/alive status.

func (*ParticlesArcadeEmitter) SetLifespanA

func (self *ParticlesArcadeEmitter) SetLifespanA(member int)

SetLifespanA How long each particle lives once it is emitted in ms. Default is 2 seconds. Set lifespan to 'zero' for particles to live forever.

func (*ParticlesArcadeEmitter) SetMaxParticleAlphaA

func (self *ParticlesArcadeEmitter) SetMaxParticleAlphaA(member int)

SetMaxParticleAlphaA The maximum possible alpha value of a particle.

func (*ParticlesArcadeEmitter) SetMaxParticleScaleA

func (self *ParticlesArcadeEmitter) SetMaxParticleScaleA(member int)

SetMaxParticleScaleA The maximum possible scale of a particle. This is applied to the X and Y axis. If you need to control each axis see maxParticleScaleX.

func (*ParticlesArcadeEmitter) SetMaxParticleSpeedA

func (self *ParticlesArcadeEmitter) SetMaxParticleSpeedA(member *Point)

SetMaxParticleSpeedA The maximum possible velocity of a particle.

func (*ParticlesArcadeEmitter) SetMaxParticlesA

func (self *ParticlesArcadeEmitter) SetMaxParticlesA(member int)

SetMaxParticlesA The total number of particles in this emitter.

func (*ParticlesArcadeEmitter) SetMaxRotationA

func (self *ParticlesArcadeEmitter) SetMaxRotationA(member int)

SetMaxRotationA The maximum possible angular velocity of a particle.

func (*ParticlesArcadeEmitter) SetMinParticleAlphaA

func (self *ParticlesArcadeEmitter) SetMinParticleAlphaA(member int)

SetMinParticleAlphaA The minimum possible alpha value of a particle.

func (*ParticlesArcadeEmitter) SetMinParticleScaleA

func (self *ParticlesArcadeEmitter) SetMinParticleScaleA(member int)

SetMinParticleScaleA The minimum possible scale of a particle. This is applied to the X and Y axis. If you need to control each axis see minParticleScaleX.

func (*ParticlesArcadeEmitter) SetMinParticleSpeedA

func (self *ParticlesArcadeEmitter) SetMinParticleSpeedA(member *Point)

SetMinParticleSpeedA The minimum possible velocity of a particle.

func (*ParticlesArcadeEmitter) SetMinRotationA

func (self *ParticlesArcadeEmitter) SetMinRotationA(member int)

SetMinRotationA The minimum possible angular velocity of a particle.

func (*ParticlesArcadeEmitter) SetNameA

func (self *ParticlesArcadeEmitter) SetNameA(member string)

SetNameA A handy string name for this emitter. Can be set to anything.

func (*ParticlesArcadeEmitter) SetOnA

func (self *ParticlesArcadeEmitter) SetOnA(member bool)

SetOnA Determines whether the emitter is currently emitting particles. It is totally safe to directly toggle this.

func (*ParticlesArcadeEmitter) SetOnChildInputDownA

func (self *ParticlesArcadeEmitter) SetOnChildInputDownA(member *Signal)

SetOnChildInputDownA This Signal is dispatched whenever a child of this Group emits an onInputDown signal as a result of having been interacted with by a Pointer. You can bind functions to this Signal instead of to every child Sprite.

This Signal is sent 2 arguments: A reference to the Sprite that triggered the signal, and a reference to the Pointer that caused it.

func (*ParticlesArcadeEmitter) SetOnChildInputOutA

func (self *ParticlesArcadeEmitter) SetOnChildInputOutA(member *Signal)

SetOnChildInputOutA This Signal is dispatched whenever a child of this Group emits an onInputOut signal as a result of having been interacted with by a Pointer. You can bind functions to this Signal instead of to every child Sprite.

This Signal is sent 2 arguments: A reference to the Sprite that triggered the signal, and a reference to the Pointer that caused it.

func (*ParticlesArcadeEmitter) SetOnChildInputOverA

func (self *ParticlesArcadeEmitter) SetOnChildInputOverA(member *Signal)

SetOnChildInputOverA This Signal is dispatched whenever a child of this Group emits an onInputOver signal as a result of having been interacted with by a Pointer. You can bind functions to this Signal instead of to every child Sprite.

This Signal is sent 2 arguments: A reference to the Sprite that triggered the signal, and a reference to the Pointer that caused it.

func (*ParticlesArcadeEmitter) SetOnChildInputUpA

func (self *ParticlesArcadeEmitter) SetOnChildInputUpA(member *Signal)

SetOnChildInputUpA This Signal is dispatched whenever a child of this Group emits an onInputUp signal as a result of having been interacted with by a Pointer. You can bind functions to this Signal instead of to every child Sprite.

This Signal is sent 3 arguments: A reference to the Sprite that triggered the signal, a reference to the Pointer that caused it, and a boolean value `isOver` that tells you if the Pointer is still over the Sprite or not.

func (*ParticlesArcadeEmitter) SetOnDestroyA

func (self *ParticlesArcadeEmitter) SetOnDestroyA(member *Signal)

SetOnDestroyA This signal is dispatched when the group is destroyed.

func (*ParticlesArcadeEmitter) SetParticleAnchorA

func (self *ParticlesArcadeEmitter) SetParticleAnchorA(member *Point)

SetParticleAnchorA When a particle is created its anchor will be set to match this Point object (defaults to x/y: 0.5 to aid in rotation)

func (*ParticlesArcadeEmitter) SetParticleBringToTopA

func (self *ParticlesArcadeEmitter) SetParticleBringToTopA(member bool)

SetParticleBringToTopA If this is `true` then when the Particle is emitted it will be bought to the top of the Emitters display list.

func (*ParticlesArcadeEmitter) SetParticleClassA

func (self *ParticlesArcadeEmitter) SetParticleClassA(member interface{})

SetParticleClassA For emitting your own particle class types. They must extend Phaser.Particle.

func (*ParticlesArcadeEmitter) SetParticleDragA

func (self *ParticlesArcadeEmitter) SetParticleDragA(member *Point)

SetParticleDragA The X and Y drag component of particles launched from the emitter.

func (*ParticlesArcadeEmitter) SetParticleSendToBackA

func (self *ParticlesArcadeEmitter) SetParticleSendToBackA(member bool)

SetParticleSendToBackA If this is `true` then when the Particle is emitted it will be sent to the back of the Emitters display list.

func (*ParticlesArcadeEmitter) SetPendingDestroyA

func (self *ParticlesArcadeEmitter) SetPendingDestroyA(member bool)

SetPendingDestroyA A Group is that has `pendingDestroy` set to `true` is flagged to have its destroy method called on the next logic update. You can set it directly to flag the Group to be destroyed on its next update.

This is extremely useful if you wish to destroy a Group from within one of its own callbacks or a callback of one of its children.

func (*ParticlesArcadeEmitter) SetPhysicsBodyTypeA

func (self *ParticlesArcadeEmitter) SetPhysicsBodyTypeA(member int)

SetPhysicsBodyTypeA If {@link Phaser.Group#enableBody enableBody} is true this is the type of physics body that is created on new Sprites.

The valid values are {@link Phaser.Physics.ARCADE}, {@link Phaser.Physics.P2JS}, {@link Phaser.Physics.NINJA}, etc.

func (*ParticlesArcadeEmitter) SetPhysicsSortDirectionA

func (self *ParticlesArcadeEmitter) SetPhysicsSortDirectionA(member int)

SetPhysicsSortDirectionA If this Group contains Arcade Physics Sprites you can set a custom sort direction via this property.

It should be set to one of the Phaser.Physics.Arcade sort direction constants:

Phaser.Physics.Arcade.SORT_NONE Phaser.Physics.Arcade.LEFT_RIGHT Phaser.Physics.Arcade.RIGHT_LEFT Phaser.Physics.Arcade.TOP_BOTTOM Phaser.Physics.Arcade.BOTTOM_TOP

If set to `null` the Group will use whatever Phaser.Physics.Arcade.sortDirection is set to. This is the default behavior.

func (*ParticlesArcadeEmitter) SetPhysicsTypeA

func (self *ParticlesArcadeEmitter) SetPhysicsTypeA(member int)

SetPhysicsTypeA The const physics body type of this object.

func (*ParticlesArcadeEmitter) SetProperty

func (self *ParticlesArcadeEmitter) SetProperty(child interface{}, key []interface{}, value interface{}) bool

SetProperty Sets a property to the given value on the child. The operation parameter controls how the value is set.

The operations are: - 0: set the existing value to the given value; if force is `true` a new property will be created if needed - 1: will add the given value to the value already present. - 2: will subtract the given value from the value already present. - 3: will multiply the value already present by the given value. - 4: will divide the value already present by the given value.

func (*ParticlesArcadeEmitter) SetProperty1O

func (self *ParticlesArcadeEmitter) SetProperty1O(child interface{}, key []interface{}, value interface{}, operation int) bool

SetProperty1O Sets a property to the given value on the child. The operation parameter controls how the value is set.

The operations are: - 0: set the existing value to the given value; if force is `true` a new property will be created if needed - 1: will add the given value to the value already present. - 2: will subtract the given value from the value already present. - 3: will multiply the value already present by the given value. - 4: will divide the value already present by the given value.

func (*ParticlesArcadeEmitter) SetProperty2O

func (self *ParticlesArcadeEmitter) SetProperty2O(child interface{}, key []interface{}, value interface{}, operation int, force bool) bool

SetProperty2O Sets a property to the given value on the child. The operation parameter controls how the value is set.

The operations are: - 0: set the existing value to the given value; if force is `true` a new property will be created if needed - 1: will add the given value to the value already present. - 2: will subtract the given value from the value already present. - 3: will multiply the value already present by the given value. - 4: will divide the value already present by the given value.

func (*ParticlesArcadeEmitter) SetPropertyI

func (self *ParticlesArcadeEmitter) SetPropertyI(args ...interface{}) bool

SetPropertyI Sets a property to the given value on the child. The operation parameter controls how the value is set.

The operations are: - 0: set the existing value to the given value; if force is `true` a new property will be created if needed - 1: will add the given value to the value already present. - 2: will subtract the given value from the value already present. - 3: will multiply the value already present by the given value. - 4: will divide the value already present by the given value.

func (*ParticlesArcadeEmitter) SetRightA

func (self *ParticlesArcadeEmitter) SetRightA(member int)

SetRightA Gets the right position of the Emitter.

func (*ParticlesArcadeEmitter) SetRotation

func (self *ParticlesArcadeEmitter) SetRotation() *ParticlesArcadeEmitter

SetRotation A more compact way of setting the angular velocity constraints of the particles.

func (*ParticlesArcadeEmitter) SetRotation1O

func (self *ParticlesArcadeEmitter) SetRotation1O(min int) *ParticlesArcadeEmitter

SetRotation1O A more compact way of setting the angular velocity constraints of the particles.

func (*ParticlesArcadeEmitter) SetRotation2O

func (self *ParticlesArcadeEmitter) SetRotation2O(min int, max int) *ParticlesArcadeEmitter

SetRotation2O A more compact way of setting the angular velocity constraints of the particles.

func (*ParticlesArcadeEmitter) SetRotationA

func (self *ParticlesArcadeEmitter) SetRotationA(member int)

SetRotationA The angle of rotation of the group container, in radians.

This will adjust the group container itself by modifying its rotation. This will have no impact on the rotation value of its children, but it will update their worldTransform and on-screen position.

func (*ParticlesArcadeEmitter) SetRotationI

func (self *ParticlesArcadeEmitter) SetRotationI(args ...interface{}) *ParticlesArcadeEmitter

SetRotationI A more compact way of setting the angular velocity constraints of the particles.

func (*ParticlesArcadeEmitter) SetScale

SetScale A more compact way of setting the scale constraints of the particles. The rate parameter, if set to a value above zero, lets you set the speed and ease which the Particle uses to change in scale from min to max across both axis. If rate is zero, which is the default, the particle won't change scale during update, instead it will pick a random scale between min and max on emit.

func (*ParticlesArcadeEmitter) SetScale1O

func (self *ParticlesArcadeEmitter) SetScale1O(minX int) *ParticlesArcadeEmitter

SetScale1O A more compact way of setting the scale constraints of the particles. The rate parameter, if set to a value above zero, lets you set the speed and ease which the Particle uses to change in scale from min to max across both axis. If rate is zero, which is the default, the particle won't change scale during update, instead it will pick a random scale between min and max on emit.

func (*ParticlesArcadeEmitter) SetScale2O

func (self *ParticlesArcadeEmitter) SetScale2O(minX int, maxX int) *ParticlesArcadeEmitter

SetScale2O A more compact way of setting the scale constraints of the particles. The rate parameter, if set to a value above zero, lets you set the speed and ease which the Particle uses to change in scale from min to max across both axis. If rate is zero, which is the default, the particle won't change scale during update, instead it will pick a random scale between min and max on emit.

func (*ParticlesArcadeEmitter) SetScale3O

func (self *ParticlesArcadeEmitter) SetScale3O(minX int, maxX int, minY int) *ParticlesArcadeEmitter

SetScale3O A more compact way of setting the scale constraints of the particles. The rate parameter, if set to a value above zero, lets you set the speed and ease which the Particle uses to change in scale from min to max across both axis. If rate is zero, which is the default, the particle won't change scale during update, instead it will pick a random scale between min and max on emit.

func (*ParticlesArcadeEmitter) SetScale4O

func (self *ParticlesArcadeEmitter) SetScale4O(minX int, maxX int, minY int, maxY int) *ParticlesArcadeEmitter

SetScale4O A more compact way of setting the scale constraints of the particles. The rate parameter, if set to a value above zero, lets you set the speed and ease which the Particle uses to change in scale from min to max across both axis. If rate is zero, which is the default, the particle won't change scale during update, instead it will pick a random scale between min and max on emit.

func (*ParticlesArcadeEmitter) SetScale5O

func (self *ParticlesArcadeEmitter) SetScale5O(minX int, maxX int, minY int, maxY int, rate int) *ParticlesArcadeEmitter

SetScale5O A more compact way of setting the scale constraints of the particles. The rate parameter, if set to a value above zero, lets you set the speed and ease which the Particle uses to change in scale from min to max across both axis. If rate is zero, which is the default, the particle won't change scale during update, instead it will pick a random scale between min and max on emit.

func (*ParticlesArcadeEmitter) SetScale6O

func (self *ParticlesArcadeEmitter) SetScale6O(minX int, maxX int, minY int, maxY int, rate int, ease interface{}) *ParticlesArcadeEmitter

SetScale6O A more compact way of setting the scale constraints of the particles. The rate parameter, if set to a value above zero, lets you set the speed and ease which the Particle uses to change in scale from min to max across both axis. If rate is zero, which is the default, the particle won't change scale during update, instead it will pick a random scale between min and max on emit.

func (*ParticlesArcadeEmitter) SetScale7O

func (self *ParticlesArcadeEmitter) SetScale7O(minX int, maxX int, minY int, maxY int, rate int, ease interface{}, yoyo bool) *ParticlesArcadeEmitter

SetScale7O A more compact way of setting the scale constraints of the particles. The rate parameter, if set to a value above zero, lets you set the speed and ease which the Particle uses to change in scale from min to max across both axis. If rate is zero, which is the default, the particle won't change scale during update, instead it will pick a random scale between min and max on emit.

func (*ParticlesArcadeEmitter) SetScaleDataA

func (self *ParticlesArcadeEmitter) SetScaleDataA(member []interface{})

SetScaleDataA An array of the calculated scale easing data applied to particles with scaleRates > 0.

func (*ParticlesArcadeEmitter) SetScaleI

func (self *ParticlesArcadeEmitter) SetScaleI(args ...interface{}) *ParticlesArcadeEmitter

SetScaleI A more compact way of setting the scale constraints of the particles. The rate parameter, if set to a value above zero, lets you set the speed and ease which the Particle uses to change in scale from min to max across both axis. If rate is zero, which is the default, the particle won't change scale during update, instead it will pick a random scale between min and max on emit.

func (*ParticlesArcadeEmitter) SetSize

func (self *ParticlesArcadeEmitter) SetSize(width int, height int) *ParticlesArcadeEmitter

SetSize A more compact way of setting the width and height of the emitter.

func (*ParticlesArcadeEmitter) SetSizeI

func (self *ParticlesArcadeEmitter) SetSizeI(args ...interface{}) *ParticlesArcadeEmitter

SetSizeI A more compact way of setting the width and height of the emitter.

func (*ParticlesArcadeEmitter) SetTopA

func (self *ParticlesArcadeEmitter) SetTopA(member int)

SetTopA Gets the top position of the Emitter.

func (*ParticlesArcadeEmitter) SetTotalA

func (self *ParticlesArcadeEmitter) SetTotalA(member int)

SetTotalA Total number of existing children in the group.

func (*ParticlesArcadeEmitter) SetTypeA

func (self *ParticlesArcadeEmitter) SetTypeA(member int)

SetTypeA Internal Phaser Type value.

func (*ParticlesArcadeEmitter) SetVisibleA

func (self *ParticlesArcadeEmitter) SetVisibleA(member bool)

SetVisibleA The visible state of the group. Non-visible Groups and all of their children are not rendered.

func (*ParticlesArcadeEmitter) SetWidthA

func (self *ParticlesArcadeEmitter) SetWidthA(member int)

SetWidthA Gets or sets the width of the Emitter. This is the region in which a particle can be emitted.

func (*ParticlesArcadeEmitter) SetXA

func (self *ParticlesArcadeEmitter) SetXA(member int)

SetXA Gets or sets the x position of the Emitter.

func (*ParticlesArcadeEmitter) SetXSpeed

SetXSpeed A more compact way of setting the X velocity range of the emitter.

func (*ParticlesArcadeEmitter) SetXSpeed1O

func (self *ParticlesArcadeEmitter) SetXSpeed1O(min int) *ParticlesArcadeEmitter

SetXSpeed1O A more compact way of setting the X velocity range of the emitter.

func (*ParticlesArcadeEmitter) SetXSpeed2O

func (self *ParticlesArcadeEmitter) SetXSpeed2O(min int, max int) *ParticlesArcadeEmitter

SetXSpeed2O A more compact way of setting the X velocity range of the emitter.

func (*ParticlesArcadeEmitter) SetXSpeedI

func (self *ParticlesArcadeEmitter) SetXSpeedI(args ...interface{}) *ParticlesArcadeEmitter

SetXSpeedI A more compact way of setting the X velocity range of the emitter.

func (*ParticlesArcadeEmitter) SetYA

func (self *ParticlesArcadeEmitter) SetYA(member int)

SetYA Gets or sets the y position of the Emitter.

func (*ParticlesArcadeEmitter) SetYSpeed

SetYSpeed A more compact way of setting the Y velocity range of the emitter.

func (*ParticlesArcadeEmitter) SetYSpeed1O

func (self *ParticlesArcadeEmitter) SetYSpeed1O(min int) *ParticlesArcadeEmitter

SetYSpeed1O A more compact way of setting the Y velocity range of the emitter.

func (*ParticlesArcadeEmitter) SetYSpeed2O

func (self *ParticlesArcadeEmitter) SetYSpeed2O(min int, max int) *ParticlesArcadeEmitter

SetYSpeed2O A more compact way of setting the Y velocity range of the emitter.

func (*ParticlesArcadeEmitter) SetYSpeedI

func (self *ParticlesArcadeEmitter) SetYSpeedI(args ...interface{}) *ParticlesArcadeEmitter

SetYSpeedI A more compact way of setting the Y velocity range of the emitter.

func (*ParticlesArcadeEmitter) SetZA

func (self *ParticlesArcadeEmitter) SetZA(member int)

SetZA The z-depth value of this object within its parent container/Group - the World is a Group as well. This value must be unique for each child in a Group.

func (*ParticlesArcadeEmitter) Sort

func (self *ParticlesArcadeEmitter) Sort()

Sort Sort the children in the group according to a particular key and ordering.

Call this function to sort the group according to a particular key value and order.

For example to depth sort Sprites for Zelda-style game you might call `group.sort('y', Phaser.Group.SORT_ASCENDING)` at the bottom of your `State.update()`.

Internally this uses a standard JavaScript Array sort, so everything that applies there also applies here, including alphabetical sorting, mixing strings and numbers, and Unicode sorting. See MDN for more details.

func (*ParticlesArcadeEmitter) Sort1O

func (self *ParticlesArcadeEmitter) Sort1O(key string)

Sort1O Sort the children in the group according to a particular key and ordering.

Call this function to sort the group according to a particular key value and order.

For example to depth sort Sprites for Zelda-style game you might call `group.sort('y', Phaser.Group.SORT_ASCENDING)` at the bottom of your `State.update()`.

Internally this uses a standard JavaScript Array sort, so everything that applies there also applies here, including alphabetical sorting, mixing strings and numbers, and Unicode sorting. See MDN for more details.

func (*ParticlesArcadeEmitter) Sort2O

func (self *ParticlesArcadeEmitter) Sort2O(key string, order int)

Sort2O Sort the children in the group according to a particular key and ordering.

Call this function to sort the group according to a particular key value and order.

For example to depth sort Sprites for Zelda-style game you might call `group.sort('y', Phaser.Group.SORT_ASCENDING)` at the bottom of your `State.update()`.

Internally this uses a standard JavaScript Array sort, so everything that applies there also applies here, including alphabetical sorting, mixing strings and numbers, and Unicode sorting. See MDN for more details.

func (*ParticlesArcadeEmitter) SortI

func (self *ParticlesArcadeEmitter) SortI(args ...interface{})

SortI Sort the children in the group according to a particular key and ordering.

Call this function to sort the group according to a particular key value and order.

For example to depth sort Sprites for Zelda-style game you might call `group.sort('y', Phaser.Group.SORT_ASCENDING)` at the bottom of your `State.update()`.

Internally this uses a standard JavaScript Array sort, so everything that applies there also applies here, including alphabetical sorting, mixing strings and numbers, and Unicode sorting. See MDN for more details.

func (*ParticlesArcadeEmitter) Start

Start Call this function to start emitting particles.

func (*ParticlesArcadeEmitter) Start1O

func (self *ParticlesArcadeEmitter) Start1O(explode bool) *ParticlesArcadeEmitter

Start1O Call this function to start emitting particles.

func (*ParticlesArcadeEmitter) Start2O

func (self *ParticlesArcadeEmitter) Start2O(explode bool, lifespan int) *ParticlesArcadeEmitter

Start2O Call this function to start emitting particles.

func (*ParticlesArcadeEmitter) Start3O

func (self *ParticlesArcadeEmitter) Start3O(explode bool, lifespan int, frequency int) *ParticlesArcadeEmitter

Start3O Call this function to start emitting particles.

func (*ParticlesArcadeEmitter) Start4O

func (self *ParticlesArcadeEmitter) Start4O(explode bool, lifespan int, frequency int, quantity int) *ParticlesArcadeEmitter

Start4O Call this function to start emitting particles.

func (*ParticlesArcadeEmitter) Start5O

func (self *ParticlesArcadeEmitter) Start5O(explode bool, lifespan int, frequency int, quantity int, forceQuantity int) *ParticlesArcadeEmitter

Start5O Call this function to start emitting particles.

func (*ParticlesArcadeEmitter) StartI

func (self *ParticlesArcadeEmitter) StartI(args ...interface{}) *ParticlesArcadeEmitter

StartI Call this function to start emitting particles.

func (*ParticlesArcadeEmitter) SubAll

func (self *ParticlesArcadeEmitter) SubAll(property string, amount int, checkAlive bool, checkVisible bool)

SubAll Subtracts the amount from the given property on all children in this group.

`Group.subAll('x', 10)` will minus 10 from the child.x value for each child.

func (*ParticlesArcadeEmitter) SubAllI

func (self *ParticlesArcadeEmitter) SubAllI(args ...interface{})

SubAllI Subtracts the amount from the given property on all children in this group.

`Group.subAll('x', 10)` will minus 10 from the child.x value for each child.

func (*ParticlesArcadeEmitter) Swap

func (self *ParticlesArcadeEmitter) Swap(child1 interface{}, child2 interface{})

Swap Swaps the position of two children in this group.

Both children must be in this group, a child cannot be swapped with itself, and unparented children cannot be swapped.

func (*ParticlesArcadeEmitter) SwapChildren

func (self *ParticlesArcadeEmitter) SwapChildren(child *DisplayObject, child2 *DisplayObject)

SwapChildren Swaps the position of 2 Display Objects within this container.

func (*ParticlesArcadeEmitter) SwapChildrenI

func (self *ParticlesArcadeEmitter) SwapChildrenI(args ...interface{})

SwapChildrenI Swaps the position of 2 Display Objects within this container.

func (*ParticlesArcadeEmitter) SwapI

func (self *ParticlesArcadeEmitter) SwapI(args ...interface{})

SwapI Swaps the position of two children in this group.

Both children must be in this group, a child cannot be swapped with itself, and unparented children cannot be swapped.

func (*ParticlesArcadeEmitter) Top

func (self *ParticlesArcadeEmitter) Top() int

Top Gets the top position of the Emitter.

func (*ParticlesArcadeEmitter) Total

func (self *ParticlesArcadeEmitter) Total() int

Total Total number of existing children in the group.

func (*ParticlesArcadeEmitter) Type

func (self *ParticlesArcadeEmitter) Type() int

Type Internal Phaser Type value.

func (*ParticlesArcadeEmitter) Update

func (self *ParticlesArcadeEmitter) Update()

Update Called automatically by the game loop, decides when to launch particles and when to "die".

func (*ParticlesArcadeEmitter) UpdateI

func (self *ParticlesArcadeEmitter) UpdateI(args ...interface{})

UpdateI Called automatically by the game loop, decides when to launch particles and when to "die".

func (*ParticlesArcadeEmitter) UpdateZ

func (self *ParticlesArcadeEmitter) UpdateZ()

UpdateZ Internal method that re-applies all of the children's Z values.

This must be called whenever children ordering is altered so that their `z` indices are correctly updated.

func (*ParticlesArcadeEmitter) UpdateZI

func (self *ParticlesArcadeEmitter) UpdateZI(args ...interface{})

UpdateZI Internal method that re-applies all of the children's Z values.

This must be called whenever children ordering is altered so that their `z` indices are correctly updated.

func (*ParticlesArcadeEmitter) Visible

func (self *ParticlesArcadeEmitter) Visible() bool

Visible The visible state of the group. Non-visible Groups and all of their children are not rendered.

func (*ParticlesArcadeEmitter) Width

func (self *ParticlesArcadeEmitter) Width() int

Width Gets or sets the width of the Emitter. This is the region in which a particle can be emitted.

func (*ParticlesArcadeEmitter) X

func (self *ParticlesArcadeEmitter) X() int

X Gets or sets the x position of the Emitter.

func (*ParticlesArcadeEmitter) Xy

func (self *ParticlesArcadeEmitter) Xy(index int, x int, y int)

Xy Positions the child found at the given index within this group to the given x and y coordinates.

func (*ParticlesArcadeEmitter) XyI

func (self *ParticlesArcadeEmitter) XyI(args ...interface{})

XyI Positions the child found at the given index within this group to the given x and y coordinates.

func (*ParticlesArcadeEmitter) Y

func (self *ParticlesArcadeEmitter) Y() int

Y Gets or sets the y position of the Emitter.

func (*ParticlesArcadeEmitter) Z

func (self *ParticlesArcadeEmitter) Z() int

Z The z-depth value of this object within its parent container/Group - the World is a Group as well. This value must be unique for each child in a Group.

type PhaserGame

type PhaserGame Game

type Physics

type Physics struct {
	*js.Object
}

Physics The Physics Manager is responsible for looking after all of the running physics systems. Phaser supports 4 physics systems: Arcade Physics, P2, Ninja Physics and Box2D via a commercial plugin.

Game Objects (such as Sprites) can only belong to 1 physics system, but you can have multiple systems active in a single game.

For example you could have P2 managing a polygon-built terrain landscape that an vehicle drives over, while it could be firing bullets that use the faster (due to being much simpler) Arcade Physics system.

func NewPhysics

func NewPhysics(game *Game) *Physics

NewPhysics The Physics Manager is responsible for looking after all of the running physics systems. Phaser supports 4 physics systems: Arcade Physics, P2, Ninja Physics and Box2D via a commercial plugin.

Game Objects (such as Sprites) can only belong to 1 physics system, but you can have multiple systems active in a single game.

For example you could have P2 managing a polygon-built terrain landscape that an vehicle drives over, while it could be firing bullets that use the faster (due to being much simpler) Arcade Physics system.

func NewPhysics1O

func NewPhysics1O(game *Game, physicsConfig interface{}) *Physics

NewPhysics1O The Physics Manager is responsible for looking after all of the running physics systems. Phaser supports 4 physics systems: Arcade Physics, P2, Ninja Physics and Box2D via a commercial plugin.

Game Objects (such as Sprites) can only belong to 1 physics system, but you can have multiple systems active in a single game.

For example you could have P2 managing a polygon-built terrain landscape that an vehicle drives over, while it could be firing bullets that use the faster (due to being much simpler) Arcade Physics system.

func NewPhysicsI

func NewPhysicsI(args ...interface{}) *Physics

NewPhysicsI The Physics Manager is responsible for looking after all of the running physics systems. Phaser supports 4 physics systems: Arcade Physics, P2, Ninja Physics and Box2D via a commercial plugin.

Game Objects (such as Sprites) can only belong to 1 physics system, but you can have multiple systems active in a single game.

For example you could have P2 managing a polygon-built terrain landscape that an vehicle drives over, while it could be firing bullets that use the faster (due to being much simpler) Arcade Physics system.

func ToPhysics

func ToPhysics(jsStruct interface{}) *Physics

Physics Binding conversion method to Physics point

func (*Physics) ARCADE

func (self *Physics) ARCADE() int

ARCADE empty description

func (*Physics) Arcade

func (self *Physics) Arcade() *PhysicsArcade

Arcade The Arcade Physics system.

func (*Physics) BOX2D

func (self *Physics) BOX2D() int

BOX2D empty description

func (*Physics) Box2d

func (self *Physics) Box2d() *PhysicsBox2D

Box2d The Box2D Physics system.

func (*Physics) CHIPMUNK

func (self *Physics) CHIPMUNK() int

CHIPMUNK empty description

func (*Physics) Chipmunk

func (self *Physics) Chipmunk() *PhysicsChipmunk

Chipmunk The Chipmunk Physics system (to be done).

func (*Physics) Clear

func (self *Physics) Clear()

Clear Clears down all active physics systems. This doesn't destroy them, it just clears them of objects and is called when the State changes.

func (*Physics) ClearI

func (self *Physics) ClearI(args ...interface{})

ClearI Clears down all active physics systems. This doesn't destroy them, it just clears them of objects and is called when the State changes.

func (*Physics) Config

func (self *Physics) Config() interface{}

Config The physics configuration object as passed to the game on creation.

func (*Physics) Destroy

func (self *Physics) Destroy()

Destroy Destroys all active physics systems. Usually only called on a Game Shutdown, not on a State swap.

func (*Physics) DestroyI

func (self *Physics) DestroyI(args ...interface{})

DestroyI Destroys all active physics systems. Usually only called on a Game Shutdown, not on a State swap.

func (*Physics) Enable

func (self *Physics) Enable(object interface{})

Enable This will create a default physics body on the given game object or array of objects. A game object can only have 1 physics body active at any one time, and it can't be changed until the object is destroyed. It can be for any of the physics systems that have been started:

Phaser.Physics.Arcade - A light weight AABB based collision system with basic separation. Phaser.Physics.P2JS - A full-body advanced physics system supporting multiple object shapes, polygon loading, contact materials, springs and constraints. Phaser.Physics.NINJA - A port of Metanet Softwares N+ physics system. Advanced AABB and Circle vs. Tile collision. Phaser.Physics.BOX2D - A port of https://code.google.com/p/box2d-html5 Phaser.Physics.MATTER - A full-body and light-weight advanced physics system (still in development) Phaser.Physics.CHIPMUNK is still in development.

If you require more control over what type of body is created, for example to create a Ninja Physics Circle instead of the default AABB, then see the individual physics systems `enable` methods instead of using this generic one.

func (*Physics) Enable1O

func (self *Physics) Enable1O(object interface{}, system int)

Enable1O This will create a default physics body on the given game object or array of objects. A game object can only have 1 physics body active at any one time, and it can't be changed until the object is destroyed. It can be for any of the physics systems that have been started:

Phaser.Physics.Arcade - A light weight AABB based collision system with basic separation. Phaser.Physics.P2JS - A full-body advanced physics system supporting multiple object shapes, polygon loading, contact materials, springs and constraints. Phaser.Physics.NINJA - A port of Metanet Softwares N+ physics system. Advanced AABB and Circle vs. Tile collision. Phaser.Physics.BOX2D - A port of https://code.google.com/p/box2d-html5 Phaser.Physics.MATTER - A full-body and light-weight advanced physics system (still in development) Phaser.Physics.CHIPMUNK is still in development.

If you require more control over what type of body is created, for example to create a Ninja Physics Circle instead of the default AABB, then see the individual physics systems `enable` methods instead of using this generic one.

func (*Physics) Enable2O

func (self *Physics) Enable2O(object interface{}, system int, debug bool)

Enable2O This will create a default physics body on the given game object or array of objects. A game object can only have 1 physics body active at any one time, and it can't be changed until the object is destroyed. It can be for any of the physics systems that have been started:

Phaser.Physics.Arcade - A light weight AABB based collision system with basic separation. Phaser.Physics.P2JS - A full-body advanced physics system supporting multiple object shapes, polygon loading, contact materials, springs and constraints. Phaser.Physics.NINJA - A port of Metanet Softwares N+ physics system. Advanced AABB and Circle vs. Tile collision. Phaser.Physics.BOX2D - A port of https://code.google.com/p/box2d-html5 Phaser.Physics.MATTER - A full-body and light-weight advanced physics system (still in development) Phaser.Physics.CHIPMUNK is still in development.

If you require more control over what type of body is created, for example to create a Ninja Physics Circle instead of the default AABB, then see the individual physics systems `enable` methods instead of using this generic one.

func (*Physics) EnableI

func (self *Physics) EnableI(args ...interface{})

EnableI This will create a default physics body on the given game object or array of objects. A game object can only have 1 physics body active at any one time, and it can't be changed until the object is destroyed. It can be for any of the physics systems that have been started:

Phaser.Physics.Arcade - A light weight AABB based collision system with basic separation. Phaser.Physics.P2JS - A full-body advanced physics system supporting multiple object shapes, polygon loading, contact materials, springs and constraints. Phaser.Physics.NINJA - A port of Metanet Softwares N+ physics system. Advanced AABB and Circle vs. Tile collision. Phaser.Physics.BOX2D - A port of https://code.google.com/p/box2d-html5 Phaser.Physics.MATTER - A full-body and light-weight advanced physics system (still in development) Phaser.Physics.CHIPMUNK is still in development.

If you require more control over what type of body is created, for example to create a Ninja Physics Circle instead of the default AABB, then see the individual physics systems `enable` methods instead of using this generic one.

func (*Physics) Game

func (self *Physics) Game() *Game

Game Local reference to game.

func (*Physics) MATTERJS

func (self *Physics) MATTERJS() int

MATTERJS empty description

func (*Physics) Matter

func (self *Physics) Matter() *PhysicsMatter

Matter The MatterJS Physics system (coming soon).

func (*Physics) NINJA

func (self *Physics) NINJA() int

NINJA empty description

func (*Physics) Ninja

func (self *Physics) Ninja() *PhysicsNinja

Ninja The N+ Ninja Physics system.

func (*Physics) P2

func (self *Physics) P2() *PhysicsP2

P2 The P2.JS Physics system.

func (*Physics) P2JS

func (self *Physics) P2JS() int

P2JS empty description

func (*Physics) ParseConfig

func (self *Physics) ParseConfig()

ParseConfig Parses the Physics Configuration object passed to the Game constructor and starts any physics systems specified within.

func (*Physics) ParseConfigI

func (self *Physics) ParseConfigI(args ...interface{})

ParseConfigI Parses the Physics Configuration object passed to the Game constructor and starts any physics systems specified within.

func (*Physics) PreUpdate

func (self *Physics) PreUpdate()

PreUpdate preUpdate checks.

func (*Physics) PreUpdateI

func (self *Physics) PreUpdateI(args ...interface{})

PreUpdateI preUpdate checks.

func (*Physics) Reset

func (self *Physics) Reset()

Reset Resets the active physics system. Called automatically on a Phaser.State swap.

func (*Physics) ResetI

func (self *Physics) ResetI(args ...interface{})

ResetI Resets the active physics system. Called automatically on a Phaser.State swap.

func (*Physics) SetARCADEA

func (self *Physics) SetARCADEA(member int)

SetARCADEA empty description

func (*Physics) SetArcadeA

func (self *Physics) SetArcadeA(member *PhysicsArcade)

SetArcadeA The Arcade Physics system.

func (*Physics) SetBOX2DA

func (self *Physics) SetBOX2DA(member int)

SetBOX2DA empty description

func (*Physics) SetBoundsToWorld

func (self *Physics) SetBoundsToWorld()

SetBoundsToWorld Updates the physics bounds to match the world dimensions.

func (*Physics) SetBoundsToWorldI

func (self *Physics) SetBoundsToWorldI(args ...interface{})

SetBoundsToWorldI Updates the physics bounds to match the world dimensions.

func (*Physics) SetBox2dA

func (self *Physics) SetBox2dA(member *PhysicsBox2D)

SetBox2dA The Box2D Physics system.

func (*Physics) SetCHIPMUNKA

func (self *Physics) SetCHIPMUNKA(member int)

SetCHIPMUNKA empty description

func (*Physics) SetChipmunkA

func (self *Physics) SetChipmunkA(member *PhysicsChipmunk)

SetChipmunkA The Chipmunk Physics system (to be done).

func (*Physics) SetConfigA

func (self *Physics) SetConfigA(member interface{})

SetConfigA The physics configuration object as passed to the game on creation.

func (*Physics) SetGameA

func (self *Physics) SetGameA(member *Game)

SetGameA Local reference to game.

func (*Physics) SetMATTERJSA

func (self *Physics) SetMATTERJSA(member int)

SetMATTERJSA empty description

func (*Physics) SetMatterA

func (self *Physics) SetMatterA(member *PhysicsMatter)

SetMatterA The MatterJS Physics system (coming soon).

func (*Physics) SetNINJAA

func (self *Physics) SetNINJAA(member int)

SetNINJAA empty description

func (*Physics) SetNinjaA

func (self *Physics) SetNinjaA(member *PhysicsNinja)

SetNinjaA The N+ Ninja Physics system.

func (*Physics) SetP2A

func (self *Physics) SetP2A(member *PhysicsP2)

SetP2A The P2.JS Physics system.

func (*Physics) SetP2JSA

func (self *Physics) SetP2JSA(member int)

SetP2JSA empty description

func (*Physics) StartSystem

func (self *Physics) StartSystem(system int)

StartSystem This will create an instance of the requested physics simulation. Phaser.Physics.Arcade is running by default, but all others need activating directly.

You can start the following physics systems:

Phaser.Physics.P2JS - A full-body advanced physics system by Stefan Hedman. Phaser.Physics.NINJA - A port of Metanet Softwares N+ physics system. Phaser.Physics.BOX2D - A commercial Phaser Plugin (see http://phaser.io)

Both Ninja Physics and Box2D require their respective plugins to be loaded before you can start them. They are not bundled into the core Phaser library.

If the physics world has already been created (i.e. in another state in your game) then calling startSystem will reset the physics world, not re-create it. If you need to start them again from their constructors then set Phaser.Physics.p2 (or whichever system you want to recreate) to `null` before calling `startSystem`.

func (*Physics) StartSystemI

func (self *Physics) StartSystemI(args ...interface{})

StartSystemI This will create an instance of the requested physics simulation. Phaser.Physics.Arcade is running by default, but all others need activating directly.

You can start the following physics systems:

Phaser.Physics.P2JS - A full-body advanced physics system by Stefan Hedman. Phaser.Physics.NINJA - A port of Metanet Softwares N+ physics system. Phaser.Physics.BOX2D - A commercial Phaser Plugin (see http://phaser.io)

Both Ninja Physics and Box2D require their respective plugins to be loaded before you can start them. They are not bundled into the core Phaser library.

If the physics world has already been created (i.e. in another state in your game) then calling startSystem will reset the physics world, not re-create it. If you need to start them again from their constructors then set Phaser.Physics.p2 (or whichever system you want to recreate) to `null` before calling `startSystem`.

func (*Physics) Update

func (self *Physics) Update()

Update Updates all running physics systems.

func (*Physics) UpdateI

func (self *Physics) UpdateI(args ...interface{})

UpdateI Updates all running physics systems.

type PhysicsArcade

type PhysicsArcade struct {
	*js.Object
}

PhysicsArcade The Arcade Physics world. Contains Arcade Physics related collision, overlap and motion methods.

func NewPhysicsArcade

func NewPhysicsArcade(game *Game) *PhysicsArcade

NewPhysicsArcade The Arcade Physics world. Contains Arcade Physics related collision, overlap and motion methods.

func NewPhysicsArcadeI

func NewPhysicsArcadeI(args ...interface{}) *PhysicsArcade

NewPhysicsArcadeI The Arcade Physics world. Contains Arcade Physics related collision, overlap and motion methods.

func ToPhysicsArcade

func ToPhysicsArcade(jsStruct interface{}) *PhysicsArcade

PhysicsArcade Binding conversion method to PhysicsArcade point

func (*PhysicsArcade) AccelerateToObject

func (self *PhysicsArcade) AccelerateToObject(displayObject interface{}, destination interface{}) int

AccelerateToObject Sets the acceleration.x/y property on the display object so it will move towards the target at the given speed (in pixels per second sq.) You must give a maximum speed value, beyond which the display object won't go any faster. Note: The display object does not continuously track the target. If the target changes location during transit the display object will not modify its course. Note: The display object doesn't stop moving once it reaches the destination coordinates.

func (*PhysicsArcade) AccelerateToObject1O

func (self *PhysicsArcade) AccelerateToObject1O(displayObject interface{}, destination interface{}, speed int) int

AccelerateToObject1O Sets the acceleration.x/y property on the display object so it will move towards the target at the given speed (in pixels per second sq.) You must give a maximum speed value, beyond which the display object won't go any faster. Note: The display object does not continuously track the target. If the target changes location during transit the display object will not modify its course. Note: The display object doesn't stop moving once it reaches the destination coordinates.

func (*PhysicsArcade) AccelerateToObject2O

func (self *PhysicsArcade) AccelerateToObject2O(displayObject interface{}, destination interface{}, speed int, xSpeedMax int) int

AccelerateToObject2O Sets the acceleration.x/y property on the display object so it will move towards the target at the given speed (in pixels per second sq.) You must give a maximum speed value, beyond which the display object won't go any faster. Note: The display object does not continuously track the target. If the target changes location during transit the display object will not modify its course. Note: The display object doesn't stop moving once it reaches the destination coordinates.

func (*PhysicsArcade) AccelerateToObject3O

func (self *PhysicsArcade) AccelerateToObject3O(displayObject interface{}, destination interface{}, speed int, xSpeedMax int, ySpeedMax int) int

AccelerateToObject3O Sets the acceleration.x/y property on the display object so it will move towards the target at the given speed (in pixels per second sq.) You must give a maximum speed value, beyond which the display object won't go any faster. Note: The display object does not continuously track the target. If the target changes location during transit the display object will not modify its course. Note: The display object doesn't stop moving once it reaches the destination coordinates.

func (*PhysicsArcade) AccelerateToObjectI

func (self *PhysicsArcade) AccelerateToObjectI(args ...interface{}) int

AccelerateToObjectI Sets the acceleration.x/y property on the display object so it will move towards the target at the given speed (in pixels per second sq.) You must give a maximum speed value, beyond which the display object won't go any faster. Note: The display object does not continuously track the target. If the target changes location during transit the display object will not modify its course. Note: The display object doesn't stop moving once it reaches the destination coordinates.

func (*PhysicsArcade) AccelerateToPointer

func (self *PhysicsArcade) AccelerateToPointer(displayObject interface{}) int

AccelerateToPointer Sets the acceleration.x/y property on the display object so it will move towards the target at the given speed (in pixels per second sq.) You must give a maximum speed value, beyond which the display object won't go any faster. Note: The display object does not continuously track the target. If the target changes location during transit the display object will not modify its course. Note: The display object doesn't stop moving once it reaches the destination coordinates.

func (*PhysicsArcade) AccelerateToPointer1O

func (self *PhysicsArcade) AccelerateToPointer1O(displayObject interface{}, pointer *Pointer) int

AccelerateToPointer1O Sets the acceleration.x/y property on the display object so it will move towards the target at the given speed (in pixels per second sq.) You must give a maximum speed value, beyond which the display object won't go any faster. Note: The display object does not continuously track the target. If the target changes location during transit the display object will not modify its course. Note: The display object doesn't stop moving once it reaches the destination coordinates.

func (*PhysicsArcade) AccelerateToPointer2O

func (self *PhysicsArcade) AccelerateToPointer2O(displayObject interface{}, pointer *Pointer, speed int) int

AccelerateToPointer2O Sets the acceleration.x/y property on the display object so it will move towards the target at the given speed (in pixels per second sq.) You must give a maximum speed value, beyond which the display object won't go any faster. Note: The display object does not continuously track the target. If the target changes location during transit the display object will not modify its course. Note: The display object doesn't stop moving once it reaches the destination coordinates.

func (*PhysicsArcade) AccelerateToPointer3O

func (self *PhysicsArcade) AccelerateToPointer3O(displayObject interface{}, pointer *Pointer, speed int, xSpeedMax int) int

AccelerateToPointer3O Sets the acceleration.x/y property on the display object so it will move towards the target at the given speed (in pixels per second sq.) You must give a maximum speed value, beyond which the display object won't go any faster. Note: The display object does not continuously track the target. If the target changes location during transit the display object will not modify its course. Note: The display object doesn't stop moving once it reaches the destination coordinates.

func (*PhysicsArcade) AccelerateToPointer4O

func (self *PhysicsArcade) AccelerateToPointer4O(displayObject interface{}, pointer *Pointer, speed int, xSpeedMax int, ySpeedMax int) int

AccelerateToPointer4O Sets the acceleration.x/y property on the display object so it will move towards the target at the given speed (in pixels per second sq.) You must give a maximum speed value, beyond which the display object won't go any faster. Note: The display object does not continuously track the target. If the target changes location during transit the display object will not modify its course. Note: The display object doesn't stop moving once it reaches the destination coordinates.

func (*PhysicsArcade) AccelerateToPointerI

func (self *PhysicsArcade) AccelerateToPointerI(args ...interface{}) int

AccelerateToPointerI Sets the acceleration.x/y property on the display object so it will move towards the target at the given speed (in pixels per second sq.) You must give a maximum speed value, beyond which the display object won't go any faster. Note: The display object does not continuously track the target. If the target changes location during transit the display object will not modify its course. Note: The display object doesn't stop moving once it reaches the destination coordinates.

func (*PhysicsArcade) AccelerateToXY

func (self *PhysicsArcade) AccelerateToXY(displayObject interface{}, x int, y int) int

AccelerateToXY Sets the acceleration.x/y property on the display object so it will move towards the x/y coordinates at the given speed (in pixels per second sq.) You must give a maximum speed value, beyond which the display object won't go any faster. Note: The display object does not continuously track the target. If the target changes location during transit the display object will not modify its course. Note: The display object doesn't stop moving once it reaches the destination coordinates.

func (*PhysicsArcade) AccelerateToXY1O

func (self *PhysicsArcade) AccelerateToXY1O(displayObject interface{}, x int, y int, speed int) int

AccelerateToXY1O Sets the acceleration.x/y property on the display object so it will move towards the x/y coordinates at the given speed (in pixels per second sq.) You must give a maximum speed value, beyond which the display object won't go any faster. Note: The display object does not continuously track the target. If the target changes location during transit the display object will not modify its course. Note: The display object doesn't stop moving once it reaches the destination coordinates.

func (*PhysicsArcade) AccelerateToXY2O

func (self *PhysicsArcade) AccelerateToXY2O(displayObject interface{}, x int, y int, speed int, xSpeedMax int) int

AccelerateToXY2O Sets the acceleration.x/y property on the display object so it will move towards the x/y coordinates at the given speed (in pixels per second sq.) You must give a maximum speed value, beyond which the display object won't go any faster. Note: The display object does not continuously track the target. If the target changes location during transit the display object will not modify its course. Note: The display object doesn't stop moving once it reaches the destination coordinates.

func (*PhysicsArcade) AccelerateToXY3O

func (self *PhysicsArcade) AccelerateToXY3O(displayObject interface{}, x int, y int, speed int, xSpeedMax int, ySpeedMax int) int

AccelerateToXY3O Sets the acceleration.x/y property on the display object so it will move towards the x/y coordinates at the given speed (in pixels per second sq.) You must give a maximum speed value, beyond which the display object won't go any faster. Note: The display object does not continuously track the target. If the target changes location during transit the display object will not modify its course. Note: The display object doesn't stop moving once it reaches the destination coordinates.

func (*PhysicsArcade) AccelerateToXYI

func (self *PhysicsArcade) AccelerateToXYI(args ...interface{}) int

AccelerateToXYI Sets the acceleration.x/y property on the display object so it will move towards the x/y coordinates at the given speed (in pixels per second sq.) You must give a maximum speed value, beyond which the display object won't go any faster. Note: The display object does not continuously track the target. If the target changes location during transit the display object will not modify its course. Note: The display object doesn't stop moving once it reaches the destination coordinates.

func (*PhysicsArcade) AccelerationFromRotation

func (self *PhysicsArcade) AccelerationFromRotation(rotation int) *Point

AccelerationFromRotation Given the rotation (in radians) and speed calculate the acceleration and return it as a Point object, or set it to the given point object. One way to use this is: accelerationFromRotation(rotation, 200, sprite.acceleration) which will set the values directly to the sprites acceleration and not create a new Point object.

func (*PhysicsArcade) AccelerationFromRotation1O

func (self *PhysicsArcade) AccelerationFromRotation1O(rotation int, speed int) *Point

AccelerationFromRotation1O Given the rotation (in radians) and speed calculate the acceleration and return it as a Point object, or set it to the given point object. One way to use this is: accelerationFromRotation(rotation, 200, sprite.acceleration) which will set the values directly to the sprites acceleration and not create a new Point object.

func (*PhysicsArcade) AccelerationFromRotation2O

func (self *PhysicsArcade) AccelerationFromRotation2O(rotation int, speed int, point interface{}) *Point

AccelerationFromRotation2O Given the rotation (in radians) and speed calculate the acceleration and return it as a Point object, or set it to the given point object. One way to use this is: accelerationFromRotation(rotation, 200, sprite.acceleration) which will set the values directly to the sprites acceleration and not create a new Point object.

func (*PhysicsArcade) AccelerationFromRotationI

func (self *PhysicsArcade) AccelerationFromRotationI(args ...interface{}) *Point

AccelerationFromRotationI Given the rotation (in radians) and speed calculate the acceleration and return it as a Point object, or set it to the given point object. One way to use this is: accelerationFromRotation(rotation, 200, sprite.acceleration) which will set the values directly to the sprites acceleration and not create a new Point object.

func (*PhysicsArcade) AngleBetween

func (self *PhysicsArcade) AngleBetween(source interface{}, target interface{}) int

AngleBetween Find the angle in radians between two display objects (like Sprites).

The optional `world` argument allows you to return the result based on the Game Objects `world` property, instead of its `x` and `y` values. This is useful of the object has been nested inside an offset Group, or parent Game Object.

func (*PhysicsArcade) AngleBetween1O

func (self *PhysicsArcade) AngleBetween1O(source interface{}, target interface{}, world bool) int

AngleBetween1O Find the angle in radians between two display objects (like Sprites).

The optional `world` argument allows you to return the result based on the Game Objects `world` property, instead of its `x` and `y` values. This is useful of the object has been nested inside an offset Group, or parent Game Object.

func (*PhysicsArcade) AngleBetweenCenters

func (self *PhysicsArcade) AngleBetweenCenters(source interface{}, target interface{}) int

AngleBetweenCenters Find the angle in radians between centers of two display objects (like Sprites).

func (*PhysicsArcade) AngleBetweenCentersI

func (self *PhysicsArcade) AngleBetweenCentersI(args ...interface{}) int

AngleBetweenCentersI Find the angle in radians between centers of two display objects (like Sprites).

func (*PhysicsArcade) AngleBetweenI

func (self *PhysicsArcade) AngleBetweenI(args ...interface{}) int

AngleBetweenI Find the angle in radians between two display objects (like Sprites).

The optional `world` argument allows you to return the result based on the Game Objects `world` property, instead of its `x` and `y` values. This is useful of the object has been nested inside an offset Group, or parent Game Object.

func (*PhysicsArcade) AngleToPointer

func (self *PhysicsArcade) AngleToPointer(displayObject interface{}) int

AngleToPointer Find the angle in radians between a display object (like a Sprite) and a Pointer, taking their x/y and center into account.

The optional `world` argument allows you to return the result based on the Game Objects `world` property, instead of its `x` and `y` values. This is useful of the object has been nested inside an offset Group, or parent Game Object.

func (*PhysicsArcade) AngleToPointer1O

func (self *PhysicsArcade) AngleToPointer1O(displayObject interface{}, pointer *Pointer) int

AngleToPointer1O Find the angle in radians between a display object (like a Sprite) and a Pointer, taking their x/y and center into account.

The optional `world` argument allows you to return the result based on the Game Objects `world` property, instead of its `x` and `y` values. This is useful of the object has been nested inside an offset Group, or parent Game Object.

func (*PhysicsArcade) AngleToPointer2O

func (self *PhysicsArcade) AngleToPointer2O(displayObject interface{}, pointer *Pointer, world bool) int

AngleToPointer2O Find the angle in radians between a display object (like a Sprite) and a Pointer, taking their x/y and center into account.

The optional `world` argument allows you to return the result based on the Game Objects `world` property, instead of its `x` and `y` values. This is useful of the object has been nested inside an offset Group, or parent Game Object.

func (*PhysicsArcade) AngleToPointerI

func (self *PhysicsArcade) AngleToPointerI(args ...interface{}) int

AngleToPointerI Find the angle in radians between a display object (like a Sprite) and a Pointer, taking their x/y and center into account.

The optional `world` argument allows you to return the result based on the Game Objects `world` property, instead of its `x` and `y` values. This is useful of the object has been nested inside an offset Group, or parent Game Object.

func (*PhysicsArcade) AngleToXY

func (self *PhysicsArcade) AngleToXY(displayObject interface{}, x int, y int) int

AngleToXY Find the angle in radians between a display object (like a Sprite) and the given x/y coordinate.

The optional `world` argument allows you to return the result based on the Game Objects `world` property, instead of its `x` and `y` values. This is useful of the object has been nested inside an offset Group, or parent Game Object.

func (*PhysicsArcade) AngleToXY1O

func (self *PhysicsArcade) AngleToXY1O(displayObject interface{}, x int, y int, world bool) int

AngleToXY1O Find the angle in radians between a display object (like a Sprite) and the given x/y coordinate.

The optional `world` argument allows you to return the result based on the Game Objects `world` property, instead of its `x` and `y` values. This is useful of the object has been nested inside an offset Group, or parent Game Object.

func (*PhysicsArcade) AngleToXYI

func (self *PhysicsArcade) AngleToXYI(args ...interface{}) int

AngleToXYI Find the angle in radians between a display object (like a Sprite) and the given x/y coordinate.

The optional `world` argument allows you to return the result based on the Game Objects `world` property, instead of its `x` and `y` values. This is useful of the object has been nested inside an offset Group, or parent Game Object.

func (*PhysicsArcade) BOTTOM_TOP

func (self *PhysicsArcade) BOTTOM_TOP() int

BOTTOM_TOP A constant used for the sortDirection value. Use this if your game world is narrow but tall and scrolls from the bottom to the top (i.e. Commando or a vertically scrolling shoot-em-up)

func (*PhysicsArcade) Bounds

func (self *PhysicsArcade) Bounds() *Rectangle

Bounds The bounds inside of which the physics world exists. Defaults to match the world bounds.

func (*PhysicsArcade) CheckCollision

func (self *PhysicsArcade) CheckCollision() interface{}

CheckCollision Set the checkCollision properties to control for which bounds collision is processed. For example checkCollision.down = false means Bodies cannot collide with the World.bounds.bottom. An object containing allowed collision flags.

func (*PhysicsArcade) CircleBodyIntersects

func (self *PhysicsArcade) CircleBodyIntersects(circle *PhysicsArcadeBody, body *PhysicsArcadeBody) bool

CircleBodyIntersects Checks to see if a circular Body intersects with a Rectangular Body.

func (*PhysicsArcade) CircleBodyIntersectsI

func (self *PhysicsArcade) CircleBodyIntersectsI(args ...interface{}) bool

CircleBodyIntersectsI Checks to see if a circular Body intersects with a Rectangular Body.

func (*PhysicsArcade) Collide

func (self *PhysicsArcade) Collide(object1 interface{}, object2 interface{}) bool

Collide Checks for collision between two game objects. You can perform Sprite vs. Sprite, Sprite vs. Group, Group vs. Group, Sprite vs. Tilemap Layer or Group vs. Tilemap Layer collisions. Both the first and second parameter can be arrays of objects, of differing types. If two arrays are passed, the contents of the first parameter will be tested against all contents of the 2nd parameter. The objects are also automatically separated. If you don't require separation then use ArcadePhysics.overlap instead. An optional processCallback can be provided. If given this function will be called when two sprites are found to be colliding. It is called before any separation takes place, giving you the chance to perform additional checks. If the function returns true then the collision and separation is carried out. If it returns false it is skipped. The collideCallback is an optional function that is only called if two sprites collide. If a processCallback has been set then it needs to return true for collideCallback to be called. NOTE: This function is not recursive, and will not test against children of objects passed (i.e. Groups or Tilemaps within other Groups).

func (*PhysicsArcade) Collide1O

func (self *PhysicsArcade) Collide1O(object1 interface{}, object2 interface{}, collideCallback interface{}) bool

Collide1O Checks for collision between two game objects. You can perform Sprite vs. Sprite, Sprite vs. Group, Group vs. Group, Sprite vs. Tilemap Layer or Group vs. Tilemap Layer collisions. Both the first and second parameter can be arrays of objects, of differing types. If two arrays are passed, the contents of the first parameter will be tested against all contents of the 2nd parameter. The objects are also automatically separated. If you don't require separation then use ArcadePhysics.overlap instead. An optional processCallback can be provided. If given this function will be called when two sprites are found to be colliding. It is called before any separation takes place, giving you the chance to perform additional checks. If the function returns true then the collision and separation is carried out. If it returns false it is skipped. The collideCallback is an optional function that is only called if two sprites collide. If a processCallback has been set then it needs to return true for collideCallback to be called. NOTE: This function is not recursive, and will not test against children of objects passed (i.e. Groups or Tilemaps within other Groups).

func (*PhysicsArcade) Collide2O

func (self *PhysicsArcade) Collide2O(object1 interface{}, object2 interface{}, collideCallback interface{}, processCallback interface{}) bool

Collide2O Checks for collision between two game objects. You can perform Sprite vs. Sprite, Sprite vs. Group, Group vs. Group, Sprite vs. Tilemap Layer or Group vs. Tilemap Layer collisions. Both the first and second parameter can be arrays of objects, of differing types. If two arrays are passed, the contents of the first parameter will be tested against all contents of the 2nd parameter. The objects are also automatically separated. If you don't require separation then use ArcadePhysics.overlap instead. An optional processCallback can be provided. If given this function will be called when two sprites are found to be colliding. It is called before any separation takes place, giving you the chance to perform additional checks. If the function returns true then the collision and separation is carried out. If it returns false it is skipped. The collideCallback is an optional function that is only called if two sprites collide. If a processCallback has been set then it needs to return true for collideCallback to be called. NOTE: This function is not recursive, and will not test against children of objects passed (i.e. Groups or Tilemaps within other Groups).

func (*PhysicsArcade) Collide3O

func (self *PhysicsArcade) Collide3O(object1 interface{}, object2 interface{}, collideCallback interface{}, processCallback interface{}, callbackContext interface{}) bool

Collide3O Checks for collision between two game objects. You can perform Sprite vs. Sprite, Sprite vs. Group, Group vs. Group, Sprite vs. Tilemap Layer or Group vs. Tilemap Layer collisions. Both the first and second parameter can be arrays of objects, of differing types. If two arrays are passed, the contents of the first parameter will be tested against all contents of the 2nd parameter. The objects are also automatically separated. If you don't require separation then use ArcadePhysics.overlap instead. An optional processCallback can be provided. If given this function will be called when two sprites are found to be colliding. It is called before any separation takes place, giving you the chance to perform additional checks. If the function returns true then the collision and separation is carried out. If it returns false it is skipped. The collideCallback is an optional function that is only called if two sprites collide. If a processCallback has been set then it needs to return true for collideCallback to be called. NOTE: This function is not recursive, and will not test against children of objects passed (i.e. Groups or Tilemaps within other Groups).

func (*PhysicsArcade) CollideGroupVsGroup

func (self *PhysicsArcade) CollideGroupVsGroup(group1 *Group, group2 *Group, collideCallback interface{}, processCallback interface{}, callbackContext interface{}, overlapOnly bool)

CollideGroupVsGroup An internal function. Use Phaser.Physics.Arcade.collide instead.

func (*PhysicsArcade) CollideGroupVsGroupI

func (self *PhysicsArcade) CollideGroupVsGroupI(args ...interface{})

CollideGroupVsGroupI An internal function. Use Phaser.Physics.Arcade.collide instead.

func (*PhysicsArcade) CollideGroupVsSelf

func (self *PhysicsArcade) CollideGroupVsSelf(group *Group, collideCallback interface{}, processCallback interface{}, callbackContext interface{}, overlapOnly bool) bool

CollideGroupVsSelf An internal function. Use Phaser.Physics.Arcade.collide instead.

func (*PhysicsArcade) CollideGroupVsSelfI

func (self *PhysicsArcade) CollideGroupVsSelfI(args ...interface{}) bool

CollideGroupVsSelfI An internal function. Use Phaser.Physics.Arcade.collide instead.

func (*PhysicsArcade) CollideHandler

func (self *PhysicsArcade) CollideHandler(object1 interface{}, object2 interface{}, collideCallback interface{}, processCallback interface{}, callbackContext interface{}, overlapOnly bool)

CollideHandler Internal collision handler.

func (*PhysicsArcade) CollideHandlerI

func (self *PhysicsArcade) CollideHandlerI(args ...interface{})

CollideHandlerI Internal collision handler.

func (*PhysicsArcade) CollideI

func (self *PhysicsArcade) CollideI(args ...interface{}) bool

CollideI Checks for collision between two game objects. You can perform Sprite vs. Sprite, Sprite vs. Group, Group vs. Group, Sprite vs. Tilemap Layer or Group vs. Tilemap Layer collisions. Both the first and second parameter can be arrays of objects, of differing types. If two arrays are passed, the contents of the first parameter will be tested against all contents of the 2nd parameter. The objects are also automatically separated. If you don't require separation then use ArcadePhysics.overlap instead. An optional processCallback can be provided. If given this function will be called when two sprites are found to be colliding. It is called before any separation takes place, giving you the chance to perform additional checks. If the function returns true then the collision and separation is carried out. If it returns false it is skipped. The collideCallback is an optional function that is only called if two sprites collide. If a processCallback has been set then it needs to return true for collideCallback to be called. NOTE: This function is not recursive, and will not test against children of objects passed (i.e. Groups or Tilemaps within other Groups).

func (*PhysicsArcade) CollideSpriteVsGroup

func (self *PhysicsArcade) CollideSpriteVsGroup(sprite *Sprite, group *Group, collideCallback interface{}, processCallback interface{}, callbackContext interface{}, overlapOnly bool)

CollideSpriteVsGroup An internal function. Use Phaser.Physics.Arcade.collide instead.

func (*PhysicsArcade) CollideSpriteVsGroupI

func (self *PhysicsArcade) CollideSpriteVsGroupI(args ...interface{})

CollideSpriteVsGroupI An internal function. Use Phaser.Physics.Arcade.collide instead.

func (*PhysicsArcade) CollideSpriteVsSprite

func (self *PhysicsArcade) CollideSpriteVsSprite(sprite1 *Sprite, sprite2 *Sprite, collideCallback interface{}, processCallback interface{}, callbackContext interface{}, overlapOnly bool) bool

CollideSpriteVsSprite An internal function. Use Phaser.Physics.Arcade.collide instead.

func (*PhysicsArcade) CollideSpriteVsSpriteI

func (self *PhysicsArcade) CollideSpriteVsSpriteI(args ...interface{}) bool

CollideSpriteVsSpriteI An internal function. Use Phaser.Physics.Arcade.collide instead.

func (*PhysicsArcade) ComputeVelocity

func (self *PhysicsArcade) ComputeVelocity(axis int, body *PhysicsArcadeBody, velocity int, acceleration int, drag int) int

ComputeVelocity A tween-like function that takes a starting velocity and some other factors and returns an altered velocity. Based on a function in Flixel by @ADAMATOMIC

func (*PhysicsArcade) ComputeVelocity1O

func (self *PhysicsArcade) ComputeVelocity1O(axis int, body *PhysicsArcadeBody, velocity int, acceleration int, drag int, max int) int

ComputeVelocity1O A tween-like function that takes a starting velocity and some other factors and returns an altered velocity. Based on a function in Flixel by @ADAMATOMIC

func (*PhysicsArcade) ComputeVelocityI

func (self *PhysicsArcade) ComputeVelocityI(args ...interface{}) int

ComputeVelocityI A tween-like function that takes a starting velocity and some other factors and returns an altered velocity. Based on a function in Flixel by @ADAMATOMIC

func (*PhysicsArcade) DistanceBetween

func (self *PhysicsArcade) DistanceBetween(source interface{}, target interface{}) int

DistanceBetween Find the distance between two display objects (like Sprites).

The optional `world` argument allows you to return the result based on the Game Objects `world` property, instead of its `x` and `y` values. This is useful of the object has been nested inside an offset Group, or parent Game Object.

func (*PhysicsArcade) DistanceBetween1O

func (self *PhysicsArcade) DistanceBetween1O(source interface{}, target interface{}, world bool) int

DistanceBetween1O Find the distance between two display objects (like Sprites).

The optional `world` argument allows you to return the result based on the Game Objects `world` property, instead of its `x` and `y` values. This is useful of the object has been nested inside an offset Group, or parent Game Object.

func (*PhysicsArcade) DistanceBetweenI

func (self *PhysicsArcade) DistanceBetweenI(args ...interface{}) int

DistanceBetweenI Find the distance between two display objects (like Sprites).

The optional `world` argument allows you to return the result based on the Game Objects `world` property, instead of its `x` and `y` values. This is useful of the object has been nested inside an offset Group, or parent Game Object.

func (*PhysicsArcade) DistanceToPointer

func (self *PhysicsArcade) DistanceToPointer(displayObject interface{}) int

DistanceToPointer Find the distance between a display object (like a Sprite) and a Pointer. If no Pointer is given the Input.activePointer is used. The calculation is made from the display objects x/y coordinate. This may be the top-left if its anchor hasn't been changed. If you need to calculate from the center of a display object instead use the method distanceBetweenCenters()

The optional `world` argument allows you to return the result based on the Game Objects `world` property, instead of its `x` and `y` values. This is useful of the object has been nested inside an offset Group, or parent Game Object.

func (*PhysicsArcade) DistanceToPointer1O

func (self *PhysicsArcade) DistanceToPointer1O(displayObject interface{}, pointer *Pointer) int

DistanceToPointer1O Find the distance between a display object (like a Sprite) and a Pointer. If no Pointer is given the Input.activePointer is used. The calculation is made from the display objects x/y coordinate. This may be the top-left if its anchor hasn't been changed. If you need to calculate from the center of a display object instead use the method distanceBetweenCenters()

The optional `world` argument allows you to return the result based on the Game Objects `world` property, instead of its `x` and `y` values. This is useful of the object has been nested inside an offset Group, or parent Game Object.

func (*PhysicsArcade) DistanceToPointer2O

func (self *PhysicsArcade) DistanceToPointer2O(displayObject interface{}, pointer *Pointer, world bool) int

DistanceToPointer2O Find the distance between a display object (like a Sprite) and a Pointer. If no Pointer is given the Input.activePointer is used. The calculation is made from the display objects x/y coordinate. This may be the top-left if its anchor hasn't been changed. If you need to calculate from the center of a display object instead use the method distanceBetweenCenters()

The optional `world` argument allows you to return the result based on the Game Objects `world` property, instead of its `x` and `y` values. This is useful of the object has been nested inside an offset Group, or parent Game Object.

func (*PhysicsArcade) DistanceToPointerI

func (self *PhysicsArcade) DistanceToPointerI(args ...interface{}) int

DistanceToPointerI Find the distance between a display object (like a Sprite) and a Pointer. If no Pointer is given the Input.activePointer is used. The calculation is made from the display objects x/y coordinate. This may be the top-left if its anchor hasn't been changed. If you need to calculate from the center of a display object instead use the method distanceBetweenCenters()

The optional `world` argument allows you to return the result based on the Game Objects `world` property, instead of its `x` and `y` values. This is useful of the object has been nested inside an offset Group, or parent Game Object.

func (*PhysicsArcade) DistanceToXY

func (self *PhysicsArcade) DistanceToXY(displayObject interface{}, x int, y int) int

DistanceToXY Find the distance between a display object (like a Sprite) and the given x/y coordinates. The calculation is made from the display objects x/y coordinate. This may be the top-left if its anchor hasn't been changed. If you need to calculate from the center of a display object instead use the method distanceBetweenCenters()

The optional `world` argument allows you to return the result based on the Game Objects `world` property, instead of its `x` and `y` values. This is useful of the object has been nested inside an offset Group, or parent Game Object.

func (*PhysicsArcade) DistanceToXY1O

func (self *PhysicsArcade) DistanceToXY1O(displayObject interface{}, x int, y int, world bool) int

DistanceToXY1O Find the distance between a display object (like a Sprite) and the given x/y coordinates. The calculation is made from the display objects x/y coordinate. This may be the top-left if its anchor hasn't been changed. If you need to calculate from the center of a display object instead use the method distanceBetweenCenters()

The optional `world` argument allows you to return the result based on the Game Objects `world` property, instead of its `x` and `y` values. This is useful of the object has been nested inside an offset Group, or parent Game Object.

func (*PhysicsArcade) DistanceToXYI

func (self *PhysicsArcade) DistanceToXYI(args ...interface{}) int

DistanceToXYI Find the distance between a display object (like a Sprite) and the given x/y coordinates. The calculation is made from the display objects x/y coordinate. This may be the top-left if its anchor hasn't been changed. If you need to calculate from the center of a display object instead use the method distanceBetweenCenters()

The optional `world` argument allows you to return the result based on the Game Objects `world` property, instead of its `x` and `y` values. This is useful of the object has been nested inside an offset Group, or parent Game Object.

func (*PhysicsArcade) Enable

func (self *PhysicsArcade) Enable(object interface{})

Enable This will create an Arcade Physics body on the given game object or array of game objects. A game object can only have 1 physics body active at any one time, and it can't be changed until the object is destroyed.

func (*PhysicsArcade) Enable1O

func (self *PhysicsArcade) Enable1O(object interface{}, children bool)

Enable1O This will create an Arcade Physics body on the given game object or array of game objects. A game object can only have 1 physics body active at any one time, and it can't be changed until the object is destroyed.

func (*PhysicsArcade) EnableBody

func (self *PhysicsArcade) EnableBody(object interface{})

EnableBody Creates an Arcade Physics body on the given game object.

A game object can only have 1 physics body active at any one time, and it can't be changed until the body is nulled.

When you add an Arcade Physics body to an object it will automatically add the object into its parent Groups hash array.

func (*PhysicsArcade) EnableBodyI

func (self *PhysicsArcade) EnableBodyI(args ...interface{})

EnableBodyI Creates an Arcade Physics body on the given game object.

A game object can only have 1 physics body active at any one time, and it can't be changed until the body is nulled.

When you add an Arcade Physics body to an object it will automatically add the object into its parent Groups hash array.

func (*PhysicsArcade) EnableI

func (self *PhysicsArcade) EnableI(args ...interface{})

EnableI This will create an Arcade Physics body on the given game object or array of game objects. A game object can only have 1 physics body active at any one time, and it can't be changed until the object is destroyed.

func (*PhysicsArcade) ForceX

func (self *PhysicsArcade) ForceX() bool

ForceX If true World.separate will always separate on the X axis before Y. Otherwise it will check gravity totals first.

func (*PhysicsArcade) Game

func (self *PhysicsArcade) Game() *Game

Game Local reference to game.

func (*PhysicsArcade) GetObjectsAtLocation

func (self *PhysicsArcade) GetObjectsAtLocation(x int, y int, group *Group) []DisplayObject

GetObjectsAtLocation Given a Group and a location this will check to see which Group children overlap with the coordinates. Each child will be sent to the given callback for further processing. Note that the children are not checked for depth order, but simply if they overlap the coordinate or not.

func (*PhysicsArcade) GetObjectsAtLocation1O

func (self *PhysicsArcade) GetObjectsAtLocation1O(x int, y int, group *Group, callback interface{}) []DisplayObject

GetObjectsAtLocation1O Given a Group and a location this will check to see which Group children overlap with the coordinates. Each child will be sent to the given callback for further processing. Note that the children are not checked for depth order, but simply if they overlap the coordinate or not.

func (*PhysicsArcade) GetObjectsAtLocation2O

func (self *PhysicsArcade) GetObjectsAtLocation2O(x int, y int, group *Group, callback interface{}, callbackContext interface{}) []DisplayObject

GetObjectsAtLocation2O Given a Group and a location this will check to see which Group children overlap with the coordinates. Each child will be sent to the given callback for further processing. Note that the children are not checked for depth order, but simply if they overlap the coordinate or not.

func (*PhysicsArcade) GetObjectsAtLocation3O

func (self *PhysicsArcade) GetObjectsAtLocation3O(x int, y int, group *Group, callback interface{}, callbackContext interface{}, callbackArg interface{}) []DisplayObject

GetObjectsAtLocation3O Given a Group and a location this will check to see which Group children overlap with the coordinates. Each child will be sent to the given callback for further processing. Note that the children are not checked for depth order, but simply if they overlap the coordinate or not.

func (*PhysicsArcade) GetObjectsAtLocationI

func (self *PhysicsArcade) GetObjectsAtLocationI(args ...interface{}) []DisplayObject

GetObjectsAtLocationI Given a Group and a location this will check to see which Group children overlap with the coordinates. Each child will be sent to the given callback for further processing. Note that the children are not checked for depth order, but simply if they overlap the coordinate or not.

func (*PhysicsArcade) GetObjectsUnderPointer

func (self *PhysicsArcade) GetObjectsUnderPointer(pointer *Pointer, group *Group) []DisplayObject

GetObjectsUnderPointer Given a Group and a Pointer this will check to see which Group children overlap with the Pointer coordinates. Each child will be sent to the given callback for further processing. Note that the children are not checked for depth order, but simply if they overlap the Pointer or not.

func (*PhysicsArcade) GetObjectsUnderPointer1O

func (self *PhysicsArcade) GetObjectsUnderPointer1O(pointer *Pointer, group *Group, callback interface{}) []DisplayObject

GetObjectsUnderPointer1O Given a Group and a Pointer this will check to see which Group children overlap with the Pointer coordinates. Each child will be sent to the given callback for further processing. Note that the children are not checked for depth order, but simply if they overlap the Pointer or not.

func (*PhysicsArcade) GetObjectsUnderPointer2O

func (self *PhysicsArcade) GetObjectsUnderPointer2O(pointer *Pointer, group *Group, callback interface{}, callbackContext interface{}) []DisplayObject

GetObjectsUnderPointer2O Given a Group and a Pointer this will check to see which Group children overlap with the Pointer coordinates. Each child will be sent to the given callback for further processing. Note that the children are not checked for depth order, but simply if they overlap the Pointer or not.

func (*PhysicsArcade) GetObjectsUnderPointerI

func (self *PhysicsArcade) GetObjectsUnderPointerI(args ...interface{}) []DisplayObject

GetObjectsUnderPointerI Given a Group and a Pointer this will check to see which Group children overlap with the Pointer coordinates. Each child will be sent to the given callback for further processing. Note that the children are not checked for depth order, but simply if they overlap the Pointer or not.

func (*PhysicsArcade) GetOverlapX

func (self *PhysicsArcade) GetOverlapX(body1 *PhysicsArcadeBody, body2 *PhysicsArcadeBody, overlapOnly bool) float64

GetOverlapX Calculates the horizontal overlap between two Bodies and sets their properties accordingly, including: `touching.left`, `touching.right` and `overlapX`.

func (*PhysicsArcade) GetOverlapXI

func (self *PhysicsArcade) GetOverlapXI(args ...interface{}) float64

GetOverlapXI Calculates the horizontal overlap between two Bodies and sets their properties accordingly, including: `touching.left`, `touching.right` and `overlapX`.

func (*PhysicsArcade) GetOverlapY

func (self *PhysicsArcade) GetOverlapY(body1 *PhysicsArcadeBody, body2 *PhysicsArcadeBody, overlapOnly bool) float64

GetOverlapY Calculates the vertical overlap between two Bodies and sets their properties accordingly, including: `touching.up`, `touching.down` and `overlapY`.

func (*PhysicsArcade) GetOverlapYI

func (self *PhysicsArcade) GetOverlapYI(args ...interface{}) float64

GetOverlapYI Calculates the vertical overlap between two Bodies and sets their properties accordingly, including: `touching.up`, `touching.down` and `overlapY`.

func (*PhysicsArcade) Gravity

func (self *PhysicsArcade) Gravity() *Point

Gravity The World gravity setting. Defaults to x: 0, y: 0, or no gravity.

func (*PhysicsArcade) Intersects

func (self *PhysicsArcade) Intersects(body1 *PhysicsArcadeBody, body2 *PhysicsArcadeBody) bool

Intersects Check for intersection against two bodies.

func (*PhysicsArcade) IntersectsI

func (self *PhysicsArcade) IntersectsI(args ...interface{}) bool

IntersectsI Check for intersection against two bodies.

func (*PhysicsArcade) IsPaused

func (self *PhysicsArcade) IsPaused() bool

IsPaused If `true` the `Body.preUpdate` method will be skipped, halting all motion for all bodies. Note that other methods such as `collide` will still work, so be careful not to call them on paused bodies.

func (*PhysicsArcade) LEFT_RIGHT

func (self *PhysicsArcade) LEFT_RIGHT() int

LEFT_RIGHT A constant used for the sortDirection value. Use this if your game world is wide but short and scrolls from the left to the right (i.e. Mario)

func (*PhysicsArcade) MaxLevels

func (self *PhysicsArcade) MaxLevels() int

MaxLevels Used by the QuadTree to set the maximum number of iteration levels.

func (*PhysicsArcade) MaxObjects

func (self *PhysicsArcade) MaxObjects() int

MaxObjects Used by the QuadTree to set the maximum number of objects per quad.

func (*PhysicsArcade) MoveToObject

func (self *PhysicsArcade) MoveToObject(displayObject interface{}, destination interface{}) int

MoveToObject Move the given display object towards the destination object at a steady velocity. If you specify a maxTime then it will adjust the speed (overwriting what you set) so it arrives at the destination in that number of seconds. Timings are approximate due to the way browser timers work. Allow for a variance of +- 50ms. Note: The display object does not continuously track the target. If the target changes location during transit the display object will not modify its course. Note: The display object doesn't stop moving once it reaches the destination coordinates. Note: Doesn't take into account acceleration, maxVelocity or drag (if you've set drag or acceleration too high this object may not move at all)

func (*PhysicsArcade) MoveToObject1O

func (self *PhysicsArcade) MoveToObject1O(displayObject interface{}, destination interface{}, speed int) int

MoveToObject1O Move the given display object towards the destination object at a steady velocity. If you specify a maxTime then it will adjust the speed (overwriting what you set) so it arrives at the destination in that number of seconds. Timings are approximate due to the way browser timers work. Allow for a variance of +- 50ms. Note: The display object does not continuously track the target. If the target changes location during transit the display object will not modify its course. Note: The display object doesn't stop moving once it reaches the destination coordinates. Note: Doesn't take into account acceleration, maxVelocity or drag (if you've set drag or acceleration too high this object may not move at all)

func (*PhysicsArcade) MoveToObject2O

func (self *PhysicsArcade) MoveToObject2O(displayObject interface{}, destination interface{}, speed int, maxTime int) int

MoveToObject2O Move the given display object towards the destination object at a steady velocity. If you specify a maxTime then it will adjust the speed (overwriting what you set) so it arrives at the destination in that number of seconds. Timings are approximate due to the way browser timers work. Allow for a variance of +- 50ms. Note: The display object does not continuously track the target. If the target changes location during transit the display object will not modify its course. Note: The display object doesn't stop moving once it reaches the destination coordinates. Note: Doesn't take into account acceleration, maxVelocity or drag (if you've set drag or acceleration too high this object may not move at all)

func (*PhysicsArcade) MoveToObjectI

func (self *PhysicsArcade) MoveToObjectI(args ...interface{}) int

MoveToObjectI Move the given display object towards the destination object at a steady velocity. If you specify a maxTime then it will adjust the speed (overwriting what you set) so it arrives at the destination in that number of seconds. Timings are approximate due to the way browser timers work. Allow for a variance of +- 50ms. Note: The display object does not continuously track the target. If the target changes location during transit the display object will not modify its course. Note: The display object doesn't stop moving once it reaches the destination coordinates. Note: Doesn't take into account acceleration, maxVelocity or drag (if you've set drag or acceleration too high this object may not move at all)

func (*PhysicsArcade) MoveToPointer

func (self *PhysicsArcade) MoveToPointer(displayObject interface{}) int

MoveToPointer Move the given display object towards the pointer at a steady velocity. If no pointer is given it will use Phaser.Input.activePointer. If you specify a maxTime then it will adjust the speed (over-writing what you set) so it arrives at the destination in that number of seconds. Timings are approximate due to the way browser timers work. Allow for a variance of +- 50ms. Note: The display object does not continuously track the target. If the target changes location during transit the display object will not modify its course. Note: The display object doesn't stop moving once it reaches the destination coordinates.

func (*PhysicsArcade) MoveToPointer1O

func (self *PhysicsArcade) MoveToPointer1O(displayObject interface{}, speed int) int

MoveToPointer1O Move the given display object towards the pointer at a steady velocity. If no pointer is given it will use Phaser.Input.activePointer. If you specify a maxTime then it will adjust the speed (over-writing what you set) so it arrives at the destination in that number of seconds. Timings are approximate due to the way browser timers work. Allow for a variance of +- 50ms. Note: The display object does not continuously track the target. If the target changes location during transit the display object will not modify its course. Note: The display object doesn't stop moving once it reaches the destination coordinates.

func (*PhysicsArcade) MoveToPointer2O

func (self *PhysicsArcade) MoveToPointer2O(displayObject interface{}, speed int, pointer *Pointer) int

MoveToPointer2O Move the given display object towards the pointer at a steady velocity. If no pointer is given it will use Phaser.Input.activePointer. If you specify a maxTime then it will adjust the speed (over-writing what you set) so it arrives at the destination in that number of seconds. Timings are approximate due to the way browser timers work. Allow for a variance of +- 50ms. Note: The display object does not continuously track the target. If the target changes location during transit the display object will not modify its course. Note: The display object doesn't stop moving once it reaches the destination coordinates.

func (*PhysicsArcade) MoveToPointer3O

func (self *PhysicsArcade) MoveToPointer3O(displayObject interface{}, speed int, pointer *Pointer, maxTime int) int

MoveToPointer3O Move the given display object towards the pointer at a steady velocity. If no pointer is given it will use Phaser.Input.activePointer. If you specify a maxTime then it will adjust the speed (over-writing what you set) so it arrives at the destination in that number of seconds. Timings are approximate due to the way browser timers work. Allow for a variance of +- 50ms. Note: The display object does not continuously track the target. If the target changes location during transit the display object will not modify its course. Note: The display object doesn't stop moving once it reaches the destination coordinates.

func (*PhysicsArcade) MoveToPointerI

func (self *PhysicsArcade) MoveToPointerI(args ...interface{}) int

MoveToPointerI Move the given display object towards the pointer at a steady velocity. If no pointer is given it will use Phaser.Input.activePointer. If you specify a maxTime then it will adjust the speed (over-writing what you set) so it arrives at the destination in that number of seconds. Timings are approximate due to the way browser timers work. Allow for a variance of +- 50ms. Note: The display object does not continuously track the target. If the target changes location during transit the display object will not modify its course. Note: The display object doesn't stop moving once it reaches the destination coordinates.

func (*PhysicsArcade) MoveToXY

func (self *PhysicsArcade) MoveToXY(displayObject interface{}, x int, y int) int

MoveToXY Move the given display object towards the x/y coordinates at a steady velocity. If you specify a maxTime then it will adjust the speed (over-writing what you set) so it arrives at the destination in that number of seconds. Timings are approximate due to the way browser timers work. Allow for a variance of +- 50ms. Note: The display object does not continuously track the target. If the target changes location during transit the display object will not modify its course. Note: The display object doesn't stop moving once it reaches the destination coordinates. Note: Doesn't take into account acceleration, maxVelocity or drag (if you've set drag or acceleration too high this object may not move at all)

func (*PhysicsArcade) MoveToXY1O

func (self *PhysicsArcade) MoveToXY1O(displayObject interface{}, x int, y int, speed int) int

MoveToXY1O Move the given display object towards the x/y coordinates at a steady velocity. If you specify a maxTime then it will adjust the speed (over-writing what you set) so it arrives at the destination in that number of seconds. Timings are approximate due to the way browser timers work. Allow for a variance of +- 50ms. Note: The display object does not continuously track the target. If the target changes location during transit the display object will not modify its course. Note: The display object doesn't stop moving once it reaches the destination coordinates. Note: Doesn't take into account acceleration, maxVelocity or drag (if you've set drag or acceleration too high this object may not move at all)

func (*PhysicsArcade) MoveToXY2O

func (self *PhysicsArcade) MoveToXY2O(displayObject interface{}, x int, y int, speed int, maxTime int) int

MoveToXY2O Move the given display object towards the x/y coordinates at a steady velocity. If you specify a maxTime then it will adjust the speed (over-writing what you set) so it arrives at the destination in that number of seconds. Timings are approximate due to the way browser timers work. Allow for a variance of +- 50ms. Note: The display object does not continuously track the target. If the target changes location during transit the display object will not modify its course. Note: The display object doesn't stop moving once it reaches the destination coordinates. Note: Doesn't take into account acceleration, maxVelocity or drag (if you've set drag or acceleration too high this object may not move at all)

func (*PhysicsArcade) MoveToXYI

func (self *PhysicsArcade) MoveToXYI(args ...interface{}) int

MoveToXYI Move the given display object towards the x/y coordinates at a steady velocity. If you specify a maxTime then it will adjust the speed (over-writing what you set) so it arrives at the destination in that number of seconds. Timings are approximate due to the way browser timers work. Allow for a variance of +- 50ms. Note: The display object does not continuously track the target. If the target changes location during transit the display object will not modify its course. Note: The display object doesn't stop moving once it reaches the destination coordinates. Note: Doesn't take into account acceleration, maxVelocity or drag (if you've set drag or acceleration too high this object may not move at all)

func (*PhysicsArcade) OVERLAP_BIAS

func (self *PhysicsArcade) OVERLAP_BIAS() int

OVERLAP_BIAS A value added to the delta values during collision checks.

func (*PhysicsArcade) Overlap

func (self *PhysicsArcade) Overlap(object1 interface{}, object2 interface{}) bool

Overlap Checks for overlaps between two game objects. The objects can be Sprites, Groups or Emitters. You can perform Sprite vs. Sprite, Sprite vs. Group and Group vs. Group overlap checks. Unlike collide the objects are NOT automatically separated or have any physics applied, they merely test for overlap results. Both the first and second parameter can be arrays of objects, of differing types. If two arrays are passed, the contents of the first parameter will be tested against all contents of the 2nd parameter. NOTE: This function is not recursive, and will not test against children of objects passed (i.e. Groups within Groups).

func (*PhysicsArcade) Overlap1O

func (self *PhysicsArcade) Overlap1O(object1 interface{}, object2 interface{}, overlapCallback interface{}) bool

Overlap1O Checks for overlaps between two game objects. The objects can be Sprites, Groups or Emitters. You can perform Sprite vs. Sprite, Sprite vs. Group and Group vs. Group overlap checks. Unlike collide the objects are NOT automatically separated or have any physics applied, they merely test for overlap results. Both the first and second parameter can be arrays of objects, of differing types. If two arrays are passed, the contents of the first parameter will be tested against all contents of the 2nd parameter. NOTE: This function is not recursive, and will not test against children of objects passed (i.e. Groups within Groups).

func (*PhysicsArcade) Overlap2O

func (self *PhysicsArcade) Overlap2O(object1 interface{}, object2 interface{}, overlapCallback interface{}, processCallback interface{}) bool

Overlap2O Checks for overlaps between two game objects. The objects can be Sprites, Groups or Emitters. You can perform Sprite vs. Sprite, Sprite vs. Group and Group vs. Group overlap checks. Unlike collide the objects are NOT automatically separated or have any physics applied, they merely test for overlap results. Both the first and second parameter can be arrays of objects, of differing types. If two arrays are passed, the contents of the first parameter will be tested against all contents of the 2nd parameter. NOTE: This function is not recursive, and will not test against children of objects passed (i.e. Groups within Groups).

func (*PhysicsArcade) Overlap3O

func (self *PhysicsArcade) Overlap3O(object1 interface{}, object2 interface{}, overlapCallback interface{}, processCallback interface{}, callbackContext interface{}) bool

Overlap3O Checks for overlaps between two game objects. The objects can be Sprites, Groups or Emitters. You can perform Sprite vs. Sprite, Sprite vs. Group and Group vs. Group overlap checks. Unlike collide the objects are NOT automatically separated or have any physics applied, they merely test for overlap results. Both the first and second parameter can be arrays of objects, of differing types. If two arrays are passed, the contents of the first parameter will be tested against all contents of the 2nd parameter. NOTE: This function is not recursive, and will not test against children of objects passed (i.e. Groups within Groups).

func (*PhysicsArcade) OverlapI

func (self *PhysicsArcade) OverlapI(args ...interface{}) bool

OverlapI Checks for overlaps between two game objects. The objects can be Sprites, Groups or Emitters. You can perform Sprite vs. Sprite, Sprite vs. Group and Group vs. Group overlap checks. Unlike collide the objects are NOT automatically separated or have any physics applied, they merely test for overlap results. Both the first and second parameter can be arrays of objects, of differing types. If two arrays are passed, the contents of the first parameter will be tested against all contents of the 2nd parameter. NOTE: This function is not recursive, and will not test against children of objects passed (i.e. Groups within Groups).

func (*PhysicsArcade) QuadTree

func (self *PhysicsArcade) QuadTree() *QuadTree

QuadTree The world QuadTree.

func (*PhysicsArcade) RIGHT_LEFT

func (self *PhysicsArcade) RIGHT_LEFT() int

RIGHT_LEFT A constant used for the sortDirection value. Use this if your game world is wide but short and scrolls from the right to the left (i.e. Mario backwards)

func (*PhysicsArcade) SORT_NONE

func (self *PhysicsArcade) SORT_NONE() int

SORT_NONE A constant used for the sortDirection value. Use this if you don't wish to perform any pre-collision sorting at all, or will manually sort your Groups.

func (*PhysicsArcade) Separate

func (self *PhysicsArcade) Separate(body1 *PhysicsArcadeBody, body2 *PhysicsArcadeBody, processCallback interface{}, callbackContext interface{}, overlapOnly bool) bool

Separate The core separation function to separate two physics bodies.

func (*PhysicsArcade) SeparateCircle

func (self *PhysicsArcade) SeparateCircle(body1 *PhysicsArcadeBody, body2 *PhysicsArcadeBody, overlapOnly bool) bool

SeparateCircle The core separation function to separate two circular physics bodies.

func (*PhysicsArcade) SeparateCircleI

func (self *PhysicsArcade) SeparateCircleI(args ...interface{}) bool

SeparateCircleI The core separation function to separate two circular physics bodies.

func (*PhysicsArcade) SeparateI

func (self *PhysicsArcade) SeparateI(args ...interface{}) bool

SeparateI The core separation function to separate two physics bodies.

func (*PhysicsArcade) SeparateX

func (self *PhysicsArcade) SeparateX(body1 *PhysicsArcadeBody, body2 *PhysicsArcadeBody, overlapOnly bool) bool

SeparateX The core separation function to separate two physics bodies on the x axis.

func (*PhysicsArcade) SeparateXI

func (self *PhysicsArcade) SeparateXI(args ...interface{}) bool

SeparateXI The core separation function to separate two physics bodies on the x axis.

func (*PhysicsArcade) SeparateY

func (self *PhysicsArcade) SeparateY(body1 *PhysicsArcadeBody, body2 *PhysicsArcadeBody, overlapOnly bool) bool

SeparateY The core separation function to separate two physics bodies on the y axis.

func (*PhysicsArcade) SeparateYI

func (self *PhysicsArcade) SeparateYI(args ...interface{}) bool

SeparateYI The core separation function to separate two physics bodies on the y axis.

func (*PhysicsArcade) SetBOTTOM_TOPA

func (self *PhysicsArcade) SetBOTTOM_TOPA(member int)

SetBOTTOM_TOPA A constant used for the sortDirection value. Use this if your game world is narrow but tall and scrolls from the bottom to the top (i.e. Commando or a vertically scrolling shoot-em-up)

func (*PhysicsArcade) SetBounds

func (self *PhysicsArcade) SetBounds(x int, y int, width int, height int)

SetBounds Updates the size of this physics world.

func (*PhysicsArcade) SetBoundsA

func (self *PhysicsArcade) SetBoundsA(member *Rectangle)

SetBoundsA The bounds inside of which the physics world exists. Defaults to match the world bounds.

func (*PhysicsArcade) SetBoundsI

func (self *PhysicsArcade) SetBoundsI(args ...interface{})

SetBoundsI Updates the size of this physics world.

func (*PhysicsArcade) SetBoundsToWorld

func (self *PhysicsArcade) SetBoundsToWorld()

SetBoundsToWorld Updates the size of this physics world to match the size of the game world.

func (*PhysicsArcade) SetBoundsToWorldI

func (self *PhysicsArcade) SetBoundsToWorldI(args ...interface{})

SetBoundsToWorldI Updates the size of this physics world to match the size of the game world.

func (*PhysicsArcade) SetCheckCollisionA

func (self *PhysicsArcade) SetCheckCollisionA(member interface{})

SetCheckCollisionA Set the checkCollision properties to control for which bounds collision is processed. For example checkCollision.down = false means Bodies cannot collide with the World.bounds.bottom. An object containing allowed collision flags.

func (*PhysicsArcade) SetForceXA

func (self *PhysicsArcade) SetForceXA(member bool)

SetForceXA If true World.separate will always separate on the X axis before Y. Otherwise it will check gravity totals first.

func (*PhysicsArcade) SetGameA

func (self *PhysicsArcade) SetGameA(member *Game)

SetGameA Local reference to game.

func (*PhysicsArcade) SetGravityA

func (self *PhysicsArcade) SetGravityA(member *Point)

SetGravityA The World gravity setting. Defaults to x: 0, y: 0, or no gravity.

func (*PhysicsArcade) SetIsPausedA

func (self *PhysicsArcade) SetIsPausedA(member bool)

SetIsPausedA If `true` the `Body.preUpdate` method will be skipped, halting all motion for all bodies. Note that other methods such as `collide` will still work, so be careful not to call them on paused bodies.

func (*PhysicsArcade) SetLEFT_RIGHTA

func (self *PhysicsArcade) SetLEFT_RIGHTA(member int)

SetLEFT_RIGHTA A constant used for the sortDirection value. Use this if your game world is wide but short and scrolls from the left to the right (i.e. Mario)

func (*PhysicsArcade) SetMaxLevelsA

func (self *PhysicsArcade) SetMaxLevelsA(member int)

SetMaxLevelsA Used by the QuadTree to set the maximum number of iteration levels.

func (*PhysicsArcade) SetMaxObjectsA

func (self *PhysicsArcade) SetMaxObjectsA(member int)

SetMaxObjectsA Used by the QuadTree to set the maximum number of objects per quad.

func (*PhysicsArcade) SetOVERLAP_BIASA

func (self *PhysicsArcade) SetOVERLAP_BIASA(member int)

SetOVERLAP_BIASA A value added to the delta values during collision checks.

func (*PhysicsArcade) SetQuadTreeA

func (self *PhysicsArcade) SetQuadTreeA(member *QuadTree)

SetQuadTreeA The world QuadTree.

func (*PhysicsArcade) SetRIGHT_LEFTA

func (self *PhysicsArcade) SetRIGHT_LEFTA(member int)

SetRIGHT_LEFTA A constant used for the sortDirection value. Use this if your game world is wide but short and scrolls from the right to the left (i.e. Mario backwards)

func (*PhysicsArcade) SetSORT_NONEA

func (self *PhysicsArcade) SetSORT_NONEA(member int)

SetSORT_NONEA A constant used for the sortDirection value. Use this if you don't wish to perform any pre-collision sorting at all, or will manually sort your Groups.

func (*PhysicsArcade) SetSkipQuadTreeA

func (self *PhysicsArcade) SetSkipQuadTreeA(member bool)

SetSkipQuadTreeA If true the QuadTree will not be used for any collision. QuadTrees are great if objects are well spread out in your game, otherwise they are a performance hit. If you enable this you can disable on a per body basis via `Body.skipQuadTree`.

func (*PhysicsArcade) SetSortDirectionA

func (self *PhysicsArcade) SetSortDirectionA(member int)

SetSortDirectionA Used when colliding a Sprite vs. a Group, or a Group vs. a Group, this defines the direction the sort is based on. Default is Phaser.Physics.Arcade.LEFT_RIGHT.

func (*PhysicsArcade) SetTOP_BOTTOMA

func (self *PhysicsArcade) SetTOP_BOTTOMA(member int)

SetTOP_BOTTOMA A constant used for the sortDirection value. Use this if your game world is narrow but tall and scrolls from the top to the bottom (i.e. Dig Dug)

func (*PhysicsArcade) SkipQuadTree

func (self *PhysicsArcade) SkipQuadTree() bool

SkipQuadTree If true the QuadTree will not be used for any collision. QuadTrees are great if objects are well spread out in your game, otherwise they are a performance hit. If you enable this you can disable on a per body basis via `Body.skipQuadTree`.

func (*PhysicsArcade) Sort

func (self *PhysicsArcade) Sort(group *Group)

Sort This method will sort a Groups hash array.

If the Group has `physicsSortDirection` set it will use the sort direction defined.

Otherwise if the sortDirection parameter is undefined, or Group.physicsSortDirection is null, it will use Phaser.Physics.Arcade.sortDirection.

By changing Group.physicsSortDirection you can customise each Group to sort in a different order.

func (*PhysicsArcade) Sort1O

func (self *PhysicsArcade) Sort1O(group *Group, sortDirection int)

Sort1O This method will sort a Groups hash array.

If the Group has `physicsSortDirection` set it will use the sort direction defined.

Otherwise if the sortDirection parameter is undefined, or Group.physicsSortDirection is null, it will use Phaser.Physics.Arcade.sortDirection.

By changing Group.physicsSortDirection you can customise each Group to sort in a different order.

func (*PhysicsArcade) SortBottomTop

func (self *PhysicsArcade) SortBottomTop(a *Sprite, b *Sprite) int

SortBottomTop A Sort function for sorting two bodies based on a BOTTOM to TOP sort direction.

This is called automatically by World.sort

func (*PhysicsArcade) SortBottomTopI

func (self *PhysicsArcade) SortBottomTopI(args ...interface{}) int

SortBottomTopI A Sort function for sorting two bodies based on a BOTTOM to TOP sort direction.

This is called automatically by World.sort

func (*PhysicsArcade) SortDirection

func (self *PhysicsArcade) SortDirection() int

SortDirection Used when colliding a Sprite vs. a Group, or a Group vs. a Group, this defines the direction the sort is based on. Default is Phaser.Physics.Arcade.LEFT_RIGHT.

func (*PhysicsArcade) SortI

func (self *PhysicsArcade) SortI(args ...interface{})

SortI This method will sort a Groups hash array.

If the Group has `physicsSortDirection` set it will use the sort direction defined.

Otherwise if the sortDirection parameter is undefined, or Group.physicsSortDirection is null, it will use Phaser.Physics.Arcade.sortDirection.

By changing Group.physicsSortDirection you can customise each Group to sort in a different order.

func (*PhysicsArcade) SortLeftRight

func (self *PhysicsArcade) SortLeftRight(a *Sprite, b *Sprite) int

SortLeftRight A Sort function for sorting two bodies based on a LEFT to RIGHT sort direction.

This is called automatically by World.sort

func (*PhysicsArcade) SortLeftRightI

func (self *PhysicsArcade) SortLeftRightI(args ...interface{}) int

SortLeftRightI A Sort function for sorting two bodies based on a LEFT to RIGHT sort direction.

This is called automatically by World.sort

func (*PhysicsArcade) SortRightLeft

func (self *PhysicsArcade) SortRightLeft(a *Sprite, b *Sprite) int

SortRightLeft A Sort function for sorting two bodies based on a RIGHT to LEFT sort direction.

This is called automatically by World.sort

func (*PhysicsArcade) SortRightLeftI

func (self *PhysicsArcade) SortRightLeftI(args ...interface{}) int

SortRightLeftI A Sort function for sorting two bodies based on a RIGHT to LEFT sort direction.

This is called automatically by World.sort

func (*PhysicsArcade) SortTopBottom

func (self *PhysicsArcade) SortTopBottom(a *Sprite, b *Sprite) int

SortTopBottom A Sort function for sorting two bodies based on a TOP to BOTTOM sort direction.

This is called automatically by World.sort

func (*PhysicsArcade) SortTopBottomI

func (self *PhysicsArcade) SortTopBottomI(args ...interface{}) int

SortTopBottomI A Sort function for sorting two bodies based on a TOP to BOTTOM sort direction.

This is called automatically by World.sort

func (*PhysicsArcade) TOP_BOTTOM

func (self *PhysicsArcade) TOP_BOTTOM() int

TOP_BOTTOM A constant used for the sortDirection value. Use this if your game world is narrow but tall and scrolls from the top to the bottom (i.e. Dig Dug)

func (*PhysicsArcade) UpdateMotion

func (self *PhysicsArcade) UpdateMotion(The *PhysicsArcadeBody)

UpdateMotion Called automatically by a Physics body, it updates all motion related values on the Body unless `World.isPaused` is `true`.

func (*PhysicsArcade) UpdateMotionI

func (self *PhysicsArcade) UpdateMotionI(args ...interface{})

UpdateMotionI Called automatically by a Physics body, it updates all motion related values on the Body unless `World.isPaused` is `true`.

func (*PhysicsArcade) VelocityFromAngle

func (self *PhysicsArcade) VelocityFromAngle(angle int) *Point

VelocityFromAngle Given the angle (in degrees) and speed calculate the velocity and return it as a Point object, or set it to the given point object. One way to use this is: velocityFromAngle(angle, 200, sprite.velocity) which will set the values directly to the sprites velocity and not create a new Point object.

func (*PhysicsArcade) VelocityFromAngle1O

func (self *PhysicsArcade) VelocityFromAngle1O(angle int, speed int) *Point

VelocityFromAngle1O Given the angle (in degrees) and speed calculate the velocity and return it as a Point object, or set it to the given point object. One way to use this is: velocityFromAngle(angle, 200, sprite.velocity) which will set the values directly to the sprites velocity and not create a new Point object.

func (*PhysicsArcade) VelocityFromAngle2O

func (self *PhysicsArcade) VelocityFromAngle2O(angle int, speed int, point interface{}) *Point

VelocityFromAngle2O Given the angle (in degrees) and speed calculate the velocity and return it as a Point object, or set it to the given point object. One way to use this is: velocityFromAngle(angle, 200, sprite.velocity) which will set the values directly to the sprites velocity and not create a new Point object.

func (*PhysicsArcade) VelocityFromAngleI

func (self *PhysicsArcade) VelocityFromAngleI(args ...interface{}) *Point

VelocityFromAngleI Given the angle (in degrees) and speed calculate the velocity and return it as a Point object, or set it to the given point object. One way to use this is: velocityFromAngle(angle, 200, sprite.velocity) which will set the values directly to the sprites velocity and not create a new Point object.

func (*PhysicsArcade) VelocityFromRotation

func (self *PhysicsArcade) VelocityFromRotation(rotation int) *Point

VelocityFromRotation Given the rotation (in radians) and speed calculate the velocity and return it as a Point object, or set it to the given point object. One way to use this is: velocityFromRotation(rotation, 200, sprite.velocity) which will set the values directly to the sprites velocity and not create a new Point object.

func (*PhysicsArcade) VelocityFromRotation1O

func (self *PhysicsArcade) VelocityFromRotation1O(rotation int, speed int) *Point

VelocityFromRotation1O Given the rotation (in radians) and speed calculate the velocity and return it as a Point object, or set it to the given point object. One way to use this is: velocityFromRotation(rotation, 200, sprite.velocity) which will set the values directly to the sprites velocity and not create a new Point object.

func (*PhysicsArcade) VelocityFromRotation2O

func (self *PhysicsArcade) VelocityFromRotation2O(rotation int, speed int, point interface{}) *Point

VelocityFromRotation2O Given the rotation (in radians) and speed calculate the velocity and return it as a Point object, or set it to the given point object. One way to use this is: velocityFromRotation(rotation, 200, sprite.velocity) which will set the values directly to the sprites velocity and not create a new Point object.

func (*PhysicsArcade) VelocityFromRotationI

func (self *PhysicsArcade) VelocityFromRotationI(args ...interface{}) *Point

VelocityFromRotationI Given the rotation (in radians) and speed calculate the velocity and return it as a Point object, or set it to the given point object. One way to use this is: velocityFromRotation(rotation, 200, sprite.velocity) which will set the values directly to the sprites velocity and not create a new Point object.

func (*PhysicsArcade) WorldAngleToPointer

func (self *PhysicsArcade) WorldAngleToPointer(displayObject interface{}) int

WorldAngleToPointer Find the angle in radians between a display object (like a Sprite) and a Pointer, taking their x/y and center into account relative to the world.

func (*PhysicsArcade) WorldAngleToPointer1O

func (self *PhysicsArcade) WorldAngleToPointer1O(displayObject interface{}, pointer *Pointer) int

WorldAngleToPointer1O Find the angle in radians between a display object (like a Sprite) and a Pointer, taking their x/y and center into account relative to the world.

func (*PhysicsArcade) WorldAngleToPointerI

func (self *PhysicsArcade) WorldAngleToPointerI(args ...interface{}) int

WorldAngleToPointerI Find the angle in radians between a display object (like a Sprite) and a Pointer, taking their x/y and center into account relative to the world.

type PhysicsArcadeBody

type PhysicsArcadeBody struct {
	*js.Object
}

PhysicsArcadeBody The Physics Body is linked to a single Sprite. All physics operations should be performed against the body rather than the Sprite itself. For example you can set the velocity, acceleration, bounce values etc all on the Body.

func NewPhysicsArcadeBody

func NewPhysicsArcadeBody(sprite *Sprite) *PhysicsArcadeBody

NewPhysicsArcadeBody The Physics Body is linked to a single Sprite. All physics operations should be performed against the body rather than the Sprite itself. For example you can set the velocity, acceleration, bounce values etc all on the Body.

func NewPhysicsArcadeBodyI

func NewPhysicsArcadeBodyI(args ...interface{}) *PhysicsArcadeBody

NewPhysicsArcadeBodyI The Physics Body is linked to a single Sprite. All physics operations should be performed against the body rather than the Sprite itself. For example you can set the velocity, acceleration, bounce values etc all on the Body.

func ToPhysicsArcadeBody

func ToPhysicsArcadeBody(jsStruct interface{}) *PhysicsArcadeBody

PhysicsArcadeBody Binding conversion method to PhysicsArcadeBody point

func (*PhysicsArcadeBody) Acceleration

func (self *PhysicsArcadeBody) Acceleration() *Point

Acceleration The acceleration is the rate of change of the velocity. Measured in pixels per second squared.

func (*PhysicsArcadeBody) AllowGravity

func (self *PhysicsArcadeBody) AllowGravity() bool

AllowGravity Allow this Body to be influenced by gravity? Either world or local.

func (*PhysicsArcadeBody) AllowRotation

func (self *PhysicsArcadeBody) AllowRotation() bool

AllowRotation Allow this Body to be rotated? (via angularVelocity, etc)

func (*PhysicsArcadeBody) Angle

func (self *PhysicsArcadeBody) Angle() int

Angle The angle of the Body's velocity in radians.

func (*PhysicsArcadeBody) AngularAcceleration

func (self *PhysicsArcadeBody) AngularAcceleration() int

AngularAcceleration The angular acceleration is the rate of change of the angular velocity. Measured in degrees per second squared.

func (*PhysicsArcadeBody) AngularDrag

func (self *PhysicsArcadeBody) AngularDrag() int

AngularDrag The drag applied during the rotation of the Body. Measured in degrees per second squared.

func (*PhysicsArcadeBody) AngularVelocity

func (self *PhysicsArcadeBody) AngularVelocity() int

AngularVelocity The angular velocity controls the rotation speed of the Body. It is measured in degrees per second.

func (*PhysicsArcadeBody) Blocked

func (self *PhysicsArcadeBody) Blocked() interface{}

Blocked This object is populated with boolean values when the Body collides with the World bounds or a Tile. For example if blocked.up is true then the Body cannot move up. An object containing on which faces this Body is blocked from moving, if any.

func (*PhysicsArcadeBody) Bottom

func (self *PhysicsArcadeBody) Bottom() int

Bottom The bottom value of this Body (same as Body.y + Body.height)

func (*PhysicsArcadeBody) Bounce

func (self *PhysicsArcadeBody) Bounce() *Point

Bounce The elasticity of the Body when colliding. bounce.x/y = 1 means full rebound, bounce.x/y = 0.5 means 50% rebound velocity.

func (*PhysicsArcadeBody) Center

func (self *PhysicsArcadeBody) Center() *Point

Center The center coordinate of the Physics Body.

func (*PhysicsArcadeBody) CheckCollision

func (self *PhysicsArcadeBody) CheckCollision() interface{}

CheckCollision Set the checkCollision properties to control which directions collision is processed for this Body. For example checkCollision.up = false means it won't collide when the collision happened while moving up. If you need to disable a Body entirely, use `body.enable = false`, this will also disable motion. If you need to disable just collision and/or overlap checks, but retain motion, set `checkCollision.none = true`. An object containing allowed collision.

func (*PhysicsArcadeBody) CheckWorldBounds

func (self *PhysicsArcadeBody) CheckWorldBounds() bool

CheckWorldBounds Internal method.

func (*PhysicsArcadeBody) CheckWorldBoundsI

func (self *PhysicsArcadeBody) CheckWorldBoundsI(args ...interface{}) bool

CheckWorldBoundsI Internal method.

func (*PhysicsArcadeBody) CollideWorldBounds

func (self *PhysicsArcadeBody) CollideWorldBounds() bool

CollideWorldBounds A Body can be set to collide against the World bounds automatically and rebound back into the World if this is set to true. Otherwise it will leave the World. Should the Body collide with the World bounds?

func (*PhysicsArcadeBody) CustomSeparateX

func (self *PhysicsArcadeBody) CustomSeparateX() bool

CustomSeparateX This flag allows you to disable the custom x separation that takes place by Physics.Arcade.separate. Used in combination with your own collision processHandler you can create whatever type of collision response you need. Use a custom separation system or the built-in one?

func (*PhysicsArcadeBody) CustomSeparateY

func (self *PhysicsArcadeBody) CustomSeparateY() bool

CustomSeparateY This flag allows you to disable the custom y separation that takes place by Physics.Arcade.separate. Used in combination with your own collision processHandler you can create whatever type of collision response you need. Use a custom separation system or the built-in one?

func (*PhysicsArcadeBody) DeltaAbsX

func (self *PhysicsArcadeBody) DeltaAbsX() int

DeltaAbsX Returns the absolute delta x value.

func (*PhysicsArcadeBody) DeltaAbsXI

func (self *PhysicsArcadeBody) DeltaAbsXI(args ...interface{}) int

DeltaAbsXI Returns the absolute delta x value.

func (*PhysicsArcadeBody) DeltaAbsY

func (self *PhysicsArcadeBody) DeltaAbsY() int

DeltaAbsY Returns the absolute delta y value.

func (*PhysicsArcadeBody) DeltaAbsYI

func (self *PhysicsArcadeBody) DeltaAbsYI(args ...interface{}) int

DeltaAbsYI Returns the absolute delta y value.

func (*PhysicsArcadeBody) DeltaMax

func (self *PhysicsArcadeBody) DeltaMax() *Point

DeltaMax The Sprite position is updated based on the delta x/y values. You can set a cap on those (both +-) using deltaMax.

func (*PhysicsArcadeBody) DeltaX

func (self *PhysicsArcadeBody) DeltaX() int

DeltaX Returns the delta x value. The difference between Body.x now and in the previous step.

func (*PhysicsArcadeBody) DeltaXI

func (self *PhysicsArcadeBody) DeltaXI(args ...interface{}) int

DeltaXI Returns the delta x value. The difference between Body.x now and in the previous step.

func (*PhysicsArcadeBody) DeltaY

func (self *PhysicsArcadeBody) DeltaY() int

DeltaY Returns the delta y value. The difference between Body.y now and in the previous step.

func (*PhysicsArcadeBody) DeltaYI

func (self *PhysicsArcadeBody) DeltaYI(args ...interface{}) int

DeltaYI Returns the delta y value. The difference between Body.y now and in the previous step.

func (*PhysicsArcadeBody) DeltaZ

func (self *PhysicsArcadeBody) DeltaZ() int

DeltaZ Returns the delta z value. The difference between Body.rotation now and in the previous step.

func (*PhysicsArcadeBody) DeltaZI

func (self *PhysicsArcadeBody) DeltaZI(args ...interface{}) int

DeltaZI Returns the delta z value. The difference between Body.rotation now and in the previous step.

func (*PhysicsArcadeBody) Destroy

func (self *PhysicsArcadeBody) Destroy()

Destroy Destroys this Body.

First it calls Group.removeFromHash if the Game Object this Body belongs to is part of a Group. Then it nulls the Game Objects body reference, and nulls this Body.sprite reference.

func (*PhysicsArcadeBody) DestroyI

func (self *PhysicsArcadeBody) DestroyI(args ...interface{})

DestroyI Destroys this Body.

First it calls Group.removeFromHash if the Game Object this Body belongs to is part of a Group. Then it nulls the Game Objects body reference, and nulls this Body.sprite reference.

func (*PhysicsArcadeBody) Dirty

func (self *PhysicsArcadeBody) Dirty() bool

Dirty If this Body in a preUpdate (true) or postUpdate (false) state?

func (*PhysicsArcadeBody) Drag

func (self *PhysicsArcadeBody) Drag() *Point

Drag The drag applied to the motion of the Body.

func (*PhysicsArcadeBody) Embedded

func (self *PhysicsArcadeBody) Embedded() bool

Embedded If a body is overlapping with another body, but neither of them are moving (maybe they spawned on-top of each other?) this is set to true. Body embed value.

func (*PhysicsArcadeBody) Enable

func (self *PhysicsArcadeBody) Enable() bool

Enable A disabled body won't be checked for any form of collision or overlap or have its pre/post updates run.

func (*PhysicsArcadeBody) Facing

func (self *PhysicsArcadeBody) Facing() int

Facing A const reference to the direction the Body is traveling or facing.

func (*PhysicsArcadeBody) Friction

func (self *PhysicsArcadeBody) Friction() *Point

Friction The amount of movement that will occur if another object 'rides' this one.

func (*PhysicsArcadeBody) Game

func (self *PhysicsArcadeBody) Game() *Game

Game Local reference to game.

func (*PhysicsArcadeBody) GetBounds

func (self *PhysicsArcadeBody) GetBounds(obj interface{}) interface{}

GetBounds Returns the bounds of this physics body.

Only used internally by the World collision methods.

func (*PhysicsArcadeBody) GetBoundsI

func (self *PhysicsArcadeBody) GetBoundsI(args ...interface{}) interface{}

GetBoundsI Returns the bounds of this physics body.

Only used internally by the World collision methods.

func (*PhysicsArcadeBody) Gravity

func (self *PhysicsArcadeBody) Gravity() *Point

Gravity A local gravity applied to this Body. If non-zero this over rides any world gravity, unless Body.allowGravity is set to false.

func (*PhysicsArcadeBody) HalfHeight

func (self *PhysicsArcadeBody) HalfHeight() int

HalfHeight The calculated height / 2 of the physics body.

func (*PhysicsArcadeBody) HalfWidth

func (self *PhysicsArcadeBody) HalfWidth() int

HalfWidth The calculated width / 2 of the physics body.

func (*PhysicsArcadeBody) Height

func (self *PhysicsArcadeBody) Height() int

Height The calculated height of the physics body.

func (*PhysicsArcadeBody) HitTest

func (self *PhysicsArcadeBody) HitTest(x int, y int) bool

HitTest Tests if a world point lies within this Body.

func (*PhysicsArcadeBody) HitTestI

func (self *PhysicsArcadeBody) HitTestI(args ...interface{}) bool

HitTestI Tests if a world point lies within this Body.

func (*PhysicsArcadeBody) Immovable

func (self *PhysicsArcadeBody) Immovable() bool

Immovable An immovable Body will not receive any impacts from other bodies.

func (*PhysicsArcadeBody) IsCircle

func (self *PhysicsArcadeBody) IsCircle() bool

IsCircle If `true` this Body is using circular collision detection. If `false` it is using rectangular. Use `Body.setCircle` to control the collision shape this Body uses.

func (*PhysicsArcadeBody) IsMoving

func (self *PhysicsArcadeBody) IsMoving() bool

IsMoving Set by the `moveTo` and `moveFrom` methods.

func (*PhysicsArcadeBody) Left

func (self *PhysicsArcadeBody) Left() int

Left The x position of the Body. The same as `Body.x`.

func (*PhysicsArcadeBody) Mass

func (self *PhysicsArcadeBody) Mass() int

Mass The mass of the Body. When two bodies collide their mass is used in the calculation to determine the exchange of velocity.

func (*PhysicsArcadeBody) MaxAngular

func (self *PhysicsArcadeBody) MaxAngular() int

MaxAngular The maximum angular velocity in degrees per second that the Body can reach.

func (*PhysicsArcadeBody) MaxVelocity

func (self *PhysicsArcadeBody) MaxVelocity() *Point

MaxVelocity The maximum velocity in pixels per second sq. that the Body can reach.

func (*PhysicsArcadeBody) MoveFrom

func (self *PhysicsArcadeBody) MoveFrom(duration int) bool

MoveFrom Note: This method is experimental, and may be changed or removed in a future release.

This method moves the Body in the given direction, for the duration specified. It works by setting the velocity on the Body, and an internal timer, and then monitoring the duration each frame. When the duration is up the movement is stopped and the `Body.onMoveComplete` signal is dispatched.

Movement also stops if the Body collides or overlaps with any other Body.

You can control if the velocity should be reset to zero on collision, by using the property `Body.stopVelocityOnCollide`.

Stop the movement at any time by calling `Body.stopMovement`.

You can optionally set a speed in pixels per second. If not specified it will use the current `Body.speed` value. If this is zero, the function will return false.

Please note that due to browser timings you should allow for a variance in when the duration will actually expire. Depending on system it may be as much as +- 50ms. Also this method doesn't take into consideration any other forces acting on the Body, such as Gravity, drag or maxVelocity, all of which may impact the movement.

func (*PhysicsArcadeBody) MoveFrom1O

func (self *PhysicsArcadeBody) MoveFrom1O(duration int, speed int) bool

MoveFrom1O Note: This method is experimental, and may be changed or removed in a future release.

This method moves the Body in the given direction, for the duration specified. It works by setting the velocity on the Body, and an internal timer, and then monitoring the duration each frame. When the duration is up the movement is stopped and the `Body.onMoveComplete` signal is dispatched.

Movement also stops if the Body collides or overlaps with any other Body.

You can control if the velocity should be reset to zero on collision, by using the property `Body.stopVelocityOnCollide`.

Stop the movement at any time by calling `Body.stopMovement`.

You can optionally set a speed in pixels per second. If not specified it will use the current `Body.speed` value. If this is zero, the function will return false.

Please note that due to browser timings you should allow for a variance in when the duration will actually expire. Depending on system it may be as much as +- 50ms. Also this method doesn't take into consideration any other forces acting on the Body, such as Gravity, drag or maxVelocity, all of which may impact the movement.

func (*PhysicsArcadeBody) MoveFrom2O

func (self *PhysicsArcadeBody) MoveFrom2O(duration int, speed int, direction int) bool

MoveFrom2O Note: This method is experimental, and may be changed or removed in a future release.

This method moves the Body in the given direction, for the duration specified. It works by setting the velocity on the Body, and an internal timer, and then monitoring the duration each frame. When the duration is up the movement is stopped and the `Body.onMoveComplete` signal is dispatched.

Movement also stops if the Body collides or overlaps with any other Body.

You can control if the velocity should be reset to zero on collision, by using the property `Body.stopVelocityOnCollide`.

Stop the movement at any time by calling `Body.stopMovement`.

You can optionally set a speed in pixels per second. If not specified it will use the current `Body.speed` value. If this is zero, the function will return false.

Please note that due to browser timings you should allow for a variance in when the duration will actually expire. Depending on system it may be as much as +- 50ms. Also this method doesn't take into consideration any other forces acting on the Body, such as Gravity, drag or maxVelocity, all of which may impact the movement.

func (*PhysicsArcadeBody) MoveFromI

func (self *PhysicsArcadeBody) MoveFromI(args ...interface{}) bool

MoveFromI Note: This method is experimental, and may be changed or removed in a future release.

This method moves the Body in the given direction, for the duration specified. It works by setting the velocity on the Body, and an internal timer, and then monitoring the duration each frame. When the duration is up the movement is stopped and the `Body.onMoveComplete` signal is dispatched.

Movement also stops if the Body collides or overlaps with any other Body.

You can control if the velocity should be reset to zero on collision, by using the property `Body.stopVelocityOnCollide`.

Stop the movement at any time by calling `Body.stopMovement`.

You can optionally set a speed in pixels per second. If not specified it will use the current `Body.speed` value. If this is zero, the function will return false.

Please note that due to browser timings you should allow for a variance in when the duration will actually expire. Depending on system it may be as much as +- 50ms. Also this method doesn't take into consideration any other forces acting on the Body, such as Gravity, drag or maxVelocity, all of which may impact the movement.

func (*PhysicsArcadeBody) MoveTo

func (self *PhysicsArcadeBody) MoveTo(duration int, distance int) bool

MoveTo Note: This method is experimental, and may be changed or removed in a future release.

This method moves the Body in the given direction, for the duration specified. It works by setting the velocity on the Body, and an internal distance counter. The distance is monitored each frame. When the distance equals the distance specified in this call, the movement is stopped, and the `Body.onMoveComplete` signal is dispatched.

Movement also stops if the Body collides or overlaps with any other Body.

You can control if the velocity should be reset to zero on collision, by using the property `Body.stopVelocityOnCollide`.

Stop the movement at any time by calling `Body.stopMovement`.

Please note that due to browser timings you should allow for a variance in when the distance will actually expire.

Note: This method doesn't take into consideration any other forces acting on the Body, such as Gravity, drag or maxVelocity, all of which may impact the movement.

func (*PhysicsArcadeBody) MoveTo1O

func (self *PhysicsArcadeBody) MoveTo1O(duration int, distance int, direction int) bool

MoveTo1O Note: This method is experimental, and may be changed or removed in a future release.

This method moves the Body in the given direction, for the duration specified. It works by setting the velocity on the Body, and an internal distance counter. The distance is monitored each frame. When the distance equals the distance specified in this call, the movement is stopped, and the `Body.onMoveComplete` signal is dispatched.

Movement also stops if the Body collides or overlaps with any other Body.

You can control if the velocity should be reset to zero on collision, by using the property `Body.stopVelocityOnCollide`.

Stop the movement at any time by calling `Body.stopMovement`.

Please note that due to browser timings you should allow for a variance in when the distance will actually expire.

Note: This method doesn't take into consideration any other forces acting on the Body, such as Gravity, drag or maxVelocity, all of which may impact the movement.

func (*PhysicsArcadeBody) MoveToI

func (self *PhysicsArcadeBody) MoveToI(args ...interface{}) bool

MoveToI Note: This method is experimental, and may be changed or removed in a future release.

This method moves the Body in the given direction, for the duration specified. It works by setting the velocity on the Body, and an internal distance counter. The distance is monitored each frame. When the distance equals the distance specified in this call, the movement is stopped, and the `Body.onMoveComplete` signal is dispatched.

Movement also stops if the Body collides or overlaps with any other Body.

You can control if the velocity should be reset to zero on collision, by using the property `Body.stopVelocityOnCollide`.

Stop the movement at any time by calling `Body.stopMovement`.

Please note that due to browser timings you should allow for a variance in when the distance will actually expire.

Note: This method doesn't take into consideration any other forces acting on the Body, such as Gravity, drag or maxVelocity, all of which may impact the movement.

func (*PhysicsArcadeBody) MovementCallback

func (self *PhysicsArcadeBody) MovementCallback() interface{}

MovementCallback Optional callback. If set, invoked during the running of `moveTo` or `moveFrom` events.

func (*PhysicsArcadeBody) MovementCallbackContext

func (self *PhysicsArcadeBody) MovementCallbackContext() interface{}

MovementCallbackContext Context in which to call the movementCallback.

func (*PhysicsArcadeBody) Moves

func (self *PhysicsArcadeBody) Moves() bool

Moves If you have a Body that is being moved around the world via a tween or a Group motion, but its local x/y position never actually changes, then you should set Body.moves = false. Otherwise it will most likely fly off the screen. If you want the physics system to move the body around, then set moves to true. Set to true to allow the Physics system to move this Body, otherwise false to move it manually.

func (*PhysicsArcadeBody) NewVelocity

func (self *PhysicsArcadeBody) NewVelocity() *Point

NewVelocity The new velocity. Calculated during the Body.preUpdate and applied to its position.

func (*PhysicsArcadeBody) Offset

func (self *PhysicsArcadeBody) Offset() *Point

Offset The offset of the Physics Body from the Sprite x/y position.

func (*PhysicsArcadeBody) OnCeiling

func (self *PhysicsArcadeBody) OnCeiling() bool

OnCeiling Returns true if the top of this Body is in contact with either the world bounds or a tile.

func (*PhysicsArcadeBody) OnCeilingI

func (self *PhysicsArcadeBody) OnCeilingI(args ...interface{}) bool

OnCeilingI Returns true if the top of this Body is in contact with either the world bounds or a tile.

func (*PhysicsArcadeBody) OnCollide

func (self *PhysicsArcadeBody) OnCollide() *Signal

OnCollide A Signal that is dispatched when this Body collides with another Body.

You still need to call `game.physics.arcade.collide` in your `update` method in order for this signal to be dispatched.

Usually you'd pass a callback to the `collide` method, but this signal provides for a different level of notification.

Due to the potentially high volume of signals this could create it is disabled by default.

To use this feature set this property to a Phaser.Signal: `sprite.body.onCollide = new Phaser.Signal()` and it will be called when a collision happens, passing two arguments: the sprites which collided. The first sprite in the argument is always the owner of this Body.

If two Bodies with this Signal set collide, both will dispatch the Signal.

func (*PhysicsArcadeBody) OnFloor

func (self *PhysicsArcadeBody) OnFloor() bool

OnFloor Returns true if the bottom of this Body is in contact with either the world bounds or a tile.

func (*PhysicsArcadeBody) OnFloorI

func (self *PhysicsArcadeBody) OnFloorI(args ...interface{}) bool

OnFloorI Returns true if the bottom of this Body is in contact with either the world bounds or a tile.

func (*PhysicsArcadeBody) OnMoveComplete

func (self *PhysicsArcadeBody) OnMoveComplete() *Signal

OnMoveComplete Listen for the completion of `moveTo` or `moveFrom` events.

func (*PhysicsArcadeBody) OnOverlap

func (self *PhysicsArcadeBody) OnOverlap() *Signal

OnOverlap A Signal that is dispatched when this Body overlaps with another Body.

You still need to call `game.physics.arcade.overlap` in your `update` method in order for this signal to be dispatched.

Usually you'd pass a callback to the `overlap` method, but this signal provides for a different level of notification.

Due to the potentially high volume of signals this could create it is disabled by default.

To use this feature set this property to a Phaser.Signal: `sprite.body.onOverlap = new Phaser.Signal()` and it will be called when a collision happens, passing two arguments: the sprites which collided. The first sprite in the argument is always the owner of this Body.

If two Bodies with this Signal set collide, both will dispatch the Signal.

func (*PhysicsArcadeBody) OnWall

func (self *PhysicsArcadeBody) OnWall() bool

OnWall Returns true if either side of this Body is in contact with either the world bounds or a tile.

func (*PhysicsArcadeBody) OnWallI

func (self *PhysicsArcadeBody) OnWallI(args ...interface{}) bool

OnWallI Returns true if either side of this Body is in contact with either the world bounds or a tile.

func (*PhysicsArcadeBody) OnWorldBounds

func (self *PhysicsArcadeBody) OnWorldBounds() *Signal

OnWorldBounds A Signal that is dispatched when this Body collides with the world bounds. Due to the potentially high volume of signals this could create it is disabled by default. To use this feature set this property to a Phaser.Signal: `sprite.body.onWorldBounds = new Phaser.Signal()` and it will be called when a collision happens, passing five arguments: `onWorldBounds(sprite, up, down, left, right)` where the Sprite is a reference to the Sprite that owns this Body, and the other arguments are booleans indicating on which side of the world the Body collided.

func (*PhysicsArcadeBody) OverlapR

func (self *PhysicsArcadeBody) OverlapR() int

OverlapR If `Body.isCircle` is true, and this body collides with another circular body, the amount of overlap is stored here. The amount of overlap during the collision.

func (*PhysicsArcadeBody) OverlapX

func (self *PhysicsArcadeBody) OverlapX() int

OverlapX When this body collides with another, the amount of overlap is stored here. The amount of horizontal overlap during the collision.

func (*PhysicsArcadeBody) OverlapY

func (self *PhysicsArcadeBody) OverlapY() int

OverlapY When this body collides with another, the amount of overlap is stored here. The amount of vertical overlap during the collision.

func (*PhysicsArcadeBody) Position

func (self *PhysicsArcadeBody) Position() *Point

Position The position of the physics body.

func (*PhysicsArcadeBody) PostUpdate

func (self *PhysicsArcadeBody) PostUpdate()

PostUpdate Internal method.

func (*PhysicsArcadeBody) PostUpdateI

func (self *PhysicsArcadeBody) PostUpdateI(args ...interface{})

PostUpdateI Internal method.

func (*PhysicsArcadeBody) PreRotation

func (self *PhysicsArcadeBody) PreRotation() int

PreRotation The previous rotation of the physics body.

func (*PhysicsArcadeBody) PreUpdate

func (self *PhysicsArcadeBody) PreUpdate()

PreUpdate Internal method.

func (*PhysicsArcadeBody) PreUpdateI

func (self *PhysicsArcadeBody) PreUpdateI(args ...interface{})

PreUpdateI Internal method.

func (*PhysicsArcadeBody) Prev

func (self *PhysicsArcadeBody) Prev() *Point

Prev The previous position of the physics body.

func (*PhysicsArcadeBody) Radius

func (self *PhysicsArcadeBody) Radius() int

Radius The radius of the circular collision shape this Body is using if Body.setCircle has been enabled. If you wish to change the radius then call `setCircle` again with the new value. If you wish to stop the Body using a circle then call `setCircle` with a radius of zero (or undefined).

func (*PhysicsArcadeBody) Render

func (self *PhysicsArcadeBody) Render(context interface{}, body *PhysicsArcadeBody)

Render Render Sprite Body.

func (*PhysicsArcadeBody) Render1O

func (self *PhysicsArcadeBody) Render1O(context interface{}, body *PhysicsArcadeBody, color string)

Render1O Render Sprite Body.

func (*PhysicsArcadeBody) Render2O

func (self *PhysicsArcadeBody) Render2O(context interface{}, body *PhysicsArcadeBody, color string, filled bool)

Render2O Render Sprite Body.

func (*PhysicsArcadeBody) RenderBodyInfo

func (self *PhysicsArcadeBody) RenderBodyInfo(body *PhysicsArcadeBody, x int, y int)

RenderBodyInfo Render Sprite Body Physics Data as text.

func (*PhysicsArcadeBody) RenderBodyInfo1O

func (self *PhysicsArcadeBody) RenderBodyInfo1O(body *PhysicsArcadeBody, x int, y int, color string)

RenderBodyInfo1O Render Sprite Body Physics Data as text.

func (*PhysicsArcadeBody) RenderBodyInfoI

func (self *PhysicsArcadeBody) RenderBodyInfoI(args ...interface{})

RenderBodyInfoI Render Sprite Body Physics Data as text.

func (*PhysicsArcadeBody) RenderI

func (self *PhysicsArcadeBody) RenderI(args ...interface{})

RenderI Render Sprite Body.

func (*PhysicsArcadeBody) Reset

func (self *PhysicsArcadeBody) Reset(x int, y int)

Reset Resets all Body values (velocity, acceleration, rotation, etc)

func (*PhysicsArcadeBody) ResetI

func (self *PhysicsArcadeBody) ResetI(args ...interface{})

ResetI Resets all Body values (velocity, acceleration, rotation, etc)

func (*PhysicsArcadeBody) Right

func (self *PhysicsArcadeBody) Right() int

Right The right value of this Body (same as Body.x + Body.width)

func (*PhysicsArcadeBody) Rotation

func (self *PhysicsArcadeBody) Rotation() int

Rotation The Body's rotation in degrees, as calculated by its angularVelocity and angularAcceleration. Please understand that the collision Body itself never rotates, it is always axis-aligned. However these values are passed up to the parent Sprite and updates its rotation.

func (*PhysicsArcadeBody) SetAccelerationA

func (self *PhysicsArcadeBody) SetAccelerationA(member *Point)

SetAccelerationA The acceleration is the rate of change of the velocity. Measured in pixels per second squared.

func (*PhysicsArcadeBody) SetAllowGravityA

func (self *PhysicsArcadeBody) SetAllowGravityA(member bool)

SetAllowGravityA Allow this Body to be influenced by gravity? Either world or local.

func (*PhysicsArcadeBody) SetAllowRotationA

func (self *PhysicsArcadeBody) SetAllowRotationA(member bool)

SetAllowRotationA Allow this Body to be rotated? (via angularVelocity, etc)

func (*PhysicsArcadeBody) SetAngleA

func (self *PhysicsArcadeBody) SetAngleA(member int)

SetAngleA The angle of the Body's velocity in radians.

func (*PhysicsArcadeBody) SetAngularAccelerationA

func (self *PhysicsArcadeBody) SetAngularAccelerationA(member int)

SetAngularAccelerationA The angular acceleration is the rate of change of the angular velocity. Measured in degrees per second squared.

func (*PhysicsArcadeBody) SetAngularDragA

func (self *PhysicsArcadeBody) SetAngularDragA(member int)

SetAngularDragA The drag applied during the rotation of the Body. Measured in degrees per second squared.

func (*PhysicsArcadeBody) SetAngularVelocityA

func (self *PhysicsArcadeBody) SetAngularVelocityA(member int)

SetAngularVelocityA The angular velocity controls the rotation speed of the Body. It is measured in degrees per second.

func (*PhysicsArcadeBody) SetBlockedA

func (self *PhysicsArcadeBody) SetBlockedA(member interface{})

SetBlockedA This object is populated with boolean values when the Body collides with the World bounds or a Tile. For example if blocked.up is true then the Body cannot move up. An object containing on which faces this Body is blocked from moving, if any.

func (*PhysicsArcadeBody) SetBottomA

func (self *PhysicsArcadeBody) SetBottomA(member int)

SetBottomA The bottom value of this Body (same as Body.y + Body.height)

func (*PhysicsArcadeBody) SetBounceA

func (self *PhysicsArcadeBody) SetBounceA(member *Point)

SetBounceA The elasticity of the Body when colliding. bounce.x/y = 1 means full rebound, bounce.x/y = 0.5 means 50% rebound velocity.

func (*PhysicsArcadeBody) SetCenterA

func (self *PhysicsArcadeBody) SetCenterA(member *Point)

SetCenterA The center coordinate of the Physics Body.

func (*PhysicsArcadeBody) SetCheckCollisionA

func (self *PhysicsArcadeBody) SetCheckCollisionA(member interface{})

SetCheckCollisionA Set the checkCollision properties to control which directions collision is processed for this Body. For example checkCollision.up = false means it won't collide when the collision happened while moving up. If you need to disable a Body entirely, use `body.enable = false`, this will also disable motion. If you need to disable just collision and/or overlap checks, but retain motion, set `checkCollision.none = true`. An object containing allowed collision.

func (*PhysicsArcadeBody) SetCircle

func (self *PhysicsArcadeBody) SetCircle()

SetCircle Sets this Body as using a circle, of the given radius, for all collision detection instead of a rectangle. The radius is given in pixels and is the distance from the center of the circle to the edge.

You can also control the x and y offset, which is the position of the Body relative to the top-left of the Sprite.

To change a Body back to being rectangular again call `Body.setSize`.

Note: Circular collision only happens with other Arcade Physics bodies, it does not work against tile maps, where rectangular collision is the only method supported.

func (*PhysicsArcadeBody) SetCircle1O

func (self *PhysicsArcadeBody) SetCircle1O(radius int)

SetCircle1O Sets this Body as using a circle, of the given radius, for all collision detection instead of a rectangle. The radius is given in pixels and is the distance from the center of the circle to the edge.

You can also control the x and y offset, which is the position of the Body relative to the top-left of the Sprite.

To change a Body back to being rectangular again call `Body.setSize`.

Note: Circular collision only happens with other Arcade Physics bodies, it does not work against tile maps, where rectangular collision is the only method supported.

func (*PhysicsArcadeBody) SetCircle2O

func (self *PhysicsArcadeBody) SetCircle2O(radius int, offsetX int)

SetCircle2O Sets this Body as using a circle, of the given radius, for all collision detection instead of a rectangle. The radius is given in pixels and is the distance from the center of the circle to the edge.

You can also control the x and y offset, which is the position of the Body relative to the top-left of the Sprite.

To change a Body back to being rectangular again call `Body.setSize`.

Note: Circular collision only happens with other Arcade Physics bodies, it does not work against tile maps, where rectangular collision is the only method supported.

func (*PhysicsArcadeBody) SetCircle3O

func (self *PhysicsArcadeBody) SetCircle3O(radius int, offsetX int, offsetY int)

SetCircle3O Sets this Body as using a circle, of the given radius, for all collision detection instead of a rectangle. The radius is given in pixels and is the distance from the center of the circle to the edge.

You can also control the x and y offset, which is the position of the Body relative to the top-left of the Sprite.

To change a Body back to being rectangular again call `Body.setSize`.

Note: Circular collision only happens with other Arcade Physics bodies, it does not work against tile maps, where rectangular collision is the only method supported.

func (*PhysicsArcadeBody) SetCircleI

func (self *PhysicsArcadeBody) SetCircleI(args ...interface{})

SetCircleI Sets this Body as using a circle, of the given radius, for all collision detection instead of a rectangle. The radius is given in pixels and is the distance from the center of the circle to the edge.

You can also control the x and y offset, which is the position of the Body relative to the top-left of the Sprite.

To change a Body back to being rectangular again call `Body.setSize`.

Note: Circular collision only happens with other Arcade Physics bodies, it does not work against tile maps, where rectangular collision is the only method supported.

func (*PhysicsArcadeBody) SetCollideWorldBoundsA

func (self *PhysicsArcadeBody) SetCollideWorldBoundsA(member bool)

SetCollideWorldBoundsA A Body can be set to collide against the World bounds automatically and rebound back into the World if this is set to true. Otherwise it will leave the World. Should the Body collide with the World bounds?

func (*PhysicsArcadeBody) SetCustomSeparateXA

func (self *PhysicsArcadeBody) SetCustomSeparateXA(member bool)

SetCustomSeparateXA This flag allows you to disable the custom x separation that takes place by Physics.Arcade.separate. Used in combination with your own collision processHandler you can create whatever type of collision response you need. Use a custom separation system or the built-in one?

func (*PhysicsArcadeBody) SetCustomSeparateYA

func (self *PhysicsArcadeBody) SetCustomSeparateYA(member bool)

SetCustomSeparateYA This flag allows you to disable the custom y separation that takes place by Physics.Arcade.separate. Used in combination with your own collision processHandler you can create whatever type of collision response you need. Use a custom separation system or the built-in one?

func (*PhysicsArcadeBody) SetDeltaMaxA

func (self *PhysicsArcadeBody) SetDeltaMaxA(member *Point)

SetDeltaMaxA The Sprite position is updated based on the delta x/y values. You can set a cap on those (both +-) using deltaMax.

func (*PhysicsArcadeBody) SetDirtyA

func (self *PhysicsArcadeBody) SetDirtyA(member bool)

SetDirtyA If this Body in a preUpdate (true) or postUpdate (false) state?

func (*PhysicsArcadeBody) SetDragA

func (self *PhysicsArcadeBody) SetDragA(member *Point)

SetDragA The drag applied to the motion of the Body.

func (*PhysicsArcadeBody) SetEmbeddedA

func (self *PhysicsArcadeBody) SetEmbeddedA(member bool)

SetEmbeddedA If a body is overlapping with another body, but neither of them are moving (maybe they spawned on-top of each other?) this is set to true. Body embed value.

func (*PhysicsArcadeBody) SetEnableA

func (self *PhysicsArcadeBody) SetEnableA(member bool)

SetEnableA A disabled body won't be checked for any form of collision or overlap or have its pre/post updates run.

func (*PhysicsArcadeBody) SetFacingA

func (self *PhysicsArcadeBody) SetFacingA(member int)

SetFacingA A const reference to the direction the Body is traveling or facing.

func (*PhysicsArcadeBody) SetFrictionA

func (self *PhysicsArcadeBody) SetFrictionA(member *Point)

SetFrictionA The amount of movement that will occur if another object 'rides' this one.

func (*PhysicsArcadeBody) SetGameA

func (self *PhysicsArcadeBody) SetGameA(member *Game)

SetGameA Local reference to game.

func (*PhysicsArcadeBody) SetGravityA

func (self *PhysicsArcadeBody) SetGravityA(member *Point)

SetGravityA A local gravity applied to this Body. If non-zero this over rides any world gravity, unless Body.allowGravity is set to false.

func (*PhysicsArcadeBody) SetHalfHeightA

func (self *PhysicsArcadeBody) SetHalfHeightA(member int)

SetHalfHeightA The calculated height / 2 of the physics body.

func (*PhysicsArcadeBody) SetHalfWidthA

func (self *PhysicsArcadeBody) SetHalfWidthA(member int)

SetHalfWidthA The calculated width / 2 of the physics body.

func (*PhysicsArcadeBody) SetHeightA

func (self *PhysicsArcadeBody) SetHeightA(member int)

SetHeightA The calculated height of the physics body.

func (*PhysicsArcadeBody) SetImmovableA

func (self *PhysicsArcadeBody) SetImmovableA(member bool)

SetImmovableA An immovable Body will not receive any impacts from other bodies.

func (*PhysicsArcadeBody) SetIsCircleA

func (self *PhysicsArcadeBody) SetIsCircleA(member bool)

SetIsCircleA If `true` this Body is using circular collision detection. If `false` it is using rectangular. Use `Body.setCircle` to control the collision shape this Body uses.

func (*PhysicsArcadeBody) SetIsMovingA

func (self *PhysicsArcadeBody) SetIsMovingA(member bool)

SetIsMovingA Set by the `moveTo` and `moveFrom` methods.

func (*PhysicsArcadeBody) SetLeftA

func (self *PhysicsArcadeBody) SetLeftA(member int)

SetLeftA The x position of the Body. The same as `Body.x`.

func (*PhysicsArcadeBody) SetMassA

func (self *PhysicsArcadeBody) SetMassA(member int)

SetMassA The mass of the Body. When two bodies collide their mass is used in the calculation to determine the exchange of velocity.

func (*PhysicsArcadeBody) SetMaxAngularA

func (self *PhysicsArcadeBody) SetMaxAngularA(member int)

SetMaxAngularA The maximum angular velocity in degrees per second that the Body can reach.

func (*PhysicsArcadeBody) SetMaxVelocityA

func (self *PhysicsArcadeBody) SetMaxVelocityA(member *Point)

SetMaxVelocityA The maximum velocity in pixels per second sq. that the Body can reach.

func (*PhysicsArcadeBody) SetMovementCallbackA

func (self *PhysicsArcadeBody) SetMovementCallbackA(member interface{})

SetMovementCallbackA Optional callback. If set, invoked during the running of `moveTo` or `moveFrom` events.

func (*PhysicsArcadeBody) SetMovementCallbackContextA

func (self *PhysicsArcadeBody) SetMovementCallbackContextA(member interface{})

SetMovementCallbackContextA Context in which to call the movementCallback.

func (*PhysicsArcadeBody) SetMovesA

func (self *PhysicsArcadeBody) SetMovesA(member bool)

SetMovesA If you have a Body that is being moved around the world via a tween or a Group motion, but its local x/y position never actually changes, then you should set Body.moves = false. Otherwise it will most likely fly off the screen. If you want the physics system to move the body around, then set moves to true. Set to true to allow the Physics system to move this Body, otherwise false to move it manually.

func (*PhysicsArcadeBody) SetNewVelocityA

func (self *PhysicsArcadeBody) SetNewVelocityA(member *Point)

SetNewVelocityA The new velocity. Calculated during the Body.preUpdate and applied to its position.

func (*PhysicsArcadeBody) SetOffsetA

func (self *PhysicsArcadeBody) SetOffsetA(member *Point)

SetOffsetA The offset of the Physics Body from the Sprite x/y position.

func (*PhysicsArcadeBody) SetOnCollideA

func (self *PhysicsArcadeBody) SetOnCollideA(member *Signal)

SetOnCollideA A Signal that is dispatched when this Body collides with another Body.

You still need to call `game.physics.arcade.collide` in your `update` method in order for this signal to be dispatched.

Usually you'd pass a callback to the `collide` method, but this signal provides for a different level of notification.

Due to the potentially high volume of signals this could create it is disabled by default.

To use this feature set this property to a Phaser.Signal: `sprite.body.onCollide = new Phaser.Signal()` and it will be called when a collision happens, passing two arguments: the sprites which collided. The first sprite in the argument is always the owner of this Body.

If two Bodies with this Signal set collide, both will dispatch the Signal.

func (*PhysicsArcadeBody) SetOnMoveCompleteA

func (self *PhysicsArcadeBody) SetOnMoveCompleteA(member *Signal)

SetOnMoveCompleteA Listen for the completion of `moveTo` or `moveFrom` events.

func (*PhysicsArcadeBody) SetOnOverlapA

func (self *PhysicsArcadeBody) SetOnOverlapA(member *Signal)

SetOnOverlapA A Signal that is dispatched when this Body overlaps with another Body.

You still need to call `game.physics.arcade.overlap` in your `update` method in order for this signal to be dispatched.

Usually you'd pass a callback to the `overlap` method, but this signal provides for a different level of notification.

Due to the potentially high volume of signals this could create it is disabled by default.

To use this feature set this property to a Phaser.Signal: `sprite.body.onOverlap = new Phaser.Signal()` and it will be called when a collision happens, passing two arguments: the sprites which collided. The first sprite in the argument is always the owner of this Body.

If two Bodies with this Signal set collide, both will dispatch the Signal.

func (*PhysicsArcadeBody) SetOnWorldBoundsA

func (self *PhysicsArcadeBody) SetOnWorldBoundsA(member *Signal)

SetOnWorldBoundsA A Signal that is dispatched when this Body collides with the world bounds. Due to the potentially high volume of signals this could create it is disabled by default. To use this feature set this property to a Phaser.Signal: `sprite.body.onWorldBounds = new Phaser.Signal()` and it will be called when a collision happens, passing five arguments: `onWorldBounds(sprite, up, down, left, right)` where the Sprite is a reference to the Sprite that owns this Body, and the other arguments are booleans indicating on which side of the world the Body collided.

func (*PhysicsArcadeBody) SetOverlapRA

func (self *PhysicsArcadeBody) SetOverlapRA(member int)

SetOverlapRA If `Body.isCircle` is true, and this body collides with another circular body, the amount of overlap is stored here. The amount of overlap during the collision.

func (*PhysicsArcadeBody) SetOverlapXA

func (self *PhysicsArcadeBody) SetOverlapXA(member int)

SetOverlapXA When this body collides with another, the amount of overlap is stored here. The amount of horizontal overlap during the collision.

func (*PhysicsArcadeBody) SetOverlapYA

func (self *PhysicsArcadeBody) SetOverlapYA(member int)

SetOverlapYA When this body collides with another, the amount of overlap is stored here. The amount of vertical overlap during the collision.

func (*PhysicsArcadeBody) SetPositionA

func (self *PhysicsArcadeBody) SetPositionA(member *Point)

SetPositionA The position of the physics body.

func (*PhysicsArcadeBody) SetPreRotationA

func (self *PhysicsArcadeBody) SetPreRotationA(member int)

SetPreRotationA The previous rotation of the physics body.

func (*PhysicsArcadeBody) SetPrevA

func (self *PhysicsArcadeBody) SetPrevA(member *Point)

SetPrevA The previous position of the physics body.

func (*PhysicsArcadeBody) SetRadiusA

func (self *PhysicsArcadeBody) SetRadiusA(member int)

SetRadiusA The radius of the circular collision shape this Body is using if Body.setCircle has been enabled. If you wish to change the radius then call `setCircle` again with the new value. If you wish to stop the Body using a circle then call `setCircle` with a radius of zero (or undefined).

func (*PhysicsArcadeBody) SetRightA

func (self *PhysicsArcadeBody) SetRightA(member int)

SetRightA The right value of this Body (same as Body.x + Body.width)

func (*PhysicsArcadeBody) SetRotationA

func (self *PhysicsArcadeBody) SetRotationA(member int)

SetRotationA The Body's rotation in degrees, as calculated by its angularVelocity and angularAcceleration. Please understand that the collision Body itself never rotates, it is always axis-aligned. However these values are passed up to the parent Sprite and updates its rotation.

func (*PhysicsArcadeBody) SetSize

func (self *PhysicsArcadeBody) SetSize(width int, height int)

SetSize You can modify the size of the physics Body to be any dimension you need. This allows you to make it smaller, or larger, than the parent Sprite. You can also control the x and y offset of the Body. This is the position of the Body relative to the top-left of the Sprite _texture_.

For example: If you have a Sprite with a texture that is 80x100 in size, and you want the physics body to be 32x32 pixels in the middle of the texture, you would do:

`setSize(32, 32, 24, 34)`

Where the first two parameters is the new Body size (32x32 pixels). 24 is the horizontal offset of the Body from the top-left of the Sprites texture, and 34 is the vertical offset.

Calling `setSize` on a Body that has already had `setCircle` will reset all of the Circle properties, making this Body rectangular again.

func (*PhysicsArcadeBody) SetSize1O

func (self *PhysicsArcadeBody) SetSize1O(width int, height int, offsetX int)

SetSize1O You can modify the size of the physics Body to be any dimension you need. This allows you to make it smaller, or larger, than the parent Sprite. You can also control the x and y offset of the Body. This is the position of the Body relative to the top-left of the Sprite _texture_.

For example: If you have a Sprite with a texture that is 80x100 in size, and you want the physics body to be 32x32 pixels in the middle of the texture, you would do:

`setSize(32, 32, 24, 34)`

Where the first two parameters is the new Body size (32x32 pixels). 24 is the horizontal offset of the Body from the top-left of the Sprites texture, and 34 is the vertical offset.

Calling `setSize` on a Body that has already had `setCircle` will reset all of the Circle properties, making this Body rectangular again.

func (*PhysicsArcadeBody) SetSize2O

func (self *PhysicsArcadeBody) SetSize2O(width int, height int, offsetX int, offsetY int)

SetSize2O You can modify the size of the physics Body to be any dimension you need. This allows you to make it smaller, or larger, than the parent Sprite. You can also control the x and y offset of the Body. This is the position of the Body relative to the top-left of the Sprite _texture_.

For example: If you have a Sprite with a texture that is 80x100 in size, and you want the physics body to be 32x32 pixels in the middle of the texture, you would do:

`setSize(32, 32, 24, 34)`

Where the first two parameters is the new Body size (32x32 pixels). 24 is the horizontal offset of the Body from the top-left of the Sprites texture, and 34 is the vertical offset.

Calling `setSize` on a Body that has already had `setCircle` will reset all of the Circle properties, making this Body rectangular again.

func (*PhysicsArcadeBody) SetSizeI

func (self *PhysicsArcadeBody) SetSizeI(args ...interface{})

SetSizeI You can modify the size of the physics Body to be any dimension you need. This allows you to make it smaller, or larger, than the parent Sprite. You can also control the x and y offset of the Body. This is the position of the Body relative to the top-left of the Sprite _texture_.

For example: If you have a Sprite with a texture that is 80x100 in size, and you want the physics body to be 32x32 pixels in the middle of the texture, you would do:

`setSize(32, 32, 24, 34)`

Where the first two parameters is the new Body size (32x32 pixels). 24 is the horizontal offset of the Body from the top-left of the Sprites texture, and 34 is the vertical offset.

Calling `setSize` on a Body that has already had `setCircle` will reset all of the Circle properties, making this Body rectangular again.

func (*PhysicsArcadeBody) SetSkipQuadTreeA

func (self *PhysicsArcadeBody) SetSkipQuadTreeA(member bool)

SetSkipQuadTreeA If true and you collide this Sprite against a Group, it will disable the collision check from using a QuadTree.

func (*PhysicsArcadeBody) SetSourceHeightA

func (self *PhysicsArcadeBody) SetSourceHeightA(member int)

SetSourceHeightA The un-scaled original size.

func (*PhysicsArcadeBody) SetSourceWidthA

func (self *PhysicsArcadeBody) SetSourceWidthA(member int)

SetSourceWidthA The un-scaled original size.

func (*PhysicsArcadeBody) SetSpeedA

func (self *PhysicsArcadeBody) SetSpeedA(member int)

SetSpeedA The speed of the Body as calculated by its velocity.

func (*PhysicsArcadeBody) SetSpriteA

func (self *PhysicsArcadeBody) SetSpriteA(member *Sprite)

SetSpriteA Reference to the parent Sprite.

func (*PhysicsArcadeBody) SetStopVelocityOnCollideA

func (self *PhysicsArcadeBody) SetStopVelocityOnCollideA(member bool)

SetStopVelocityOnCollideA Set by the `moveTo` and `moveFrom` methods.

func (*PhysicsArcadeBody) SetSyncBoundsA

func (self *PhysicsArcadeBody) SetSyncBoundsA(member bool)

SetSyncBoundsA If true the Body will check itself against the Sprite.getBounds() dimensions and adjust its width and height accordingly. If false it will compare its dimensions against the Sprite scale instead, and adjust its width height if the scale has changed. Typically you would need to enable syncBounds if your sprite is the child of a responsive display object such as a FlexLayer, or in any situation where the Sprite scale doesn't change, but its parents scale is effecting the dimensions regardless.

func (*PhysicsArcadeBody) SetTilePaddingA

func (self *PhysicsArcadeBody) SetTilePaddingA(member *Point)

SetTilePaddingA If this is an especially small or fast moving object then it can sometimes skip over tilemap collisions if it moves through a tile in a step. Set this padding value to add extra padding to its bounds. tilePadding.x applied to its width, y to its height. Extra padding to be added to this sprite's dimensions when checking for tile collision.

func (*PhysicsArcadeBody) SetTopA

func (self *PhysicsArcadeBody) SetTopA(member int)

SetTopA The y position of the Body. The same as `Body.y`.

func (*PhysicsArcadeBody) SetTouchingA

func (self *PhysicsArcadeBody) SetTouchingA(member interface{})

SetTouchingA This object is populated with boolean values when the Body collides with another. touching.up = true means the collision happened to the top of this Body for example. An object containing touching results.

func (*PhysicsArcadeBody) SetTypeA

func (self *PhysicsArcadeBody) SetTypeA(member int)

SetTypeA The type of physics system this body belongs to.

func (*PhysicsArcadeBody) SetVelocityA

func (self *PhysicsArcadeBody) SetVelocityA(member *Point)

SetVelocityA The velocity, or rate of change in speed of the Body. Measured in pixels per second.

func (*PhysicsArcadeBody) SetWasTouchingA

func (self *PhysicsArcadeBody) SetWasTouchingA(member interface{})

SetWasTouchingA This object is populated with previous touching values from the bodies previous collision. An object containing previous touching results.

func (*PhysicsArcadeBody) SetWidthA

func (self *PhysicsArcadeBody) SetWidthA(member int)

SetWidthA The calculated width of the physics body.

func (*PhysicsArcadeBody) SetWorldBounceA

func (self *PhysicsArcadeBody) SetWorldBounceA(member *Point)

SetWorldBounceA The elasticity of the Body when colliding with the World bounds. By default this property is `null`, in which case `Body.bounce` is used instead. Set this property to a Phaser.Point object in order to enable a World bounds specific bounce value.

func (*PhysicsArcadeBody) SetXA

func (self *PhysicsArcadeBody) SetXA(member int)

SetXA The x position.

func (*PhysicsArcadeBody) SetYA

func (self *PhysicsArcadeBody) SetYA(member int)

SetYA The y position.

func (*PhysicsArcadeBody) SkipQuadTree

func (self *PhysicsArcadeBody) SkipQuadTree() bool

SkipQuadTree If true and you collide this Sprite against a Group, it will disable the collision check from using a QuadTree.

func (*PhysicsArcadeBody) SourceHeight

func (self *PhysicsArcadeBody) SourceHeight() int

SourceHeight The un-scaled original size.

func (*PhysicsArcadeBody) SourceWidth

func (self *PhysicsArcadeBody) SourceWidth() int

SourceWidth The un-scaled original size.

func (*PhysicsArcadeBody) Speed

func (self *PhysicsArcadeBody) Speed() int

Speed The speed of the Body as calculated by its velocity.

func (*PhysicsArcadeBody) Sprite

func (self *PhysicsArcadeBody) Sprite() *Sprite

Sprite Reference to the parent Sprite.

func (*PhysicsArcadeBody) StopMovement

func (self *PhysicsArcadeBody) StopMovement()

StopMovement If this Body is moving as a result of a call to `moveTo` or `moveFrom` (i.e. it has Body.isMoving true), then calling this method will stop the movement before either the duration or distance counters expire.

The `onMoveComplete` signal is dispatched.

func (*PhysicsArcadeBody) StopMovement1O

func (self *PhysicsArcadeBody) StopMovement1O(stopVelocity bool)

StopMovement1O If this Body is moving as a result of a call to `moveTo` or `moveFrom` (i.e. it has Body.isMoving true), then calling this method will stop the movement before either the duration or distance counters expire.

The `onMoveComplete` signal is dispatched.

func (*PhysicsArcadeBody) StopMovementI

func (self *PhysicsArcadeBody) StopMovementI(args ...interface{})

StopMovementI If this Body is moving as a result of a call to `moveTo` or `moveFrom` (i.e. it has Body.isMoving true), then calling this method will stop the movement before either the duration or distance counters expire.

The `onMoveComplete` signal is dispatched.

func (*PhysicsArcadeBody) StopVelocityOnCollide

func (self *PhysicsArcadeBody) StopVelocityOnCollide() bool

StopVelocityOnCollide Set by the `moveTo` and `moveFrom` methods.

func (*PhysicsArcadeBody) SyncBounds

func (self *PhysicsArcadeBody) SyncBounds() bool

SyncBounds If true the Body will check itself against the Sprite.getBounds() dimensions and adjust its width and height accordingly. If false it will compare its dimensions against the Sprite scale instead, and adjust its width height if the scale has changed. Typically you would need to enable syncBounds if your sprite is the child of a responsive display object such as a FlexLayer, or in any situation where the Sprite scale doesn't change, but its parents scale is effecting the dimensions regardless.

func (*PhysicsArcadeBody) TilePadding

func (self *PhysicsArcadeBody) TilePadding() *Point

TilePadding If this is an especially small or fast moving object then it can sometimes skip over tilemap collisions if it moves through a tile in a step. Set this padding value to add extra padding to its bounds. tilePadding.x applied to its width, y to its height. Extra padding to be added to this sprite's dimensions when checking for tile collision.

func (*PhysicsArcadeBody) Top

func (self *PhysicsArcadeBody) Top() int

Top The y position of the Body. The same as `Body.y`.

func (*PhysicsArcadeBody) Touching

func (self *PhysicsArcadeBody) Touching() interface{}

Touching This object is populated with boolean values when the Body collides with another. touching.up = true means the collision happened to the top of this Body for example. An object containing touching results.

func (*PhysicsArcadeBody) Type

func (self *PhysicsArcadeBody) Type() int

Type The type of physics system this body belongs to.

func (*PhysicsArcadeBody) UpdateBounds

func (self *PhysicsArcadeBody) UpdateBounds()

UpdateBounds Internal method.

func (*PhysicsArcadeBody) UpdateBoundsI

func (self *PhysicsArcadeBody) UpdateBoundsI(args ...interface{})

UpdateBoundsI Internal method.

func (*PhysicsArcadeBody) UpdateMovement

func (self *PhysicsArcadeBody) UpdateMovement()

UpdateMovement Internal method.

func (*PhysicsArcadeBody) UpdateMovementI

func (self *PhysicsArcadeBody) UpdateMovementI(args ...interface{})

UpdateMovementI Internal method.

func (*PhysicsArcadeBody) Velocity

func (self *PhysicsArcadeBody) Velocity() *Point

Velocity The velocity, or rate of change in speed of the Body. Measured in pixels per second.

func (*PhysicsArcadeBody) WasTouching

func (self *PhysicsArcadeBody) WasTouching() interface{}

WasTouching This object is populated with previous touching values from the bodies previous collision. An object containing previous touching results.

func (*PhysicsArcadeBody) Width

func (self *PhysicsArcadeBody) Width() int

Width The calculated width of the physics body.

func (*PhysicsArcadeBody) WorldBounce

func (self *PhysicsArcadeBody) WorldBounce() *Point

WorldBounce The elasticity of the Body when colliding with the World bounds. By default this property is `null`, in which case `Body.bounce` is used instead. Set this property to a Phaser.Point object in order to enable a World bounds specific bounce value.

func (*PhysicsArcadeBody) X

func (self *PhysicsArcadeBody) X() int

X The x position.

func (*PhysicsArcadeBody) Y

func (self *PhysicsArcadeBody) Y() int

Y The y position.

type PhysicsArcadeTilemapCollision

type PhysicsArcadeTilemapCollision struct {
	*js.Object
}

PhysicsArcadeTilemapCollision The Arcade Physics Tile map collision methods.

func NewPhysicsArcadeTilemapCollision

func NewPhysicsArcadeTilemapCollision() *PhysicsArcadeTilemapCollision

NewPhysicsArcadeTilemapCollision The Arcade Physics Tile map collision methods.

func NewPhysicsArcadeTilemapCollisionI

func NewPhysicsArcadeTilemapCollisionI(args ...interface{}) *PhysicsArcadeTilemapCollision

NewPhysicsArcadeTilemapCollisionI The Arcade Physics Tile map collision methods.

func ToPhysicsArcadeTilemapCollision

func ToPhysicsArcadeTilemapCollision(jsStruct interface{}) *PhysicsArcadeTilemapCollision

PhysicsArcadeTilemapCollision Binding conversion method to PhysicsArcadeTilemapCollision point

func (*PhysicsArcadeTilemapCollision) SetTILE_BIASA

func (self *PhysicsArcadeTilemapCollision) SetTILE_BIASA(member int)

SetTILE_BIASA A value added to the delta values during collision with tiles. Adjust this if you get tunneling.

func (*PhysicsArcadeTilemapCollision) TILE_BIAS

func (self *PhysicsArcadeTilemapCollision) TILE_BIAS() int

TILE_BIAS A value added to the delta values during collision with tiles. Adjust this if you get tunneling.

type PhysicsBox2D

type PhysicsBox2D struct{ *js.Object }

Physics

type PhysicsChipmunk

type PhysicsChipmunk struct{ *js.Object }

type PhysicsCollisionGroup

type PhysicsCollisionGroup struct{ *js.Object }

type PhysicsMatter

type PhysicsMatter struct{ *js.Object }

type PhysicsNinja

type PhysicsNinja struct {
	*js.Object
}

PhysicsNinja Ninja Physics. The Ninja Physics system was created in Flash by Metanet Software and ported to JavaScript by Richard Davey.

It allows for AABB and Circle to Tile collision. Tiles can be any of 34 different types, including slopes, convex and concave shapes.

It does what it does very well, but is ripe for expansion and optimisation. Here are some features that I'd love to see the community add:

* AABB to AABB collision * AABB to Circle collision * AABB and Circle 'immovable' property support * n-way collision, so an AABB/Circle could pass through a tile from below and land upon it. * QuadTree or spatial grid for faster Body vs. Tile Group look-ups. * Optimise the internal vector math and reduce the quantity of temporary vars created. * Expand Gravity and Bounce to allow for separate x/y axis values. * Support Bodies linked to Sprites that don't have anchor set to 0.5

Feel free to attempt any of the above and submit a Pull Request with your code! Be sure to include test cases proving they work.

func NewPhysicsNinja

func NewPhysicsNinja(game *Game) *PhysicsNinja

NewPhysicsNinja Ninja Physics. The Ninja Physics system was created in Flash by Metanet Software and ported to JavaScript by Richard Davey.

It allows for AABB and Circle to Tile collision. Tiles can be any of 34 different types, including slopes, convex and concave shapes.

It does what it does very well, but is ripe for expansion and optimisation. Here are some features that I'd love to see the community add:

* AABB to AABB collision * AABB to Circle collision * AABB and Circle 'immovable' property support * n-way collision, so an AABB/Circle could pass through a tile from below and land upon it. * QuadTree or spatial grid for faster Body vs. Tile Group look-ups. * Optimise the internal vector math and reduce the quantity of temporary vars created. * Expand Gravity and Bounce to allow for separate x/y axis values. * Support Bodies linked to Sprites that don't have anchor set to 0.5

Feel free to attempt any of the above and submit a Pull Request with your code! Be sure to include test cases proving they work.

func NewPhysicsNinjaI

func NewPhysicsNinjaI(args ...interface{}) *PhysicsNinja

NewPhysicsNinjaI Ninja Physics. The Ninja Physics system was created in Flash by Metanet Software and ported to JavaScript by Richard Davey.

It allows for AABB and Circle to Tile collision. Tiles can be any of 34 different types, including slopes, convex and concave shapes.

It does what it does very well, but is ripe for expansion and optimisation. Here are some features that I'd love to see the community add:

* AABB to AABB collision * AABB to Circle collision * AABB and Circle 'immovable' property support * n-way collision, so an AABB/Circle could pass through a tile from below and land upon it. * QuadTree or spatial grid for faster Body vs. Tile Group look-ups. * Optimise the internal vector math and reduce the quantity of temporary vars created. * Expand Gravity and Bounce to allow for separate x/y axis values. * Support Bodies linked to Sprites that don't have anchor set to 0.5

Feel free to attempt any of the above and submit a Pull Request with your code! Be sure to include test cases proving they work.

func ToPhysicsNinja

func ToPhysicsNinja(jsStruct interface{}) *PhysicsNinja

PhysicsNinja Binding conversion method to PhysicsNinja point

func (*PhysicsNinja) Bounds

func (self *PhysicsNinja) Bounds() *Rectangle

Bounds The bounds inside of which the physics world exists. Defaults to match the world bounds.

func (*PhysicsNinja) ClearTilemapLayerBodies

func (self *PhysicsNinja) ClearTilemapLayerBodies(map_ *Tilemap)

ClearTilemapLayerBodies Clears all physics bodies from the given TilemapLayer that were created with `World.convertTilemap`.

func (*PhysicsNinja) ClearTilemapLayerBodies1O

func (self *PhysicsNinja) ClearTilemapLayerBodies1O(map_ *Tilemap, layer interface{})

ClearTilemapLayerBodies1O Clears all physics bodies from the given TilemapLayer that were created with `World.convertTilemap`.

func (*PhysicsNinja) ClearTilemapLayerBodiesI

func (self *PhysicsNinja) ClearTilemapLayerBodiesI(args ...interface{})

ClearTilemapLayerBodiesI Clears all physics bodies from the given TilemapLayer that were created with `World.convertTilemap`.

func (*PhysicsNinja) Collide

func (self *PhysicsNinja) Collide(object1 interface{}, object2 interface{}) bool

Collide Checks for collision between two game objects. You can perform Sprite vs. Sprite, Sprite vs. Group, Group vs. Group, Sprite vs. Tilemap Layer or Group vs. Tilemap Layer collisions. The second parameter can be an array of objects, of differing types. The objects are also automatically separated. If you don't require separation then use ArcadePhysics.overlap instead. An optional processCallback can be provided. If given this function will be called when two sprites are found to be colliding. It is called before any separation takes place, giving you the chance to perform additional checks. If the function returns true then the collision and separation is carried out. If it returns false it is skipped. The collideCallback is an optional function that is only called if two sprites collide. If a processCallback has been set then it needs to return true for collideCallback to be called.

func (*PhysicsNinja) Collide1O

func (self *PhysicsNinja) Collide1O(object1 interface{}, object2 interface{}, collideCallback interface{}) bool

Collide1O Checks for collision between two game objects. You can perform Sprite vs. Sprite, Sprite vs. Group, Group vs. Group, Sprite vs. Tilemap Layer or Group vs. Tilemap Layer collisions. The second parameter can be an array of objects, of differing types. The objects are also automatically separated. If you don't require separation then use ArcadePhysics.overlap instead. An optional processCallback can be provided. If given this function will be called when two sprites are found to be colliding. It is called before any separation takes place, giving you the chance to perform additional checks. If the function returns true then the collision and separation is carried out. If it returns false it is skipped. The collideCallback is an optional function that is only called if two sprites collide. If a processCallback has been set then it needs to return true for collideCallback to be called.

func (*PhysicsNinja) Collide2O

func (self *PhysicsNinja) Collide2O(object1 interface{}, object2 interface{}, collideCallback interface{}, processCallback interface{}) bool

Collide2O Checks for collision between two game objects. You can perform Sprite vs. Sprite, Sprite vs. Group, Group vs. Group, Sprite vs. Tilemap Layer or Group vs. Tilemap Layer collisions. The second parameter can be an array of objects, of differing types. The objects are also automatically separated. If you don't require separation then use ArcadePhysics.overlap instead. An optional processCallback can be provided. If given this function will be called when two sprites are found to be colliding. It is called before any separation takes place, giving you the chance to perform additional checks. If the function returns true then the collision and separation is carried out. If it returns false it is skipped. The collideCallback is an optional function that is only called if two sprites collide. If a processCallback has been set then it needs to return true for collideCallback to be called.

func (*PhysicsNinja) Collide3O

func (self *PhysicsNinja) Collide3O(object1 interface{}, object2 interface{}, collideCallback interface{}, processCallback interface{}, callbackContext interface{}) bool

Collide3O Checks for collision between two game objects. You can perform Sprite vs. Sprite, Sprite vs. Group, Group vs. Group, Sprite vs. Tilemap Layer or Group vs. Tilemap Layer collisions. The second parameter can be an array of objects, of differing types. The objects are also automatically separated. If you don't require separation then use ArcadePhysics.overlap instead. An optional processCallback can be provided. If given this function will be called when two sprites are found to be colliding. It is called before any separation takes place, giving you the chance to perform additional checks. If the function returns true then the collision and separation is carried out. If it returns false it is skipped. The collideCallback is an optional function that is only called if two sprites collide. If a processCallback has been set then it needs to return true for collideCallback to be called.

func (*PhysicsNinja) CollideGroupVsGroup

func (self *PhysicsNinja) CollideGroupVsGroup()

CollideGroupVsGroup An internal function. Use Phaser.Physics.Ninja.collide instead.

func (*PhysicsNinja) CollideGroupVsGroupI

func (self *PhysicsNinja) CollideGroupVsGroupI(args ...interface{})

CollideGroupVsGroupI An internal function. Use Phaser.Physics.Ninja.collide instead.

func (*PhysicsNinja) CollideGroupVsSelf

func (self *PhysicsNinja) CollideGroupVsSelf()

CollideGroupVsSelf An internal function. Use Phaser.Physics.Ninja.collide instead.

func (*PhysicsNinja) CollideGroupVsSelfI

func (self *PhysicsNinja) CollideGroupVsSelfI(args ...interface{})

CollideGroupVsSelfI An internal function. Use Phaser.Physics.Ninja.collide instead.

func (*PhysicsNinja) CollideHandler

func (self *PhysicsNinja) CollideHandler(object1 interface{}, object2 interface{}, collideCallback interface{}, processCallback interface{}, callbackContext interface{}, overlapOnly bool)

CollideHandler Internal collision handler.

func (*PhysicsNinja) CollideHandlerI

func (self *PhysicsNinja) CollideHandlerI(args ...interface{})

CollideHandlerI Internal collision handler.

func (*PhysicsNinja) CollideI

func (self *PhysicsNinja) CollideI(args ...interface{}) bool

CollideI Checks for collision between two game objects. You can perform Sprite vs. Sprite, Sprite vs. Group, Group vs. Group, Sprite vs. Tilemap Layer or Group vs. Tilemap Layer collisions. The second parameter can be an array of objects, of differing types. The objects are also automatically separated. If you don't require separation then use ArcadePhysics.overlap instead. An optional processCallback can be provided. If given this function will be called when two sprites are found to be colliding. It is called before any separation takes place, giving you the chance to perform additional checks. If the function returns true then the collision and separation is carried out. If it returns false it is skipped. The collideCallback is an optional function that is only called if two sprites collide. If a processCallback has been set then it needs to return true for collideCallback to be called.

func (*PhysicsNinja) CollideSpriteVsGroup

func (self *PhysicsNinja) CollideSpriteVsGroup()

CollideSpriteVsGroup An internal function. Use Phaser.Physics.Ninja.collide instead.

func (*PhysicsNinja) CollideSpriteVsGroupI

func (self *PhysicsNinja) CollideSpriteVsGroupI(args ...interface{})

CollideSpriteVsGroupI An internal function. Use Phaser.Physics.Ninja.collide instead.

func (*PhysicsNinja) CollideSpriteVsSprite

func (self *PhysicsNinja) CollideSpriteVsSprite()

CollideSpriteVsSprite An internal function. Use Phaser.Physics.Ninja.collide instead.

func (*PhysicsNinja) CollideSpriteVsSpriteI

func (self *PhysicsNinja) CollideSpriteVsSpriteI(args ...interface{})

CollideSpriteVsSpriteI An internal function. Use Phaser.Physics.Ninja.collide instead.

func (*PhysicsNinja) ConvertTilemap

func (self *PhysicsNinja) ConvertTilemap(map_ *Tilemap, layer interface{}, slopeMap interface{}) []interface{}

ConvertTilemap Goes through all tiles in the given Tilemap and TilemapLayer and converts those set to collide into physics tiles. Only call this *after* you have specified all of the tiles you wish to collide with calls like Tilemap.setCollisionBetween, etc. Every time you call this method it will destroy any previously created bodies and remove them from the world. Therefore understand it's a very expensive operation and not to be done in a core game update loop.

In Ninja the Tiles have an ID from 0 to 33, where 0 is 'empty', 1 is a full tile, 2 is a 45-degree slope, etc. You can find the ID list either at the very bottom of `Tile.js`, or in a handy visual reference in the `resources/Ninja Physics Debug Tiles` folder in the repository. The slopeMap parameter is an array that controls how the indexes of the tiles in your tilemap data will map to the Ninja Tile IDs. For example if you had 6 tiles in your tileset: Imagine the first 4 should be converted into fully solid Tiles and the other 2 are 45-degree slopes. Your slopeMap array would look like this: `[ 1, 1, 1, 1, 2, 3 ]`. Where each element of the array is a tile in your tilemap and the resulting Ninja Tile it should create.

func (*PhysicsNinja) ConvertTilemapI

func (self *PhysicsNinja) ConvertTilemapI(args ...interface{}) []interface{}

ConvertTilemapI Goes through all tiles in the given Tilemap and TilemapLayer and converts those set to collide into physics tiles. Only call this *after* you have specified all of the tiles you wish to collide with calls like Tilemap.setCollisionBetween, etc. Every time you call this method it will destroy any previously created bodies and remove them from the world. Therefore understand it's a very expensive operation and not to be done in a core game update loop.

In Ninja the Tiles have an ID from 0 to 33, where 0 is 'empty', 1 is a full tile, 2 is a 45-degree slope, etc. You can find the ID list either at the very bottom of `Tile.js`, or in a handy visual reference in the `resources/Ninja Physics Debug Tiles` folder in the repository. The slopeMap parameter is an array that controls how the indexes of the tiles in your tilemap data will map to the Ninja Tile IDs. For example if you had 6 tiles in your tileset: Imagine the first 4 should be converted into fully solid Tiles and the other 2 are 45-degree slopes. Your slopeMap array would look like this: `[ 1, 1, 1, 1, 2, 3 ]`. Where each element of the array is a tile in your tilemap and the resulting Ninja Tile it should create.

func (*PhysicsNinja) Enable

func (self *PhysicsNinja) Enable(object interface{})

Enable This will create a Ninja Physics body on the given game object or array of game objects. A game object can only have 1 physics body active at any one time, and it can't be changed until the object is destroyed.

func (*PhysicsNinja) Enable1O

func (self *PhysicsNinja) Enable1O(object interface{}, type_ int)

Enable1O This will create a Ninja Physics body on the given game object or array of game objects. A game object can only have 1 physics body active at any one time, and it can't be changed until the object is destroyed.

func (*PhysicsNinja) Enable2O

func (self *PhysicsNinja) Enable2O(object interface{}, type_ int, id int)

Enable2O This will create a Ninja Physics body on the given game object or array of game objects. A game object can only have 1 physics body active at any one time, and it can't be changed until the object is destroyed.

func (*PhysicsNinja) Enable3O

func (self *PhysicsNinja) Enable3O(object interface{}, type_ int, id int, radius int)

Enable3O This will create a Ninja Physics body on the given game object or array of game objects. A game object can only have 1 physics body active at any one time, and it can't be changed until the object is destroyed.

func (*PhysicsNinja) Enable4O

func (self *PhysicsNinja) Enable4O(object interface{}, type_ int, id int, radius int, children bool)

Enable4O This will create a Ninja Physics body on the given game object or array of game objects. A game object can only have 1 physics body active at any one time, and it can't be changed until the object is destroyed.

func (*PhysicsNinja) EnableAABB

func (self *PhysicsNinja) EnableAABB(object interface{})

EnableAABB This will create a Ninja Physics AABB body on the given game object. Its dimensions will match the width and height of the object at the point it is created. A game object can only have 1 physics body active at any one time, and it can't be changed until the object is destroyed.

func (*PhysicsNinja) EnableAABB1O

func (self *PhysicsNinja) EnableAABB1O(object interface{}, children bool)

EnableAABB1O This will create a Ninja Physics AABB body on the given game object. Its dimensions will match the width and height of the object at the point it is created. A game object can only have 1 physics body active at any one time, and it can't be changed until the object is destroyed.

func (*PhysicsNinja) EnableAABBI

func (self *PhysicsNinja) EnableAABBI(args ...interface{})

EnableAABBI This will create a Ninja Physics AABB body on the given game object. Its dimensions will match the width and height of the object at the point it is created. A game object can only have 1 physics body active at any one time, and it can't be changed until the object is destroyed.

func (*PhysicsNinja) EnableBody

func (self *PhysicsNinja) EnableBody(object interface{})

EnableBody Creates a Ninja Physics body on the given game object. A game object can only have 1 physics body active at any one time, and it can't be changed until the body is nulled.

func (*PhysicsNinja) EnableBodyI

func (self *PhysicsNinja) EnableBodyI(args ...interface{})

EnableBodyI Creates a Ninja Physics body on the given game object. A game object can only have 1 physics body active at any one time, and it can't be changed until the body is nulled.

func (*PhysicsNinja) EnableCircle

func (self *PhysicsNinja) EnableCircle(object interface{}, radius int)

EnableCircle This will create a Ninja Physics Circle body on the given game object. A game object can only have 1 physics body active at any one time, and it can't be changed until the object is destroyed.

func (*PhysicsNinja) EnableCircle1O

func (self *PhysicsNinja) EnableCircle1O(object interface{}, radius int, children bool)

EnableCircle1O This will create a Ninja Physics Circle body on the given game object. A game object can only have 1 physics body active at any one time, and it can't be changed until the object is destroyed.

func (*PhysicsNinja) EnableCircleI

func (self *PhysicsNinja) EnableCircleI(args ...interface{})

EnableCircleI This will create a Ninja Physics Circle body on the given game object. A game object can only have 1 physics body active at any one time, and it can't be changed until the object is destroyed.

func (*PhysicsNinja) EnableI

func (self *PhysicsNinja) EnableI(args ...interface{})

EnableI This will create a Ninja Physics body on the given game object or array of game objects. A game object can only have 1 physics body active at any one time, and it can't be changed until the object is destroyed.

func (*PhysicsNinja) EnableTile

func (self *PhysicsNinja) EnableTile(object interface{})

EnableTile This will create a Ninja Physics Tile body on the given game object. There are 34 different types of tile you can create, including 45 degree slopes, convex and concave circles and more. The id parameter controls which Tile type is created, but you can also change it at run-time. Note that for all degree based tile types they need to have an equal width and height. If the given object doesn't have equal width and height it will use the width. A game object can only have 1 physics body active at any one time, and it can't be changed until the object is destroyed.

func (*PhysicsNinja) EnableTile1O

func (self *PhysicsNinja) EnableTile1O(object interface{}, id int)

EnableTile1O This will create a Ninja Physics Tile body on the given game object. There are 34 different types of tile you can create, including 45 degree slopes, convex and concave circles and more. The id parameter controls which Tile type is created, but you can also change it at run-time. Note that for all degree based tile types they need to have an equal width and height. If the given object doesn't have equal width and height it will use the width. A game object can only have 1 physics body active at any one time, and it can't be changed until the object is destroyed.

func (*PhysicsNinja) EnableTile2O

func (self *PhysicsNinja) EnableTile2O(object interface{}, id int, children bool)

EnableTile2O This will create a Ninja Physics Tile body on the given game object. There are 34 different types of tile you can create, including 45 degree slopes, convex and concave circles and more. The id parameter controls which Tile type is created, but you can also change it at run-time. Note that for all degree based tile types they need to have an equal width and height. If the given object doesn't have equal width and height it will use the width. A game object can only have 1 physics body active at any one time, and it can't be changed until the object is destroyed.

func (*PhysicsNinja) EnableTileI

func (self *PhysicsNinja) EnableTileI(args ...interface{})

EnableTileI This will create a Ninja Physics Tile body on the given game object. There are 34 different types of tile you can create, including 45 degree slopes, convex and concave circles and more. The id parameter controls which Tile type is created, but you can also change it at run-time. Note that for all degree based tile types they need to have an equal width and height. If the given object doesn't have equal width and height it will use the width. A game object can only have 1 physics body active at any one time, and it can't be changed until the object is destroyed.

func (*PhysicsNinja) Game

func (self *PhysicsNinja) Game() *Game

Game Local reference to game.

func (*PhysicsNinja) Gravity

func (self *PhysicsNinja) Gravity() int

Gravity The World gravity setting.

func (*PhysicsNinja) MaxLevels

func (self *PhysicsNinja) MaxLevels() int

MaxLevels Used by the QuadTree to set the maximum number of iteration levels.

func (*PhysicsNinja) MaxObjects

func (self *PhysicsNinja) MaxObjects() int

MaxObjects Used by the QuadTree to set the maximum number of objects per quad.

func (*PhysicsNinja) Overlap

func (self *PhysicsNinja) Overlap(object1 interface{}, object2 interface{}) bool

Overlap Checks for overlaps between two game objects. The objects can be Sprites, Groups or Emitters. You can perform Sprite vs. Sprite, Sprite vs. Group and Group vs. Group overlap checks. Unlike collide the objects are NOT automatically separated or have any physics applied, they merely test for overlap results. The second parameter can be an array of objects, of differing types.

func (*PhysicsNinja) Overlap1O

func (self *PhysicsNinja) Overlap1O(object1 interface{}, object2 interface{}, overlapCallback interface{}) bool

Overlap1O Checks for overlaps between two game objects. The objects can be Sprites, Groups or Emitters. You can perform Sprite vs. Sprite, Sprite vs. Group and Group vs. Group overlap checks. Unlike collide the objects are NOT automatically separated or have any physics applied, they merely test for overlap results. The second parameter can be an array of objects, of differing types.

func (*PhysicsNinja) Overlap2O

func (self *PhysicsNinja) Overlap2O(object1 interface{}, object2 interface{}, overlapCallback interface{}, processCallback interface{}) bool

Overlap2O Checks for overlaps between two game objects. The objects can be Sprites, Groups or Emitters. You can perform Sprite vs. Sprite, Sprite vs. Group and Group vs. Group overlap checks. Unlike collide the objects are NOT automatically separated or have any physics applied, they merely test for overlap results. The second parameter can be an array of objects, of differing types.

func (*PhysicsNinja) Overlap3O

func (self *PhysicsNinja) Overlap3O(object1 interface{}, object2 interface{}, overlapCallback interface{}, processCallback interface{}, callbackContext interface{}) bool

Overlap3O Checks for overlaps between two game objects. The objects can be Sprites, Groups or Emitters. You can perform Sprite vs. Sprite, Sprite vs. Group and Group vs. Group overlap checks. Unlike collide the objects are NOT automatically separated or have any physics applied, they merely test for overlap results. The second parameter can be an array of objects, of differing types.

func (*PhysicsNinja) OverlapI

func (self *PhysicsNinja) OverlapI(args ...interface{}) bool

OverlapI Checks for overlaps between two game objects. The objects can be Sprites, Groups or Emitters. You can perform Sprite vs. Sprite, Sprite vs. Group and Group vs. Group overlap checks. Unlike collide the objects are NOT automatically separated or have any physics applied, they merely test for overlap results. The second parameter can be an array of objects, of differing types.

func (*PhysicsNinja) QuadTree

func (self *PhysicsNinja) QuadTree() *QuadTree

QuadTree The world QuadTree.

func (*PhysicsNinja) Separate

func (self *PhysicsNinja) Separate(body1 *PhysicsNinjaBody, body2 *PhysicsNinjaBody) bool

Separate The core separation function to separate two physics bodies.

func (*PhysicsNinja) SeparateI

func (self *PhysicsNinja) SeparateI(args ...interface{}) bool

SeparateI The core separation function to separate two physics bodies.

func (*PhysicsNinja) SetBounds

func (self *PhysicsNinja) SetBounds(x int, y int, width int, height int)

SetBounds Updates the size of this physics world.

func (*PhysicsNinja) SetBoundsA

func (self *PhysicsNinja) SetBoundsA(member *Rectangle)

SetBoundsA The bounds inside of which the physics world exists. Defaults to match the world bounds.

func (*PhysicsNinja) SetBoundsI

func (self *PhysicsNinja) SetBoundsI(args ...interface{})

SetBoundsI Updates the size of this physics world.

func (*PhysicsNinja) SetBoundsToWorld

func (self *PhysicsNinja) SetBoundsToWorld()

SetBoundsToWorld Updates the size of this physics world to match the size of the game world.

func (*PhysicsNinja) SetBoundsToWorldI

func (self *PhysicsNinja) SetBoundsToWorldI(args ...interface{})

SetBoundsToWorldI Updates the size of this physics world to match the size of the game world.

func (*PhysicsNinja) SetGameA

func (self *PhysicsNinja) SetGameA(member *Game)

SetGameA Local reference to game.

func (*PhysicsNinja) SetGravityA

func (self *PhysicsNinja) SetGravityA(member int)

SetGravityA The World gravity setting.

func (*PhysicsNinja) SetMaxLevelsA

func (self *PhysicsNinja) SetMaxLevelsA(member int)

SetMaxLevelsA Used by the QuadTree to set the maximum number of iteration levels.

func (*PhysicsNinja) SetMaxObjectsA

func (self *PhysicsNinja) SetMaxObjectsA(member int)

SetMaxObjectsA Used by the QuadTree to set the maximum number of objects per quad.

func (*PhysicsNinja) SetQuadTreeA

func (self *PhysicsNinja) SetQuadTreeA(member *QuadTree)

SetQuadTreeA The world QuadTree.

func (*PhysicsNinja) SetTimeA

func (self *PhysicsNinja) SetTimeA(member *Time)

SetTimeA Local reference to game.time.

func (*PhysicsNinja) Time

func (self *PhysicsNinja) Time() *Time

Time Local reference to game.time.

type PhysicsNinjaAABB

type PhysicsNinjaAABB struct {
	*js.Object
}

PhysicsNinjaAABB Ninja Physics AABB constructor. Note: This class could be massively optimised and reduced in size. I leave that challenge up to you.

func NewPhysicsNinjaAABB

func NewPhysicsNinjaAABB(body *PhysicsNinjaBody, x int, y int, width int, height int) *PhysicsNinjaAABB

NewPhysicsNinjaAABB Ninja Physics AABB constructor. Note: This class could be massively optimised and reduced in size. I leave that challenge up to you.

func NewPhysicsNinjaAABBI

func NewPhysicsNinjaAABBI(args ...interface{}) *PhysicsNinjaAABB

NewPhysicsNinjaAABBI Ninja Physics AABB constructor. Note: This class could be massively optimised and reduced in size. I leave that challenge up to you.

func ToPhysicsNinjaAABB

func ToPhysicsNinjaAABB(jsStruct interface{}) *PhysicsNinjaAABB

PhysicsNinjaAABB Binding conversion method to PhysicsNinjaAABB point

func (*PhysicsNinjaAABB) AabbTileProjections

func (self *PhysicsNinjaAABB) AabbTileProjections() interface{}

AabbTileProjections All of the collision response handlers.

func (*PhysicsNinjaAABB) Body

func (self *PhysicsNinjaAABB) Body() interface{}

Body A reference to the body that owns this shape.

func (*PhysicsNinjaAABB) CollideAABBVsAABB

func (self *PhysicsNinjaAABB) CollideAABBVsAABB(aabb *PhysicsNinjaAABB)

CollideAABBVsAABB Collides this AABB against a AABB.

func (*PhysicsNinjaAABB) CollideAABBVsAABBI

func (self *PhysicsNinjaAABB) CollideAABBVsAABBI(args ...interface{})

CollideAABBVsAABBI Collides this AABB against a AABB.

func (*PhysicsNinjaAABB) CollideAABBVsTile

func (self *PhysicsNinjaAABB) CollideAABBVsTile(tile *PhysicsNinjaTile)

CollideAABBVsTile Collides this AABB against a Tile.

func (*PhysicsNinjaAABB) CollideAABBVsTileI

func (self *PhysicsNinjaAABB) CollideAABBVsTileI(args ...interface{})

CollideAABBVsTileI Collides this AABB against a Tile.

func (*PhysicsNinjaAABB) CollideWorldBounds

func (self *PhysicsNinjaAABB) CollideWorldBounds()

CollideWorldBounds Collides this AABB against the world bounds.

func (*PhysicsNinjaAABB) CollideWorldBoundsI

func (self *PhysicsNinjaAABB) CollideWorldBoundsI(args ...interface{})

CollideWorldBoundsI Collides this AABB against the world bounds.

func (*PhysicsNinjaAABB) Destroy

func (self *PhysicsNinjaAABB) Destroy()

Destroy Destroys this AABB's reference to Body and System

func (*PhysicsNinjaAABB) DestroyI

func (self *PhysicsNinjaAABB) DestroyI(args ...interface{})

DestroyI Destroys this AABB's reference to Body and System

func (*PhysicsNinjaAABB) Height

func (self *PhysicsNinjaAABB) Height() int

Height The height.

func (*PhysicsNinjaAABB) Integrate

func (self *PhysicsNinjaAABB) Integrate()

Integrate Updates this AABBs position.

func (*PhysicsNinjaAABB) IntegrateI

func (self *PhysicsNinjaAABB) IntegrateI(args ...interface{})

IntegrateI Updates this AABBs position.

func (*PhysicsNinjaAABB) Oldpos

func (self *PhysicsNinjaAABB) Oldpos() *Point

Oldpos The position of this object in the previous update.

func (*PhysicsNinjaAABB) Pos

func (self *PhysicsNinjaAABB) Pos() *Point

Pos The position of this object.

func (*PhysicsNinjaAABB) ProjAABB_22DegB

func (self *PhysicsNinjaAABB) ProjAABB_22DegB(x int, y int, obj *PhysicsNinjaAABB, t *PhysicsNinjaTile) int

ProjAABB_22DegB Resolves 22 Degree tile collision.

func (*PhysicsNinjaAABB) ProjAABB_22DegBI

func (self *PhysicsNinjaAABB) ProjAABB_22DegBI(args ...interface{}) int

ProjAABB_22DegBI Resolves 22 Degree tile collision.

func (*PhysicsNinjaAABB) ProjAABB_22DegS

func (self *PhysicsNinjaAABB) ProjAABB_22DegS(x int, y int, obj *PhysicsNinjaAABB, t *PhysicsNinjaTile) int

ProjAABB_22DegS Resolves 22 Degree tile collision.

func (*PhysicsNinjaAABB) ProjAABB_22DegSI

func (self *PhysicsNinjaAABB) ProjAABB_22DegSI(args ...interface{}) int

ProjAABB_22DegSI Resolves 22 Degree tile collision.

func (*PhysicsNinjaAABB) ProjAABB_45Deg

func (self *PhysicsNinjaAABB) ProjAABB_45Deg(x int, y int, obj *PhysicsNinjaAABB, t *PhysicsNinjaTile) int

ProjAABB_45Deg Resolves 45 Degree tile collision.

func (*PhysicsNinjaAABB) ProjAABB_45DegI

func (self *PhysicsNinjaAABB) ProjAABB_45DegI(args ...interface{}) int

ProjAABB_45DegI Resolves 45 Degree tile collision.

func (*PhysicsNinjaAABB) ProjAABB_67DegB

func (self *PhysicsNinjaAABB) ProjAABB_67DegB(x int, y int, obj *PhysicsNinjaAABB, t *PhysicsNinjaTile) int

ProjAABB_67DegB Resolves 67 Degree tile collision.

func (*PhysicsNinjaAABB) ProjAABB_67DegBI

func (self *PhysicsNinjaAABB) ProjAABB_67DegBI(args ...interface{}) int

ProjAABB_67DegBI Resolves 67 Degree tile collision.

func (*PhysicsNinjaAABB) ProjAABB_67DegS

func (self *PhysicsNinjaAABB) ProjAABB_67DegS(x int, y int, obj *PhysicsNinjaAABB, t *PhysicsNinjaTile) int

ProjAABB_67DegS Resolves 67 Degree tile collision.

func (*PhysicsNinjaAABB) ProjAABB_67DegSI

func (self *PhysicsNinjaAABB) ProjAABB_67DegSI(args ...interface{}) int

ProjAABB_67DegSI Resolves 67 Degree tile collision.

func (*PhysicsNinjaAABB) ProjAABB_Concave

func (self *PhysicsNinjaAABB) ProjAABB_Concave(x int, y int, obj *PhysicsNinjaAABB, t *PhysicsNinjaTile) int

ProjAABB_Concave Resolves Concave tile collision.

func (*PhysicsNinjaAABB) ProjAABB_ConcaveI

func (self *PhysicsNinjaAABB) ProjAABB_ConcaveI(args ...interface{}) int

ProjAABB_ConcaveI Resolves Concave tile collision.

func (*PhysicsNinjaAABB) ProjAABB_Convex

func (self *PhysicsNinjaAABB) ProjAABB_Convex(x int, y int, obj *PhysicsNinjaAABB, t *PhysicsNinjaTile) int

ProjAABB_Convex Resolves Convex tile collision.

func (*PhysicsNinjaAABB) ProjAABB_ConvexI

func (self *PhysicsNinjaAABB) ProjAABB_ConvexI(args ...interface{}) int

ProjAABB_ConvexI Resolves Convex tile collision.

func (*PhysicsNinjaAABB) ProjAABB_Full

func (self *PhysicsNinjaAABB) ProjAABB_Full(x int, y int, obj *PhysicsNinjaAABB, t *PhysicsNinjaTile) int

ProjAABB_Full Resolves Full tile collision.

func (*PhysicsNinjaAABB) ProjAABB_FullI

func (self *PhysicsNinjaAABB) ProjAABB_FullI(args ...interface{}) int

ProjAABB_FullI Resolves Full tile collision.

func (*PhysicsNinjaAABB) ProjAABB_Half

func (self *PhysicsNinjaAABB) ProjAABB_Half(x int, y int, obj *PhysicsNinjaAABB, t *PhysicsNinjaTile) int

ProjAABB_Half Resolves Half tile collision.

func (*PhysicsNinjaAABB) ProjAABB_HalfI

func (self *PhysicsNinjaAABB) ProjAABB_HalfI(args ...interface{}) int

ProjAABB_HalfI Resolves Half tile collision.

func (*PhysicsNinjaAABB) Render

func (self *PhysicsNinjaAABB) Render(context interface{}, xOffset int, yOffset int, color string, filled bool)

Render Render this AABB for debugging purposes.

func (*PhysicsNinjaAABB) RenderI

func (self *PhysicsNinjaAABB) RenderI(args ...interface{})

RenderI Render this AABB for debugging purposes.

func (*PhysicsNinjaAABB) ReportCollision

func (self *PhysicsNinjaAABB) ReportCollision(px int, py int, dx int, dy int)

ReportCollision Process a collision partner-agnostic collision response and apply the resulting forces.

func (*PhysicsNinjaAABB) ReportCollisionI

func (self *PhysicsNinjaAABB) ReportCollisionI(args ...interface{})

ReportCollisionI Process a collision partner-agnostic collision response and apply the resulting forces.

func (*PhysicsNinjaAABB) ReportCollisionVsBody

func (self *PhysicsNinjaAABB) ReportCollisionVsBody(px int, py int, dx int, dy int, obj int)

ReportCollisionVsBody Process a body collision and apply the resulting forces. Still very much WIP and doesn't work fully. Feel free to fix!

func (*PhysicsNinjaAABB) ReportCollisionVsBodyI

func (self *PhysicsNinjaAABB) ReportCollisionVsBodyI(args ...interface{})

ReportCollisionVsBodyI Process a body collision and apply the resulting forces. Still very much WIP and doesn't work fully. Feel free to fix!

func (*PhysicsNinjaAABB) ReportCollisionVsWorld

func (self *PhysicsNinjaAABB) ReportCollisionVsWorld(px int, py int, dx int, dy int)

ReportCollisionVsWorld Process a world collision and apply the resulting forces.

func (*PhysicsNinjaAABB) ReportCollisionVsWorldI

func (self *PhysicsNinjaAABB) ReportCollisionVsWorldI(args ...interface{})

ReportCollisionVsWorldI Process a world collision and apply the resulting forces.

func (*PhysicsNinjaAABB) ResolveTile

func (self *PhysicsNinjaAABB) ResolveTile(x int, y int, body *PhysicsNinjaAABB, tile *PhysicsNinjaTile) bool

ResolveTile Resolves tile collision.

func (*PhysicsNinjaAABB) ResolveTileI

func (self *PhysicsNinjaAABB) ResolveTileI(args ...interface{}) bool

ResolveTileI Resolves tile collision.

func (*PhysicsNinjaAABB) Reverse

func (self *PhysicsNinjaAABB) Reverse()

Reverse empty description

func (*PhysicsNinjaAABB) ReverseI

func (self *PhysicsNinjaAABB) ReverseI(args ...interface{})

ReverseI empty description

func (*PhysicsNinjaAABB) SetAabbTileProjectionsA

func (self *PhysicsNinjaAABB) SetAabbTileProjectionsA(member interface{})

SetAabbTileProjectionsA All of the collision response handlers.

func (*PhysicsNinjaAABB) SetBodyA

func (self *PhysicsNinjaAABB) SetBodyA(member interface{})

SetBodyA A reference to the body that owns this shape.

func (*PhysicsNinjaAABB) SetHeightA

func (self *PhysicsNinjaAABB) SetHeightA(member int)

SetHeightA The height.

func (*PhysicsNinjaAABB) SetOldposA

func (self *PhysicsNinjaAABB) SetOldposA(member *Point)

SetOldposA The position of this object in the previous update.

func (*PhysicsNinjaAABB) SetPosA

func (self *PhysicsNinjaAABB) SetPosA(member *Point)

SetPosA The position of this object.

func (*PhysicsNinjaAABB) SetSystemA

func (self *PhysicsNinjaAABB) SetSystemA(member *PhysicsNinja)

SetSystemA A reference to the physics system.

func (*PhysicsNinjaAABB) SetVelocityA

func (self *PhysicsNinjaAABB) SetVelocityA(member *Point)

SetVelocityA The velocity of this object.

func (*PhysicsNinjaAABB) SetWidthA

func (self *PhysicsNinjaAABB) SetWidthA(member int)

SetWidthA The width.

func (*PhysicsNinjaAABB) SetXwA

func (self *PhysicsNinjaAABB) SetXwA(member int)

SetXwA Half the width.

func (*PhysicsNinjaAABB) SetYwA

func (self *PhysicsNinjaAABB) SetYwA(member interface{})

SetYwA Half the height.

func (*PhysicsNinjaAABB) System

func (self *PhysicsNinjaAABB) System() *PhysicsNinja

System A reference to the physics system.

func (*PhysicsNinjaAABB) Velocity

func (self *PhysicsNinjaAABB) Velocity() *Point

Velocity The velocity of this object.

func (*PhysicsNinjaAABB) Width

func (self *PhysicsNinjaAABB) Width() int

Width The width.

func (*PhysicsNinjaAABB) Xw

func (self *PhysicsNinjaAABB) Xw() int

Xw Half the width.

func (*PhysicsNinjaAABB) Yw

func (self *PhysicsNinjaAABB) Yw() interface{}

Yw Half the height.

type PhysicsNinjaBody

type PhysicsNinjaBody struct {
	*js.Object
}

PhysicsNinjaBody The Physics Body is linked to a single Sprite. All physics operations should be performed against the body rather than the Sprite itself. For example you can set the velocity, bounce values etc all on the Body.

func NewPhysicsNinjaBody

func NewPhysicsNinjaBody(system *PhysicsNinja, sprite *Sprite) *PhysicsNinjaBody

NewPhysicsNinjaBody The Physics Body is linked to a single Sprite. All physics operations should be performed against the body rather than the Sprite itself. For example you can set the velocity, bounce values etc all on the Body.

func NewPhysicsNinjaBody1O

func NewPhysicsNinjaBody1O(system *PhysicsNinja, sprite *Sprite, type_ int) *PhysicsNinjaBody

NewPhysicsNinjaBody1O The Physics Body is linked to a single Sprite. All physics operations should be performed against the body rather than the Sprite itself. For example you can set the velocity, bounce values etc all on the Body.

func NewPhysicsNinjaBody2O

func NewPhysicsNinjaBody2O(system *PhysicsNinja, sprite *Sprite, type_ int, id int) *PhysicsNinjaBody

NewPhysicsNinjaBody2O The Physics Body is linked to a single Sprite. All physics operations should be performed against the body rather than the Sprite itself. For example you can set the velocity, bounce values etc all on the Body.

func NewPhysicsNinjaBody3O

func NewPhysicsNinjaBody3O(system *PhysicsNinja, sprite *Sprite, type_ int, id int, radius int) *PhysicsNinjaBody

NewPhysicsNinjaBody3O The Physics Body is linked to a single Sprite. All physics operations should be performed against the body rather than the Sprite itself. For example you can set the velocity, bounce values etc all on the Body.

func NewPhysicsNinjaBody4O

func NewPhysicsNinjaBody4O(system *PhysicsNinja, sprite *Sprite, type_ int, id int, radius int, x int) *PhysicsNinjaBody

NewPhysicsNinjaBody4O The Physics Body is linked to a single Sprite. All physics operations should be performed against the body rather than the Sprite itself. For example you can set the velocity, bounce values etc all on the Body.

func NewPhysicsNinjaBody5O

func NewPhysicsNinjaBody5O(system *PhysicsNinja, sprite *Sprite, type_ int, id int, radius int, x int, y int) *PhysicsNinjaBody

NewPhysicsNinjaBody5O The Physics Body is linked to a single Sprite. All physics operations should be performed against the body rather than the Sprite itself. For example you can set the velocity, bounce values etc all on the Body.

func NewPhysicsNinjaBody6O

func NewPhysicsNinjaBody6O(system *PhysicsNinja, sprite *Sprite, type_ int, id int, radius int, x int, y int, width int) *PhysicsNinjaBody

NewPhysicsNinjaBody6O The Physics Body is linked to a single Sprite. All physics operations should be performed against the body rather than the Sprite itself. For example you can set the velocity, bounce values etc all on the Body.

func NewPhysicsNinjaBody7O

func NewPhysicsNinjaBody7O(system *PhysicsNinja, sprite *Sprite, type_ int, id int, radius int, x int, y int, width int, height int) *PhysicsNinjaBody

NewPhysicsNinjaBody7O The Physics Body is linked to a single Sprite. All physics operations should be performed against the body rather than the Sprite itself. For example you can set the velocity, bounce values etc all on the Body.

func NewPhysicsNinjaBodyI

func NewPhysicsNinjaBodyI(args ...interface{}) *PhysicsNinjaBody

NewPhysicsNinjaBodyI The Physics Body is linked to a single Sprite. All physics operations should be performed against the body rather than the Sprite itself. For example you can set the velocity, bounce values etc all on the Body.

func ToPhysicsNinjaBody

func ToPhysicsNinjaBody(jsStruct interface{}) *PhysicsNinjaBody

PhysicsNinjaBody Binding conversion method to PhysicsNinjaBody point

func (*PhysicsNinjaBody) Aabb

func (self *PhysicsNinjaBody) Aabb() *PhysicsNinjaAABB

Aabb The AABB object this body is using for collision.

func (*PhysicsNinjaBody) Angle

func (self *PhysicsNinjaBody) Angle() int

Angle The angle of this Body

func (*PhysicsNinjaBody) Bottom

func (self *PhysicsNinjaBody) Bottom() int

Bottom The bottom value of this Body (same as Body.y + Body.height)

func (*PhysicsNinjaBody) Bounce

func (self *PhysicsNinjaBody) Bounce() int

Bounce The bounciness of this object when it collides. A value between 0 and 1. We recommend setting it to 0.999 to avoid jittering.

func (*PhysicsNinjaBody) CheckCollision

func (self *PhysicsNinjaBody) CheckCollision() interface{}

CheckCollision Set the checkCollision properties to control which directions collision is processed for this Body. For example checkCollision.up = false means it won't collide when the collision happened while moving up. An object containing allowed collision.

func (*PhysicsNinjaBody) Circle

func (self *PhysicsNinjaBody) Circle() *PhysicsNinjaCircle

Circle The Circle object this body is using for collision.

func (*PhysicsNinjaBody) CollideWorldBounds

func (self *PhysicsNinjaBody) CollideWorldBounds() bool

CollideWorldBounds A Body can be set to collide against the World bounds automatically and rebound back into the World if this is set to true. Otherwise it will leave the World. Should the Body collide with the World bounds?

func (*PhysicsNinjaBody) DeltaAbsX

func (self *PhysicsNinjaBody) DeltaAbsX() int

DeltaAbsX Returns the absolute delta x value.

func (*PhysicsNinjaBody) DeltaAbsXI

func (self *PhysicsNinjaBody) DeltaAbsXI(args ...interface{}) int

DeltaAbsXI Returns the absolute delta x value.

func (*PhysicsNinjaBody) DeltaAbsY

func (self *PhysicsNinjaBody) DeltaAbsY() int

DeltaAbsY Returns the absolute delta y value.

func (*PhysicsNinjaBody) DeltaAbsYI

func (self *PhysicsNinjaBody) DeltaAbsYI(args ...interface{}) int

DeltaAbsYI Returns the absolute delta y value.

func (*PhysicsNinjaBody) DeltaX

func (self *PhysicsNinjaBody) DeltaX() int

DeltaX Returns the delta x value. The difference between Body.x now and in the previous step.

func (*PhysicsNinjaBody) DeltaXI

func (self *PhysicsNinjaBody) DeltaXI(args ...interface{}) int

DeltaXI Returns the delta x value. The difference between Body.x now and in the previous step.

func (*PhysicsNinjaBody) DeltaY

func (self *PhysicsNinjaBody) DeltaY() int

DeltaY Returns the delta y value. The difference between Body.y now and in the previous step.

func (*PhysicsNinjaBody) DeltaYI

func (self *PhysicsNinjaBody) DeltaYI(args ...interface{}) int

DeltaYI Returns the delta y value. The difference between Body.y now and in the previous step.

func (*PhysicsNinjaBody) Destroy

func (self *PhysicsNinjaBody) Destroy()

Destroy Destroys this body's reference to the sprite and system, and destroys its shape.

func (*PhysicsNinjaBody) DestroyI

func (self *PhysicsNinjaBody) DestroyI(args ...interface{})

DestroyI Destroys this body's reference to the sprite and system, and destroys its shape.

func (*PhysicsNinjaBody) Drag

func (self *PhysicsNinjaBody) Drag() int

Drag The drag applied to this object as it moves.

func (*PhysicsNinjaBody) Facing

func (self *PhysicsNinjaBody) Facing() int

Facing A const reference to the direction the Body is traveling or facing.

func (*PhysicsNinjaBody) Friction

func (self *PhysicsNinjaBody) Friction() int

Friction The friction applied to this object as it moves.

func (*PhysicsNinjaBody) Game

func (self *PhysicsNinjaBody) Game() *Game

Game Local reference to game.

func (*PhysicsNinjaBody) GravityScale

func (self *PhysicsNinjaBody) GravityScale() int

GravityScale How much of the world gravity should be applied to this object? 1 = all of it, 0.5 = 50%, etc.

func (*PhysicsNinjaBody) Height

func (self *PhysicsNinjaBody) Height() int

Height The height of this Body

func (*PhysicsNinjaBody) Immovable

func (self *PhysicsNinjaBody) Immovable() bool

Immovable An immovable Body will not receive any impacts from other bodies. Not fully implemented.

func (*PhysicsNinjaBody) MaxSpeed

func (self *PhysicsNinjaBody) MaxSpeed() int

MaxSpeed The maximum speed this body can travel at (taking drag and friction into account)

func (*PhysicsNinjaBody) PostUpdate

func (self *PhysicsNinjaBody) PostUpdate()

PostUpdate Internal method.

func (*PhysicsNinjaBody) PostUpdateI

func (self *PhysicsNinjaBody) PostUpdateI(args ...interface{})

PostUpdateI Internal method.

func (*PhysicsNinjaBody) PreUpdate

func (self *PhysicsNinjaBody) PreUpdate()

PreUpdate Internal method.

func (*PhysicsNinjaBody) PreUpdateI

func (self *PhysicsNinjaBody) PreUpdateI(args ...interface{})

PreUpdateI Internal method.

func (*PhysicsNinjaBody) Render

func (self *PhysicsNinjaBody) Render(context interface{}, body *PhysicsNinjaBody)

Render Render Sprite's Body.

func (*PhysicsNinjaBody) Render1O

func (self *PhysicsNinjaBody) Render1O(context interface{}, body *PhysicsNinjaBody, color string)

Render1O Render Sprite's Body.

func (*PhysicsNinjaBody) Render2O

func (self *PhysicsNinjaBody) Render2O(context interface{}, body *PhysicsNinjaBody, color string, filled bool)

Render2O Render Sprite's Body.

func (*PhysicsNinjaBody) RenderI

func (self *PhysicsNinjaBody) RenderI(args ...interface{})

RenderI Render Sprite's Body.

func (*PhysicsNinjaBody) Reset

func (self *PhysicsNinjaBody) Reset()

Reset Resets all Body values and repositions on the Sprite.

func (*PhysicsNinjaBody) ResetI

func (self *PhysicsNinjaBody) ResetI(args ...interface{})

ResetI Resets all Body values and repositions on the Sprite.

func (*PhysicsNinjaBody) Right

func (self *PhysicsNinjaBody) Right() int

Right The right value of this Body (same as Body.x + Body.width)

func (*PhysicsNinjaBody) SetAabbA

func (self *PhysicsNinjaBody) SetAabbA(member *PhysicsNinjaAABB)

SetAabbA The AABB object this body is using for collision.

func (*PhysicsNinjaBody) SetAngleA

func (self *PhysicsNinjaBody) SetAngleA(member int)

SetAngleA The angle of this Body

func (*PhysicsNinjaBody) SetBottomA

func (self *PhysicsNinjaBody) SetBottomA(member int)

SetBottomA The bottom value of this Body (same as Body.y + Body.height)

func (*PhysicsNinjaBody) SetBounceA

func (self *PhysicsNinjaBody) SetBounceA(member int)

SetBounceA The bounciness of this object when it collides. A value between 0 and 1. We recommend setting it to 0.999 to avoid jittering.

func (*PhysicsNinjaBody) SetCheckCollisionA

func (self *PhysicsNinjaBody) SetCheckCollisionA(member interface{})

SetCheckCollisionA Set the checkCollision properties to control which directions collision is processed for this Body. For example checkCollision.up = false means it won't collide when the collision happened while moving up. An object containing allowed collision.

func (*PhysicsNinjaBody) SetCircleA

func (self *PhysicsNinjaBody) SetCircleA(member *PhysicsNinjaCircle)

SetCircleA The Circle object this body is using for collision.

func (*PhysicsNinjaBody) SetCollideWorldBoundsA

func (self *PhysicsNinjaBody) SetCollideWorldBoundsA(member bool)

SetCollideWorldBoundsA A Body can be set to collide against the World bounds automatically and rebound back into the World if this is set to true. Otherwise it will leave the World. Should the Body collide with the World bounds?

func (*PhysicsNinjaBody) SetDragA

func (self *PhysicsNinjaBody) SetDragA(member int)

SetDragA The drag applied to this object as it moves.

func (*PhysicsNinjaBody) SetFacingA

func (self *PhysicsNinjaBody) SetFacingA(member int)

SetFacingA A const reference to the direction the Body is traveling or facing.

func (*PhysicsNinjaBody) SetFrictionA

func (self *PhysicsNinjaBody) SetFrictionA(member int)

SetFrictionA The friction applied to this object as it moves.

func (*PhysicsNinjaBody) SetGameA

func (self *PhysicsNinjaBody) SetGameA(member *Game)

SetGameA Local reference to game.

func (*PhysicsNinjaBody) SetGravityScaleA

func (self *PhysicsNinjaBody) SetGravityScaleA(member int)

SetGravityScaleA How much of the world gravity should be applied to this object? 1 = all of it, 0.5 = 50%, etc.

func (*PhysicsNinjaBody) SetHeightA

func (self *PhysicsNinjaBody) SetHeightA(member int)

SetHeightA The height of this Body

func (*PhysicsNinjaBody) SetImmovableA

func (self *PhysicsNinjaBody) SetImmovableA(member bool)

SetImmovableA An immovable Body will not receive any impacts from other bodies. Not fully implemented.

func (*PhysicsNinjaBody) SetMaxSpeedA

func (self *PhysicsNinjaBody) SetMaxSpeedA(member int)

SetMaxSpeedA The maximum speed this body can travel at (taking drag and friction into account)

func (*PhysicsNinjaBody) SetRightA

func (self *PhysicsNinjaBody) SetRightA(member int)

SetRightA The right value of this Body (same as Body.x + Body.width)

func (*PhysicsNinjaBody) SetShapeA

func (self *PhysicsNinjaBody) SetShapeA(member interface{})

SetShapeA A local reference to the body shape.

func (*PhysicsNinjaBody) SetSpeedA

func (self *PhysicsNinjaBody) SetSpeedA(member int)

SetSpeedA The speed of this Body

func (*PhysicsNinjaBody) SetSpriteA

func (self *PhysicsNinjaBody) SetSpriteA(member *Sprite)

SetSpriteA Reference to the parent Sprite.

func (*PhysicsNinjaBody) SetSystemA

func (self *PhysicsNinjaBody) SetSystemA(member *PhysicsNinja)

SetSystemA The parent physics system.

func (*PhysicsNinjaBody) SetTileA

func (self *PhysicsNinjaBody) SetTileA(member *PhysicsNinjaTile)

SetTileA The Tile object this body is using for collision.

func (*PhysicsNinjaBody) SetTouchingA

func (self *PhysicsNinjaBody) SetTouchingA(member interface{})

SetTouchingA This object is populated with boolean values when the Body collides with another. touching.up = true means the collision happened to the top of this Body for example. An object containing touching results.

func (*PhysicsNinjaBody) SetTypeA

func (self *PhysicsNinjaBody) SetTypeA(member int)

SetTypeA The type of physics system this body belongs to.

func (*PhysicsNinjaBody) SetVelocityA

func (self *PhysicsNinjaBody) SetVelocityA(member *Point)

SetVelocityA The velocity in pixels per second sq. of the Body.

func (*PhysicsNinjaBody) SetWasTouchingA

func (self *PhysicsNinjaBody) SetWasTouchingA(member interface{})

SetWasTouchingA This object is populated with previous touching values from the bodies previous collision. An object containing previous touching results.

func (*PhysicsNinjaBody) SetWidthA

func (self *PhysicsNinjaBody) SetWidthA(member int)

SetWidthA The width of this Body

func (*PhysicsNinjaBody) SetXA

func (self *PhysicsNinjaBody) SetXA(member int)

SetXA The x position.

func (*PhysicsNinjaBody) SetYA

func (self *PhysicsNinjaBody) SetYA(member int)

SetYA The y position.

func (*PhysicsNinjaBody) SetZeroVelocity

func (self *PhysicsNinjaBody) SetZeroVelocity()

SetZeroVelocity Stops all movement of this body.

func (*PhysicsNinjaBody) SetZeroVelocityI

func (self *PhysicsNinjaBody) SetZeroVelocityI(args ...interface{})

SetZeroVelocityI Stops all movement of this body.

func (*PhysicsNinjaBody) Shape

func (self *PhysicsNinjaBody) Shape() interface{}

Shape A local reference to the body shape.

func (*PhysicsNinjaBody) Speed

func (self *PhysicsNinjaBody) Speed() int

Speed The speed of this Body

func (*PhysicsNinjaBody) Sprite

func (self *PhysicsNinjaBody) Sprite() *Sprite

Sprite Reference to the parent Sprite.

func (*PhysicsNinjaBody) System

func (self *PhysicsNinjaBody) System() *PhysicsNinja

System The parent physics system.

func (*PhysicsNinjaBody) Tile

func (self *PhysicsNinjaBody) Tile() *PhysicsNinjaTile

Tile The Tile object this body is using for collision.

func (*PhysicsNinjaBody) Touching

func (self *PhysicsNinjaBody) Touching() interface{}

Touching This object is populated with boolean values when the Body collides with another. touching.up = true means the collision happened to the top of this Body for example. An object containing touching results.

func (*PhysicsNinjaBody) Type

func (self *PhysicsNinjaBody) Type() int

Type The type of physics system this body belongs to.

func (*PhysicsNinjaBody) Velocity

func (self *PhysicsNinjaBody) Velocity() *Point

Velocity The velocity in pixels per second sq. of the Body.

func (*PhysicsNinjaBody) WasTouching

func (self *PhysicsNinjaBody) WasTouching() interface{}

WasTouching This object is populated with previous touching values from the bodies previous collision. An object containing previous touching results.

func (*PhysicsNinjaBody) Width

func (self *PhysicsNinjaBody) Width() int

Width The width of this Body

func (*PhysicsNinjaBody) X

func (self *PhysicsNinjaBody) X() int

X The x position.

func (*PhysicsNinjaBody) Y

func (self *PhysicsNinjaBody) Y() int

Y The y position.

type PhysicsNinjaCircle

type PhysicsNinjaCircle struct {
	*js.Object
}

PhysicsNinjaCircle Ninja Physics Circle constructor. Note: This class could be massively optimised and reduced in size. I leave that challenge up to you.

func NewPhysicsNinjaCircle

func NewPhysicsNinjaCircle(body *PhysicsNinjaBody, x int, y int, radius int) *PhysicsNinjaCircle

NewPhysicsNinjaCircle Ninja Physics Circle constructor. Note: This class could be massively optimised and reduced in size. I leave that challenge up to you.

func NewPhysicsNinjaCircleI

func NewPhysicsNinjaCircleI(args ...interface{}) *PhysicsNinjaCircle

NewPhysicsNinjaCircleI Ninja Physics Circle constructor. Note: This class could be massively optimised and reduced in size. I leave that challenge up to you.

func ToPhysicsNinjaCircle

func ToPhysicsNinjaCircle(jsStruct interface{}) *PhysicsNinjaCircle

PhysicsNinjaCircle Binding conversion method to PhysicsNinjaCircle point

func (*PhysicsNinjaCircle) Body

func (self *PhysicsNinjaCircle) Body() interface{}

Body A reference to the body that owns this shape.

func (*PhysicsNinjaCircle) CircleTileProjections

func (self *PhysicsNinjaCircle) CircleTileProjections() interface{}

CircleTileProjections All of the collision response handlers.

func (*PhysicsNinjaCircle) CollideCircleVsTile

func (self *PhysicsNinjaCircle) CollideCircleVsTile(t *PhysicsNinjaTile) bool

CollideCircleVsTile Collides this Circle with a Tile.

func (*PhysicsNinjaCircle) CollideCircleVsTileI

func (self *PhysicsNinjaCircle) CollideCircleVsTileI(args ...interface{}) bool

CollideCircleVsTileI Collides this Circle with a Tile.

func (*PhysicsNinjaCircle) CollideWorldBounds

func (self *PhysicsNinjaCircle) CollideWorldBounds()

CollideWorldBounds Collides this Circle against the world bounds.

func (*PhysicsNinjaCircle) CollideWorldBoundsI

func (self *PhysicsNinjaCircle) CollideWorldBoundsI(args ...interface{})

CollideWorldBoundsI Collides this Circle against the world bounds.

func (*PhysicsNinjaCircle) Destroy

func (self *PhysicsNinjaCircle) Destroy()

Destroy Destroys this Circle's reference to Body and System

func (*PhysicsNinjaCircle) DestroyI

func (self *PhysicsNinjaCircle) DestroyI(args ...interface{})

DestroyI Destroys this Circle's reference to Body and System

func (*PhysicsNinjaCircle) Height

func (self *PhysicsNinjaCircle) Height() int

Height The height.

func (*PhysicsNinjaCircle) Integrate

func (self *PhysicsNinjaCircle) Integrate()

Integrate Updates this Circles position.

func (*PhysicsNinjaCircle) IntegrateI

func (self *PhysicsNinjaCircle) IntegrateI(args ...interface{})

IntegrateI Updates this Circles position.

func (*PhysicsNinjaCircle) Oldpos

func (self *PhysicsNinjaCircle) Oldpos() *Point

Oldpos The position of this object in the previous update.

func (*PhysicsNinjaCircle) Pos

func (self *PhysicsNinjaCircle) Pos() *Point

Pos The position of this object.

func (*PhysicsNinjaCircle) ProjCircle_22DegB

func (self *PhysicsNinjaCircle) ProjCircle_22DegB(x int, y int, oH int, oV int, obj *PhysicsNinjaCircle, t *PhysicsNinjaTile) int

ProjCircle_22DegB Resolves 22 Degree tile collision.

func (*PhysicsNinjaCircle) ProjCircle_22DegBI

func (self *PhysicsNinjaCircle) ProjCircle_22DegBI(args ...interface{}) int

ProjCircle_22DegBI Resolves 22 Degree tile collision.

func (*PhysicsNinjaCircle) ProjCircle_22DegS

func (self *PhysicsNinjaCircle) ProjCircle_22DegS(x int, y int, oH int, oV int, obj *PhysicsNinjaCircle, t *PhysicsNinjaTile) int

ProjCircle_22DegS Resolves 22 Degree tile collision.

func (*PhysicsNinjaCircle) ProjCircle_22DegSI

func (self *PhysicsNinjaCircle) ProjCircle_22DegSI(args ...interface{}) int

ProjCircle_22DegSI Resolves 22 Degree tile collision.

func (*PhysicsNinjaCircle) ProjCircle_45Deg

func (self *PhysicsNinjaCircle) ProjCircle_45Deg(x int, y int, oH int, oV int, obj *PhysicsNinjaCircle, t *PhysicsNinjaTile) int

ProjCircle_45Deg Resolves 45 Degree tile collision.

func (*PhysicsNinjaCircle) ProjCircle_45DegI

func (self *PhysicsNinjaCircle) ProjCircle_45DegI(args ...interface{}) int

ProjCircle_45DegI Resolves 45 Degree tile collision.

func (*PhysicsNinjaCircle) ProjCircle_67DegB

func (self *PhysicsNinjaCircle) ProjCircle_67DegB(x int, y int, oH int, oV int, obj *PhysicsNinjaCircle, t *PhysicsNinjaTile) int

ProjCircle_67DegB Resolves 67 Degree tile collision.

func (*PhysicsNinjaCircle) ProjCircle_67DegBI

func (self *PhysicsNinjaCircle) ProjCircle_67DegBI(args ...interface{}) int

ProjCircle_67DegBI Resolves 67 Degree tile collision.

func (*PhysicsNinjaCircle) ProjCircle_67DegS

func (self *PhysicsNinjaCircle) ProjCircle_67DegS(x int, y int, oH int, oV int, obj *PhysicsNinjaCircle, t *PhysicsNinjaTile) int

ProjCircle_67DegS Resolves 67 Degree tile collision.

func (*PhysicsNinjaCircle) ProjCircle_67DegSI

func (self *PhysicsNinjaCircle) ProjCircle_67DegSI(args ...interface{}) int

ProjCircle_67DegSI Resolves 67 Degree tile collision.

func (*PhysicsNinjaCircle) ProjCircle_Concave

func (self *PhysicsNinjaCircle) ProjCircle_Concave(x int, y int, oH int, oV int, obj *PhysicsNinjaCircle, t *PhysicsNinjaTile) int

ProjCircle_Concave Resolves Concave tile collision.

func (*PhysicsNinjaCircle) ProjCircle_ConcaveI

func (self *PhysicsNinjaCircle) ProjCircle_ConcaveI(args ...interface{}) int

ProjCircle_ConcaveI Resolves Concave tile collision.

func (*PhysicsNinjaCircle) ProjCircle_Convex

func (self *PhysicsNinjaCircle) ProjCircle_Convex(x int, y int, oH int, oV int, obj *PhysicsNinjaCircle, t *PhysicsNinjaTile) int

ProjCircle_Convex Resolves Convex tile collision.

func (*PhysicsNinjaCircle) ProjCircle_ConvexI

func (self *PhysicsNinjaCircle) ProjCircle_ConvexI(args ...interface{}) int

ProjCircle_ConvexI Resolves Convex tile collision.

func (*PhysicsNinjaCircle) ProjCircle_Full

func (self *PhysicsNinjaCircle) ProjCircle_Full(x int, y int, oH int, oV int, obj *PhysicsNinjaCircle, t *PhysicsNinjaTile) int

ProjCircle_Full Resolves Full tile collision.

func (*PhysicsNinjaCircle) ProjCircle_FullI

func (self *PhysicsNinjaCircle) ProjCircle_FullI(args ...interface{}) int

ProjCircle_FullI Resolves Full tile collision.

func (*PhysicsNinjaCircle) ProjCircle_Half

func (self *PhysicsNinjaCircle) ProjCircle_Half(x int, y int, oH int, oV int, obj *PhysicsNinjaCircle, t *PhysicsNinjaTile) int

ProjCircle_Half Resolves Half tile collision.

func (*PhysicsNinjaCircle) ProjCircle_HalfI

func (self *PhysicsNinjaCircle) ProjCircle_HalfI(args ...interface{}) int

ProjCircle_HalfI Resolves Half tile collision.

func (*PhysicsNinjaCircle) Radius

func (self *PhysicsNinjaCircle) Radius() int

Radius The radius of this circle shape.

func (*PhysicsNinjaCircle) Render

func (self *PhysicsNinjaCircle) Render(context interface{}, xOffset int, yOffset int, color string, filled bool)

Render Render this circle for debugging purposes.

func (*PhysicsNinjaCircle) RenderI

func (self *PhysicsNinjaCircle) RenderI(args ...interface{})

RenderI Render this circle for debugging purposes.

func (*PhysicsNinjaCircle) ReportCollisionVsWorld

func (self *PhysicsNinjaCircle) ReportCollisionVsWorld(px int, py int, dx int, dy int, obj int)

ReportCollisionVsWorld Process a world collision and apply the resulting forces.

func (*PhysicsNinjaCircle) ReportCollisionVsWorldI

func (self *PhysicsNinjaCircle) ReportCollisionVsWorldI(args ...interface{})

ReportCollisionVsWorldI Process a world collision and apply the resulting forces.

func (*PhysicsNinjaCircle) ResolveCircleTile

func (self *PhysicsNinjaCircle) ResolveCircleTile(x int, y int, oH int, oV int, obj *PhysicsNinjaCircle, t *PhysicsNinjaTile) int

ResolveCircleTile Resolves tile collision.

func (*PhysicsNinjaCircle) ResolveCircleTileI

func (self *PhysicsNinjaCircle) ResolveCircleTileI(args ...interface{}) int

ResolveCircleTileI Resolves tile collision.

func (*PhysicsNinjaCircle) SetBodyA

func (self *PhysicsNinjaCircle) SetBodyA(member interface{})

SetBodyA A reference to the body that owns this shape.

func (*PhysicsNinjaCircle) SetCircleTileProjectionsA

func (self *PhysicsNinjaCircle) SetCircleTileProjectionsA(member interface{})

SetCircleTileProjectionsA All of the collision response handlers.

func (*PhysicsNinjaCircle) SetHeightA

func (self *PhysicsNinjaCircle) SetHeightA(member int)

SetHeightA The height.

func (*PhysicsNinjaCircle) SetOldposA

func (self *PhysicsNinjaCircle) SetOldposA(member *Point)

SetOldposA The position of this object in the previous update.

func (*PhysicsNinjaCircle) SetPosA

func (self *PhysicsNinjaCircle) SetPosA(member *Point)

SetPosA The position of this object.

func (*PhysicsNinjaCircle) SetRadiusA

func (self *PhysicsNinjaCircle) SetRadiusA(member int)

SetRadiusA The radius of this circle shape.

func (*PhysicsNinjaCircle) SetSystemA

func (self *PhysicsNinjaCircle) SetSystemA(member *PhysicsNinja)

SetSystemA A reference to the physics system.

func (*PhysicsNinjaCircle) SetVelocityA

func (self *PhysicsNinjaCircle) SetVelocityA(member *Point)

SetVelocityA The velocity of this object.

func (*PhysicsNinjaCircle) SetWidthA

func (self *PhysicsNinjaCircle) SetWidthA(member int)

SetWidthA The width.

func (*PhysicsNinjaCircle) SetXwA

func (self *PhysicsNinjaCircle) SetXwA(member int)

SetXwA Half the width.

func (*PhysicsNinjaCircle) SetYwA

func (self *PhysicsNinjaCircle) SetYwA(member interface{})

SetYwA Half the height.

func (*PhysicsNinjaCircle) System

func (self *PhysicsNinjaCircle) System() *PhysicsNinja

System A reference to the physics system.

func (*PhysicsNinjaCircle) Velocity

func (self *PhysicsNinjaCircle) Velocity() *Point

Velocity The velocity of this object.

func (*PhysicsNinjaCircle) Width

func (self *PhysicsNinjaCircle) Width() int

Width The width.

func (*PhysicsNinjaCircle) Xw

func (self *PhysicsNinjaCircle) Xw() int

Xw Half the width.

func (*PhysicsNinjaCircle) Yw

func (self *PhysicsNinjaCircle) Yw() interface{}

Yw Half the height.

type PhysicsNinjaTile

type PhysicsNinjaTile struct {
	*js.Object
}

PhysicsNinjaTile Ninja Physics Tile constructor. A Tile is defined by its width, height and type. It's type can include slope data, such as 45 degree slopes, or convex slopes. Understand that for any type including a slope (types 2 to 29) the Tile must be SQUARE, i.e. have an equal width and height. Also note that as Tiles are primarily used for levels they have gravity disabled and world bounds collision disabled by default.

Note: This class could be massively optimised and reduced in size. I leave that challenge up to you.

func NewPhysicsNinjaTile

func NewPhysicsNinjaTile(body *PhysicsNinjaBody, x int, y int, width int, height int) *PhysicsNinjaTile

NewPhysicsNinjaTile Ninja Physics Tile constructor. A Tile is defined by its width, height and type. It's type can include slope data, such as 45 degree slopes, or convex slopes. Understand that for any type including a slope (types 2 to 29) the Tile must be SQUARE, i.e. have an equal width and height. Also note that as Tiles are primarily used for levels they have gravity disabled and world bounds collision disabled by default.

Note: This class could be massively optimised and reduced in size. I leave that challenge up to you.

func NewPhysicsNinjaTile1O

func NewPhysicsNinjaTile1O(body *PhysicsNinjaBody, x int, y int, width int, height int, type_ int) *PhysicsNinjaTile

NewPhysicsNinjaTile1O Ninja Physics Tile constructor. A Tile is defined by its width, height and type. It's type can include slope data, such as 45 degree slopes, or convex slopes. Understand that for any type including a slope (types 2 to 29) the Tile must be SQUARE, i.e. have an equal width and height. Also note that as Tiles are primarily used for levels they have gravity disabled and world bounds collision disabled by default.

Note: This class could be massively optimised and reduced in size. I leave that challenge up to you.

func NewPhysicsNinjaTileI

func NewPhysicsNinjaTileI(args ...interface{}) *PhysicsNinjaTile

NewPhysicsNinjaTileI Ninja Physics Tile constructor. A Tile is defined by its width, height and type. It's type can include slope data, such as 45 degree slopes, or convex slopes. Understand that for any type including a slope (types 2 to 29) the Tile must be SQUARE, i.e. have an equal width and height. Also note that as Tiles are primarily used for levels they have gravity disabled and world bounds collision disabled by default.

Note: This class could be massively optimised and reduced in size. I leave that challenge up to you.

func ToPhysicsNinjaTile

func ToPhysicsNinjaTile(jsStruct interface{}) *PhysicsNinjaTile

PhysicsNinjaTile Binding conversion method to PhysicsNinjaTile point

func (*PhysicsNinjaTile) Body

func (self *PhysicsNinjaTile) Body() interface{}

Body A reference to the body that owns this shape.

func (*PhysicsNinjaTile) Bottom

func (self *PhysicsNinjaTile) Bottom() int

Bottom The bottom value of this Body (same as Body.y + Body.height)

func (*PhysicsNinjaTile) Clear

func (self *PhysicsNinjaTile) Clear()

Clear Sets this tile to be empty.

func (*PhysicsNinjaTile) ClearI

func (self *PhysicsNinjaTile) ClearI(args ...interface{})

ClearI Sets this tile to be empty.

func (*PhysicsNinjaTile) CollideWorldBounds

func (self *PhysicsNinjaTile) CollideWorldBounds()

CollideWorldBounds Tiles cannot collide with the world bounds, it's up to you to keep them where you want them. But we need this API stub to satisfy the Body.

func (*PhysicsNinjaTile) CollideWorldBoundsI

func (self *PhysicsNinjaTile) CollideWorldBoundsI(args ...interface{})

CollideWorldBoundsI Tiles cannot collide with the world bounds, it's up to you to keep them where you want them. But we need this API stub to satisfy the Body.

func (*PhysicsNinjaTile) Destroy

func (self *PhysicsNinjaTile) Destroy()

Destroy Destroys this Tiles reference to Body and System.

func (*PhysicsNinjaTile) DestroyI

func (self *PhysicsNinjaTile) DestroyI(args ...interface{})

DestroyI Destroys this Tiles reference to Body and System.

func (*PhysicsNinjaTile) Height

func (self *PhysicsNinjaTile) Height() int

Height The height.

func (*PhysicsNinjaTile) Id

func (self *PhysicsNinjaTile) Id() int

Id The ID of this Tile.

func (*PhysicsNinjaTile) Integrate

func (self *PhysicsNinjaTile) Integrate()

Integrate Updates this objects position.

func (*PhysicsNinjaTile) IntegrateI

func (self *PhysicsNinjaTile) IntegrateI(args ...interface{})

IntegrateI Updates this objects position.

func (*PhysicsNinjaTile) Oldpos

func (self *PhysicsNinjaTile) Oldpos() *Point

Oldpos The position of this object in the previous update.

func (*PhysicsNinjaTile) Pos

func (self *PhysicsNinjaTile) Pos() *Point

Pos The position of this object.

func (*PhysicsNinjaTile) ReportCollisionVsWorld

func (self *PhysicsNinjaTile) ReportCollisionVsWorld(px int, py int, dx int, dy int, obj int)

ReportCollisionVsWorld Process a world collision and apply the resulting forces.

func (*PhysicsNinjaTile) ReportCollisionVsWorldI

func (self *PhysicsNinjaTile) ReportCollisionVsWorldI(args ...interface{})

ReportCollisionVsWorldI Process a world collision and apply the resulting forces.

func (*PhysicsNinjaTile) Right

func (self *PhysicsNinjaTile) Right() int

Right The right value of this Body (same as Body.x + Body.width)

func (*PhysicsNinjaTile) SetBodyA

func (self *PhysicsNinjaTile) SetBodyA(member interface{})

SetBodyA A reference to the body that owns this shape.

func (*PhysicsNinjaTile) SetBottomA

func (self *PhysicsNinjaTile) SetBottomA(member int)

SetBottomA The bottom value of this Body (same as Body.y + Body.height)

func (*PhysicsNinjaTile) SetHeightA

func (self *PhysicsNinjaTile) SetHeightA(member int)

SetHeightA The height.

func (*PhysicsNinjaTile) SetIdA

func (self *PhysicsNinjaTile) SetIdA(member int)

SetIdA The ID of this Tile.

func (*PhysicsNinjaTile) SetOldposA

func (self *PhysicsNinjaTile) SetOldposA(member *Point)

SetOldposA The position of this object in the previous update.

func (*PhysicsNinjaTile) SetPosA

func (self *PhysicsNinjaTile) SetPosA(member *Point)

SetPosA The position of this object.

func (*PhysicsNinjaTile) SetRightA

func (self *PhysicsNinjaTile) SetRightA(member int)

SetRightA The right value of this Body (same as Body.x + Body.width)

func (*PhysicsNinjaTile) SetSystemA

func (self *PhysicsNinjaTile) SetSystemA(member *PhysicsNinja)

SetSystemA A reference to the physics system.

func (*PhysicsNinjaTile) SetType

func (self *PhysicsNinjaTile) SetType(id int)

SetType Tiles cannot collide with the world bounds, it's up to you to keep them where you want them. But we need this API stub to satisfy the Body.

func (*PhysicsNinjaTile) SetTypeA

func (self *PhysicsNinjaTile) SetTypeA(member int)

SetTypeA The type of this Tile.

func (*PhysicsNinjaTile) SetTypeI

func (self *PhysicsNinjaTile) SetTypeI(args ...interface{})

SetTypeI Tiles cannot collide with the world bounds, it's up to you to keep them where you want them. But we need this API stub to satisfy the Body.

func (*PhysicsNinjaTile) SetVelocityA

func (self *PhysicsNinjaTile) SetVelocityA(member *Point)

SetVelocityA The velocity of this object.

func (*PhysicsNinjaTile) SetWidthA

func (self *PhysicsNinjaTile) SetWidthA(member int)

SetWidthA The width.

func (*PhysicsNinjaTile) SetXA

func (self *PhysicsNinjaTile) SetXA(member int)

SetXA The x position.

func (*PhysicsNinjaTile) SetXwA

func (self *PhysicsNinjaTile) SetXwA(member int)

SetXwA Half the width.

func (*PhysicsNinjaTile) SetYA

func (self *PhysicsNinjaTile) SetYA(member int)

SetYA The y position.

func (*PhysicsNinjaTile) SetYwA

func (self *PhysicsNinjaTile) SetYwA(member interface{})

SetYwA Half the height.

func (*PhysicsNinjaTile) System

func (self *PhysicsNinjaTile) System() *PhysicsNinja

System A reference to the physics system.

func (*PhysicsNinjaTile) Type

func (self *PhysicsNinjaTile) Type() int

Type The type of this Tile.

func (*PhysicsNinjaTile) UpdateType

func (self *PhysicsNinjaTile) UpdateType()

UpdateType This converts a tile from implicitly-defined (via id), to explicit (via properties). Don't call directly, instead of setType.

func (*PhysicsNinjaTile) UpdateTypeI

func (self *PhysicsNinjaTile) UpdateTypeI(args ...interface{})

UpdateTypeI This converts a tile from implicitly-defined (via id), to explicit (via properties). Don't call directly, instead of setType.

func (*PhysicsNinjaTile) Velocity

func (self *PhysicsNinjaTile) Velocity() *Point

Velocity The velocity of this object.

func (*PhysicsNinjaTile) Width

func (self *PhysicsNinjaTile) Width() int

Width The width.

func (*PhysicsNinjaTile) X

func (self *PhysicsNinjaTile) X() int

X The x position.

func (*PhysicsNinjaTile) Xw

func (self *PhysicsNinjaTile) Xw() int

Xw Half the width.

func (*PhysicsNinjaTile) Y

func (self *PhysicsNinjaTile) Y() int

Y The y position.

func (*PhysicsNinjaTile) Yw

func (self *PhysicsNinjaTile) Yw() interface{}

Yw Half the height.

type PhysicsP2

type PhysicsP2 struct {
	*js.Object
}

PhysicsP2 This is your main access to the P2 Physics World. From here you can create materials, listen for events and add bodies into the physics simulation.

func NewPhysicsP2

func NewPhysicsP2(game *Game) *PhysicsP2

NewPhysicsP2 This is your main access to the P2 Physics World. From here you can create materials, listen for events and add bodies into the physics simulation.

func NewPhysicsP21O

func NewPhysicsP21O(game *Game, config interface{}) *PhysicsP2

NewPhysicsP21O This is your main access to the P2 Physics World. From here you can create materials, listen for events and add bodies into the physics simulation.

func NewPhysicsP2I

func NewPhysicsP2I(args ...interface{}) *PhysicsP2

NewPhysicsP2I This is your main access to the P2 Physics World. From here you can create materials, listen for events and add bodies into the physics simulation.

func ToPhysicsP2

func ToPhysicsP2(jsStruct interface{}) *PhysicsP2

PhysicsP2 Binding conversion method to PhysicsP2 point

func (*PhysicsP2) AddBody

func (self *PhysicsP2) AddBody(body *PhysicsP2Body) bool

AddBody Add a body to the world.

func (*PhysicsP2) AddBodyI

func (self *PhysicsP2) AddBodyI(args ...interface{}) bool

AddBodyI Add a body to the world.

func (*PhysicsP2) AddConstraint

func (self *PhysicsP2) AddConstraint(constraint *PhysicsP2Constraint) *PhysicsP2Constraint

AddConstraint Adds a Constraint to the world.

func (*PhysicsP2) AddConstraintI

func (self *PhysicsP2) AddConstraintI(args ...interface{}) *PhysicsP2Constraint

AddConstraintI Adds a Constraint to the world.

func (*PhysicsP2) AddContactMaterial

func (self *PhysicsP2) AddContactMaterial(material *PhysicsP2ContactMaterial) *PhysicsP2ContactMaterial

AddContactMaterial Adds a Contact Material to the world.

func (*PhysicsP2) AddContactMaterialI

func (self *PhysicsP2) AddContactMaterialI(args ...interface{}) *PhysicsP2ContactMaterial

AddContactMaterialI Adds a Contact Material to the world.

func (*PhysicsP2) AddSpring

func (self *PhysicsP2) AddSpring(spring interface{}) *PhysicsP2Spring

AddSpring Adds a Spring to the world.

func (*PhysicsP2) AddSpringI

func (self *PhysicsP2) AddSpringI(args ...interface{}) *PhysicsP2Spring

AddSpringI Adds a Spring to the world.

func (*PhysicsP2) ApplyDamping

func (self *PhysicsP2) ApplyDamping() bool

ApplyDamping Enable to automatically apply body damping each step.

func (*PhysicsP2) ApplyGravity

func (self *PhysicsP2) ApplyGravity() bool

ApplyGravity Enable to automatically apply gravity each step.

func (*PhysicsP2) ApplySpringForces

func (self *PhysicsP2) ApplySpringForces() bool

ApplySpringForces Enable to automatically apply spring forces each step.

func (*PhysicsP2) BeginContactHandler

func (self *PhysicsP2) BeginContactHandler(event interface{})

BeginContactHandler Handles a p2 begin contact event.

func (*PhysicsP2) BeginContactHandlerI

func (self *PhysicsP2) BeginContactHandlerI(args ...interface{})

BeginContactHandlerI Handles a p2 begin contact event.

func (*PhysicsP2) BoundsCollidesWith

func (self *PhysicsP2) BoundsCollidesWith() []interface{}

BoundsCollidesWith An array of the bodies the world bounds collides with.

func (*PhysicsP2) BoundsCollisionGroup

func (self *PhysicsP2) BoundsCollisionGroup() *PhysicsP2CollisionGroup

BoundsCollisionGroup A default collision group.

func (*PhysicsP2) CallbackContext

func (self *PhysicsP2) CallbackContext() interface{}

CallbackContext The context under which the callbacks are fired.

func (*PhysicsP2) Clear

func (self *PhysicsP2) Clear()

Clear Clears all bodies from the simulation, resets callbacks and resets the collision bitmask.

The P2 world is also cleared:

* Removes all solver equations * Removes all constraints * Removes all bodies * Removes all springs * Removes all contact materials

This is called automatically when you switch state.

func (*PhysicsP2) ClearI

func (self *PhysicsP2) ClearI(args ...interface{})

ClearI Clears all bodies from the simulation, resets callbacks and resets the collision bitmask.

The P2 world is also cleared:

* Removes all solver equations * Removes all constraints * Removes all bodies * Removes all springs * Removes all contact materials

This is called automatically when you switch state.

func (*PhysicsP2) ClearTilemapLayerBodies

func (self *PhysicsP2) ClearTilemapLayerBodies(map_ *Tilemap)

ClearTilemapLayerBodies Clears all physics bodies from the given TilemapLayer that were created with `World.convertTilemap`.

func (*PhysicsP2) ClearTilemapLayerBodies1O

func (self *PhysicsP2) ClearTilemapLayerBodies1O(map_ *Tilemap, layer interface{})

ClearTilemapLayerBodies1O Clears all physics bodies from the given TilemapLayer that were created with `World.convertTilemap`.

func (*PhysicsP2) ClearTilemapLayerBodiesI

func (self *PhysicsP2) ClearTilemapLayerBodiesI(args ...interface{})

ClearTilemapLayerBodiesI Clears all physics bodies from the given TilemapLayer that were created with `World.convertTilemap`.

func (*PhysicsP2) CollisionGroups

func (self *PhysicsP2) CollisionGroups() []interface{}

CollisionGroups An array containing the collision groups that have been defined in the World.

func (*PhysicsP2) Config

func (self *PhysicsP2) Config() interface{}

Config The p2 World configuration object.

func (*PhysicsP2) ContactMaterial

func (self *PhysicsP2) ContactMaterial() *P2ContactMaterial

ContactMaterial The default Contact Material being used by the World.

func (*PhysicsP2) ConvertCollisionObjects

func (self *PhysicsP2) ConvertCollisionObjects(map_ *Tilemap) []interface{}

ConvertCollisionObjects Converts all of the polylines objects inside a Tiled ObjectGroup into physics bodies that are added to the world. Note that the polylines must be created in such a way that they can withstand polygon decomposition.

func (*PhysicsP2) ConvertCollisionObjects1O

func (self *PhysicsP2) ConvertCollisionObjects1O(map_ *Tilemap, layer interface{}) []interface{}

ConvertCollisionObjects1O Converts all of the polylines objects inside a Tiled ObjectGroup into physics bodies that are added to the world. Note that the polylines must be created in such a way that they can withstand polygon decomposition.

func (*PhysicsP2) ConvertCollisionObjects2O

func (self *PhysicsP2) ConvertCollisionObjects2O(map_ *Tilemap, layer interface{}, addToWorld bool) []interface{}

ConvertCollisionObjects2O Converts all of the polylines objects inside a Tiled ObjectGroup into physics bodies that are added to the world. Note that the polylines must be created in such a way that they can withstand polygon decomposition.

func (*PhysicsP2) ConvertCollisionObjectsI

func (self *PhysicsP2) ConvertCollisionObjectsI(args ...interface{}) []interface{}

ConvertCollisionObjectsI Converts all of the polylines objects inside a Tiled ObjectGroup into physics bodies that are added to the world. Note that the polylines must be created in such a way that they can withstand polygon decomposition.

func (*PhysicsP2) ConvertTilemap

func (self *PhysicsP2) ConvertTilemap(map_ *Tilemap) []interface{}

ConvertTilemap Goes through all tiles in the given Tilemap and TilemapLayer and converts those set to collide into physics bodies. Only call this *after* you have specified all of the tiles you wish to collide with calls like Tilemap.setCollisionBetween, etc. Every time you call this method it will destroy any previously created bodies and remove them from the world. Therefore understand it's a very expensive operation and not to be done in a core game update loop.

func (*PhysicsP2) ConvertTilemap1O

func (self *PhysicsP2) ConvertTilemap1O(map_ *Tilemap, layer interface{}) []interface{}

ConvertTilemap1O Goes through all tiles in the given Tilemap and TilemapLayer and converts those set to collide into physics bodies. Only call this *after* you have specified all of the tiles you wish to collide with calls like Tilemap.setCollisionBetween, etc. Every time you call this method it will destroy any previously created bodies and remove them from the world. Therefore understand it's a very expensive operation and not to be done in a core game update loop.

func (*PhysicsP2) ConvertTilemap2O

func (self *PhysicsP2) ConvertTilemap2O(map_ *Tilemap, layer interface{}, addToWorld bool) []interface{}

ConvertTilemap2O Goes through all tiles in the given Tilemap and TilemapLayer and converts those set to collide into physics bodies. Only call this *after* you have specified all of the tiles you wish to collide with calls like Tilemap.setCollisionBetween, etc. Every time you call this method it will destroy any previously created bodies and remove them from the world. Therefore understand it's a very expensive operation and not to be done in a core game update loop.

func (*PhysicsP2) ConvertTilemap3O

func (self *PhysicsP2) ConvertTilemap3O(map_ *Tilemap, layer interface{}, addToWorld bool, optimize bool) []interface{}

ConvertTilemap3O Goes through all tiles in the given Tilemap and TilemapLayer and converts those set to collide into physics bodies. Only call this *after* you have specified all of the tiles you wish to collide with calls like Tilemap.setCollisionBetween, etc. Every time you call this method it will destroy any previously created bodies and remove them from the world. Therefore understand it's a very expensive operation and not to be done in a core game update loop.

func (*PhysicsP2) ConvertTilemapI

func (self *PhysicsP2) ConvertTilemapI(args ...interface{}) []interface{}

ConvertTilemapI Goes through all tiles in the given Tilemap and TilemapLayer and converts those set to collide into physics bodies. Only call this *after* you have specified all of the tiles you wish to collide with calls like Tilemap.setCollisionBetween, etc. Every time you call this method it will destroy any previously created bodies and remove them from the world. Therefore understand it's a very expensive operation and not to be done in a core game update loop.

func (*PhysicsP2) CreateBody

func (self *PhysicsP2) CreateBody(x int, y int, mass int, addToWorld bool, options interface{}, points interface{}) *PhysicsP2Body

CreateBody Creates a new Body and adds it to the World.

func (*PhysicsP2) CreateBodyI

func (self *PhysicsP2) CreateBodyI(args ...interface{}) *PhysicsP2Body

CreateBodyI Creates a new Body and adds it to the World.

func (*PhysicsP2) CreateCollisionGroup

func (self *PhysicsP2) CreateCollisionGroup()

CreateCollisionGroup Creates a new Collision Group and optionally applies it to the given object. Collision Groups are handled using bitmasks, therefore you have a fixed limit you can create before you need to re-use older groups.

func (*PhysicsP2) CreateCollisionGroup1O

func (self *PhysicsP2) CreateCollisionGroup1O(object interface{})

CreateCollisionGroup1O Creates a new Collision Group and optionally applies it to the given object. Collision Groups are handled using bitmasks, therefore you have a fixed limit you can create before you need to re-use older groups.

func (*PhysicsP2) CreateCollisionGroupI

func (self *PhysicsP2) CreateCollisionGroupI(args ...interface{})

CreateCollisionGroupI Creates a new Collision Group and optionally applies it to the given object. Collision Groups are handled using bitmasks, therefore you have a fixed limit you can create before you need to re-use older groups.

func (*PhysicsP2) CreateContactMaterial

func (self *PhysicsP2) CreateContactMaterial() *PhysicsP2ContactMaterial

CreateContactMaterial Creates a Contact Material from the two given Materials. You can then edit the properties of the Contact Material directly.

func (*PhysicsP2) CreateContactMaterial1O

func (self *PhysicsP2) CreateContactMaterial1O(materialA *PhysicsP2Material) *PhysicsP2ContactMaterial

CreateContactMaterial1O Creates a Contact Material from the two given Materials. You can then edit the properties of the Contact Material directly.

func (*PhysicsP2) CreateContactMaterial2O

func (self *PhysicsP2) CreateContactMaterial2O(materialA *PhysicsP2Material, materialB *PhysicsP2Material) *PhysicsP2ContactMaterial

CreateContactMaterial2O Creates a Contact Material from the two given Materials. You can then edit the properties of the Contact Material directly.

func (*PhysicsP2) CreateContactMaterial3O

func (self *PhysicsP2) CreateContactMaterial3O(materialA *PhysicsP2Material, materialB *PhysicsP2Material, options interface{}) *PhysicsP2ContactMaterial

CreateContactMaterial3O Creates a Contact Material from the two given Materials. You can then edit the properties of the Contact Material directly.

func (*PhysicsP2) CreateContactMaterialI

func (self *PhysicsP2) CreateContactMaterialI(args ...interface{}) *PhysicsP2ContactMaterial

CreateContactMaterialI Creates a Contact Material from the two given Materials. You can then edit the properties of the Contact Material directly.

func (*PhysicsP2) CreateDistanceConstraint

func (self *PhysicsP2) CreateDistanceConstraint(bodyA interface{}, bodyB interface{}, distance int) *PhysicsP2DistanceConstraint

CreateDistanceConstraint Creates a constraint that tries to keep the distance between two bodies constant.

func (*PhysicsP2) CreateDistanceConstraint1O

func (self *PhysicsP2) CreateDistanceConstraint1O(bodyA interface{}, bodyB interface{}, distance int, localAnchorA []interface{}) *PhysicsP2DistanceConstraint

CreateDistanceConstraint1O Creates a constraint that tries to keep the distance between two bodies constant.

func (*PhysicsP2) CreateDistanceConstraint2O

func (self *PhysicsP2) CreateDistanceConstraint2O(bodyA interface{}, bodyB interface{}, distance int, localAnchorA []interface{}, localAnchorB []interface{}) *PhysicsP2DistanceConstraint

CreateDistanceConstraint2O Creates a constraint that tries to keep the distance between two bodies constant.

func (*PhysicsP2) CreateDistanceConstraint3O

func (self *PhysicsP2) CreateDistanceConstraint3O(bodyA interface{}, bodyB interface{}, distance int, localAnchorA []interface{}, localAnchorB []interface{}, maxForce int) *PhysicsP2DistanceConstraint

CreateDistanceConstraint3O Creates a constraint that tries to keep the distance between two bodies constant.

func (*PhysicsP2) CreateDistanceConstraintI

func (self *PhysicsP2) CreateDistanceConstraintI(args ...interface{}) *PhysicsP2DistanceConstraint

CreateDistanceConstraintI Creates a constraint that tries to keep the distance between two bodies constant.

func (*PhysicsP2) CreateGearConstraint

func (self *PhysicsP2) CreateGearConstraint(bodyA interface{}, bodyB interface{}) *PhysicsP2GearConstraint

CreateGearConstraint Creates a constraint that tries to keep the distance between two bodies constant.

func (*PhysicsP2) CreateGearConstraint1O

func (self *PhysicsP2) CreateGearConstraint1O(bodyA interface{}, bodyB interface{}, angle int) *PhysicsP2GearConstraint

CreateGearConstraint1O Creates a constraint that tries to keep the distance between two bodies constant.

func (*PhysicsP2) CreateGearConstraint2O

func (self *PhysicsP2) CreateGearConstraint2O(bodyA interface{}, bodyB interface{}, angle int, ratio int) *PhysicsP2GearConstraint

CreateGearConstraint2O Creates a constraint that tries to keep the distance between two bodies constant.

func (*PhysicsP2) CreateGearConstraintI

func (self *PhysicsP2) CreateGearConstraintI(args ...interface{}) *PhysicsP2GearConstraint

CreateGearConstraintI Creates a constraint that tries to keep the distance between two bodies constant.

func (*PhysicsP2) CreateLockConstraint

func (self *PhysicsP2) CreateLockConstraint(bodyA interface{}, bodyB interface{}) *PhysicsP2LockConstraint

CreateLockConstraint Locks the relative position between two bodies.

func (*PhysicsP2) CreateLockConstraint1O

func (self *PhysicsP2) CreateLockConstraint1O(bodyA interface{}, bodyB interface{}, offset []interface{}) *PhysicsP2LockConstraint

CreateLockConstraint1O Locks the relative position between two bodies.

func (*PhysicsP2) CreateLockConstraint2O

func (self *PhysicsP2) CreateLockConstraint2O(bodyA interface{}, bodyB interface{}, offset []interface{}, angle int) *PhysicsP2LockConstraint

CreateLockConstraint2O Locks the relative position between two bodies.

func (*PhysicsP2) CreateLockConstraint3O

func (self *PhysicsP2) CreateLockConstraint3O(bodyA interface{}, bodyB interface{}, offset []interface{}, angle int, maxForce int) *PhysicsP2LockConstraint

CreateLockConstraint3O Locks the relative position between two bodies.

func (*PhysicsP2) CreateLockConstraintI

func (self *PhysicsP2) CreateLockConstraintI(args ...interface{}) *PhysicsP2LockConstraint

CreateLockConstraintI Locks the relative position between two bodies.

func (*PhysicsP2) CreateMaterial

func (self *PhysicsP2) CreateMaterial() *PhysicsP2Material

CreateMaterial Creates a Material. Materials are applied to Shapes owned by a Body and can be set with Body.setMaterial(). Materials are a way to control what happens when Shapes collide. Combine unique Materials together to create Contact Materials. Contact Materials have properties such as friction and restitution that allow for fine-grained collision control between different Materials.

func (*PhysicsP2) CreateMaterial1O

func (self *PhysicsP2) CreateMaterial1O(name string) *PhysicsP2Material

CreateMaterial1O Creates a Material. Materials are applied to Shapes owned by a Body and can be set with Body.setMaterial(). Materials are a way to control what happens when Shapes collide. Combine unique Materials together to create Contact Materials. Contact Materials have properties such as friction and restitution that allow for fine-grained collision control between different Materials.

func (*PhysicsP2) CreateMaterial2O

func (self *PhysicsP2) CreateMaterial2O(name string, body *PhysicsP2Body) *PhysicsP2Material

CreateMaterial2O Creates a Material. Materials are applied to Shapes owned by a Body and can be set with Body.setMaterial(). Materials are a way to control what happens when Shapes collide. Combine unique Materials together to create Contact Materials. Contact Materials have properties such as friction and restitution that allow for fine-grained collision control between different Materials.

func (*PhysicsP2) CreateMaterialI

func (self *PhysicsP2) CreateMaterialI(args ...interface{}) *PhysicsP2Material

CreateMaterialI Creates a Material. Materials are applied to Shapes owned by a Body and can be set with Body.setMaterial(). Materials are a way to control what happens when Shapes collide. Combine unique Materials together to create Contact Materials. Contact Materials have properties such as friction and restitution that allow for fine-grained collision control between different Materials.

func (*PhysicsP2) CreateParticle

func (self *PhysicsP2) CreateParticle(x int, y int, mass int, addToWorld bool, options interface{}, points interface{})

CreateParticle Creates a new Particle and adds it to the World.

func (*PhysicsP2) CreateParticleI

func (self *PhysicsP2) CreateParticleI(args ...interface{})

CreateParticleI Creates a new Particle and adds it to the World.

func (*PhysicsP2) CreatePrismaticConstraint

func (self *PhysicsP2) CreatePrismaticConstraint(bodyA interface{}, bodyB interface{}) *PhysicsP2PrismaticConstraint

CreatePrismaticConstraint Constraint that only allows bodies to move along a line, relative to each other. See http://www.iforce2d.net/b2dtut/joints-prismatic

func (*PhysicsP2) CreatePrismaticConstraint1O

func (self *PhysicsP2) CreatePrismaticConstraint1O(bodyA interface{}, bodyB interface{}, lockRotation bool) *PhysicsP2PrismaticConstraint

CreatePrismaticConstraint1O Constraint that only allows bodies to move along a line, relative to each other. See http://www.iforce2d.net/b2dtut/joints-prismatic

func (*PhysicsP2) CreatePrismaticConstraint2O

func (self *PhysicsP2) CreatePrismaticConstraint2O(bodyA interface{}, bodyB interface{}, lockRotation bool, anchorA []interface{}) *PhysicsP2PrismaticConstraint

CreatePrismaticConstraint2O Constraint that only allows bodies to move along a line, relative to each other. See http://www.iforce2d.net/b2dtut/joints-prismatic

func (*PhysicsP2) CreatePrismaticConstraint3O

func (self *PhysicsP2) CreatePrismaticConstraint3O(bodyA interface{}, bodyB interface{}, lockRotation bool, anchorA []interface{}, anchorB []interface{}) *PhysicsP2PrismaticConstraint

CreatePrismaticConstraint3O Constraint that only allows bodies to move along a line, relative to each other. See http://www.iforce2d.net/b2dtut/joints-prismatic

func (*PhysicsP2) CreatePrismaticConstraint4O

func (self *PhysicsP2) CreatePrismaticConstraint4O(bodyA interface{}, bodyB interface{}, lockRotation bool, anchorA []interface{}, anchorB []interface{}, axis []interface{}) *PhysicsP2PrismaticConstraint

CreatePrismaticConstraint4O Constraint that only allows bodies to move along a line, relative to each other. See http://www.iforce2d.net/b2dtut/joints-prismatic

func (*PhysicsP2) CreatePrismaticConstraint5O

func (self *PhysicsP2) CreatePrismaticConstraint5O(bodyA interface{}, bodyB interface{}, lockRotation bool, anchorA []interface{}, anchorB []interface{}, axis []interface{}, maxForce int) *PhysicsP2PrismaticConstraint

CreatePrismaticConstraint5O Constraint that only allows bodies to move along a line, relative to each other. See http://www.iforce2d.net/b2dtut/joints-prismatic

func (*PhysicsP2) CreatePrismaticConstraintI

func (self *PhysicsP2) CreatePrismaticConstraintI(args ...interface{}) *PhysicsP2PrismaticConstraint

CreatePrismaticConstraintI Constraint that only allows bodies to move along a line, relative to each other. See http://www.iforce2d.net/b2dtut/joints-prismatic

func (*PhysicsP2) CreateRevoluteConstraint

func (self *PhysicsP2) CreateRevoluteConstraint(bodyA interface{}, pivotA []interface{}, bodyB interface{}, pivotB []interface{}) *PhysicsP2RevoluteConstraint

CreateRevoluteConstraint Connects two bodies at given offset points, letting them rotate relative to each other around this point. The pivot points are given in world (pixel) coordinates.

func (*PhysicsP2) CreateRevoluteConstraint1O

func (self *PhysicsP2) CreateRevoluteConstraint1O(bodyA interface{}, pivotA []interface{}, bodyB interface{}, pivotB []interface{}, maxForce int) *PhysicsP2RevoluteConstraint

CreateRevoluteConstraint1O Connects two bodies at given offset points, letting them rotate relative to each other around this point. The pivot points are given in world (pixel) coordinates.

func (*PhysicsP2) CreateRevoluteConstraint2O

func (self *PhysicsP2) CreateRevoluteConstraint2O(bodyA interface{}, pivotA []interface{}, bodyB interface{}, pivotB []interface{}, maxForce int, worldPivot *Float32Array) *PhysicsP2RevoluteConstraint

CreateRevoluteConstraint2O Connects two bodies at given offset points, letting them rotate relative to each other around this point. The pivot points are given in world (pixel) coordinates.

func (*PhysicsP2) CreateRevoluteConstraintI

func (self *PhysicsP2) CreateRevoluteConstraintI(args ...interface{}) *PhysicsP2RevoluteConstraint

CreateRevoluteConstraintI Connects two bodies at given offset points, letting them rotate relative to each other around this point. The pivot points are given in world (pixel) coordinates.

func (*PhysicsP2) CreateRotationalSpring

func (self *PhysicsP2) CreateRotationalSpring(bodyA interface{}, bodyB interface{}) *PhysicsP2RotationalSpring

CreateRotationalSpring Creates a rotational spring, connecting two bodies. A spring can have a resting length, a stiffness and damping.

func (*PhysicsP2) CreateRotationalSpring1O

func (self *PhysicsP2) CreateRotationalSpring1O(bodyA interface{}, bodyB interface{}, restAngle int) *PhysicsP2RotationalSpring

CreateRotationalSpring1O Creates a rotational spring, connecting two bodies. A spring can have a resting length, a stiffness and damping.

func (*PhysicsP2) CreateRotationalSpring2O

func (self *PhysicsP2) CreateRotationalSpring2O(bodyA interface{}, bodyB interface{}, restAngle int, stiffness int) *PhysicsP2RotationalSpring

CreateRotationalSpring2O Creates a rotational spring, connecting two bodies. A spring can have a resting length, a stiffness and damping.

func (*PhysicsP2) CreateRotationalSpring3O

func (self *PhysicsP2) CreateRotationalSpring3O(bodyA interface{}, bodyB interface{}, restAngle int, stiffness int, damping int) *PhysicsP2RotationalSpring

CreateRotationalSpring3O Creates a rotational spring, connecting two bodies. A spring can have a resting length, a stiffness and damping.

func (*PhysicsP2) CreateRotationalSpringI

func (self *PhysicsP2) CreateRotationalSpringI(args ...interface{}) *PhysicsP2RotationalSpring

CreateRotationalSpringI Creates a rotational spring, connecting two bodies. A spring can have a resting length, a stiffness and damping.

func (*PhysicsP2) CreateSpring

func (self *PhysicsP2) CreateSpring(bodyA interface{}, bodyB interface{}) *PhysicsP2Spring

CreateSpring Creates a linear spring, connecting two bodies. A spring can have a resting length, a stiffness and damping.

func (*PhysicsP2) CreateSpring1O

func (self *PhysicsP2) CreateSpring1O(bodyA interface{}, bodyB interface{}, restLength int) *PhysicsP2Spring

CreateSpring1O Creates a linear spring, connecting two bodies. A spring can have a resting length, a stiffness and damping.

func (*PhysicsP2) CreateSpring2O

func (self *PhysicsP2) CreateSpring2O(bodyA interface{}, bodyB interface{}, restLength int, stiffness int) *PhysicsP2Spring

CreateSpring2O Creates a linear spring, connecting two bodies. A spring can have a resting length, a stiffness and damping.

func (*PhysicsP2) CreateSpring3O

func (self *PhysicsP2) CreateSpring3O(bodyA interface{}, bodyB interface{}, restLength int, stiffness int, damping int) *PhysicsP2Spring

CreateSpring3O Creates a linear spring, connecting two bodies. A spring can have a resting length, a stiffness and damping.

func (*PhysicsP2) CreateSpring4O

func (self *PhysicsP2) CreateSpring4O(bodyA interface{}, bodyB interface{}, restLength int, stiffness int, damping int, worldA []interface{}) *PhysicsP2Spring

CreateSpring4O Creates a linear spring, connecting two bodies. A spring can have a resting length, a stiffness and damping.

func (*PhysicsP2) CreateSpring5O

func (self *PhysicsP2) CreateSpring5O(bodyA interface{}, bodyB interface{}, restLength int, stiffness int, damping int, worldA []interface{}, worldB []interface{}) *PhysicsP2Spring

CreateSpring5O Creates a linear spring, connecting two bodies. A spring can have a resting length, a stiffness and damping.

func (*PhysicsP2) CreateSpring6O

func (self *PhysicsP2) CreateSpring6O(bodyA interface{}, bodyB interface{}, restLength int, stiffness int, damping int, worldA []interface{}, worldB []interface{}, localA []interface{}) *PhysicsP2Spring

CreateSpring6O Creates a linear spring, connecting two bodies. A spring can have a resting length, a stiffness and damping.

func (*PhysicsP2) CreateSpring7O

func (self *PhysicsP2) CreateSpring7O(bodyA interface{}, bodyB interface{}, restLength int, stiffness int, damping int, worldA []interface{}, worldB []interface{}, localA []interface{}, localB []interface{}) *PhysicsP2Spring

CreateSpring7O Creates a linear spring, connecting two bodies. A spring can have a resting length, a stiffness and damping.

func (*PhysicsP2) CreateSpringI

func (self *PhysicsP2) CreateSpringI(args ...interface{}) *PhysicsP2Spring

CreateSpringI Creates a linear spring, connecting two bodies. A spring can have a resting length, a stiffness and damping.

func (*PhysicsP2) Destroy

func (self *PhysicsP2) Destroy()

Destroy Clears all bodies from the simulation and unlinks World from Game. Should only be called on game shutdown. Call `clear` on a State change.

func (*PhysicsP2) DestroyI

func (self *PhysicsP2) DestroyI(args ...interface{})

DestroyI Clears all bodies from the simulation and unlinks World from Game. Should only be called on game shutdown. Call `clear` on a State change.

func (*PhysicsP2) EmitImpactEvent

func (self *PhysicsP2) EmitImpactEvent() bool

EmitImpactEvent Set to true if you want to the world to emit the "impact" event. Turning this off could improve performance.

func (*PhysicsP2) Enable

func (self *PhysicsP2) Enable(object interface{})

Enable This will create a P2 Physics body on the given game object or array of game objects. A game object can only have 1 physics body active at any one time, and it can't be changed until the object is destroyed. Note: When the game object is enabled for P2 physics it has its anchor x/y set to 0.5 so it becomes centered.

func (*PhysicsP2) Enable1O

func (self *PhysicsP2) Enable1O(object interface{}, debug bool)

Enable1O This will create a P2 Physics body on the given game object or array of game objects. A game object can only have 1 physics body active at any one time, and it can't be changed until the object is destroyed. Note: When the game object is enabled for P2 physics it has its anchor x/y set to 0.5 so it becomes centered.

func (*PhysicsP2) Enable2O

func (self *PhysicsP2) Enable2O(object interface{}, debug bool, children bool)

Enable2O This will create a P2 Physics body on the given game object or array of game objects. A game object can only have 1 physics body active at any one time, and it can't be changed until the object is destroyed. Note: When the game object is enabled for P2 physics it has its anchor x/y set to 0.5 so it becomes centered.

func (*PhysicsP2) EnableBody

func (self *PhysicsP2) EnableBody(object interface{}, debug bool)

EnableBody Creates a P2 Physics body on the given game object. A game object can only have 1 physics body active at any one time, and it can't be changed until the body is nulled.

func (*PhysicsP2) EnableBodyI

func (self *PhysicsP2) EnableBodyI(args ...interface{})

EnableBodyI Creates a P2 Physics body on the given game object. A game object can only have 1 physics body active at any one time, and it can't be changed until the body is nulled.

func (*PhysicsP2) EnableI

func (self *PhysicsP2) EnableI(args ...interface{})

EnableI This will create a P2 Physics body on the given game object or array of game objects. A game object can only have 1 physics body active at any one time, and it can't be changed until the object is destroyed. Note: When the game object is enabled for P2 physics it has its anchor x/y set to 0.5 so it becomes centered.

func (*PhysicsP2) EndContactHandler

func (self *PhysicsP2) EndContactHandler(event interface{})

EndContactHandler Handles a p2 end contact event.

func (*PhysicsP2) EndContactHandlerI

func (self *PhysicsP2) EndContactHandlerI(args ...interface{})

EndContactHandlerI Handles a p2 end contact event.

func (*PhysicsP2) EverythingCollisionGroup

func (self *PhysicsP2) EverythingCollisionGroup() *PhysicsP2CollisionGroup

EverythingCollisionGroup A default collision group.

func (*PhysicsP2) FrameRate

func (self *PhysicsP2) FrameRate() int

FrameRate The frame rate the world will be stepped at. Defaults to 1 / 60, but you can change here. Also see useElapsedTime property.

func (*PhysicsP2) Friction

func (self *PhysicsP2) Friction() int

Friction Friction between colliding bodies. This value is used if no matching ContactMaterial is found for a Material pair.

func (*PhysicsP2) Game

func (self *PhysicsP2) Game() *Game

Game Local reference to game.

func (*PhysicsP2) GetBodies

func (self *PhysicsP2) GetBodies() []PhysicsP2Body

GetBodies Populates and returns an array with references to of all current Bodies in the world.

func (*PhysicsP2) GetBodiesI

func (self *PhysicsP2) GetBodiesI(args ...interface{}) []PhysicsP2Body

GetBodiesI Populates and returns an array with references to of all current Bodies in the world.

func (*PhysicsP2) GetBody

func (self *PhysicsP2) GetBody(object interface{}) *P2Body

GetBody Checks the given object to see if it has a p2.Body and if so returns it.

func (*PhysicsP2) GetBodyI

func (self *PhysicsP2) GetBodyI(args ...interface{}) *P2Body

GetBodyI Checks the given object to see if it has a p2.Body and if so returns it.

func (*PhysicsP2) GetConstraints

func (self *PhysicsP2) GetConstraints() []PhysicsP2Constraint

GetConstraints Populates and returns an array of all current Constraints in the world. You will get an array of p2 constraints back. This can be of mixed types, for example the array may contain PrismaticConstraints, RevoluteConstraints or any other valid p2 constraint type.

func (*PhysicsP2) GetConstraintsI

func (self *PhysicsP2) GetConstraintsI(args ...interface{}) []PhysicsP2Constraint

GetConstraintsI Populates and returns an array of all current Constraints in the world. You will get an array of p2 constraints back. This can be of mixed types, for example the array may contain PrismaticConstraints, RevoluteConstraints or any other valid p2 constraint type.

func (*PhysicsP2) GetContactMaterial

func (self *PhysicsP2) GetContactMaterial(materialA *PhysicsP2Material, materialB *PhysicsP2Material) interface{}

GetContactMaterial Gets a Contact Material based on the two given Materials.

func (*PhysicsP2) GetContactMaterialI

func (self *PhysicsP2) GetContactMaterialI(args ...interface{}) interface{}

GetContactMaterialI Gets a Contact Material based on the two given Materials.

func (*PhysicsP2) GetSprings

func (self *PhysicsP2) GetSprings() []PhysicsP2Spring

GetSprings Populates and returns an array of all current Springs in the world.

func (*PhysicsP2) GetSpringsI

func (self *PhysicsP2) GetSpringsI(args ...interface{}) []PhysicsP2Spring

GetSpringsI Populates and returns an array of all current Springs in the world.

func (*PhysicsP2) Gravity

func (self *PhysicsP2) Gravity() *PhysicsP2InversePointProxy

Gravity The gravity applied to all bodies each step.

func (*PhysicsP2) HitTest

func (self *PhysicsP2) HitTest(worldPoint *Point) []interface{}

HitTest Test if a world point overlaps bodies. You will get an array of actual P2 bodies back. You can find out which Sprite a Body belongs to (if any) by checking the Body.parent.sprite property. Body.parent is a Phaser.Physics.P2.Body property.

func (*PhysicsP2) HitTest1O

func (self *PhysicsP2) HitTest1O(worldPoint *Point, bodies []interface{}) []interface{}

HitTest1O Test if a world point overlaps bodies. You will get an array of actual P2 bodies back. You can find out which Sprite a Body belongs to (if any) by checking the Body.parent.sprite property. Body.parent is a Phaser.Physics.P2.Body property.

func (*PhysicsP2) HitTest2O

func (self *PhysicsP2) HitTest2O(worldPoint *Point, bodies []interface{}, precision int) []interface{}

HitTest2O Test if a world point overlaps bodies. You will get an array of actual P2 bodies back. You can find out which Sprite a Body belongs to (if any) by checking the Body.parent.sprite property. Body.parent is a Phaser.Physics.P2.Body property.

func (*PhysicsP2) HitTest3O

func (self *PhysicsP2) HitTest3O(worldPoint *Point, bodies []interface{}, precision int, filterStatic bool) []interface{}

HitTest3O Test if a world point overlaps bodies. You will get an array of actual P2 bodies back. You can find out which Sprite a Body belongs to (if any) by checking the Body.parent.sprite property. Body.parent is a Phaser.Physics.P2.Body property.

func (*PhysicsP2) HitTestI

func (self *PhysicsP2) HitTestI(args ...interface{}) []interface{}

HitTestI Test if a world point overlaps bodies. You will get an array of actual P2 bodies back. You can find out which Sprite a Body belongs to (if any) by checking the Body.parent.sprite property. Body.parent is a Phaser.Physics.P2.Body property.

func (*PhysicsP2) ImpactHandler

func (self *PhysicsP2) ImpactHandler(event interface{})

ImpactHandler Handles a p2 impact event.

func (*PhysicsP2) ImpactHandlerI

func (self *PhysicsP2) ImpactHandlerI(args ...interface{})

ImpactHandlerI Handles a p2 impact event.

func (*PhysicsP2) Materials

func (self *PhysicsP2) Materials() []PhysicsP2Material

Materials A local array of all created Materials.

func (*PhysicsP2) Mpx

func (self *PhysicsP2) Mpx(v int) int

Mpx Convert p2 physics value (meters) to pixel scale. By default Phaser uses a scale of 20px per meter. If you need to modify this you can over-ride these functions via the Physics Configuration object.

func (*PhysicsP2) MpxI

func (self *PhysicsP2) MpxI(args ...interface{}) int

MpxI Convert p2 physics value (meters) to pixel scale. By default Phaser uses a scale of 20px per meter. If you need to modify this you can over-ride these functions via the Physics Configuration object.

func (*PhysicsP2) Mpxi

func (self *PhysicsP2) Mpxi(v int) int

Mpxi Convert p2 physics value (meters) to pixel scale and inverses it. By default Phaser uses a scale of 20px per meter. If you need to modify this you can over-ride these functions via the Physics Configuration object.

func (*PhysicsP2) MpxiI

func (self *PhysicsP2) MpxiI(args ...interface{}) int

MpxiI Convert p2 physics value (meters) to pixel scale and inverses it. By default Phaser uses a scale of 20px per meter. If you need to modify this you can over-ride these functions via the Physics Configuration object.

func (*PhysicsP2) NothingCollisionGroup

func (self *PhysicsP2) NothingCollisionGroup() *PhysicsP2CollisionGroup

NothingCollisionGroup A default collision group.

func (*PhysicsP2) OnBeginContact

func (self *PhysicsP2) OnBeginContact() *Signal

OnBeginContact This Signal is dispatched when a first contact is created between two bodies. This happens *before* the step has been done.

It sends 5 arguments: `bodyA`, `bodyB`, `shapeA`, `shapeB` and `contactEquations`.

It is possible that in certain situations the `bodyA` or `bodyB` values are `null`. You should check for this in your own code to avoid processing potentially null physics bodies.

func (*PhysicsP2) OnBodyAdded

func (self *PhysicsP2) OnBodyAdded() *Signal

OnBodyAdded This signal is dispatched when a new Body is added to the World.

It sends 1 argument: `body` which is the `Phaser.Physics.P2.Body` that was added to the world.

func (*PhysicsP2) OnBodyRemoved

func (self *PhysicsP2) OnBodyRemoved() *Signal

OnBodyRemoved This signal is dispatched when a Body is removed to the World.

It sends 1 argument: `body` which is the `Phaser.Physics.P2.Body` that was removed from the world.

func (*PhysicsP2) OnConstraintAdded

func (self *PhysicsP2) OnConstraintAdded() *Signal

OnConstraintAdded This signal is dispatched when a Constraint is added to the World.

It sends 1 argument: `constraint` which is the `Phaser.Physics.P2.Constraint` that was added to the world.

func (*PhysicsP2) OnConstraintRemoved

func (self *PhysicsP2) OnConstraintRemoved() *Signal

OnConstraintRemoved This signal is dispatched when a Constraint is removed from the World.

It sends 1 argument: `constraint` which is the `Phaser.Physics.P2.Constraint` that was removed from the world.

func (*PhysicsP2) OnContactMaterialAdded

func (self *PhysicsP2) OnContactMaterialAdded() *Signal

OnContactMaterialAdded This signal is dispatched when a Contact Material is added to the World.

It sends 1 argument: `material` which is the `Phaser.Physics.P2.ContactMaterial` that was added to the world.

func (*PhysicsP2) OnContactMaterialRemoved

func (self *PhysicsP2) OnContactMaterialRemoved() *Signal

OnContactMaterialRemoved This signal is dispatched when a Contact Material is removed from the World.

It sends 1 argument: `material` which is the `Phaser.Physics.P2.ContactMaterial` that was removed from the world.

func (*PhysicsP2) OnEndContact

func (self *PhysicsP2) OnEndContact() *Signal

OnEndContact This Signal is dispatched when final contact occurs between two bodies. This happens *before* the step has been done.

It sends 4 arguments: `bodyA`, `bodyB`, `shapeA` and `shapeB`.

It is possible that in certain situations the `bodyA` or `bodyB` values are `null`. You should check for this in your own code to avoid processing potentially null physics bodies.

func (*PhysicsP2) OnSpringAdded

func (self *PhysicsP2) OnSpringAdded() *Signal

OnSpringAdded This signal is dispatched when a Spring is added to the World.

It sends 1 argument: `spring` which is either a `Phaser.Physics.P2.Spring`, `p2.LinearSpring` or `p2.RotationalSpring` that was added to the world.

func (*PhysicsP2) OnSpringRemoved

func (self *PhysicsP2) OnSpringRemoved() *Signal

OnSpringRemoved This signal is dispatched when a Spring is removed from the World.

It sends 1 argument: `spring` which is either a `Phaser.Physics.P2.Spring`, `p2.LinearSpring` or `p2.RotationalSpring` that was removed from the world.

func (*PhysicsP2) Pause

func (self *PhysicsP2) Pause()

Pause Pauses the P2 World independent of the game pause state.

func (*PhysicsP2) PauseI

func (self *PhysicsP2) PauseI(args ...interface{})

PauseI Pauses the P2 World independent of the game pause state.

func (*PhysicsP2) Paused

func (self *PhysicsP2) Paused() bool

Paused The paused state of the P2 World.

func (*PhysicsP2) PostBroadphaseCallback

func (self *PhysicsP2) PostBroadphaseCallback() interface{}

PostBroadphaseCallback A postBroadphase callback.

func (*PhysicsP2) PostBroadphaseHandler

func (self *PhysicsP2) PostBroadphaseHandler(event interface{})

PostBroadphaseHandler Internal handler for the postBroadphase event.

func (*PhysicsP2) PostBroadphaseHandlerI

func (self *PhysicsP2) PostBroadphaseHandlerI(args ...interface{})

PostBroadphaseHandlerI Internal handler for the postBroadphase event.

func (*PhysicsP2) PreUpdate

func (self *PhysicsP2) PreUpdate()

PreUpdate Called at the start of the core update loop. Purges flagged bodies from the world.

func (*PhysicsP2) PreUpdateI

func (self *PhysicsP2) PreUpdateI(args ...interface{})

PreUpdateI Called at the start of the core update loop. Purges flagged bodies from the world.

func (*PhysicsP2) Pxm

func (self *PhysicsP2) Pxm(v int) int

Pxm Convert pixel value to p2 physics scale (meters). By default Phaser uses a scale of 20px per meter. If you need to modify this you can over-ride these functions via the Physics Configuration object.

func (*PhysicsP2) PxmI

func (self *PhysicsP2) PxmI(args ...interface{}) int

PxmI Convert pixel value to p2 physics scale (meters). By default Phaser uses a scale of 20px per meter. If you need to modify this you can over-ride these functions via the Physics Configuration object.

func (*PhysicsP2) Pxmi

func (self *PhysicsP2) Pxmi(v int) int

Pxmi Convert pixel value to p2 physics scale (meters) and inverses it. By default Phaser uses a scale of 20px per meter. If you need to modify this you can over-ride these functions via the Physics Configuration object.

func (*PhysicsP2) PxmiI

func (self *PhysicsP2) PxmiI(args ...interface{}) int

PxmiI Convert pixel value to p2 physics scale (meters) and inverses it. By default Phaser uses a scale of 20px per meter. If you need to modify this you can over-ride these functions via the Physics Configuration object.

func (*PhysicsP2) RemoveBody

func (self *PhysicsP2) RemoveBody(body *PhysicsP2Body) *PhysicsP2Body

RemoveBody Removes a body from the world. This will silently fail if the body wasn't part of the world to begin with.

func (*PhysicsP2) RemoveBodyI

func (self *PhysicsP2) RemoveBodyI(args ...interface{}) *PhysicsP2Body

RemoveBodyI Removes a body from the world. This will silently fail if the body wasn't part of the world to begin with.

func (*PhysicsP2) RemoveBodyNextStep

func (self *PhysicsP2) RemoveBodyNextStep(body *PhysicsP2Body)

RemoveBodyNextStep This will add a P2 Physics body into the removal list for the next step.

func (*PhysicsP2) RemoveBodyNextStepI

func (self *PhysicsP2) RemoveBodyNextStepI(args ...interface{})

RemoveBodyNextStepI This will add a P2 Physics body into the removal list for the next step.

func (*PhysicsP2) RemoveConstraint

func (self *PhysicsP2) RemoveConstraint(constraint *PhysicsP2Constraint) *PhysicsP2Constraint

RemoveConstraint Removes a Constraint from the world.

func (*PhysicsP2) RemoveConstraintI

func (self *PhysicsP2) RemoveConstraintI(args ...interface{}) *PhysicsP2Constraint

RemoveConstraintI Removes a Constraint from the world.

func (*PhysicsP2) RemoveContactMaterial

func (self *PhysicsP2) RemoveContactMaterial(material *PhysicsP2ContactMaterial) *PhysicsP2ContactMaterial

RemoveContactMaterial Removes a Contact Material from the world.

func (*PhysicsP2) RemoveContactMaterialI

func (self *PhysicsP2) RemoveContactMaterialI(args ...interface{}) *PhysicsP2ContactMaterial

RemoveContactMaterialI Removes a Contact Material from the world.

func (*PhysicsP2) RemoveSpring

func (self *PhysicsP2) RemoveSpring(spring *PhysicsP2Spring) *PhysicsP2Spring

RemoveSpring Removes a Spring from the world.

func (*PhysicsP2) RemoveSpringI

func (self *PhysicsP2) RemoveSpringI(args ...interface{}) *PhysicsP2Spring

RemoveSpringI Removes a Spring from the world.

func (*PhysicsP2) Reset

func (self *PhysicsP2) Reset()

Reset Called by Phaser.Physics when a State swap occurs. Starts the begin and end Contact listeners again.

func (*PhysicsP2) ResetI

func (self *PhysicsP2) ResetI(args ...interface{})

ResetI Called by Phaser.Physics when a State swap occurs. Starts the begin and end Contact listeners again.

func (*PhysicsP2) Restitution

func (self *PhysicsP2) Restitution() int

Restitution Default coefficient of restitution between colliding bodies. This value is used if no matching ContactMaterial is found for a Material pair.

func (*PhysicsP2) Resume

func (self *PhysicsP2) Resume()

Resume Resumes a paused P2 World.

func (*PhysicsP2) ResumeI

func (self *PhysicsP2) ResumeI(args ...interface{})

ResumeI Resumes a paused P2 World.

func (*PhysicsP2) SetApplyDampingA

func (self *PhysicsP2) SetApplyDampingA(member bool)

SetApplyDampingA Enable to automatically apply body damping each step.

func (*PhysicsP2) SetApplyGravityA

func (self *PhysicsP2) SetApplyGravityA(member bool)

SetApplyGravityA Enable to automatically apply gravity each step.

func (*PhysicsP2) SetApplySpringForcesA

func (self *PhysicsP2) SetApplySpringForcesA(member bool)

SetApplySpringForcesA Enable to automatically apply spring forces each step.

func (*PhysicsP2) SetBounds

func (self *PhysicsP2) SetBounds(x int, y int, width int, height int)

SetBounds Sets the bounds of the Physics world to match the given world pixel dimensions. You can optionally set which 'walls' to create: left, right, top or bottom. If none of the walls are given it will default to use the walls settings it had previously. I.e. if you previously told it to not have the left or right walls, and you then adjust the world size the newly created bounds will also not have the left and right walls. Explicitly state them in the parameters to override this.

func (*PhysicsP2) SetBounds1O

func (self *PhysicsP2) SetBounds1O(x int, y int, width int, height int, left bool)

SetBounds1O Sets the bounds of the Physics world to match the given world pixel dimensions. You can optionally set which 'walls' to create: left, right, top or bottom. If none of the walls are given it will default to use the walls settings it had previously. I.e. if you previously told it to not have the left or right walls, and you then adjust the world size the newly created bounds will also not have the left and right walls. Explicitly state them in the parameters to override this.

func (*PhysicsP2) SetBounds2O

func (self *PhysicsP2) SetBounds2O(x int, y int, width int, height int, left bool, right bool)

SetBounds2O Sets the bounds of the Physics world to match the given world pixel dimensions. You can optionally set which 'walls' to create: left, right, top or bottom. If none of the walls are given it will default to use the walls settings it had previously. I.e. if you previously told it to not have the left or right walls, and you then adjust the world size the newly created bounds will also not have the left and right walls. Explicitly state them in the parameters to override this.

func (*PhysicsP2) SetBounds3O

func (self *PhysicsP2) SetBounds3O(x int, y int, width int, height int, left bool, right bool, top bool)

SetBounds3O Sets the bounds of the Physics world to match the given world pixel dimensions. You can optionally set which 'walls' to create: left, right, top or bottom. If none of the walls are given it will default to use the walls settings it had previously. I.e. if you previously told it to not have the left or right walls, and you then adjust the world size the newly created bounds will also not have the left and right walls. Explicitly state them in the parameters to override this.

func (*PhysicsP2) SetBounds4O

func (self *PhysicsP2) SetBounds4O(x int, y int, width int, height int, left bool, right bool, top bool, bottom bool)

SetBounds4O Sets the bounds of the Physics world to match the given world pixel dimensions. You can optionally set which 'walls' to create: left, right, top or bottom. If none of the walls are given it will default to use the walls settings it had previously. I.e. if you previously told it to not have the left or right walls, and you then adjust the world size the newly created bounds will also not have the left and right walls. Explicitly state them in the parameters to override this.

func (*PhysicsP2) SetBounds5O

func (self *PhysicsP2) SetBounds5O(x int, y int, width int, height int, left bool, right bool, top bool, bottom bool, setCollisionGroup bool)

SetBounds5O Sets the bounds of the Physics world to match the given world pixel dimensions. You can optionally set which 'walls' to create: left, right, top or bottom. If none of the walls are given it will default to use the walls settings it had previously. I.e. if you previously told it to not have the left or right walls, and you then adjust the world size the newly created bounds will also not have the left and right walls. Explicitly state them in the parameters to override this.

func (*PhysicsP2) SetBoundsCollidesWithA

func (self *PhysicsP2) SetBoundsCollidesWithA(member []interface{})

SetBoundsCollidesWithA An array of the bodies the world bounds collides with.

func (*PhysicsP2) SetBoundsCollisionGroupA

func (self *PhysicsP2) SetBoundsCollisionGroupA(member *PhysicsP2CollisionGroup)

SetBoundsCollisionGroupA A default collision group.

func (*PhysicsP2) SetBoundsI

func (self *PhysicsP2) SetBoundsI(args ...interface{})

SetBoundsI Sets the bounds of the Physics world to match the given world pixel dimensions. You can optionally set which 'walls' to create: left, right, top or bottom. If none of the walls are given it will default to use the walls settings it had previously. I.e. if you previously told it to not have the left or right walls, and you then adjust the world size the newly created bounds will also not have the left and right walls. Explicitly state them in the parameters to override this.

func (*PhysicsP2) SetCallbackContextA

func (self *PhysicsP2) SetCallbackContextA(member interface{})

SetCallbackContextA The context under which the callbacks are fired.

func (*PhysicsP2) SetCollisionGroupsA

func (self *PhysicsP2) SetCollisionGroupsA(member []interface{})

SetCollisionGroupsA An array containing the collision groups that have been defined in the World.

func (*PhysicsP2) SetConfigA

func (self *PhysicsP2) SetConfigA(member interface{})

SetConfigA The p2 World configuration object.

func (*PhysicsP2) SetContactMaterialA

func (self *PhysicsP2) SetContactMaterialA(member *P2ContactMaterial)

SetContactMaterialA The default Contact Material being used by the World.

func (*PhysicsP2) SetEmitImpactEventA

func (self *PhysicsP2) SetEmitImpactEventA(member bool)

SetEmitImpactEventA Set to true if you want to the world to emit the "impact" event. Turning this off could improve performance.

func (*PhysicsP2) SetEverythingCollisionGroupA

func (self *PhysicsP2) SetEverythingCollisionGroupA(member *PhysicsP2CollisionGroup)

SetEverythingCollisionGroupA A default collision group.

func (*PhysicsP2) SetFrameRateA

func (self *PhysicsP2) SetFrameRateA(member int)

SetFrameRateA The frame rate the world will be stepped at. Defaults to 1 / 60, but you can change here. Also see useElapsedTime property.

func (*PhysicsP2) SetFrictionA

func (self *PhysicsP2) SetFrictionA(member int)

SetFrictionA Friction between colliding bodies. This value is used if no matching ContactMaterial is found for a Material pair.

func (*PhysicsP2) SetGameA

func (self *PhysicsP2) SetGameA(member *Game)

SetGameA Local reference to game.

func (*PhysicsP2) SetGravityA

func (self *PhysicsP2) SetGravityA(member *PhysicsP2InversePointProxy)

SetGravityA The gravity applied to all bodies each step.

func (*PhysicsP2) SetImpactEvents

func (self *PhysicsP2) SetImpactEvents(state bool)

SetImpactEvents Impact event handling is disabled by default. Enable it before any impact events will be dispatched. In a busy world hundreds of impact events can be generated every step, so only enable this if you cannot do what you need via beginContact or collision masks.

func (*PhysicsP2) SetImpactEventsI

func (self *PhysicsP2) SetImpactEventsI(args ...interface{})

SetImpactEventsI Impact event handling is disabled by default. Enable it before any impact events will be dispatched. In a busy world hundreds of impact events can be generated every step, so only enable this if you cannot do what you need via beginContact or collision masks.

func (*PhysicsP2) SetMaterial

func (self *PhysicsP2) SetMaterial(material *PhysicsP2Material, bodies []PhysicsP2Body)

SetMaterial Sets the given Material against all Shapes owned by all the Bodies in the given array.

func (*PhysicsP2) SetMaterialI

func (self *PhysicsP2) SetMaterialI(args ...interface{})

SetMaterialI Sets the given Material against all Shapes owned by all the Bodies in the given array.

func (*PhysicsP2) SetMaterialsA

func (self *PhysicsP2) SetMaterialsA(member []PhysicsP2Material)

SetMaterialsA A local array of all created Materials.

func (*PhysicsP2) SetNothingCollisionGroupA

func (self *PhysicsP2) SetNothingCollisionGroupA(member *PhysicsP2CollisionGroup)

SetNothingCollisionGroupA A default collision group.

func (*PhysicsP2) SetOnBeginContactA

func (self *PhysicsP2) SetOnBeginContactA(member *Signal)

SetOnBeginContactA This Signal is dispatched when a first contact is created between two bodies. This happens *before* the step has been done.

It sends 5 arguments: `bodyA`, `bodyB`, `shapeA`, `shapeB` and `contactEquations`.

It is possible that in certain situations the `bodyA` or `bodyB` values are `null`. You should check for this in your own code to avoid processing potentially null physics bodies.

func (*PhysicsP2) SetOnBodyAddedA

func (self *PhysicsP2) SetOnBodyAddedA(member *Signal)

SetOnBodyAddedA This signal is dispatched when a new Body is added to the World.

It sends 1 argument: `body` which is the `Phaser.Physics.P2.Body` that was added to the world.

func (*PhysicsP2) SetOnBodyRemovedA

func (self *PhysicsP2) SetOnBodyRemovedA(member *Signal)

SetOnBodyRemovedA This signal is dispatched when a Body is removed to the World.

It sends 1 argument: `body` which is the `Phaser.Physics.P2.Body` that was removed from the world.

func (*PhysicsP2) SetOnConstraintAddedA

func (self *PhysicsP2) SetOnConstraintAddedA(member *Signal)

SetOnConstraintAddedA This signal is dispatched when a Constraint is added to the World.

It sends 1 argument: `constraint` which is the `Phaser.Physics.P2.Constraint` that was added to the world.

func (*PhysicsP2) SetOnConstraintRemovedA

func (self *PhysicsP2) SetOnConstraintRemovedA(member *Signal)

SetOnConstraintRemovedA This signal is dispatched when a Constraint is removed from the World.

It sends 1 argument: `constraint` which is the `Phaser.Physics.P2.Constraint` that was removed from the world.

func (*PhysicsP2) SetOnContactMaterialAddedA

func (self *PhysicsP2) SetOnContactMaterialAddedA(member *Signal)

SetOnContactMaterialAddedA This signal is dispatched when a Contact Material is added to the World.

It sends 1 argument: `material` which is the `Phaser.Physics.P2.ContactMaterial` that was added to the world.

func (*PhysicsP2) SetOnContactMaterialRemovedA

func (self *PhysicsP2) SetOnContactMaterialRemovedA(member *Signal)

SetOnContactMaterialRemovedA This signal is dispatched when a Contact Material is removed from the World.

It sends 1 argument: `material` which is the `Phaser.Physics.P2.ContactMaterial` that was removed from the world.

func (*PhysicsP2) SetOnEndContactA

func (self *PhysicsP2) SetOnEndContactA(member *Signal)

SetOnEndContactA This Signal is dispatched when final contact occurs between two bodies. This happens *before* the step has been done.

It sends 4 arguments: `bodyA`, `bodyB`, `shapeA` and `shapeB`.

It is possible that in certain situations the `bodyA` or `bodyB` values are `null`. You should check for this in your own code to avoid processing potentially null physics bodies.

func (*PhysicsP2) SetOnSpringAddedA

func (self *PhysicsP2) SetOnSpringAddedA(member *Signal)

SetOnSpringAddedA This signal is dispatched when a Spring is added to the World.

It sends 1 argument: `spring` which is either a `Phaser.Physics.P2.Spring`, `p2.LinearSpring` or `p2.RotationalSpring` that was added to the world.

func (*PhysicsP2) SetOnSpringRemovedA

func (self *PhysicsP2) SetOnSpringRemovedA(member *Signal)

SetOnSpringRemovedA This signal is dispatched when a Spring is removed from the World.

It sends 1 argument: `spring` which is either a `Phaser.Physics.P2.Spring`, `p2.LinearSpring` or `p2.RotationalSpring` that was removed from the world.

func (*PhysicsP2) SetPausedA

func (self *PhysicsP2) SetPausedA(member bool)

SetPausedA The paused state of the P2 World.

func (*PhysicsP2) SetPostBroadphaseCallback

func (self *PhysicsP2) SetPostBroadphaseCallback(callback interface{}, context interface{})

SetPostBroadphaseCallback Sets a callback to be fired after the Broadphase has collected collision pairs in the world. Just because a pair exists it doesn't mean they *will* collide, just that they potentially could do. If your calback returns `false` the pair will be removed from the narrowphase. This will stop them testing for collision this step. Returning `true` from the callback will ensure they are checked in the narrowphase.

func (*PhysicsP2) SetPostBroadphaseCallbackA

func (self *PhysicsP2) SetPostBroadphaseCallbackA(member interface{})

SetPostBroadphaseCallbackA A postBroadphase callback.

func (*PhysicsP2) SetPostBroadphaseCallbackI

func (self *PhysicsP2) SetPostBroadphaseCallbackI(args ...interface{})

SetPostBroadphaseCallbackI Sets a callback to be fired after the Broadphase has collected collision pairs in the world. Just because a pair exists it doesn't mean they *will* collide, just that they potentially could do. If your calback returns `false` the pair will be removed from the narrowphase. This will stop them testing for collision this step. Returning `true` from the callback will ensure they are checked in the narrowphase.

func (*PhysicsP2) SetRestitutionA

func (self *PhysicsP2) SetRestitutionA(member int)

SetRestitutionA Default coefficient of restitution between colliding bodies. This value is used if no matching ContactMaterial is found for a Material pair.

func (*PhysicsP2) SetSleepModeA

func (self *PhysicsP2) SetSleepModeA(member int)

SetSleepModeA How to deactivate bodies during simulation. Possible modes are: World.NO_SLEEPING, World.BODY_SLEEPING and World.ISLAND_SLEEPING. If sleeping is enabled, you might need to wake up the bodies if they fall asleep when they shouldn't. If you want to enable sleeping in the world, but want to disable it for a particular body, see Body.allowSleep.

func (*PhysicsP2) SetSolveConstraintsA

func (self *PhysicsP2) SetSolveConstraintsA(member bool)

SetSolveConstraintsA Enable/disable constraint solving in each step.

func (*PhysicsP2) SetTimeA

func (self *PhysicsP2) SetTimeA(member bool)

SetTimeA The World time.

func (*PhysicsP2) SetTotalA

func (self *PhysicsP2) SetTotalA(member int)

SetTotalA The total number of bodies in the world.

func (*PhysicsP2) SetUseElapsedTimeA

func (self *PhysicsP2) SetUseElapsedTimeA(member bool)

SetUseElapsedTimeA If true the frameRate value will be ignored and instead p2 will step with the value of Game.Time.physicsElapsed, which is a delta time value.

func (*PhysicsP2) SetWallsA

func (self *PhysicsP2) SetWallsA(member interface{})

SetWallsA An object containing the 4 wall bodies that bound the physics world.

func (*PhysicsP2) SetWorldA

func (self *PhysicsP2) SetWorldA(member *P2World)

SetWorldA The p2 World in which the simulation is run.

func (*PhysicsP2) SetupWall

func (self *PhysicsP2) SetupWall(create bool, wall string, x int, y int, angle float64)

SetupWall Internal method called by setBounds. Responsible for creating, updating or removing the wall body shapes.

func (*PhysicsP2) SetupWall1O

func (self *PhysicsP2) SetupWall1O(create bool, wall string, x int, y int, angle float64, setCollisionGroup bool)

SetupWall1O Internal method called by setBounds. Responsible for creating, updating or removing the wall body shapes.

func (*PhysicsP2) SetupWallI

func (self *PhysicsP2) SetupWallI(args ...interface{})

SetupWallI Internal method called by setBounds. Responsible for creating, updating or removing the wall body shapes.

func (*PhysicsP2) SleepMode

func (self *PhysicsP2) SleepMode() int

SleepMode How to deactivate bodies during simulation. Possible modes are: World.NO_SLEEPING, World.BODY_SLEEPING and World.ISLAND_SLEEPING. If sleeping is enabled, you might need to wake up the bodies if they fall asleep when they shouldn't. If you want to enable sleeping in the world, but want to disable it for a particular body, see Body.allowSleep.

func (*PhysicsP2) SolveConstraints

func (self *PhysicsP2) SolveConstraints() bool

SolveConstraints Enable/disable constraint solving in each step.

func (*PhysicsP2) Time

func (self *PhysicsP2) Time() bool

Time The World time.

func (*PhysicsP2) ToJSON

func (self *PhysicsP2) ToJSON() interface{}

ToJSON Converts the current world into a JSON object.

func (*PhysicsP2) ToJSONI

func (self *PhysicsP2) ToJSONI(args ...interface{}) interface{}

ToJSONI Converts the current world into a JSON object.

func (*PhysicsP2) Total

func (self *PhysicsP2) Total() int

Total The total number of bodies in the world.

func (*PhysicsP2) Update

func (self *PhysicsP2) Update()

Update Internal P2 update loop.

func (*PhysicsP2) UpdateBoundsCollisionGroup

func (self *PhysicsP2) UpdateBoundsCollisionGroup()

UpdateBoundsCollisionGroup By default the World will be set to collide everything with everything. The bounds of the world is a Body with 4 shapes, one for each face. If you start to use your own collision groups then your objects will no longer collide with the bounds. To fix this you need to adjust the bounds to use its own collision group first BEFORE changing your Sprites collision group.

func (*PhysicsP2) UpdateBoundsCollisionGroup1O

func (self *PhysicsP2) UpdateBoundsCollisionGroup1O(setCollisionGroup bool)

UpdateBoundsCollisionGroup1O By default the World will be set to collide everything with everything. The bounds of the world is a Body with 4 shapes, one for each face. If you start to use your own collision groups then your objects will no longer collide with the bounds. To fix this you need to adjust the bounds to use its own collision group first BEFORE changing your Sprites collision group.

func (*PhysicsP2) UpdateBoundsCollisionGroupI

func (self *PhysicsP2) UpdateBoundsCollisionGroupI(args ...interface{})

UpdateBoundsCollisionGroupI By default the World will be set to collide everything with everything. The bounds of the world is a Body with 4 shapes, one for each face. If you start to use your own collision groups then your objects will no longer collide with the bounds. To fix this you need to adjust the bounds to use its own collision group first BEFORE changing your Sprites collision group.

func (*PhysicsP2) UpdateI

func (self *PhysicsP2) UpdateI(args ...interface{})

UpdateI Internal P2 update loop.

func (*PhysicsP2) UseElapsedTime

func (self *PhysicsP2) UseElapsedTime() bool

UseElapsedTime If true the frameRate value will be ignored and instead p2 will step with the value of Game.Time.physicsElapsed, which is a delta time value.

func (*PhysicsP2) Walls

func (self *PhysicsP2) Walls() interface{}

Walls An object containing the 4 wall bodies that bound the physics world.

func (*PhysicsP2) World

func (self *PhysicsP2) World() *P2World

World The p2 World in which the simulation is run.

type PhysicsP2Body

type PhysicsP2Body struct {
	*js.Object
}

PhysicsP2Body The Physics Body is typically linked to a single Sprite and defines properties that determine how the physics body is simulated. These properties affect how the body reacts to forces, what forces it generates on itself (to simulate friction), and how it reacts to collisions in the scene. In most cases, the properties are used to simulate physical effects. Each body also has its own property values that determine exactly how it reacts to forces and collisions in the scene. By default a single Rectangle shape is added to the Body that matches the dimensions of the parent Sprite. See addShape, removeShape, clearShapes to add extra shapes around the Body. Note: When bound to a Sprite to avoid single-pixel jitters on mobile devices we strongly recommend using Sprite sizes that are even on both axis, i.e. 128x128 not 127x127. Note: When a game object is given a P2 body it has its anchor x/y set to 0.5, so it becomes centered.

func NewPhysicsP2Body

func NewPhysicsP2Body(game *Game) *PhysicsP2Body

NewPhysicsP2Body The Physics Body is typically linked to a single Sprite and defines properties that determine how the physics body is simulated. These properties affect how the body reacts to forces, what forces it generates on itself (to simulate friction), and how it reacts to collisions in the scene. In most cases, the properties are used to simulate physical effects. Each body also has its own property values that determine exactly how it reacts to forces and collisions in the scene. By default a single Rectangle shape is added to the Body that matches the dimensions of the parent Sprite. See addShape, removeShape, clearShapes to add extra shapes around the Body. Note: When bound to a Sprite to avoid single-pixel jitters on mobile devices we strongly recommend using Sprite sizes that are even on both axis, i.e. 128x128 not 127x127. Note: When a game object is given a P2 body it has its anchor x/y set to 0.5, so it becomes centered.

func NewPhysicsP2Body1O

func NewPhysicsP2Body1O(game *Game, sprite *Sprite) *PhysicsP2Body

NewPhysicsP2Body1O The Physics Body is typically linked to a single Sprite and defines properties that determine how the physics body is simulated. These properties affect how the body reacts to forces, what forces it generates on itself (to simulate friction), and how it reacts to collisions in the scene. In most cases, the properties are used to simulate physical effects. Each body also has its own property values that determine exactly how it reacts to forces and collisions in the scene. By default a single Rectangle shape is added to the Body that matches the dimensions of the parent Sprite. See addShape, removeShape, clearShapes to add extra shapes around the Body. Note: When bound to a Sprite to avoid single-pixel jitters on mobile devices we strongly recommend using Sprite sizes that are even on both axis, i.e. 128x128 not 127x127. Note: When a game object is given a P2 body it has its anchor x/y set to 0.5, so it becomes centered.

func NewPhysicsP2Body2O

func NewPhysicsP2Body2O(game *Game, sprite *Sprite, x int) *PhysicsP2Body

NewPhysicsP2Body2O The Physics Body is typically linked to a single Sprite and defines properties that determine how the physics body is simulated. These properties affect how the body reacts to forces, what forces it generates on itself (to simulate friction), and how it reacts to collisions in the scene. In most cases, the properties are used to simulate physical effects. Each body also has its own property values that determine exactly how it reacts to forces and collisions in the scene. By default a single Rectangle shape is added to the Body that matches the dimensions of the parent Sprite. See addShape, removeShape, clearShapes to add extra shapes around the Body. Note: When bound to a Sprite to avoid single-pixel jitters on mobile devices we strongly recommend using Sprite sizes that are even on both axis, i.e. 128x128 not 127x127. Note: When a game object is given a P2 body it has its anchor x/y set to 0.5, so it becomes centered.

func NewPhysicsP2Body3O

func NewPhysicsP2Body3O(game *Game, sprite *Sprite, x int, y int) *PhysicsP2Body

NewPhysicsP2Body3O The Physics Body is typically linked to a single Sprite and defines properties that determine how the physics body is simulated. These properties affect how the body reacts to forces, what forces it generates on itself (to simulate friction), and how it reacts to collisions in the scene. In most cases, the properties are used to simulate physical effects. Each body also has its own property values that determine exactly how it reacts to forces and collisions in the scene. By default a single Rectangle shape is added to the Body that matches the dimensions of the parent Sprite. See addShape, removeShape, clearShapes to add extra shapes around the Body. Note: When bound to a Sprite to avoid single-pixel jitters on mobile devices we strongly recommend using Sprite sizes that are even on both axis, i.e. 128x128 not 127x127. Note: When a game object is given a P2 body it has its anchor x/y set to 0.5, so it becomes centered.

func NewPhysicsP2Body4O

func NewPhysicsP2Body4O(game *Game, sprite *Sprite, x int, y int, mass int) *PhysicsP2Body

NewPhysicsP2Body4O The Physics Body is typically linked to a single Sprite and defines properties that determine how the physics body is simulated. These properties affect how the body reacts to forces, what forces it generates on itself (to simulate friction), and how it reacts to collisions in the scene. In most cases, the properties are used to simulate physical effects. Each body also has its own property values that determine exactly how it reacts to forces and collisions in the scene. By default a single Rectangle shape is added to the Body that matches the dimensions of the parent Sprite. See addShape, removeShape, clearShapes to add extra shapes around the Body. Note: When bound to a Sprite to avoid single-pixel jitters on mobile devices we strongly recommend using Sprite sizes that are even on both axis, i.e. 128x128 not 127x127. Note: When a game object is given a P2 body it has its anchor x/y set to 0.5, so it becomes centered.

func NewPhysicsP2BodyI

func NewPhysicsP2BodyI(args ...interface{}) *PhysicsP2Body

NewPhysicsP2BodyI The Physics Body is typically linked to a single Sprite and defines properties that determine how the physics body is simulated. These properties affect how the body reacts to forces, what forces it generates on itself (to simulate friction), and how it reacts to collisions in the scene. In most cases, the properties are used to simulate physical effects. Each body also has its own property values that determine exactly how it reacts to forces and collisions in the scene. By default a single Rectangle shape is added to the Body that matches the dimensions of the parent Sprite. See addShape, removeShape, clearShapes to add extra shapes around the Body. Note: When bound to a Sprite to avoid single-pixel jitters on mobile devices we strongly recommend using Sprite sizes that are even on both axis, i.e. 128x128 not 127x127. Note: When a game object is given a P2 body it has its anchor x/y set to 0.5, so it becomes centered.

func ToPhysicsP2Body

func ToPhysicsP2Body(jsStruct interface{}) *PhysicsP2Body

PhysicsP2Body Binding conversion method to PhysicsP2Body point

func (*PhysicsP2Body) AddCapsule

func (self *PhysicsP2Body) AddCapsule(length int, radius int) *P2Capsule

AddCapsule Adds a Capsule shape to this Body. You can control the offset from the center of the body and the rotation.

func (*PhysicsP2Body) AddCapsule1O

func (self *PhysicsP2Body) AddCapsule1O(length int, radius int, offsetX int) *P2Capsule

AddCapsule1O Adds a Capsule shape to this Body. You can control the offset from the center of the body and the rotation.

func (*PhysicsP2Body) AddCapsule2O

func (self *PhysicsP2Body) AddCapsule2O(length int, radius int, offsetX int, offsetY int) *P2Capsule

AddCapsule2O Adds a Capsule shape to this Body. You can control the offset from the center of the body and the rotation.

func (*PhysicsP2Body) AddCapsule3O

func (self *PhysicsP2Body) AddCapsule3O(length int, radius int, offsetX int, offsetY int, rotation int) *P2Capsule

AddCapsule3O Adds a Capsule shape to this Body. You can control the offset from the center of the body and the rotation.

func (*PhysicsP2Body) AddCapsuleI

func (self *PhysicsP2Body) AddCapsuleI(args ...interface{}) *P2Capsule

AddCapsuleI Adds a Capsule shape to this Body. You can control the offset from the center of the body and the rotation.

func (*PhysicsP2Body) AddCircle

func (self *PhysicsP2Body) AddCircle(radius int) *P2Circle

AddCircle Adds a Circle shape to this Body. You can control the offset from the center of the body and the rotation.

func (*PhysicsP2Body) AddCircle1O

func (self *PhysicsP2Body) AddCircle1O(radius int, offsetX int) *P2Circle

AddCircle1O Adds a Circle shape to this Body. You can control the offset from the center of the body and the rotation.

func (*PhysicsP2Body) AddCircle2O

func (self *PhysicsP2Body) AddCircle2O(radius int, offsetX int, offsetY int) *P2Circle

AddCircle2O Adds a Circle shape to this Body. You can control the offset from the center of the body and the rotation.

func (*PhysicsP2Body) AddCircle3O

func (self *PhysicsP2Body) AddCircle3O(radius int, offsetX int, offsetY int, rotation int) *P2Circle

AddCircle3O Adds a Circle shape to this Body. You can control the offset from the center of the body and the rotation.

func (*PhysicsP2Body) AddCircleI

func (self *PhysicsP2Body) AddCircleI(args ...interface{}) *P2Circle

AddCircleI Adds a Circle shape to this Body. You can control the offset from the center of the body and the rotation.

func (*PhysicsP2Body) AddFixture

func (self *PhysicsP2Body) AddFixture(fixtureData string) []interface{}

AddFixture Add a polygon fixture. This is used during #loadPolygon.

func (*PhysicsP2Body) AddFixtureI

func (self *PhysicsP2Body) AddFixtureI(args ...interface{}) []interface{}

AddFixtureI Add a polygon fixture. This is used during #loadPolygon.

func (*PhysicsP2Body) AddLine

func (self *PhysicsP2Body) AddLine(length int) *P2Line

AddLine Adds a Line shape to this Body. The line shape is along the x direction, and stretches from [-length/2, 0] to [length/2,0]. You can control the offset from the center of the body and the rotation.

func (*PhysicsP2Body) AddLine1O

func (self *PhysicsP2Body) AddLine1O(length int, offsetX int) *P2Line

AddLine1O Adds a Line shape to this Body. The line shape is along the x direction, and stretches from [-length/2, 0] to [length/2,0]. You can control the offset from the center of the body and the rotation.

func (*PhysicsP2Body) AddLine2O

func (self *PhysicsP2Body) AddLine2O(length int, offsetX int, offsetY int) *P2Line

AddLine2O Adds a Line shape to this Body. The line shape is along the x direction, and stretches from [-length/2, 0] to [length/2,0]. You can control the offset from the center of the body and the rotation.

func (*PhysicsP2Body) AddLine3O

func (self *PhysicsP2Body) AddLine3O(length int, offsetX int, offsetY int, rotation int) *P2Line

AddLine3O Adds a Line shape to this Body. The line shape is along the x direction, and stretches from [-length/2, 0] to [length/2,0]. You can control the offset from the center of the body and the rotation.

func (*PhysicsP2Body) AddLineI

func (self *PhysicsP2Body) AddLineI(args ...interface{}) *P2Line

AddLineI Adds a Line shape to this Body. The line shape is along the x direction, and stretches from [-length/2, 0] to [length/2,0]. You can control the offset from the center of the body and the rotation.

func (*PhysicsP2Body) AddParticle

func (self *PhysicsP2Body) AddParticle() *P2Particle

AddParticle Adds a Particle shape to this Body. You can control the offset from the center of the body and the rotation.

func (*PhysicsP2Body) AddParticle1O

func (self *PhysicsP2Body) AddParticle1O(offsetX int) *P2Particle

AddParticle1O Adds a Particle shape to this Body. You can control the offset from the center of the body and the rotation.

func (*PhysicsP2Body) AddParticle2O

func (self *PhysicsP2Body) AddParticle2O(offsetX int, offsetY int) *P2Particle

AddParticle2O Adds a Particle shape to this Body. You can control the offset from the center of the body and the rotation.

func (*PhysicsP2Body) AddParticle3O

func (self *PhysicsP2Body) AddParticle3O(offsetX int, offsetY int, rotation int) *P2Particle

AddParticle3O Adds a Particle shape to this Body. You can control the offset from the center of the body and the rotation.

func (*PhysicsP2Body) AddParticleI

func (self *PhysicsP2Body) AddParticleI(args ...interface{}) *P2Particle

AddParticleI Adds a Particle shape to this Body. You can control the offset from the center of the body and the rotation.

func (*PhysicsP2Body) AddPhaserPolygon

func (self *PhysicsP2Body) AddPhaserPolygon(key string, object string) []interface{}

AddPhaserPolygon Reads the shape data from a physics data file stored in the Game.Cache and adds it as a polygon to this Body. The shape data format is based on the output of the {@link https://github.com/photonstorm/phaser/tree/master/resources/PhysicsEditor%20Exporter|custom phaser exporter} for {@link https://www.codeandweb.com/physicseditor|PhysicsEditor}

func (*PhysicsP2Body) AddPhaserPolygonI

func (self *PhysicsP2Body) AddPhaserPolygonI(args ...interface{}) []interface{}

AddPhaserPolygonI Reads the shape data from a physics data file stored in the Game.Cache and adds it as a polygon to this Body. The shape data format is based on the output of the {@link https://github.com/photonstorm/phaser/tree/master/resources/PhysicsEditor%20Exporter|custom phaser exporter} for {@link https://www.codeandweb.com/physicseditor|PhysicsEditor}

func (*PhysicsP2Body) AddPlane

func (self *PhysicsP2Body) AddPlane() *P2Plane

AddPlane Adds a Plane shape to this Body. The plane is facing in the Y direction. You can control the offset from the center of the body and the rotation.

func (*PhysicsP2Body) AddPlane1O

func (self *PhysicsP2Body) AddPlane1O(offsetX int) *P2Plane

AddPlane1O Adds a Plane shape to this Body. The plane is facing in the Y direction. You can control the offset from the center of the body and the rotation.

func (*PhysicsP2Body) AddPlane2O

func (self *PhysicsP2Body) AddPlane2O(offsetX int, offsetY int) *P2Plane

AddPlane2O Adds a Plane shape to this Body. The plane is facing in the Y direction. You can control the offset from the center of the body and the rotation.

func (*PhysicsP2Body) AddPlane3O

func (self *PhysicsP2Body) AddPlane3O(offsetX int, offsetY int, rotation int) *P2Plane

AddPlane3O Adds a Plane shape to this Body. The plane is facing in the Y direction. You can control the offset from the center of the body and the rotation.

func (*PhysicsP2Body) AddPlaneI

func (self *PhysicsP2Body) AddPlaneI(args ...interface{}) *P2Plane

AddPlaneI Adds a Plane shape to this Body. The plane is facing in the Y direction. You can control the offset from the center of the body and the rotation.

func (*PhysicsP2Body) AddPolygon

func (self *PhysicsP2Body) AddPolygon(options interface{}, points interface{}) bool

AddPolygon Reads a polygon shape path, and assembles convex shapes from that and puts them at proper offset points. The shape must be simple and without holes. This function expects the x.y values to be given in pixels. If you want to provide them at p2 world scales then call Body.data.fromPolygon directly.

func (*PhysicsP2Body) AddPolygonI

func (self *PhysicsP2Body) AddPolygonI(args ...interface{}) bool

AddPolygonI Reads a polygon shape path, and assembles convex shapes from that and puts them at proper offset points. The shape must be simple and without holes. This function expects the x.y values to be given in pixels. If you want to provide them at p2 world scales then call Body.data.fromPolygon directly.

func (*PhysicsP2Body) AddRectangle

func (self *PhysicsP2Body) AddRectangle(width int, height int) *P2Box

AddRectangle Adds a Rectangle shape to this Body. You can control the offset from the center of the body and the rotation.

func (*PhysicsP2Body) AddRectangle1O

func (self *PhysicsP2Body) AddRectangle1O(width int, height int, offsetX int) *P2Box

AddRectangle1O Adds a Rectangle shape to this Body. You can control the offset from the center of the body and the rotation.

func (*PhysicsP2Body) AddRectangle2O

func (self *PhysicsP2Body) AddRectangle2O(width int, height int, offsetX int, offsetY int) *P2Box

AddRectangle2O Adds a Rectangle shape to this Body. You can control the offset from the center of the body and the rotation.

func (*PhysicsP2Body) AddRectangle3O

func (self *PhysicsP2Body) AddRectangle3O(width int, height int, offsetX int, offsetY int, rotation int) *P2Box

AddRectangle3O Adds a Rectangle shape to this Body. You can control the offset from the center of the body and the rotation.

func (*PhysicsP2Body) AddRectangleI

func (self *PhysicsP2Body) AddRectangleI(args ...interface{}) *P2Box

AddRectangleI Adds a Rectangle shape to this Body. You can control the offset from the center of the body and the rotation.

func (*PhysicsP2Body) AddShape

func (self *PhysicsP2Body) AddShape(shape *P2Shape) *P2Shape

AddShape Add a shape to the body. You can pass a local transform when adding a shape, so that the shape gets an offset and an angle relative to the body center of mass. Will automatically update the mass properties and bounding radius. If this Body had a previously set Collision Group you will need to re-apply it to the new Shape this creates.

func (*PhysicsP2Body) AddShape1O

func (self *PhysicsP2Body) AddShape1O(shape *P2Shape, offsetX int) *P2Shape

AddShape1O Add a shape to the body. You can pass a local transform when adding a shape, so that the shape gets an offset and an angle relative to the body center of mass. Will automatically update the mass properties and bounding radius. If this Body had a previously set Collision Group you will need to re-apply it to the new Shape this creates.

func (*PhysicsP2Body) AddShape2O

func (self *PhysicsP2Body) AddShape2O(shape *P2Shape, offsetX int, offsetY int) *P2Shape

AddShape2O Add a shape to the body. You can pass a local transform when adding a shape, so that the shape gets an offset and an angle relative to the body center of mass. Will automatically update the mass properties and bounding radius. If this Body had a previously set Collision Group you will need to re-apply it to the new Shape this creates.

func (*PhysicsP2Body) AddShape3O

func (self *PhysicsP2Body) AddShape3O(shape *P2Shape, offsetX int, offsetY int, rotation int) *P2Shape

AddShape3O Add a shape to the body. You can pass a local transform when adding a shape, so that the shape gets an offset and an angle relative to the body center of mass. Will automatically update the mass properties and bounding radius. If this Body had a previously set Collision Group you will need to re-apply it to the new Shape this creates.

func (*PhysicsP2Body) AddShapeI

func (self *PhysicsP2Body) AddShapeI(args ...interface{}) *P2Shape

AddShapeI Add a shape to the body. You can pass a local transform when adding a shape, so that the shape gets an offset and an angle relative to the body center of mass. Will automatically update the mass properties and bounding radius. If this Body had a previously set Collision Group you will need to re-apply it to the new Shape this creates.

func (*PhysicsP2Body) AddToWorld

func (self *PhysicsP2Body) AddToWorld()

AddToWorld Adds this physics body to the world.

func (*PhysicsP2Body) AddToWorldI

func (self *PhysicsP2Body) AddToWorldI(args ...interface{})

AddToWorldI Adds this physics body to the world.

func (*PhysicsP2Body) AdjustCenterOfMass

func (self *PhysicsP2Body) AdjustCenterOfMass()

AdjustCenterOfMass Moves the shape offsets so their center of mass becomes the body center of mass.

func (*PhysicsP2Body) AdjustCenterOfMassI

func (self *PhysicsP2Body) AdjustCenterOfMassI(args ...interface{})

AdjustCenterOfMassI Moves the shape offsets so their center of mass becomes the body center of mass.

func (*PhysicsP2Body) AllowSleep

func (self *PhysicsP2Body) AllowSleep() bool

AllowSleep -

func (*PhysicsP2Body) Angle

func (self *PhysicsP2Body) Angle() int

Angle The angle of the Body in degrees from its original orientation. Values from 0 to 180 represent clockwise rotation; values from 0 to -180 represent counterclockwise rotation. Values outside this range are added to or subtracted from 360 to obtain a value within the range. For example, the statement Body.angle = 450 is the same as Body.angle = 90. If you wish to work in radians instead of degrees use the property Body.rotation instead. Working in radians is faster as it doesn't have to convert values. The angle of this Body in degrees.

func (*PhysicsP2Body) AngularDamping

func (self *PhysicsP2Body) AngularDamping() int

AngularDamping Damping is specified as a value between 0 and 1, which is the proportion of velocity lost per second. The angular damping acting acting on the body.

func (*PhysicsP2Body) AngularForce

func (self *PhysicsP2Body) AngularForce() int

AngularForce The angular force acting on the body.

func (*PhysicsP2Body) AngularVelocity

func (self *PhysicsP2Body) AngularVelocity() int

AngularVelocity The angular velocity of the body.

func (*PhysicsP2Body) ApplyDamping

func (self *PhysicsP2Body) ApplyDamping(dt int)

ApplyDamping Apply damping, see http://code.google.com/p/bullet/issues/detail?id=74 for details.

func (*PhysicsP2Body) ApplyDampingI

func (self *PhysicsP2Body) ApplyDampingI(args ...interface{})

ApplyDampingI Apply damping, see http://code.google.com/p/bullet/issues/detail?id=74 for details.

func (*PhysicsP2Body) ApplyForce

func (self *PhysicsP2Body) ApplyForce(force interface{}, worldX int, worldY int)

ApplyForce Apply force to a world point.

This could for example be a point on the RigidBody surface. Applying force this way will add to Body.force and Body.angularForce.

func (*PhysicsP2Body) ApplyForceI

func (self *PhysicsP2Body) ApplyForceI(args ...interface{})

ApplyForceI Apply force to a world point.

This could for example be a point on the RigidBody surface. Applying force this way will add to Body.force and Body.angularForce.

func (*PhysicsP2Body) ApplyImpulse

func (self *PhysicsP2Body) ApplyImpulse(impulse interface{}, worldX int, worldY int)

ApplyImpulse Apply impulse to a point relative to the body. This could for example be a point on the Body surface. An impulse is a force added to a body during a short period of time (impulse = force * time). Impulses will be added to Body.velocity and Body.angularVelocity.

func (*PhysicsP2Body) ApplyImpulseI

func (self *PhysicsP2Body) ApplyImpulseI(args ...interface{})

ApplyImpulseI Apply impulse to a point relative to the body. This could for example be a point on the Body surface. An impulse is a force added to a body during a short period of time (impulse = force * time). Impulses will be added to Body.velocity and Body.angularVelocity.

func (*PhysicsP2Body) ApplyImpulseLocal

func (self *PhysicsP2Body) ApplyImpulseLocal(impulse interface{}, localX int, localY int)

ApplyImpulseLocal Apply impulse to a point local to the body.

This could for example be a point on the Body surface. An impulse is a force added to a body during a short period of time (impulse = force * time). Impulses will be added to Body.velocity and Body.angularVelocity.

func (*PhysicsP2Body) ApplyImpulseLocalI

func (self *PhysicsP2Body) ApplyImpulseLocalI(args ...interface{})

ApplyImpulseLocalI Apply impulse to a point local to the body.

This could for example be a point on the Body surface. An impulse is a force added to a body during a short period of time (impulse = force * time). Impulses will be added to Body.velocity and Body.angularVelocity.

func (*PhysicsP2Body) ClearCollision

func (self *PhysicsP2Body) ClearCollision()

ClearCollision Clears the collision data from the shapes in this Body. Optionally clears Group and/or Mask.

func (*PhysicsP2Body) ClearCollision1O

func (self *PhysicsP2Body) ClearCollision1O(clearGroup bool)

ClearCollision1O Clears the collision data from the shapes in this Body. Optionally clears Group and/or Mask.

func (*PhysicsP2Body) ClearCollision2O

func (self *PhysicsP2Body) ClearCollision2O(clearGroup bool, clearMask bool)

ClearCollision2O Clears the collision data from the shapes in this Body. Optionally clears Group and/or Mask.

func (*PhysicsP2Body) ClearCollision3O

func (self *PhysicsP2Body) ClearCollision3O(clearGroup bool, clearMask bool, shape *P2Shape)

ClearCollision3O Clears the collision data from the shapes in this Body. Optionally clears Group and/or Mask.

func (*PhysicsP2Body) ClearCollisionI

func (self *PhysicsP2Body) ClearCollisionI(args ...interface{})

ClearCollisionI Clears the collision data from the shapes in this Body. Optionally clears Group and/or Mask.

func (*PhysicsP2Body) ClearShapes

func (self *PhysicsP2Body) ClearShapes()

ClearShapes Removes all Shapes from this Body.

func (*PhysicsP2Body) ClearShapesI

func (self *PhysicsP2Body) ClearShapesI(args ...interface{})

ClearShapesI Removes all Shapes from this Body.

func (*PhysicsP2Body) CollideWorldBounds

func (self *PhysicsP2Body) CollideWorldBounds() bool

CollideWorldBounds A Body can be set to collide against the World bounds automatically if this is set to true. Otherwise it will leave the World. Note that this only applies if your World has bounds! The response to the collision should be managed via CollisionMaterials. Also note that when you set this it will only effect Body shapes that already exist. If you then add further shapes to your Body after setting this it will *not* proactively set them to collide with the bounds. Should the Body collide with the World bounds?

func (*PhysicsP2Body) Collides

func (self *PhysicsP2Body) Collides(group interface{})

Collides Adds the given CollisionGroup, or array of CollisionGroups, to the list of groups that this body will collide with and updates the collision masks.

func (*PhysicsP2Body) Collides1O

func (self *PhysicsP2Body) Collides1O(group interface{}, callback interface{})

Collides1O Adds the given CollisionGroup, or array of CollisionGroups, to the list of groups that this body will collide with and updates the collision masks.

func (*PhysicsP2Body) Collides2O

func (self *PhysicsP2Body) Collides2O(group interface{}, callback interface{}, callbackContext interface{})

Collides2O Adds the given CollisionGroup, or array of CollisionGroups, to the list of groups that this body will collide with and updates the collision masks.

func (*PhysicsP2Body) Collides3O

func (self *PhysicsP2Body) Collides3O(group interface{}, callback interface{}, callbackContext interface{}, shape *P2Shape)

Collides3O Adds the given CollisionGroup, or array of CollisionGroups, to the list of groups that this body will collide with and updates the collision masks.

func (*PhysicsP2Body) CollidesI

func (self *PhysicsP2Body) CollidesI(args ...interface{})

CollidesI Adds the given CollisionGroup, or array of CollisionGroups, to the list of groups that this body will collide with and updates the collision masks.

func (*PhysicsP2Body) CollidesWith

func (self *PhysicsP2Body) CollidesWith() []interface{}

CollidesWith Array of CollisionGroups that this Bodies shapes collide with.

func (*PhysicsP2Body) CreateBodyCallback

func (self *PhysicsP2Body) CreateBodyCallback(object interface{}, callback interface{}, callbackContext interface{})

CreateBodyCallback Sets a callback to be fired any time a shape in this Body impacts with a shape in the given Body. The impact test is performed against body.id values. The callback will be sent 4 parameters: This body, the body that impacted, the Shape in this body and the shape in the impacting body. Note that the impact event happens after collision resolution, so it cannot be used to prevent a collision from happening. It also happens mid-step. So do not destroy a Body during this callback, instead set safeDestroy to true so it will be killed on the next preUpdate.

func (*PhysicsP2Body) CreateBodyCallbackI

func (self *PhysicsP2Body) CreateBodyCallbackI(args ...interface{})

CreateBodyCallbackI Sets a callback to be fired any time a shape in this Body impacts with a shape in the given Body. The impact test is performed against body.id values. The callback will be sent 4 parameters: This body, the body that impacted, the Shape in this body and the shape in the impacting body. Note that the impact event happens after collision resolution, so it cannot be used to prevent a collision from happening. It also happens mid-step. So do not destroy a Body during this callback, instead set safeDestroy to true so it will be killed on the next preUpdate.

func (*PhysicsP2Body) CreateGroupCallback

func (self *PhysicsP2Body) CreateGroupCallback(group *PhysicsCollisionGroup, callback interface{}, callbackContext interface{})

CreateGroupCallback Sets a callback to be fired any time this Body impacts with the given Group. The impact test is performed against shape.collisionGroup values. The callback will be sent 4 parameters: This body, the body that impacted, the Shape in this body and the shape in the impacting body. This callback will only fire if this Body has been assigned a collision group. Note that the impact event happens after collision resolution, so it cannot be used to prevent a collision from happening. It also happens mid-step. So do not destroy a Body during this callback, instead set safeDestroy to true so it will be killed on the next preUpdate.

func (*PhysicsP2Body) CreateGroupCallbackI

func (self *PhysicsP2Body) CreateGroupCallbackI(args ...interface{})

CreateGroupCallbackI Sets a callback to be fired any time this Body impacts with the given Group. The impact test is performed against shape.collisionGroup values. The callback will be sent 4 parameters: This body, the body that impacted, the Shape in this body and the shape in the impacting body. This callback will only fire if this Body has been assigned a collision group. Note that the impact event happens after collision resolution, so it cannot be used to prevent a collision from happening. It also happens mid-step. So do not destroy a Body during this callback, instead set safeDestroy to true so it will be killed on the next preUpdate.

func (*PhysicsP2Body) DYNAMIC

func (self *PhysicsP2Body) DYNAMIC() int

DYNAMIC Dynamic body. Dynamic bodies body can move and respond to collisions and forces.

func (*PhysicsP2Body) Damping

func (self *PhysicsP2Body) Damping() int

Damping Damping is specified as a value between 0 and 1, which is the proportion of velocity lost per second. The linear damping acting on the body in the velocity direction.

func (*PhysicsP2Body) Data

func (self *PhysicsP2Body) Data() *P2Body

Data The p2 Body data.

func (*PhysicsP2Body) Debug

func (self *PhysicsP2Body) Debug() bool

Debug Enable or disable debug drawing of this body

func (*PhysicsP2Body) DebugBody

func (self *PhysicsP2Body) DebugBody() *PhysicsP2BodyDebug

DebugBody Reference to the debug body.

func (*PhysicsP2Body) Destroy

func (self *PhysicsP2Body) Destroy()

Destroy Destroys this Body and all references it holds to other objects.

func (*PhysicsP2Body) DestroyI

func (self *PhysicsP2Body) DestroyI(args ...interface{})

DestroyI Destroys this Body and all references it holds to other objects.

func (*PhysicsP2Body) Dirty

func (self *PhysicsP2Body) Dirty() bool

Dirty Internally used by Sprite.x/y

func (*PhysicsP2Body) Dynamic

func (self *PhysicsP2Body) Dynamic() bool

Dynamic Returns true if the Body is dynamic. Setting Body.dynamic to 'false' will make it static.

func (*PhysicsP2Body) FixedRotation

func (self *PhysicsP2Body) FixedRotation() bool

FixedRotation -

func (*PhysicsP2Body) Force

Force The force applied to the body.

func (*PhysicsP2Body) Game

func (self *PhysicsP2Body) Game() *Game

Game Local reference to game.

func (*PhysicsP2Body) GetCollisionMask

func (self *PhysicsP2Body) GetCollisionMask() int

GetCollisionMask Gets the collision bitmask from the groups this body collides with.

func (*PhysicsP2Body) GetCollisionMaskI

func (self *PhysicsP2Body) GetCollisionMaskI(args ...interface{}) int

GetCollisionMaskI Gets the collision bitmask from the groups this body collides with.

func (*PhysicsP2Body) GetVelocityAtPoint

func (self *PhysicsP2Body) GetVelocityAtPoint(result []interface{}, relativePoint []interface{}) []interface{}

GetVelocityAtPoint Gets the velocity of a point in the body.

func (*PhysicsP2Body) GetVelocityAtPointI

func (self *PhysicsP2Body) GetVelocityAtPointI(args ...interface{}) []interface{}

GetVelocityAtPointI Gets the velocity of a point in the body.

func (*PhysicsP2Body) Gravity

func (self *PhysicsP2Body) Gravity() *Point

Gravity A locally applied gravity force to the Body. Applied directly before the world step. NOTE: Not currently implemented.

func (*PhysicsP2Body) Id

func (self *PhysicsP2Body) Id() int

Id The Body ID. Each Body that has been added to the World has a unique ID.

func (*PhysicsP2Body) Inertia

func (self *PhysicsP2Body) Inertia() int

Inertia The inertia of the body around the Z axis..

func (*PhysicsP2Body) KINEMATIC

func (self *PhysicsP2Body) KINEMATIC() int

KINEMATIC Kinematic body. Kinematic bodies only moves according to its .velocity, and does not respond to collisions or force.

func (*PhysicsP2Body) Kinematic

func (self *PhysicsP2Body) Kinematic() bool

Kinematic Returns true if the Body is kinematic. Setting Body.kinematic to 'false' will make it static.

func (*PhysicsP2Body) LoadPolygon

func (self *PhysicsP2Body) LoadPolygon(key string, object interface{}) bool

LoadPolygon Reads the shape data from a physics data file stored in the Game.Cache and adds it as a polygon to this Body.

As well as reading the data from the Cache you can also pass `null` as the first argument and a physics data object as the second. When doing this you must ensure the structure of the object is correct in advance.

For more details see the format of the Lime / Corona Physics Editor export.

func (*PhysicsP2Body) LoadPolygonI

func (self *PhysicsP2Body) LoadPolygonI(args ...interface{}) bool

LoadPolygonI Reads the shape data from a physics data file stored in the Game.Cache and adds it as a polygon to this Body.

As well as reading the data from the Cache you can also pass `null` as the first argument and a physics data object as the second. When doing this you must ensure the structure of the object is correct in advance.

For more details see the format of the Lime / Corona Physics Editor export.

func (*PhysicsP2Body) Mass

func (self *PhysicsP2Body) Mass() int

Mass The mass of the body.

func (*PhysicsP2Body) MotionState

func (self *PhysicsP2Body) MotionState() int

MotionState The type of motion this body has. Should be one of: Body.STATIC (the body does not move), Body.DYNAMIC (body can move and respond to collisions) and Body.KINEMATIC (only moves according to its .velocity).

func (*PhysicsP2Body) MoveBackward

func (self *PhysicsP2Body) MoveBackward(speed int)

MoveBackward Moves the Body backwards based on its current angle and the given speed. The speed is represented in pixels per second. So a value of 100 would move 100 pixels in 1 second (1000ms).

func (*PhysicsP2Body) MoveBackwardI

func (self *PhysicsP2Body) MoveBackwardI(args ...interface{})

MoveBackwardI Moves the Body backwards based on its current angle and the given speed. The speed is represented in pixels per second. So a value of 100 would move 100 pixels in 1 second (1000ms).

func (*PhysicsP2Body) MoveDown

func (self *PhysicsP2Body) MoveDown(speed int)

MoveDown If this Body is dynamic then this will move it down by setting its y velocity to the given speed. The speed is represented in pixels per second. So a value of 100 would move 100 pixels in 1 second (1000ms).

func (*PhysicsP2Body) MoveDownI

func (self *PhysicsP2Body) MoveDownI(args ...interface{})

MoveDownI If this Body is dynamic then this will move it down by setting its y velocity to the given speed. The speed is represented in pixels per second. So a value of 100 would move 100 pixels in 1 second (1000ms).

func (*PhysicsP2Body) MoveForward

func (self *PhysicsP2Body) MoveForward(speed int)

MoveForward Moves the Body forwards based on its current angle and the given speed. The speed is represented in pixels per second. So a value of 100 would move 100 pixels in 1 second (1000ms).

func (*PhysicsP2Body) MoveForwardI

func (self *PhysicsP2Body) MoveForwardI(args ...interface{})

MoveForwardI Moves the Body forwards based on its current angle and the given speed. The speed is represented in pixels per second. So a value of 100 would move 100 pixels in 1 second (1000ms).

func (*PhysicsP2Body) MoveLeft

func (self *PhysicsP2Body) MoveLeft(speed int)

MoveLeft If this Body is dynamic then this will move it to the left by setting its x velocity to the given speed. The speed is represented in pixels per second. So a value of 100 would move 100 pixels in 1 second (1000ms).

func (*PhysicsP2Body) MoveLeftI

func (self *PhysicsP2Body) MoveLeftI(args ...interface{})

MoveLeftI If this Body is dynamic then this will move it to the left by setting its x velocity to the given speed. The speed is represented in pixels per second. So a value of 100 would move 100 pixels in 1 second (1000ms).

func (*PhysicsP2Body) MoveRight

func (self *PhysicsP2Body) MoveRight(speed int)

MoveRight If this Body is dynamic then this will move it to the right by setting its x velocity to the given speed. The speed is represented in pixels per second. So a value of 100 would move 100 pixels in 1 second (1000ms).

func (*PhysicsP2Body) MoveRightI

func (self *PhysicsP2Body) MoveRightI(args ...interface{})

MoveRightI If this Body is dynamic then this will move it to the right by setting its x velocity to the given speed. The speed is represented in pixels per second. So a value of 100 would move 100 pixels in 1 second (1000ms).

func (*PhysicsP2Body) MoveUp

func (self *PhysicsP2Body) MoveUp(speed int)

MoveUp If this Body is dynamic then this will move it up by setting its y velocity to the given speed. The speed is represented in pixels per second. So a value of 100 would move 100 pixels in 1 second (1000ms).

func (*PhysicsP2Body) MoveUpI

func (self *PhysicsP2Body) MoveUpI(args ...interface{})

MoveUpI If this Body is dynamic then this will move it up by setting its y velocity to the given speed. The speed is represented in pixels per second. So a value of 100 would move 100 pixels in 1 second (1000ms).

func (*PhysicsP2Body) Offset

func (self *PhysicsP2Body) Offset() *Point

Offset The offset of the Physics Body from the Sprite x/y position.

func (*PhysicsP2Body) OnBeginContact

func (self *PhysicsP2Body) OnBeginContact() *Signal

OnBeginContact Dispatched when a first contact is created between shapes in two bodies. This event is fired during the step, so collision has already taken place.

The event will be sent 5 arguments in this order:

The Phaser.Physics.P2.Body it is in contact with. *This might be null* if the Body was created directly in the p2 world. The p2.Body this Body is in contact with. The Shape from this body that caused the contact. The Shape from the contact body. The Contact Equation data array.

func (*PhysicsP2Body) OnEndContact

func (self *PhysicsP2Body) OnEndContact() *Signal

OnEndContact Dispatched when contact ends between shapes in two bodies. This event is fired during the step, so collision has already taken place.

The event will be sent 4 arguments in this order:

The Phaser.Physics.P2.Body it is in contact with. *This might be null* if the Body was created directly in the p2 world. The p2.Body this Body has ended contact with. The Shape from this body that caused the original contact. The Shape from the contact body.

func (*PhysicsP2Body) PostUpdate

func (self *PhysicsP2Body) PostUpdate()

PostUpdate Internal method. This is called directly before the sprites are sent to the renderer and after the update function has finished.

func (*PhysicsP2Body) PostUpdateI

func (self *PhysicsP2Body) PostUpdateI(args ...interface{})

PostUpdateI Internal method. This is called directly before the sprites are sent to the renderer and after the update function has finished.

func (*PhysicsP2Body) PreUpdate

func (self *PhysicsP2Body) PreUpdate()

PreUpdate Internal method. This is called directly before the sprites are sent to the renderer and after the update function has finished.

func (*PhysicsP2Body) PreUpdateI

func (self *PhysicsP2Body) PreUpdateI(args ...interface{})

PreUpdateI Internal method. This is called directly before the sprites are sent to the renderer and after the update function has finished.

func (*PhysicsP2Body) RemoveCollisionGroup

func (self *PhysicsP2Body) RemoveCollisionGroup(group interface{})

RemoveCollisionGroup Removes the given CollisionGroup, or array of CollisionGroups, from the list of groups that this body will collide with and updates the collision masks.

func (*PhysicsP2Body) RemoveCollisionGroup1O

func (self *PhysicsP2Body) RemoveCollisionGroup1O(group interface{}, clearCallback bool)

RemoveCollisionGroup1O Removes the given CollisionGroup, or array of CollisionGroups, from the list of groups that this body will collide with and updates the collision masks.

func (*PhysicsP2Body) RemoveCollisionGroup2O

func (self *PhysicsP2Body) RemoveCollisionGroup2O(group interface{}, clearCallback bool, shape *P2Shape)

RemoveCollisionGroup2O Removes the given CollisionGroup, or array of CollisionGroups, from the list of groups that this body will collide with and updates the collision masks.

func (*PhysicsP2Body) RemoveCollisionGroupI

func (self *PhysicsP2Body) RemoveCollisionGroupI(args ...interface{})

RemoveCollisionGroupI Removes the given CollisionGroup, or array of CollisionGroups, from the list of groups that this body will collide with and updates the collision masks.

func (*PhysicsP2Body) RemoveFromWorld

func (self *PhysicsP2Body) RemoveFromWorld()

RemoveFromWorld Removes this physics body from the world.

func (*PhysicsP2Body) RemoveFromWorldI

func (self *PhysicsP2Body) RemoveFromWorldI(args ...interface{})

RemoveFromWorldI Removes this physics body from the world.

func (*PhysicsP2Body) RemoveNextStep

func (self *PhysicsP2Body) RemoveNextStep() bool

RemoveNextStep To avoid deleting this body during a physics step, and causing all kinds of problems, set removeNextStep to true to have it removed in the next preUpdate.

func (*PhysicsP2Body) RemoveShape

func (self *PhysicsP2Body) RemoveShape(shape interface{}) bool

RemoveShape Remove a shape from the body. Will automatically update the mass properties and bounding radius.

func (*PhysicsP2Body) RemoveShapeI

func (self *PhysicsP2Body) RemoveShapeI(args ...interface{}) bool

RemoveShapeI Remove a shape from the body. Will automatically update the mass properties and bounding radius.

func (*PhysicsP2Body) Reset

func (self *PhysicsP2Body) Reset(x int, y int)

Reset Resets the Body force, velocity (linear and angular) and rotation. Optionally resets damping and mass.

func (*PhysicsP2Body) Reset1O

func (self *PhysicsP2Body) Reset1O(x int, y int, resetDamping bool)

Reset1O Resets the Body force, velocity (linear and angular) and rotation. Optionally resets damping and mass.

func (*PhysicsP2Body) Reset2O

func (self *PhysicsP2Body) Reset2O(x int, y int, resetDamping bool, resetMass bool)

Reset2O Resets the Body force, velocity (linear and angular) and rotation. Optionally resets damping and mass.

func (*PhysicsP2Body) ResetI

func (self *PhysicsP2Body) ResetI(args ...interface{})

ResetI Resets the Body force, velocity (linear and angular) and rotation. Optionally resets damping and mass.

func (*PhysicsP2Body) Reverse

func (self *PhysicsP2Body) Reverse(speed int)

Reverse Applies a force to the Body that causes it to 'thrust' backwards (in reverse), based on its current angle and the given speed. The speed is represented in pixels per second. So a value of 100 would move 100 pixels in 1 second (1000ms).

func (*PhysicsP2Body) ReverseI

func (self *PhysicsP2Body) ReverseI(args ...interface{})

ReverseI Applies a force to the Body that causes it to 'thrust' backwards (in reverse), based on its current angle and the given speed. The speed is represented in pixels per second. So a value of 100 would move 100 pixels in 1 second (1000ms).

func (*PhysicsP2Body) RotateLeft

func (self *PhysicsP2Body) RotateLeft(speed int)

RotateLeft This will rotate the Body by the given speed to the left (counter-clockwise).

func (*PhysicsP2Body) RotateLeftI

func (self *PhysicsP2Body) RotateLeftI(args ...interface{})

RotateLeftI This will rotate the Body by the given speed to the left (counter-clockwise).

func (*PhysicsP2Body) RotateRight

func (self *PhysicsP2Body) RotateRight(speed int)

RotateRight This will rotate the Body by the given speed to the left (clockwise).

func (*PhysicsP2Body) RotateRightI

func (self *PhysicsP2Body) RotateRightI(args ...interface{})

RotateRightI This will rotate the Body by the given speed to the left (clockwise).

func (*PhysicsP2Body) Rotation

func (self *PhysicsP2Body) Rotation() int

Rotation The angle of the Body in radians. If you wish to work in degrees instead of radians use the Body.angle property instead. Working in radians is faster as it doesn't have to convert values. The angle of this Body in radians.

func (*PhysicsP2Body) STATIC

func (self *PhysicsP2Body) STATIC() int

STATIC Static body. Static bodies do not move, and they do not respond to forces or collision.

func (*PhysicsP2Body) SetAllowSleepA

func (self *PhysicsP2Body) SetAllowSleepA(member bool)

SetAllowSleepA -

func (*PhysicsP2Body) SetAngleA

func (self *PhysicsP2Body) SetAngleA(member int)

SetAngleA The angle of the Body in degrees from its original orientation. Values from 0 to 180 represent clockwise rotation; values from 0 to -180 represent counterclockwise rotation. Values outside this range are added to or subtracted from 360 to obtain a value within the range. For example, the statement Body.angle = 450 is the same as Body.angle = 90. If you wish to work in radians instead of degrees use the property Body.rotation instead. Working in radians is faster as it doesn't have to convert values. The angle of this Body in degrees.

func (*PhysicsP2Body) SetAngularDampingA

func (self *PhysicsP2Body) SetAngularDampingA(member int)

SetAngularDampingA Damping is specified as a value between 0 and 1, which is the proportion of velocity lost per second. The angular damping acting acting on the body.

func (*PhysicsP2Body) SetAngularForceA

func (self *PhysicsP2Body) SetAngularForceA(member int)

SetAngularForceA The angular force acting on the body.

func (*PhysicsP2Body) SetAngularVelocityA

func (self *PhysicsP2Body) SetAngularVelocityA(member int)

SetAngularVelocityA The angular velocity of the body.

func (*PhysicsP2Body) SetCircle

func (self *PhysicsP2Body) SetCircle(radius int)

SetCircle Clears any previously set shapes. Then creates a new Circle shape and adds it to this Body. If this Body had a previously set Collision Group you will need to re-apply it to the new Shape this creates.

func (*PhysicsP2Body) SetCircle1O

func (self *PhysicsP2Body) SetCircle1O(radius int, offsetX int)

SetCircle1O Clears any previously set shapes. Then creates a new Circle shape and adds it to this Body. If this Body had a previously set Collision Group you will need to re-apply it to the new Shape this creates.

func (*PhysicsP2Body) SetCircle2O

func (self *PhysicsP2Body) SetCircle2O(radius int, offsetX int, offsetY int)

SetCircle2O Clears any previously set shapes. Then creates a new Circle shape and adds it to this Body. If this Body had a previously set Collision Group you will need to re-apply it to the new Shape this creates.

func (*PhysicsP2Body) SetCircle3O

func (self *PhysicsP2Body) SetCircle3O(radius int, offsetX int, offsetY int, rotation int)

SetCircle3O Clears any previously set shapes. Then creates a new Circle shape and adds it to this Body. If this Body had a previously set Collision Group you will need to re-apply it to the new Shape this creates.

func (*PhysicsP2Body) SetCircleI

func (self *PhysicsP2Body) SetCircleI(args ...interface{})

SetCircleI Clears any previously set shapes. Then creates a new Circle shape and adds it to this Body. If this Body had a previously set Collision Group you will need to re-apply it to the new Shape this creates.

func (*PhysicsP2Body) SetCollideWorldBoundsA

func (self *PhysicsP2Body) SetCollideWorldBoundsA(member bool)

SetCollideWorldBoundsA A Body can be set to collide against the World bounds automatically if this is set to true. Otherwise it will leave the World. Note that this only applies if your World has bounds! The response to the collision should be managed via CollisionMaterials. Also note that when you set this it will only effect Body shapes that already exist. If you then add further shapes to your Body after setting this it will *not* proactively set them to collide with the bounds. Should the Body collide with the World bounds?

func (*PhysicsP2Body) SetCollidesWithA

func (self *PhysicsP2Body) SetCollidesWithA(member []interface{})

SetCollidesWithA Array of CollisionGroups that this Bodies shapes collide with.

func (*PhysicsP2Body) SetCollisionGroup

func (self *PhysicsP2Body) SetCollisionGroup(group *PhysicsCollisionGroup)

SetCollisionGroup Sets the given CollisionGroup to be the collision group for all shapes in this Body, unless a shape is specified. This also resets the collisionMask.

func (*PhysicsP2Body) SetCollisionGroup1O

func (self *PhysicsP2Body) SetCollisionGroup1O(group *PhysicsCollisionGroup, shape *P2Shape)

SetCollisionGroup1O Sets the given CollisionGroup to be the collision group for all shapes in this Body, unless a shape is specified. This also resets the collisionMask.

func (*PhysicsP2Body) SetCollisionGroupI

func (self *PhysicsP2Body) SetCollisionGroupI(args ...interface{})

SetCollisionGroupI Sets the given CollisionGroup to be the collision group for all shapes in this Body, unless a shape is specified. This also resets the collisionMask.

func (*PhysicsP2Body) SetDYNAMICA

func (self *PhysicsP2Body) SetDYNAMICA(member int)

SetDYNAMICA Dynamic body. Dynamic bodies body can move and respond to collisions and forces.

func (*PhysicsP2Body) SetDampingA

func (self *PhysicsP2Body) SetDampingA(member int)

SetDampingA Damping is specified as a value between 0 and 1, which is the proportion of velocity lost per second. The linear damping acting on the body in the velocity direction.

func (*PhysicsP2Body) SetDataA

func (self *PhysicsP2Body) SetDataA(member *P2Body)

SetDataA The p2 Body data.

func (*PhysicsP2Body) SetDebugA

func (self *PhysicsP2Body) SetDebugA(member bool)

SetDebugA Enable or disable debug drawing of this body

func (*PhysicsP2Body) SetDebugBodyA

func (self *PhysicsP2Body) SetDebugBodyA(member *PhysicsP2BodyDebug)

SetDebugBodyA Reference to the debug body.

func (*PhysicsP2Body) SetDirtyA

func (self *PhysicsP2Body) SetDirtyA(member bool)

SetDirtyA Internally used by Sprite.x/y

func (*PhysicsP2Body) SetDynamicA

func (self *PhysicsP2Body) SetDynamicA(member bool)

SetDynamicA Returns true if the Body is dynamic. Setting Body.dynamic to 'false' will make it static.

func (*PhysicsP2Body) SetFixedRotationA

func (self *PhysicsP2Body) SetFixedRotationA(member bool)

SetFixedRotationA -

func (*PhysicsP2Body) SetForceA

func (self *PhysicsP2Body) SetForceA(member *PhysicsP2InversePointProxy)

SetForceA The force applied to the body.

func (*PhysicsP2Body) SetGameA

func (self *PhysicsP2Body) SetGameA(member *Game)

SetGameA Local reference to game.

func (*PhysicsP2Body) SetGravityA

func (self *PhysicsP2Body) SetGravityA(member *Point)

SetGravityA A locally applied gravity force to the Body. Applied directly before the world step. NOTE: Not currently implemented.

func (*PhysicsP2Body) SetIdA

func (self *PhysicsP2Body) SetIdA(member int)

SetIdA The Body ID. Each Body that has been added to the World has a unique ID.

func (*PhysicsP2Body) SetInertiaA

func (self *PhysicsP2Body) SetInertiaA(member int)

SetInertiaA The inertia of the body around the Z axis..

func (*PhysicsP2Body) SetKINEMATICA

func (self *PhysicsP2Body) SetKINEMATICA(member int)

SetKINEMATICA Kinematic body. Kinematic bodies only moves according to its .velocity, and does not respond to collisions or force.

func (*PhysicsP2Body) SetKinematicA

func (self *PhysicsP2Body) SetKinematicA(member bool)

SetKinematicA Returns true if the Body is kinematic. Setting Body.kinematic to 'false' will make it static.

func (*PhysicsP2Body) SetMassA

func (self *PhysicsP2Body) SetMassA(member int)

SetMassA The mass of the body.

func (*PhysicsP2Body) SetMaterial

func (self *PhysicsP2Body) SetMaterial(material *PhysicsP2Material)

SetMaterial Adds the given Material to all Shapes that belong to this Body. If you only wish to apply it to a specific Shape in this Body then provide that as the 2nd parameter.

func (*PhysicsP2Body) SetMaterial1O

func (self *PhysicsP2Body) SetMaterial1O(material *PhysicsP2Material, shape *P2Shape)

SetMaterial1O Adds the given Material to all Shapes that belong to this Body. If you only wish to apply it to a specific Shape in this Body then provide that as the 2nd parameter.

func (*PhysicsP2Body) SetMaterialI

func (self *PhysicsP2Body) SetMaterialI(args ...interface{})

SetMaterialI Adds the given Material to all Shapes that belong to this Body. If you only wish to apply it to a specific Shape in this Body then provide that as the 2nd parameter.

func (*PhysicsP2Body) SetMotionStateA

func (self *PhysicsP2Body) SetMotionStateA(member int)

SetMotionStateA The type of motion this body has. Should be one of: Body.STATIC (the body does not move), Body.DYNAMIC (body can move and respond to collisions) and Body.KINEMATIC (only moves according to its .velocity).

func (*PhysicsP2Body) SetOffsetA

func (self *PhysicsP2Body) SetOffsetA(member *Point)

SetOffsetA The offset of the Physics Body from the Sprite x/y position.

func (*PhysicsP2Body) SetOnBeginContactA

func (self *PhysicsP2Body) SetOnBeginContactA(member *Signal)

SetOnBeginContactA Dispatched when a first contact is created between shapes in two bodies. This event is fired during the step, so collision has already taken place.

The event will be sent 5 arguments in this order:

The Phaser.Physics.P2.Body it is in contact with. *This might be null* if the Body was created directly in the p2 world. The p2.Body this Body is in contact with. The Shape from this body that caused the contact. The Shape from the contact body. The Contact Equation data array.

func (*PhysicsP2Body) SetOnEndContactA

func (self *PhysicsP2Body) SetOnEndContactA(member *Signal)

SetOnEndContactA Dispatched when contact ends between shapes in two bodies. This event is fired during the step, so collision has already taken place.

The event will be sent 4 arguments in this order:

The Phaser.Physics.P2.Body it is in contact with. *This might be null* if the Body was created directly in the p2 world. The p2.Body this Body has ended contact with. The Shape from this body that caused the original contact. The Shape from the contact body.

func (*PhysicsP2Body) SetRectangle

func (self *PhysicsP2Body) SetRectangle() *P2Rectangle

SetRectangle Clears any previously set shapes. The creates a new Rectangle shape at the given size and offset, and adds it to this Body. If you wish to create a Rectangle to match the size of a Sprite or Image see Body.setRectangleFromSprite. If this Body had a previously set Collision Group you will need to re-apply it to the new Shape this creates.

func (*PhysicsP2Body) SetRectangle1O

func (self *PhysicsP2Body) SetRectangle1O(width int) *P2Rectangle

SetRectangle1O Clears any previously set shapes. The creates a new Rectangle shape at the given size and offset, and adds it to this Body. If you wish to create a Rectangle to match the size of a Sprite or Image see Body.setRectangleFromSprite. If this Body had a previously set Collision Group you will need to re-apply it to the new Shape this creates.

func (*PhysicsP2Body) SetRectangle2O

func (self *PhysicsP2Body) SetRectangle2O(width int, height int) *P2Rectangle

SetRectangle2O Clears any previously set shapes. The creates a new Rectangle shape at the given size and offset, and adds it to this Body. If you wish to create a Rectangle to match the size of a Sprite or Image see Body.setRectangleFromSprite. If this Body had a previously set Collision Group you will need to re-apply it to the new Shape this creates.

func (*PhysicsP2Body) SetRectangle3O

func (self *PhysicsP2Body) SetRectangle3O(width int, height int, offsetX int) *P2Rectangle

SetRectangle3O Clears any previously set shapes. The creates a new Rectangle shape at the given size and offset, and adds it to this Body. If you wish to create a Rectangle to match the size of a Sprite or Image see Body.setRectangleFromSprite. If this Body had a previously set Collision Group you will need to re-apply it to the new Shape this creates.

func (*PhysicsP2Body) SetRectangle4O

func (self *PhysicsP2Body) SetRectangle4O(width int, height int, offsetX int, offsetY int) *P2Rectangle

SetRectangle4O Clears any previously set shapes. The creates a new Rectangle shape at the given size and offset, and adds it to this Body. If you wish to create a Rectangle to match the size of a Sprite or Image see Body.setRectangleFromSprite. If this Body had a previously set Collision Group you will need to re-apply it to the new Shape this creates.

func (*PhysicsP2Body) SetRectangle5O

func (self *PhysicsP2Body) SetRectangle5O(width int, height int, offsetX int, offsetY int, rotation int) *P2Rectangle

SetRectangle5O Clears any previously set shapes. The creates a new Rectangle shape at the given size and offset, and adds it to this Body. If you wish to create a Rectangle to match the size of a Sprite or Image see Body.setRectangleFromSprite. If this Body had a previously set Collision Group you will need to re-apply it to the new Shape this creates.

func (*PhysicsP2Body) SetRectangleFromSprite

func (self *PhysicsP2Body) SetRectangleFromSprite() *P2Rectangle

SetRectangleFromSprite Clears any previously set shapes. Then creates a Rectangle shape sized to match the dimensions and orientation of the Sprite given. If no Sprite is given it defaults to using the parent of this Body. If this Body had a previously set Collision Group you will need to re-apply it to the new Shape this creates.

func (*PhysicsP2Body) SetRectangleFromSprite1O

func (self *PhysicsP2Body) SetRectangleFromSprite1O(sprite interface{}) *P2Rectangle

SetRectangleFromSprite1O Clears any previously set shapes. Then creates a Rectangle shape sized to match the dimensions and orientation of the Sprite given. If no Sprite is given it defaults to using the parent of this Body. If this Body had a previously set Collision Group you will need to re-apply it to the new Shape this creates.

func (*PhysicsP2Body) SetRectangleFromSpriteI

func (self *PhysicsP2Body) SetRectangleFromSpriteI(args ...interface{}) *P2Rectangle

SetRectangleFromSpriteI Clears any previously set shapes. Then creates a Rectangle shape sized to match the dimensions and orientation of the Sprite given. If no Sprite is given it defaults to using the parent of this Body. If this Body had a previously set Collision Group you will need to re-apply it to the new Shape this creates.

func (*PhysicsP2Body) SetRectangleI

func (self *PhysicsP2Body) SetRectangleI(args ...interface{}) *P2Rectangle

SetRectangleI Clears any previously set shapes. The creates a new Rectangle shape at the given size and offset, and adds it to this Body. If you wish to create a Rectangle to match the size of a Sprite or Image see Body.setRectangleFromSprite. If this Body had a previously set Collision Group you will need to re-apply it to the new Shape this creates.

func (*PhysicsP2Body) SetRemoveNextStepA

func (self *PhysicsP2Body) SetRemoveNextStepA(member bool)

SetRemoveNextStepA To avoid deleting this body during a physics step, and causing all kinds of problems, set removeNextStep to true to have it removed in the next preUpdate.

func (*PhysicsP2Body) SetRotationA

func (self *PhysicsP2Body) SetRotationA(member int)

SetRotationA The angle of the Body in radians. If you wish to work in degrees instead of radians use the Body.angle property instead. Working in radians is faster as it doesn't have to convert values. The angle of this Body in radians.

func (*PhysicsP2Body) SetSTATICA

func (self *PhysicsP2Body) SetSTATICA(member int)

SetSTATICA Static body. Static bodies do not move, and they do not respond to forces or collision.

func (*PhysicsP2Body) SetSleepSpeedLimitA

func (self *PhysicsP2Body) SetSleepSpeedLimitA(member int)

SetSleepSpeedLimitA .

func (*PhysicsP2Body) SetSpriteA

func (self *PhysicsP2Body) SetSpriteA(member *Sprite)

SetSpriteA Reference to the parent Sprite.

func (*PhysicsP2Body) SetStaticA

func (self *PhysicsP2Body) SetStaticA(member bool)

SetStaticA Returns true if the Body is static. Setting Body.static to 'false' will make it dynamic.

func (*PhysicsP2Body) SetTypeA

func (self *PhysicsP2Body) SetTypeA(member int)

SetTypeA The type of physics system this body belongs to.

func (*PhysicsP2Body) SetVelocityA

func (self *PhysicsP2Body) SetVelocityA(member *PhysicsP2InversePointProxy)

SetVelocityA The velocity of the body. Set velocity.x to a negative value to move to the left, position to the right. velocity.y negative values move up, positive move down.

func (*PhysicsP2Body) SetWorldA

func (self *PhysicsP2Body) SetWorldA(member *PhysicsP2)

SetWorldA Local reference to the P2 World.

func (*PhysicsP2Body) SetXA

func (self *PhysicsP2Body) SetXA(member int)

SetXA The x coordinate of this Body.

func (*PhysicsP2Body) SetYA

func (self *PhysicsP2Body) SetYA(member int)

SetYA The y coordinate of this Body.

func (*PhysicsP2Body) SetZeroDamping

func (self *PhysicsP2Body) SetZeroDamping()

SetZeroDamping Sets the Body damping and angularDamping to zero.

func (*PhysicsP2Body) SetZeroDampingI

func (self *PhysicsP2Body) SetZeroDampingI(args ...interface{})

SetZeroDampingI Sets the Body damping and angularDamping to zero.

func (*PhysicsP2Body) SetZeroForce

func (self *PhysicsP2Body) SetZeroForce()

SetZeroForce Sets the force on the body to zero.

func (*PhysicsP2Body) SetZeroForceI

func (self *PhysicsP2Body) SetZeroForceI(args ...interface{})

SetZeroForceI Sets the force on the body to zero.

func (*PhysicsP2Body) SetZeroRotation

func (self *PhysicsP2Body) SetZeroRotation()

SetZeroRotation If this Body is dynamic then this will zero its angular velocity.

func (*PhysicsP2Body) SetZeroRotationI

func (self *PhysicsP2Body) SetZeroRotationI(args ...interface{})

SetZeroRotationI If this Body is dynamic then this will zero its angular velocity.

func (*PhysicsP2Body) SetZeroVelocity

func (self *PhysicsP2Body) SetZeroVelocity()

SetZeroVelocity If this Body is dynamic then this will zero its velocity on both axis.

func (*PhysicsP2Body) SetZeroVelocityI

func (self *PhysicsP2Body) SetZeroVelocityI(args ...interface{})

SetZeroVelocityI If this Body is dynamic then this will zero its velocity on both axis.

func (*PhysicsP2Body) ShapeChanged

func (self *PhysicsP2Body) ShapeChanged()

ShapeChanged Updates the debug draw if any body shapes change.

func (*PhysicsP2Body) ShapeChangedI

func (self *PhysicsP2Body) ShapeChangedI(args ...interface{})

ShapeChangedI Updates the debug draw if any body shapes change.

func (*PhysicsP2Body) SleepSpeedLimit

func (self *PhysicsP2Body) SleepSpeedLimit() int

SleepSpeedLimit .

func (*PhysicsP2Body) Sprite

func (self *PhysicsP2Body) Sprite() *Sprite

Sprite Reference to the parent Sprite.

func (*PhysicsP2Body) Static

func (self *PhysicsP2Body) Static() bool

Static Returns true if the Body is static. Setting Body.static to 'false' will make it dynamic.

func (*PhysicsP2Body) Thrust

func (self *PhysicsP2Body) Thrust(speed int)

Thrust Applies a force to the Body that causes it to 'thrust' forwards, based on its current angle and the given speed. The speed is represented in pixels per second. So a value of 100 would move 100 pixels in 1 second (1000ms).

func (*PhysicsP2Body) ThrustI

func (self *PhysicsP2Body) ThrustI(args ...interface{})

ThrustI Applies a force to the Body that causes it to 'thrust' forwards, based on its current angle and the given speed. The speed is represented in pixels per second. So a value of 100 would move 100 pixels in 1 second (1000ms).

func (*PhysicsP2Body) ThrustLeft

func (self *PhysicsP2Body) ThrustLeft(speed int)

ThrustLeft Applies a force to the Body that causes it to 'thrust' to the left, based on its current angle and the given speed. The speed is represented in pixels per second. So a value of 100 would move 100 pixels in 1 second (1000ms).

func (*PhysicsP2Body) ThrustLeftI

func (self *PhysicsP2Body) ThrustLeftI(args ...interface{})

ThrustLeftI Applies a force to the Body that causes it to 'thrust' to the left, based on its current angle and the given speed. The speed is represented in pixels per second. So a value of 100 would move 100 pixels in 1 second (1000ms).

func (*PhysicsP2Body) ThrustRight

func (self *PhysicsP2Body) ThrustRight(speed int)

ThrustRight Applies a force to the Body that causes it to 'thrust' to the right, based on its current angle and the given speed. The speed is represented in pixels per second. So a value of 100 would move 100 pixels in 1 second (1000ms).

func (*PhysicsP2Body) ThrustRightI

func (self *PhysicsP2Body) ThrustRightI(args ...interface{})

ThrustRightI Applies a force to the Body that causes it to 'thrust' to the right, based on its current angle and the given speed. The speed is represented in pixels per second. So a value of 100 would move 100 pixels in 1 second (1000ms).

func (*PhysicsP2Body) ToLocalFrame

func (self *PhysicsP2Body) ToLocalFrame(out interface{}, worldPoint interface{})

ToLocalFrame Transform a world point to local body frame.

func (*PhysicsP2Body) ToLocalFrameI

func (self *PhysicsP2Body) ToLocalFrameI(args ...interface{})

ToLocalFrameI Transform a world point to local body frame.

func (*PhysicsP2Body) ToWorldFrame

func (self *PhysicsP2Body) ToWorldFrame(out []interface{}, localPoint []interface{})

ToWorldFrame Transform a local point to world frame.

func (*PhysicsP2Body) ToWorldFrameI

func (self *PhysicsP2Body) ToWorldFrameI(args ...interface{})

ToWorldFrameI Transform a local point to world frame.

func (*PhysicsP2Body) Type

func (self *PhysicsP2Body) Type() int

Type The type of physics system this body belongs to.

func (*PhysicsP2Body) UpdateCollisionMask

func (self *PhysicsP2Body) UpdateCollisionMask()

UpdateCollisionMask Updates the collisionMask.

func (*PhysicsP2Body) UpdateCollisionMask1O

func (self *PhysicsP2Body) UpdateCollisionMask1O(shape *P2Shape)

UpdateCollisionMask1O Updates the collisionMask.

func (*PhysicsP2Body) UpdateCollisionMaskI

func (self *PhysicsP2Body) UpdateCollisionMaskI(args ...interface{})

UpdateCollisionMaskI Updates the collisionMask.

func (*PhysicsP2Body) Velocity

func (self *PhysicsP2Body) Velocity() *PhysicsP2InversePointProxy

Velocity The velocity of the body. Set velocity.x to a negative value to move to the left, position to the right. velocity.y negative values move up, positive move down.

func (*PhysicsP2Body) World

func (self *PhysicsP2Body) World() *PhysicsP2

World Local reference to the P2 World.

func (*PhysicsP2Body) X

func (self *PhysicsP2Body) X() int

X The x coordinate of this Body.

func (*PhysicsP2Body) Y

func (self *PhysicsP2Body) Y() int

Y The y coordinate of this Body.

type PhysicsP2BodyDebug

type PhysicsP2BodyDebug struct {
	*js.Object
}

PhysicsP2BodyDebug Draws a P2 Body to a Graphics instance for visual debugging. Needless to say, for every body you enable debug drawing on, you are adding processor and graphical overhead. So use sparingly and rarely (if ever) in production code.

Also be aware that the Debug body is only updated when the Sprite it is connected to changes position. If you manipulate the sprite in any other way (such as moving it to another Group or bringToTop, etc) then you will need to manually adjust its BodyDebug as well.

func NewPhysicsP2BodyDebug

func NewPhysicsP2BodyDebug(game *Game, body *PhysicsP2Body, settings interface{}) *PhysicsP2BodyDebug

NewPhysicsP2BodyDebug Draws a P2 Body to a Graphics instance for visual debugging. Needless to say, for every body you enable debug drawing on, you are adding processor and graphical overhead. So use sparingly and rarely (if ever) in production code.

Also be aware that the Debug body is only updated when the Sprite it is connected to changes position. If you manipulate the sprite in any other way (such as moving it to another Group or bringToTop, etc) then you will need to manually adjust its BodyDebug as well.

func NewPhysicsP2BodyDebugI

func NewPhysicsP2BodyDebugI(args ...interface{}) *PhysicsP2BodyDebug

NewPhysicsP2BodyDebugI Draws a P2 Body to a Graphics instance for visual debugging. Needless to say, for every body you enable debug drawing on, you are adding processor and graphical overhead. So use sparingly and rarely (if ever) in production code.

Also be aware that the Debug body is only updated when the Sprite it is connected to changes position. If you manipulate the sprite in any other way (such as moving it to another Group or bringToTop, etc) then you will need to manually adjust its BodyDebug as well.

func ToPhysicsP2BodyDebug

func ToPhysicsP2BodyDebug(jsStruct interface{}) *PhysicsP2BodyDebug

PhysicsP2BodyDebug Binding conversion method to PhysicsP2BodyDebug point

func (*PhysicsP2BodyDebug) Add

func (self *PhysicsP2BodyDebug) Add(child *DisplayObject) *DisplayObject

Add Adds an existing object as the top child in this group.

The child is automatically added to the top of the group, and is displayed above every previous child.

Or if the _optional_ index is specified, the child is added at the location specified by the index value, this allows you to control child ordering.

If the child was already in this Group, it is simply returned, and nothing else happens to it.

If `Group.enableBody` is set, then a physics body will be created on the object, so long as one does not already exist.

If `Group.inputEnableChildren` is set, then an Input Handler will be created on the object, so long as one does not already exist.

Use {@link Phaser.Group#addAt addAt} to control where a child is added. Use {@link Phaser.Group#create create} to create and add a new child.

func (*PhysicsP2BodyDebug) Add1O

func (self *PhysicsP2BodyDebug) Add1O(child *DisplayObject, silent bool) *DisplayObject

Add1O Adds an existing object as the top child in this group.

The child is automatically added to the top of the group, and is displayed above every previous child.

Or if the _optional_ index is specified, the child is added at the location specified by the index value, this allows you to control child ordering.

If the child was already in this Group, it is simply returned, and nothing else happens to it.

If `Group.enableBody` is set, then a physics body will be created on the object, so long as one does not already exist.

If `Group.inputEnableChildren` is set, then an Input Handler will be created on the object, so long as one does not already exist.

Use {@link Phaser.Group#addAt addAt} to control where a child is added. Use {@link Phaser.Group#create create} to create and add a new child.

func (*PhysicsP2BodyDebug) Add2O

func (self *PhysicsP2BodyDebug) Add2O(child *DisplayObject, silent bool, index int) *DisplayObject

Add2O Adds an existing object as the top child in this group.

The child is automatically added to the top of the group, and is displayed above every previous child.

Or if the _optional_ index is specified, the child is added at the location specified by the index value, this allows you to control child ordering.

If the child was already in this Group, it is simply returned, and nothing else happens to it.

If `Group.enableBody` is set, then a physics body will be created on the object, so long as one does not already exist.

If `Group.inputEnableChildren` is set, then an Input Handler will be created on the object, so long as one does not already exist.

Use {@link Phaser.Group#addAt addAt} to control where a child is added. Use {@link Phaser.Group#create create} to create and add a new child.

func (*PhysicsP2BodyDebug) AddAll

func (self *PhysicsP2BodyDebug) AddAll(property string, amount int, checkAlive bool, checkVisible bool)

AddAll Adds the amount to the given property on all children in this group.

`Group.addAll('x', 10)` will add 10 to the child.x value for each child.

func (*PhysicsP2BodyDebug) AddAllI

func (self *PhysicsP2BodyDebug) AddAllI(args ...interface{})

AddAllI Adds the amount to the given property on all children in this group.

`Group.addAll('x', 10)` will add 10 to the child.x value for each child.

func (*PhysicsP2BodyDebug) AddAt

func (self *PhysicsP2BodyDebug) AddAt(child *DisplayObject) *DisplayObject

AddAt Adds an existing object to this group.

The child is added to the group at the location specified by the index value, this allows you to control child ordering.

If `Group.enableBody` is set, then a physics body will be created on the object, so long as one does not already exist.

If `Group.inputEnableChildren` is set, then an Input Handler will be created on the object, so long as one does not already exist.

func (*PhysicsP2BodyDebug) AddAt1O

func (self *PhysicsP2BodyDebug) AddAt1O(child *DisplayObject, index int) *DisplayObject

AddAt1O Adds an existing object to this group.

The child is added to the group at the location specified by the index value, this allows you to control child ordering.

If `Group.enableBody` is set, then a physics body will be created on the object, so long as one does not already exist.

If `Group.inputEnableChildren` is set, then an Input Handler will be created on the object, so long as one does not already exist.

func (*PhysicsP2BodyDebug) AddAt2O

func (self *PhysicsP2BodyDebug) AddAt2O(child *DisplayObject, index int, silent bool) *DisplayObject

AddAt2O Adds an existing object to this group.

The child is added to the group at the location specified by the index value, this allows you to control child ordering.

If `Group.enableBody` is set, then a physics body will be created on the object, so long as one does not already exist.

If `Group.inputEnableChildren` is set, then an Input Handler will be created on the object, so long as one does not already exist.

func (*PhysicsP2BodyDebug) AddAtI

func (self *PhysicsP2BodyDebug) AddAtI(args ...interface{}) *DisplayObject

AddAtI Adds an existing object to this group.

The child is added to the group at the location specified by the index value, this allows you to control child ordering.

If `Group.enableBody` is set, then a physics body will be created on the object, so long as one does not already exist.

If `Group.inputEnableChildren` is set, then an Input Handler will be created on the object, so long as one does not already exist.

func (*PhysicsP2BodyDebug) AddChild

func (self *PhysicsP2BodyDebug) AddChild(child *DisplayObject) *DisplayObject

AddChild Adds a child to the container.

func (*PhysicsP2BodyDebug) AddChildAt

func (self *PhysicsP2BodyDebug) AddChildAt(child *DisplayObject, index int) *DisplayObject

AddChildAt Adds a child to the container at a specified index. If the index is out of bounds an error will be thrown

func (*PhysicsP2BodyDebug) AddChildAtI

func (self *PhysicsP2BodyDebug) AddChildAtI(args ...interface{}) *DisplayObject

AddChildAtI Adds a child to the container at a specified index. If the index is out of bounds an error will be thrown

func (*PhysicsP2BodyDebug) AddChildI

func (self *PhysicsP2BodyDebug) AddChildI(args ...interface{}) *DisplayObject

AddChildI Adds a child to the container.

func (*PhysicsP2BodyDebug) AddI

func (self *PhysicsP2BodyDebug) AddI(args ...interface{}) *DisplayObject

AddI Adds an existing object as the top child in this group.

The child is automatically added to the top of the group, and is displayed above every previous child.

Or if the _optional_ index is specified, the child is added at the location specified by the index value, this allows you to control child ordering.

If the child was already in this Group, it is simply returned, and nothing else happens to it.

If `Group.enableBody` is set, then a physics body will be created on the object, so long as one does not already exist.

If `Group.inputEnableChildren` is set, then an Input Handler will be created on the object, so long as one does not already exist.

Use {@link Phaser.Group#addAt addAt} to control where a child is added. Use {@link Phaser.Group#create create} to create and add a new child.

func (*PhysicsP2BodyDebug) AddMultiple

func (self *PhysicsP2BodyDebug) AddMultiple(children interface{}) interface{}

AddMultiple Adds an array of existing Display Objects to this Group.

The Display Objects are automatically added to the top of this Group, and will render on-top of everything already in this Group.

As well as an array you can also pass another Group as the first argument. In this case all of the children from that Group will be removed from it and added into this Group.

If `Group.enableBody` is set, then a physics body will be created on the objects, so long as one does not already exist.

If `Group.inputEnableChildren` is set, then an Input Handler will be created on the objects, so long as one does not already exist.

func (*PhysicsP2BodyDebug) AddMultiple1O

func (self *PhysicsP2BodyDebug) AddMultiple1O(children interface{}, silent bool) interface{}

AddMultiple1O Adds an array of existing Display Objects to this Group.

The Display Objects are automatically added to the top of this Group, and will render on-top of everything already in this Group.

As well as an array you can also pass another Group as the first argument. In this case all of the children from that Group will be removed from it and added into this Group.

If `Group.enableBody` is set, then a physics body will be created on the objects, so long as one does not already exist.

If `Group.inputEnableChildren` is set, then an Input Handler will be created on the objects, so long as one does not already exist.

func (*PhysicsP2BodyDebug) AddMultipleI

func (self *PhysicsP2BodyDebug) AddMultipleI(args ...interface{}) interface{}

AddMultipleI Adds an array of existing Display Objects to this Group.

The Display Objects are automatically added to the top of this Group, and will render on-top of everything already in this Group.

As well as an array you can also pass another Group as the first argument. In this case all of the children from that Group will be removed from it and added into this Group.

If `Group.enableBody` is set, then a physics body will be created on the objects, so long as one does not already exist.

If `Group.inputEnableChildren` is set, then an Input Handler will be created on the objects, so long as one does not already exist.

func (*PhysicsP2BodyDebug) AddToHash

func (self *PhysicsP2BodyDebug) AddToHash(child *DisplayObject) bool

AddToHash Adds a child of this Group into the hash array. This call will return false if the child is not a child of this Group, or is already in the hash.

func (*PhysicsP2BodyDebug) AddToHashI

func (self *PhysicsP2BodyDebug) AddToHashI(args ...interface{}) bool

AddToHashI Adds a child of this Group into the hash array. This call will return false if the child is not a child of this Group, or is already in the hash.

func (*PhysicsP2BodyDebug) Align

func (self *PhysicsP2BodyDebug) Align(width int, height int, cellWidth int, cellHeight int) bool

Align This method iterates through all children in the Group (regardless if they are visible or exist) and then changes their position so they are arranged in a Grid formation. Children must have the `alignTo` method in order to be positioned by this call. All default Phaser Game Objects have this.

The grid dimensions are determined by the first four arguments. The `width` and `height` arguments relate to the width and height of the grid respectively.

For example if the Group had 100 children in it:

`Group.align(10, 10, 32, 32)`

This will align all of the children into a grid formation of 10x10, using 32 pixels per grid cell. If you want a wider grid, you could do:

`Group.align(25, 4, 32, 32)`

This will align the children into a grid of 25x4, again using 32 pixels per grid cell.

You can choose to set _either_ the `width` or `height` value to -1. Doing so tells the method to keep on aligning children until there are no children left. For example if this Group had 48 children in it, the following:

`Group.align(-1, 8, 32, 32)`

... will align the children so that there are 8 children vertically (the second argument), and each row will contain 6 sprites, except the last one, which will contain 5 (totaling 48)

You can also do:

`Group.align(10, -1, 32, 32)`

In this case it will create a grid 10 wide, and as tall as it needs to be in order to fit all of the children in.

The `position` property allows you to control where in each grid cell the child is positioned. This is a constant and can be one of `Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` or `Phaser.BOTTOM_RIGHT`.

The final argument; `offset` lets you start the alignment from a specific child index.

func (*PhysicsP2BodyDebug) Align1O

func (self *PhysicsP2BodyDebug) Align1O(width int, height int, cellWidth int, cellHeight int, position int) bool

Align1O This method iterates through all children in the Group (regardless if they are visible or exist) and then changes their position so they are arranged in a Grid formation. Children must have the `alignTo` method in order to be positioned by this call. All default Phaser Game Objects have this.

The grid dimensions are determined by the first four arguments. The `width` and `height` arguments relate to the width and height of the grid respectively.

For example if the Group had 100 children in it:

`Group.align(10, 10, 32, 32)`

This will align all of the children into a grid formation of 10x10, using 32 pixels per grid cell. If you want a wider grid, you could do:

`Group.align(25, 4, 32, 32)`

This will align the children into a grid of 25x4, again using 32 pixels per grid cell.

You can choose to set _either_ the `width` or `height` value to -1. Doing so tells the method to keep on aligning children until there are no children left. For example if this Group had 48 children in it, the following:

`Group.align(-1, 8, 32, 32)`

... will align the children so that there are 8 children vertically (the second argument), and each row will contain 6 sprites, except the last one, which will contain 5 (totaling 48)

You can also do:

`Group.align(10, -1, 32, 32)`

In this case it will create a grid 10 wide, and as tall as it needs to be in order to fit all of the children in.

The `position` property allows you to control where in each grid cell the child is positioned. This is a constant and can be one of `Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` or `Phaser.BOTTOM_RIGHT`.

The final argument; `offset` lets you start the alignment from a specific child index.

func (*PhysicsP2BodyDebug) Align2O

func (self *PhysicsP2BodyDebug) Align2O(width int, height int, cellWidth int, cellHeight int, position int, offset int) bool

Align2O This method iterates through all children in the Group (regardless if they are visible or exist) and then changes their position so they are arranged in a Grid formation. Children must have the `alignTo` method in order to be positioned by this call. All default Phaser Game Objects have this.

The grid dimensions are determined by the first four arguments. The `width` and `height` arguments relate to the width and height of the grid respectively.

For example if the Group had 100 children in it:

`Group.align(10, 10, 32, 32)`

This will align all of the children into a grid formation of 10x10, using 32 pixels per grid cell. If you want a wider grid, you could do:

`Group.align(25, 4, 32, 32)`

This will align the children into a grid of 25x4, again using 32 pixels per grid cell.

You can choose to set _either_ the `width` or `height` value to -1. Doing so tells the method to keep on aligning children until there are no children left. For example if this Group had 48 children in it, the following:

`Group.align(-1, 8, 32, 32)`

... will align the children so that there are 8 children vertically (the second argument), and each row will contain 6 sprites, except the last one, which will contain 5 (totaling 48)

You can also do:

`Group.align(10, -1, 32, 32)`

In this case it will create a grid 10 wide, and as tall as it needs to be in order to fit all of the children in.

The `position` property allows you to control where in each grid cell the child is positioned. This is a constant and can be one of `Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` or `Phaser.BOTTOM_RIGHT`.

The final argument; `offset` lets you start the alignment from a specific child index.

func (*PhysicsP2BodyDebug) AlignI

func (self *PhysicsP2BodyDebug) AlignI(args ...interface{}) bool

AlignI This method iterates through all children in the Group (regardless if they are visible or exist) and then changes their position so they are arranged in a Grid formation. Children must have the `alignTo` method in order to be positioned by this call. All default Phaser Game Objects have this.

The grid dimensions are determined by the first four arguments. The `width` and `height` arguments relate to the width and height of the grid respectively.

For example if the Group had 100 children in it:

`Group.align(10, 10, 32, 32)`

This will align all of the children into a grid formation of 10x10, using 32 pixels per grid cell. If you want a wider grid, you could do:

`Group.align(25, 4, 32, 32)`

This will align the children into a grid of 25x4, again using 32 pixels per grid cell.

You can choose to set _either_ the `width` or `height` value to -1. Doing so tells the method to keep on aligning children until there are no children left. For example if this Group had 48 children in it, the following:

`Group.align(-1, 8, 32, 32)`

... will align the children so that there are 8 children vertically (the second argument), and each row will contain 6 sprites, except the last one, which will contain 5 (totaling 48)

You can also do:

`Group.align(10, -1, 32, 32)`

In this case it will create a grid 10 wide, and as tall as it needs to be in order to fit all of the children in.

The `position` property allows you to control where in each grid cell the child is positioned. This is a constant and can be one of `Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` or `Phaser.BOTTOM_RIGHT`.

The final argument; `offset` lets you start the alignment from a specific child index.

func (*PhysicsP2BodyDebug) AlignIn

func (self *PhysicsP2BodyDebug) AlignIn(container interface{}) *Group

AlignIn Aligns this Group within another Game Object, or Rectangle, known as the 'container', to one of 9 possible positions.

The container must be a Game Object, or Phaser.Rectangle object. This can include properties such as `World.bounds` or `Camera.view`, for aligning Groups within the world and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText, TileSprites or Buttons.

Please note that aligning a Group to another Game Object does **not** make it a child of the container. It simply modifies its position coordinates so it aligns with it.

The position constants you can use are:

`Phaser.TOP_LEFT`, `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

Groups are placed in such a way that their _bounds_ align with the container, taking into consideration rotation and scale of its children. This allows you to neatly align Groups, irrespective of their position value.

The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final aligned position of the Group. For example:

`group.alignIn(background, Phaser.BOTTOM_RIGHT, -20, -20)`

Would align the `group` to the bottom-right, but moved 20 pixels in from the corner. Think of the offsets as applying an adjustment to the containers bounds before the alignment takes place. So providing a negative offset will 'shrink' the container bounds by that amount, and providing a positive one expands it.

func (*PhysicsP2BodyDebug) AlignIn1O

func (self *PhysicsP2BodyDebug) AlignIn1O(container interface{}, position int) *Group

AlignIn1O Aligns this Group within another Game Object, or Rectangle, known as the 'container', to one of 9 possible positions.

The container must be a Game Object, or Phaser.Rectangle object. This can include properties such as `World.bounds` or `Camera.view`, for aligning Groups within the world and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText, TileSprites or Buttons.

Please note that aligning a Group to another Game Object does **not** make it a child of the container. It simply modifies its position coordinates so it aligns with it.

The position constants you can use are:

`Phaser.TOP_LEFT`, `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

Groups are placed in such a way that their _bounds_ align with the container, taking into consideration rotation and scale of its children. This allows you to neatly align Groups, irrespective of their position value.

The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final aligned position of the Group. For example:

`group.alignIn(background, Phaser.BOTTOM_RIGHT, -20, -20)`

Would align the `group` to the bottom-right, but moved 20 pixels in from the corner. Think of the offsets as applying an adjustment to the containers bounds before the alignment takes place. So providing a negative offset will 'shrink' the container bounds by that amount, and providing a positive one expands it.

func (*PhysicsP2BodyDebug) AlignIn2O

func (self *PhysicsP2BodyDebug) AlignIn2O(container interface{}, position int, offsetX int) *Group

AlignIn2O Aligns this Group within another Game Object, or Rectangle, known as the 'container', to one of 9 possible positions.

The container must be a Game Object, or Phaser.Rectangle object. This can include properties such as `World.bounds` or `Camera.view`, for aligning Groups within the world and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText, TileSprites or Buttons.

Please note that aligning a Group to another Game Object does **not** make it a child of the container. It simply modifies its position coordinates so it aligns with it.

The position constants you can use are:

`Phaser.TOP_LEFT`, `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

Groups are placed in such a way that their _bounds_ align with the container, taking into consideration rotation and scale of its children. This allows you to neatly align Groups, irrespective of their position value.

The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final aligned position of the Group. For example:

`group.alignIn(background, Phaser.BOTTOM_RIGHT, -20, -20)`

Would align the `group` to the bottom-right, but moved 20 pixels in from the corner. Think of the offsets as applying an adjustment to the containers bounds before the alignment takes place. So providing a negative offset will 'shrink' the container bounds by that amount, and providing a positive one expands it.

func (*PhysicsP2BodyDebug) AlignIn3O

func (self *PhysicsP2BodyDebug) AlignIn3O(container interface{}, position int, offsetX int, offsetY int) *Group

AlignIn3O Aligns this Group within another Game Object, or Rectangle, known as the 'container', to one of 9 possible positions.

The container must be a Game Object, or Phaser.Rectangle object. This can include properties such as `World.bounds` or `Camera.view`, for aligning Groups within the world and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText, TileSprites or Buttons.

Please note that aligning a Group to another Game Object does **not** make it a child of the container. It simply modifies its position coordinates so it aligns with it.

The position constants you can use are:

`Phaser.TOP_LEFT`, `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

Groups are placed in such a way that their _bounds_ align with the container, taking into consideration rotation and scale of its children. This allows you to neatly align Groups, irrespective of their position value.

The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final aligned position of the Group. For example:

`group.alignIn(background, Phaser.BOTTOM_RIGHT, -20, -20)`

Would align the `group` to the bottom-right, but moved 20 pixels in from the corner. Think of the offsets as applying an adjustment to the containers bounds before the alignment takes place. So providing a negative offset will 'shrink' the container bounds by that amount, and providing a positive one expands it.

func (*PhysicsP2BodyDebug) AlignInI

func (self *PhysicsP2BodyDebug) AlignInI(args ...interface{}) *Group

AlignInI Aligns this Group within another Game Object, or Rectangle, known as the 'container', to one of 9 possible positions.

The container must be a Game Object, or Phaser.Rectangle object. This can include properties such as `World.bounds` or `Camera.view`, for aligning Groups within the world and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText, TileSprites or Buttons.

Please note that aligning a Group to another Game Object does **not** make it a child of the container. It simply modifies its position coordinates so it aligns with it.

The position constants you can use are:

`Phaser.TOP_LEFT`, `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

Groups are placed in such a way that their _bounds_ align with the container, taking into consideration rotation and scale of its children. This allows you to neatly align Groups, irrespective of their position value.

The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final aligned position of the Group. For example:

`group.alignIn(background, Phaser.BOTTOM_RIGHT, -20, -20)`

Would align the `group` to the bottom-right, but moved 20 pixels in from the corner. Think of the offsets as applying an adjustment to the containers bounds before the alignment takes place. So providing a negative offset will 'shrink' the container bounds by that amount, and providing a positive one expands it.

func (*PhysicsP2BodyDebug) AlignTo

func (self *PhysicsP2BodyDebug) AlignTo(parent interface{}) *Group

AlignTo Aligns this Group to the side of another Game Object, or Rectangle, known as the 'parent', in one of 11 possible positions.

The parent must be a Game Object, or Phaser.Rectangle object. This can include properties such as `World.bounds` or `Camera.view`, for aligning Groups within the world and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText, TileSprites or Buttons.

Please note that aligning a Group to another Game Object does **not** make it a child of the parent. It simply modifies its position coordinates so it aligns with it.

The position constants you can use are:

`Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_TOP`, `Phaser.LEFT_CENTER`, `Phaser.LEFT_BOTTOM`, `Phaser.RIGHT_TOP`, `Phaser.RIGHT_CENTER`, `Phaser.RIGHT_BOTTOM`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

Groups are placed in such a way that their _bounds_ align with the parent, taking into consideration rotation and scale of the children. This allows you to neatly align Groups, irrespective of their position value.

The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final aligned position of the Group. For example:

`group.alignTo(background, Phaser.BOTTOM_RIGHT, -20, -20)`

Would align the `group` to the bottom-right, but moved 20 pixels in from the corner. Think of the offsets as applying an adjustment to the parents bounds before the alignment takes place. So providing a negative offset will 'shrink' the parent bounds by that amount, and providing a positive one expands it.

func (*PhysicsP2BodyDebug) AlignTo1O

func (self *PhysicsP2BodyDebug) AlignTo1O(parent interface{}, position int) *Group

AlignTo1O Aligns this Group to the side of another Game Object, or Rectangle, known as the 'parent', in one of 11 possible positions.

The parent must be a Game Object, or Phaser.Rectangle object. This can include properties such as `World.bounds` or `Camera.view`, for aligning Groups within the world and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText, TileSprites or Buttons.

Please note that aligning a Group to another Game Object does **not** make it a child of the parent. It simply modifies its position coordinates so it aligns with it.

The position constants you can use are:

`Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_TOP`, `Phaser.LEFT_CENTER`, `Phaser.LEFT_BOTTOM`, `Phaser.RIGHT_TOP`, `Phaser.RIGHT_CENTER`, `Phaser.RIGHT_BOTTOM`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

Groups are placed in such a way that their _bounds_ align with the parent, taking into consideration rotation and scale of the children. This allows you to neatly align Groups, irrespective of their position value.

The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final aligned position of the Group. For example:

`group.alignTo(background, Phaser.BOTTOM_RIGHT, -20, -20)`

Would align the `group` to the bottom-right, but moved 20 pixels in from the corner. Think of the offsets as applying an adjustment to the parents bounds before the alignment takes place. So providing a negative offset will 'shrink' the parent bounds by that amount, and providing a positive one expands it.

func (*PhysicsP2BodyDebug) AlignTo2O

func (self *PhysicsP2BodyDebug) AlignTo2O(parent interface{}, position int, offsetX int) *Group

AlignTo2O Aligns this Group to the side of another Game Object, or Rectangle, known as the 'parent', in one of 11 possible positions.

The parent must be a Game Object, or Phaser.Rectangle object. This can include properties such as `World.bounds` or `Camera.view`, for aligning Groups within the world and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText, TileSprites or Buttons.

Please note that aligning a Group to another Game Object does **not** make it a child of the parent. It simply modifies its position coordinates so it aligns with it.

The position constants you can use are:

`Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_TOP`, `Phaser.LEFT_CENTER`, `Phaser.LEFT_BOTTOM`, `Phaser.RIGHT_TOP`, `Phaser.RIGHT_CENTER`, `Phaser.RIGHT_BOTTOM`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

Groups are placed in such a way that their _bounds_ align with the parent, taking into consideration rotation and scale of the children. This allows you to neatly align Groups, irrespective of their position value.

The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final aligned position of the Group. For example:

`group.alignTo(background, Phaser.BOTTOM_RIGHT, -20, -20)`

Would align the `group` to the bottom-right, but moved 20 pixels in from the corner. Think of the offsets as applying an adjustment to the parents bounds before the alignment takes place. So providing a negative offset will 'shrink' the parent bounds by that amount, and providing a positive one expands it.

func (*PhysicsP2BodyDebug) AlignTo3O

func (self *PhysicsP2BodyDebug) AlignTo3O(parent interface{}, position int, offsetX int, offsetY int) *Group

AlignTo3O Aligns this Group to the side of another Game Object, or Rectangle, known as the 'parent', in one of 11 possible positions.

The parent must be a Game Object, or Phaser.Rectangle object. This can include properties such as `World.bounds` or `Camera.view`, for aligning Groups within the world and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText, TileSprites or Buttons.

Please note that aligning a Group to another Game Object does **not** make it a child of the parent. It simply modifies its position coordinates so it aligns with it.

The position constants you can use are:

`Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_TOP`, `Phaser.LEFT_CENTER`, `Phaser.LEFT_BOTTOM`, `Phaser.RIGHT_TOP`, `Phaser.RIGHT_CENTER`, `Phaser.RIGHT_BOTTOM`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

Groups are placed in such a way that their _bounds_ align with the parent, taking into consideration rotation and scale of the children. This allows you to neatly align Groups, irrespective of their position value.

The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final aligned position of the Group. For example:

`group.alignTo(background, Phaser.BOTTOM_RIGHT, -20, -20)`

Would align the `group` to the bottom-right, but moved 20 pixels in from the corner. Think of the offsets as applying an adjustment to the parents bounds before the alignment takes place. So providing a negative offset will 'shrink' the parent bounds by that amount, and providing a positive one expands it.

func (*PhysicsP2BodyDebug) AlignToI

func (self *PhysicsP2BodyDebug) AlignToI(args ...interface{}) *Group

AlignToI Aligns this Group to the side of another Game Object, or Rectangle, known as the 'parent', in one of 11 possible positions.

The parent must be a Game Object, or Phaser.Rectangle object. This can include properties such as `World.bounds` or `Camera.view`, for aligning Groups within the world and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText, TileSprites or Buttons.

Please note that aligning a Group to another Game Object does **not** make it a child of the parent. It simply modifies its position coordinates so it aligns with it.

The position constants you can use are:

`Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_TOP`, `Phaser.LEFT_CENTER`, `Phaser.LEFT_BOTTOM`, `Phaser.RIGHT_TOP`, `Phaser.RIGHT_CENTER`, `Phaser.RIGHT_BOTTOM`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

Groups are placed in such a way that their _bounds_ align with the parent, taking into consideration rotation and scale of the children. This allows you to neatly align Groups, irrespective of their position value.

The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final aligned position of the Group. For example:

`group.alignTo(background, Phaser.BOTTOM_RIGHT, -20, -20)`

Would align the `group` to the bottom-right, but moved 20 pixels in from the corner. Think of the offsets as applying an adjustment to the parents bounds before the alignment takes place. So providing a negative offset will 'shrink' the parent bounds by that amount, and providing a positive one expands it.

func (*PhysicsP2BodyDebug) Alive

func (self *PhysicsP2BodyDebug) Alive() bool

Alive The alive property is useful for Groups that are children of other Groups and need to be included/excluded in checks like forEachAlive.

func (*PhysicsP2BodyDebug) Alpha

func (self *PhysicsP2BodyDebug) Alpha() int

Alpha The alpha value of the group container.

func (*PhysicsP2BodyDebug) Angle

func (self *PhysicsP2BodyDebug) Angle() int

Angle The angle of rotation of the group container, in degrees.

This adjusts the group itself by modifying its local rotation transform.

This has no impact on the rotation/angle properties of the children, but it will update their worldTransform and on-screen orientation and position.

func (*PhysicsP2BodyDebug) AscendingSortHandler

func (self *PhysicsP2BodyDebug) AscendingSortHandler(a interface{}, b interface{})

AscendingSortHandler An internal helper function for the sort process.

func (*PhysicsP2BodyDebug) AscendingSortHandlerI

func (self *PhysicsP2BodyDebug) AscendingSortHandlerI(args ...interface{})

AscendingSortHandlerI An internal helper function for the sort process.

func (*PhysicsP2BodyDebug) Body

func (self *PhysicsP2BodyDebug) Body() *PhysicsP2Body

Body The P2 Body to display debug data for.

func (*PhysicsP2BodyDebug) Bottom

func (self *PhysicsP2BodyDebug) Bottom() int

Bottom The bottom coordinate of this Group.

It is derived by calling `getBounds`, calculating the Groups dimensions based on its visible children.

func (*PhysicsP2BodyDebug) BringToTop

func (self *PhysicsP2BodyDebug) BringToTop(child interface{}) interface{}

BringToTop Brings the given child to the top of this group so it renders above all other children.

func (*PhysicsP2BodyDebug) BringToTopI

func (self *PhysicsP2BodyDebug) BringToTopI(args ...interface{}) interface{}

BringToTopI Brings the given child to the top of this group so it renders above all other children.

func (*PhysicsP2BodyDebug) CallAll

func (self *PhysicsP2BodyDebug) CallAll(method string, context string, args interface{})

CallAll Calls a function, specified by name, on all on children.

The function is called for all children regardless if they are dead or alive (see callAllExists for different options). After the method parameter and context you can add as many extra parameters as you like, which will all be passed to the child.

func (*PhysicsP2BodyDebug) CallAllExists

func (self *PhysicsP2BodyDebug) CallAllExists(callback string, existsValue bool, parameter interface{})

CallAllExists Calls a function, specified by name, on all children in the group who exist (or do not exist).

After the existsValue parameter you can add as many parameters as you like, which will all be passed to the child callback.

func (*PhysicsP2BodyDebug) CallAllExistsI

func (self *PhysicsP2BodyDebug) CallAllExistsI(args ...interface{})

CallAllExistsI Calls a function, specified by name, on all children in the group who exist (or do not exist).

After the existsValue parameter you can add as many parameters as you like, which will all be passed to the child callback.

func (*PhysicsP2BodyDebug) CallAllI

func (self *PhysicsP2BodyDebug) CallAllI(args ...interface{})

CallAllI Calls a function, specified by name, on all on children.

The function is called for all children regardless if they are dead or alive (see callAllExists for different options). After the method parameter and context you can add as many extra parameters as you like, which will all be passed to the child.

func (*PhysicsP2BodyDebug) CallbackFromArray

func (self *PhysicsP2BodyDebug) CallbackFromArray(child interface{}, callback []interface{}, length int)

CallbackFromArray Returns a reference to a function that exists on a child of the group based on the given callback array.

func (*PhysicsP2BodyDebug) CallbackFromArrayI

func (self *PhysicsP2BodyDebug) CallbackFromArrayI(args ...interface{})

CallbackFromArrayI Returns a reference to a function that exists on a child of the group based on the given callback array.

func (*PhysicsP2BodyDebug) CameraOffset

func (self *PhysicsP2BodyDebug) CameraOffset() *Point

CameraOffset If this object is {@link Phaser.Group#fixedToCamera fixedToCamera} then this stores the x/y position offset relative to the top-left of the camera view. If the parent of this Group is also `fixedToCamera` then the offset here is in addition to that and should typically be disabled.

func (*PhysicsP2BodyDebug) Canvas

func (self *PhysicsP2BodyDebug) Canvas() *Graphics

Canvas The canvas to render the debug info to.

func (*PhysicsP2BodyDebug) CenterX

func (self *PhysicsP2BodyDebug) CenterX() int

CenterX The center x coordinate of this Group.

It is derived by calling `getBounds`, calculating the Groups dimensions based on its visible children.

func (*PhysicsP2BodyDebug) CenterY

func (self *PhysicsP2BodyDebug) CenterY() int

CenterY The center y coordinate of this Group.

It is derived by calling `getBounds`, calculating the Groups dimensions based on its visible children.

func (*PhysicsP2BodyDebug) CheckAll

func (self *PhysicsP2BodyDebug) CheckAll(key string, value interface{})

CheckAll Quickly check that the same property across all children of this group is equal to the given value.

This call doesn't descend down children, so if you have a Group inside of this group, the property will be checked on the group but not its children.

func (*PhysicsP2BodyDebug) CheckAll1O

func (self *PhysicsP2BodyDebug) CheckAll1O(key string, value interface{}, checkAlive bool)

CheckAll1O Quickly check that the same property across all children of this group is equal to the given value.

This call doesn't descend down children, so if you have a Group inside of this group, the property will be checked on the group but not its children.

func (*PhysicsP2BodyDebug) CheckAll2O

func (self *PhysicsP2BodyDebug) CheckAll2O(key string, value interface{}, checkAlive bool, checkVisible bool)

CheckAll2O Quickly check that the same property across all children of this group is equal to the given value.

This call doesn't descend down children, so if you have a Group inside of this group, the property will be checked on the group but not its children.

func (*PhysicsP2BodyDebug) CheckAll3O

func (self *PhysicsP2BodyDebug) CheckAll3O(key string, value interface{}, checkAlive bool, checkVisible bool, force bool)

CheckAll3O Quickly check that the same property across all children of this group is equal to the given value.

This call doesn't descend down children, so if you have a Group inside of this group, the property will be checked on the group but not its children.

func (*PhysicsP2BodyDebug) CheckAllI

func (self *PhysicsP2BodyDebug) CheckAllI(args ...interface{})

CheckAllI Quickly check that the same property across all children of this group is equal to the given value.

This call doesn't descend down children, so if you have a Group inside of this group, the property will be checked on the group but not its children.

func (*PhysicsP2BodyDebug) CheckProperty

func (self *PhysicsP2BodyDebug) CheckProperty(child interface{}, key []interface{}, value interface{}) bool

CheckProperty Checks a property for the given value on the child.

func (*PhysicsP2BodyDebug) CheckProperty1O

func (self *PhysicsP2BodyDebug) CheckProperty1O(child interface{}, key []interface{}, value interface{}, force bool) bool

CheckProperty1O Checks a property for the given value on the child.

func (*PhysicsP2BodyDebug) CheckPropertyI

func (self *PhysicsP2BodyDebug) CheckPropertyI(args ...interface{}) bool

CheckPropertyI Checks a property for the given value on the child.

func (*PhysicsP2BodyDebug) Children

func (self *PhysicsP2BodyDebug) Children() []DisplayObject

Children [read-only] The array of children of this container.

func (*PhysicsP2BodyDebug) ClassType

func (self *PhysicsP2BodyDebug) ClassType() interface{}

ClassType The type of objects that will be created when using {@link Phaser.Group#create create} or {@link Phaser.Group#createMultiple createMultiple}.

Any object may be used but it should extend either Sprite or Image and accept the same constructor arguments: when a new object is created it is passed the following parameters to its constructor: `(game, x, y, key, frame)`.

func (*PhysicsP2BodyDebug) ComponentToHex

func (self *PhysicsP2BodyDebug) ComponentToHex()

ComponentToHex Component to hex conversion.

func (*PhysicsP2BodyDebug) ComponentToHexI

func (self *PhysicsP2BodyDebug) ComponentToHexI(args ...interface{})

ComponentToHexI Component to hex conversion.

func (*PhysicsP2BodyDebug) Contains

func (self *PhysicsP2BodyDebug) Contains(child *DisplayObject) bool

Contains Determines whether the specified display object is a child of the DisplayObjectContainer instance or the instance itself.

func (*PhysicsP2BodyDebug) ContainsI

func (self *PhysicsP2BodyDebug) ContainsI(args ...interface{}) bool

ContainsI Determines whether the specified display object is a child of the DisplayObjectContainer instance or the instance itself.

func (*PhysicsP2BodyDebug) CountDead

func (self *PhysicsP2BodyDebug) CountDead() int

CountDead Get the number of dead children in this group.

func (*PhysicsP2BodyDebug) CountDeadI

func (self *PhysicsP2BodyDebug) CountDeadI(args ...interface{}) int

CountDeadI Get the number of dead children in this group.

func (*PhysicsP2BodyDebug) CountLiving

func (self *PhysicsP2BodyDebug) CountLiving() int

CountLiving Get the number of living children in this group.

func (*PhysicsP2BodyDebug) CountLivingI

func (self *PhysicsP2BodyDebug) CountLivingI(args ...interface{}) int

CountLivingI Get the number of living children in this group.

func (*PhysicsP2BodyDebug) Create

func (self *PhysicsP2BodyDebug) Create(x int, y int) *DisplayObject

Create Creates a new Phaser.Sprite object and adds it to the top of this group.

Use {@link Phaser.Group#classType classType} to change the type of object created.

The child is automatically added to the top of the group, and is displayed above every previous child.

Or if the _optional_ index is specified, the child is added at the location specified by the index value, this allows you to control child ordering.

If `Group.enableBody` is set, then a physics body will be created on the object, so long as one does not already exist.

If `Group.inputEnableChildren` is set, then an Input Handler will be created on the object, so long as one does not already exist.

func (*PhysicsP2BodyDebug) Create1O

func (self *PhysicsP2BodyDebug) Create1O(x int, y int, key interface{}) *DisplayObject

Create1O Creates a new Phaser.Sprite object and adds it to the top of this group.

Use {@link Phaser.Group#classType classType} to change the type of object created.

The child is automatically added to the top of the group, and is displayed above every previous child.

Or if the _optional_ index is specified, the child is added at the location specified by the index value, this allows you to control child ordering.

If `Group.enableBody` is set, then a physics body will be created on the object, so long as one does not already exist.

If `Group.inputEnableChildren` is set, then an Input Handler will be created on the object, so long as one does not already exist.

func (*PhysicsP2BodyDebug) Create2O

func (self *PhysicsP2BodyDebug) Create2O(x int, y int, key interface{}, frame interface{}) *DisplayObject

Create2O Creates a new Phaser.Sprite object and adds it to the top of this group.

Use {@link Phaser.Group#classType classType} to change the type of object created.

The child is automatically added to the top of the group, and is displayed above every previous child.

Or if the _optional_ index is specified, the child is added at the location specified by the index value, this allows you to control child ordering.

If `Group.enableBody` is set, then a physics body will be created on the object, so long as one does not already exist.

If `Group.inputEnableChildren` is set, then an Input Handler will be created on the object, so long as one does not already exist.

func (*PhysicsP2BodyDebug) Create3O

func (self *PhysicsP2BodyDebug) Create3O(x int, y int, key interface{}, frame interface{}, exists bool) *DisplayObject

Create3O Creates a new Phaser.Sprite object and adds it to the top of this group.

Use {@link Phaser.Group#classType classType} to change the type of object created.

The child is automatically added to the top of the group, and is displayed above every previous child.

Or if the _optional_ index is specified, the child is added at the location specified by the index value, this allows you to control child ordering.

If `Group.enableBody` is set, then a physics body will be created on the object, so long as one does not already exist.

If `Group.inputEnableChildren` is set, then an Input Handler will be created on the object, so long as one does not already exist.

func (*PhysicsP2BodyDebug) Create4O

func (self *PhysicsP2BodyDebug) Create4O(x int, y int, key interface{}, frame interface{}, exists bool, index int) *DisplayObject

Create4O Creates a new Phaser.Sprite object and adds it to the top of this group.

Use {@link Phaser.Group#classType classType} to change the type of object created.

The child is automatically added to the top of the group, and is displayed above every previous child.

Or if the _optional_ index is specified, the child is added at the location specified by the index value, this allows you to control child ordering.

If `Group.enableBody` is set, then a physics body will be created on the object, so long as one does not already exist.

If `Group.inputEnableChildren` is set, then an Input Handler will be created on the object, so long as one does not already exist.

func (*PhysicsP2BodyDebug) CreateI

func (self *PhysicsP2BodyDebug) CreateI(args ...interface{}) *DisplayObject

CreateI Creates a new Phaser.Sprite object and adds it to the top of this group.

Use {@link Phaser.Group#classType classType} to change the type of object created.

The child is automatically added to the top of the group, and is displayed above every previous child.

Or if the _optional_ index is specified, the child is added at the location specified by the index value, this allows you to control child ordering.

If `Group.enableBody` is set, then a physics body will be created on the object, so long as one does not already exist.

If `Group.inputEnableChildren` is set, then an Input Handler will be created on the object, so long as one does not already exist.

func (*PhysicsP2BodyDebug) CreateMultiple

func (self *PhysicsP2BodyDebug) CreateMultiple(quantity int, key interface{}) []interface{}

CreateMultiple Creates multiple Phaser.Sprite objects and adds them to the top of this Group.

This method is useful if you need to quickly generate a pool of sprites, such as bullets.

Use {@link Phaser.Group#classType classType} to change the type of object created.

You can provide an array as the `key` and / or `frame` arguments. When you do this it will create `quantity` Sprites for every key (and frame) in the arrays.

For example:

`createMultiple(25, ['ball', 'carrot'])`

In the above code there are 2 keys (ball and carrot) which means that 50 sprites will be created in total, 25 of each. You can also have the `frame` as an array:

`createMultiple(5, 'bricks', [0, 1, 2, 3])`

In the above there is one key (bricks), which is a sprite sheet. The frames array tells this method to use frames 0, 1, 2 and 3. So in total it will create 20 sprites, because the quantity was set to 5, so that is 5 brick sprites of frame 0, 5 brick sprites with frame 1, and so on.

If you set both the key and frame arguments to be arrays then understand it will create a total quantity of sprites equal to the size of both arrays times each other. I.e.:

`createMultiple(20, ['diamonds', 'balls'], [0, 1, 2])`

The above will create 20 'diamonds' of frame 0, 20 with frame 1 and 20 with frame 2. It will then create 20 'balls' of frame 0, 20 with frame 1 and 20 with frame 2. In total it will have created 120 sprites.

By default the Sprites will have their `exists` property set to `false`, and they will be positioned at 0x0, relative to the `Group.x / y` values.

If `Group.enableBody` is set, then a physics body will be created on the objects, so long as one does not already exist.

If `Group.inputEnableChildren` is set, then an Input Handler will be created on the objects, so long as one does not already exist.

func (*PhysicsP2BodyDebug) CreateMultiple1O

func (self *PhysicsP2BodyDebug) CreateMultiple1O(quantity int, key interface{}, frame interface{}) []interface{}

CreateMultiple1O Creates multiple Phaser.Sprite objects and adds them to the top of this Group.

This method is useful if you need to quickly generate a pool of sprites, such as bullets.

Use {@link Phaser.Group#classType classType} to change the type of object created.

You can provide an array as the `key` and / or `frame` arguments. When you do this it will create `quantity` Sprites for every key (and frame) in the arrays.

For example:

`createMultiple(25, ['ball', 'carrot'])`

In the above code there are 2 keys (ball and carrot) which means that 50 sprites will be created in total, 25 of each. You can also have the `frame` as an array:

`createMultiple(5, 'bricks', [0, 1, 2, 3])`

In the above there is one key (bricks), which is a sprite sheet. The frames array tells this method to use frames 0, 1, 2 and 3. So in total it will create 20 sprites, because the quantity was set to 5, so that is 5 brick sprites of frame 0, 5 brick sprites with frame 1, and so on.

If you set both the key and frame arguments to be arrays then understand it will create a total quantity of sprites equal to the size of both arrays times each other. I.e.:

`createMultiple(20, ['diamonds', 'balls'], [0, 1, 2])`

The above will create 20 'diamonds' of frame 0, 20 with frame 1 and 20 with frame 2. It will then create 20 'balls' of frame 0, 20 with frame 1 and 20 with frame 2. In total it will have created 120 sprites.

By default the Sprites will have their `exists` property set to `false`, and they will be positioned at 0x0, relative to the `Group.x / y` values.

If `Group.enableBody` is set, then a physics body will be created on the objects, so long as one does not already exist.

If `Group.inputEnableChildren` is set, then an Input Handler will be created on the objects, so long as one does not already exist.

func (*PhysicsP2BodyDebug) CreateMultiple2O

func (self *PhysicsP2BodyDebug) CreateMultiple2O(quantity int, key interface{}, frame interface{}, exists bool) []interface{}

CreateMultiple2O Creates multiple Phaser.Sprite objects and adds them to the top of this Group.

This method is useful if you need to quickly generate a pool of sprites, such as bullets.

Use {@link Phaser.Group#classType classType} to change the type of object created.

You can provide an array as the `key` and / or `frame` arguments. When you do this it will create `quantity` Sprites for every key (and frame) in the arrays.

For example:

`createMultiple(25, ['ball', 'carrot'])`

In the above code there are 2 keys (ball and carrot) which means that 50 sprites will be created in total, 25 of each. You can also have the `frame` as an array:

`createMultiple(5, 'bricks', [0, 1, 2, 3])`

In the above there is one key (bricks), which is a sprite sheet. The frames array tells this method to use frames 0, 1, 2 and 3. So in total it will create 20 sprites, because the quantity was set to 5, so that is 5 brick sprites of frame 0, 5 brick sprites with frame 1, and so on.

If you set both the key and frame arguments to be arrays then understand it will create a total quantity of sprites equal to the size of both arrays times each other. I.e.:

`createMultiple(20, ['diamonds', 'balls'], [0, 1, 2])`

The above will create 20 'diamonds' of frame 0, 20 with frame 1 and 20 with frame 2. It will then create 20 'balls' of frame 0, 20 with frame 1 and 20 with frame 2. In total it will have created 120 sprites.

By default the Sprites will have their `exists` property set to `false`, and they will be positioned at 0x0, relative to the `Group.x / y` values.

If `Group.enableBody` is set, then a physics body will be created on the objects, so long as one does not already exist.

If `Group.inputEnableChildren` is set, then an Input Handler will be created on the objects, so long as one does not already exist.

func (*PhysicsP2BodyDebug) CreateMultipleI

func (self *PhysicsP2BodyDebug) CreateMultipleI(args ...interface{}) []interface{}

CreateMultipleI Creates multiple Phaser.Sprite objects and adds them to the top of this Group.

This method is useful if you need to quickly generate a pool of sprites, such as bullets.

Use {@link Phaser.Group#classType classType} to change the type of object created.

You can provide an array as the `key` and / or `frame` arguments. When you do this it will create `quantity` Sprites for every key (and frame) in the arrays.

For example:

`createMultiple(25, ['ball', 'carrot'])`

In the above code there are 2 keys (ball and carrot) which means that 50 sprites will be created in total, 25 of each. You can also have the `frame` as an array:

`createMultiple(5, 'bricks', [0, 1, 2, 3])`

In the above there is one key (bricks), which is a sprite sheet. The frames array tells this method to use frames 0, 1, 2 and 3. So in total it will create 20 sprites, because the quantity was set to 5, so that is 5 brick sprites of frame 0, 5 brick sprites with frame 1, and so on.

If you set both the key and frame arguments to be arrays then understand it will create a total quantity of sprites equal to the size of both arrays times each other. I.e.:

`createMultiple(20, ['diamonds', 'balls'], [0, 1, 2])`

The above will create 20 'diamonds' of frame 0, 20 with frame 1 and 20 with frame 2. It will then create 20 'balls' of frame 0, 20 with frame 1 and 20 with frame 2. In total it will have created 120 sprites.

By default the Sprites will have their `exists` property set to `false`, and they will be positioned at 0x0, relative to the `Group.x / y` values.

If `Group.enableBody` is set, then a physics body will be created on the objects, so long as one does not already exist.

If `Group.inputEnableChildren` is set, then an Input Handler will be created on the objects, so long as one does not already exist.

func (*PhysicsP2BodyDebug) Cursor

func (self *PhysicsP2BodyDebug) Cursor() *DisplayObject

Cursor The current display object that the group cursor is pointing to, if any. (Can be set manually.)

The cursor is a way to iterate through the children in a Group using {@link Phaser.Group#next next} and {@link Phaser.Group#previous previous}.

func (*PhysicsP2BodyDebug) CursorIndex

func (self *PhysicsP2BodyDebug) CursorIndex() int

CursorIndex The current index of the Group cursor. Advance it with Group.next.

func (*PhysicsP2BodyDebug) CustomSort

func (self *PhysicsP2BodyDebug) CustomSort(sortHandler interface{})

CustomSort Sort the children in the group according to custom sort function.

The `sortHandler` is provided the two parameters: the two children involved in the comparison (a and b). It should return -1 if `a > b`, 1 if `a < b` or 0 if `a === b`.

func (*PhysicsP2BodyDebug) CustomSort1O

func (self *PhysicsP2BodyDebug) CustomSort1O(sortHandler interface{}, context interface{})

CustomSort1O Sort the children in the group according to custom sort function.

The `sortHandler` is provided the two parameters: the two children involved in the comparison (a and b). It should return -1 if `a > b`, 1 if `a < b` or 0 if `a === b`.

func (*PhysicsP2BodyDebug) CustomSortI

func (self *PhysicsP2BodyDebug) CustomSortI(args ...interface{})

CustomSortI Sort the children in the group according to custom sort function.

The `sortHandler` is provided the two parameters: the two children involved in the comparison (a and b). It should return -1 if `a > b`, 1 if `a < b` or 0 if `a === b`.

func (*PhysicsP2BodyDebug) DescendingSortHandler

func (self *PhysicsP2BodyDebug) DescendingSortHandler(a interface{}, b interface{})

DescendingSortHandler An internal helper function for the sort process.

func (*PhysicsP2BodyDebug) DescendingSortHandlerI

func (self *PhysicsP2BodyDebug) DescendingSortHandlerI(args ...interface{})

DescendingSortHandlerI An internal helper function for the sort process.

func (*PhysicsP2BodyDebug) Destroy

func (self *PhysicsP2BodyDebug) Destroy()

Destroy Destroys this group.

Removes all children, then removes this group from its parent and nulls references.

func (*PhysicsP2BodyDebug) Destroy1O

func (self *PhysicsP2BodyDebug) Destroy1O(destroyChildren bool)

Destroy1O Destroys this group.

Removes all children, then removes this group from its parent and nulls references.

func (*PhysicsP2BodyDebug) Destroy2O

func (self *PhysicsP2BodyDebug) Destroy2O(destroyChildren bool, soft bool)

Destroy2O Destroys this group.

Removes all children, then removes this group from its parent and nulls references.

func (*PhysicsP2BodyDebug) DestroyI

func (self *PhysicsP2BodyDebug) DestroyI(args ...interface{})

DestroyI Destroys this group.

Removes all children, then removes this group from its parent and nulls references.

func (*PhysicsP2BodyDebug) DivideAll

func (self *PhysicsP2BodyDebug) DivideAll(property string, amount int, checkAlive bool, checkVisible bool)

DivideAll Divides the given property by the amount on all children in this group.

`Group.divideAll('x', 2)` will half the child.x value for each child.

func (*PhysicsP2BodyDebug) DivideAllI

func (self *PhysicsP2BodyDebug) DivideAllI(args ...interface{})

DivideAllI Divides the given property by the amount on all children in this group.

`Group.divideAll('x', 2)` will half the child.x value for each child.

func (*PhysicsP2BodyDebug) Draw

func (self *PhysicsP2BodyDebug) Draw()

Draw Draws the P2 shapes to the Graphics object.

func (*PhysicsP2BodyDebug) DrawCapsule

func (self *PhysicsP2BodyDebug) DrawCapsule()

DrawCapsule Draws a p2.Capsule to the Graphics object.

func (*PhysicsP2BodyDebug) DrawCapsuleI

func (self *PhysicsP2BodyDebug) DrawCapsuleI(args ...interface{})

DrawCapsuleI Draws a p2.Capsule to the Graphics object.

func (*PhysicsP2BodyDebug) DrawCircle

func (self *PhysicsP2BodyDebug) DrawCircle()

DrawCircle Draws a p2.Circle to the Graphics object.

func (*PhysicsP2BodyDebug) DrawCircleI

func (self *PhysicsP2BodyDebug) DrawCircleI(args ...interface{})

DrawCircleI Draws a p2.Circle to the Graphics object.

func (*PhysicsP2BodyDebug) DrawConvex

func (self *PhysicsP2BodyDebug) DrawConvex()

DrawConvex Draws a p2.Convex to the Graphics object.

func (*PhysicsP2BodyDebug) DrawConvexI

func (self *PhysicsP2BodyDebug) DrawConvexI(args ...interface{})

DrawConvexI Draws a p2.Convex to the Graphics object.

func (*PhysicsP2BodyDebug) DrawI

func (self *PhysicsP2BodyDebug) DrawI(args ...interface{})

DrawI Draws the P2 shapes to the Graphics object.

func (*PhysicsP2BodyDebug) DrawLine

func (self *PhysicsP2BodyDebug) DrawLine()

DrawLine Draws a p2.Line to the Graphics object.

func (*PhysicsP2BodyDebug) DrawLineI

func (self *PhysicsP2BodyDebug) DrawLineI(args ...interface{})

DrawLineI Draws a p2.Line to the Graphics object.

func (*PhysicsP2BodyDebug) DrawPath

func (self *PhysicsP2BodyDebug) DrawPath()

DrawPath Draws a p2.Path to the Graphics object.

func (*PhysicsP2BodyDebug) DrawPathI

func (self *PhysicsP2BodyDebug) DrawPathI(args ...interface{})

DrawPathI Draws a p2.Path to the Graphics object.

func (*PhysicsP2BodyDebug) DrawPlane

func (self *PhysicsP2BodyDebug) DrawPlane()

DrawPlane Draws a p2.Plane to the Graphics object.

func (*PhysicsP2BodyDebug) DrawPlaneI

func (self *PhysicsP2BodyDebug) DrawPlaneI(args ...interface{})

DrawPlaneI Draws a p2.Plane to the Graphics object.

func (*PhysicsP2BodyDebug) DrawRectangle

func (self *PhysicsP2BodyDebug) DrawRectangle()

DrawRectangle Draws a p2.Box to the Graphics object.

func (*PhysicsP2BodyDebug) DrawRectangleI

func (self *PhysicsP2BodyDebug) DrawRectangleI(args ...interface{})

DrawRectangleI Draws a p2.Box to the Graphics object.

func (*PhysicsP2BodyDebug) EnableBody

func (self *PhysicsP2BodyDebug) EnableBody() bool

EnableBody If true all Sprites created by, or added to this group, will have a physics body enabled on them.

If there are children already in the Group at the time you set this property, they are not changed.

The default body type is controlled with {@link Phaser.Group#physicsBodyType physicsBodyType}.

func (*PhysicsP2BodyDebug) EnableBodyDebug

func (self *PhysicsP2BodyDebug) EnableBodyDebug() bool

EnableBodyDebug If true when a physics body is created (via {@link Phaser.Group#enableBody enableBody}) it will create a physics debug object as well.

This only works for P2 bodies.

func (*PhysicsP2BodyDebug) Exists

func (self *PhysicsP2BodyDebug) Exists() bool

Exists If exists is true the group is updated, otherwise it is skipped.

func (*PhysicsP2BodyDebug) Filter

func (self *PhysicsP2BodyDebug) Filter(predicate interface{}) *ArraySet

Filter Find children matching a certain predicate.

For example:

var healthyList = Group.filter(function(child, index, children) {
    return child.health > 10 ? true : false;
}, true);
healthyList.callAll('attack');

Note: Currently this will skip any children which are Groups themselves.

func (*PhysicsP2BodyDebug) Filter1O

func (self *PhysicsP2BodyDebug) Filter1O(predicate interface{}, checkExists bool) *ArraySet

Filter1O Find children matching a certain predicate.

For example:

var healthyList = Group.filter(function(child, index, children) {
    return child.health > 10 ? true : false;
}, true);
healthyList.callAll('attack');

Note: Currently this will skip any children which are Groups themselves.

func (*PhysicsP2BodyDebug) FilterI

func (self *PhysicsP2BodyDebug) FilterI(args ...interface{}) *ArraySet

FilterI Find children matching a certain predicate.

For example:

var healthyList = Group.filter(function(child, index, children) {
    return child.health > 10 ? true : false;
}, true);
healthyList.callAll('attack');

Note: Currently this will skip any children which are Groups themselves.

func (*PhysicsP2BodyDebug) FixedToCamera

func (self *PhysicsP2BodyDebug) FixedToCamera() bool

FixedToCamera A Group that is fixed to the camera uses its x/y coordinates as offsets from the top left of the camera. These are stored in Group.cameraOffset.

Note that the cameraOffset values are in addition to any parent in the display list. So if this Group was in a Group that has x: 200, then this will be added to the cameraOffset.x

func (*PhysicsP2BodyDebug) ForEach

func (self *PhysicsP2BodyDebug) ForEach(callback interface{}, callbackContext interface{})

ForEach Call a function on each child in this group.

Additional arguments for the callback can be specified after the `checkExists` parameter. For example,

Group.forEach(awardBonusGold, this, true, 100, 500)

would invoke `awardBonusGold` function with the parameters `(child, 100, 500)`.

Note: This check will skip any children which are Groups themselves.

func (*PhysicsP2BodyDebug) ForEach1O

func (self *PhysicsP2BodyDebug) ForEach1O(callback interface{}, callbackContext interface{}, checkExists bool)

ForEach1O Call a function on each child in this group.

Additional arguments for the callback can be specified after the `checkExists` parameter. For example,

Group.forEach(awardBonusGold, this, true, 100, 500)

would invoke `awardBonusGold` function with the parameters `(child, 100, 500)`.

Note: This check will skip any children which are Groups themselves.

func (*PhysicsP2BodyDebug) ForEach2O

func (self *PhysicsP2BodyDebug) ForEach2O(callback interface{}, callbackContext interface{}, checkExists bool, args interface{})

ForEach2O Call a function on each child in this group.

Additional arguments for the callback can be specified after the `checkExists` parameter. For example,

Group.forEach(awardBonusGold, this, true, 100, 500)

would invoke `awardBonusGold` function with the parameters `(child, 100, 500)`.

Note: This check will skip any children which are Groups themselves.

func (*PhysicsP2BodyDebug) ForEachAlive

func (self *PhysicsP2BodyDebug) ForEachAlive(callback interface{}, callbackContext interface{})

ForEachAlive Call a function on each alive child in this group.

See {@link Phaser.Group#forEach forEach} for details.

func (*PhysicsP2BodyDebug) ForEachAlive1O

func (self *PhysicsP2BodyDebug) ForEachAlive1O(callback interface{}, callbackContext interface{}, args interface{})

ForEachAlive1O Call a function on each alive child in this group.

See {@link Phaser.Group#forEach forEach} for details.

func (*PhysicsP2BodyDebug) ForEachAliveI

func (self *PhysicsP2BodyDebug) ForEachAliveI(args ...interface{})

ForEachAliveI Call a function on each alive child in this group.

See {@link Phaser.Group#forEach forEach} for details.

func (*PhysicsP2BodyDebug) ForEachDead

func (self *PhysicsP2BodyDebug) ForEachDead(callback interface{}, callbackContext interface{})

ForEachDead Call a function on each dead child in this group.

See {@link Phaser.Group#forEach forEach} for details.

func (*PhysicsP2BodyDebug) ForEachDead1O

func (self *PhysicsP2BodyDebug) ForEachDead1O(callback interface{}, callbackContext interface{}, args interface{})

ForEachDead1O Call a function on each dead child in this group.

See {@link Phaser.Group#forEach forEach} for details.

func (*PhysicsP2BodyDebug) ForEachDeadI

func (self *PhysicsP2BodyDebug) ForEachDeadI(args ...interface{})

ForEachDeadI Call a function on each dead child in this group.

See {@link Phaser.Group#forEach forEach} for details.

func (*PhysicsP2BodyDebug) ForEachExists

func (self *PhysicsP2BodyDebug) ForEachExists(callback interface{}, callbackContext interface{})

ForEachExists Call a function on each existing child in this group.

See {@link Phaser.Group#forEach forEach} for details.

func (*PhysicsP2BodyDebug) ForEachExists1O

func (self *PhysicsP2BodyDebug) ForEachExists1O(callback interface{}, callbackContext interface{}, args interface{})

ForEachExists1O Call a function on each existing child in this group.

See {@link Phaser.Group#forEach forEach} for details.

func (*PhysicsP2BodyDebug) ForEachExistsI

func (self *PhysicsP2BodyDebug) ForEachExistsI(args ...interface{})

ForEachExistsI Call a function on each existing child in this group.

See {@link Phaser.Group#forEach forEach} for details.

func (*PhysicsP2BodyDebug) ForEachI

func (self *PhysicsP2BodyDebug) ForEachI(args ...interface{})

ForEachI Call a function on each child in this group.

Additional arguments for the callback can be specified after the `checkExists` parameter. For example,

Group.forEach(awardBonusGold, this, true, 100, 500)

would invoke `awardBonusGold` function with the parameters `(child, 100, 500)`.

Note: This check will skip any children which are Groups themselves.

func (*PhysicsP2BodyDebug) Game

func (self *PhysicsP2BodyDebug) Game() *Game

Game A reference to the currently running Game.

func (*PhysicsP2BodyDebug) GetAll

func (self *PhysicsP2BodyDebug) GetAll() interface{}

GetAll Returns all children in this Group.

You can optionally specify a matching criteria using the `property` and `value` arguments.

For example: `getAll('exists', true)` would return only children that have their exists property set.

Optionally you can specify a start and end index. For example if this Group had 100 children, and you set `startIndex` to 0 and `endIndex` to 50, it would return a random child from only the first 50 children in the Group.

func (*PhysicsP2BodyDebug) GetAll1O

func (self *PhysicsP2BodyDebug) GetAll1O(property string) interface{}

GetAll1O Returns all children in this Group.

You can optionally specify a matching criteria using the `property` and `value` arguments.

For example: `getAll('exists', true)` would return only children that have their exists property set.

Optionally you can specify a start and end index. For example if this Group had 100 children, and you set `startIndex` to 0 and `endIndex` to 50, it would return a random child from only the first 50 children in the Group.

func (*PhysicsP2BodyDebug) GetAll2O

func (self *PhysicsP2BodyDebug) GetAll2O(property string, value interface{}) interface{}

GetAll2O Returns all children in this Group.

You can optionally specify a matching criteria using the `property` and `value` arguments.

For example: `getAll('exists', true)` would return only children that have their exists property set.

Optionally you can specify a start and end index. For example if this Group had 100 children, and you set `startIndex` to 0 and `endIndex` to 50, it would return a random child from only the first 50 children in the Group.

func (*PhysicsP2BodyDebug) GetAll3O

func (self *PhysicsP2BodyDebug) GetAll3O(property string, value interface{}, startIndex int) interface{}

GetAll3O Returns all children in this Group.

You can optionally specify a matching criteria using the `property` and `value` arguments.

For example: `getAll('exists', true)` would return only children that have their exists property set.

Optionally you can specify a start and end index. For example if this Group had 100 children, and you set `startIndex` to 0 and `endIndex` to 50, it would return a random child from only the first 50 children in the Group.

func (*PhysicsP2BodyDebug) GetAll4O

func (self *PhysicsP2BodyDebug) GetAll4O(property string, value interface{}, startIndex int, endIndex int) interface{}

GetAll4O Returns all children in this Group.

You can optionally specify a matching criteria using the `property` and `value` arguments.

For example: `getAll('exists', true)` would return only children that have their exists property set.

Optionally you can specify a start and end index. For example if this Group had 100 children, and you set `startIndex` to 0 and `endIndex` to 50, it would return a random child from only the first 50 children in the Group.

func (*PhysicsP2BodyDebug) GetAllI

func (self *PhysicsP2BodyDebug) GetAllI(args ...interface{}) interface{}

GetAllI Returns all children in this Group.

You can optionally specify a matching criteria using the `property` and `value` arguments.

For example: `getAll('exists', true)` would return only children that have their exists property set.

Optionally you can specify a start and end index. For example if this Group had 100 children, and you set `startIndex` to 0 and `endIndex` to 50, it would return a random child from only the first 50 children in the Group.

func (*PhysicsP2BodyDebug) GetAt

func (self *PhysicsP2BodyDebug) GetAt(index int) interface{}

GetAt Returns the child found at the given index within this group.

func (*PhysicsP2BodyDebug) GetAtI

func (self *PhysicsP2BodyDebug) GetAtI(args ...interface{}) interface{}

GetAtI Returns the child found at the given index within this group.

func (*PhysicsP2BodyDebug) GetBottom

func (self *PhysicsP2BodyDebug) GetBottom() interface{}

GetBottom Returns the child at the bottom of this group.

The bottom child the child being displayed (rendered) below every other child.

func (*PhysicsP2BodyDebug) GetBottomI

func (self *PhysicsP2BodyDebug) GetBottomI(args ...interface{}) interface{}

GetBottomI Returns the child at the bottom of this group.

The bottom child the child being displayed (rendered) below every other child.

func (*PhysicsP2BodyDebug) GetBounds

func (self *PhysicsP2BodyDebug) GetBounds() *Rectangle

GetBounds Retrieves the global bounds of the displayObjectContainer as a rectangle. The bounds calculation takes all visible children into consideration.

func (*PhysicsP2BodyDebug) GetBounds1O

func (self *PhysicsP2BodyDebug) GetBounds1O(targetCoordinateSpace interface{}) *Rectangle

GetBounds1O Retrieves the global bounds of the displayObjectContainer as a rectangle. The bounds calculation takes all visible children into consideration.

func (*PhysicsP2BodyDebug) GetBoundsI

func (self *PhysicsP2BodyDebug) GetBoundsI(args ...interface{}) *Rectangle

GetBoundsI Retrieves the global bounds of the displayObjectContainer as a rectangle. The bounds calculation takes all visible children into consideration.

func (*PhysicsP2BodyDebug) GetByName

func (self *PhysicsP2BodyDebug) GetByName(name string) interface{}

GetByName Searches the Group for the first instance of a child with the `name` property matching the given argument. Should more than one child have the same name only the first instance is returned.

func (*PhysicsP2BodyDebug) GetByNameI

func (self *PhysicsP2BodyDebug) GetByNameI(args ...interface{}) interface{}

GetByNameI Searches the Group for the first instance of a child with the `name` property matching the given argument. Should more than one child have the same name only the first instance is returned.

func (*PhysicsP2BodyDebug) GetChildAt

func (self *PhysicsP2BodyDebug) GetChildAt(index int) *DisplayObject

GetChildAt Returns the child at the specified index

func (*PhysicsP2BodyDebug) GetChildAtI

func (self *PhysicsP2BodyDebug) GetChildAtI(args ...interface{}) *DisplayObject

GetChildAtI Returns the child at the specified index

func (*PhysicsP2BodyDebug) GetChildIndex

func (self *PhysicsP2BodyDebug) GetChildIndex(child *DisplayObject) int

GetChildIndex Returns the index position of a child DisplayObject instance

func (*PhysicsP2BodyDebug) GetChildIndexI

func (self *PhysicsP2BodyDebug) GetChildIndexI(args ...interface{}) int

GetChildIndexI Returns the index position of a child DisplayObject instance

func (*PhysicsP2BodyDebug) GetClosestTo

func (self *PhysicsP2BodyDebug) GetClosestTo(object interface{}) interface{}

GetClosestTo Get the closest child to given Object, with optional callback to filter children.

This can be a Sprite, Group, Image or any object with public x and y properties.

'close' is determined by the distance from the objects `x` and `y` properties compared to the childs `x` and `y` properties.

You can use the optional `callback` argument to apply your own filter to the distance checks. If the child is closer then the previous child, it will be sent to `callback` as the first argument, with the distance as the second. The callback should return `true` if it passes your filtering criteria, otherwise it should return `false`.

func (*PhysicsP2BodyDebug) GetClosestTo1O

func (self *PhysicsP2BodyDebug) GetClosestTo1O(object interface{}, callback interface{}) interface{}

GetClosestTo1O Get the closest child to given Object, with optional callback to filter children.

This can be a Sprite, Group, Image or any object with public x and y properties.

'close' is determined by the distance from the objects `x` and `y` properties compared to the childs `x` and `y` properties.

You can use the optional `callback` argument to apply your own filter to the distance checks. If the child is closer then the previous child, it will be sent to `callback` as the first argument, with the distance as the second. The callback should return `true` if it passes your filtering criteria, otherwise it should return `false`.

func (*PhysicsP2BodyDebug) GetClosestTo2O

func (self *PhysicsP2BodyDebug) GetClosestTo2O(object interface{}, callback interface{}, callbackContext interface{}) interface{}

GetClosestTo2O Get the closest child to given Object, with optional callback to filter children.

This can be a Sprite, Group, Image or any object with public x and y properties.

'close' is determined by the distance from the objects `x` and `y` properties compared to the childs `x` and `y` properties.

You can use the optional `callback` argument to apply your own filter to the distance checks. If the child is closer then the previous child, it will be sent to `callback` as the first argument, with the distance as the second. The callback should return `true` if it passes your filtering criteria, otherwise it should return `false`.

func (*PhysicsP2BodyDebug) GetClosestToI

func (self *PhysicsP2BodyDebug) GetClosestToI(args ...interface{}) interface{}

GetClosestToI Get the closest child to given Object, with optional callback to filter children.

This can be a Sprite, Group, Image or any object with public x and y properties.

'close' is determined by the distance from the objects `x` and `y` properties compared to the childs `x` and `y` properties.

You can use the optional `callback` argument to apply your own filter to the distance checks. If the child is closer then the previous child, it will be sent to `callback` as the first argument, with the distance as the second. The callback should return `true` if it passes your filtering criteria, otherwise it should return `false`.

func (*PhysicsP2BodyDebug) GetFirstAlive

func (self *PhysicsP2BodyDebug) GetFirstAlive() *DisplayObject

GetFirstAlive Get the first child that is alive (`child.alive === true`).

This is handy for choosing a squad leader, etc.

You can use the optional argument `createIfNull` to create a new Game Object if no alive ones were found in this Group.

It works by calling `Group.create` passing it the parameters given to this method, and returning the new child.

If a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child will be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.

func (*PhysicsP2BodyDebug) GetFirstAlive1O

func (self *PhysicsP2BodyDebug) GetFirstAlive1O(createIfNull bool) *DisplayObject

GetFirstAlive1O Get the first child that is alive (`child.alive === true`).

This is handy for choosing a squad leader, etc.

You can use the optional argument `createIfNull` to create a new Game Object if no alive ones were found in this Group.

It works by calling `Group.create` passing it the parameters given to this method, and returning the new child.

If a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child will be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.

func (*PhysicsP2BodyDebug) GetFirstAlive2O

func (self *PhysicsP2BodyDebug) GetFirstAlive2O(createIfNull bool, x int) *DisplayObject

GetFirstAlive2O Get the first child that is alive (`child.alive === true`).

This is handy for choosing a squad leader, etc.

You can use the optional argument `createIfNull` to create a new Game Object if no alive ones were found in this Group.

It works by calling `Group.create` passing it the parameters given to this method, and returning the new child.

If a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child will be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.

func (*PhysicsP2BodyDebug) GetFirstAlive3O

func (self *PhysicsP2BodyDebug) GetFirstAlive3O(createIfNull bool, x int, y int) *DisplayObject

GetFirstAlive3O Get the first child that is alive (`child.alive === true`).

This is handy for choosing a squad leader, etc.

You can use the optional argument `createIfNull` to create a new Game Object if no alive ones were found in this Group.

It works by calling `Group.create` passing it the parameters given to this method, and returning the new child.

If a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child will be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.

func (*PhysicsP2BodyDebug) GetFirstAlive4O

func (self *PhysicsP2BodyDebug) GetFirstAlive4O(createIfNull bool, x int, y int, key interface{}) *DisplayObject

GetFirstAlive4O Get the first child that is alive (`child.alive === true`).

This is handy for choosing a squad leader, etc.

You can use the optional argument `createIfNull` to create a new Game Object if no alive ones were found in this Group.

It works by calling `Group.create` passing it the parameters given to this method, and returning the new child.

If a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child will be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.

func (*PhysicsP2BodyDebug) GetFirstAlive5O

func (self *PhysicsP2BodyDebug) GetFirstAlive5O(createIfNull bool, x int, y int, key interface{}, frame interface{}) *DisplayObject

GetFirstAlive5O Get the first child that is alive (`child.alive === true`).

This is handy for choosing a squad leader, etc.

You can use the optional argument `createIfNull` to create a new Game Object if no alive ones were found in this Group.

It works by calling `Group.create` passing it the parameters given to this method, and returning the new child.

If a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child will be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.

func (*PhysicsP2BodyDebug) GetFirstAliveI

func (self *PhysicsP2BodyDebug) GetFirstAliveI(args ...interface{}) *DisplayObject

GetFirstAliveI Get the first child that is alive (`child.alive === true`).

This is handy for choosing a squad leader, etc.

You can use the optional argument `createIfNull` to create a new Game Object if no alive ones were found in this Group.

It works by calling `Group.create` passing it the parameters given to this method, and returning the new child.

If a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child will be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.

func (*PhysicsP2BodyDebug) GetFirstDead

func (self *PhysicsP2BodyDebug) GetFirstDead() *DisplayObject

GetFirstDead Get the first child that is dead (`child.alive === false`).

This is handy for checking if everything has been wiped out and adding to the pool as needed.

You can use the optional argument `createIfNull` to create a new Game Object if no dead ones were found in this Group.

It works by calling `Group.create` passing it the parameters given to this method, and returning the new child.

If a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child will be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.

func (*PhysicsP2BodyDebug) GetFirstDead1O

func (self *PhysicsP2BodyDebug) GetFirstDead1O(createIfNull bool) *DisplayObject

GetFirstDead1O Get the first child that is dead (`child.alive === false`).

This is handy for checking if everything has been wiped out and adding to the pool as needed.

You can use the optional argument `createIfNull` to create a new Game Object if no dead ones were found in this Group.

It works by calling `Group.create` passing it the parameters given to this method, and returning the new child.

If a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child will be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.

func (*PhysicsP2BodyDebug) GetFirstDead2O

func (self *PhysicsP2BodyDebug) GetFirstDead2O(createIfNull bool, x int) *DisplayObject

GetFirstDead2O Get the first child that is dead (`child.alive === false`).

This is handy for checking if everything has been wiped out and adding to the pool as needed.

You can use the optional argument `createIfNull` to create a new Game Object if no dead ones were found in this Group.

It works by calling `Group.create` passing it the parameters given to this method, and returning the new child.

If a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child will be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.

func (*PhysicsP2BodyDebug) GetFirstDead3O

func (self *PhysicsP2BodyDebug) GetFirstDead3O(createIfNull bool, x int, y int) *DisplayObject

GetFirstDead3O Get the first child that is dead (`child.alive === false`).

This is handy for checking if everything has been wiped out and adding to the pool as needed.

You can use the optional argument `createIfNull` to create a new Game Object if no dead ones were found in this Group.

It works by calling `Group.create` passing it the parameters given to this method, and returning the new child.

If a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child will be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.

func (*PhysicsP2BodyDebug) GetFirstDead4O

func (self *PhysicsP2BodyDebug) GetFirstDead4O(createIfNull bool, x int, y int, key interface{}) *DisplayObject

GetFirstDead4O Get the first child that is dead (`child.alive === false`).

This is handy for checking if everything has been wiped out and adding to the pool as needed.

You can use the optional argument `createIfNull` to create a new Game Object if no dead ones were found in this Group.

It works by calling `Group.create` passing it the parameters given to this method, and returning the new child.

If a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child will be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.

func (*PhysicsP2BodyDebug) GetFirstDead5O

func (self *PhysicsP2BodyDebug) GetFirstDead5O(createIfNull bool, x int, y int, key interface{}, frame interface{}) *DisplayObject

GetFirstDead5O Get the first child that is dead (`child.alive === false`).

This is handy for checking if everything has been wiped out and adding to the pool as needed.

You can use the optional argument `createIfNull` to create a new Game Object if no dead ones were found in this Group.

It works by calling `Group.create` passing it the parameters given to this method, and returning the new child.

If a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child will be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.

func (*PhysicsP2BodyDebug) GetFirstDeadI

func (self *PhysicsP2BodyDebug) GetFirstDeadI(args ...interface{}) *DisplayObject

GetFirstDeadI Get the first child that is dead (`child.alive === false`).

This is handy for checking if everything has been wiped out and adding to the pool as needed.

You can use the optional argument `createIfNull` to create a new Game Object if no dead ones were found in this Group.

It works by calling `Group.create` passing it the parameters given to this method, and returning the new child.

If a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child will be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.

func (*PhysicsP2BodyDebug) GetFirstExists

func (self *PhysicsP2BodyDebug) GetFirstExists() *DisplayObject

GetFirstExists Get the first display object that exists, or doesn't exist.

You can use the optional argument `createIfNull` to create a new Game Object if none matching your exists argument were found in this Group.

It works by calling `Group.create` passing it the parameters given to this method, and returning the new child.

If a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child will be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.

func (*PhysicsP2BodyDebug) GetFirstExists1O

func (self *PhysicsP2BodyDebug) GetFirstExists1O(exists bool) *DisplayObject

GetFirstExists1O Get the first display object that exists, or doesn't exist.

You can use the optional argument `createIfNull` to create a new Game Object if none matching your exists argument were found in this Group.

It works by calling `Group.create` passing it the parameters given to this method, and returning the new child.

If a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child will be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.

func (*PhysicsP2BodyDebug) GetFirstExists2O

func (self *PhysicsP2BodyDebug) GetFirstExists2O(exists bool, createIfNull bool) *DisplayObject

GetFirstExists2O Get the first display object that exists, or doesn't exist.

You can use the optional argument `createIfNull` to create a new Game Object if none matching your exists argument were found in this Group.

It works by calling `Group.create` passing it the parameters given to this method, and returning the new child.

If a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child will be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.

func (*PhysicsP2BodyDebug) GetFirstExists3O

func (self *PhysicsP2BodyDebug) GetFirstExists3O(exists bool, createIfNull bool, x int) *DisplayObject

GetFirstExists3O Get the first display object that exists, or doesn't exist.

You can use the optional argument `createIfNull` to create a new Game Object if none matching your exists argument were found in this Group.

It works by calling `Group.create` passing it the parameters given to this method, and returning the new child.

If a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child will be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.

func (*PhysicsP2BodyDebug) GetFirstExists4O

func (self *PhysicsP2BodyDebug) GetFirstExists4O(exists bool, createIfNull bool, x int, y int) *DisplayObject

GetFirstExists4O Get the first display object that exists, or doesn't exist.

You can use the optional argument `createIfNull` to create a new Game Object if none matching your exists argument were found in this Group.

It works by calling `Group.create` passing it the parameters given to this method, and returning the new child.

If a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child will be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.

func (*PhysicsP2BodyDebug) GetFirstExists5O

func (self *PhysicsP2BodyDebug) GetFirstExists5O(exists bool, createIfNull bool, x int, y int, key interface{}) *DisplayObject

GetFirstExists5O Get the first display object that exists, or doesn't exist.

You can use the optional argument `createIfNull` to create a new Game Object if none matching your exists argument were found in this Group.

It works by calling `Group.create` passing it the parameters given to this method, and returning the new child.

If a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child will be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.

func (*PhysicsP2BodyDebug) GetFirstExists6O

func (self *PhysicsP2BodyDebug) GetFirstExists6O(exists bool, createIfNull bool, x int, y int, key interface{}, frame interface{}) *DisplayObject

GetFirstExists6O Get the first display object that exists, or doesn't exist.

You can use the optional argument `createIfNull` to create a new Game Object if none matching your exists argument were found in this Group.

It works by calling `Group.create` passing it the parameters given to this method, and returning the new child.

If a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child will be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.

func (*PhysicsP2BodyDebug) GetFirstExistsI

func (self *PhysicsP2BodyDebug) GetFirstExistsI(args ...interface{}) *DisplayObject

GetFirstExistsI Get the first display object that exists, or doesn't exist.

You can use the optional argument `createIfNull` to create a new Game Object if none matching your exists argument were found in this Group.

It works by calling `Group.create` passing it the parameters given to this method, and returning the new child.

If a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child will be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.

func (*PhysicsP2BodyDebug) GetFurthestFrom

func (self *PhysicsP2BodyDebug) GetFurthestFrom(object interface{}) interface{}

GetFurthestFrom Get the child furthest away from the given Object, with optional callback to filter children.

This can be a Sprite, Group, Image or any object with public x and y properties.

'furthest away' is determined by the distance from the objects `x` and `y` properties compared to the childs `x` and `y` properties.

You can use the optional `callback` argument to apply your own filter to the distance checks. If the child is closer then the previous child, it will be sent to `callback` as the first argument, with the distance as the second. The callback should return `true` if it passes your filtering criteria, otherwise it should return `false`.

func (*PhysicsP2BodyDebug) GetFurthestFrom1O

func (self *PhysicsP2BodyDebug) GetFurthestFrom1O(object interface{}, callback interface{}) interface{}

GetFurthestFrom1O Get the child furthest away from the given Object, with optional callback to filter children.

This can be a Sprite, Group, Image or any object with public x and y properties.

'furthest away' is determined by the distance from the objects `x` and `y` properties compared to the childs `x` and `y` properties.

You can use the optional `callback` argument to apply your own filter to the distance checks. If the child is closer then the previous child, it will be sent to `callback` as the first argument, with the distance as the second. The callback should return `true` if it passes your filtering criteria, otherwise it should return `false`.

func (*PhysicsP2BodyDebug) GetFurthestFrom2O

func (self *PhysicsP2BodyDebug) GetFurthestFrom2O(object interface{}, callback interface{}, callbackContext interface{}) interface{}

GetFurthestFrom2O Get the child furthest away from the given Object, with optional callback to filter children.

This can be a Sprite, Group, Image or any object with public x and y properties.

'furthest away' is determined by the distance from the objects `x` and `y` properties compared to the childs `x` and `y` properties.

You can use the optional `callback` argument to apply your own filter to the distance checks. If the child is closer then the previous child, it will be sent to `callback` as the first argument, with the distance as the second. The callback should return `true` if it passes your filtering criteria, otherwise it should return `false`.

func (*PhysicsP2BodyDebug) GetFurthestFromI

func (self *PhysicsP2BodyDebug) GetFurthestFromI(args ...interface{}) interface{}

GetFurthestFromI Get the child furthest away from the given Object, with optional callback to filter children.

This can be a Sprite, Group, Image or any object with public x and y properties.

'furthest away' is determined by the distance from the objects `x` and `y` properties compared to the childs `x` and `y` properties.

You can use the optional `callback` argument to apply your own filter to the distance checks. If the child is closer then the previous child, it will be sent to `callback` as the first argument, with the distance as the second. The callback should return `true` if it passes your filtering criteria, otherwise it should return `false`.

func (*PhysicsP2BodyDebug) GetIndex

func (self *PhysicsP2BodyDebug) GetIndex(child interface{}) int

GetIndex Get the index position of the given child in this group, which should match the child's `z` property.

func (*PhysicsP2BodyDebug) GetIndexI

func (self *PhysicsP2BodyDebug) GetIndexI(args ...interface{}) int

GetIndexI Get the index position of the given child in this group, which should match the child's `z` property.

func (*PhysicsP2BodyDebug) GetLocalBounds

func (self *PhysicsP2BodyDebug) GetLocalBounds() *Rectangle

GetLocalBounds Retrieves the non-global local bounds of the displayObjectContainer as a rectangle without any transformations. The calculation takes all visible children into consideration.

func (*PhysicsP2BodyDebug) GetLocalBoundsI

func (self *PhysicsP2BodyDebug) GetLocalBoundsI(args ...interface{}) *Rectangle

GetLocalBoundsI Retrieves the non-global local bounds of the displayObjectContainer as a rectangle without any transformations. The calculation takes all visible children into consideration.

func (*PhysicsP2BodyDebug) GetRandom

func (self *PhysicsP2BodyDebug) GetRandom() interface{}

GetRandom Returns a random child from the group.

func (*PhysicsP2BodyDebug) GetRandom1O

func (self *PhysicsP2BodyDebug) GetRandom1O(startIndex int) interface{}

GetRandom1O Returns a random child from the group.

func (*PhysicsP2BodyDebug) GetRandom2O

func (self *PhysicsP2BodyDebug) GetRandom2O(startIndex int, length int) interface{}

GetRandom2O Returns a random child from the group.

func (*PhysicsP2BodyDebug) GetRandomExists

func (self *PhysicsP2BodyDebug) GetRandomExists() interface{}

GetRandomExists Returns a random child from the Group that has `exists` set to `true`.

Optionally you can specify a start and end index. For example if this Group had 100 children, and you set `startIndex` to 0 and `endIndex` to 50, it would return a random child from only the first 50 children in the Group.

func (*PhysicsP2BodyDebug) GetRandomExists1O

func (self *PhysicsP2BodyDebug) GetRandomExists1O(startIndex int) interface{}

GetRandomExists1O Returns a random child from the Group that has `exists` set to `true`.

Optionally you can specify a start and end index. For example if this Group had 100 children, and you set `startIndex` to 0 and `endIndex` to 50, it would return a random child from only the first 50 children in the Group.

func (*PhysicsP2BodyDebug) GetRandomExists2O

func (self *PhysicsP2BodyDebug) GetRandomExists2O(startIndex int, endIndex int) interface{}

GetRandomExists2O Returns a random child from the Group that has `exists` set to `true`.

Optionally you can specify a start and end index. For example if this Group had 100 children, and you set `startIndex` to 0 and `endIndex` to 50, it would return a random child from only the first 50 children in the Group.

func (*PhysicsP2BodyDebug) GetRandomExistsI

func (self *PhysicsP2BodyDebug) GetRandomExistsI(args ...interface{}) interface{}

GetRandomExistsI Returns a random child from the Group that has `exists` set to `true`.

Optionally you can specify a start and end index. For example if this Group had 100 children, and you set `startIndex` to 0 and `endIndex` to 50, it would return a random child from only the first 50 children in the Group.

func (*PhysicsP2BodyDebug) GetRandomI

func (self *PhysicsP2BodyDebug) GetRandomI(args ...interface{}) interface{}

GetRandomI Returns a random child from the group.

func (*PhysicsP2BodyDebug) GetTop

func (self *PhysicsP2BodyDebug) GetTop() interface{}

GetTop Return the child at the top of this group.

The top child is the child displayed (rendered) above every other child.

func (*PhysicsP2BodyDebug) GetTopI

func (self *PhysicsP2BodyDebug) GetTopI(args ...interface{}) interface{}

GetTopI Return the child at the top of this group.

The top child is the child displayed (rendered) above every other child.

func (*PhysicsP2BodyDebug) HasProperty

func (self *PhysicsP2BodyDebug) HasProperty(child interface{}, key []string) bool

HasProperty Checks if the child has the given property.

Will scan up to 4 levels deep only.

func (*PhysicsP2BodyDebug) HasPropertyI

func (self *PhysicsP2BodyDebug) HasPropertyI(args ...interface{}) bool

HasPropertyI Checks if the child has the given property.

Will scan up to 4 levels deep only.

func (*PhysicsP2BodyDebug) Hash

func (self *PhysicsP2BodyDebug) Hash() []interface{}

Hash The hash array is an array belonging to this Group into which you can add any of its children via Group.addToHash and Group.removeFromHash.

Only children of this Group can be added to and removed from the hash.

This hash is used automatically by Phaser Arcade Physics in order to perform non z-index based destructive sorting. However if you don't use Arcade Physics, or this isn't a physics enabled Group, then you can use the hash to perform your own sorting and filtering of Group children without touching their z-index (and therefore display draw order)

func (*PhysicsP2BodyDebug) Height

func (self *PhysicsP2BodyDebug) Height() int

Height The height of the displayObjectContainer, setting this will actually modify the scale to achieve the value set

func (*PhysicsP2BodyDebug) IgnoreChildInput

func (self *PhysicsP2BodyDebug) IgnoreChildInput() bool

IgnoreChildInput If `ignoreChildInput` is `false` it will allow this objects _children_ to be considered as valid for Input events.

If this property is `true` then the children will _not_ be considered as valid for Input events.

Note that this property isn't recursive: only immediate children are influenced, it doesn't scan further down.

func (*PhysicsP2BodyDebug) IgnoreDestroy

func (self *PhysicsP2BodyDebug) IgnoreDestroy() bool

IgnoreDestroy A group with `ignoreDestroy` set to `true` ignores all calls to its `destroy` method.

func (*PhysicsP2BodyDebug) InputEnableChildren

func (self *PhysicsP2BodyDebug) InputEnableChildren() bool

InputEnableChildren A Group with `inputEnableChildren` set to `true` will automatically call `inputEnabled = true` on any children _added_ to, or _created by_, this Group.

If there are children already in the Group at the time you set this property, they are not changed.

func (*PhysicsP2BodyDebug) Iterate

func (self *PhysicsP2BodyDebug) Iterate(key string, value interface{}, returnType int) interface{}

Iterate Iterates over the children of the group performing one of several actions for matched children.

A child is considered a match when it has a property, named `key`, whose value is equal to `value` according to a strict equality comparison.

The result depends on the `returnType`:

  • {@link Phaser.Group.RETURN_TOTAL RETURN_TOTAL}: The callback, if any, is applied to all matching children. The number of matched children is returned.
  • {@link Phaser.Group.RETURN_NONE RETURN_NONE}: The callback, if any, is applied to all matching children. No value is returned.
  • {@link Phaser.Group.RETURN_CHILD RETURN_CHILD}: The callback, if any, is applied to the *first* matching child and the *first* matched child is returned. If there is no matching child then null is returned.

If `args` is specified it must be an array. The matched child will be assigned to the first element and the entire array will be applied to the callback function.

func (*PhysicsP2BodyDebug) Iterate1O

func (self *PhysicsP2BodyDebug) Iterate1O(key string, value interface{}, returnType int, callback interface{}) interface{}

Iterate1O Iterates over the children of the group performing one of several actions for matched children.

A child is considered a match when it has a property, named `key`, whose value is equal to `value` according to a strict equality comparison.

The result depends on the `returnType`:

  • {@link Phaser.Group.RETURN_TOTAL RETURN_TOTAL}: The callback, if any, is applied to all matching children. The number of matched children is returned.
  • {@link Phaser.Group.RETURN_NONE RETURN_NONE}: The callback, if any, is applied to all matching children. No value is returned.
  • {@link Phaser.Group.RETURN_CHILD RETURN_CHILD}: The callback, if any, is applied to the *first* matching child and the *first* matched child is returned. If there is no matching child then null is returned.

If `args` is specified it must be an array. The matched child will be assigned to the first element and the entire array will be applied to the callback function.

func (*PhysicsP2BodyDebug) Iterate2O

func (self *PhysicsP2BodyDebug) Iterate2O(key string, value interface{}, returnType int, callback interface{}, callbackContext interface{}) interface{}

Iterate2O Iterates over the children of the group performing one of several actions for matched children.

A child is considered a match when it has a property, named `key`, whose value is equal to `value` according to a strict equality comparison.

The result depends on the `returnType`:

  • {@link Phaser.Group.RETURN_TOTAL RETURN_TOTAL}: The callback, if any, is applied to all matching children. The number of matched children is returned.
  • {@link Phaser.Group.RETURN_NONE RETURN_NONE}: The callback, if any, is applied to all matching children. No value is returned.
  • {@link Phaser.Group.RETURN_CHILD RETURN_CHILD}: The callback, if any, is applied to the *first* matching child and the *first* matched child is returned. If there is no matching child then null is returned.

If `args` is specified it must be an array. The matched child will be assigned to the first element and the entire array will be applied to the callback function.

func (*PhysicsP2BodyDebug) Iterate3O

func (self *PhysicsP2BodyDebug) Iterate3O(key string, value interface{}, returnType int, callback interface{}, callbackContext interface{}, args []interface{}) interface{}

Iterate3O Iterates over the children of the group performing one of several actions for matched children.

A child is considered a match when it has a property, named `key`, whose value is equal to `value` according to a strict equality comparison.

The result depends on the `returnType`:

  • {@link Phaser.Group.RETURN_TOTAL RETURN_TOTAL}: The callback, if any, is applied to all matching children. The number of matched children is returned.
  • {@link Phaser.Group.RETURN_NONE RETURN_NONE}: The callback, if any, is applied to all matching children. No value is returned.
  • {@link Phaser.Group.RETURN_CHILD RETURN_CHILD}: The callback, if any, is applied to the *first* matching child and the *first* matched child is returned. If there is no matching child then null is returned.

If `args` is specified it must be an array. The matched child will be assigned to the first element and the entire array will be applied to the callback function.

func (*PhysicsP2BodyDebug) IterateI

func (self *PhysicsP2BodyDebug) IterateI(args ...interface{}) interface{}

IterateI Iterates over the children of the group performing one of several actions for matched children.

A child is considered a match when it has a property, named `key`, whose value is equal to `value` according to a strict equality comparison.

The result depends on the `returnType`:

  • {@link Phaser.Group.RETURN_TOTAL RETURN_TOTAL}: The callback, if any, is applied to all matching children. The number of matched children is returned.
  • {@link Phaser.Group.RETURN_NONE RETURN_NONE}: The callback, if any, is applied to all matching children. No value is returned.
  • {@link Phaser.Group.RETURN_CHILD RETURN_CHILD}: The callback, if any, is applied to the *first* matching child and the *first* matched child is returned. If there is no matching child then null is returned.

If `args` is specified it must be an array. The matched child will be assigned to the first element and the entire array will be applied to the callback function.

func (*PhysicsP2BodyDebug) Left

func (self *PhysicsP2BodyDebug) Left() int

Left The left coordinate of this Group.

It is derived by calling `getBounds`, calculating the Groups dimensions based on its visible children.

func (*PhysicsP2BodyDebug) Length

func (self *PhysicsP2BodyDebug) Length() int

Length Total number of children in this group, regardless of exists/alive status.

func (*PhysicsP2BodyDebug) MoveAll

func (self *PhysicsP2BodyDebug) MoveAll(group *Group) *Group

MoveAll Moves all children from this Group to the Group given.

func (*PhysicsP2BodyDebug) MoveAll1O

func (self *PhysicsP2BodyDebug) MoveAll1O(group *Group, silent bool) *Group

MoveAll1O Moves all children from this Group to the Group given.

func (*PhysicsP2BodyDebug) MoveAllI

func (self *PhysicsP2BodyDebug) MoveAllI(args ...interface{}) *Group

MoveAllI Moves all children from this Group to the Group given.

func (*PhysicsP2BodyDebug) MoveDown

func (self *PhysicsP2BodyDebug) MoveDown(child interface{}) interface{}

MoveDown Moves the given child down one place in this group unless it's already at the bottom.

func (*PhysicsP2BodyDebug) MoveDownI

func (self *PhysicsP2BodyDebug) MoveDownI(args ...interface{}) interface{}

MoveDownI Moves the given child down one place in this group unless it's already at the bottom.

func (*PhysicsP2BodyDebug) MoveUp

func (self *PhysicsP2BodyDebug) MoveUp(child interface{}) interface{}

MoveUp Moves the given child up one place in this group unless it's already at the top.

func (*PhysicsP2BodyDebug) MoveUpI

func (self *PhysicsP2BodyDebug) MoveUpI(args ...interface{}) interface{}

MoveUpI Moves the given child up one place in this group unless it's already at the top.

func (*PhysicsP2BodyDebug) MultiplyAll

func (self *PhysicsP2BodyDebug) MultiplyAll(property string, amount int, checkAlive bool, checkVisible bool)

MultiplyAll Multiplies the given property by the amount on all children in this group.

`Group.multiplyAll('x', 2)` will x2 the child.x value for each child.

func (*PhysicsP2BodyDebug) MultiplyAllI

func (self *PhysicsP2BodyDebug) MultiplyAllI(args ...interface{})

MultiplyAllI Multiplies the given property by the amount on all children in this group.

`Group.multiplyAll('x', 2)` will x2 the child.x value for each child.

func (*PhysicsP2BodyDebug) Name

func (self *PhysicsP2BodyDebug) Name() string

Name A name for this group. Not used internally but useful for debugging.

func (*PhysicsP2BodyDebug) Next

func (self *PhysicsP2BodyDebug) Next() interface{}

Next Advances the group cursor to the next (higher) object in the group.

If the cursor is at the end of the group (top child) it is moved the start of the group (bottom child).

func (*PhysicsP2BodyDebug) NextI

func (self *PhysicsP2BodyDebug) NextI(args ...interface{}) interface{}

NextI Advances the group cursor to the next (higher) object in the group.

If the cursor is at the end of the group (top child) it is moved the start of the group (bottom child).

func (*PhysicsP2BodyDebug) OnChildInputDown

func (self *PhysicsP2BodyDebug) OnChildInputDown() *Signal

OnChildInputDown This Signal is dispatched whenever a child of this Group emits an onInputDown signal as a result of having been interacted with by a Pointer. You can bind functions to this Signal instead of to every child Sprite.

This Signal is sent 2 arguments: A reference to the Sprite that triggered the signal, and a reference to the Pointer that caused it.

func (*PhysicsP2BodyDebug) OnChildInputOut

func (self *PhysicsP2BodyDebug) OnChildInputOut() *Signal

OnChildInputOut This Signal is dispatched whenever a child of this Group emits an onInputOut signal as a result of having been interacted with by a Pointer. You can bind functions to this Signal instead of to every child Sprite.

This Signal is sent 2 arguments: A reference to the Sprite that triggered the signal, and a reference to the Pointer that caused it.

func (*PhysicsP2BodyDebug) OnChildInputOver

func (self *PhysicsP2BodyDebug) OnChildInputOver() *Signal

OnChildInputOver This Signal is dispatched whenever a child of this Group emits an onInputOver signal as a result of having been interacted with by a Pointer. You can bind functions to this Signal instead of to every child Sprite.

This Signal is sent 2 arguments: A reference to the Sprite that triggered the signal, and a reference to the Pointer that caused it.

func (*PhysicsP2BodyDebug) OnChildInputUp

func (self *PhysicsP2BodyDebug) OnChildInputUp() *Signal

OnChildInputUp This Signal is dispatched whenever a child of this Group emits an onInputUp signal as a result of having been interacted with by a Pointer. You can bind functions to this Signal instead of to every child Sprite.

This Signal is sent 3 arguments: A reference to the Sprite that triggered the signal, a reference to the Pointer that caused it, and a boolean value `isOver` that tells you if the Pointer is still over the Sprite or not.

func (*PhysicsP2BodyDebug) OnDestroy

func (self *PhysicsP2BodyDebug) OnDestroy() *Signal

OnDestroy This signal is dispatched when the group is destroyed.

func (*PhysicsP2BodyDebug) PendingDestroy

func (self *PhysicsP2BodyDebug) PendingDestroy() bool

PendingDestroy A Group is that has `pendingDestroy` set to `true` is flagged to have its destroy method called on the next logic update. You can set it directly to flag the Group to be destroyed on its next update.

This is extremely useful if you wish to destroy a Group from within one of its own callbacks or a callback of one of its children.

func (*PhysicsP2BodyDebug) PhysicsBodyType

func (self *PhysicsP2BodyDebug) PhysicsBodyType() int

PhysicsBodyType If {@link Phaser.Group#enableBody enableBody} is true this is the type of physics body that is created on new Sprites.

The valid values are {@link Phaser.Physics.ARCADE}, {@link Phaser.Physics.P2JS}, {@link Phaser.Physics.NINJA}, etc.

func (*PhysicsP2BodyDebug) PhysicsSortDirection

func (self *PhysicsP2BodyDebug) PhysicsSortDirection() int

PhysicsSortDirection If this Group contains Arcade Physics Sprites you can set a custom sort direction via this property.

It should be set to one of the Phaser.Physics.Arcade sort direction constants:

Phaser.Physics.Arcade.SORT_NONE Phaser.Physics.Arcade.LEFT_RIGHT Phaser.Physics.Arcade.RIGHT_LEFT Phaser.Physics.Arcade.TOP_BOTTOM Phaser.Physics.Arcade.BOTTOM_TOP

If set to `null` the Group will use whatever Phaser.Physics.Arcade.sortDirection is set to. This is the default behavior.

func (*PhysicsP2BodyDebug) PhysicsType

func (self *PhysicsP2BodyDebug) PhysicsType() int

PhysicsType The const physics body type of this object.

func (*PhysicsP2BodyDebug) PostUpdate

func (self *PhysicsP2BodyDebug) PostUpdate()

PostUpdate The core postUpdate - as called by World.

func (*PhysicsP2BodyDebug) PostUpdateI

func (self *PhysicsP2BodyDebug) PostUpdateI(args ...interface{})

PostUpdateI The core postUpdate - as called by World.

func (*PhysicsP2BodyDebug) Ppu

func (self *PhysicsP2BodyDebug) Ppu() int

Ppu Pixels per Length Unit.

func (*PhysicsP2BodyDebug) PreUpdate

func (self *PhysicsP2BodyDebug) PreUpdate()

PreUpdate The core preUpdate - as called by World.

func (*PhysicsP2BodyDebug) PreUpdateI

func (self *PhysicsP2BodyDebug) PreUpdateI(args ...interface{})

PreUpdateI The core preUpdate - as called by World.

func (*PhysicsP2BodyDebug) Previous

func (self *PhysicsP2BodyDebug) Previous() interface{}

Previous Moves the group cursor to the previous (lower) child in the group.

If the cursor is at the start of the group (bottom child) it is moved to the end (top child).

func (*PhysicsP2BodyDebug) PreviousI

func (self *PhysicsP2BodyDebug) PreviousI(args ...interface{}) interface{}

PreviousI Moves the group cursor to the previous (lower) child in the group.

If the cursor is at the start of the group (bottom child) it is moved to the end (top child).

func (*PhysicsP2BodyDebug) RandomPastelHex

func (self *PhysicsP2BodyDebug) RandomPastelHex()

RandomPastelHex Picks a random pastel color.

func (*PhysicsP2BodyDebug) RandomPastelHexI

func (self *PhysicsP2BodyDebug) RandomPastelHexI(args ...interface{})

RandomPastelHexI Picks a random pastel color.

func (*PhysicsP2BodyDebug) Remove

func (self *PhysicsP2BodyDebug) Remove(child interface{}) bool

Remove Removes the given child from this group.

This will dispatch an `onRemovedFromGroup` event from the child (if it has one), and optionally destroy the child.

If the group cursor was referring to the removed child it is updated to refer to the next child.

func (*PhysicsP2BodyDebug) Remove1O

func (self *PhysicsP2BodyDebug) Remove1O(child interface{}, destroy bool) bool

Remove1O Removes the given child from this group.

This will dispatch an `onRemovedFromGroup` event from the child (if it has one), and optionally destroy the child.

If the group cursor was referring to the removed child it is updated to refer to the next child.

func (*PhysicsP2BodyDebug) Remove2O

func (self *PhysicsP2BodyDebug) Remove2O(child interface{}, destroy bool, silent bool) bool

Remove2O Removes the given child from this group.

This will dispatch an `onRemovedFromGroup` event from the child (if it has one), and optionally destroy the child.

If the group cursor was referring to the removed child it is updated to refer to the next child.

func (*PhysicsP2BodyDebug) RemoveAll

func (self *PhysicsP2BodyDebug) RemoveAll()

RemoveAll Removes all children from this Group, but does not remove the group from its parent.

The children can be optionally destroyed as they are removed.

You can also optionally also destroy the BaseTexture the Child is using. Be careful if you've more than one Game Object sharing the same BaseTexture.

func (*PhysicsP2BodyDebug) RemoveAll1O

func (self *PhysicsP2BodyDebug) RemoveAll1O(destroy bool)

RemoveAll1O Removes all children from this Group, but does not remove the group from its parent.

The children can be optionally destroyed as they are removed.

You can also optionally also destroy the BaseTexture the Child is using. Be careful if you've more than one Game Object sharing the same BaseTexture.

func (*PhysicsP2BodyDebug) RemoveAll2O

func (self *PhysicsP2BodyDebug) RemoveAll2O(destroy bool, silent bool)

RemoveAll2O Removes all children from this Group, but does not remove the group from its parent.

The children can be optionally destroyed as they are removed.

You can also optionally also destroy the BaseTexture the Child is using. Be careful if you've more than one Game Object sharing the same BaseTexture.

func (*PhysicsP2BodyDebug) RemoveAll3O

func (self *PhysicsP2BodyDebug) RemoveAll3O(destroy bool, silent bool, destroyTexture bool)

RemoveAll3O Removes all children from this Group, but does not remove the group from its parent.

The children can be optionally destroyed as they are removed.

You can also optionally also destroy the BaseTexture the Child is using. Be careful if you've more than one Game Object sharing the same BaseTexture.

func (*PhysicsP2BodyDebug) RemoveAllI

func (self *PhysicsP2BodyDebug) RemoveAllI(args ...interface{})

RemoveAllI Removes all children from this Group, but does not remove the group from its parent.

The children can be optionally destroyed as they are removed.

You can also optionally also destroy the BaseTexture the Child is using. Be careful if you've more than one Game Object sharing the same BaseTexture.

func (*PhysicsP2BodyDebug) RemoveBetween

func (self *PhysicsP2BodyDebug) RemoveBetween(startIndex int)

RemoveBetween Removes all children from this group whose index falls beteen the given startIndex and endIndex values.

func (*PhysicsP2BodyDebug) RemoveBetween1O

func (self *PhysicsP2BodyDebug) RemoveBetween1O(startIndex int, endIndex int)

RemoveBetween1O Removes all children from this group whose index falls beteen the given startIndex and endIndex values.

func (*PhysicsP2BodyDebug) RemoveBetween2O

func (self *PhysicsP2BodyDebug) RemoveBetween2O(startIndex int, endIndex int, destroy bool)

RemoveBetween2O Removes all children from this group whose index falls beteen the given startIndex and endIndex values.

func (*PhysicsP2BodyDebug) RemoveBetween3O

func (self *PhysicsP2BodyDebug) RemoveBetween3O(startIndex int, endIndex int, destroy bool, silent bool)

RemoveBetween3O Removes all children from this group whose index falls beteen the given startIndex and endIndex values.

func (*PhysicsP2BodyDebug) RemoveBetweenI

func (self *PhysicsP2BodyDebug) RemoveBetweenI(args ...interface{})

RemoveBetweenI Removes all children from this group whose index falls beteen the given startIndex and endIndex values.

func (*PhysicsP2BodyDebug) RemoveChild

func (self *PhysicsP2BodyDebug) RemoveChild(child *DisplayObject) *DisplayObject

RemoveChild Removes a child from the container.

func (*PhysicsP2BodyDebug) RemoveChildAt

func (self *PhysicsP2BodyDebug) RemoveChildAt(index int) *DisplayObject

RemoveChildAt Removes a child from the specified index position.

func (*PhysicsP2BodyDebug) RemoveChildAtI

func (self *PhysicsP2BodyDebug) RemoveChildAtI(args ...interface{}) *DisplayObject

RemoveChildAtI Removes a child from the specified index position.

func (*PhysicsP2BodyDebug) RemoveChildI

func (self *PhysicsP2BodyDebug) RemoveChildI(args ...interface{}) *DisplayObject

RemoveChildI Removes a child from the container.

func (*PhysicsP2BodyDebug) RemoveChildren

func (self *PhysicsP2BodyDebug) RemoveChildren(beginIndex int, endIndex int)

RemoveChildren Removes all children from this container that are within the begin and end indexes.

func (*PhysicsP2BodyDebug) RemoveChildrenI

func (self *PhysicsP2BodyDebug) RemoveChildrenI(args ...interface{})

RemoveChildrenI Removes all children from this container that are within the begin and end indexes.

func (*PhysicsP2BodyDebug) RemoveFromHash

func (self *PhysicsP2BodyDebug) RemoveFromHash(child *DisplayObject) bool

RemoveFromHash Removes a child of this Group from the hash array. This call will return false if the child is not in the hash.

func (*PhysicsP2BodyDebug) RemoveFromHashI

func (self *PhysicsP2BodyDebug) RemoveFromHashI(args ...interface{}) bool

RemoveFromHashI Removes a child of this Group from the hash array. This call will return false if the child is not in the hash.

func (*PhysicsP2BodyDebug) RemoveI

func (self *PhysicsP2BodyDebug) RemoveI(args ...interface{}) bool

RemoveI Removes the given child from this group.

This will dispatch an `onRemovedFromGroup` event from the child (if it has one), and optionally destroy the child.

If the group cursor was referring to the removed child it is updated to refer to the next child.

func (*PhysicsP2BodyDebug) Replace

func (self *PhysicsP2BodyDebug) Replace(oldChild interface{}, newChild interface{}) interface{}

Replace Replaces a child of this Group with the given newChild. The newChild cannot be a member of this Group.

If `Group.enableBody` is set, then a physics body will be created on the object, so long as one does not already exist.

If `Group.inputEnableChildren` is set, then an Input Handler will be created on the object, so long as one does not already exist.

func (*PhysicsP2BodyDebug) ReplaceI

func (self *PhysicsP2BodyDebug) ReplaceI(args ...interface{}) interface{}

ReplaceI Replaces a child of this Group with the given newChild. The newChild cannot be a member of this Group.

If `Group.enableBody` is set, then a physics body will be created on the object, so long as one does not already exist.

If `Group.inputEnableChildren` is set, then an Input Handler will be created on the object, so long as one does not already exist.

func (*PhysicsP2BodyDebug) ResetChild

func (self *PhysicsP2BodyDebug) ResetChild(child *DisplayObject) *DisplayObject

ResetChild Takes a child and if the `x` and `y` arguments are given it calls `child.reset(x, y)` on it.

If the `key` and optionally the `frame` arguments are given, it calls `child.loadTexture(key, frame)` on it.

The two operations are separate. For example if you just wish to load a new texture then pass `null` as the x and y values.

func (*PhysicsP2BodyDebug) ResetChild1O

func (self *PhysicsP2BodyDebug) ResetChild1O(child *DisplayObject, x int) *DisplayObject

ResetChild1O Takes a child and if the `x` and `y` arguments are given it calls `child.reset(x, y)` on it.

If the `key` and optionally the `frame` arguments are given, it calls `child.loadTexture(key, frame)` on it.

The two operations are separate. For example if you just wish to load a new texture then pass `null` as the x and y values.

func (*PhysicsP2BodyDebug) ResetChild2O

func (self *PhysicsP2BodyDebug) ResetChild2O(child *DisplayObject, x int, y int) *DisplayObject

ResetChild2O Takes a child and if the `x` and `y` arguments are given it calls `child.reset(x, y)` on it.

If the `key` and optionally the `frame` arguments are given, it calls `child.loadTexture(key, frame)` on it.

The two operations are separate. For example if you just wish to load a new texture then pass `null` as the x and y values.

func (*PhysicsP2BodyDebug) ResetChild3O

func (self *PhysicsP2BodyDebug) ResetChild3O(child *DisplayObject, x int, y int, key interface{}) *DisplayObject

ResetChild3O Takes a child and if the `x` and `y` arguments are given it calls `child.reset(x, y)` on it.

If the `key` and optionally the `frame` arguments are given, it calls `child.loadTexture(key, frame)` on it.

The two operations are separate. For example if you just wish to load a new texture then pass `null` as the x and y values.

func (*PhysicsP2BodyDebug) ResetChild4O

func (self *PhysicsP2BodyDebug) ResetChild4O(child *DisplayObject, x int, y int, key interface{}, frame interface{}) *DisplayObject

ResetChild4O Takes a child and if the `x` and `y` arguments are given it calls `child.reset(x, y)` on it.

If the `key` and optionally the `frame` arguments are given, it calls `child.loadTexture(key, frame)` on it.

The two operations are separate. For example if you just wish to load a new texture then pass `null` as the x and y values.

func (*PhysicsP2BodyDebug) ResetChildI

func (self *PhysicsP2BodyDebug) ResetChildI(args ...interface{}) *DisplayObject

ResetChildI Takes a child and if the `x` and `y` arguments are given it calls `child.reset(x, y)` on it.

If the `key` and optionally the `frame` arguments are given, it calls `child.loadTexture(key, frame)` on it.

The two operations are separate. For example if you just wish to load a new texture then pass `null` as the x and y values.

func (*PhysicsP2BodyDebug) ResetCursor

func (self *PhysicsP2BodyDebug) ResetCursor() interface{}

ResetCursor Sets the group cursor to the first child in the group.

If the optional index parameter is given it sets the cursor to the object at that index instead.

func (*PhysicsP2BodyDebug) ResetCursor1O

func (self *PhysicsP2BodyDebug) ResetCursor1O(index int) interface{}

ResetCursor1O Sets the group cursor to the first child in the group.

If the optional index parameter is given it sets the cursor to the object at that index instead.

func (*PhysicsP2BodyDebug) ResetCursorI

func (self *PhysicsP2BodyDebug) ResetCursorI(args ...interface{}) interface{}

ResetCursorI Sets the group cursor to the first child in the group.

If the optional index parameter is given it sets the cursor to the object at that index instead.

func (*PhysicsP2BodyDebug) Reverse

func (self *PhysicsP2BodyDebug) Reverse()

Reverse Reverses all children in this group.

This operation applies only to immediate children and does not propagate to subgroups.

func (*PhysicsP2BodyDebug) ReverseI

func (self *PhysicsP2BodyDebug) ReverseI(args ...interface{})

ReverseI Reverses all children in this group.

This operation applies only to immediate children and does not propagate to subgroups.

func (*PhysicsP2BodyDebug) RgbToHex

func (self *PhysicsP2BodyDebug) RgbToHex()

RgbToHex Converts from RGB to Hex.

func (*PhysicsP2BodyDebug) RgbToHexI

func (self *PhysicsP2BodyDebug) RgbToHexI(args ...interface{})

RgbToHexI Converts from RGB to Hex.

func (*PhysicsP2BodyDebug) Right

func (self *PhysicsP2BodyDebug) Right() int

Right The right coordinate of this Group.

It is derived by calling `getBounds`, calculating the Groups dimensions based on its visible children.

func (*PhysicsP2BodyDebug) Rotation

func (self *PhysicsP2BodyDebug) Rotation() int

Rotation The angle of rotation of the group container, in radians.

This will adjust the group container itself by modifying its rotation. This will have no impact on the rotation value of its children, but it will update their worldTransform and on-screen position.

func (*PhysicsP2BodyDebug) SendToBack

func (self *PhysicsP2BodyDebug) SendToBack(child interface{}) interface{}

SendToBack Sends the given child to the bottom of this group so it renders below all other children.

func (*PhysicsP2BodyDebug) SendToBackI

func (self *PhysicsP2BodyDebug) SendToBackI(args ...interface{}) interface{}

SendToBackI Sends the given child to the bottom of this group so it renders below all other children.

func (*PhysicsP2BodyDebug) Set

func (self *PhysicsP2BodyDebug) Set(child *Sprite, key string, value interface{}) bool

Set Quickly set a property on a single child of this group to a new value.

The operation parameter controls how the new value is assigned to the property, from simple replacement to addition and multiplication.

func (*PhysicsP2BodyDebug) Set1O

func (self *PhysicsP2BodyDebug) Set1O(child *Sprite, key string, value interface{}, checkAlive bool) bool

Set1O Quickly set a property on a single child of this group to a new value.

The operation parameter controls how the new value is assigned to the property, from simple replacement to addition and multiplication.

func (*PhysicsP2BodyDebug) Set2O

func (self *PhysicsP2BodyDebug) Set2O(child *Sprite, key string, value interface{}, checkAlive bool, checkVisible bool) bool

Set2O Quickly set a property on a single child of this group to a new value.

The operation parameter controls how the new value is assigned to the property, from simple replacement to addition and multiplication.

func (*PhysicsP2BodyDebug) Set3O

func (self *PhysicsP2BodyDebug) Set3O(child *Sprite, key string, value interface{}, checkAlive bool, checkVisible bool, operation int) bool

Set3O Quickly set a property on a single child of this group to a new value.

The operation parameter controls how the new value is assigned to the property, from simple replacement to addition and multiplication.

func (*PhysicsP2BodyDebug) Set4O

func (self *PhysicsP2BodyDebug) Set4O(child *Sprite, key string, value interface{}, checkAlive bool, checkVisible bool, operation int, force bool) bool

Set4O Quickly set a property on a single child of this group to a new value.

The operation parameter controls how the new value is assigned to the property, from simple replacement to addition and multiplication.

func (*PhysicsP2BodyDebug) SetAliveA

func (self *PhysicsP2BodyDebug) SetAliveA(member bool)

SetAliveA The alive property is useful for Groups that are children of other Groups and need to be included/excluded in checks like forEachAlive.

func (*PhysicsP2BodyDebug) SetAll

func (self *PhysicsP2BodyDebug) SetAll(key string, value interface{})

SetAll Quickly set the same property across all children of this group to a new value.

This call doesn't descend down children, so if you have a Group inside of this group, the property will be set on the group but not its children. If you need that ability please see `Group.setAllChildren`.

The operation parameter controls how the new value is assigned to the property, from simple replacement to addition and multiplication.

func (*PhysicsP2BodyDebug) SetAll1O

func (self *PhysicsP2BodyDebug) SetAll1O(key string, value interface{}, checkAlive bool)

SetAll1O Quickly set the same property across all children of this group to a new value.

This call doesn't descend down children, so if you have a Group inside of this group, the property will be set on the group but not its children. If you need that ability please see `Group.setAllChildren`.

The operation parameter controls how the new value is assigned to the property, from simple replacement to addition and multiplication.

func (*PhysicsP2BodyDebug) SetAll2O

func (self *PhysicsP2BodyDebug) SetAll2O(key string, value interface{}, checkAlive bool, checkVisible bool)

SetAll2O Quickly set the same property across all children of this group to a new value.

This call doesn't descend down children, so if you have a Group inside of this group, the property will be set on the group but not its children. If you need that ability please see `Group.setAllChildren`.

The operation parameter controls how the new value is assigned to the property, from simple replacement to addition and multiplication.

func (*PhysicsP2BodyDebug) SetAll3O

func (self *PhysicsP2BodyDebug) SetAll3O(key string, value interface{}, checkAlive bool, checkVisible bool, operation int)

SetAll3O Quickly set the same property across all children of this group to a new value.

This call doesn't descend down children, so if you have a Group inside of this group, the property will be set on the group but not its children. If you need that ability please see `Group.setAllChildren`.

The operation parameter controls how the new value is assigned to the property, from simple replacement to addition and multiplication.

func (*PhysicsP2BodyDebug) SetAll4O

func (self *PhysicsP2BodyDebug) SetAll4O(key string, value interface{}, checkAlive bool, checkVisible bool, operation int, force bool)

SetAll4O Quickly set the same property across all children of this group to a new value.

This call doesn't descend down children, so if you have a Group inside of this group, the property will be set on the group but not its children. If you need that ability please see `Group.setAllChildren`.

The operation parameter controls how the new value is assigned to the property, from simple replacement to addition and multiplication.

func (*PhysicsP2BodyDebug) SetAllChildren

func (self *PhysicsP2BodyDebug) SetAllChildren(key string, value interface{})

SetAllChildren Quickly set the same property across all children of this group, and any child Groups, to a new value.

If this group contains other Groups then the same property is set across their children as well, iterating down until it reaches the bottom. Unlike with `setAll` the property is NOT set on child Groups itself.

The operation parameter controls how the new value is assigned to the property, from simple replacement to addition and multiplication.

func (*PhysicsP2BodyDebug) SetAllChildren1O

func (self *PhysicsP2BodyDebug) SetAllChildren1O(key string, value interface{}, checkAlive bool)

SetAllChildren1O Quickly set the same property across all children of this group, and any child Groups, to a new value.

If this group contains other Groups then the same property is set across their children as well, iterating down until it reaches the bottom. Unlike with `setAll` the property is NOT set on child Groups itself.

The operation parameter controls how the new value is assigned to the property, from simple replacement to addition and multiplication.

func (*PhysicsP2BodyDebug) SetAllChildren2O

func (self *PhysicsP2BodyDebug) SetAllChildren2O(key string, value interface{}, checkAlive bool, checkVisible bool)

SetAllChildren2O Quickly set the same property across all children of this group, and any child Groups, to a new value.

If this group contains other Groups then the same property is set across their children as well, iterating down until it reaches the bottom. Unlike with `setAll` the property is NOT set on child Groups itself.

The operation parameter controls how the new value is assigned to the property, from simple replacement to addition and multiplication.

func (*PhysicsP2BodyDebug) SetAllChildren3O

func (self *PhysicsP2BodyDebug) SetAllChildren3O(key string, value interface{}, checkAlive bool, checkVisible bool, operation int)

SetAllChildren3O Quickly set the same property across all children of this group, and any child Groups, to a new value.

If this group contains other Groups then the same property is set across their children as well, iterating down until it reaches the bottom. Unlike with `setAll` the property is NOT set on child Groups itself.

The operation parameter controls how the new value is assigned to the property, from simple replacement to addition and multiplication.

func (*PhysicsP2BodyDebug) SetAllChildren4O

func (self *PhysicsP2BodyDebug) SetAllChildren4O(key string, value interface{}, checkAlive bool, checkVisible bool, operation int, force bool)

SetAllChildren4O Quickly set the same property across all children of this group, and any child Groups, to a new value.

If this group contains other Groups then the same property is set across their children as well, iterating down until it reaches the bottom. Unlike with `setAll` the property is NOT set on child Groups itself.

The operation parameter controls how the new value is assigned to the property, from simple replacement to addition and multiplication.

func (*PhysicsP2BodyDebug) SetAllChildrenI

func (self *PhysicsP2BodyDebug) SetAllChildrenI(args ...interface{})

SetAllChildrenI Quickly set the same property across all children of this group, and any child Groups, to a new value.

If this group contains other Groups then the same property is set across their children as well, iterating down until it reaches the bottom. Unlike with `setAll` the property is NOT set on child Groups itself.

The operation parameter controls how the new value is assigned to the property, from simple replacement to addition and multiplication.

func (*PhysicsP2BodyDebug) SetAllI

func (self *PhysicsP2BodyDebug) SetAllI(args ...interface{})

SetAllI Quickly set the same property across all children of this group to a new value.

This call doesn't descend down children, so if you have a Group inside of this group, the property will be set on the group but not its children. If you need that ability please see `Group.setAllChildren`.

The operation parameter controls how the new value is assigned to the property, from simple replacement to addition and multiplication.

func (*PhysicsP2BodyDebug) SetAlphaA

func (self *PhysicsP2BodyDebug) SetAlphaA(member int)

SetAlphaA The alpha value of the group container.

func (*PhysicsP2BodyDebug) SetAngleA

func (self *PhysicsP2BodyDebug) SetAngleA(member int)

SetAngleA The angle of rotation of the group container, in degrees.

This adjusts the group itself by modifying its local rotation transform.

This has no impact on the rotation/angle properties of the children, but it will update their worldTransform and on-screen orientation and position.

func (*PhysicsP2BodyDebug) SetBodyA

func (self *PhysicsP2BodyDebug) SetBodyA(member *PhysicsP2Body)

SetBodyA The P2 Body to display debug data for.

func (*PhysicsP2BodyDebug) SetBottomA

func (self *PhysicsP2BodyDebug) SetBottomA(member int)

SetBottomA The bottom coordinate of this Group.

It is derived by calling `getBounds`, calculating the Groups dimensions based on its visible children.

func (*PhysicsP2BodyDebug) SetCameraOffsetA

func (self *PhysicsP2BodyDebug) SetCameraOffsetA(member *Point)

SetCameraOffsetA If this object is {@link Phaser.Group#fixedToCamera fixedToCamera} then this stores the x/y position offset relative to the top-left of the camera view. If the parent of this Group is also `fixedToCamera` then the offset here is in addition to that and should typically be disabled.

func (*PhysicsP2BodyDebug) SetCanvasA

func (self *PhysicsP2BodyDebug) SetCanvasA(member *Graphics)

SetCanvasA The canvas to render the debug info to.

func (*PhysicsP2BodyDebug) SetCenterXA

func (self *PhysicsP2BodyDebug) SetCenterXA(member int)

SetCenterXA The center x coordinate of this Group.

It is derived by calling `getBounds`, calculating the Groups dimensions based on its visible children.

func (*PhysicsP2BodyDebug) SetCenterYA

func (self *PhysicsP2BodyDebug) SetCenterYA(member int)

SetCenterYA The center y coordinate of this Group.

It is derived by calling `getBounds`, calculating the Groups dimensions based on its visible children.

func (*PhysicsP2BodyDebug) SetChildIndex

func (self *PhysicsP2BodyDebug) SetChildIndex(child *DisplayObject, index int)

SetChildIndex Changes the position of an existing child in the display object container

func (*PhysicsP2BodyDebug) SetChildIndexI

func (self *PhysicsP2BodyDebug) SetChildIndexI(args ...interface{})

SetChildIndexI Changes the position of an existing child in the display object container

func (*PhysicsP2BodyDebug) SetChildrenA

func (self *PhysicsP2BodyDebug) SetChildrenA(member []DisplayObject)

SetChildrenA [read-only] The array of children of this container.

func (*PhysicsP2BodyDebug) SetClassTypeA

func (self *PhysicsP2BodyDebug) SetClassTypeA(member interface{})

SetClassTypeA The type of objects that will be created when using {@link Phaser.Group#create create} or {@link Phaser.Group#createMultiple createMultiple}.

Any object may be used but it should extend either Sprite or Image and accept the same constructor arguments: when a new object is created it is passed the following parameters to its constructor: `(game, x, y, key, frame)`.

func (*PhysicsP2BodyDebug) SetCursorA

func (self *PhysicsP2BodyDebug) SetCursorA(member *DisplayObject)

SetCursorA The current display object that the group cursor is pointing to, if any. (Can be set manually.)

The cursor is a way to iterate through the children in a Group using {@link Phaser.Group#next next} and {@link Phaser.Group#previous previous}.

func (*PhysicsP2BodyDebug) SetCursorIndexA

func (self *PhysicsP2BodyDebug) SetCursorIndexA(member int)

SetCursorIndexA The current index of the Group cursor. Advance it with Group.next.

func (*PhysicsP2BodyDebug) SetEnableBodyA

func (self *PhysicsP2BodyDebug) SetEnableBodyA(member bool)

SetEnableBodyA If true all Sprites created by, or added to this group, will have a physics body enabled on them.

If there are children already in the Group at the time you set this property, they are not changed.

The default body type is controlled with {@link Phaser.Group#physicsBodyType physicsBodyType}.

func (*PhysicsP2BodyDebug) SetEnableBodyDebugA

func (self *PhysicsP2BodyDebug) SetEnableBodyDebugA(member bool)

SetEnableBodyDebugA If true when a physics body is created (via {@link Phaser.Group#enableBody enableBody}) it will create a physics debug object as well.

This only works for P2 bodies.

func (*PhysicsP2BodyDebug) SetExistsA

func (self *PhysicsP2BodyDebug) SetExistsA(member bool)

SetExistsA If exists is true the group is updated, otherwise it is skipped.

func (*PhysicsP2BodyDebug) SetFixedToCameraA

func (self *PhysicsP2BodyDebug) SetFixedToCameraA(member bool)

SetFixedToCameraA A Group that is fixed to the camera uses its x/y coordinates as offsets from the top left of the camera. These are stored in Group.cameraOffset.

Note that the cameraOffset values are in addition to any parent in the display list. So if this Group was in a Group that has x: 200, then this will be added to the cameraOffset.x

func (*PhysicsP2BodyDebug) SetGameA

func (self *PhysicsP2BodyDebug) SetGameA(member *Game)

SetGameA A reference to the currently running Game.

func (*PhysicsP2BodyDebug) SetHashA

func (self *PhysicsP2BodyDebug) SetHashA(member []interface{})

SetHashA The hash array is an array belonging to this Group into which you can add any of its children via Group.addToHash and Group.removeFromHash.

Only children of this Group can be added to and removed from the hash.

This hash is used automatically by Phaser Arcade Physics in order to perform non z-index based destructive sorting. However if you don't use Arcade Physics, or this isn't a physics enabled Group, then you can use the hash to perform your own sorting and filtering of Group children without touching their z-index (and therefore display draw order)

func (*PhysicsP2BodyDebug) SetHeightA

func (self *PhysicsP2BodyDebug) SetHeightA(member int)

SetHeightA The height of the displayObjectContainer, setting this will actually modify the scale to achieve the value set

func (*PhysicsP2BodyDebug) SetI

func (self *PhysicsP2BodyDebug) SetI(args ...interface{}) bool

SetI Quickly set a property on a single child of this group to a new value.

The operation parameter controls how the new value is assigned to the property, from simple replacement to addition and multiplication.

func (*PhysicsP2BodyDebug) SetIgnoreChildInputA

func (self *PhysicsP2BodyDebug) SetIgnoreChildInputA(member bool)

SetIgnoreChildInputA If `ignoreChildInput` is `false` it will allow this objects _children_ to be considered as valid for Input events.

If this property is `true` then the children will _not_ be considered as valid for Input events.

Note that this property isn't recursive: only immediate children are influenced, it doesn't scan further down.

func (*PhysicsP2BodyDebug) SetIgnoreDestroyA

func (self *PhysicsP2BodyDebug) SetIgnoreDestroyA(member bool)

SetIgnoreDestroyA A group with `ignoreDestroy` set to `true` ignores all calls to its `destroy` method.

func (*PhysicsP2BodyDebug) SetInputEnableChildrenA

func (self *PhysicsP2BodyDebug) SetInputEnableChildrenA(member bool)

SetInputEnableChildrenA A Group with `inputEnableChildren` set to `true` will automatically call `inputEnabled = true` on any children _added_ to, or _created by_, this Group.

If there are children already in the Group at the time you set this property, they are not changed.

func (*PhysicsP2BodyDebug) SetLeftA

func (self *PhysicsP2BodyDebug) SetLeftA(member int)

SetLeftA The left coordinate of this Group.

It is derived by calling `getBounds`, calculating the Groups dimensions based on its visible children.

func (*PhysicsP2BodyDebug) SetLengthA

func (self *PhysicsP2BodyDebug) SetLengthA(member int)

SetLengthA Total number of children in this group, regardless of exists/alive status.

func (*PhysicsP2BodyDebug) SetNameA

func (self *PhysicsP2BodyDebug) SetNameA(member string)

SetNameA A name for this group. Not used internally but useful for debugging.

func (*PhysicsP2BodyDebug) SetOnChildInputDownA

func (self *PhysicsP2BodyDebug) SetOnChildInputDownA(member *Signal)

SetOnChildInputDownA This Signal is dispatched whenever a child of this Group emits an onInputDown signal as a result of having been interacted with by a Pointer. You can bind functions to this Signal instead of to every child Sprite.

This Signal is sent 2 arguments: A reference to the Sprite that triggered the signal, and a reference to the Pointer that caused it.

func (*PhysicsP2BodyDebug) SetOnChildInputOutA

func (self *PhysicsP2BodyDebug) SetOnChildInputOutA(member *Signal)

SetOnChildInputOutA This Signal is dispatched whenever a child of this Group emits an onInputOut signal as a result of having been interacted with by a Pointer. You can bind functions to this Signal instead of to every child Sprite.

This Signal is sent 2 arguments: A reference to the Sprite that triggered the signal, and a reference to the Pointer that caused it.

func (*PhysicsP2BodyDebug) SetOnChildInputOverA

func (self *PhysicsP2BodyDebug) SetOnChildInputOverA(member *Signal)

SetOnChildInputOverA This Signal is dispatched whenever a child of this Group emits an onInputOver signal as a result of having been interacted with by a Pointer. You can bind functions to this Signal instead of to every child Sprite.

This Signal is sent 2 arguments: A reference to the Sprite that triggered the signal, and a reference to the Pointer that caused it.

func (*PhysicsP2BodyDebug) SetOnChildInputUpA

func (self *PhysicsP2BodyDebug) SetOnChildInputUpA(member *Signal)

SetOnChildInputUpA This Signal is dispatched whenever a child of this Group emits an onInputUp signal as a result of having been interacted with by a Pointer. You can bind functions to this Signal instead of to every child Sprite.

This Signal is sent 3 arguments: A reference to the Sprite that triggered the signal, a reference to the Pointer that caused it, and a boolean value `isOver` that tells you if the Pointer is still over the Sprite or not.

func (*PhysicsP2BodyDebug) SetOnDestroyA

func (self *PhysicsP2BodyDebug) SetOnDestroyA(member *Signal)

SetOnDestroyA This signal is dispatched when the group is destroyed.

func (*PhysicsP2BodyDebug) SetPendingDestroyA

func (self *PhysicsP2BodyDebug) SetPendingDestroyA(member bool)

SetPendingDestroyA A Group is that has `pendingDestroy` set to `true` is flagged to have its destroy method called on the next logic update. You can set it directly to flag the Group to be destroyed on its next update.

This is extremely useful if you wish to destroy a Group from within one of its own callbacks or a callback of one of its children.

func (*PhysicsP2BodyDebug) SetPhysicsBodyTypeA

func (self *PhysicsP2BodyDebug) SetPhysicsBodyTypeA(member int)

SetPhysicsBodyTypeA If {@link Phaser.Group#enableBody enableBody} is true this is the type of physics body that is created on new Sprites.

The valid values are {@link Phaser.Physics.ARCADE}, {@link Phaser.Physics.P2JS}, {@link Phaser.Physics.NINJA}, etc.

func (*PhysicsP2BodyDebug) SetPhysicsSortDirectionA

func (self *PhysicsP2BodyDebug) SetPhysicsSortDirectionA(member int)

SetPhysicsSortDirectionA If this Group contains Arcade Physics Sprites you can set a custom sort direction via this property.

It should be set to one of the Phaser.Physics.Arcade sort direction constants:

Phaser.Physics.Arcade.SORT_NONE Phaser.Physics.Arcade.LEFT_RIGHT Phaser.Physics.Arcade.RIGHT_LEFT Phaser.Physics.Arcade.TOP_BOTTOM Phaser.Physics.Arcade.BOTTOM_TOP

If set to `null` the Group will use whatever Phaser.Physics.Arcade.sortDirection is set to. This is the default behavior.

func (*PhysicsP2BodyDebug) SetPhysicsTypeA

func (self *PhysicsP2BodyDebug) SetPhysicsTypeA(member int)

SetPhysicsTypeA The const physics body type of this object.

func (*PhysicsP2BodyDebug) SetPpuA

func (self *PhysicsP2BodyDebug) SetPpuA(member int)

SetPpuA Pixels per Length Unit.

func (*PhysicsP2BodyDebug) SetProperty

func (self *PhysicsP2BodyDebug) SetProperty(child interface{}, key []interface{}, value interface{}) bool

SetProperty Sets a property to the given value on the child. The operation parameter controls how the value is set.

The operations are: - 0: set the existing value to the given value; if force is `true` a new property will be created if needed - 1: will add the given value to the value already present. - 2: will subtract the given value from the value already present. - 3: will multiply the value already present by the given value. - 4: will divide the value already present by the given value.

func (*PhysicsP2BodyDebug) SetProperty1O

func (self *PhysicsP2BodyDebug) SetProperty1O(child interface{}, key []interface{}, value interface{}, operation int) bool

SetProperty1O Sets a property to the given value on the child. The operation parameter controls how the value is set.

The operations are: - 0: set the existing value to the given value; if force is `true` a new property will be created if needed - 1: will add the given value to the value already present. - 2: will subtract the given value from the value already present. - 3: will multiply the value already present by the given value. - 4: will divide the value already present by the given value.

func (*PhysicsP2BodyDebug) SetProperty2O

func (self *PhysicsP2BodyDebug) SetProperty2O(child interface{}, key []interface{}, value interface{}, operation int, force bool) bool

SetProperty2O Sets a property to the given value on the child. The operation parameter controls how the value is set.

The operations are: - 0: set the existing value to the given value; if force is `true` a new property will be created if needed - 1: will add the given value to the value already present. - 2: will subtract the given value from the value already present. - 3: will multiply the value already present by the given value. - 4: will divide the value already present by the given value.

func (*PhysicsP2BodyDebug) SetPropertyI

func (self *PhysicsP2BodyDebug) SetPropertyI(args ...interface{}) bool

SetPropertyI Sets a property to the given value on the child. The operation parameter controls how the value is set.

The operations are: - 0: set the existing value to the given value; if force is `true` a new property will be created if needed - 1: will add the given value to the value already present. - 2: will subtract the given value from the value already present. - 3: will multiply the value already present by the given value. - 4: will divide the value already present by the given value.

func (*PhysicsP2BodyDebug) SetRightA

func (self *PhysicsP2BodyDebug) SetRightA(member int)

SetRightA The right coordinate of this Group.

It is derived by calling `getBounds`, calculating the Groups dimensions based on its visible children.

func (*PhysicsP2BodyDebug) SetRotationA

func (self *PhysicsP2BodyDebug) SetRotationA(member int)

SetRotationA The angle of rotation of the group container, in radians.

This will adjust the group container itself by modifying its rotation. This will have no impact on the rotation value of its children, but it will update their worldTransform and on-screen position.

func (*PhysicsP2BodyDebug) SetTopA

func (self *PhysicsP2BodyDebug) SetTopA(member int)

SetTopA The top coordinate of this Group.

It is derived by calling `getBounds`, calculating the Groups dimensions based on its visible children.

func (*PhysicsP2BodyDebug) SetTotalA

func (self *PhysicsP2BodyDebug) SetTotalA(member int)

SetTotalA Total number of existing children in the group.

func (*PhysicsP2BodyDebug) SetTypeA

func (self *PhysicsP2BodyDebug) SetTypeA(member int)

SetTypeA Internal Phaser Type value.

func (*PhysicsP2BodyDebug) SetVisibleA

func (self *PhysicsP2BodyDebug) SetVisibleA(member bool)

SetVisibleA The visible state of the group. Non-visible Groups and all of their children are not rendered.

func (*PhysicsP2BodyDebug) SetWidthA

func (self *PhysicsP2BodyDebug) SetWidthA(member int)

SetWidthA The width of the displayObjectContainer, setting this will actually modify the scale to achieve the value set

func (*PhysicsP2BodyDebug) SetXA

func (self *PhysicsP2BodyDebug) SetXA(member int)

SetXA The x coordinate of the group container.

You can adjust the group container itself by modifying its coordinates. This will have no impact on the x/y coordinates of its children, but it will update their worldTransform and on-screen position.

func (*PhysicsP2BodyDebug) SetYA

func (self *PhysicsP2BodyDebug) SetYA(member int)

SetYA The y coordinate of the group container.

You can adjust the group container itself by modifying its coordinates. This will have no impact on the x/y coordinates of its children, but it will update their worldTransform and on-screen position.

func (*PhysicsP2BodyDebug) SetZA

func (self *PhysicsP2BodyDebug) SetZA(member int)

SetZA The z-depth value of this object within its parent container/Group - the World is a Group as well. This value must be unique for each child in a Group.

func (*PhysicsP2BodyDebug) Sort

func (self *PhysicsP2BodyDebug) Sort()

Sort Sort the children in the group according to a particular key and ordering.

Call this function to sort the group according to a particular key value and order.

For example to depth sort Sprites for Zelda-style game you might call `group.sort('y', Phaser.Group.SORT_ASCENDING)` at the bottom of your `State.update()`.

Internally this uses a standard JavaScript Array sort, so everything that applies there also applies here, including alphabetical sorting, mixing strings and numbers, and Unicode sorting. See MDN for more details.

func (*PhysicsP2BodyDebug) Sort1O

func (self *PhysicsP2BodyDebug) Sort1O(key string)

Sort1O Sort the children in the group according to a particular key and ordering.

Call this function to sort the group according to a particular key value and order.

For example to depth sort Sprites for Zelda-style game you might call `group.sort('y', Phaser.Group.SORT_ASCENDING)` at the bottom of your `State.update()`.

Internally this uses a standard JavaScript Array sort, so everything that applies there also applies here, including alphabetical sorting, mixing strings and numbers, and Unicode sorting. See MDN for more details.

func (*PhysicsP2BodyDebug) Sort2O

func (self *PhysicsP2BodyDebug) Sort2O(key string, order int)

Sort2O Sort the children in the group according to a particular key and ordering.

Call this function to sort the group according to a particular key value and order.

For example to depth sort Sprites for Zelda-style game you might call `group.sort('y', Phaser.Group.SORT_ASCENDING)` at the bottom of your `State.update()`.

Internally this uses a standard JavaScript Array sort, so everything that applies there also applies here, including alphabetical sorting, mixing strings and numbers, and Unicode sorting. See MDN for more details.

func (*PhysicsP2BodyDebug) SortI

func (self *PhysicsP2BodyDebug) SortI(args ...interface{})

SortI Sort the children in the group according to a particular key and ordering.

Call this function to sort the group according to a particular key value and order.

For example to depth sort Sprites for Zelda-style game you might call `group.sort('y', Phaser.Group.SORT_ASCENDING)` at the bottom of your `State.update()`.

Internally this uses a standard JavaScript Array sort, so everything that applies there also applies here, including alphabetical sorting, mixing strings and numbers, and Unicode sorting. See MDN for more details.

func (*PhysicsP2BodyDebug) SubAll

func (self *PhysicsP2BodyDebug) SubAll(property string, amount int, checkAlive bool, checkVisible bool)

SubAll Subtracts the amount from the given property on all children in this group.

`Group.subAll('x', 10)` will minus 10 from the child.x value for each child.

func (*PhysicsP2BodyDebug) SubAllI

func (self *PhysicsP2BodyDebug) SubAllI(args ...interface{})

SubAllI Subtracts the amount from the given property on all children in this group.

`Group.subAll('x', 10)` will minus 10 from the child.x value for each child.

func (*PhysicsP2BodyDebug) Swap

func (self *PhysicsP2BodyDebug) Swap(child1 interface{}, child2 interface{})

Swap Swaps the position of two children in this group.

Both children must be in this group, a child cannot be swapped with itself, and unparented children cannot be swapped.

func (*PhysicsP2BodyDebug) SwapChildren

func (self *PhysicsP2BodyDebug) SwapChildren(child *DisplayObject, child2 *DisplayObject)

SwapChildren Swaps the position of 2 Display Objects within this container.

func (*PhysicsP2BodyDebug) SwapChildrenI

func (self *PhysicsP2BodyDebug) SwapChildrenI(args ...interface{})

SwapChildrenI Swaps the position of 2 Display Objects within this container.

func (*PhysicsP2BodyDebug) SwapI

func (self *PhysicsP2BodyDebug) SwapI(args ...interface{})

SwapI Swaps the position of two children in this group.

Both children must be in this group, a child cannot be swapped with itself, and unparented children cannot be swapped.

func (*PhysicsP2BodyDebug) Top

func (self *PhysicsP2BodyDebug) Top() int

Top The top coordinate of this Group.

It is derived by calling `getBounds`, calculating the Groups dimensions based on its visible children.

func (*PhysicsP2BodyDebug) Total

func (self *PhysicsP2BodyDebug) Total() int

Total Total number of existing children in the group.

func (*PhysicsP2BodyDebug) Type

func (self *PhysicsP2BodyDebug) Type() int

Type Internal Phaser Type value.

func (*PhysicsP2BodyDebug) Update

func (self *PhysicsP2BodyDebug) Update()

Update The core update - as called by World.

func (*PhysicsP2BodyDebug) UpdateI

func (self *PhysicsP2BodyDebug) UpdateI(args ...interface{})

UpdateI The core update - as called by World.

func (*PhysicsP2BodyDebug) UpdateSpriteTransform

func (self *PhysicsP2BodyDebug) UpdateSpriteTransform()

UpdateSpriteTransform Core update.

func (*PhysicsP2BodyDebug) UpdateSpriteTransformI

func (self *PhysicsP2BodyDebug) UpdateSpriteTransformI(args ...interface{})

UpdateSpriteTransformI Core update.

func (*PhysicsP2BodyDebug) UpdateZ

func (self *PhysicsP2BodyDebug) UpdateZ()

UpdateZ Internal method that re-applies all of the children's Z values.

This must be called whenever children ordering is altered so that their `z` indices are correctly updated.

func (*PhysicsP2BodyDebug) UpdateZI

func (self *PhysicsP2BodyDebug) UpdateZI(args ...interface{})

UpdateZI Internal method that re-applies all of the children's Z values.

This must be called whenever children ordering is altered so that their `z` indices are correctly updated.

func (*PhysicsP2BodyDebug) Visible

func (self *PhysicsP2BodyDebug) Visible() bool

Visible The visible state of the group. Non-visible Groups and all of their children are not rendered.

func (*PhysicsP2BodyDebug) Width

func (self *PhysicsP2BodyDebug) Width() int

Width The width of the displayObjectContainer, setting this will actually modify the scale to achieve the value set

func (*PhysicsP2BodyDebug) X

func (self *PhysicsP2BodyDebug) X() int

X The x coordinate of the group container.

You can adjust the group container itself by modifying its coordinates. This will have no impact on the x/y coordinates of its children, but it will update their worldTransform and on-screen position.

func (*PhysicsP2BodyDebug) Xy

func (self *PhysicsP2BodyDebug) Xy(index int, x int, y int)

Xy Positions the child found at the given index within this group to the given x and y coordinates.

func (*PhysicsP2BodyDebug) XyI

func (self *PhysicsP2BodyDebug) XyI(args ...interface{})

XyI Positions the child found at the given index within this group to the given x and y coordinates.

func (*PhysicsP2BodyDebug) Y

func (self *PhysicsP2BodyDebug) Y() int

Y The y coordinate of the group container.

You can adjust the group container itself by modifying its coordinates. This will have no impact on the x/y coordinates of its children, but it will update their worldTransform and on-screen position.

func (*PhysicsP2BodyDebug) Z

func (self *PhysicsP2BodyDebug) Z() int

Z The z-depth value of this object within its parent container/Group - the World is a Group as well. This value must be unique for each child in a Group.

type PhysicsP2CollisionGroup

type PhysicsP2CollisionGroup struct {
	*js.Object
}

PhysicsP2CollisionGroup Collision Group

func NewPhysicsP2CollisionGroup

func NewPhysicsP2CollisionGroup(bitmask int) *PhysicsP2CollisionGroup

NewPhysicsP2CollisionGroup Collision Group

func NewPhysicsP2CollisionGroupI

func NewPhysicsP2CollisionGroupI(args ...interface{}) *PhysicsP2CollisionGroup

NewPhysicsP2CollisionGroupI Collision Group

func ToPhysicsP2CollisionGroup

func ToPhysicsP2CollisionGroup(jsStruct interface{}) *PhysicsP2CollisionGroup

PhysicsP2CollisionGroup Binding conversion method to PhysicsP2CollisionGroup point

func (*PhysicsP2CollisionGroup) Mask

func (self *PhysicsP2CollisionGroup) Mask() int

Mask The CollisionGroup bitmask.

func (*PhysicsP2CollisionGroup) SetMaskA

func (self *PhysicsP2CollisionGroup) SetMaskA(member int)

SetMaskA The CollisionGroup bitmask.

type PhysicsP2Constraint

type PhysicsP2Constraint struct{ *js.Object }

type PhysicsP2ContactMaterial

type PhysicsP2ContactMaterial struct {
	*js.Object
}

PhysicsP2ContactMaterial Defines a physics material

func NewPhysicsP2ContactMaterial

func NewPhysicsP2ContactMaterial(materialA *PhysicsP2Material, materialB *PhysicsP2Material) *PhysicsP2ContactMaterial

NewPhysicsP2ContactMaterial Defines a physics material

func NewPhysicsP2ContactMaterial1O

func NewPhysicsP2ContactMaterial1O(materialA *PhysicsP2Material, materialB *PhysicsP2Material, options interface{}) *PhysicsP2ContactMaterial

NewPhysicsP2ContactMaterial1O Defines a physics material

func NewPhysicsP2ContactMaterialI

func NewPhysicsP2ContactMaterialI(args ...interface{}) *PhysicsP2ContactMaterial

NewPhysicsP2ContactMaterialI Defines a physics material

func ToPhysicsP2ContactMaterial

func ToPhysicsP2ContactMaterial(jsStruct interface{}) *PhysicsP2ContactMaterial

PhysicsP2ContactMaterial Binding conversion method to PhysicsP2ContactMaterial point

type PhysicsP2DistanceConstraint

type PhysicsP2DistanceConstraint struct {
	*js.Object
}

PhysicsP2DistanceConstraint A constraint that tries to keep the distance between two bodies constant.

func NewPhysicsP2DistanceConstraint

func NewPhysicsP2DistanceConstraint(world *PhysicsP2, bodyA *P2Body, bodyB *P2Body, distance int) *PhysicsP2DistanceConstraint

NewPhysicsP2DistanceConstraint A constraint that tries to keep the distance between two bodies constant.

func NewPhysicsP2DistanceConstraint1O

func NewPhysicsP2DistanceConstraint1O(world *PhysicsP2, bodyA *P2Body, bodyB *P2Body, distance int, localAnchorA []interface{}) *PhysicsP2DistanceConstraint

NewPhysicsP2DistanceConstraint1O A constraint that tries to keep the distance between two bodies constant.

func NewPhysicsP2DistanceConstraint2O

func NewPhysicsP2DistanceConstraint2O(world *PhysicsP2, bodyA *P2Body, bodyB *P2Body, distance int, localAnchorA []interface{}, localAnchorB []interface{}) *PhysicsP2DistanceConstraint

NewPhysicsP2DistanceConstraint2O A constraint that tries to keep the distance between two bodies constant.

func NewPhysicsP2DistanceConstraint3O

func NewPhysicsP2DistanceConstraint3O(world *PhysicsP2, bodyA *P2Body, bodyB *P2Body, distance int, localAnchorA []interface{}, localAnchorB []interface{}, maxForce interface{}) *PhysicsP2DistanceConstraint

NewPhysicsP2DistanceConstraint3O A constraint that tries to keep the distance between two bodies constant.

func NewPhysicsP2DistanceConstraintI

func NewPhysicsP2DistanceConstraintI(args ...interface{}) *PhysicsP2DistanceConstraint

NewPhysicsP2DistanceConstraintI A constraint that tries to keep the distance between two bodies constant.

func ToPhysicsP2DistanceConstraint

func ToPhysicsP2DistanceConstraint(jsStruct interface{}) *PhysicsP2DistanceConstraint

PhysicsP2DistanceConstraint Binding conversion method to PhysicsP2DistanceConstraint point

func (*PhysicsP2DistanceConstraint) Game

func (self *PhysicsP2DistanceConstraint) Game() *Game

Game Local reference to game.

func (*PhysicsP2DistanceConstraint) SetGameA

func (self *PhysicsP2DistanceConstraint) SetGameA(member *Game)

SetGameA Local reference to game.

func (*PhysicsP2DistanceConstraint) SetWorldA

func (self *PhysicsP2DistanceConstraint) SetWorldA(member *PhysicsP2)

SetWorldA Local reference to P2 World.

func (*PhysicsP2DistanceConstraint) World

func (self *PhysicsP2DistanceConstraint) World() *PhysicsP2

World Local reference to P2 World.

type PhysicsP2FixtureList

type PhysicsP2FixtureList struct {
	*js.Object
}

PhysicsP2FixtureList Allow to access a list of created fixture (coming from Body#addPhaserPolygon) which itself parse the input from PhysicsEditor with the custom phaser exporter. You can access fixtures of a Body by a group index or even by providing a fixture Key. You can set the fixture key and also the group index for a fixture in PhysicsEditor. This gives you the power to create a complex body built of many fixtures and modify them during runtime (to remove parts, set masks, categories & sensor properties)

func NewPhysicsP2FixtureList

func NewPhysicsP2FixtureList(list []interface{}) *PhysicsP2FixtureList

NewPhysicsP2FixtureList Allow to access a list of created fixture (coming from Body#addPhaserPolygon) which itself parse the input from PhysicsEditor with the custom phaser exporter. You can access fixtures of a Body by a group index or even by providing a fixture Key. You can set the fixture key and also the group index for a fixture in PhysicsEditor. This gives you the power to create a complex body built of many fixtures and modify them during runtime (to remove parts, set masks, categories & sensor properties)

func NewPhysicsP2FixtureListI

func NewPhysicsP2FixtureListI(args ...interface{}) *PhysicsP2FixtureList

NewPhysicsP2FixtureListI Allow to access a list of created fixture (coming from Body#addPhaserPolygon) which itself parse the input from PhysicsEditor with the custom phaser exporter. You can access fixtures of a Body by a group index or even by providing a fixture Key. You can set the fixture key and also the group index for a fixture in PhysicsEditor. This gives you the power to create a complex body built of many fixtures and modify them during runtime (to remove parts, set masks, categories & sensor properties)

func ToPhysicsP2FixtureList

func ToPhysicsP2FixtureList(jsStruct interface{}) *PhysicsP2FixtureList

PhysicsP2FixtureList Binding conversion method to PhysicsP2FixtureList point

func (*PhysicsP2FixtureList) Flatten

func (self *PhysicsP2FixtureList) Flatten(array []interface{})

Flatten A helper to flatten arrays. This is very useful as the fixtures are nested from time to time due to the way P2 creates and splits polygons.

func (*PhysicsP2FixtureList) FlattenI

func (self *PhysicsP2FixtureList) FlattenI(args ...interface{})

FlattenI A helper to flatten arrays. This is very useful as the fixtures are nested from time to time due to the way P2 creates and splits polygons.

func (*PhysicsP2FixtureList) GetFixtureByKey

func (self *PhysicsP2FixtureList) GetFixtureByKey(key string)

GetFixtureByKey Accessor to get either a single fixture by its key.

func (*PhysicsP2FixtureList) GetFixtureByKeyI

func (self *PhysicsP2FixtureList) GetFixtureByKeyI(args ...interface{})

GetFixtureByKeyI Accessor to get either a single fixture by its key.

func (*PhysicsP2FixtureList) GetFixtures

func (self *PhysicsP2FixtureList) GetFixtures(keys []interface{})

GetFixtures Accessor to get either a list of specified fixtures by key or the whole fixture list

func (*PhysicsP2FixtureList) GetFixturesI

func (self *PhysicsP2FixtureList) GetFixturesI(args ...interface{})

GetFixturesI Accessor to get either a list of specified fixtures by key or the whole fixture list

func (*PhysicsP2FixtureList) GetGroup

func (self *PhysicsP2FixtureList) GetGroup(groupID int)

GetGroup Accessor to get a group of fixtures by its group index.

func (*PhysicsP2FixtureList) GetGroupI

func (self *PhysicsP2FixtureList) GetGroupI(args ...interface{})

GetGroupI Accessor to get a group of fixtures by its group index.

func (*PhysicsP2FixtureList) Init

func (self *PhysicsP2FixtureList) Init()

Init empty description

func (*PhysicsP2FixtureList) InitI

func (self *PhysicsP2FixtureList) InitI(args ...interface{})

InitI empty description

func (*PhysicsP2FixtureList) Parse

func (self *PhysicsP2FixtureList) Parse()

Parse Parser for the output of Phaser.Physics.P2.Body#addPhaserPolygon

func (*PhysicsP2FixtureList) ParseI

func (self *PhysicsP2FixtureList) ParseI(args ...interface{})

ParseI Parser for the output of Phaser.Physics.P2.Body#addPhaserPolygon

func (*PhysicsP2FixtureList) SetCategory

func (self *PhysicsP2FixtureList) SetCategory(bit int, fixtureKey string)

SetCategory empty description

func (*PhysicsP2FixtureList) SetCategoryI

func (self *PhysicsP2FixtureList) SetCategoryI(args ...interface{})

SetCategoryI empty description

func (*PhysicsP2FixtureList) SetMask

func (self *PhysicsP2FixtureList) SetMask(bit int, fixtureKey string)

SetMask empty description

func (*PhysicsP2FixtureList) SetMaskI

func (self *PhysicsP2FixtureList) SetMaskI(args ...interface{})

SetMaskI empty description

func (*PhysicsP2FixtureList) SetMaterial

func (self *PhysicsP2FixtureList) SetMaterial(material interface{}, fixtureKey string)

SetMaterial empty description

func (*PhysicsP2FixtureList) SetMaterialI

func (self *PhysicsP2FixtureList) SetMaterialI(args ...interface{})

SetMaterialI empty description

func (*PhysicsP2FixtureList) SetSensor

func (self *PhysicsP2FixtureList) SetSensor(value bool, fixtureKey string)

SetSensor empty description

func (*PhysicsP2FixtureList) SetSensorI

func (self *PhysicsP2FixtureList) SetSensorI(args ...interface{})

SetSensorI empty description

type PhysicsP2GearConstraint

type PhysicsP2GearConstraint struct {
	*js.Object
}

PhysicsP2GearConstraint Connects two bodies at given offset points, letting them rotate relative to each other around this point.

func NewPhysicsP2GearConstraint

func NewPhysicsP2GearConstraint(world *PhysicsP2, bodyA *P2Body, bodyB *P2Body) *PhysicsP2GearConstraint

NewPhysicsP2GearConstraint Connects two bodies at given offset points, letting them rotate relative to each other around this point.

func NewPhysicsP2GearConstraint1O

func NewPhysicsP2GearConstraint1O(world *PhysicsP2, bodyA *P2Body, bodyB *P2Body, angle int) *PhysicsP2GearConstraint

NewPhysicsP2GearConstraint1O Connects two bodies at given offset points, letting them rotate relative to each other around this point.

func NewPhysicsP2GearConstraint2O

func NewPhysicsP2GearConstraint2O(world *PhysicsP2, bodyA *P2Body, bodyB *P2Body, angle int, ratio int) *PhysicsP2GearConstraint

NewPhysicsP2GearConstraint2O Connects two bodies at given offset points, letting them rotate relative to each other around this point.

func NewPhysicsP2GearConstraintI

func NewPhysicsP2GearConstraintI(args ...interface{}) *PhysicsP2GearConstraint

NewPhysicsP2GearConstraintI Connects two bodies at given offset points, letting them rotate relative to each other around this point.

func ToPhysicsP2GearConstraint

func ToPhysicsP2GearConstraint(jsStruct interface{}) *PhysicsP2GearConstraint

PhysicsP2GearConstraint Binding conversion method to PhysicsP2GearConstraint point

func (*PhysicsP2GearConstraint) Game

func (self *PhysicsP2GearConstraint) Game() *Game

Game Local reference to game.

func (*PhysicsP2GearConstraint) SetGameA

func (self *PhysicsP2GearConstraint) SetGameA(member *Game)

SetGameA Local reference to game.

func (*PhysicsP2GearConstraint) SetWorldA

func (self *PhysicsP2GearConstraint) SetWorldA(member *PhysicsP2)

SetWorldA Local reference to P2 World.

func (*PhysicsP2GearConstraint) World

func (self *PhysicsP2GearConstraint) World() *PhysicsP2

World Local reference to P2 World.

type PhysicsP2InversePointProxy

type PhysicsP2InversePointProxy struct {
	*js.Object
}

PhysicsP2InversePointProxy A InversePointProxy is an internal class that allows for direct getter/setter style property access to Arrays and TypedArrays but inverses the values on set.

func NewPhysicsP2InversePointProxy

func NewPhysicsP2InversePointProxy(world *PhysicsP2, destination interface{}) *PhysicsP2InversePointProxy

NewPhysicsP2InversePointProxy A InversePointProxy is an internal class that allows for direct getter/setter style property access to Arrays and TypedArrays but inverses the values on set.

func NewPhysicsP2InversePointProxyI

func NewPhysicsP2InversePointProxyI(args ...interface{}) *PhysicsP2InversePointProxy

NewPhysicsP2InversePointProxyI A InversePointProxy is an internal class that allows for direct getter/setter style property access to Arrays and TypedArrays but inverses the values on set.

func ToPhysicsP2InversePointProxy

func ToPhysicsP2InversePointProxy(jsStruct interface{}) *PhysicsP2InversePointProxy

PhysicsP2InversePointProxy Binding conversion method to PhysicsP2InversePointProxy point

func (*PhysicsP2InversePointProxy) Mx

func (self *PhysicsP2InversePointProxy) Mx() int

Mx The x property of this InversePointProxy get and set in meters.

func (*PhysicsP2InversePointProxy) My

func (self *PhysicsP2InversePointProxy) My() int

My The y property of this InversePointProxy get and set in meters.

func (*PhysicsP2InversePointProxy) SetMxA

func (self *PhysicsP2InversePointProxy) SetMxA(member int)

SetMxA The x property of this InversePointProxy get and set in meters.

func (*PhysicsP2InversePointProxy) SetMyA

func (self *PhysicsP2InversePointProxy) SetMyA(member int)

SetMyA The y property of this InversePointProxy get and set in meters.

func (*PhysicsP2InversePointProxy) SetXA

func (self *PhysicsP2InversePointProxy) SetXA(member int)

SetXA The x property of this InversePointProxy get and set in pixels.

func (*PhysicsP2InversePointProxy) SetYA

func (self *PhysicsP2InversePointProxy) SetYA(member int)

SetYA The y property of this InversePointProxy get and set in pixels.

func (*PhysicsP2InversePointProxy) X

func (self *PhysicsP2InversePointProxy) X() int

X The x property of this InversePointProxy get and set in pixels.

func (*PhysicsP2InversePointProxy) Y

func (self *PhysicsP2InversePointProxy) Y() int

Y The y property of this InversePointProxy get and set in pixels.

type PhysicsP2LockConstraint

type PhysicsP2LockConstraint struct {
	*js.Object
}

PhysicsP2LockConstraint Locks the relative position between two bodies.

func NewPhysicsP2LockConstraint

func NewPhysicsP2LockConstraint(world *PhysicsP2, bodyA *P2Body, bodyB *P2Body) *PhysicsP2LockConstraint

NewPhysicsP2LockConstraint Locks the relative position between two bodies.

func NewPhysicsP2LockConstraint1O

func NewPhysicsP2LockConstraint1O(world *PhysicsP2, bodyA *P2Body, bodyB *P2Body, offset []interface{}) *PhysicsP2LockConstraint

NewPhysicsP2LockConstraint1O Locks the relative position between two bodies.

func NewPhysicsP2LockConstraint2O

func NewPhysicsP2LockConstraint2O(world *PhysicsP2, bodyA *P2Body, bodyB *P2Body, offset []interface{}, angle int) *PhysicsP2LockConstraint

NewPhysicsP2LockConstraint2O Locks the relative position between two bodies.

func NewPhysicsP2LockConstraint3O

func NewPhysicsP2LockConstraint3O(world *PhysicsP2, bodyA *P2Body, bodyB *P2Body, offset []interface{}, angle int, maxForce int) *PhysicsP2LockConstraint

NewPhysicsP2LockConstraint3O Locks the relative position between two bodies.

func NewPhysicsP2LockConstraintI

func NewPhysicsP2LockConstraintI(args ...interface{}) *PhysicsP2LockConstraint

NewPhysicsP2LockConstraintI Locks the relative position between two bodies.

func ToPhysicsP2LockConstraint

func ToPhysicsP2LockConstraint(jsStruct interface{}) *PhysicsP2LockConstraint

PhysicsP2LockConstraint Binding conversion method to PhysicsP2LockConstraint point

func (*PhysicsP2LockConstraint) Game

func (self *PhysicsP2LockConstraint) Game() *Game

Game Local reference to game.

func (*PhysicsP2LockConstraint) SetGameA

func (self *PhysicsP2LockConstraint) SetGameA(member *Game)

SetGameA Local reference to game.

func (*PhysicsP2LockConstraint) SetWorldA

func (self *PhysicsP2LockConstraint) SetWorldA(member *PhysicsP2)

SetWorldA Local reference to P2 World.

func (*PhysicsP2LockConstraint) World

func (self *PhysicsP2LockConstraint) World() *PhysicsP2

World Local reference to P2 World.

type PhysicsP2Material

type PhysicsP2Material struct {
	*js.Object
}

PhysicsP2Material A P2 Material.

\o/ ~ "Because I'm a Material girl"

func NewPhysicsP2Material

func NewPhysicsP2Material(name string) *PhysicsP2Material

NewPhysicsP2Material A P2 Material.

\o/ ~ "Because I'm a Material girl"

func NewPhysicsP2MaterialI

func NewPhysicsP2MaterialI(args ...interface{}) *PhysicsP2Material

NewPhysicsP2MaterialI A P2 Material.

\o/ ~ "Because I'm a Material girl"

func ToPhysicsP2Material

func ToPhysicsP2Material(jsStruct interface{}) *PhysicsP2Material

PhysicsP2Material Binding conversion method to PhysicsP2Material point

func (*PhysicsP2Material) Name

func (self *PhysicsP2Material) Name() string

Name The user defined name given to this Material.

func (*PhysicsP2Material) SetNameA

func (self *PhysicsP2Material) SetNameA(member string)

SetNameA The user defined name given to this Material.

type PhysicsP2PointProxy

type PhysicsP2PointProxy struct {
	*js.Object
}

PhysicsP2PointProxy A PointProxy is an internal class that allows for direct getter/setter style property access to Arrays and TypedArrays.

func NewPhysicsP2PointProxy

func NewPhysicsP2PointProxy(world *PhysicsP2, destination interface{}) *PhysicsP2PointProxy

NewPhysicsP2PointProxy A PointProxy is an internal class that allows for direct getter/setter style property access to Arrays and TypedArrays.

func NewPhysicsP2PointProxyI

func NewPhysicsP2PointProxyI(args ...interface{}) *PhysicsP2PointProxy

NewPhysicsP2PointProxyI A PointProxy is an internal class that allows for direct getter/setter style property access to Arrays and TypedArrays.

func ToPhysicsP2PointProxy

func ToPhysicsP2PointProxy(jsStruct interface{}) *PhysicsP2PointProxy

PhysicsP2PointProxy Binding conversion method to PhysicsP2PointProxy point

func (*PhysicsP2PointProxy) Mx

func (self *PhysicsP2PointProxy) Mx() int

Mx The x property of this PointProxy get and set in meters.

func (*PhysicsP2PointProxy) My

func (self *PhysicsP2PointProxy) My() int

My The x property of this PointProxy get and set in meters.

func (*PhysicsP2PointProxy) SetMxA

func (self *PhysicsP2PointProxy) SetMxA(member int)

SetMxA The x property of this PointProxy get and set in meters.

func (*PhysicsP2PointProxy) SetMyA

func (self *PhysicsP2PointProxy) SetMyA(member int)

SetMyA The x property of this PointProxy get and set in meters.

func (*PhysicsP2PointProxy) SetXA

func (self *PhysicsP2PointProxy) SetXA(member int)

SetXA The x property of this PointProxy get and set in pixels.

func (*PhysicsP2PointProxy) SetYA

func (self *PhysicsP2PointProxy) SetYA(member int)

SetYA The y property of this PointProxy get and set in pixels.

func (*PhysicsP2PointProxy) X

func (self *PhysicsP2PointProxy) X() int

X The x property of this PointProxy get and set in pixels.

func (*PhysicsP2PointProxy) Y

func (self *PhysicsP2PointProxy) Y() int

Y The y property of this PointProxy get and set in pixels.

type PhysicsP2PrismaticConstraint

type PhysicsP2PrismaticConstraint struct {
	*js.Object
}

PhysicsP2PrismaticConstraint Connects two bodies at given offset points, letting them rotate relative to each other around this point.

func NewPhysicsP2PrismaticConstraint

func NewPhysicsP2PrismaticConstraint(world *PhysicsP2, bodyA *P2Body, bodyB *P2Body) *PhysicsP2PrismaticConstraint

NewPhysicsP2PrismaticConstraint Connects two bodies at given offset points, letting them rotate relative to each other around this point.

func NewPhysicsP2PrismaticConstraint1O

func NewPhysicsP2PrismaticConstraint1O(world *PhysicsP2, bodyA *P2Body, bodyB *P2Body, lockRotation bool) *PhysicsP2PrismaticConstraint

NewPhysicsP2PrismaticConstraint1O Connects two bodies at given offset points, letting them rotate relative to each other around this point.

func NewPhysicsP2PrismaticConstraint2O

func NewPhysicsP2PrismaticConstraint2O(world *PhysicsP2, bodyA *P2Body, bodyB *P2Body, lockRotation bool, anchorA []interface{}) *PhysicsP2PrismaticConstraint

NewPhysicsP2PrismaticConstraint2O Connects two bodies at given offset points, letting them rotate relative to each other around this point.

func NewPhysicsP2PrismaticConstraint3O

func NewPhysicsP2PrismaticConstraint3O(world *PhysicsP2, bodyA *P2Body, bodyB *P2Body, lockRotation bool, anchorA []interface{}, anchorB []interface{}) *PhysicsP2PrismaticConstraint

NewPhysicsP2PrismaticConstraint3O Connects two bodies at given offset points, letting them rotate relative to each other around this point.

func NewPhysicsP2PrismaticConstraint4O

func NewPhysicsP2PrismaticConstraint4O(world *PhysicsP2, bodyA *P2Body, bodyB *P2Body, lockRotation bool, anchorA []interface{}, anchorB []interface{}, axis []interface{}) *PhysicsP2PrismaticConstraint

NewPhysicsP2PrismaticConstraint4O Connects two bodies at given offset points, letting them rotate relative to each other around this point.

func NewPhysicsP2PrismaticConstraint5O

func NewPhysicsP2PrismaticConstraint5O(world *PhysicsP2, bodyA *P2Body, bodyB *P2Body, lockRotation bool, anchorA []interface{}, anchorB []interface{}, axis []interface{}, maxForce int) *PhysicsP2PrismaticConstraint

NewPhysicsP2PrismaticConstraint5O Connects two bodies at given offset points, letting them rotate relative to each other around this point.

func NewPhysicsP2PrismaticConstraintI

func NewPhysicsP2PrismaticConstraintI(args ...interface{}) *PhysicsP2PrismaticConstraint

NewPhysicsP2PrismaticConstraintI Connects two bodies at given offset points, letting them rotate relative to each other around this point.

func ToPhysicsP2PrismaticConstraint

func ToPhysicsP2PrismaticConstraint(jsStruct interface{}) *PhysicsP2PrismaticConstraint

PhysicsP2PrismaticConstraint Binding conversion method to PhysicsP2PrismaticConstraint point

func (*PhysicsP2PrismaticConstraint) Game

func (self *PhysicsP2PrismaticConstraint) Game() *Game

Game Local reference to game.

func (*PhysicsP2PrismaticConstraint) SetGameA

func (self *PhysicsP2PrismaticConstraint) SetGameA(member *Game)

SetGameA Local reference to game.

func (*PhysicsP2PrismaticConstraint) SetWorldA

func (self *PhysicsP2PrismaticConstraint) SetWorldA(member *PhysicsP2)

SetWorldA Local reference to P2 World.

func (*PhysicsP2PrismaticConstraint) World

func (self *PhysicsP2PrismaticConstraint) World() *PhysicsP2

World Local reference to P2 World.

type PhysicsP2RevoluteConstraint

type PhysicsP2RevoluteConstraint struct {
	*js.Object
}

PhysicsP2RevoluteConstraint Connects two bodies at given offset points, letting them rotate relative to each other around this point. The pivot points are given in world (pixel) coordinates.

func NewPhysicsP2RevoluteConstraint

func NewPhysicsP2RevoluteConstraint(world *PhysicsP2, bodyA *P2Body, pivotA *Float32Array, bodyB *P2Body, pivotB *Float32Array) *PhysicsP2RevoluteConstraint

NewPhysicsP2RevoluteConstraint Connects two bodies at given offset points, letting them rotate relative to each other around this point. The pivot points are given in world (pixel) coordinates.

func NewPhysicsP2RevoluteConstraint1O

func NewPhysicsP2RevoluteConstraint1O(world *PhysicsP2, bodyA *P2Body, pivotA *Float32Array, bodyB *P2Body, pivotB *Float32Array, maxForce int) *PhysicsP2RevoluteConstraint

NewPhysicsP2RevoluteConstraint1O Connects two bodies at given offset points, letting them rotate relative to each other around this point. The pivot points are given in world (pixel) coordinates.

func NewPhysicsP2RevoluteConstraint2O

func NewPhysicsP2RevoluteConstraint2O(world *PhysicsP2, bodyA *P2Body, pivotA *Float32Array, bodyB *P2Body, pivotB *Float32Array, maxForce int, worldPivot *Float32Array) *PhysicsP2RevoluteConstraint

NewPhysicsP2RevoluteConstraint2O Connects two bodies at given offset points, letting them rotate relative to each other around this point. The pivot points are given in world (pixel) coordinates.

func NewPhysicsP2RevoluteConstraintI

func NewPhysicsP2RevoluteConstraintI(args ...interface{}) *PhysicsP2RevoluteConstraint

NewPhysicsP2RevoluteConstraintI Connects two bodies at given offset points, letting them rotate relative to each other around this point. The pivot points are given in world (pixel) coordinates.

func ToPhysicsP2RevoluteConstraint

func ToPhysicsP2RevoluteConstraint(jsStruct interface{}) *PhysicsP2RevoluteConstraint

PhysicsP2RevoluteConstraint Binding conversion method to PhysicsP2RevoluteConstraint point

func (*PhysicsP2RevoluteConstraint) Game

func (self *PhysicsP2RevoluteConstraint) Game() *Game

Game Local reference to game.

func (*PhysicsP2RevoluteConstraint) SetGameA

func (self *PhysicsP2RevoluteConstraint) SetGameA(member *Game)

SetGameA Local reference to game.

func (*PhysicsP2RevoluteConstraint) SetWorldA

func (self *PhysicsP2RevoluteConstraint) SetWorldA(member *PhysicsP2)

SetWorldA Local reference to P2 World.

func (*PhysicsP2RevoluteConstraint) World

func (self *PhysicsP2RevoluteConstraint) World() *PhysicsP2

World Local reference to P2 World.

type PhysicsP2RotationalSpring

type PhysicsP2RotationalSpring struct {
	*js.Object
}

PhysicsP2RotationalSpring Creates a rotational spring, connecting two bodies. A spring can have a resting length, a stiffness and damping.

func NewPhysicsP2RotationalSpring

func NewPhysicsP2RotationalSpring(world *PhysicsP2, bodyA *P2Body, bodyB *P2Body) *PhysicsP2RotationalSpring

NewPhysicsP2RotationalSpring Creates a rotational spring, connecting two bodies. A spring can have a resting length, a stiffness and damping.

func NewPhysicsP2RotationalSpring1O

func NewPhysicsP2RotationalSpring1O(world *PhysicsP2, bodyA *P2Body, bodyB *P2Body, restAngle int) *PhysicsP2RotationalSpring

NewPhysicsP2RotationalSpring1O Creates a rotational spring, connecting two bodies. A spring can have a resting length, a stiffness and damping.

func NewPhysicsP2RotationalSpring2O

func NewPhysicsP2RotationalSpring2O(world *PhysicsP2, bodyA *P2Body, bodyB *P2Body, restAngle int, stiffness int) *PhysicsP2RotationalSpring

NewPhysicsP2RotationalSpring2O Creates a rotational spring, connecting two bodies. A spring can have a resting length, a stiffness and damping.

func NewPhysicsP2RotationalSpring3O

func NewPhysicsP2RotationalSpring3O(world *PhysicsP2, bodyA *P2Body, bodyB *P2Body, restAngle int, stiffness int, damping int) *PhysicsP2RotationalSpring

NewPhysicsP2RotationalSpring3O Creates a rotational spring, connecting two bodies. A spring can have a resting length, a stiffness and damping.

func NewPhysicsP2RotationalSpringI

func NewPhysicsP2RotationalSpringI(args ...interface{}) *PhysicsP2RotationalSpring

NewPhysicsP2RotationalSpringI Creates a rotational spring, connecting two bodies. A spring can have a resting length, a stiffness and damping.

func ToPhysicsP2RotationalSpring

func ToPhysicsP2RotationalSpring(jsStruct interface{}) *PhysicsP2RotationalSpring

PhysicsP2RotationalSpring Binding conversion method to PhysicsP2RotationalSpring point

func (*PhysicsP2RotationalSpring) Data

Data The actual p2 spring object.

func (*PhysicsP2RotationalSpring) Game

func (self *PhysicsP2RotationalSpring) Game() *Game

Game Local reference to game.

func (*PhysicsP2RotationalSpring) SetDataA

func (self *PhysicsP2RotationalSpring) SetDataA(member *P2RotationalSpring)

SetDataA The actual p2 spring object.

func (*PhysicsP2RotationalSpring) SetGameA

func (self *PhysicsP2RotationalSpring) SetGameA(member *Game)

SetGameA Local reference to game.

func (*PhysicsP2RotationalSpring) SetWorldA

func (self *PhysicsP2RotationalSpring) SetWorldA(member *PhysicsP2)

SetWorldA Local reference to P2 World.

func (*PhysicsP2RotationalSpring) World

func (self *PhysicsP2RotationalSpring) World() *PhysicsP2

World Local reference to P2 World.

type PhysicsP2Spring

type PhysicsP2Spring struct {
	*js.Object
}

PhysicsP2Spring Creates a linear spring, connecting two bodies. A spring can have a resting length, a stiffness and damping.

func NewPhysicsP2Spring

func NewPhysicsP2Spring(world *PhysicsP2, bodyA *P2Body, bodyB *P2Body) *PhysicsP2Spring

NewPhysicsP2Spring Creates a linear spring, connecting two bodies. A spring can have a resting length, a stiffness and damping.

func NewPhysicsP2Spring1O

func NewPhysicsP2Spring1O(world *PhysicsP2, bodyA *P2Body, bodyB *P2Body, restLength int) *PhysicsP2Spring

NewPhysicsP2Spring1O Creates a linear spring, connecting two bodies. A spring can have a resting length, a stiffness and damping.

func NewPhysicsP2Spring2O

func NewPhysicsP2Spring2O(world *PhysicsP2, bodyA *P2Body, bodyB *P2Body, restLength int, stiffness int) *PhysicsP2Spring

NewPhysicsP2Spring2O Creates a linear spring, connecting two bodies. A spring can have a resting length, a stiffness and damping.

func NewPhysicsP2Spring3O

func NewPhysicsP2Spring3O(world *PhysicsP2, bodyA *P2Body, bodyB *P2Body, restLength int, stiffness int, damping int) *PhysicsP2Spring

NewPhysicsP2Spring3O Creates a linear spring, connecting two bodies. A spring can have a resting length, a stiffness and damping.

func NewPhysicsP2Spring4O

func NewPhysicsP2Spring4O(world *PhysicsP2, bodyA *P2Body, bodyB *P2Body, restLength int, stiffness int, damping int, worldA []interface{}) *PhysicsP2Spring

NewPhysicsP2Spring4O Creates a linear spring, connecting two bodies. A spring can have a resting length, a stiffness and damping.

func NewPhysicsP2Spring5O

func NewPhysicsP2Spring5O(world *PhysicsP2, bodyA *P2Body, bodyB *P2Body, restLength int, stiffness int, damping int, worldA []interface{}, worldB []interface{}) *PhysicsP2Spring

NewPhysicsP2Spring5O Creates a linear spring, connecting two bodies. A spring can have a resting length, a stiffness and damping.

func NewPhysicsP2Spring6O

func NewPhysicsP2Spring6O(world *PhysicsP2, bodyA *P2Body, bodyB *P2Body, restLength int, stiffness int, damping int, worldA []interface{}, worldB []interface{}, localA []interface{}) *PhysicsP2Spring

NewPhysicsP2Spring6O Creates a linear spring, connecting two bodies. A spring can have a resting length, a stiffness and damping.

func NewPhysicsP2Spring7O

func NewPhysicsP2Spring7O(world *PhysicsP2, bodyA *P2Body, bodyB *P2Body, restLength int, stiffness int, damping int, worldA []interface{}, worldB []interface{}, localA []interface{}, localB []interface{}) *PhysicsP2Spring

NewPhysicsP2Spring7O Creates a linear spring, connecting two bodies. A spring can have a resting length, a stiffness and damping.

func NewPhysicsP2SpringI

func NewPhysicsP2SpringI(args ...interface{}) *PhysicsP2Spring

NewPhysicsP2SpringI Creates a linear spring, connecting two bodies. A spring can have a resting length, a stiffness and damping.

func ToPhysicsP2Spring

func ToPhysicsP2Spring(jsStruct interface{}) *PhysicsP2Spring

PhysicsP2Spring Binding conversion method to PhysicsP2Spring point

func (*PhysicsP2Spring) Data

func (self *PhysicsP2Spring) Data() *P2LinearSpring

Data The actual p2 spring object.

func (*PhysicsP2Spring) Game

func (self *PhysicsP2Spring) Game() *Game

Game Local reference to game.

func (*PhysicsP2Spring) SetDataA

func (self *PhysicsP2Spring) SetDataA(member *P2LinearSpring)

SetDataA The actual p2 spring object.

func (*PhysicsP2Spring) SetGameA

func (self *PhysicsP2Spring) SetGameA(member *Game)

SetGameA Local reference to game.

func (*PhysicsP2Spring) SetWorldA

func (self *PhysicsP2Spring) SetWorldA(member *PhysicsP2)

SetWorldA Local reference to P2 World.

func (*PhysicsP2Spring) World

func (self *PhysicsP2Spring) World() *PhysicsP2

World Local reference to P2 World.

type PixiFastShader

type PixiFastShader struct {
	*js.Object
}

PixiFastShader empty description

func NewPixiFastShader

func NewPixiFastShader(gl *WebGLContext) *PixiFastShader

NewPixiFastShader empty description

func NewPixiFastShaderI

func NewPixiFastShaderI(args ...interface{}) *PixiFastShader

NewPixiFastShaderI empty description

func ToPixiFastShader

func ToPixiFastShader(jsStruct interface{}) *PixiFastShader

PixiFastShader Binding conversion method to PixiFastShader point

func (*PixiFastShader) Destroy

func (self *PixiFastShader) Destroy()

Destroy Destroys the shader.

func (*PixiFastShader) DestroyI

func (self *PixiFastShader) DestroyI(args ...interface{})

DestroyI Destroys the shader.

func (*PixiFastShader) FragmentSrc

func (self *PixiFastShader) FragmentSrc() []interface{}

FragmentSrc The fragment shader.

func (*PixiFastShader) Gl

func (self *PixiFastShader) Gl() WebGLContext

Gl empty description

func (*PixiFastShader) Init

func (self *PixiFastShader) Init()

Init Initialises the shader.

func (*PixiFastShader) InitI

func (self *PixiFastShader) InitI(args ...interface{})

InitI Initialises the shader.

func (*PixiFastShader) Program

func (self *PixiFastShader) Program() interface{}

Program The WebGL program.

func (*PixiFastShader) SetFragmentSrcA

func (self *PixiFastShader) SetFragmentSrcA(member []interface{})

SetFragmentSrcA The fragment shader.

func (*PixiFastShader) SetGlA

func (self *PixiFastShader) SetGlA(member WebGLContext)

SetGlA empty description

func (*PixiFastShader) SetProgramA

func (self *PixiFastShader) SetProgramA(member interface{})

SetProgramA The WebGL program.

func (*PixiFastShader) SetTextureCountA

func (self *PixiFastShader) SetTextureCountA(member int)

SetTextureCountA A local texture counter for multi-texture shaders.

func (*PixiFastShader) SetVertexSrcA

func (self *PixiFastShader) SetVertexSrcA(member []interface{})

SetVertexSrcA The vertex shader.

func (*PixiFastShader) TextureCount

func (self *PixiFastShader) TextureCount() int

TextureCount A local texture counter for multi-texture shaders.

func (*PixiFastShader) VertexSrc

func (self *PixiFastShader) VertexSrc() []interface{}

VertexSrc The vertex shader.

type PixiShader

type PixiShader struct {
	*js.Object
}

PixiShader empty description

func NewPixiShader

func NewPixiShader(gl *WebGLContext) *PixiShader

NewPixiShader empty description

func NewPixiShaderI

func NewPixiShaderI(args ...interface{}) *PixiShader

NewPixiShaderI empty description

func ToPixiShader

func ToPixiShader(jsStruct interface{}) *PixiShader

PixiShader Binding conversion method to PixiShader point

func (*PixiShader) DefaultVertexSrc

func (self *PixiShader) DefaultVertexSrc() string

DefaultVertexSrc The Default Vertex shader source.

func (*PixiShader) Destroy

func (self *PixiShader) Destroy()

Destroy Destroys the shader.

func (*PixiShader) DestroyI

func (self *PixiShader) DestroyI(args ...interface{})

DestroyI Destroys the shader.

func (*PixiShader) Dirty

func (self *PixiShader) Dirty() bool

Dirty A dirty flag

func (*PixiShader) FragmentSrc

func (self *PixiShader) FragmentSrc() []interface{}

FragmentSrc The fragment shader.

func (*PixiShader) Gl

func (self *PixiShader) Gl() WebGLContext

Gl empty description

func (*PixiShader) Init

func (self *PixiShader) Init()

Init Initialises the shader.

func (*PixiShader) InitI

func (self *PixiShader) InitI(args ...interface{})

InitI Initialises the shader.

func (*PixiShader) InitSampler2D

func (self *PixiShader) InitSampler2D()

InitSampler2D Initialises a Sampler2D uniform (which may only be available later on after initUniforms once the texture has loaded)

func (*PixiShader) InitSampler2DI

func (self *PixiShader) InitSampler2DI(args ...interface{})

InitSampler2DI Initialises a Sampler2D uniform (which may only be available later on after initUniforms once the texture has loaded)

func (*PixiShader) InitUniforms

func (self *PixiShader) InitUniforms()

InitUniforms Initialises the shader uniform values.

Uniforms are specified in the GLSL_ES Specification: http://www.khronos.org/registry/webgl/specs/latest/1.0/

http://www.khronos.org/registry/gles/specs/2.0/GLSL_ES_Specification_1.0.17.pdf

func (*PixiShader) InitUniformsI

func (self *PixiShader) InitUniformsI(args ...interface{})

InitUniformsI Initialises the shader uniform values.

Uniforms are specified in the GLSL_ES Specification: http://www.khronos.org/registry/webgl/specs/latest/1.0/

http://www.khronos.org/registry/gles/specs/2.0/GLSL_ES_Specification_1.0.17.pdf

func (*PixiShader) Program

func (self *PixiShader) Program() interface{}

Program The WebGL program.

func (*PixiShader) SetDefaultVertexSrcA

func (self *PixiShader) SetDefaultVertexSrcA(member string)

SetDefaultVertexSrcA The Default Vertex shader source.

func (*PixiShader) SetDirtyA

func (self *PixiShader) SetDirtyA(member bool)

SetDirtyA A dirty flag

func (*PixiShader) SetFragmentSrcA

func (self *PixiShader) SetFragmentSrcA(member []interface{})

SetFragmentSrcA The fragment shader.

func (*PixiShader) SetGlA

func (self *PixiShader) SetGlA(member WebGLContext)

SetGlA empty description

func (*PixiShader) SetProgramA

func (self *PixiShader) SetProgramA(member interface{})

SetProgramA The WebGL program.

func (*PixiShader) SetTextureCountA

func (self *PixiShader) SetTextureCountA(member int)

SetTextureCountA A local texture counter for multi-texture shaders.

func (*PixiShader) SyncUniforms

func (self *PixiShader) SyncUniforms()

SyncUniforms Updates the shader uniform values.

func (*PixiShader) SyncUniformsI

func (self *PixiShader) SyncUniformsI(args ...interface{})

SyncUniformsI Updates the shader uniform values.

func (*PixiShader) TextureCount

func (self *PixiShader) TextureCount() int

TextureCount A local texture counter for multi-texture shaders.

type Plugin

type Plugin struct {
	*js.Object
}

Plugin This is a base Plugin template to use for any Phaser plugin development.

func NewPlugin

func NewPlugin(game *Game, parent interface{}) *Plugin

NewPlugin This is a base Plugin template to use for any Phaser plugin development.

func NewPluginI

func NewPluginI(args ...interface{}) *Plugin

NewPluginI This is a base Plugin template to use for any Phaser plugin development.

func ToPlugin

func ToPlugin(jsStruct interface{}) *Plugin

Plugin Binding conversion method to Plugin point

func (*Plugin) Active

func (self *Plugin) Active() bool

Active A Plugin with active=true has its preUpdate and update methods called by the parent, otherwise they are skipped.

func (*Plugin) Destroy

func (self *Plugin) Destroy()

Destroy Clear down this Plugin and null out references

func (*Plugin) DestroyI

func (self *Plugin) DestroyI(args ...interface{})

DestroyI Clear down this Plugin and null out references

func (*Plugin) Game

func (self *Plugin) Game() *Game

Game A reference to the currently running game.

func (*Plugin) HasPostRender

func (self *Plugin) HasPostRender() bool

HasPostRender A flag to indicate if this plugin has a postRender method.

func (*Plugin) HasPostUpdate

func (self *Plugin) HasPostUpdate() bool

HasPostUpdate A flag to indicate if this plugin has a postUpdate method.

func (*Plugin) HasPreUpdate

func (self *Plugin) HasPreUpdate() bool

HasPreUpdate A flag to indicate if this plugin has a preUpdate method.

func (*Plugin) HasRender

func (self *Plugin) HasRender() bool

HasRender A flag to indicate if this plugin has a render method.

func (*Plugin) HasUpdate

func (self *Plugin) HasUpdate() bool

HasUpdate A flag to indicate if this plugin has an update method.

func (*Plugin) Parent

func (self *Plugin) Parent() interface{}

Parent The parent of this plugin. If added to the PluginManager the parent will be set to that, otherwise it will be null.

func (*Plugin) PostRender

func (self *Plugin) PostRender()

PostRender Post-render is called after the Game Renderer and State.render have run. It is only called if visible is set to true.

func (*Plugin) PostRenderI

func (self *Plugin) PostRenderI(args ...interface{})

PostRenderI Post-render is called after the Game Renderer and State.render have run. It is only called if visible is set to true.

func (*Plugin) PreUpdate

func (self *Plugin) PreUpdate()

PreUpdate Pre-update is called at the very start of the update cycle, before any other subsystems have been updated (including Physics). It is only called if active is set to true.

func (*Plugin) PreUpdateI

func (self *Plugin) PreUpdateI(args ...interface{})

PreUpdateI Pre-update is called at the very start of the update cycle, before any other subsystems have been updated (including Physics). It is only called if active is set to true.

func (*Plugin) Render

func (self *Plugin) Render()

Render Render is called right after the Game Renderer completes, but before the State.render. It is only called if visible is set to true.

func (*Plugin) RenderI

func (self *Plugin) RenderI(args ...interface{})

RenderI Render is called right after the Game Renderer completes, but before the State.render. It is only called if visible is set to true.

func (*Plugin) SetActiveA

func (self *Plugin) SetActiveA(member bool)

SetActiveA A Plugin with active=true has its preUpdate and update methods called by the parent, otherwise they are skipped.

func (*Plugin) SetGameA

func (self *Plugin) SetGameA(member *Game)

SetGameA A reference to the currently running game.

func (*Plugin) SetHasPostRenderA

func (self *Plugin) SetHasPostRenderA(member bool)

SetHasPostRenderA A flag to indicate if this plugin has a postRender method.

func (*Plugin) SetHasPostUpdateA

func (self *Plugin) SetHasPostUpdateA(member bool)

SetHasPostUpdateA A flag to indicate if this plugin has a postUpdate method.

func (*Plugin) SetHasPreUpdateA

func (self *Plugin) SetHasPreUpdateA(member bool)

SetHasPreUpdateA A flag to indicate if this plugin has a preUpdate method.

func (*Plugin) SetHasRenderA

func (self *Plugin) SetHasRenderA(member bool)

SetHasRenderA A flag to indicate if this plugin has a render method.

func (*Plugin) SetHasUpdateA

func (self *Plugin) SetHasUpdateA(member bool)

SetHasUpdateA A flag to indicate if this plugin has an update method.

func (*Plugin) SetParentA

func (self *Plugin) SetParentA(member interface{})

SetParentA The parent of this plugin. If added to the PluginManager the parent will be set to that, otherwise it will be null.

func (*Plugin) SetVisibleA

func (self *Plugin) SetVisibleA(member bool)

SetVisibleA A Plugin with visible=true has its render and postRender methods called by the parent, otherwise they are skipped.

func (*Plugin) Update

func (self *Plugin) Update()

Update Update is called after all the core subsystems (Input, Tweens, Sound, etc) and the State have updated, but before the render. It is only called if active is set to true.

func (*Plugin) UpdateI

func (self *Plugin) UpdateI(args ...interface{})

UpdateI Update is called after all the core subsystems (Input, Tweens, Sound, etc) and the State have updated, but before the render. It is only called if active is set to true.

func (*Plugin) Visible

func (self *Plugin) Visible() bool

Visible A Plugin with visible=true has its render and postRender methods called by the parent, otherwise they are skipped.

type PluginManager

type PluginManager struct {
	*js.Object
}

PluginManager The Plugin Manager is responsible for the loading, running and unloading of Phaser Plugins.

func NewPluginManager

func NewPluginManager(game *Game) *PluginManager

NewPluginManager The Plugin Manager is responsible for the loading, running and unloading of Phaser Plugins.

func NewPluginManagerI

func NewPluginManagerI(args ...interface{}) *PluginManager

NewPluginManagerI The Plugin Manager is responsible for the loading, running and unloading of Phaser Plugins.

func ToPluginManager

func ToPluginManager(jsStruct interface{}) *PluginManager

PluginManager Binding conversion method to PluginManager point

func (*PluginManager) Add

func (self *PluginManager) Add(plugin interface{}, parameter interface{}) *Plugin

Add Add a new Plugin into the PluginManager. The Plugin must have 2 properties: game and parent. Plugin.game is set to the game reference the PluginManager uses, and parent is set to the PluginManager.

func (*PluginManager) AddI

func (self *PluginManager) AddI(args ...interface{}) *Plugin

AddI Add a new Plugin into the PluginManager. The Plugin must have 2 properties: game and parent. Plugin.game is set to the game reference the PluginManager uses, and parent is set to the PluginManager.

func (*PluginManager) Destroy

func (self *PluginManager) Destroy()

Destroy Clear down this PluginManager, calls destroy on every plugin and nulls out references.

func (*PluginManager) DestroyI

func (self *PluginManager) DestroyI(args ...interface{})

DestroyI Clear down this PluginManager, calls destroy on every plugin and nulls out references.

func (*PluginManager) Game

func (self *PluginManager) Game() *Game

Game A reference to the currently running game.

func (*PluginManager) Plugins

func (self *PluginManager) Plugins() []Plugin

Plugins An array of all the plugins being managed by this PluginManager.

func (*PluginManager) PostRender

func (self *PluginManager) PostRender()

PostRender Post-render is called after the Game Renderer and State.render have run. It only calls plugins who have visible=true.

func (*PluginManager) PostRenderI

func (self *PluginManager) PostRenderI(args ...interface{})

PostRenderI Post-render is called after the Game Renderer and State.render have run. It only calls plugins who have visible=true.

func (*PluginManager) PostUpdate

func (self *PluginManager) PostUpdate()

PostUpdate PostUpdate is the last thing to be called before the world render. In particular, it is called after the world postUpdate, which means the camera has been adjusted. It only calls plugins who have active=true.

func (*PluginManager) PostUpdateI

func (self *PluginManager) PostUpdateI(args ...interface{})

PostUpdateI PostUpdate is the last thing to be called before the world render. In particular, it is called after the world postUpdate, which means the camera has been adjusted. It only calls plugins who have active=true.

func (*PluginManager) PreUpdate

func (self *PluginManager) PreUpdate()

PreUpdate Pre-update is called at the very start of the update cycle, before any other subsystems have been updated (including Physics). It only calls plugins who have active=true.

func (*PluginManager) PreUpdateI

func (self *PluginManager) PreUpdateI(args ...interface{})

PreUpdateI Pre-update is called at the very start of the update cycle, before any other subsystems have been updated (including Physics). It only calls plugins who have active=true.

func (*PluginManager) Remove

func (self *PluginManager) Remove(plugin *Plugin)

Remove Remove a Plugin from the PluginManager. It calls Plugin.destroy on the plugin before removing it from the manager.

func (*PluginManager) Remove1O

func (self *PluginManager) Remove1O(plugin *Plugin, destroy bool)

Remove1O Remove a Plugin from the PluginManager. It calls Plugin.destroy on the plugin before removing it from the manager.

func (*PluginManager) RemoveAll

func (self *PluginManager) RemoveAll()

RemoveAll Remove all Plugins from the PluginManager. It calls Plugin.destroy on every plugin before removing it from the manager.

func (*PluginManager) RemoveAllI

func (self *PluginManager) RemoveAllI(args ...interface{})

RemoveAllI Remove all Plugins from the PluginManager. It calls Plugin.destroy on every plugin before removing it from the manager.

func (*PluginManager) RemoveI

func (self *PluginManager) RemoveI(args ...interface{})

RemoveI Remove a Plugin from the PluginManager. It calls Plugin.destroy on the plugin before removing it from the manager.

func (*PluginManager) Render

func (self *PluginManager) Render()

Render Render is called right after the Game Renderer completes, but before the State.render. It only calls plugins who have visible=true.

func (*PluginManager) RenderI

func (self *PluginManager) RenderI(args ...interface{})

RenderI Render is called right after the Game Renderer completes, but before the State.render. It only calls plugins who have visible=true.

func (*PluginManager) SetGameA

func (self *PluginManager) SetGameA(member *Game)

SetGameA A reference to the currently running game.

func (*PluginManager) SetPluginsA

func (self *PluginManager) SetPluginsA(member []Plugin)

SetPluginsA An array of all the plugins being managed by this PluginManager.

func (*PluginManager) Update

func (self *PluginManager) Update()

Update Update is called after all the core subsystems (Input, Tweens, Sound, etc) and the State have updated, but before the render. It only calls plugins who have active=true.

func (*PluginManager) UpdateI

func (self *PluginManager) UpdateI(args ...interface{})

UpdateI Update is called after all the core subsystems (Input, Tweens, Sound, etc) and the State have updated, but before the render. It only calls plugins who have active=true.

type Point

type Point struct {
	*js.Object
}

Point A Point object represents a location in a two-dimensional coordinate system, where x represents the horizontal axis and y represents the vertical axis. The following code creates a point at (0,0): `var myPoint = new Phaser.Point();` You can also use them as 2D Vectors and you'll find different vector related methods in this class.

func NewPoint

func NewPoint() *Point

NewPoint A Point object represents a location in a two-dimensional coordinate system, where x represents the horizontal axis and y represents the vertical axis. The following code creates a point at (0,0): `var myPoint = new Phaser.Point();` You can also use them as 2D Vectors and you'll find different vector related methods in this class.

func NewPoint1O

func NewPoint1O(x int) *Point

NewPoint1O A Point object represents a location in a two-dimensional coordinate system, where x represents the horizontal axis and y represents the vertical axis. The following code creates a point at (0,0): `var myPoint = new Phaser.Point();` You can also use them as 2D Vectors and you'll find different vector related methods in this class.

func NewPoint2O

func NewPoint2O(x int, y int) *Point

NewPoint2O A Point object represents a location in a two-dimensional coordinate system, where x represents the horizontal axis and y represents the vertical axis. The following code creates a point at (0,0): `var myPoint = new Phaser.Point();` You can also use them as 2D Vectors and you'll find different vector related methods in this class.

func NewPointI

func NewPointI(args ...interface{}) *Point

NewPointI A Point object represents a location in a two-dimensional coordinate system, where x represents the horizontal axis and y represents the vertical axis. The following code creates a point at (0,0): `var myPoint = new Phaser.Point();` You can also use them as 2D Vectors and you'll find different vector related methods in this class.

func ToPoint

func ToPoint(jsStruct interface{}) *Point

Point Binding conversion method to Point point

func (*Point) Add

func (self *Point) Add(x int, y int) *Point

Add Adds the given x and y values to this Point.

func (*Point) AddI

func (self *Point) AddI(args ...interface{}) *Point

AddI Adds the given x and y values to this Point.

func (*Point) Angle

func (self *Point) Angle(a interface{}) int

Angle Returns the angle between this Point object and another object with public x and y properties.

func (*Point) Angle1O

func (self *Point) Angle1O(a interface{}, asDegrees bool) int

Angle1O Returns the angle between this Point object and another object with public x and y properties.

func (*Point) AngleI

func (self *Point) AngleI(args ...interface{}) int

AngleI Returns the angle between this Point object and another object with public x and y properties.

func (*Point) Ceil

func (self *Point) Ceil() *Point

Ceil Math.ceil() both the x and y properties of this Point.

func (*Point) CeilI

func (self *Point) CeilI(args ...interface{}) *Point

CeilI Math.ceil() both the x and y properties of this Point.

func (*Point) Centroid

func (self *Point) Centroid(points []Point) *Point

Centroid Calculates centroid (or midpoint) from an array of points. If only one point is provided, that point is returned.

func (*Point) Centroid1O

func (self *Point) Centroid1O(points []Point, out *Point) *Point

Centroid1O Calculates centroid (or midpoint) from an array of points. If only one point is provided, that point is returned.

func (*Point) CentroidI

func (self *Point) CentroidI(args ...interface{}) *Point

CentroidI Calculates centroid (or midpoint) from an array of points. If only one point is provided, that point is returned.

func (*Point) Clamp

func (self *Point) Clamp(min int, max int) *Point

Clamp Clamps this Point object values to be between the given min and max.

func (*Point) ClampI

func (self *Point) ClampI(args ...interface{}) *Point

ClampI Clamps this Point object values to be between the given min and max.

func (*Point) ClampX

func (self *Point) ClampX(min int, max int) *Point

ClampX Clamps the x value of this Point to be between the given min and max.

func (*Point) ClampXI

func (self *Point) ClampXI(args ...interface{}) *Point

ClampXI Clamps the x value of this Point to be between the given min and max.

func (*Point) ClampY

func (self *Point) ClampY(min int, max int) *Point

ClampY Clamps the y value of this Point to be between the given min and max

func (*Point) ClampYI

func (self *Point) ClampYI(args ...interface{}) *Point

ClampYI Clamps the y value of this Point to be between the given min and max

func (*Point) Clone

func (self *Point) Clone() *Point

Clone Creates a copy of the given Point.

func (*Point) Clone1O

func (self *Point) Clone1O(output *Point) *Point

Clone1O Creates a copy of the given Point.

func (*Point) CloneI

func (self *Point) CloneI(args ...interface{}) *Point

CloneI Creates a copy of the given Point.

func (*Point) CopyFrom

func (self *Point) CopyFrom(source interface{}) *Point

CopyFrom Copies the x and y properties from any given object to this Point.

func (*Point) CopyFromI

func (self *Point) CopyFromI(args ...interface{}) *Point

CopyFromI Copies the x and y properties from any given object to this Point.

func (*Point) CopyTo

func (self *Point) CopyTo(dest interface{}) interface{}

CopyTo Copies the x and y properties from this Point to any given object.

func (*Point) CopyToI

func (self *Point) CopyToI(args ...interface{}) interface{}

CopyToI Copies the x and y properties from this Point to any given object.

func (*Point) Cross

func (self *Point) Cross(a *Point) int

Cross The cross product of this and another Point object.

func (*Point) CrossI

func (self *Point) CrossI(args ...interface{}) int

CrossI The cross product of this and another Point object.

func (*Point) Distance

func (self *Point) Distance(dest interface{}) int

Distance Returns the distance of this Point object to the given object (can be a Circle, Point or anything with x/y properties)

func (*Point) Distance1O

func (self *Point) Distance1O(dest interface{}, round bool) int

Distance1O Returns the distance of this Point object to the given object (can be a Circle, Point or anything with x/y properties)

func (*Point) DistanceI

func (self *Point) DistanceI(args ...interface{}) int

DistanceI Returns the distance of this Point object to the given object (can be a Circle, Point or anything with x/y properties)

func (*Point) Divide

func (self *Point) Divide(x int, y int) *Point

Divide Divides Point.x and Point.y by the given x and y values.

func (*Point) DivideI

func (self *Point) DivideI(args ...interface{}) *Point

DivideI Divides Point.x and Point.y by the given x and y values.

func (*Point) Dot

func (self *Point) Dot(a *Point) int

Dot The dot product of this and another Point object.

func (*Point) DotI

func (self *Point) DotI(args ...interface{}) int

DotI The dot product of this and another Point object.

func (*Point) Equals

func (self *Point) Equals(a interface{}) bool

Equals Determines whether the given objects x/y values are equal to this Point object.

func (*Point) EqualsI

func (self *Point) EqualsI(args ...interface{}) bool

EqualsI Determines whether the given objects x/y values are equal to this Point object.

func (*Point) Floor

func (self *Point) Floor() *Point

Floor Math.floor() both the x and y properties of this Point.

func (*Point) FloorI

func (self *Point) FloorI(args ...interface{}) *Point

FloorI Math.floor() both the x and y properties of this Point.

func (*Point) GetMagnitude

func (self *Point) GetMagnitude() int

GetMagnitude Calculates the length of the Point object.

func (*Point) GetMagnitudeI

func (self *Point) GetMagnitudeI(args ...interface{}) int

GetMagnitudeI Calculates the length of the Point object.

func (*Point) GetMagnitudeSq

func (self *Point) GetMagnitudeSq() int

GetMagnitudeSq Calculates the length squared of the Point object.

func (*Point) GetMagnitudeSqI

func (self *Point) GetMagnitudeSqI(args ...interface{}) int

GetMagnitudeSqI Calculates the length squared of the Point object.

func (*Point) Interpolate

func (self *Point) Interpolate(a *Point, b *Point, f int) *Point

Interpolate Interpolates the two given Points, based on the `f` value (between 0 and 1) and returns a new Point.

func (*Point) Interpolate1O

func (self *Point) Interpolate1O(a *Point, b *Point, f int, out *Point) *Point

Interpolate1O Interpolates the two given Points, based on the `f` value (between 0 and 1) and returns a new Point.

func (*Point) InterpolateI

func (self *Point) InterpolateI(args ...interface{}) *Point

InterpolateI Interpolates the two given Points, based on the `f` value (between 0 and 1) and returns a new Point.

func (*Point) Invert

func (self *Point) Invert() *Point

Invert Inverts the x and y values of this Point

func (*Point) InvertI

func (self *Point) InvertI(args ...interface{}) *Point

InvertI Inverts the x and y values of this Point

func (*Point) IsZero

func (self *Point) IsZero() bool

IsZero Determine if this point is at 0,0.

func (*Point) IsZeroI

func (self *Point) IsZeroI(args ...interface{}) bool

IsZeroI Determine if this point is at 0,0.

func (*Point) Multiply

func (self *Point) Multiply(x int, y int) *Point

Multiply Multiplies Point.x and Point.y by the given x and y values. Sometimes known as `Scale`.

func (*Point) MultiplyAdd

func (self *Point) MultiplyAdd(a *Point, b *Point, s int) *Point

MultiplyAdd Adds two 2D Points together and multiplies the result by the given scalar.

func (*Point) MultiplyAdd1O

func (self *Point) MultiplyAdd1O(a *Point, b *Point, s int, out *Point) *Point

MultiplyAdd1O Adds two 2D Points together and multiplies the result by the given scalar.

func (*Point) MultiplyAddI

func (self *Point) MultiplyAddI(args ...interface{}) *Point

MultiplyAddI Adds two 2D Points together and multiplies the result by the given scalar.

func (*Point) MultiplyI

func (self *Point) MultiplyI(args ...interface{}) *Point

MultiplyI Multiplies Point.x and Point.y by the given x and y values. Sometimes known as `Scale`.

func (*Point) Negative

func (self *Point) Negative(a *Point) *Point

Negative Creates a negative Point.

func (*Point) Negative1O

func (self *Point) Negative1O(a *Point, out *Point) *Point

Negative1O Creates a negative Point.

func (*Point) NegativeI

func (self *Point) NegativeI(args ...interface{}) *Point

NegativeI Creates a negative Point.

func (*Point) NormalRightHand

func (self *Point) NormalRightHand() *Point

NormalRightHand Right-hand normalize (make unit length) this Point.

func (*Point) NormalRightHandI

func (self *Point) NormalRightHandI(args ...interface{}) *Point

NormalRightHandI Right-hand normalize (make unit length) this Point.

func (*Point) Normalize

func (self *Point) Normalize() *Point

Normalize Alters the Point object so that its length is 1, but it retains the same direction.

func (*Point) NormalizeI

func (self *Point) NormalizeI(args ...interface{}) *Point

NormalizeI Alters the Point object so that its length is 1, but it retains the same direction.

func (*Point) Parse

func (self *Point) Parse(obj interface{}) *Point

Parse Parses an object for x and/or y properties and returns a new Phaser.Point with matching values. If the object doesn't contain those properties a Point with x/y of zero will be returned.

func (*Point) Parse1O

func (self *Point) Parse1O(obj interface{}, xProp string) *Point

Parse1O Parses an object for x and/or y properties and returns a new Phaser.Point with matching values. If the object doesn't contain those properties a Point with x/y of zero will be returned.

func (*Point) Parse2O

func (self *Point) Parse2O(obj interface{}, xProp string, yProp string) *Point

Parse2O Parses an object for x and/or y properties and returns a new Phaser.Point with matching values. If the object doesn't contain those properties a Point with x/y of zero will be returned.

func (*Point) ParseI

func (self *Point) ParseI(args ...interface{}) *Point

ParseI Parses an object for x and/or y properties and returns a new Phaser.Point with matching values. If the object doesn't contain those properties a Point with x/y of zero will be returned.

func (*Point) Perp

func (self *Point) Perp() *Point

Perp Make this Point perpendicular (90 degrees rotation)

func (*Point) PerpI

func (self *Point) PerpI(args ...interface{}) *Point

PerpI Make this Point perpendicular (90 degrees rotation)

func (*Point) Project

func (self *Point) Project(a *Point, b *Point) *Point

Project Project two Points onto another Point.

func (*Point) Project1O

func (self *Point) Project1O(a *Point, b *Point, out *Point) *Point

Project1O Project two Points onto another Point.

func (*Point) ProjectI

func (self *Point) ProjectI(args ...interface{}) *Point

ProjectI Project two Points onto another Point.

func (*Point) ProjectUnit

func (self *Point) ProjectUnit(a *Point, b *Point) *Point

ProjectUnit Project two Points onto a Point of unit length.

func (*Point) ProjectUnit1O

func (self *Point) ProjectUnit1O(a *Point, b *Point, out *Point) *Point

ProjectUnit1O Project two Points onto a Point of unit length.

func (*Point) ProjectUnitI

func (self *Point) ProjectUnitI(args ...interface{}) *Point

ProjectUnitI Project two Points onto a Point of unit length.

func (*Point) Rotate

func (self *Point) Rotate(x int, y int, angle int) *Point

Rotate Rotates this Point around the x/y coordinates given to the desired angle.

func (*Point) Rotate1O

func (self *Point) Rotate1O(x int, y int, angle int, asDegrees bool) *Point

Rotate1O Rotates this Point around the x/y coordinates given to the desired angle.

func (*Point) Rotate2O

func (self *Point) Rotate2O(x int, y int, angle int, asDegrees bool, distance int) *Point

Rotate2O Rotates this Point around the x/y coordinates given to the desired angle.

func (*Point) RotateI

func (self *Point) RotateI(args ...interface{}) *Point

RotateI Rotates this Point around the x/y coordinates given to the desired angle.

func (*Point) Rperp

func (self *Point) Rperp() *Point

Rperp Make this Point perpendicular (-90 degrees rotation)

func (*Point) RperpI

func (self *Point) RperpI(args ...interface{}) *Point

RperpI Make this Point perpendicular (-90 degrees rotation)

func (*Point) Set

func (self *Point) Set(x int) *Point

Set Sets the `x` and `y` values of this Point object to the given values. If you omit the `y` value then the `x` value will be applied to both, for example: `Point.set(2)` is the same as `Point.set(2, 2)`

func (*Point) Set1O

func (self *Point) Set1O(x int, y int) *Point

Set1O Sets the `x` and `y` values of this Point object to the given values. If you omit the `y` value then the `x` value will be applied to both, for example: `Point.set(2)` is the same as `Point.set(2, 2)`

func (*Point) SetI

func (self *Point) SetI(args ...interface{}) *Point

SetI Sets the `x` and `y` values of this Point object to the given values. If you omit the `y` value then the `x` value will be applied to both, for example: `Point.set(2)` is the same as `Point.set(2, 2)`

func (*Point) SetMagnitude

func (self *Point) SetMagnitude(magnitude int) *Point

SetMagnitude Alters the length of the Point without changing the direction.

func (*Point) SetMagnitudeI

func (self *Point) SetMagnitudeI(args ...interface{}) *Point

SetMagnitudeI Alters the length of the Point without changing the direction.

func (*Point) SetTo

func (self *Point) SetTo(x int) *Point

SetTo Sets the `x` and `y` values of this Point object to the given values. If you omit the `y` value then the `x` value will be applied to both, for example: `Point.setTo(2)` is the same as `Point.setTo(2, 2)`

func (*Point) SetTo1O

func (self *Point) SetTo1O(x int, y int) *Point

SetTo1O Sets the `x` and `y` values of this Point object to the given values. If you omit the `y` value then the `x` value will be applied to both, for example: `Point.setTo(2)` is the same as `Point.setTo(2, 2)`

func (*Point) SetToI

func (self *Point) SetToI(args ...interface{}) *Point

SetToI Sets the `x` and `y` values of this Point object to the given values. If you omit the `y` value then the `x` value will be applied to both, for example: `Point.setTo(2)` is the same as `Point.setTo(2, 2)`

func (*Point) SetTypeA

func (self *Point) SetTypeA(member int)

SetTypeA The const type of this object.

func (*Point) SetXA

func (self *Point) SetXA(member int)

SetXA The x value of the point.

func (*Point) SetYA

func (self *Point) SetYA(member int)

SetYA The y value of the point.

func (*Point) Subtract

func (self *Point) Subtract(x int, y int) *Point

Subtract Subtracts the given x and y values from this Point.

func (*Point) SubtractI

func (self *Point) SubtractI(args ...interface{}) *Point

SubtractI Subtracts the given x and y values from this Point.

func (*Point) ToString

func (self *Point) ToString() string

ToString Returns a string representation of this object.

func (*Point) ToStringI

func (self *Point) ToStringI(args ...interface{}) string

ToStringI Returns a string representation of this object.

func (*Point) Type

func (self *Point) Type() int

Type The const type of this object.

func (*Point) X

func (self *Point) X() int

X The x value of the point.

func (*Point) Y

func (self *Point) Y() int

Y The y value of the point.

type Pointer

type Pointer struct {
	*js.Object
}

Pointer A Pointer object is used by the Mouse, Touch and MSPoint managers and represents a single finger on the touch screen.

func NewPointer

func NewPointer(game *Game, id int, pointerMode *PointerMode) *Pointer

NewPointer A Pointer object is used by the Mouse, Touch and MSPoint managers and represents a single finger on the touch screen.

func NewPointerI

func NewPointerI(args ...interface{}) *Pointer

NewPointerI A Pointer object is used by the Mouse, Touch and MSPoint managers and represents a single finger on the touch screen.

func ToPointer

func ToPointer(jsStruct interface{}) *Pointer

Pointer Binding conversion method to Pointer point

func (*Pointer) Active

func (self *Pointer) Active() bool

Active An active pointer is one that is currently pressed down on the display. A Mouse is always active.

func (*Pointer) AddClickTrampoline

func (self *Pointer) AddClickTrampoline(name string, callback interface{}, callbackContext interface{}, callbackArgs interface{})

AddClickTrampoline Add a click trampoline to this pointer.

A click trampoline is a callback that is run on the DOM 'click' event; this is primarily needed with certain browsers (ie. IE11) which restrict some actions like requestFullscreen to the DOM 'click' event and rejects it for 'pointer*' and 'mouse*' events.

This is used internally by the ScaleManager; click trampoline usage is uncommon. Click trampolines can only be added to pointers that are currently down.

func (*Pointer) AddClickTrampolineI

func (self *Pointer) AddClickTrampolineI(args ...interface{})

AddClickTrampolineI Add a click trampoline to this pointer.

A click trampoline is a callback that is run on the DOM 'click' event; this is primarily needed with certain browsers (ie. IE11) which restrict some actions like requestFullscreen to the DOM 'click' event and rejects it for 'pointer*' and 'mouse*' events.

This is used internally by the ScaleManager; click trampoline usage is uncommon. Click trampolines can only be added to pointers that are currently down.

func (*Pointer) BACK_BUTTON

func (self *Pointer) BACK_BUTTON() int

BACK_BUTTON The X1 button. This is typically the mouse Back button, but is often reconfigured. On Linux (GTK) this is unsupported. On Windows if advanced pointer software (such as IntelliPoint) is installed this doesn't register.

func (*Pointer) BackButton

func (self *Pointer) BackButton() *DeviceButton

BackButton If this Pointer is a Mouse or Pen / Stylus then you can access its X1 (back) button directly through this property.

The DeviceButton has its own properties such as `isDown`, `duration` and methods like `justReleased` for more fine-grained button control.

Please see the DeviceButton docs for details on browser button limitations.

func (*Pointer) Button

func (self *Pointer) Button() interface{}

Button The button property of the most recent DOM event when this Pointer is started. You should not rely on this value for accurate button detection, instead use the Pointer properties `leftButton`, `rightButton`, `middleButton` and so on.

func (*Pointer) Circle

func (self *Pointer) Circle() *Circle

Circle A Phaser.Circle that is centered on the x/y coordinates of this pointer, useful for hit detection. The Circle size is 44px (Apples recommended "finger tip" size).

func (*Pointer) ClientX

func (self *Pointer) ClientX() int

ClientX The horizontal coordinate of the Pointer within the application's client area at which the event occurred (as opposed to the coordinates within the page).

func (*Pointer) ClientY

func (self *Pointer) ClientY() int

ClientY The vertical coordinate of the Pointer within the application's client area at which the event occurred (as opposed to the coordinates within the page).

func (*Pointer) Dirty

func (self *Pointer) Dirty() bool

Dirty A dirty pointer needs to re-poll any interactive objects it may have been over, regardless if it has moved or not.

func (*Pointer) Duration

func (self *Pointer) Duration() int

Duration How long the Pointer has been depressed on the touchscreen or *any* of the mouse buttons have been held down. If not currently down it returns -1. If you need to test a specific mouse or pen button then access the buttons directly, i.e. `Pointer.rightButton.duration`.

func (*Pointer) ERASER_BUTTON

func (self *Pointer) ERASER_BUTTON() int

ERASER_BUTTON The Eraser pen button on PointerEvent supported devices only.

func (*Pointer) EraserButton

func (self *Pointer) EraserButton() *DeviceButton

EraserButton If this Pointer is a Pen / Stylus then you can access its eraser button directly through this property.

The DeviceButton has its own properties such as `isDown`, `duration` and methods like `justReleased` for more fine-grained button control.

Please see the DeviceButton docs for details on browser button limitations.

func (*Pointer) Exists

func (self *Pointer) Exists() bool

Exists A Pointer object that exists is allowed to be checked for physics collisions and overlaps.

func (*Pointer) FORWARD_BUTTON

func (self *Pointer) FORWARD_BUTTON() int

FORWARD_BUTTON The X2 button. This is typically the mouse Forward button, but is often reconfigured. On Linux (GTK) this is unsupported. On Windows if advanced pointer software (such as IntelliPoint) is installed this doesn't register.

func (*Pointer) ForwardButton

func (self *Pointer) ForwardButton() *DeviceButton

ForwardButton If this Pointer is a Mouse or Pen / Stylus then you can access its X2 (forward) button directly through this property.

The DeviceButton has its own properties such as `isDown`, `duration` and methods like `justReleased` for more fine-grained button control.

Please see the DeviceButton docs for details on browser button limitations.

func (*Pointer) Game

func (self *Pointer) Game() *Game

Game A reference to the currently running game.

func (*Pointer) Id

func (self *Pointer) Id() int

Id The ID of the Pointer object within the game. Each game can have up to 10 active pointers.

func (*Pointer) Identifier

func (self *Pointer) Identifier() int

Identifier The identifier property of the Pointer as set by the DOM event when this Pointer is started.

func (*Pointer) InteractiveCandidates

func (self *Pointer) InteractiveCandidates() []interface{}

InteractiveCandidates This array is erased and re-populated every time this Pointer is updated. It contains references to all of the Game Objects that were considered as being valid for processing by this Pointer, this frame. To be valid they must have suitable a `priorityID`, be Input enabled, visible and actually have the Pointer over them. You can check the contents of this array in events such as `onInputDown`, but beware it is reset every frame.

func (*Pointer) IsDown

func (self *Pointer) IsDown() bool

IsDown If the Pointer is touching the touchscreen, or *any* mouse or pen button is held down, isDown is set to true. If you need to check a specific mouse or pen button then use the button properties, i.e. Pointer.rightButton.isDown.

func (*Pointer) IsMouse

func (self *Pointer) IsMouse() bool

IsMouse If the Pointer is a mouse or pen / stylus this is true, otherwise false.

func (*Pointer) IsUp

func (self *Pointer) IsUp() bool

IsUp If the Pointer is not touching the touchscreen, or *all* mouse or pen buttons are up, isUp is set to true. If you need to check a specific mouse or pen button then use the button properties, i.e. Pointer.rightButton.isUp.

func (*Pointer) JustPressed

func (self *Pointer) JustPressed() bool

JustPressed The Pointer is considered justPressed if the time it was pressed onto the touchscreen or clicked is less than justPressedRate. Note that calling justPressed doesn't reset the pressed status of the Pointer, it will return `true` for as long as the duration is valid. If you wish to check if the Pointer was pressed down just once then see the Sprite.events.onInputDown event.

func (*Pointer) JustPressed1O

func (self *Pointer) JustPressed1O(duration int) bool

JustPressed1O The Pointer is considered justPressed if the time it was pressed onto the touchscreen or clicked is less than justPressedRate. Note that calling justPressed doesn't reset the pressed status of the Pointer, it will return `true` for as long as the duration is valid. If you wish to check if the Pointer was pressed down just once then see the Sprite.events.onInputDown event.

func (*Pointer) JustPressedI

func (self *Pointer) JustPressedI(args ...interface{}) bool

JustPressedI The Pointer is considered justPressed if the time it was pressed onto the touchscreen or clicked is less than justPressedRate. Note that calling justPressed doesn't reset the pressed status of the Pointer, it will return `true` for as long as the duration is valid. If you wish to check if the Pointer was pressed down just once then see the Sprite.events.onInputDown event.

func (*Pointer) JustReleased

func (self *Pointer) JustReleased() bool

JustReleased The Pointer is considered justReleased if the time it left the touchscreen is less than justReleasedRate. Note that calling justReleased doesn't reset the pressed status of the Pointer, it will return `true` for as long as the duration is valid. If you wish to check if the Pointer was released just once then see the Sprite.events.onInputUp event.

func (*Pointer) JustReleased1O

func (self *Pointer) JustReleased1O(duration int) bool

JustReleased1O The Pointer is considered justReleased if the time it left the touchscreen is less than justReleasedRate. Note that calling justReleased doesn't reset the pressed status of the Pointer, it will return `true` for as long as the duration is valid. If you wish to check if the Pointer was released just once then see the Sprite.events.onInputUp event.

func (*Pointer) JustReleasedI

func (self *Pointer) JustReleasedI(args ...interface{}) bool

JustReleasedI The Pointer is considered justReleased if the time it left the touchscreen is less than justReleasedRate. Note that calling justReleased doesn't reset the pressed status of the Pointer, it will return `true` for as long as the duration is valid. If you wish to check if the Pointer was released just once then see the Sprite.events.onInputUp event.

func (*Pointer) LEFT_BUTTON

func (self *Pointer) LEFT_BUTTON() int

LEFT_BUTTON The Left Mouse button, or in PointerEvent devices a Touch contact or Pen contact.

func (*Pointer) Leave

func (self *Pointer) Leave(event interface{})

Leave Called when the Pointer leaves the target area.

func (*Pointer) LeaveI

func (self *Pointer) LeaveI(args ...interface{})

LeaveI Called when the Pointer leaves the target area.

func (*Pointer) LeftButton

func (self *Pointer) LeftButton() *DeviceButton

LeftButton If this Pointer is a Mouse or Pen / Stylus then you can access its left button directly through this property.

The DeviceButton has its own properties such as `isDown`, `duration` and methods like `justReleased` for more fine-grained button control.

func (*Pointer) MIDDLE_BUTTON

func (self *Pointer) MIDDLE_BUTTON() int

MIDDLE_BUTTON The Middle Mouse button.

func (*Pointer) MiddleButton

func (self *Pointer) MiddleButton() *DeviceButton

MiddleButton If this Pointer is a Mouse or Pen / Stylus then you can access its middle button directly through this property.

The DeviceButton has its own properties such as `isDown`, `duration` and methods like `justReleased` for more fine-grained button control.

Please see the DeviceButton docs for details on browser button limitations.

func (*Pointer) Move

func (self *Pointer) Move(event interface{})

Move Called when the Pointer is moved.

func (*Pointer) Move1O

func (self *Pointer) Move1O(event interface{}, fromClick bool)

Move1O Called when the Pointer is moved.

func (*Pointer) MoveI

func (self *Pointer) MoveI(args ...interface{})

MoveI Called when the Pointer is moved.

func (*Pointer) MovementX

func (self *Pointer) MovementX() int

MovementX The horizontal processed relative movement of the Pointer in pixels since last event.

func (*Pointer) MovementY

func (self *Pointer) MovementY() int

MovementY The vertical processed relative movement of the Pointer in pixels since last event.

func (*Pointer) MsSinceLastClick

func (self *Pointer) MsSinceLastClick() int

MsSinceLastClick The number of milliseconds since the last click or touch event.

func (*Pointer) NO_BUTTON

func (self *Pointer) NO_BUTTON() int

NO_BUTTON No buttons at all.

func (*Pointer) PageX

func (self *Pointer) PageX() int

PageX The horizontal coordinate of the Pointer relative to whole document.

func (*Pointer) PageY

func (self *Pointer) PageY() int

PageY The vertical coordinate of the Pointer relative to whole document.

func (*Pointer) PointerId

func (self *Pointer) PointerId() int

PointerId The pointerId property of the Pointer as set by the DOM event when this Pointer is started. The browser can and will recycle this value.

func (*Pointer) PointerMode

func (self *Pointer) PointerMode() *PointerMode

PointerMode The operational mode of this pointer.

func (*Pointer) Position

func (self *Pointer) Position() *Point

Position A Phaser.Point object containing the current x/y values of the pointer on the display.

func (*Pointer) PositionDown

func (self *Pointer) PositionDown() *Point

PositionDown A Phaser.Point object containing the x/y values of the pointer when it was last in a down state on the display.

func (*Pointer) PositionUp

func (self *Pointer) PositionUp() *Point

PositionUp A Phaser.Point object containing the x/y values of the pointer when it was last released.

func (*Pointer) PreviousTapTime

func (self *Pointer) PreviousTapTime() int

PreviousTapTime A timestamp representing when the Pointer was last tapped or clicked.

func (*Pointer) ProcessButtonsDown

func (self *Pointer) ProcessButtonsDown(buttons int, event *MouseEvent)

ProcessButtonsDown Called by updateButtons.

func (*Pointer) ProcessButtonsDownI

func (self *Pointer) ProcessButtonsDownI(args ...interface{})

ProcessButtonsDownI Called by updateButtons.

func (*Pointer) ProcessButtonsUp

func (self *Pointer) ProcessButtonsUp(buttons int, event *MouseEvent)

ProcessButtonsUp Called by updateButtons.

func (*Pointer) ProcessButtonsUpI

func (self *Pointer) ProcessButtonsUpI(args ...interface{})

ProcessButtonsUpI Called by updateButtons.

func (*Pointer) ProcessClickTrampolines

func (self *Pointer) ProcessClickTrampolines()

ProcessClickTrampolines Fire all click trampolines for which the pointers are still referring to the registered object.

func (*Pointer) ProcessClickTrampolinesI

func (self *Pointer) ProcessClickTrampolinesI(args ...interface{})

ProcessClickTrampolinesI Fire all click trampolines for which the pointers are still referring to the registered object.

func (*Pointer) ProcessInteractiveObjects

func (self *Pointer) ProcessInteractiveObjects() bool

ProcessInteractiveObjects Process all interactive objects to find out which ones were updated in the recent Pointer move.

func (*Pointer) ProcessInteractiveObjects1O

func (self *Pointer) ProcessInteractiveObjects1O(fromClick bool) bool

ProcessInteractiveObjects1O Process all interactive objects to find out which ones were updated in the recent Pointer move.

func (*Pointer) ProcessInteractiveObjectsI

func (self *Pointer) ProcessInteractiveObjectsI(args ...interface{}) bool

ProcessInteractiveObjectsI Process all interactive objects to find out which ones were updated in the recent Pointer move.

func (*Pointer) RIGHT_BUTTON

func (self *Pointer) RIGHT_BUTTON() int

RIGHT_BUTTON The Right Mouse button, or in PointerEvent devices a Pen contact with a barrel button.

func (*Pointer) RawMovementX

func (self *Pointer) RawMovementX() int

RawMovementX The horizontal raw relative movement of the Pointer in pixels since last event.

func (*Pointer) RawMovementY

func (self *Pointer) RawMovementY() int

RawMovementY The vertical raw relative movement of the Pointer in pixels since last event.

func (*Pointer) Reset

func (self *Pointer) Reset()

Reset Resets the Pointer properties. Called by InputManager.reset when you perform a State change.

func (*Pointer) ResetButtons

func (self *Pointer) ResetButtons()

ResetButtons Resets the states of all the button booleans.

func (*Pointer) ResetButtonsI

func (self *Pointer) ResetButtonsI(args ...interface{})

ResetButtonsI Resets the states of all the button booleans.

func (*Pointer) ResetI

func (self *Pointer) ResetI(args ...interface{})

ResetI Resets the Pointer properties. Called by InputManager.reset when you perform a State change.

func (*Pointer) ResetMovement

func (self *Pointer) ResetMovement()

ResetMovement Resets the movementX and movementY properties. Use in your update handler after retrieving the values.

func (*Pointer) ResetMovementI

func (self *Pointer) ResetMovementI(args ...interface{})

ResetMovementI Resets the movementX and movementY properties. Use in your update handler after retrieving the values.

func (*Pointer) RightButton

func (self *Pointer) RightButton() *DeviceButton

RightButton If this Pointer is a Mouse or Pen / Stylus then you can access its right button directly through this property.

The DeviceButton has its own properties such as `isDown`, `duration` and methods like `justReleased` for more fine-grained button control.

Please see the DeviceButton docs for details on browser button limitations.

func (*Pointer) ScreenX

func (self *Pointer) ScreenX() int

ScreenX The horizontal coordinate of the Pointer relative to the screen.

func (*Pointer) ScreenY

func (self *Pointer) ScreenY() int

ScreenY The vertical coordinate of the Pointer relative to the screen.

func (*Pointer) SetActiveA

func (self *Pointer) SetActiveA(member bool)

SetActiveA An active pointer is one that is currently pressed down on the display. A Mouse is always active.

func (*Pointer) SetBACK_BUTTONA

func (self *Pointer) SetBACK_BUTTONA(member int)

SetBACK_BUTTONA The X1 button. This is typically the mouse Back button, but is often reconfigured. On Linux (GTK) this is unsupported. On Windows if advanced pointer software (such as IntelliPoint) is installed this doesn't register.

func (*Pointer) SetBackButtonA

func (self *Pointer) SetBackButtonA(member *DeviceButton)

SetBackButtonA If this Pointer is a Mouse or Pen / Stylus then you can access its X1 (back) button directly through this property.

The DeviceButton has its own properties such as `isDown`, `duration` and methods like `justReleased` for more fine-grained button control.

Please see the DeviceButton docs for details on browser button limitations.

func (*Pointer) SetButtonA

func (self *Pointer) SetButtonA(member interface{})

SetButtonA The button property of the most recent DOM event when this Pointer is started. You should not rely on this value for accurate button detection, instead use the Pointer properties `leftButton`, `rightButton`, `middleButton` and so on.

func (*Pointer) SetCircleA

func (self *Pointer) SetCircleA(member *Circle)

SetCircleA A Phaser.Circle that is centered on the x/y coordinates of this pointer, useful for hit detection. The Circle size is 44px (Apples recommended "finger tip" size).

func (*Pointer) SetClientXA

func (self *Pointer) SetClientXA(member int)

SetClientXA The horizontal coordinate of the Pointer within the application's client area at which the event occurred (as opposed to the coordinates within the page).

func (*Pointer) SetClientYA

func (self *Pointer) SetClientYA(member int)

SetClientYA The vertical coordinate of the Pointer within the application's client area at which the event occurred (as opposed to the coordinates within the page).

func (*Pointer) SetDirtyA

func (self *Pointer) SetDirtyA(member bool)

SetDirtyA A dirty pointer needs to re-poll any interactive objects it may have been over, regardless if it has moved or not.

func (*Pointer) SetDurationA

func (self *Pointer) SetDurationA(member int)

SetDurationA How long the Pointer has been depressed on the touchscreen or *any* of the mouse buttons have been held down. If not currently down it returns -1. If you need to test a specific mouse or pen button then access the buttons directly, i.e. `Pointer.rightButton.duration`.

func (*Pointer) SetERASER_BUTTONA

func (self *Pointer) SetERASER_BUTTONA(member int)

SetERASER_BUTTONA The Eraser pen button on PointerEvent supported devices only.

func (*Pointer) SetEraserButtonA

func (self *Pointer) SetEraserButtonA(member *DeviceButton)

SetEraserButtonA If this Pointer is a Pen / Stylus then you can access its eraser button directly through this property.

The DeviceButton has its own properties such as `isDown`, `duration` and methods like `justReleased` for more fine-grained button control.

Please see the DeviceButton docs for details on browser button limitations.

func (*Pointer) SetExistsA

func (self *Pointer) SetExistsA(member bool)

SetExistsA A Pointer object that exists is allowed to be checked for physics collisions and overlaps.

func (*Pointer) SetFORWARD_BUTTONA

func (self *Pointer) SetFORWARD_BUTTONA(member int)

SetFORWARD_BUTTONA The X2 button. This is typically the mouse Forward button, but is often reconfigured. On Linux (GTK) this is unsupported. On Windows if advanced pointer software (such as IntelliPoint) is installed this doesn't register.

func (*Pointer) SetForwardButtonA

func (self *Pointer) SetForwardButtonA(member *DeviceButton)

SetForwardButtonA If this Pointer is a Mouse or Pen / Stylus then you can access its X2 (forward) button directly through this property.

The DeviceButton has its own properties such as `isDown`, `duration` and methods like `justReleased` for more fine-grained button control.

Please see the DeviceButton docs for details on browser button limitations.

func (*Pointer) SetGameA

func (self *Pointer) SetGameA(member *Game)

SetGameA A reference to the currently running game.

func (*Pointer) SetIdA

func (self *Pointer) SetIdA(member int)

SetIdA The ID of the Pointer object within the game. Each game can have up to 10 active pointers.

func (*Pointer) SetIdentifierA

func (self *Pointer) SetIdentifierA(member int)

SetIdentifierA The identifier property of the Pointer as set by the DOM event when this Pointer is started.

func (*Pointer) SetInteractiveCandidatesA

func (self *Pointer) SetInteractiveCandidatesA(member []interface{})

SetInteractiveCandidatesA This array is erased and re-populated every time this Pointer is updated. It contains references to all of the Game Objects that were considered as being valid for processing by this Pointer, this frame. To be valid they must have suitable a `priorityID`, be Input enabled, visible and actually have the Pointer over them. You can check the contents of this array in events such as `onInputDown`, but beware it is reset every frame.

func (*Pointer) SetIsDownA

func (self *Pointer) SetIsDownA(member bool)

SetIsDownA If the Pointer is touching the touchscreen, or *any* mouse or pen button is held down, isDown is set to true. If you need to check a specific mouse or pen button then use the button properties, i.e. Pointer.rightButton.isDown.

func (*Pointer) SetIsMouseA

func (self *Pointer) SetIsMouseA(member bool)

SetIsMouseA If the Pointer is a mouse or pen / stylus this is true, otherwise false.

func (*Pointer) SetIsUpA

func (self *Pointer) SetIsUpA(member bool)

SetIsUpA If the Pointer is not touching the touchscreen, or *all* mouse or pen buttons are up, isUp is set to true. If you need to check a specific mouse or pen button then use the button properties, i.e. Pointer.rightButton.isUp.

func (*Pointer) SetLEFT_BUTTONA

func (self *Pointer) SetLEFT_BUTTONA(member int)

SetLEFT_BUTTONA The Left Mouse button, or in PointerEvent devices a Touch contact or Pen contact.

func (*Pointer) SetLeftButtonA

func (self *Pointer) SetLeftButtonA(member *DeviceButton)

SetLeftButtonA If this Pointer is a Mouse or Pen / Stylus then you can access its left button directly through this property.

The DeviceButton has its own properties such as `isDown`, `duration` and methods like `justReleased` for more fine-grained button control.

func (*Pointer) SetMIDDLE_BUTTONA

func (self *Pointer) SetMIDDLE_BUTTONA(member int)

SetMIDDLE_BUTTONA The Middle Mouse button.

func (*Pointer) SetMiddleButtonA

func (self *Pointer) SetMiddleButtonA(member *DeviceButton)

SetMiddleButtonA If this Pointer is a Mouse or Pen / Stylus then you can access its middle button directly through this property.

The DeviceButton has its own properties such as `isDown`, `duration` and methods like `justReleased` for more fine-grained button control.

Please see the DeviceButton docs for details on browser button limitations.

func (*Pointer) SetMovementXA

func (self *Pointer) SetMovementXA(member int)

SetMovementXA The horizontal processed relative movement of the Pointer in pixels since last event.

func (*Pointer) SetMovementYA

func (self *Pointer) SetMovementYA(member int)

SetMovementYA The vertical processed relative movement of the Pointer in pixels since last event.

func (*Pointer) SetMsSinceLastClickA

func (self *Pointer) SetMsSinceLastClickA(member int)

SetMsSinceLastClickA The number of milliseconds since the last click or touch event.

func (*Pointer) SetNO_BUTTONA

func (self *Pointer) SetNO_BUTTONA(member int)

SetNO_BUTTONA No buttons at all.

func (*Pointer) SetPageXA

func (self *Pointer) SetPageXA(member int)

SetPageXA The horizontal coordinate of the Pointer relative to whole document.

func (*Pointer) SetPageYA

func (self *Pointer) SetPageYA(member int)

SetPageYA The vertical coordinate of the Pointer relative to whole document.

func (*Pointer) SetPointerIdA

func (self *Pointer) SetPointerIdA(member int)

SetPointerIdA The pointerId property of the Pointer as set by the DOM event when this Pointer is started. The browser can and will recycle this value.

func (*Pointer) SetPointerModeA

func (self *Pointer) SetPointerModeA(member *PointerMode)

SetPointerModeA The operational mode of this pointer.

func (*Pointer) SetPositionA

func (self *Pointer) SetPositionA(member *Point)

SetPositionA A Phaser.Point object containing the current x/y values of the pointer on the display.

func (*Pointer) SetPositionDownA

func (self *Pointer) SetPositionDownA(member *Point)

SetPositionDownA A Phaser.Point object containing the x/y values of the pointer when it was last in a down state on the display.

func (*Pointer) SetPositionUpA

func (self *Pointer) SetPositionUpA(member *Point)

SetPositionUpA A Phaser.Point object containing the x/y values of the pointer when it was last released.

func (*Pointer) SetPreviousTapTimeA

func (self *Pointer) SetPreviousTapTimeA(member int)

SetPreviousTapTimeA A timestamp representing when the Pointer was last tapped or clicked.

func (*Pointer) SetRIGHT_BUTTONA

func (self *Pointer) SetRIGHT_BUTTONA(member int)

SetRIGHT_BUTTONA The Right Mouse button, or in PointerEvent devices a Pen contact with a barrel button.

func (*Pointer) SetRawMovementXA

func (self *Pointer) SetRawMovementXA(member int)

SetRawMovementXA The horizontal raw relative movement of the Pointer in pixels since last event.

func (*Pointer) SetRawMovementYA

func (self *Pointer) SetRawMovementYA(member int)

SetRawMovementYA The vertical raw relative movement of the Pointer in pixels since last event.

func (*Pointer) SetRightButtonA

func (self *Pointer) SetRightButtonA(member *DeviceButton)

SetRightButtonA If this Pointer is a Mouse or Pen / Stylus then you can access its right button directly through this property.

The DeviceButton has its own properties such as `isDown`, `duration` and methods like `justReleased` for more fine-grained button control.

Please see the DeviceButton docs for details on browser button limitations.

func (*Pointer) SetScreenXA

func (self *Pointer) SetScreenXA(member int)

SetScreenXA The horizontal coordinate of the Pointer relative to the screen.

func (*Pointer) SetScreenYA

func (self *Pointer) SetScreenYA(member int)

SetScreenYA The vertical coordinate of the Pointer relative to the screen.

func (*Pointer) SetTargetA

func (self *Pointer) SetTargetA(member interface{})

SetTargetA The target property of the Pointer as set by the DOM event when this Pointer is started.

func (*Pointer) SetTargetObjectA

func (self *Pointer) SetTargetObjectA(member interface{})

SetTargetObjectA The Game Object this Pointer is currently over / touching / dragging.

func (*Pointer) SetTimeDownA

func (self *Pointer) SetTimeDownA(member int)

SetTimeDownA A timestamp representing when the Pointer first touched the touchscreen.

func (*Pointer) SetTimeUpA

func (self *Pointer) SetTimeUpA(member int)

SetTimeUpA A timestamp representing when the Pointer left the touchscreen.

func (*Pointer) SetTotalTouchesA

func (self *Pointer) SetTotalTouchesA(member int)

SetTotalTouchesA The total number of times this Pointer has been touched to the touchscreen.

func (*Pointer) SetTypeA

func (self *Pointer) SetTypeA(member int)

SetTypeA The const type of this object.

func (*Pointer) SetWithinGameA

func (self *Pointer) SetWithinGameA(member bool)

SetWithinGameA true if the Pointer is over the game canvas, otherwise false.

func (*Pointer) SetWorldXA

func (self *Pointer) SetWorldXA(member int)

SetWorldXA Gets the X value of this Pointer in world coordinates based on the world camera.

func (*Pointer) SetWorldYA

func (self *Pointer) SetWorldYA(member int)

SetWorldYA Gets the Y value of this Pointer in world coordinates based on the world camera.

func (*Pointer) SetXA

func (self *Pointer) SetXA(member int)

SetXA The horizontal coordinate of the Pointer. This value is automatically scaled based on the game scale.

func (*Pointer) SetYA

func (self *Pointer) SetYA(member int)

SetYA The vertical coordinate of the Pointer. This value is automatically scaled based on the game scale.

func (*Pointer) Start

func (self *Pointer) Start(event interface{})

Start Called when the Pointer is pressed onto the touchscreen.

func (*Pointer) StartI

func (self *Pointer) StartI(args ...interface{})

StartI Called when the Pointer is pressed onto the touchscreen.

func (*Pointer) Stop

func (self *Pointer) Stop(event interface{})

Stop Called when the Pointer leaves the touchscreen.

func (*Pointer) StopI

func (self *Pointer) StopI(args ...interface{})

StopI Called when the Pointer leaves the touchscreen.

func (*Pointer) SwapTarget

func (self *Pointer) SwapTarget(newTarget *InputHandler)

SwapTarget This will change the `Pointer.targetObject` object to be the one provided.

This allows you to have fine-grained control over which object the Pointer is targeting.

Note that even if you set a new Target here, it is still able to be replaced by any other valid target during the next Pointer update.

func (*Pointer) SwapTarget1O

func (self *Pointer) SwapTarget1O(newTarget *InputHandler, silent bool)

SwapTarget1O This will change the `Pointer.targetObject` object to be the one provided.

This allows you to have fine-grained control over which object the Pointer is targeting.

Note that even if you set a new Target here, it is still able to be replaced by any other valid target during the next Pointer update.

func (*Pointer) SwapTargetI

func (self *Pointer) SwapTargetI(args ...interface{})

SwapTargetI This will change the `Pointer.targetObject` object to be the one provided.

This allows you to have fine-grained control over which object the Pointer is targeting.

Note that even if you set a new Target here, it is still able to be replaced by any other valid target during the next Pointer update.

func (*Pointer) Target

func (self *Pointer) Target() interface{}

Target The target property of the Pointer as set by the DOM event when this Pointer is started.

func (*Pointer) TargetObject

func (self *Pointer) TargetObject() interface{}

TargetObject The Game Object this Pointer is currently over / touching / dragging.

func (*Pointer) TimeDown

func (self *Pointer) TimeDown() int

TimeDown A timestamp representing when the Pointer first touched the touchscreen.

func (*Pointer) TimeUp

func (self *Pointer) TimeUp() int

TimeUp A timestamp representing when the Pointer left the touchscreen.

func (*Pointer) TotalTouches

func (self *Pointer) TotalTouches() int

TotalTouches The total number of times this Pointer has been touched to the touchscreen.

func (*Pointer) Type

func (self *Pointer) Type() int

Type The const type of this object.

func (*Pointer) Update

func (self *Pointer) Update()

Update Called by the Input Manager.

func (*Pointer) UpdateButtons

func (self *Pointer) UpdateButtons(event *MouseEvent)

UpdateButtons Called when the event.buttons property changes from zero. Contains a button bitmask.

func (*Pointer) UpdateButtonsI

func (self *Pointer) UpdateButtonsI(args ...interface{})

UpdateButtonsI Called when the event.buttons property changes from zero. Contains a button bitmask.

func (*Pointer) UpdateI

func (self *Pointer) UpdateI(args ...interface{})

UpdateI Called by the Input Manager.

func (*Pointer) WithinGame

func (self *Pointer) WithinGame() bool

WithinGame true if the Pointer is over the game canvas, otherwise false.

func (*Pointer) WorldX

func (self *Pointer) WorldX() int

WorldX Gets the X value of this Pointer in world coordinates based on the world camera.

func (*Pointer) WorldY

func (self *Pointer) WorldY() int

WorldY Gets the Y value of this Pointer in world coordinates based on the world camera.

func (*Pointer) X

func (self *Pointer) X() int

X The horizontal coordinate of the Pointer. This value is automatically scaled based on the game scale.

func (*Pointer) Y

func (self *Pointer) Y() int

Y The vertical coordinate of the Pointer. This value is automatically scaled based on the game scale.

type PointerEvent

type PointerEvent struct{ *js.Object }

type PointerMode

type PointerMode struct {
	*js.Object
}

PointerMode Enumeration categorizing operational modes of pointers.

PointerType values represent valid bitmasks. For example, a value representing both Mouse and Touch devices can be expressed as `PointerMode.CURSOR | PointerMode.CONTACT`.

Values may be added for future mode categorizations.

func NewPointerMode

func NewPointerMode() *PointerMode

NewPointerMode Enumeration categorizing operational modes of pointers.

PointerType values represent valid bitmasks. For example, a value representing both Mouse and Touch devices can be expressed as `PointerMode.CURSOR | PointerMode.CONTACT`.

Values may be added for future mode categorizations.

func NewPointerModeI

func NewPointerModeI(args ...interface{}) *PointerMode

NewPointerModeI Enumeration categorizing operational modes of pointers.

PointerType values represent valid bitmasks. For example, a value representing both Mouse and Touch devices can be expressed as `PointerMode.CURSOR | PointerMode.CONTACT`.

Values may be added for future mode categorizations.

func ToPointerMode

func ToPointerMode(jsStruct interface{}) *PointerMode

PointerMode Binding conversion method to PointerMode point

func (*PointerMode) CONTACT

func (self *PointerMode) CONTACT() interface{}

CONTACT A 'CONTACT' pointer has an *active cursor* that only tracks movement when actived; notably this is a touch-style input.

func (*PointerMode) CURSOR

func (self *PointerMode) CURSOR() interface{}

CURSOR A 'CURSOR' is a pointer with a *passive cursor* such as a mouse, touchpad, watcom stylus, or even TV-control arrow-pad.

It has the property that a cursor is passively moved without activating the input. This currently corresponds with {@link Phaser.Pointer#isMouse} property.

func (*PointerMode) SetCONTACTA

func (self *PointerMode) SetCONTACTA(member interface{})

SetCONTACTA A 'CONTACT' pointer has an *active cursor* that only tracks movement when actived; notably this is a touch-style input.

func (*PointerMode) SetCURSORA

func (self *PointerMode) SetCURSORA(member interface{})

SetCURSORA A 'CURSOR' is a pointer with a *passive cursor* such as a mouse, touchpad, watcom stylus, or even TV-control arrow-pad.

It has the property that a cursor is passively moved without activating the input. This currently corresponds with {@link Phaser.Pointer#isMouse} property.

type Polygon

type Polygon struct {
	*js.Object
}

Polygon Creates a new Polygon.

The points can be set from a variety of formats:

- An array of Point objects: `[new Phaser.Point(x1, y1), ...]` - An array of objects with public x/y properties: `[obj1, obj2, ...]` - An array of paired numbers that represent point coordinates: `[x1,y1, x2,y2, ...]` - As separate Point arguments: `setTo(new Phaser.Point(x1, y1), ...)` - As separate objects with public x/y properties arguments: `setTo(obj1, obj2, ...)` - As separate arguments representing point coordinates: `setTo(x1,y1, x2,y2, ...)`

func NewPolygon

func NewPolygon(points interface{}) *Polygon

NewPolygon Creates a new Polygon.

The points can be set from a variety of formats:

- An array of Point objects: `[new Phaser.Point(x1, y1), ...]` - An array of objects with public x/y properties: `[obj1, obj2, ...]` - An array of paired numbers that represent point coordinates: `[x1,y1, x2,y2, ...]` - As separate Point arguments: `setTo(new Phaser.Point(x1, y1), ...)` - As separate objects with public x/y properties arguments: `setTo(obj1, obj2, ...)` - As separate arguments representing point coordinates: `setTo(x1,y1, x2,y2, ...)`

func NewPolygonI

func NewPolygonI(args ...interface{}) *Polygon

NewPolygonI Creates a new Polygon.

The points can be set from a variety of formats:

- An array of Point objects: `[new Phaser.Point(x1, y1), ...]` - An array of objects with public x/y properties: `[obj1, obj2, ...]` - An array of paired numbers that represent point coordinates: `[x1,y1, x2,y2, ...]` - As separate Point arguments: `setTo(new Phaser.Point(x1, y1), ...)` - As separate objects with public x/y properties arguments: `setTo(obj1, obj2, ...)` - As separate arguments representing point coordinates: `setTo(x1,y1, x2,y2, ...)`

func ToPolygon

func ToPolygon(jsStruct interface{}) *Polygon

Polygon Binding conversion method to Polygon point

func (*Polygon) Area

func (self *Polygon) Area() int

Area The area of this Polygon.

func (*Polygon) CalculateArea

func (self *Polygon) CalculateArea(y0 int) int

CalculateArea Calcuates the area of the Polygon. This is available in the property Polygon.area

func (*Polygon) CalculateAreaI

func (self *Polygon) CalculateAreaI(args ...interface{}) int

CalculateAreaI Calcuates the area of the Polygon. This is available in the property Polygon.area

func (*Polygon) Clone

func (self *Polygon) Clone() *Polygon

Clone Creates a copy of the given Polygon. This is a deep clone, the resulting copy contains new Phaser.Point objects

func (*Polygon) Clone1O

func (self *Polygon) Clone1O(output *Polygon) *Polygon

Clone1O Creates a copy of the given Polygon. This is a deep clone, the resulting copy contains new Phaser.Point objects

func (*Polygon) CloneI

func (self *Polygon) CloneI(args ...interface{}) *Polygon

CloneI Creates a copy of the given Polygon. This is a deep clone, the resulting copy contains new Phaser.Point objects

func (*Polygon) Closed

func (self *Polygon) Closed() bool

Closed Is the Polygon closed or not?

func (*Polygon) Contains

func (self *Polygon) Contains(x int, y int) bool

Contains Checks whether the x and y coordinates are contained within this polygon.

func (*Polygon) ContainsI

func (self *Polygon) ContainsI(args ...interface{}) bool

ContainsI Checks whether the x and y coordinates are contained within this polygon.

func (*Polygon) Flatten

func (self *Polygon) Flatten() *Polygon

Flatten Flattens this Polygon so the points are a sequence of numbers. Any Point objects found are removed and replaced with two numbers. Also sets the Polygon.flattened property to `true`.

func (*Polygon) FlattenI

func (self *Polygon) FlattenI(args ...interface{}) *Polygon

FlattenI Flattens this Polygon so the points are a sequence of numbers. Any Point objects found are removed and replaced with two numbers. Also sets the Polygon.flattened property to `true`.

func (*Polygon) Flattened

func (self *Polygon) Flattened() bool

Flattened Has this Polygon been flattened by a call to `Polygon.flatten` ?

func (*Polygon) Points

func (self *Polygon) Points() []Point

Points Sets and modifies the points of this polygon.

See {@link Phaser.Polygon#setTo setTo} for the different kinds of arrays formats that can be assigned. The array of vertex points.

func (*Polygon) SetAreaA

func (self *Polygon) SetAreaA(member int)

SetAreaA The area of this Polygon.

func (*Polygon) SetClosedA

func (self *Polygon) SetClosedA(member bool)

SetClosedA Is the Polygon closed or not?

func (*Polygon) SetFlattenedA

func (self *Polygon) SetFlattenedA(member bool)

SetFlattenedA Has this Polygon been flattened by a call to `Polygon.flatten` ?

func (*Polygon) SetPointsA

func (self *Polygon) SetPointsA(member []Point)

SetPointsA Sets and modifies the points of this polygon.

See {@link Phaser.Polygon#setTo setTo} for the different kinds of arrays formats that can be assigned. The array of vertex points.

func (*Polygon) SetTo

func (self *Polygon) SetTo(points interface{}) *Polygon

SetTo Sets this Polygon to the given points.

The points can be set from a variety of formats:

- An array of Point objects: `[new Phaser.Point(x1, y1), ...]` - An array of objects with public x/y properties: `[obj1, obj2, ...]` - An array of paired numbers that represent point coordinates: `[x1,y1, x2,y2, ...]` - An array of arrays with two elements representing x/y coordinates: `[[x1, y1], [x2, y2], ...]` - As separate Point arguments: `setTo(new Phaser.Point(x1, y1), ...)` - As separate objects with public x/y properties arguments: `setTo(obj1, obj2, ...)` - As separate arguments representing point coordinates: `setTo(x1,y1, x2,y2, ...)`

`setTo` may also be called without any arguments to remove all points.

func (*Polygon) SetToI

func (self *Polygon) SetToI(args ...interface{}) *Polygon

SetToI Sets this Polygon to the given points.

The points can be set from a variety of formats:

- An array of Point objects: `[new Phaser.Point(x1, y1), ...]` - An array of objects with public x/y properties: `[obj1, obj2, ...]` - An array of paired numbers that represent point coordinates: `[x1,y1, x2,y2, ...]` - An array of arrays with two elements representing x/y coordinates: `[[x1, y1], [x2, y2], ...]` - As separate Point arguments: `setTo(new Phaser.Point(x1, y1), ...)` - As separate objects with public x/y properties arguments: `setTo(obj1, obj2, ...)` - As separate arguments representing point coordinates: `setTo(x1,y1, x2,y2, ...)`

`setTo` may also be called without any arguments to remove all points.

func (*Polygon) SetTypeA

func (self *Polygon) SetTypeA(member int)

SetTypeA The base object type.

func (*Polygon) ToNumberArray

func (self *Polygon) ToNumberArray() []interface{}

ToNumberArray Export the points as an array of flat numbers, following the sequence [ x,y, x,y, x,y ]

func (*Polygon) ToNumberArray1O

func (self *Polygon) ToNumberArray1O(output []interface{}) []interface{}

ToNumberArray1O Export the points as an array of flat numbers, following the sequence [ x,y, x,y, x,y ]

func (*Polygon) ToNumberArrayI

func (self *Polygon) ToNumberArrayI(args ...interface{}) []interface{}

ToNumberArrayI Export the points as an array of flat numbers, following the sequence [ x,y, x,y, x,y ]

func (*Polygon) Type

func (self *Polygon) Type() int

Type The base object type.

type PrimitiveShader

type PrimitiveShader struct {
	*js.Object
}

PrimitiveShader empty description

func NewPrimitiveShader

func NewPrimitiveShader(gl *WebGLContext) *PrimitiveShader

NewPrimitiveShader empty description

func NewPrimitiveShaderI

func NewPrimitiveShaderI(args ...interface{}) *PrimitiveShader

NewPrimitiveShaderI empty description

func ToPrimitiveShader

func ToPrimitiveShader(jsStruct interface{}) *PrimitiveShader

PrimitiveShader Binding conversion method to PrimitiveShader point

func (*PrimitiveShader) Destroy

func (self *PrimitiveShader) Destroy()

Destroy Destroys the shader.

func (*PrimitiveShader) DestroyI

func (self *PrimitiveShader) DestroyI(args ...interface{})

DestroyI Destroys the shader.

func (*PrimitiveShader) FragmentSrc

func (self *PrimitiveShader) FragmentSrc() []interface{}

FragmentSrc The fragment shader.

func (*PrimitiveShader) Gl

func (self *PrimitiveShader) Gl() WebGLContext

Gl empty description

func (*PrimitiveShader) Init

func (self *PrimitiveShader) Init()

Init Initialises the shader.

func (*PrimitiveShader) InitI

func (self *PrimitiveShader) InitI(args ...interface{})

InitI Initialises the shader.

func (*PrimitiveShader) Program

func (self *PrimitiveShader) Program() interface{}

Program The WebGL program.

func (*PrimitiveShader) SetFragmentSrcA

func (self *PrimitiveShader) SetFragmentSrcA(member []interface{})

SetFragmentSrcA The fragment shader.

func (*PrimitiveShader) SetGlA

func (self *PrimitiveShader) SetGlA(member WebGLContext)

SetGlA empty description

func (*PrimitiveShader) SetProgramA

func (self *PrimitiveShader) SetProgramA(member interface{})

SetProgramA The WebGL program.

func (*PrimitiveShader) SetVertexSrcA

func (self *PrimitiveShader) SetVertexSrcA(member []interface{})

SetVertexSrcA The vertex shader.

func (*PrimitiveShader) VertexSrc

func (self *PrimitiveShader) VertexSrc() []interface{}

VertexSrc The vertex shader.

type QuadTree

type QuadTree struct {
	*js.Object
}

QuadTree A QuadTree implementation. The original code was a conversion of the Java code posted to GameDevTuts. However I've tweaked it massively to add node indexing, removed lots of temp. var creation and significantly increased performance as a result. Original version at https://github.com/timohausmann/quadtree-js/

func NewQuadTree

func NewQuadTree(x int, y int, width int, height int) *QuadTree

NewQuadTree A QuadTree implementation. The original code was a conversion of the Java code posted to GameDevTuts. However I've tweaked it massively to add node indexing, removed lots of temp. var creation and significantly increased performance as a result. Original version at https://github.com/timohausmann/quadtree-js/

func NewQuadTree1O

func NewQuadTree1O(x int, y int, width int, height int, maxObjects int) *QuadTree

NewQuadTree1O A QuadTree implementation. The original code was a conversion of the Java code posted to GameDevTuts. However I've tweaked it massively to add node indexing, removed lots of temp. var creation and significantly increased performance as a result. Original version at https://github.com/timohausmann/quadtree-js/

func NewQuadTree2O

func NewQuadTree2O(x int, y int, width int, height int, maxObjects int, maxLevels int) *QuadTree

NewQuadTree2O A QuadTree implementation. The original code was a conversion of the Java code posted to GameDevTuts. However I've tweaked it massively to add node indexing, removed lots of temp. var creation and significantly increased performance as a result. Original version at https://github.com/timohausmann/quadtree-js/

func NewQuadTree3O

func NewQuadTree3O(x int, y int, width int, height int, maxObjects int, maxLevels int, level int) *QuadTree

NewQuadTree3O A QuadTree implementation. The original code was a conversion of the Java code posted to GameDevTuts. However I've tweaked it massively to add node indexing, removed lots of temp. var creation and significantly increased performance as a result. Original version at https://github.com/timohausmann/quadtree-js/

func NewQuadTreeI

func NewQuadTreeI(args ...interface{}) *QuadTree

NewQuadTreeI A QuadTree implementation. The original code was a conversion of the Java code posted to GameDevTuts. However I've tweaked it massively to add node indexing, removed lots of temp. var creation and significantly increased performance as a result. Original version at https://github.com/timohausmann/quadtree-js/

func ToQuadTree

func ToQuadTree(jsStruct interface{}) *QuadTree

QuadTree Binding conversion method to QuadTree point

func (*QuadTree) Bounds

func (self *QuadTree) Bounds() interface{}

Bounds Object that contains the quadtree bounds.

func (*QuadTree) Clear

func (self *QuadTree) Clear()

Clear Clear the quadtree.

func (*QuadTree) ClearI

func (self *QuadTree) ClearI(args ...interface{})

ClearI Clear the quadtree.

func (*QuadTree) GetIndex

func (self *QuadTree) GetIndex(rect interface{}) int

GetIndex Determine which node the object belongs to.

func (*QuadTree) GetIndexI

func (self *QuadTree) GetIndexI(args ...interface{}) int

GetIndexI Determine which node the object belongs to.

func (*QuadTree) Insert

func (self *QuadTree) Insert(body interface{})

Insert Insert the object into the node. If the node exceeds the capacity, it will split and add all objects to their corresponding subnodes.

func (*QuadTree) InsertI

func (self *QuadTree) InsertI(args ...interface{})

InsertI Insert the object into the node. If the node exceeds the capacity, it will split and add all objects to their corresponding subnodes.

func (*QuadTree) Level

func (self *QuadTree) Level() int

Level The current level.

func (*QuadTree) MaxLevels

func (self *QuadTree) MaxLevels() int

MaxLevels The maximum number of levels to break down to.

func (*QuadTree) MaxObjects

func (self *QuadTree) MaxObjects() int

MaxObjects The maximum number of objects per node.

func (*QuadTree) Nodes

func (self *QuadTree) Nodes() []interface{}

Nodes Array of associated child nodes.

func (*QuadTree) Objects

func (self *QuadTree) Objects() []interface{}

Objects Array of quadtree children.

func (*QuadTree) Populate

func (self *QuadTree) Populate(group *Group)

Populate Populates this quadtree with the children of the given Group. In order to be added the child must exist and have a body property.

func (*QuadTree) PopulateHandler

func (self *QuadTree) PopulateHandler(sprite interface{})

PopulateHandler Handler for the populate method.

func (*QuadTree) PopulateHandlerI

func (self *QuadTree) PopulateHandlerI(args ...interface{})

PopulateHandlerI Handler for the populate method.

func (*QuadTree) PopulateI

func (self *QuadTree) PopulateI(args ...interface{})

PopulateI Populates this quadtree with the children of the given Group. In order to be added the child must exist and have a body property.

func (*QuadTree) Reset

func (self *QuadTree) Reset(x int, y int, width int, height int)

Reset Resets the QuadTree.

func (*QuadTree) Reset1O

func (self *QuadTree) Reset1O(x int, y int, width int, height int, maxObjects int)

Reset1O Resets the QuadTree.

func (*QuadTree) Reset2O

func (self *QuadTree) Reset2O(x int, y int, width int, height int, maxObjects int, maxLevels int)

Reset2O Resets the QuadTree.

func (*QuadTree) Reset3O

func (self *QuadTree) Reset3O(x int, y int, width int, height int, maxObjects int, maxLevels int, level int)

Reset3O Resets the QuadTree.

func (*QuadTree) ResetI

func (self *QuadTree) ResetI(args ...interface{})

ResetI Resets the QuadTree.

func (*QuadTree) Retrieve

func (self *QuadTree) Retrieve(source interface{}) []interface{}

Retrieve Return all objects that could collide with the given Sprite or Rectangle.

func (*QuadTree) RetrieveI

func (self *QuadTree) RetrieveI(args ...interface{}) []interface{}

RetrieveI Return all objects that could collide with the given Sprite or Rectangle.

func (*QuadTree) SetBoundsA

func (self *QuadTree) SetBoundsA(member interface{})

SetBoundsA Object that contains the quadtree bounds.

func (*QuadTree) SetLevelA

func (self *QuadTree) SetLevelA(member int)

SetLevelA The current level.

func (*QuadTree) SetMaxLevelsA

func (self *QuadTree) SetMaxLevelsA(member int)

SetMaxLevelsA The maximum number of levels to break down to.

func (*QuadTree) SetMaxObjectsA

func (self *QuadTree) SetMaxObjectsA(member int)

SetMaxObjectsA The maximum number of objects per node.

func (*QuadTree) SetNodesA

func (self *QuadTree) SetNodesA(member []interface{})

SetNodesA Array of associated child nodes.

func (*QuadTree) SetObjectsA

func (self *QuadTree) SetObjectsA(member []interface{})

SetObjectsA Array of quadtree children.

func (*QuadTree) Split

func (self *QuadTree) Split()

Split Split the node into 4 subnodes

func (*QuadTree) SplitI

func (self *QuadTree) SplitI(args ...interface{})

SplitI Split the node into 4 subnodes

type Quat

type Quat struct {
	*js.Object
}

Quat empty description

func NewQuat

func NewQuat() *Quat

NewQuat empty description

func NewQuatI

func NewQuatI(args ...interface{}) *Quat

NewQuatI empty description

func ToQuat

func ToQuat(jsStruct interface{}) *Quat

Quat Binding conversion method to Quat point

type RandomDataGenerator

type RandomDataGenerator struct {
	*js.Object
}

RandomDataGenerator An extremely useful repeatable random data generator.

Based on Nonsense by Josh Faul https://github.com/jocafa/Nonsense.

The random number genererator is based on the Alea PRNG, but is modified.

func NewRandomDataGenerator

func NewRandomDataGenerator() *RandomDataGenerator

NewRandomDataGenerator An extremely useful repeatable random data generator.

Based on Nonsense by Josh Faul https://github.com/jocafa/Nonsense.

The random number genererator is based on the Alea PRNG, but is modified.

func NewRandomDataGenerator1O

func NewRandomDataGenerator1O(seeds interface{}) *RandomDataGenerator

NewRandomDataGenerator1O An extremely useful repeatable random data generator.

Based on Nonsense by Josh Faul https://github.com/jocafa/Nonsense.

The random number genererator is based on the Alea PRNG, but is modified.

func NewRandomDataGeneratorI

func NewRandomDataGeneratorI(args ...interface{}) *RandomDataGenerator

NewRandomDataGeneratorI An extremely useful repeatable random data generator.

Based on Nonsense by Josh Faul https://github.com/jocafa/Nonsense.

The random number genererator is based on the Alea PRNG, but is modified.

func ToRandomDataGenerator

func ToRandomDataGenerator(jsStruct interface{}) *RandomDataGenerator

RandomDataGenerator Binding conversion method to RandomDataGenerator point

func (*RandomDataGenerator) Angle

func (self *RandomDataGenerator) Angle() int

Angle Returns a random angle between -180 and 180.

func (*RandomDataGenerator) AngleI

func (self *RandomDataGenerator) AngleI(args ...interface{}) int

AngleI Returns a random angle between -180 and 180.

func (*RandomDataGenerator) Between

func (self *RandomDataGenerator) Between(min int, max int) int

Between Returns a random integer between and including min and max. This method is an alias for RandomDataGenerator.integerInRange.

func (*RandomDataGenerator) BetweenI

func (self *RandomDataGenerator) BetweenI(args ...interface{}) int

BetweenI Returns a random integer between and including min and max. This method is an alias for RandomDataGenerator.integerInRange.

func (*RandomDataGenerator) Frac

func (self *RandomDataGenerator) Frac() int

Frac Returns a random real number between 0 and 1.

func (*RandomDataGenerator) FracI

func (self *RandomDataGenerator) FracI(args ...interface{}) int

FracI Returns a random real number between 0 and 1.

func (*RandomDataGenerator) Hash

func (self *RandomDataGenerator) Hash(data interface{}) int

Hash Internal method that creates a seed hash.

func (*RandomDataGenerator) HashI

func (self *RandomDataGenerator) HashI(args ...interface{}) int

HashI Internal method that creates a seed hash.

func (*RandomDataGenerator) Integer

func (self *RandomDataGenerator) Integer() int

Integer Returns a random integer between 0 and 2^32.

func (*RandomDataGenerator) IntegerI

func (self *RandomDataGenerator) IntegerI(args ...interface{}) int

IntegerI Returns a random integer between 0 and 2^32.

func (*RandomDataGenerator) IntegerInRange

func (self *RandomDataGenerator) IntegerInRange(min int, max int) int

IntegerInRange Returns a random integer between and including min and max.

func (*RandomDataGenerator) IntegerInRangeI

func (self *RandomDataGenerator) IntegerInRangeI(args ...interface{}) int

IntegerInRangeI Returns a random integer between and including min and max.

func (*RandomDataGenerator) Normal

func (self *RandomDataGenerator) Normal() int

Normal Returns a random real number between -1 and 1.

func (*RandomDataGenerator) NormalI

func (self *RandomDataGenerator) NormalI(args ...interface{}) int

NormalI Returns a random real number between -1 and 1.

func (*RandomDataGenerator) Pick

func (self *RandomDataGenerator) Pick(ary []interface{}) interface{}

Pick Returns a random member of `array`.

func (*RandomDataGenerator) PickI

func (self *RandomDataGenerator) PickI(args ...interface{}) interface{}

PickI Returns a random member of `array`.

func (*RandomDataGenerator) Real

func (self *RandomDataGenerator) Real() int

Real Returns a random real number between 0 and 2^32.

func (*RandomDataGenerator) RealI

func (self *RandomDataGenerator) RealI(args ...interface{}) int

RealI Returns a random real number between 0 and 2^32.

func (*RandomDataGenerator) RealInRange

func (self *RandomDataGenerator) RealInRange(min int, max int) int

RealInRange Returns a random real number between min and max.

func (*RandomDataGenerator) RealInRangeI

func (self *RandomDataGenerator) RealInRangeI(args ...interface{}) int

RealInRangeI Returns a random real number between min and max.

func (*RandomDataGenerator) Rnd

func (self *RandomDataGenerator) Rnd() int

Rnd Private random helper.

func (*RandomDataGenerator) RndI

func (self *RandomDataGenerator) RndI(args ...interface{}) int

RndI Private random helper.

func (*RandomDataGenerator) Sign

func (self *RandomDataGenerator) Sign() int

Sign Returns a sign to be used with multiplication operator.

func (*RandomDataGenerator) SignI

func (self *RandomDataGenerator) SignI(args ...interface{}) int

SignI Returns a sign to be used with multiplication operator.

func (*RandomDataGenerator) Sow

func (self *RandomDataGenerator) Sow(seeds []interface{})

Sow Reset the seed of the random data generator.

_Note_: the seed array is only processed up to the first `undefined` (or `null`) value, should such be present.

func (*RandomDataGenerator) SowI

func (self *RandomDataGenerator) SowI(args ...interface{})

SowI Reset the seed of the random data generator.

_Note_: the seed array is only processed up to the first `undefined` (or `null`) value, should such be present.

func (*RandomDataGenerator) State

func (self *RandomDataGenerator) State() string

State Gets or Sets the state of the generator. This allows you to retain the values that the generator is using between games, i.e. in a game save file.

To seed this generator with a previously saved state you can pass it as the `seed` value in your game config, or call this method directly after Phaser has booted.

Call this method with no parameters to return the current state.

If providing a state it should match the same format that this method returns, which is a string with a header `!rnd` followed by the `c`, `s0`, `s1` and `s2` values respectively, each comma-delimited.

func (*RandomDataGenerator) State1O

func (self *RandomDataGenerator) State1O(state string) string

State1O Gets or Sets the state of the generator. This allows you to retain the values that the generator is using between games, i.e. in a game save file.

To seed this generator with a previously saved state you can pass it as the `seed` value in your game config, or call this method directly after Phaser has booted.

Call this method with no parameters to return the current state.

If providing a state it should match the same format that this method returns, which is a string with a header `!rnd` followed by the `c`, `s0`, `s1` and `s2` values respectively, each comma-delimited.

func (*RandomDataGenerator) StateI

func (self *RandomDataGenerator) StateI(args ...interface{}) string

StateI Gets or Sets the state of the generator. This allows you to retain the values that the generator is using between games, i.e. in a game save file.

To seed this generator with a previously saved state you can pass it as the `seed` value in your game config, or call this method directly after Phaser has booted.

Call this method with no parameters to return the current state.

If providing a state it should match the same format that this method returns, which is a string with a header `!rnd` followed by the `c`, `s0`, `s1` and `s2` values respectively, each comma-delimited.

func (*RandomDataGenerator) Timestamp

func (self *RandomDataGenerator) Timestamp(min int, max int) int

Timestamp Returns a random timestamp between min and max, or between the beginning of 2000 and the end of 2020 if min and max aren't specified.

func (*RandomDataGenerator) TimestampI

func (self *RandomDataGenerator) TimestampI(args ...interface{}) int

TimestampI Returns a random timestamp between min and max, or between the beginning of 2000 and the end of 2020 if min and max aren't specified.

func (*RandomDataGenerator) Uuid

func (self *RandomDataGenerator) Uuid() string

Uuid Returns a valid RFC4122 version4 ID hex string from https://gist.github.com/1308368

func (*RandomDataGenerator) UuidI

func (self *RandomDataGenerator) UuidI(args ...interface{}) string

UuidI Returns a valid RFC4122 version4 ID hex string from https://gist.github.com/1308368

func (*RandomDataGenerator) WeightedPick

func (self *RandomDataGenerator) WeightedPick(ary []interface{}) interface{}

WeightedPick Returns a random member of `array`, favoring the earlier entries.

func (*RandomDataGenerator) WeightedPickI

func (self *RandomDataGenerator) WeightedPickI(args ...interface{}) interface{}

WeightedPickI Returns a random member of `array`, favoring the earlier entries.

type Rectangle

type Rectangle struct {
	*js.Object
}

Rectangle Creates a new Rectangle object with the top-left corner specified by the x and y parameters and with the specified width and height parameters. If you call this function without parameters, a Rectangle with x, y, width, and height properties set to 0 is created.

func NewRectangle

func NewRectangle(x int, y int, width int, height int) *Rectangle

NewRectangle Creates a new Rectangle object with the top-left corner specified by the x and y parameters and with the specified width and height parameters. If you call this function without parameters, a Rectangle with x, y, width, and height properties set to 0 is created.

func NewRectangleI

func NewRectangleI(args ...interface{}) *Rectangle

NewRectangleI Creates a new Rectangle object with the top-left corner specified by the x and y parameters and with the specified width and height parameters. If you call this function without parameters, a Rectangle with x, y, width, and height properties set to 0 is created.

func ToRectangle

func ToRectangle(jsStruct interface{}) *Rectangle

Rectangle Binding conversion method to Rectangle point

func (*Rectangle) Aabb

func (self *Rectangle) Aabb(points []Point) *Rectangle

Aabb Calculates the Axis Aligned Bounding Box (or aabb) from an array of points.

func (*Rectangle) Aabb1O

func (self *Rectangle) Aabb1O(points []Point, out *Rectangle) *Rectangle

Aabb1O Calculates the Axis Aligned Bounding Box (or aabb) from an array of points.

func (*Rectangle) AabbI

func (self *Rectangle) AabbI(args ...interface{}) *Rectangle

AabbI Calculates the Axis Aligned Bounding Box (or aabb) from an array of points.

func (*Rectangle) Bottom

func (self *Rectangle) Bottom() int

Bottom The sum of the y and height properties. Changing the bottom property of a Rectangle object has no effect on the x, y and width properties, but does change the height property.

func (*Rectangle) BottomLeft

func (self *Rectangle) BottomLeft() *Point

BottomLeft The location of the Rectangles bottom left corner as a Point object. Gets or sets the location of the Rectangles bottom left corner as a Point object.

func (*Rectangle) BottomRight

func (self *Rectangle) BottomRight() *Point

BottomRight The location of the Rectangles bottom right corner as a Point object. Gets or sets the location of the Rectangles bottom right corner as a Point object.

func (*Rectangle) Ceil

func (self *Rectangle) Ceil()

Ceil Runs Math.ceil() on both the x and y values of this Rectangle.

func (*Rectangle) CeilAll

func (self *Rectangle) CeilAll()

CeilAll Runs Math.ceil() on the x, y, width and height values of this Rectangle.

func (*Rectangle) CeilAllI

func (self *Rectangle) CeilAllI(args ...interface{})

CeilAllI Runs Math.ceil() on the x, y, width and height values of this Rectangle.

func (*Rectangle) CeilI

func (self *Rectangle) CeilI(args ...interface{})

CeilI Runs Math.ceil() on both the x and y values of this Rectangle.

func (*Rectangle) CenterOn

func (self *Rectangle) CenterOn(x int, y int) *Rectangle

CenterOn Centers this Rectangle so that the center coordinates match the given x and y values.

func (*Rectangle) CenterOnI

func (self *Rectangle) CenterOnI(args ...interface{}) *Rectangle

CenterOnI Centers this Rectangle so that the center coordinates match the given x and y values.

func (*Rectangle) CenterX

func (self *Rectangle) CenterX() int

CenterX The x coordinate of the center of the Rectangle.

func (*Rectangle) CenterY

func (self *Rectangle) CenterY() int

CenterY The y coordinate of the center of the Rectangle.

func (*Rectangle) Clone

func (self *Rectangle) Clone() *Rectangle

Clone Returns a new Rectangle object with the same values for the x, y, width, and height properties as the original Rectangle object.

func (*Rectangle) Clone1O

func (self *Rectangle) Clone1O(output *Rectangle) *Rectangle

Clone1O Returns a new Rectangle object with the same values for the x, y, width, and height properties as the original Rectangle object.

func (*Rectangle) CloneI

func (self *Rectangle) CloneI(args ...interface{}) *Rectangle

CloneI Returns a new Rectangle object with the same values for the x, y, width, and height properties as the original Rectangle object.

func (*Rectangle) Contains

func (self *Rectangle) Contains(x int, y int) bool

Contains Determines whether the specified coordinates are contained within the region defined by this Rectangle object.

func (*Rectangle) ContainsI

func (self *Rectangle) ContainsI(args ...interface{}) bool

ContainsI Determines whether the specified coordinates are contained within the region defined by this Rectangle object.

func (*Rectangle) ContainsPoint

func (self *Rectangle) ContainsPoint(a *Rectangle, point *Point) bool

ContainsPoint Determines whether the specified point is contained within the rectangular region defined by this Rectangle object. This method is similar to the Rectangle.contains() method, except that it takes a Point object as a parameter.

func (*Rectangle) ContainsPointI

func (self *Rectangle) ContainsPointI(args ...interface{}) bool

ContainsPointI Determines whether the specified point is contained within the rectangular region defined by this Rectangle object. This method is similar to the Rectangle.contains() method, except that it takes a Point object as a parameter.

func (*Rectangle) ContainsRaw

func (self *Rectangle) ContainsRaw(rx int, ry int, rw int, rh int, x int, y int) bool

ContainsRaw Determines whether the specified coordinates are contained within the region defined by the given raw values.

func (*Rectangle) ContainsRawI

func (self *Rectangle) ContainsRawI(args ...interface{}) bool

ContainsRawI Determines whether the specified coordinates are contained within the region defined by the given raw values.

func (*Rectangle) ContainsRect

func (self *Rectangle) ContainsRect(b *Rectangle) bool

ContainsRect Determines whether the first Rectangle object is fully contained within the second Rectangle object. A Rectangle object is said to contain another if the second Rectangle object falls entirely within the boundaries of the first.

func (*Rectangle) ContainsRectI

func (self *Rectangle) ContainsRectI(args ...interface{}) bool

ContainsRectI Determines whether the first Rectangle object is fully contained within the second Rectangle object. A Rectangle object is said to contain another if the second Rectangle object falls entirely within the boundaries of the first.

func (*Rectangle) CopyFrom

func (self *Rectangle) CopyFrom(source interface{}) *Rectangle

CopyFrom Copies the x, y, width and height properties from any given object to this Rectangle.

func (*Rectangle) CopyFromI

func (self *Rectangle) CopyFromI(args ...interface{}) *Rectangle

CopyFromI Copies the x, y, width and height properties from any given object to this Rectangle.

func (*Rectangle) CopyTo

func (self *Rectangle) CopyTo(source interface{}) interface{}

CopyTo Copies the x, y, width and height properties from this Rectangle to any given object.

func (*Rectangle) CopyToI

func (self *Rectangle) CopyToI(args ...interface{}) interface{}

CopyToI Copies the x, y, width and height properties from this Rectangle to any given object.

func (*Rectangle) Empty

func (self *Rectangle) Empty() bool

Empty Determines whether or not this Rectangle object is empty. A Rectangle object is empty if its width or height is less than or equal to 0. If set to true then all of the Rectangle properties are set to 0. Gets or sets the Rectangles empty state.

func (*Rectangle) Equals

func (self *Rectangle) Equals(b *Rectangle) bool

Equals Determines whether the two Rectangles are equal. This method compares the x, y, width and height properties of each Rectangle.

func (*Rectangle) EqualsI

func (self *Rectangle) EqualsI(args ...interface{}) bool

EqualsI Determines whether the two Rectangles are equal. This method compares the x, y, width and height properties of each Rectangle.

func (*Rectangle) Floor

func (self *Rectangle) Floor()

Floor Runs Math.floor() on both the x and y values of this Rectangle.

func (*Rectangle) FloorAll

func (self *Rectangle) FloorAll()

FloorAll Runs Math.floor() on the x, y, width and height values of this Rectangle.

func (*Rectangle) FloorAllI

func (self *Rectangle) FloorAllI(args ...interface{})

FloorAllI Runs Math.floor() on the x, y, width and height values of this Rectangle.

func (*Rectangle) FloorI

func (self *Rectangle) FloorI(args ...interface{})

FloorI Runs Math.floor() on both the x and y values of this Rectangle.

func (*Rectangle) GetPoint

func (self *Rectangle) GetPoint() *Point

GetPoint Returns a point based on the given position constant, which can be one of:

`Phaser.TOP_LEFT`, `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

This method returns the same values as calling Rectangle.bottomLeft, etc, but those calls always create a new Point object, where-as this one allows you to use your own.

func (*Rectangle) GetPoint1O

func (self *Rectangle) GetPoint1O(position int) *Point

GetPoint1O Returns a point based on the given position constant, which can be one of:

`Phaser.TOP_LEFT`, `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

This method returns the same values as calling Rectangle.bottomLeft, etc, but those calls always create a new Point object, where-as this one allows you to use your own.

func (*Rectangle) GetPoint2O

func (self *Rectangle) GetPoint2O(position int, out *Point) *Point

GetPoint2O Returns a point based on the given position constant, which can be one of:

`Phaser.TOP_LEFT`, `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

This method returns the same values as calling Rectangle.bottomLeft, etc, but those calls always create a new Point object, where-as this one allows you to use your own.

func (*Rectangle) GetPointI

func (self *Rectangle) GetPointI(args ...interface{}) *Point

GetPointI Returns a point based on the given position constant, which can be one of:

`Phaser.TOP_LEFT`, `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

This method returns the same values as calling Rectangle.bottomLeft, etc, but those calls always create a new Point object, where-as this one allows you to use your own.

func (*Rectangle) HalfHeight

func (self *Rectangle) HalfHeight() int

HalfHeight Half of the height of the Rectangle.

func (*Rectangle) HalfWidth

func (self *Rectangle) HalfWidth() int

HalfWidth Half of the width of the Rectangle.

func (*Rectangle) Height

func (self *Rectangle) Height() int

Height The height of the Rectangle. This value should never be set to a negative.

func (*Rectangle) Inflate

func (self *Rectangle) Inflate(dx int, dy int) *Rectangle

Inflate Increases the size of the Rectangle object by the specified amounts. The center point of the Rectangle object stays the same, and its size increases to the left and right by the dx value, and to the top and the bottom by the dy value.

func (*Rectangle) InflateI

func (self *Rectangle) InflateI(args ...interface{}) *Rectangle

InflateI Increases the size of the Rectangle object by the specified amounts. The center point of the Rectangle object stays the same, and its size increases to the left and right by the dx value, and to the top and the bottom by the dy value.

func (*Rectangle) InflatePoint

func (self *Rectangle) InflatePoint(a *Rectangle, point *Point) *Rectangle

InflatePoint Increases the size of the Rectangle object. This method is similar to the Rectangle.inflate() method except it takes a Point object as a parameter.

func (*Rectangle) InflatePointI

func (self *Rectangle) InflatePointI(args ...interface{}) *Rectangle

InflatePointI Increases the size of the Rectangle object. This method is similar to the Rectangle.inflate() method except it takes a Point object as a parameter.

func (*Rectangle) Intersection

func (self *Rectangle) Intersection(b *Rectangle, out *Rectangle) *Rectangle

Intersection If the Rectangle object specified in the toIntersect parameter intersects with this Rectangle object, returns the area of intersection as a Rectangle object. If the Rectangles do not intersect, this method returns an empty Rectangle object with its properties set to 0.

func (*Rectangle) IntersectionI

func (self *Rectangle) IntersectionI(args ...interface{}) *Rectangle

IntersectionI If the Rectangle object specified in the toIntersect parameter intersects with this Rectangle object, returns the area of intersection as a Rectangle object. If the Rectangles do not intersect, this method returns an empty Rectangle object with its properties set to 0.

func (*Rectangle) Intersects

func (self *Rectangle) Intersects(b *Rectangle) bool

Intersects Determines whether this Rectangle and another given Rectangle intersect with each other. This method checks the x, y, width, and height properties of the two Rectangles.

func (*Rectangle) IntersectsI

func (self *Rectangle) IntersectsI(args ...interface{}) bool

IntersectsI Determines whether this Rectangle and another given Rectangle intersect with each other. This method checks the x, y, width, and height properties of the two Rectangles.

func (*Rectangle) IntersectsRaw

func (self *Rectangle) IntersectsRaw(left int, right int, top int, bottom int, tolerance int) bool

IntersectsRaw Determines whether the coordinates given intersects (overlaps) with this Rectangle.

func (*Rectangle) IntersectsRawI

func (self *Rectangle) IntersectsRawI(args ...interface{}) bool

IntersectsRawI Determines whether the coordinates given intersects (overlaps) with this Rectangle.

func (*Rectangle) Left

func (self *Rectangle) Left() int

Left The x coordinate of the left of the Rectangle. Changing the left property of a Rectangle object has no effect on the y and height properties. However it does affect the width property, whereas changing the x value does not affect the width property.

func (*Rectangle) Offset

func (self *Rectangle) Offset(dx int, dy int) *Rectangle

Offset Adjusts the location of the Rectangle object, as determined by its top-left corner, by the specified amounts.

func (*Rectangle) OffsetI

func (self *Rectangle) OffsetI(args ...interface{}) *Rectangle

OffsetI Adjusts the location of the Rectangle object, as determined by its top-left corner, by the specified amounts.

func (*Rectangle) OffsetPoint

func (self *Rectangle) OffsetPoint(point *Point) *Rectangle

OffsetPoint Adjusts the location of the Rectangle object using a Point object as a parameter. This method is similar to the Rectangle.offset() method, except that it takes a Point object as a parameter.

func (*Rectangle) OffsetPointI

func (self *Rectangle) OffsetPointI(args ...interface{}) *Rectangle

OffsetPointI Adjusts the location of the Rectangle object using a Point object as a parameter. This method is similar to the Rectangle.offset() method, except that it takes a Point object as a parameter.

func (*Rectangle) Perimeter

func (self *Rectangle) Perimeter() int

Perimeter The perimeter size of the Rectangle. This is the sum of all 4 sides.

func (*Rectangle) Random

func (self *Rectangle) Random() *Point

Random Returns a uniformly distributed random point from anywhere within this Rectangle.

func (*Rectangle) Random1O

func (self *Rectangle) Random1O(out interface{}) *Point

Random1O Returns a uniformly distributed random point from anywhere within this Rectangle.

func (*Rectangle) RandomI

func (self *Rectangle) RandomI(args ...interface{}) *Point

RandomI Returns a uniformly distributed random point from anywhere within this Rectangle.

func (*Rectangle) RandomX

func (self *Rectangle) RandomX() int

RandomX A random value between the left and right values (inclusive) of the Rectangle.

func (*Rectangle) RandomY

func (self *Rectangle) RandomY() int

RandomY A random value between the top and bottom values (inclusive) of the Rectangle.

func (*Rectangle) Resize

func (self *Rectangle) Resize(width int, height int) *Rectangle

Resize Resize the Rectangle by providing a new width and height. The x and y positions remain unchanged.

func (*Rectangle) ResizeI

func (self *Rectangle) ResizeI(args ...interface{}) *Rectangle

ResizeI Resize the Rectangle by providing a new width and height. The x and y positions remain unchanged.

func (*Rectangle) Right

func (self *Rectangle) Right() int

Right The sum of the x and width properties. Changing the right property of a Rectangle object has no effect on the x, y and height properties, however it does affect the width property.

func (*Rectangle) SameDimensions

func (self *Rectangle) SameDimensions(a interface{}, b interface{}) bool

SameDimensions Determines if the two objects (either Rectangles or Rectangle-like) have the same width and height values under strict equality.

func (*Rectangle) SameDimensionsI

func (self *Rectangle) SameDimensionsI(args ...interface{}) bool

SameDimensionsI Determines if the two objects (either Rectangles or Rectangle-like) have the same width and height values under strict equality.

func (*Rectangle) Scale

func (self *Rectangle) Scale(x int) *Rectangle

Scale Scales the width and height of this Rectangle by the given amounts.

func (*Rectangle) Scale1O

func (self *Rectangle) Scale1O(x int, y int) *Rectangle

Scale1O Scales the width and height of this Rectangle by the given amounts.

func (*Rectangle) ScaleI

func (self *Rectangle) ScaleI(args ...interface{}) *Rectangle

ScaleI Scales the width and height of this Rectangle by the given amounts.

func (*Rectangle) SetBottomA

func (self *Rectangle) SetBottomA(member int)

SetBottomA The sum of the y and height properties. Changing the bottom property of a Rectangle object has no effect on the x, y and width properties, but does change the height property.

func (*Rectangle) SetBottomLeftA

func (self *Rectangle) SetBottomLeftA(member *Point)

SetBottomLeftA The location of the Rectangles bottom left corner as a Point object. Gets or sets the location of the Rectangles bottom left corner as a Point object.

func (*Rectangle) SetBottomRightA

func (self *Rectangle) SetBottomRightA(member *Point)

SetBottomRightA The location of the Rectangles bottom right corner as a Point object. Gets or sets the location of the Rectangles bottom right corner as a Point object.

func (*Rectangle) SetCenterXA

func (self *Rectangle) SetCenterXA(member int)

SetCenterXA The x coordinate of the center of the Rectangle.

func (*Rectangle) SetCenterYA

func (self *Rectangle) SetCenterYA(member int)

SetCenterYA The y coordinate of the center of the Rectangle.

func (*Rectangle) SetEmptyA

func (self *Rectangle) SetEmptyA(member bool)

SetEmptyA Determines whether or not this Rectangle object is empty. A Rectangle object is empty if its width or height is less than or equal to 0. If set to true then all of the Rectangle properties are set to 0. Gets or sets the Rectangles empty state.

func (*Rectangle) SetHalfHeightA

func (self *Rectangle) SetHalfHeightA(member int)

SetHalfHeightA Half of the height of the Rectangle.

func (*Rectangle) SetHalfWidthA

func (self *Rectangle) SetHalfWidthA(member int)

SetHalfWidthA Half of the width of the Rectangle.

func (*Rectangle) SetHeightA

func (self *Rectangle) SetHeightA(member int)

SetHeightA The height of the Rectangle. This value should never be set to a negative.

func (*Rectangle) SetLeftA

func (self *Rectangle) SetLeftA(member int)

SetLeftA The x coordinate of the left of the Rectangle. Changing the left property of a Rectangle object has no effect on the y and height properties. However it does affect the width property, whereas changing the x value does not affect the width property.

func (*Rectangle) SetPerimeterA

func (self *Rectangle) SetPerimeterA(member int)

SetPerimeterA The perimeter size of the Rectangle. This is the sum of all 4 sides.

func (*Rectangle) SetRandomXA

func (self *Rectangle) SetRandomXA(member int)

SetRandomXA A random value between the left and right values (inclusive) of the Rectangle.

func (*Rectangle) SetRandomYA

func (self *Rectangle) SetRandomYA(member int)

SetRandomYA A random value between the top and bottom values (inclusive) of the Rectangle.

func (*Rectangle) SetRightA

func (self *Rectangle) SetRightA(member int)

SetRightA The sum of the x and width properties. Changing the right property of a Rectangle object has no effect on the x, y and height properties, however it does affect the width property.

func (*Rectangle) SetTo

func (self *Rectangle) SetTo(x int, y int, width int, height int) *Rectangle

SetTo Sets the members of Rectangle to the specified values.

func (*Rectangle) SetToI

func (self *Rectangle) SetToI(args ...interface{}) *Rectangle

SetToI Sets the members of Rectangle to the specified values.

func (*Rectangle) SetTopA

func (self *Rectangle) SetTopA(member int)

SetTopA The y coordinate of the top of the Rectangle. Changing the top property of a Rectangle object has no effect on the x and width properties. However it does affect the height property, whereas changing the y value does not affect the height property.

func (*Rectangle) SetTopLeftA

func (self *Rectangle) SetTopLeftA(member *Point)

SetTopLeftA The location of the Rectangles top left corner as a Point object.

func (*Rectangle) SetTopRightA

func (self *Rectangle) SetTopRightA(member *Point)

SetTopRightA The location of the Rectangles top right corner as a Point object. The location of the Rectangles top left corner as a Point object.

func (*Rectangle) SetTypeA

func (self *Rectangle) SetTypeA(member int)

SetTypeA The const type of this object.

func (*Rectangle) SetVolumeA

func (self *Rectangle) SetVolumeA(member int)

SetVolumeA The volume of the Rectangle derived from width * height.

func (*Rectangle) SetWidthA

func (self *Rectangle) SetWidthA(member int)

SetWidthA The width of the Rectangle. This value should never be set to a negative.

func (*Rectangle) SetXA

func (self *Rectangle) SetXA(member int)

SetXA The x coordinate of the top-left corner of the Rectangle.

func (*Rectangle) SetYA

func (self *Rectangle) SetYA(member int)

SetYA The y coordinate of the top-left corner of the Rectangle.

func (*Rectangle) Size

func (self *Rectangle) Size() *Point

Size The size of the Rectangle object, expressed as a Point object with the values of the width and height properties.

func (*Rectangle) Size1O

func (self *Rectangle) Size1O(output *Point) *Point

Size1O The size of the Rectangle object, expressed as a Point object with the values of the width and height properties.

func (*Rectangle) SizeI

func (self *Rectangle) SizeI(args ...interface{}) *Point

SizeI The size of the Rectangle object, expressed as a Point object with the values of the width and height properties.

func (*Rectangle) ToString

func (self *Rectangle) ToString() string

ToString Returns a string representation of this object.

func (*Rectangle) ToStringI

func (self *Rectangle) ToStringI(args ...interface{}) string

ToStringI Returns a string representation of this object.

func (*Rectangle) Top

func (self *Rectangle) Top() int

Top The y coordinate of the top of the Rectangle. Changing the top property of a Rectangle object has no effect on the x and width properties. However it does affect the height property, whereas changing the y value does not affect the height property.

func (*Rectangle) TopLeft

func (self *Rectangle) TopLeft() *Point

TopLeft The location of the Rectangles top left corner as a Point object.

func (*Rectangle) TopRight

func (self *Rectangle) TopRight() *Point

TopRight The location of the Rectangles top right corner as a Point object. The location of the Rectangles top left corner as a Point object.

func (*Rectangle) Type

func (self *Rectangle) Type() int

Type The const type of this object.

func (*Rectangle) Union

func (self *Rectangle) Union(b *Rectangle) *Rectangle

Union Adds two Rectangles together to create a new Rectangle object, by filling in the horizontal and vertical space between the two Rectangles.

func (*Rectangle) Union1O

func (self *Rectangle) Union1O(b *Rectangle, out *Rectangle) *Rectangle

Union1O Adds two Rectangles together to create a new Rectangle object, by filling in the horizontal and vertical space between the two Rectangles.

func (*Rectangle) UnionI

func (self *Rectangle) UnionI(args ...interface{}) *Rectangle

UnionI Adds two Rectangles together to create a new Rectangle object, by filling in the horizontal and vertical space between the two Rectangles.

func (*Rectangle) Volume

func (self *Rectangle) Volume() int

Volume The volume of the Rectangle derived from width * height.

func (*Rectangle) Width

func (self *Rectangle) Width() int

Width The width of the Rectangle. This value should never be set to a negative.

func (*Rectangle) X

func (self *Rectangle) X() int

X The x coordinate of the top-left corner of the Rectangle.

func (*Rectangle) Y

func (self *Rectangle) Y() int

Y The y coordinate of the top-left corner of the Rectangle.

type RenderSession

type RenderSession struct{ *js.Object }

type RenderTexture

type RenderTexture struct {
	*js.Object
}

RenderTexture A RenderTexture is a special texture that allows any displayObject to be rendered to it. It allows you to take many complex objects and render them down into a single quad (on WebGL) which can then be used to texture other display objects with. A way of generating textures at run-time.

func NewRenderTexture

func NewRenderTexture(game *Game) *RenderTexture

NewRenderTexture A RenderTexture is a special texture that allows any displayObject to be rendered to it. It allows you to take many complex objects and render them down into a single quad (on WebGL) which can then be used to texture other display objects with. A way of generating textures at run-time.

func NewRenderTexture1O

func NewRenderTexture1O(game *Game, width int) *RenderTexture

NewRenderTexture1O A RenderTexture is a special texture that allows any displayObject to be rendered to it. It allows you to take many complex objects and render them down into a single quad (on WebGL) which can then be used to texture other display objects with. A way of generating textures at run-time.

func NewRenderTexture2O

func NewRenderTexture2O(game *Game, width int, height int) *RenderTexture

NewRenderTexture2O A RenderTexture is a special texture that allows any displayObject to be rendered to it. It allows you to take many complex objects and render them down into a single quad (on WebGL) which can then be used to texture other display objects with. A way of generating textures at run-time.

func NewRenderTexture3O

func NewRenderTexture3O(game *Game, width int, height int, key string) *RenderTexture

NewRenderTexture3O A RenderTexture is a special texture that allows any displayObject to be rendered to it. It allows you to take many complex objects and render them down into a single quad (on WebGL) which can then be used to texture other display objects with. A way of generating textures at run-time.

func NewRenderTexture4O

func NewRenderTexture4O(game *Game, width int, height int, key string, scaleMode int) *RenderTexture

NewRenderTexture4O A RenderTexture is a special texture that allows any displayObject to be rendered to it. It allows you to take many complex objects and render them down into a single quad (on WebGL) which can then be used to texture other display objects with. A way of generating textures at run-time.

func NewRenderTexture5O

func NewRenderTexture5O(game *Game, width int, height int, key string, scaleMode int, resolution int) *RenderTexture

NewRenderTexture5O A RenderTexture is a special texture that allows any displayObject to be rendered to it. It allows you to take many complex objects and render them down into a single quad (on WebGL) which can then be used to texture other display objects with. A way of generating textures at run-time.

func NewRenderTextureI

func NewRenderTextureI(args ...interface{}) *RenderTexture

NewRenderTextureI A RenderTexture is a special texture that allows any displayObject to be rendered to it. It allows you to take many complex objects and render them down into a single quad (on WebGL) which can then be used to texture other display objects with. A way of generating textures at run-time.

func ToRenderTexture

func ToRenderTexture(jsStruct interface{}) *RenderTexture

RenderTexture Binding conversion method to RenderTexture point

func (*RenderTexture) BaseTexture

func (self *RenderTexture) BaseTexture() *BaseTexture

BaseTexture The base texture object that this texture uses

func (*RenderTexture) Clear

func (self *RenderTexture) Clear()

Clear Clears the RenderTexture.

func (*RenderTexture) ClearI

func (self *RenderTexture) ClearI(args ...interface{})

ClearI Clears the RenderTexture.

func (*RenderTexture) Crop

func (self *RenderTexture) Crop() *Rectangle

Crop This is the area of the BaseTexture image to actually copy to the Canvas / WebGL when rendering,

irrespective of the actual frame size or placement (which can be influenced by trimmed texture atlases)

func (*RenderTexture) Destroy

func (self *RenderTexture) Destroy(destroyBase bool)

Destroy Destroys this texture

func (*RenderTexture) DestroyI

func (self *RenderTexture) DestroyI(args ...interface{})

DestroyI Destroys this texture

func (*RenderTexture) Frame

func (self *RenderTexture) Frame() *Rectangle

Frame The framing rectangle of the render texture

func (*RenderTexture) Game

func (self *RenderTexture) Game() *Game

Game A reference to the currently running game.

func (*RenderTexture) GetBase64

func (self *RenderTexture) GetBase64() string

GetBase64 Will return a base64 encoded string of this texture. It works by calling RenderTexture.getCanvas and then running toDataURL on that.

func (*RenderTexture) GetBase64I

func (self *RenderTexture) GetBase64I(args ...interface{}) string

GetBase64I Will return a base64 encoded string of this texture. It works by calling RenderTexture.getCanvas and then running toDataURL on that.

func (*RenderTexture) GetCanvas

func (self *RenderTexture) GetCanvas() dom.HTMLCanvasElement

GetCanvas Creates a Canvas element, renders this RenderTexture to it and then returns it.

func (*RenderTexture) GetCanvasI

func (self *RenderTexture) GetCanvasI(args ...interface{}) dom.HTMLCanvasElement

GetCanvasI Creates a Canvas element, renders this RenderTexture to it and then returns it.

func (*RenderTexture) GetImage

func (self *RenderTexture) GetImage() *Image

GetImage Will return a HTML Image of the texture

func (*RenderTexture) GetImageI

func (self *RenderTexture) GetImageI(args ...interface{}) *Image

GetImageI Will return a HTML Image of the texture

func (*RenderTexture) Height

func (self *RenderTexture) Height() int

Height The height of the render texture

func (*RenderTexture) IsTiling

func (self *RenderTexture) IsTiling() bool

IsTiling Is this a tiling texture? As used by the likes of a TilingSprite.

func (*RenderTexture) Key

func (self *RenderTexture) Key() string

Key The key of the RenderTexture in the Cache, if stored there.

func (*RenderTexture) NoFrame

func (self *RenderTexture) NoFrame() bool

NoFrame Does this Texture have any frame data assigned to it?

func (*RenderTexture) OnBaseTextureLoaded

func (self *RenderTexture) OnBaseTextureLoaded()

OnBaseTextureLoaded Called when the base texture is loaded

func (*RenderTexture) OnBaseTextureLoadedI

func (self *RenderTexture) OnBaseTextureLoadedI(args ...interface{})

OnBaseTextureLoadedI Called when the base texture is loaded

func (*RenderTexture) Render

func (self *RenderTexture) Render(displayObject interface{})

Render This function will draw the display object to the RenderTexture.

In versions of Phaser prior to 2.4.0 the second parameter was a Phaser.Point object. This is now a Matrix allowing you much more control over how the Display Object is rendered. If you need to replicate the earlier behavior please use Phaser.RenderTexture.renderXY instead.

If you wish for the displayObject to be rendered taking its current scale, rotation and translation into account then either pass `null`, leave it undefined or pass `displayObject.worldTransform` as the matrix value.

func (*RenderTexture) Render1O

func (self *RenderTexture) Render1O(displayObject interface{}, matrix *Matrix)

Render1O This function will draw the display object to the RenderTexture.

In versions of Phaser prior to 2.4.0 the second parameter was a Phaser.Point object. This is now a Matrix allowing you much more control over how the Display Object is rendered. If you need to replicate the earlier behavior please use Phaser.RenderTexture.renderXY instead.

If you wish for the displayObject to be rendered taking its current scale, rotation and translation into account then either pass `null`, leave it undefined or pass `displayObject.worldTransform` as the matrix value.

func (*RenderTexture) Render2O

func (self *RenderTexture) Render2O(displayObject interface{}, matrix *Matrix, clear bool)

Render2O This function will draw the display object to the RenderTexture.

In versions of Phaser prior to 2.4.0 the second parameter was a Phaser.Point object. This is now a Matrix allowing you much more control over how the Display Object is rendered. If you need to replicate the earlier behavior please use Phaser.RenderTexture.renderXY instead.

If you wish for the displayObject to be rendered taking its current scale, rotation and translation into account then either pass `null`, leave it undefined or pass `displayObject.worldTransform` as the matrix value.

func (*RenderTexture) RenderCanvas

func (self *RenderTexture) RenderCanvas(displayObject *DisplayObject)

RenderCanvas This function will draw the display object to the texture.

func (*RenderTexture) RenderCanvas1O

func (self *RenderTexture) RenderCanvas1O(displayObject *DisplayObject, matrix *Matrix)

RenderCanvas1O This function will draw the display object to the texture.

func (*RenderTexture) RenderCanvas2O

func (self *RenderTexture) RenderCanvas2O(displayObject *DisplayObject, matrix *Matrix, clear bool)

RenderCanvas2O This function will draw the display object to the texture.

func (*RenderTexture) RenderCanvasI

func (self *RenderTexture) RenderCanvasI(args ...interface{})

RenderCanvasI This function will draw the display object to the texture.

func (*RenderTexture) RenderI

func (self *RenderTexture) RenderI(args ...interface{})

RenderI This function will draw the display object to the RenderTexture.

In versions of Phaser prior to 2.4.0 the second parameter was a Phaser.Point object. This is now a Matrix allowing you much more control over how the Display Object is rendered. If you need to replicate the earlier behavior please use Phaser.RenderTexture.renderXY instead.

If you wish for the displayObject to be rendered taking its current scale, rotation and translation into account then either pass `null`, leave it undefined or pass `displayObject.worldTransform` as the matrix value.

func (*RenderTexture) RenderRawXY

func (self *RenderTexture) RenderRawXY(displayObject interface{}, x int, y int)

RenderRawXY This function will draw the display object to the RenderTexture at the given coordinates.

When the display object is drawn it doesn't take into account scale, rotation or translation.

If you need those then use RenderTexture.renderXY instead.

func (*RenderTexture) RenderRawXY1O

func (self *RenderTexture) RenderRawXY1O(displayObject interface{}, x int, y int, clear bool)

RenderRawXY1O This function will draw the display object to the RenderTexture at the given coordinates.

When the display object is drawn it doesn't take into account scale, rotation or translation.

If you need those then use RenderTexture.renderXY instead.

func (*RenderTexture) RenderRawXYI

func (self *RenderTexture) RenderRawXYI(args ...interface{})

RenderRawXYI This function will draw the display object to the RenderTexture at the given coordinates.

When the display object is drawn it doesn't take into account scale, rotation or translation.

If you need those then use RenderTexture.renderXY instead.

func (*RenderTexture) RenderWebGL

func (self *RenderTexture) RenderWebGL(displayObject *DisplayObject)

RenderWebGL This function will draw the display object to the texture.

func (*RenderTexture) RenderWebGL1O

func (self *RenderTexture) RenderWebGL1O(displayObject *DisplayObject, matrix *Matrix)

RenderWebGL1O This function will draw the display object to the texture.

func (*RenderTexture) RenderWebGL2O

func (self *RenderTexture) RenderWebGL2O(displayObject *DisplayObject, matrix *Matrix, clear bool)

RenderWebGL2O This function will draw the display object to the texture.

func (*RenderTexture) RenderWebGLI

func (self *RenderTexture) RenderWebGLI(args ...interface{})

RenderWebGLI This function will draw the display object to the texture.

func (*RenderTexture) RenderXY

func (self *RenderTexture) RenderXY(displayObject interface{}, x int, y int)

RenderXY This function will draw the display object to the RenderTexture at the given coordinates.

When the display object is drawn it takes into account scale and rotation.

If you don't want those then use RenderTexture.renderRawXY instead.

func (*RenderTexture) RenderXY1O

func (self *RenderTexture) RenderXY1O(displayObject interface{}, x int, y int, clear bool)

RenderXY1O This function will draw the display object to the RenderTexture at the given coordinates.

When the display object is drawn it takes into account scale and rotation.

If you don't want those then use RenderTexture.renderRawXY instead.

func (*RenderTexture) RenderXYI

func (self *RenderTexture) RenderXYI(args ...interface{})

RenderXYI This function will draw the display object to the RenderTexture at the given coordinates.

When the display object is drawn it takes into account scale and rotation.

If you don't want those then use RenderTexture.renderRawXY instead.

func (*RenderTexture) Renderer

func (self *RenderTexture) Renderer() interface{}

Renderer The renderer this RenderTexture uses. A RenderTexture can only belong to one renderer at the moment if its webGL.

func (*RenderTexture) RequiresReTint

func (self *RenderTexture) RequiresReTint() bool

RequiresReTint This will let a renderer know that a tinted parent has updated its texture.

func (*RenderTexture) RequiresUpdate

func (self *RenderTexture) RequiresUpdate() bool

RequiresUpdate This will let a renderer know that a texture has been updated (used mainly for webGL uv updates)

func (*RenderTexture) Resize

func (self *RenderTexture) Resize(width int, height int, updateBase bool)

Resize Resizes the RenderTexture.

func (*RenderTexture) ResizeI

func (self *RenderTexture) ResizeI(args ...interface{})

ResizeI Resizes the RenderTexture.

func (*RenderTexture) Resolution

func (self *RenderTexture) Resolution() int

Resolution The Resolution of the texture.

func (*RenderTexture) SetBaseTextureA

func (self *RenderTexture) SetBaseTextureA(member *BaseTexture)

SetBaseTextureA The base texture object that this texture uses

func (*RenderTexture) SetCropA

func (self *RenderTexture) SetCropA(member *Rectangle)

SetCropA This is the area of the BaseTexture image to actually copy to the Canvas / WebGL when rendering,

irrespective of the actual frame size or placement (which can be influenced by trimmed texture atlases)

func (*RenderTexture) SetFrame

func (self *RenderTexture) SetFrame(frame *Rectangle)

SetFrame Specifies the region of the baseTexture that this texture will use.

func (*RenderTexture) SetFrameA

func (self *RenderTexture) SetFrameA(member *Rectangle)

SetFrameA The framing rectangle of the render texture

func (*RenderTexture) SetFrameI

func (self *RenderTexture) SetFrameI(args ...interface{})

SetFrameI Specifies the region of the baseTexture that this texture will use.

func (*RenderTexture) SetGameA

func (self *RenderTexture) SetGameA(member *Game)

SetGameA A reference to the currently running game.

func (*RenderTexture) SetHeightA

func (self *RenderTexture) SetHeightA(member int)

SetHeightA The height of the render texture

func (*RenderTexture) SetIsTilingA

func (self *RenderTexture) SetIsTilingA(member bool)

SetIsTilingA Is this a tiling texture? As used by the likes of a TilingSprite.

func (*RenderTexture) SetKeyA

func (self *RenderTexture) SetKeyA(member string)

SetKeyA The key of the RenderTexture in the Cache, if stored there.

func (*RenderTexture) SetNoFrameA

func (self *RenderTexture) SetNoFrameA(member bool)

SetNoFrameA Does this Texture have any frame data assigned to it?

func (*RenderTexture) SetRendererA

func (self *RenderTexture) SetRendererA(member interface{})

SetRendererA The renderer this RenderTexture uses. A RenderTexture can only belong to one renderer at the moment if its webGL.

func (*RenderTexture) SetRequiresReTintA

func (self *RenderTexture) SetRequiresReTintA(member bool)

SetRequiresReTintA This will let a renderer know that a tinted parent has updated its texture.

func (*RenderTexture) SetRequiresUpdateA

func (self *RenderTexture) SetRequiresUpdateA(member bool)

SetRequiresUpdateA This will let a renderer know that a texture has been updated (used mainly for webGL uv updates)

func (*RenderTexture) SetResolutionA

func (self *RenderTexture) SetResolutionA(member int)

SetResolutionA The Resolution of the texture.

func (*RenderTexture) SetTrimA

func (self *RenderTexture) SetTrimA(member *Rectangle)

SetTrimA The texture trim data.

func (*RenderTexture) SetTypeA

func (self *RenderTexture) SetTypeA(member int)

SetTypeA Base Phaser object type.

func (*RenderTexture) SetValidA

func (self *RenderTexture) SetValidA(member bool)

SetValidA empty description

func (*RenderTexture) SetWidthA

func (self *RenderTexture) SetWidthA(member int)

SetWidthA The with of the render texture

func (*RenderTexture) Trim

func (self *RenderTexture) Trim() *Rectangle

Trim The texture trim data.

func (*RenderTexture) Type

func (self *RenderTexture) Type() int

Type Base Phaser object type.

func (*RenderTexture) Valid

func (self *RenderTexture) Valid() bool

Valid empty description

func (*RenderTexture) Width

func (self *RenderTexture) Width() int

Width The with of the render texture

type RequestAnimationFrame

type RequestAnimationFrame struct {
	*js.Object
}

RequestAnimationFrame Abstracts away the use of RAF or setTimeOut for the core game update loop.

func NewRequestAnimationFrame

func NewRequestAnimationFrame(game *Game) *RequestAnimationFrame

NewRequestAnimationFrame Abstracts away the use of RAF or setTimeOut for the core game update loop.

func NewRequestAnimationFrame1O

func NewRequestAnimationFrame1O(game *Game, forceSetTimeOut bool) *RequestAnimationFrame

NewRequestAnimationFrame1O Abstracts away the use of RAF or setTimeOut for the core game update loop.

func NewRequestAnimationFrameI

func NewRequestAnimationFrameI(args ...interface{}) *RequestAnimationFrame

NewRequestAnimationFrameI Abstracts away the use of RAF or setTimeOut for the core game update loop.

func ToRequestAnimationFrame

func ToRequestAnimationFrame(jsStruct interface{}) *RequestAnimationFrame

RequestAnimationFrame Binding conversion method to RequestAnimationFrame point

func (*RequestAnimationFrame) ForceSetTimeOut

func (self *RequestAnimationFrame) ForceSetTimeOut() bool

ForceSetTimeOut Tell Phaser to use setTimeOut even if raf is available.

func (*RequestAnimationFrame) Game

func (self *RequestAnimationFrame) Game() *Game

Game The currently running game.

func (*RequestAnimationFrame) IsRAF

func (self *RequestAnimationFrame) IsRAF() bool

IsRAF Is the browser using requestAnimationFrame?

func (*RequestAnimationFrame) IsRAFI

func (self *RequestAnimationFrame) IsRAFI(args ...interface{}) bool

IsRAFI Is the browser using requestAnimationFrame?

func (*RequestAnimationFrame) IsRunning

func (self *RequestAnimationFrame) IsRunning() bool

IsRunning true if RequestAnimationFrame is running, otherwise false.

func (*RequestAnimationFrame) IsSetTimeOut

func (self *RequestAnimationFrame) IsSetTimeOut() bool

IsSetTimeOut Is the browser using setTimeout?

func (*RequestAnimationFrame) IsSetTimeOutI

func (self *RequestAnimationFrame) IsSetTimeOutI(args ...interface{}) bool

IsSetTimeOutI Is the browser using setTimeout?

func (*RequestAnimationFrame) SetForceSetTimeOutA

func (self *RequestAnimationFrame) SetForceSetTimeOutA(member bool)

SetForceSetTimeOutA Tell Phaser to use setTimeOut even if raf is available.

func (*RequestAnimationFrame) SetGameA

func (self *RequestAnimationFrame) SetGameA(member *Game)

SetGameA The currently running game.

func (*RequestAnimationFrame) SetIsRunningA

func (self *RequestAnimationFrame) SetIsRunningA(member bool)

SetIsRunningA true if RequestAnimationFrame is running, otherwise false.

func (*RequestAnimationFrame) Start

func (self *RequestAnimationFrame) Start()

Start Starts the requestAnimationFrame running or setTimeout if unavailable in browser

func (*RequestAnimationFrame) StartI

func (self *RequestAnimationFrame) StartI(args ...interface{})

StartI Starts the requestAnimationFrame running or setTimeout if unavailable in browser

func (*RequestAnimationFrame) Stop

func (self *RequestAnimationFrame) Stop()

Stop Stops the requestAnimationFrame from running.

func (*RequestAnimationFrame) StopI

func (self *RequestAnimationFrame) StopI(args ...interface{})

StopI Stops the requestAnimationFrame from running.

func (*RequestAnimationFrame) UpdateRAF

func (self *RequestAnimationFrame) UpdateRAF()

UpdateRAF The update method for the requestAnimationFrame

func (*RequestAnimationFrame) UpdateRAFI

func (self *RequestAnimationFrame) UpdateRAFI(args ...interface{})

UpdateRAFI The update method for the requestAnimationFrame

func (*RequestAnimationFrame) UpdateSetTimeout

func (self *RequestAnimationFrame) UpdateSetTimeout()

UpdateSetTimeout The update method for the setTimeout.

func (*RequestAnimationFrame) UpdateSetTimeoutI

func (self *RequestAnimationFrame) UpdateSetTimeoutI(args ...interface{})

UpdateSetTimeoutI The update method for the setTimeout.

type RetroFont

type RetroFont struct {
	*js.Object
}

RetroFont A Retro Font is similar to a BitmapFont, in that it uses a texture to render the text. However unlike a BitmapFont every character in a RetroFont is the same size. This makes it similar to a sprite sheet. You typically find font sheets like this from old 8/16-bit games and demos.

func NewRetroFont

func NewRetroFont(game *Game, key string, characterWidth int, characterHeight int, chars string) *RetroFont

NewRetroFont A Retro Font is similar to a BitmapFont, in that it uses a texture to render the text. However unlike a BitmapFont every character in a RetroFont is the same size. This makes it similar to a sprite sheet. You typically find font sheets like this from old 8/16-bit games and demos.

func NewRetroFont1O

func NewRetroFont1O(game *Game, key string, characterWidth int, characterHeight int, chars string, charsPerRow int) *RetroFont

NewRetroFont1O A Retro Font is similar to a BitmapFont, in that it uses a texture to render the text. However unlike a BitmapFont every character in a RetroFont is the same size. This makes it similar to a sprite sheet. You typically find font sheets like this from old 8/16-bit games and demos.

func NewRetroFont2O

func NewRetroFont2O(game *Game, key string, characterWidth int, characterHeight int, chars string, charsPerRow int, xSpacing int) *RetroFont

NewRetroFont2O A Retro Font is similar to a BitmapFont, in that it uses a texture to render the text. However unlike a BitmapFont every character in a RetroFont is the same size. This makes it similar to a sprite sheet. You typically find font sheets like this from old 8/16-bit games and demos.

func NewRetroFont3O

func NewRetroFont3O(game *Game, key string, characterWidth int, characterHeight int, chars string, charsPerRow int, xSpacing int, ySpacing int) *RetroFont

NewRetroFont3O A Retro Font is similar to a BitmapFont, in that it uses a texture to render the text. However unlike a BitmapFont every character in a RetroFont is the same size. This makes it similar to a sprite sheet. You typically find font sheets like this from old 8/16-bit games and demos.

func NewRetroFont4O

func NewRetroFont4O(game *Game, key string, characterWidth int, characterHeight int, chars string, charsPerRow int, xSpacing int, ySpacing int, xOffset int) *RetroFont

NewRetroFont4O A Retro Font is similar to a BitmapFont, in that it uses a texture to render the text. However unlike a BitmapFont every character in a RetroFont is the same size. This makes it similar to a sprite sheet. You typically find font sheets like this from old 8/16-bit games and demos.

func NewRetroFont5O

func NewRetroFont5O(game *Game, key string, characterWidth int, characterHeight int, chars string, charsPerRow int, xSpacing int, ySpacing int, xOffset int, yOffset int) *RetroFont

NewRetroFont5O A Retro Font is similar to a BitmapFont, in that it uses a texture to render the text. However unlike a BitmapFont every character in a RetroFont is the same size. This makes it similar to a sprite sheet. You typically find font sheets like this from old 8/16-bit games and demos.

func NewRetroFontI

func NewRetroFontI(args ...interface{}) *RetroFont

NewRetroFontI A Retro Font is similar to a BitmapFont, in that it uses a texture to render the text. However unlike a BitmapFont every character in a RetroFont is the same size. This makes it similar to a sprite sheet. You typically find font sheets like this from old 8/16-bit games and demos.

func ToRetroFont

func ToRetroFont(jsStruct interface{}) *RetroFont

RetroFont Binding conversion method to RetroFont point

func (*RetroFont) ALIGN_CENTER

func (self *RetroFont) ALIGN_CENTER() string

ALIGN_CENTER Align each line of multi-line text in the center.

func (*RetroFont) ALIGN_LEFT

func (self *RetroFont) ALIGN_LEFT() string

ALIGN_LEFT Align each line of multi-line text to the left.

func (*RetroFont) ALIGN_RIGHT

func (self *RetroFont) ALIGN_RIGHT() string

ALIGN_RIGHT Align each line of multi-line text to the right.

func (*RetroFont) Align

func (self *RetroFont) Align() string

Align Alignment of the text when multiLine = true or a fixedWidth is set. Set to RetroFont.ALIGN_LEFT (default), RetroFont.ALIGN_RIGHT or RetroFont.ALIGN_CENTER.

func (*RetroFont) AutoUpperCase

func (self *RetroFont) AutoUpperCase() bool

AutoUpperCase Automatically convert any text to upper case. Lots of old bitmap fonts only contain upper-case characters, so the default is true.

func (*RetroFont) BaseTexture

func (self *RetroFont) BaseTexture() *BaseTexture

BaseTexture The base texture object that this texture uses

func (*RetroFont) BuildRetroFontText

func (self *RetroFont) BuildRetroFontText()

BuildRetroFontText Updates the texture with the new text.

func (*RetroFont) BuildRetroFontTextI

func (self *RetroFont) BuildRetroFontTextI(args ...interface{})

BuildRetroFontTextI Updates the texture with the new text.

func (*RetroFont) CharacterHeight

func (self *RetroFont) CharacterHeight() int

CharacterHeight The height of each character in the font set.

func (*RetroFont) CharacterPerRow

func (self *RetroFont) CharacterPerRow() int

CharacterPerRow The number of characters per row in the font set.

func (*RetroFont) CharacterSpacingX

func (self *RetroFont) CharacterSpacingX() int

CharacterSpacingX If the characters in the font set have horizontal spacing between them set the required amount here.

func (*RetroFont) CharacterSpacingY

func (self *RetroFont) CharacterSpacingY() int

CharacterSpacingY If the characters in the font set have vertical spacing between them set the required amount here.

func (*RetroFont) CharacterWidth

func (self *RetroFont) CharacterWidth() int

CharacterWidth The width of each character in the font set.

func (*RetroFont) Clear

func (self *RetroFont) Clear()

Clear Clears the RenderTexture.

func (*RetroFont) ClearI

func (self *RetroFont) ClearI(args ...interface{})

ClearI Clears the RenderTexture.

func (*RetroFont) Crop

func (self *RetroFont) Crop() *Rectangle

Crop This is the area of the BaseTexture image to actually copy to the Canvas / WebGL when rendering,

irrespective of the actual frame size or placement (which can be influenced by trimmed texture atlases)

func (*RetroFont) CustomSpacingX

func (self *RetroFont) CustomSpacingX() int

CustomSpacingX Adds horizontal spacing between each character of the font, in pixels.

func (*RetroFont) CustomSpacingY

func (self *RetroFont) CustomSpacingY() int

CustomSpacingY Adds vertical spacing between each line of multi-line text, set in pixels.

func (*RetroFont) Destroy

func (self *RetroFont) Destroy(destroyBase bool)

Destroy Destroys this texture

func (*RetroFont) DestroyI

func (self *RetroFont) DestroyI(args ...interface{})

DestroyI Destroys this texture

func (*RetroFont) FixedWidth

func (self *RetroFont) FixedWidth() int

FixedWidth If you need this RetroFont image to have a fixed width you can set the width in this value. If text is wider than the width specified it will be cropped off.

func (*RetroFont) FontSet

func (self *RetroFont) FontSet() *Image

FontSet A reference to the image stored in the Game.Cache that contains the font.

func (*RetroFont) Frame

func (self *RetroFont) Frame() *Rectangle

Frame The framing rectangle of the render texture

func (*RetroFont) FrameData

func (self *RetroFont) FrameData() *FrameData

FrameData The FrameData representing this Retro Font.

func (*RetroFont) Game

func (self *RetroFont) Game() *Game

Game A reference to the currently running game.

func (*RetroFont) GetBase64

func (self *RetroFont) GetBase64() string

GetBase64 Will return a base64 encoded string of this texture. It works by calling RenderTexture.getCanvas and then running toDataURL on that.

func (*RetroFont) GetBase64I

func (self *RetroFont) GetBase64I(args ...interface{}) string

GetBase64I Will return a base64 encoded string of this texture. It works by calling RenderTexture.getCanvas and then running toDataURL on that.

func (*RetroFont) GetCanvas

func (self *RetroFont) GetCanvas() dom.HTMLCanvasElement

GetCanvas Creates a Canvas element, renders this RenderTexture to it and then returns it.

func (*RetroFont) GetCanvasI

func (self *RetroFont) GetCanvasI(args ...interface{}) dom.HTMLCanvasElement

GetCanvasI Creates a Canvas element, renders this RenderTexture to it and then returns it.

func (*RetroFont) GetImage

func (self *RetroFont) GetImage() *Image

GetImage Will return a HTML Image of the texture

func (*RetroFont) GetImageI

func (self *RetroFont) GetImageI(args ...interface{}) *Image

GetImageI Will return a HTML Image of the texture

func (*RetroFont) GetLongestLine

func (self *RetroFont) GetLongestLine() int

GetLongestLine Works out the longest line of text in _text and returns its length

func (*RetroFont) GetLongestLineI

func (self *RetroFont) GetLongestLineI(args ...interface{}) int

GetLongestLineI Works out the longest line of text in _text and returns its length

func (*RetroFont) Height

func (self *RetroFont) Height() int

Height The height of the render texture

func (*RetroFont) IsTiling

func (self *RetroFont) IsTiling() bool

IsTiling Is this a tiling texture? As used by the likes of a TilingSprite.

func (*RetroFont) Key

func (self *RetroFont) Key() string

Key The key of the RenderTexture in the Cache, if stored there.

func (*RetroFont) MultiLine

func (self *RetroFont) MultiLine() bool

MultiLine If set to true all carriage-returns in text will form new lines (see align). If false the font will only contain one single line of text (the default)

func (*RetroFont) NoFrame

func (self *RetroFont) NoFrame() bool

NoFrame Does this Texture have any frame data assigned to it?

func (*RetroFont) OffsetX

func (self *RetroFont) OffsetX() int

OffsetX If the font set doesn't start at the top left of the given image, specify the X coordinate offset here.

func (*RetroFont) OffsetY

func (self *RetroFont) OffsetY() int

OffsetY If the font set doesn't start at the top left of the given image, specify the Y coordinate offset here.

func (*RetroFont) OnBaseTextureLoaded

func (self *RetroFont) OnBaseTextureLoaded()

OnBaseTextureLoaded Called when the base texture is loaded

func (*RetroFont) OnBaseTextureLoadedI

func (self *RetroFont) OnBaseTextureLoadedI(args ...interface{})

OnBaseTextureLoadedI Called when the base texture is loaded

func (*RetroFont) PasteLine

func (self *RetroFont) PasteLine(line string, x int, y int, customSpacingX int)

PasteLine Internal function that takes a single line of text (2nd parameter) and pastes it into the BitmapData at the given coordinates. Used by getLine and getMultiLine

func (*RetroFont) PasteLineI

func (self *RetroFont) PasteLineI(args ...interface{})

PasteLineI Internal function that takes a single line of text (2nd parameter) and pastes it into the BitmapData at the given coordinates. Used by getLine and getMultiLine

func (*RetroFont) RemoveUnsupportedCharacters

func (self *RetroFont) RemoveUnsupportedCharacters() string

RemoveUnsupportedCharacters Internal helper function that removes all unsupported characters from the _text String, leaving only characters contained in the font set.

func (*RetroFont) RemoveUnsupportedCharacters1O

func (self *RetroFont) RemoveUnsupportedCharacters1O(stripCR bool) string

RemoveUnsupportedCharacters1O Internal helper function that removes all unsupported characters from the _text String, leaving only characters contained in the font set.

func (*RetroFont) RemoveUnsupportedCharactersI

func (self *RetroFont) RemoveUnsupportedCharactersI(args ...interface{}) string

RemoveUnsupportedCharactersI Internal helper function that removes all unsupported characters from the _text String, leaving only characters contained in the font set.

func (*RetroFont) Render

func (self *RetroFont) Render(displayObject interface{})

Render This function will draw the display object to the RenderTexture.

In versions of Phaser prior to 2.4.0 the second parameter was a Phaser.Point object. This is now a Matrix allowing you much more control over how the Display Object is rendered. If you need to replicate the earlier behavior please use Phaser.RenderTexture.renderXY instead.

If you wish for the displayObject to be rendered taking its current scale, rotation and translation into account then either pass `null`, leave it undefined or pass `displayObject.worldTransform` as the matrix value.

func (*RetroFont) Render1O

func (self *RetroFont) Render1O(displayObject interface{}, matrix *Matrix)

Render1O This function will draw the display object to the RenderTexture.

In versions of Phaser prior to 2.4.0 the second parameter was a Phaser.Point object. This is now a Matrix allowing you much more control over how the Display Object is rendered. If you need to replicate the earlier behavior please use Phaser.RenderTexture.renderXY instead.

If you wish for the displayObject to be rendered taking its current scale, rotation and translation into account then either pass `null`, leave it undefined or pass `displayObject.worldTransform` as the matrix value.

func (*RetroFont) Render2O

func (self *RetroFont) Render2O(displayObject interface{}, matrix *Matrix, clear bool)

Render2O This function will draw the display object to the RenderTexture.

In versions of Phaser prior to 2.4.0 the second parameter was a Phaser.Point object. This is now a Matrix allowing you much more control over how the Display Object is rendered. If you need to replicate the earlier behavior please use Phaser.RenderTexture.renderXY instead.

If you wish for the displayObject to be rendered taking its current scale, rotation and translation into account then either pass `null`, leave it undefined or pass `displayObject.worldTransform` as the matrix value.

func (*RetroFont) RenderCanvas

func (self *RetroFont) RenderCanvas(displayObject *DisplayObject)

RenderCanvas This function will draw the display object to the texture.

func (*RetroFont) RenderCanvas1O

func (self *RetroFont) RenderCanvas1O(displayObject *DisplayObject, matrix *Matrix)

RenderCanvas1O This function will draw the display object to the texture.

func (*RetroFont) RenderCanvas2O

func (self *RetroFont) RenderCanvas2O(displayObject *DisplayObject, matrix *Matrix, clear bool)

RenderCanvas2O This function will draw the display object to the texture.

func (*RetroFont) RenderCanvasI

func (self *RetroFont) RenderCanvasI(args ...interface{})

RenderCanvasI This function will draw the display object to the texture.

func (*RetroFont) RenderI

func (self *RetroFont) RenderI(args ...interface{})

RenderI This function will draw the display object to the RenderTexture.

In versions of Phaser prior to 2.4.0 the second parameter was a Phaser.Point object. This is now a Matrix allowing you much more control over how the Display Object is rendered. If you need to replicate the earlier behavior please use Phaser.RenderTexture.renderXY instead.

If you wish for the displayObject to be rendered taking its current scale, rotation and translation into account then either pass `null`, leave it undefined or pass `displayObject.worldTransform` as the matrix value.

func (*RetroFont) RenderRawXY

func (self *RetroFont) RenderRawXY(displayObject interface{}, x int, y int)

RenderRawXY This function will draw the display object to the RenderTexture at the given coordinates.

When the display object is drawn it doesn't take into account scale, rotation or translation.

If you need those then use RenderTexture.renderXY instead.

func (*RetroFont) RenderRawXY1O

func (self *RetroFont) RenderRawXY1O(displayObject interface{}, x int, y int, clear bool)

RenderRawXY1O This function will draw the display object to the RenderTexture at the given coordinates.

When the display object is drawn it doesn't take into account scale, rotation or translation.

If you need those then use RenderTexture.renderXY instead.

func (*RetroFont) RenderRawXYI

func (self *RetroFont) RenderRawXYI(args ...interface{})

RenderRawXYI This function will draw the display object to the RenderTexture at the given coordinates.

When the display object is drawn it doesn't take into account scale, rotation or translation.

If you need those then use RenderTexture.renderXY instead.

func (*RetroFont) RenderWebGL

func (self *RetroFont) RenderWebGL(displayObject *DisplayObject)

RenderWebGL This function will draw the display object to the texture.

func (*RetroFont) RenderWebGL1O

func (self *RetroFont) RenderWebGL1O(displayObject *DisplayObject, matrix *Matrix)

RenderWebGL1O This function will draw the display object to the texture.

func (*RetroFont) RenderWebGL2O

func (self *RetroFont) RenderWebGL2O(displayObject *DisplayObject, matrix *Matrix, clear bool)

RenderWebGL2O This function will draw the display object to the texture.

func (*RetroFont) RenderWebGLI

func (self *RetroFont) RenderWebGLI(args ...interface{})

RenderWebGLI This function will draw the display object to the texture.

func (*RetroFont) RenderXY

func (self *RetroFont) RenderXY(displayObject interface{}, x int, y int)

RenderXY This function will draw the display object to the RenderTexture at the given coordinates.

When the display object is drawn it takes into account scale and rotation.

If you don't want those then use RenderTexture.renderRawXY instead.

func (*RetroFont) RenderXY1O

func (self *RetroFont) RenderXY1O(displayObject interface{}, x int, y int, clear bool)

RenderXY1O This function will draw the display object to the RenderTexture at the given coordinates.

When the display object is drawn it takes into account scale and rotation.

If you don't want those then use RenderTexture.renderRawXY instead.

func (*RetroFont) RenderXYI

func (self *RetroFont) RenderXYI(args ...interface{})

RenderXYI This function will draw the display object to the RenderTexture at the given coordinates.

When the display object is drawn it takes into account scale and rotation.

If you don't want those then use RenderTexture.renderRawXY instead.

func (*RetroFont) Renderer

func (self *RetroFont) Renderer() interface{}

Renderer The renderer this RenderTexture uses. A RenderTexture can only belong to one renderer at the moment if its webGL.

func (*RetroFont) RequiresReTint

func (self *RetroFont) RequiresReTint() bool

RequiresReTint This will let a renderer know that a tinted parent has updated its texture.

func (*RetroFont) RequiresUpdate

func (self *RetroFont) RequiresUpdate() bool

RequiresUpdate This will let a renderer know that a texture has been updated (used mainly for webGL uv updates)

func (*RetroFont) Resize

func (self *RetroFont) Resize(width int, height int, updateBase bool)

Resize Resizes the RenderTexture.

func (*RetroFont) ResizeI

func (self *RetroFont) ResizeI(args ...interface{})

ResizeI Resizes the RenderTexture.

func (*RetroFont) Resolution

func (self *RetroFont) Resolution() int

Resolution The Resolution of the texture.

func (*RetroFont) SetALIGN_CENTERA

func (self *RetroFont) SetALIGN_CENTERA(member string)

SetALIGN_CENTERA Align each line of multi-line text in the center.

func (*RetroFont) SetALIGN_LEFTA

func (self *RetroFont) SetALIGN_LEFTA(member string)

SetALIGN_LEFTA Align each line of multi-line text to the left.

func (*RetroFont) SetALIGN_RIGHTA

func (self *RetroFont) SetALIGN_RIGHTA(member string)

SetALIGN_RIGHTA Align each line of multi-line text to the right.

func (*RetroFont) SetAlignA

func (self *RetroFont) SetAlignA(member string)

SetAlignA Alignment of the text when multiLine = true or a fixedWidth is set. Set to RetroFont.ALIGN_LEFT (default), RetroFont.ALIGN_RIGHT or RetroFont.ALIGN_CENTER.

func (*RetroFont) SetAutoUpperCaseA

func (self *RetroFont) SetAutoUpperCaseA(member bool)

SetAutoUpperCaseA Automatically convert any text to upper case. Lots of old bitmap fonts only contain upper-case characters, so the default is true.

func (*RetroFont) SetBaseTextureA

func (self *RetroFont) SetBaseTextureA(member *BaseTexture)

SetBaseTextureA The base texture object that this texture uses

func (*RetroFont) SetCharacterHeightA

func (self *RetroFont) SetCharacterHeightA(member int)

SetCharacterHeightA The height of each character in the font set.

func (*RetroFont) SetCharacterPerRowA

func (self *RetroFont) SetCharacterPerRowA(member int)

SetCharacterPerRowA The number of characters per row in the font set.

func (*RetroFont) SetCharacterSpacingXA

func (self *RetroFont) SetCharacterSpacingXA(member int)

SetCharacterSpacingXA If the characters in the font set have horizontal spacing between them set the required amount here.

func (*RetroFont) SetCharacterSpacingYA

func (self *RetroFont) SetCharacterSpacingYA(member int)

SetCharacterSpacingYA If the characters in the font set have vertical spacing between them set the required amount here.

func (*RetroFont) SetCharacterWidthA

func (self *RetroFont) SetCharacterWidthA(member int)

SetCharacterWidthA The width of each character in the font set.

func (*RetroFont) SetCropA

func (self *RetroFont) SetCropA(member *Rectangle)

SetCropA This is the area of the BaseTexture image to actually copy to the Canvas / WebGL when rendering,

irrespective of the actual frame size or placement (which can be influenced by trimmed texture atlases)

func (*RetroFont) SetCustomSpacingXA

func (self *RetroFont) SetCustomSpacingXA(member int)

SetCustomSpacingXA Adds horizontal spacing between each character of the font, in pixels.

func (*RetroFont) SetCustomSpacingYA

func (self *RetroFont) SetCustomSpacingYA(member int)

SetCustomSpacingYA Adds vertical spacing between each line of multi-line text, set in pixels.

func (*RetroFont) SetFixedWidth

func (self *RetroFont) SetFixedWidth(width int)

SetFixedWidth If you need this RetroFont to have a fixed width and custom alignment you can set the width here. If text is wider than the width specified it will be cropped off.

func (*RetroFont) SetFixedWidth1O

func (self *RetroFont) SetFixedWidth1O(width int, lineAlignment string)

SetFixedWidth1O If you need this RetroFont to have a fixed width and custom alignment you can set the width here. If text is wider than the width specified it will be cropped off.

func (*RetroFont) SetFixedWidthA

func (self *RetroFont) SetFixedWidthA(member int)

SetFixedWidthA If you need this RetroFont image to have a fixed width you can set the width in this value. If text is wider than the width specified it will be cropped off.

func (*RetroFont) SetFixedWidthI

func (self *RetroFont) SetFixedWidthI(args ...interface{})

SetFixedWidthI If you need this RetroFont to have a fixed width and custom alignment you can set the width here. If text is wider than the width specified it will be cropped off.

func (*RetroFont) SetFontSetA

func (self *RetroFont) SetFontSetA(member *Image)

SetFontSetA A reference to the image stored in the Game.Cache that contains the font.

func (*RetroFont) SetFrame

func (self *RetroFont) SetFrame(frame *Rectangle)

SetFrame Specifies the region of the baseTexture that this texture will use.

func (*RetroFont) SetFrameA

func (self *RetroFont) SetFrameA(member *Rectangle)

SetFrameA The framing rectangle of the render texture

func (*RetroFont) SetFrameDataA

func (self *RetroFont) SetFrameDataA(member *FrameData)

SetFrameDataA The FrameData representing this Retro Font.

func (*RetroFont) SetFrameI

func (self *RetroFont) SetFrameI(args ...interface{})

SetFrameI Specifies the region of the baseTexture that this texture will use.

func (*RetroFont) SetGameA

func (self *RetroFont) SetGameA(member *Game)

SetGameA A reference to the currently running game.

func (*RetroFont) SetHeightA

func (self *RetroFont) SetHeightA(member int)

SetHeightA The height of the render texture

func (*RetroFont) SetIsTilingA

func (self *RetroFont) SetIsTilingA(member bool)

SetIsTilingA Is this a tiling texture? As used by the likes of a TilingSprite.

func (*RetroFont) SetKeyA

func (self *RetroFont) SetKeyA(member string)

SetKeyA The key of the RenderTexture in the Cache, if stored there.

func (*RetroFont) SetMultiLineA

func (self *RetroFont) SetMultiLineA(member bool)

SetMultiLineA If set to true all carriage-returns in text will form new lines (see align). If false the font will only contain one single line of text (the default)

func (*RetroFont) SetNoFrameA

func (self *RetroFont) SetNoFrameA(member bool)

SetNoFrameA Does this Texture have any frame data assigned to it?

func (*RetroFont) SetOffsetXA

func (self *RetroFont) SetOffsetXA(member int)

SetOffsetXA If the font set doesn't start at the top left of the given image, specify the X coordinate offset here.

func (*RetroFont) SetOffsetYA

func (self *RetroFont) SetOffsetYA(member int)

SetOffsetYA If the font set doesn't start at the top left of the given image, specify the Y coordinate offset here.

func (*RetroFont) SetRendererA

func (self *RetroFont) SetRendererA(member interface{})

SetRendererA The renderer this RenderTexture uses. A RenderTexture can only belong to one renderer at the moment if its webGL.

func (*RetroFont) SetRequiresReTintA

func (self *RetroFont) SetRequiresReTintA(member bool)

SetRequiresReTintA This will let a renderer know that a tinted parent has updated its texture.

func (*RetroFont) SetRequiresUpdateA

func (self *RetroFont) SetRequiresUpdateA(member bool)

SetRequiresUpdateA This will let a renderer know that a texture has been updated (used mainly for webGL uv updates)

func (*RetroFont) SetResolutionA

func (self *RetroFont) SetResolutionA(member int)

SetResolutionA The Resolution of the texture.

func (*RetroFont) SetSmoothedA

func (self *RetroFont) SetSmoothedA(member bool)

SetSmoothedA Sets if the stamp is smoothed or not.

func (*RetroFont) SetStampA

func (self *RetroFont) SetStampA(member *Image)

SetStampA The image that is stamped to the RenderTexture for each character in the font.

func (*RetroFont) SetTEXT_SET10A

func (self *RetroFont) SetTEXT_SET10A(member string)

SetTEXT_SET10A Text Set 10 = ABCDEFGHIJKLMNOPQRSTUVWXYZ

func (*RetroFont) SetTEXT_SET11A

func (self *RetroFont) SetTEXT_SET11A(member string)

SetTEXT_SET11A Text Set 11 = ABCDEFGHIJKLMNOPQRSTUVWXYZ.,"-+!?()':;0123456789

func (*RetroFont) SetTEXT_SET1A

func (self *RetroFont) SetTEXT_SET1A(member string)

SetTEXT_SET1A Text Set 1 = !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~

func (*RetroFont) SetTEXT_SET2A

func (self *RetroFont) SetTEXT_SET2A(member string)

SetTEXT_SET2A Text Set 2 = !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ

func (*RetroFont) SetTEXT_SET3A

func (self *RetroFont) SetTEXT_SET3A(member string)

SetTEXT_SET3A Text Set 3 = ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789

func (*RetroFont) SetTEXT_SET4A

func (self *RetroFont) SetTEXT_SET4A(member string)

SetTEXT_SET4A Text Set 4 = ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789

func (*RetroFont) SetTEXT_SET5A

func (self *RetroFont) SetTEXT_SET5A(member string)

SetTEXT_SET5A Text Set 5 = ABCDEFGHIJKLMNOPQRSTUVWXYZ.,/() '!?-*:0123456789

func (*RetroFont) SetTEXT_SET6A

func (self *RetroFont) SetTEXT_SET6A(member string)

SetTEXT_SET6A Text Set 6 = ABCDEFGHIJKLMNOPQRSTUVWXYZ!?:;0123456789"(),-.'

func (*RetroFont) SetTEXT_SET7A

func (self *RetroFont) SetTEXT_SET7A(member string)

SetTEXT_SET7A Text Set 7 = AGMSY+:4BHNTZ!;5CIOU.?06DJPV,(17EKQW")28FLRX-'39

func (*RetroFont) SetTEXT_SET8A

func (self *RetroFont) SetTEXT_SET8A(member string)

SetTEXT_SET8A Text Set 8 = 0123456789 .ABCDEFGHIJKLMNOPQRSTUVWXYZ

func (*RetroFont) SetTEXT_SET9A

func (self *RetroFont) SetTEXT_SET9A(member string)

SetTEXT_SET9A Text Set 9 = ABCDEFGHIJKLMNOPQRSTUVWXYZ()-0123456789.:,'"?!

func (*RetroFont) SetText

func (self *RetroFont) SetText(content string)

SetText A helper function that quickly sets lots of variables at once, and then updates the text.

func (*RetroFont) SetText1O

func (self *RetroFont) SetText1O(content string, multiLine bool)

SetText1O A helper function that quickly sets lots of variables at once, and then updates the text.

func (*RetroFont) SetText2O

func (self *RetroFont) SetText2O(content string, multiLine bool, characterSpacing int)

SetText2O A helper function that quickly sets lots of variables at once, and then updates the text.

func (*RetroFont) SetText3O

func (self *RetroFont) SetText3O(content string, multiLine bool, characterSpacing int, lineSpacing int)

SetText3O A helper function that quickly sets lots of variables at once, and then updates the text.

func (*RetroFont) SetText4O

func (self *RetroFont) SetText4O(content string, multiLine bool, characterSpacing int, lineSpacing int, lineAlignment string)

SetText4O A helper function that quickly sets lots of variables at once, and then updates the text.

func (*RetroFont) SetText5O

func (self *RetroFont) SetText5O(content string, multiLine bool, characterSpacing int, lineSpacing int, lineAlignment string, allowLowerCase bool)

SetText5O A helper function that quickly sets lots of variables at once, and then updates the text.

func (*RetroFont) SetTextA

func (self *RetroFont) SetTextA(member string)

SetTextA Set this value to update the text in this sprite. Carriage returns are automatically stripped out if multiLine is false. Text is converted to upper case if autoUpperCase is true.

func (*RetroFont) SetTextI

func (self *RetroFont) SetTextI(args ...interface{})

SetTextI A helper function that quickly sets lots of variables at once, and then updates the text.

func (*RetroFont) SetTrimA

func (self *RetroFont) SetTrimA(member *Rectangle)

SetTrimA The texture trim data.

func (*RetroFont) SetTypeA

func (self *RetroFont) SetTypeA(member int)

SetTypeA Base Phaser object type.

func (*RetroFont) SetValidA

func (self *RetroFont) SetValidA(member bool)

SetValidA empty description

func (*RetroFont) SetWidthA

func (self *RetroFont) SetWidthA(member int)

SetWidthA The with of the render texture

func (*RetroFont) Smoothed

func (self *RetroFont) Smoothed() bool

Smoothed Sets if the stamp is smoothed or not.

func (*RetroFont) Stamp

func (self *RetroFont) Stamp() *Image

Stamp The image that is stamped to the RenderTexture for each character in the font.

func (*RetroFont) TEXT_SET1

func (self *RetroFont) TEXT_SET1() string

TEXT_SET1 Text Set 1 = !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~

func (*RetroFont) TEXT_SET10

func (self *RetroFont) TEXT_SET10() string

TEXT_SET10 Text Set 10 = ABCDEFGHIJKLMNOPQRSTUVWXYZ

func (*RetroFont) TEXT_SET11

func (self *RetroFont) TEXT_SET11() string

TEXT_SET11 Text Set 11 = ABCDEFGHIJKLMNOPQRSTUVWXYZ.,"-+!?()':;0123456789

func (*RetroFont) TEXT_SET2

func (self *RetroFont) TEXT_SET2() string

TEXT_SET2 Text Set 2 = !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ

func (*RetroFont) TEXT_SET3

func (self *RetroFont) TEXT_SET3() string

TEXT_SET3 Text Set 3 = ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789

func (*RetroFont) TEXT_SET4

func (self *RetroFont) TEXT_SET4() string

TEXT_SET4 Text Set 4 = ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789

func (*RetroFont) TEXT_SET5

func (self *RetroFont) TEXT_SET5() string

TEXT_SET5 Text Set 5 = ABCDEFGHIJKLMNOPQRSTUVWXYZ.,/() '!?-*:0123456789

func (*RetroFont) TEXT_SET6

func (self *RetroFont) TEXT_SET6() string

TEXT_SET6 Text Set 6 = ABCDEFGHIJKLMNOPQRSTUVWXYZ!?:;0123456789"(),-.'

func (*RetroFont) TEXT_SET7

func (self *RetroFont) TEXT_SET7() string

TEXT_SET7 Text Set 7 = AGMSY+:4BHNTZ!;5CIOU.?06DJPV,(17EKQW")28FLRX-'39

func (*RetroFont) TEXT_SET8

func (self *RetroFont) TEXT_SET8() string

TEXT_SET8 Text Set 8 = 0123456789 .ABCDEFGHIJKLMNOPQRSTUVWXYZ

func (*RetroFont) TEXT_SET9

func (self *RetroFont) TEXT_SET9() string

TEXT_SET9 Text Set 9 = ABCDEFGHIJKLMNOPQRSTUVWXYZ()-0123456789.:,'"?!

func (*RetroFont) Text

func (self *RetroFont) Text() string

Text Set this value to update the text in this sprite. Carriage returns are automatically stripped out if multiLine is false. Text is converted to upper case if autoUpperCase is true.

func (*RetroFont) Trim

func (self *RetroFont) Trim() *Rectangle

Trim The texture trim data.

func (*RetroFont) Type

func (self *RetroFont) Type() int

Type Base Phaser object type.

func (*RetroFont) UpdateOffset

func (self *RetroFont) UpdateOffset()

UpdateOffset Updates the x and/or y offset that the font is rendered from. This updates all of the texture frames, so be careful how often it is called. Note that the values given for the x and y properties are either ADDED to or SUBTRACTED from (if negative) the existing offsetX/Y values of the characters. So if the current offsetY is 8 and you want it to start rendering from y16 you would call updateOffset(0, 8) to add 8 to the current y offset.

func (*RetroFont) UpdateOffset1O

func (self *RetroFont) UpdateOffset1O(xOffset int)

UpdateOffset1O Updates the x and/or y offset that the font is rendered from. This updates all of the texture frames, so be careful how often it is called. Note that the values given for the x and y properties are either ADDED to or SUBTRACTED from (if negative) the existing offsetX/Y values of the characters. So if the current offsetY is 8 and you want it to start rendering from y16 you would call updateOffset(0, 8) to add 8 to the current y offset.

func (*RetroFont) UpdateOffset2O

func (self *RetroFont) UpdateOffset2O(xOffset int, yOffset int)

UpdateOffset2O Updates the x and/or y offset that the font is rendered from. This updates all of the texture frames, so be careful how often it is called. Note that the values given for the x and y properties are either ADDED to or SUBTRACTED from (if negative) the existing offsetX/Y values of the characters. So if the current offsetY is 8 and you want it to start rendering from y16 you would call updateOffset(0, 8) to add 8 to the current y offset.

func (*RetroFont) UpdateOffsetI

func (self *RetroFont) UpdateOffsetI(args ...interface{})

UpdateOffsetI Updates the x and/or y offset that the font is rendered from. This updates all of the texture frames, so be careful how often it is called. Note that the values given for the x and y properties are either ADDED to or SUBTRACTED from (if negative) the existing offsetX/Y values of the characters. So if the current offsetY is 8 and you want it to start rendering from y16 you would call updateOffset(0, 8) to add 8 to the current y offset.

func (*RetroFont) Valid

func (self *RetroFont) Valid() bool

Valid empty description

func (*RetroFont) Width

func (self *RetroFont) Width() int

Width The with of the render texture

type Rope

type Rope struct {
	*js.Object
}

Rope A Rope is a Sprite that has a repeating texture.

The texture will automatically wrap on the edges as it moves.

Please note that Ropes cannot have an input handler.

func NewRope

func NewRope(game *Game, x int, y int, key interface{}, frame interface{}, points []interface{}) *Rope

NewRope A Rope is a Sprite that has a repeating texture.

The texture will automatically wrap on the edges as it moves.

Please note that Ropes cannot have an input handler.

func NewRopeI

func NewRopeI(args ...interface{}) *Rope

NewRopeI A Rope is a Sprite that has a repeating texture.

The texture will automatically wrap on the edges as it moves.

Please note that Ropes cannot have an input handler.

func ToRope

func ToRope(jsStruct interface{}) *Rope

Rope Binding conversion method to Rope point

func (*Rope) AddChild

func (self *Rope) AddChild(child *DisplayObject) *DisplayObject

AddChild Adds a child to the container.

func (*Rope) AddChildAt

func (self *Rope) AddChildAt(child *DisplayObject, index int) *DisplayObject

AddChildAt Adds a child to the container at a specified index. If the index is out of bounds an error will be thrown

func (*Rope) AddChildAtI

func (self *Rope) AddChildAtI(args ...interface{}) *DisplayObject

AddChildAtI Adds a child to the container at a specified index. If the index is out of bounds an error will be thrown

func (*Rope) AddChildI

func (self *Rope) AddChildI(args ...interface{}) *DisplayObject

AddChildI Adds a child to the container.

func (*Rope) AlignIn

func (self *Rope) AlignIn(container interface{}) interface{}

AlignIn Aligns this Game Object within another Game Object, or Rectangle, known as the 'container', to one of 9 possible positions.

The container must be a Game Object, or Phaser.Rectangle object. This can include properties such as `World.bounds` or `Camera.view`, for aligning Game Objects within the world and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText, TileSprites or Buttons.

Please note that aligning a Sprite to another Game Object does **not** make it a child of the container. It simply modifies its position coordinates so it aligns with it.

The position constants you can use are:

`Phaser.TOP_LEFT`, `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

The Game Objects are placed in such a way that their _bounds_ align with the container, taking into consideration rotation, scale and the anchor property. This allows you to neatly align Game Objects, irrespective of their position value.

The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final aligned position of the Game Object. For example:

`sprite.alignIn(background, Phaser.BOTTOM_RIGHT, -20, -20)`

Would align the `sprite` to the bottom-right, but moved 20 pixels in from the corner. Think of the offsets as applying an adjustment to the containers bounds before the alignment takes place. So providing a negative offset will 'shrink' the container bounds by that amount, and providing a positive one expands it.

func (*Rope) AlignIn1O

func (self *Rope) AlignIn1O(container interface{}, position int) interface{}

AlignIn1O Aligns this Game Object within another Game Object, or Rectangle, known as the 'container', to one of 9 possible positions.

The container must be a Game Object, or Phaser.Rectangle object. This can include properties such as `World.bounds` or `Camera.view`, for aligning Game Objects within the world and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText, TileSprites or Buttons.

Please note that aligning a Sprite to another Game Object does **not** make it a child of the container. It simply modifies its position coordinates so it aligns with it.

The position constants you can use are:

`Phaser.TOP_LEFT`, `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

The Game Objects are placed in such a way that their _bounds_ align with the container, taking into consideration rotation, scale and the anchor property. This allows you to neatly align Game Objects, irrespective of their position value.

The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final aligned position of the Game Object. For example:

`sprite.alignIn(background, Phaser.BOTTOM_RIGHT, -20, -20)`

Would align the `sprite` to the bottom-right, but moved 20 pixels in from the corner. Think of the offsets as applying an adjustment to the containers bounds before the alignment takes place. So providing a negative offset will 'shrink' the container bounds by that amount, and providing a positive one expands it.

func (*Rope) AlignIn2O

func (self *Rope) AlignIn2O(container interface{}, position int, offsetX int) interface{}

AlignIn2O Aligns this Game Object within another Game Object, or Rectangle, known as the 'container', to one of 9 possible positions.

The container must be a Game Object, or Phaser.Rectangle object. This can include properties such as `World.bounds` or `Camera.view`, for aligning Game Objects within the world and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText, TileSprites or Buttons.

Please note that aligning a Sprite to another Game Object does **not** make it a child of the container. It simply modifies its position coordinates so it aligns with it.

The position constants you can use are:

`Phaser.TOP_LEFT`, `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

The Game Objects are placed in such a way that their _bounds_ align with the container, taking into consideration rotation, scale and the anchor property. This allows you to neatly align Game Objects, irrespective of their position value.

The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final aligned position of the Game Object. For example:

`sprite.alignIn(background, Phaser.BOTTOM_RIGHT, -20, -20)`

Would align the `sprite` to the bottom-right, but moved 20 pixels in from the corner. Think of the offsets as applying an adjustment to the containers bounds before the alignment takes place. So providing a negative offset will 'shrink' the container bounds by that amount, and providing a positive one expands it.

func (*Rope) AlignIn3O

func (self *Rope) AlignIn3O(container interface{}, position int, offsetX int, offsetY int) interface{}

AlignIn3O Aligns this Game Object within another Game Object, or Rectangle, known as the 'container', to one of 9 possible positions.

The container must be a Game Object, or Phaser.Rectangle object. This can include properties such as `World.bounds` or `Camera.view`, for aligning Game Objects within the world and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText, TileSprites or Buttons.

Please note that aligning a Sprite to another Game Object does **not** make it a child of the container. It simply modifies its position coordinates so it aligns with it.

The position constants you can use are:

`Phaser.TOP_LEFT`, `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

The Game Objects are placed in such a way that their _bounds_ align with the container, taking into consideration rotation, scale and the anchor property. This allows you to neatly align Game Objects, irrespective of their position value.

The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final aligned position of the Game Object. For example:

`sprite.alignIn(background, Phaser.BOTTOM_RIGHT, -20, -20)`

Would align the `sprite` to the bottom-right, but moved 20 pixels in from the corner. Think of the offsets as applying an adjustment to the containers bounds before the alignment takes place. So providing a negative offset will 'shrink' the container bounds by that amount, and providing a positive one expands it.

func (*Rope) AlignInI

func (self *Rope) AlignInI(args ...interface{}) interface{}

AlignInI Aligns this Game Object within another Game Object, or Rectangle, known as the 'container', to one of 9 possible positions.

The container must be a Game Object, or Phaser.Rectangle object. This can include properties such as `World.bounds` or `Camera.view`, for aligning Game Objects within the world and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText, TileSprites or Buttons.

Please note that aligning a Sprite to another Game Object does **not** make it a child of the container. It simply modifies its position coordinates so it aligns with it.

The position constants you can use are:

`Phaser.TOP_LEFT`, `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

The Game Objects are placed in such a way that their _bounds_ align with the container, taking into consideration rotation, scale and the anchor property. This allows you to neatly align Game Objects, irrespective of their position value.

The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final aligned position of the Game Object. For example:

`sprite.alignIn(background, Phaser.BOTTOM_RIGHT, -20, -20)`

Would align the `sprite` to the bottom-right, but moved 20 pixels in from the corner. Think of the offsets as applying an adjustment to the containers bounds before the alignment takes place. So providing a negative offset will 'shrink' the container bounds by that amount, and providing a positive one expands it.

func (*Rope) AlignTo

func (self *Rope) AlignTo(parent interface{}) interface{}

AlignTo Aligns this Game Object to the side of another Game Object, or Rectangle, known as the 'parent', in one of 11 possible positions.

The parent must be a Game Object, or Phaser.Rectangle object. This can include properties such as `World.bounds` or `Camera.view`, for aligning Game Objects within the world and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText, TileSprites or Buttons.

Please note that aligning a Sprite to another Game Object does **not** make it a child of the parent. It simply modifies its position coordinates so it aligns with it.

The position constants you can use are:

`Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_TOP`, `Phaser.LEFT_CENTER`, `Phaser.LEFT_BOTTOM`, `Phaser.RIGHT_TOP`, `Phaser.RIGHT_CENTER`, `Phaser.RIGHT_BOTTOM`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

The Game Objects are placed in such a way that their _bounds_ align with the parent, taking into consideration rotation, scale and the anchor property. This allows you to neatly align Game Objects, irrespective of their position value.

The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final aligned position of the Game Object. For example:

`sprite.alignTo(background, Phaser.BOTTOM_RIGHT, -20, -20)`

Would align the `sprite` to the bottom-right, but moved 20 pixels in from the corner. Think of the offsets as applying an adjustment to the parents bounds before the alignment takes place. So providing a negative offset will 'shrink' the parent bounds by that amount, and providing a positive one expands it.

func (*Rope) AlignTo1O

func (self *Rope) AlignTo1O(parent interface{}, position int) interface{}

AlignTo1O Aligns this Game Object to the side of another Game Object, or Rectangle, known as the 'parent', in one of 11 possible positions.

The parent must be a Game Object, or Phaser.Rectangle object. This can include properties such as `World.bounds` or `Camera.view`, for aligning Game Objects within the world and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText, TileSprites or Buttons.

Please note that aligning a Sprite to another Game Object does **not** make it a child of the parent. It simply modifies its position coordinates so it aligns with it.

The position constants you can use are:

`Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_TOP`, `Phaser.LEFT_CENTER`, `Phaser.LEFT_BOTTOM`, `Phaser.RIGHT_TOP`, `Phaser.RIGHT_CENTER`, `Phaser.RIGHT_BOTTOM`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

The Game Objects are placed in such a way that their _bounds_ align with the parent, taking into consideration rotation, scale and the anchor property. This allows you to neatly align Game Objects, irrespective of their position value.

The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final aligned position of the Game Object. For example:

`sprite.alignTo(background, Phaser.BOTTOM_RIGHT, -20, -20)`

Would align the `sprite` to the bottom-right, but moved 20 pixels in from the corner. Think of the offsets as applying an adjustment to the parents bounds before the alignment takes place. So providing a negative offset will 'shrink' the parent bounds by that amount, and providing a positive one expands it.

func (*Rope) AlignTo2O

func (self *Rope) AlignTo2O(parent interface{}, position int, offsetX int) interface{}

AlignTo2O Aligns this Game Object to the side of another Game Object, or Rectangle, known as the 'parent', in one of 11 possible positions.

The parent must be a Game Object, or Phaser.Rectangle object. This can include properties such as `World.bounds` or `Camera.view`, for aligning Game Objects within the world and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText, TileSprites or Buttons.

Please note that aligning a Sprite to another Game Object does **not** make it a child of the parent. It simply modifies its position coordinates so it aligns with it.

The position constants you can use are:

`Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_TOP`, `Phaser.LEFT_CENTER`, `Phaser.LEFT_BOTTOM`, `Phaser.RIGHT_TOP`, `Phaser.RIGHT_CENTER`, `Phaser.RIGHT_BOTTOM`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

The Game Objects are placed in such a way that their _bounds_ align with the parent, taking into consideration rotation, scale and the anchor property. This allows you to neatly align Game Objects, irrespective of their position value.

The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final aligned position of the Game Object. For example:

`sprite.alignTo(background, Phaser.BOTTOM_RIGHT, -20, -20)`

Would align the `sprite` to the bottom-right, but moved 20 pixels in from the corner. Think of the offsets as applying an adjustment to the parents bounds before the alignment takes place. So providing a negative offset will 'shrink' the parent bounds by that amount, and providing a positive one expands it.

func (*Rope) AlignTo3O

func (self *Rope) AlignTo3O(parent interface{}, position int, offsetX int, offsetY int) interface{}

AlignTo3O Aligns this Game Object to the side of another Game Object, or Rectangle, known as the 'parent', in one of 11 possible positions.

The parent must be a Game Object, or Phaser.Rectangle object. This can include properties such as `World.bounds` or `Camera.view`, for aligning Game Objects within the world and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText, TileSprites or Buttons.

Please note that aligning a Sprite to another Game Object does **not** make it a child of the parent. It simply modifies its position coordinates so it aligns with it.

The position constants you can use are:

`Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_TOP`, `Phaser.LEFT_CENTER`, `Phaser.LEFT_BOTTOM`, `Phaser.RIGHT_TOP`, `Phaser.RIGHT_CENTER`, `Phaser.RIGHT_BOTTOM`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

The Game Objects are placed in such a way that their _bounds_ align with the parent, taking into consideration rotation, scale and the anchor property. This allows you to neatly align Game Objects, irrespective of their position value.

The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final aligned position of the Game Object. For example:

`sprite.alignTo(background, Phaser.BOTTOM_RIGHT, -20, -20)`

Would align the `sprite` to the bottom-right, but moved 20 pixels in from the corner. Think of the offsets as applying an adjustment to the parents bounds before the alignment takes place. So providing a negative offset will 'shrink' the parent bounds by that amount, and providing a positive one expands it.

func (*Rope) AlignToI

func (self *Rope) AlignToI(args ...interface{}) interface{}

AlignToI Aligns this Game Object to the side of another Game Object, or Rectangle, known as the 'parent', in one of 11 possible positions.

The parent must be a Game Object, or Phaser.Rectangle object. This can include properties such as `World.bounds` or `Camera.view`, for aligning Game Objects within the world and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText, TileSprites or Buttons.

Please note that aligning a Sprite to another Game Object does **not** make it a child of the parent. It simply modifies its position coordinates so it aligns with it.

The position constants you can use are:

`Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_TOP`, `Phaser.LEFT_CENTER`, `Phaser.LEFT_BOTTOM`, `Phaser.RIGHT_TOP`, `Phaser.RIGHT_CENTER`, `Phaser.RIGHT_BOTTOM`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

The Game Objects are placed in such a way that their _bounds_ align with the parent, taking into consideration rotation, scale and the anchor property. This allows you to neatly align Game Objects, irrespective of their position value.

The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final aligned position of the Game Object. For example:

`sprite.alignTo(background, Phaser.BOTTOM_RIGHT, -20, -20)`

Would align the `sprite` to the bottom-right, but moved 20 pixels in from the corner. Think of the offsets as applying an adjustment to the parents bounds before the alignment takes place. So providing a negative offset will 'shrink' the parent bounds by that amount, and providing a positive one expands it.

func (*Rope) Alive

func (self *Rope) Alive() bool

Alive A useful flag to control if the Game Object is alive or dead.

This is set automatically by the Health components `damage` method should the object run out of health. Or you can toggle it via your game code.

This property is mostly just provided to be used by your game - it doesn't effect rendering or logic updates. However you can use `Group.getFirstAlive` in conjunction with this property for fast object pooling and recycling.

func (*Rope) Angle

func (self *Rope) Angle() int

Angle The angle property is the rotation of the Game Object in *degrees* from its original orientation.

Values from 0 to 180 represent clockwise rotation; values from 0 to -180 represent counterclockwise rotation.

Values outside this range are added to or subtracted from 360 to obtain a value within the range. For example, the statement player.angle = 450 is the same as player.angle = 90.

If you wish to work in radians instead of degrees you can use the property `rotation` instead. Working in radians is slightly faster as it doesn't have to perform any calculations.

func (*Rope) Animations

func (self *Rope) Animations() *AnimationManager

Animations If the Game Object is enabled for animation (such as a Phaser.Sprite) this is a reference to its AnimationManager instance. Through it you can create, play, pause and stop animations.

func (*Rope) AutoCull

func (self *Rope) AutoCull() bool

AutoCull A Game Object with `autoCull` set to true will check its bounds against the World Camera every frame. If it is not intersecting the Camera bounds at any point then it has its `renderable` property set to `false`. This keeps the Game Object alive and still processing updates, but forces it to skip the render step entirely.

This is a relatively expensive operation, especially if enabled on hundreds of Game Objects. So enable it only if you know it's required, or you have tested performance and find it acceptable.

func (*Rope) BlendMode

func (self *Rope) BlendMode() int

BlendMode The blend mode to be applied to the sprite. Set to PIXI.blendModes.NORMAL to remove any blend mode.

func (*Rope) Body

func (self *Rope) Body() interface{}

Body `body` is the Game Objects physics body. Once a Game Object is enabled for physics you access all associated properties and methods via it.

By default Game Objects won't add themselves to any physics system and their `body` property will be `null`.

To enable this Game Object for physics you need to call `game.physics.enable(object, system)` where `object` is this object and `system` is the Physics system you are using. If none is given it defaults to `Phaser.Physics.Arcade`.

You can alternatively call `game.physics.arcade.enable(object)`, or add this Game Object to a physics enabled Group.

Important: Enabling a Game Object for P2 or Ninja physics will automatically set its `anchor` property to 0.5, so the physics body is centered on the Game Object.

If you need a different result then adjust or re-create the Body shape offsets manually or reset the anchor after enabling physics.

func (*Rope) Bottom

func (self *Rope) Bottom() int

Bottom The sum of the y and height properties. This is the same as `y + height - offsetY`.

func (*Rope) BringToTop

func (self *Rope) BringToTop() *DisplayObject

BringToTop Brings this Game Object to the top of its parents display list. Visually this means it will render over the top of any old child in the same Group.

If this Game Object hasn't been added to a custom Group then this method will bring it to the top of the Game World, because the World is the root Group from which all Game Objects descend.

func (*Rope) BringToTopI

func (self *Rope) BringToTopI(args ...interface{}) *DisplayObject

BringToTopI Brings this Game Object to the top of its parents display list. Visually this means it will render over the top of any old child in the same Group.

If this Game Object hasn't been added to a custom Group then this method will bring it to the top of the Game World, because the World is the root Group from which all Game Objects descend.

func (*Rope) CameraOffset

func (self *Rope) CameraOffset() *Point

CameraOffset The x/y coordinate offset applied to the top-left of the camera that this Game Object will be drawn at if `fixedToCamera` is true.

The values are relative to the top-left of the camera view and in addition to any parent of the Game Object on the display list.

func (*Rope) CanvasPadding

func (self *Rope) CanvasPadding() int

CanvasPadding Triangles in canvas mode are automatically antialiased, use this value to force triangles to overlap a bit with each other.

func (*Rope) CenterX

func (self *Rope) CenterX() int

CenterX The center x coordinate of the Game Object. This is the same as `(x - offsetX) + (width / 2)`.

func (*Rope) CenterY

func (self *Rope) CenterY() int

CenterY The center y coordinate of the Game Object. This is the same as `(y - offsetY) + (height / 2)`.

func (*Rope) CheckTransform

func (self *Rope) CheckTransform(wt *Matrix)

CheckTransform Adjust scaling limits, if set, to this Game Object.

func (*Rope) CheckTransformI

func (self *Rope) CheckTransformI(args ...interface{})

CheckTransformI Adjust scaling limits, if set, to this Game Object.

func (*Rope) CheckWorldBounds

func (self *Rope) CheckWorldBounds() bool

CheckWorldBounds If this is set to `true` the Game Object checks if it is within the World bounds each frame.

When it is no longer intersecting the world bounds it dispatches the `onOutOfBounds` event.

If it was *previously* out of bounds but is now intersecting the world bounds again it dispatches the `onEnterBounds` event.

It also optionally kills the Game Object if `outOfBoundsKill` is `true`.

When `checkWorldBounds` is enabled it forces the Game Object to calculate its full bounds every frame.

This is a relatively expensive operation, especially if enabled on hundreds of Game Objects. So enable it only if you know it's required, or you have tested performance and find it acceptable.

func (*Rope) Children

func (self *Rope) Children() []DisplayObject

Children [read-only] The array of children of this container.

func (*Rope) Components

func (self *Rope) Components() interface{}

Components The components this Game Object has installed.

func (*Rope) Contains

func (self *Rope) Contains(child *DisplayObject) bool

Contains Determines whether the specified display object is a child of the DisplayObjectContainer instance or the instance itself.

func (*Rope) ContainsI

func (self *Rope) ContainsI(args ...interface{}) bool

ContainsI Determines whether the specified display object is a child of the DisplayObjectContainer instance or the instance itself.

func (*Rope) Crop

func (self *Rope) Crop(rect *Rectangle)

Crop Crop allows you to crop the texture being used to display this Game Object. Setting a crop rectangle modifies the core texture frame. The Game Object width and height properties will be adjusted accordingly.

Cropping takes place from the top-left and can be modified in real-time either by providing an updated rectangle object to this method, or by modifying `cropRect` property directly and then calling `updateCrop`.

The rectangle object given to this method can be either a `Phaser.Rectangle` or any other object so long as it has public `x`, `y`, `width`, `height`, `right` and `bottom` properties.

A reference to the rectangle is stored in `cropRect` unless the `copy` parameter is `true`, in which case the values are duplicated to a local object.

func (*Rope) Crop1O

func (self *Rope) Crop1O(rect *Rectangle, copy bool)

Crop1O Crop allows you to crop the texture being used to display this Game Object. Setting a crop rectangle modifies the core texture frame. The Game Object width and height properties will be adjusted accordingly.

Cropping takes place from the top-left and can be modified in real-time either by providing an updated rectangle object to this method, or by modifying `cropRect` property directly and then calling `updateCrop`.

The rectangle object given to this method can be either a `Phaser.Rectangle` or any other object so long as it has public `x`, `y`, `width`, `height`, `right` and `bottom` properties.

A reference to the rectangle is stored in `cropRect` unless the `copy` parameter is `true`, in which case the values are duplicated to a local object.

func (*Rope) CropI

func (self *Rope) CropI(args ...interface{})

CropI Crop allows you to crop the texture being used to display this Game Object. Setting a crop rectangle modifies the core texture frame. The Game Object width and height properties will be adjusted accordingly.

Cropping takes place from the top-left and can be modified in real-time either by providing an updated rectangle object to this method, or by modifying `cropRect` property directly and then calling `updateCrop`.

The rectangle object given to this method can be either a `Phaser.Rectangle` or any other object so long as it has public `x`, `y`, `width`, `height`, `right` and `bottom` properties.

A reference to the rectangle is stored in `cropRect` unless the `copy` parameter is `true`, in which case the values are duplicated to a local object.

func (*Rope) CropRect

func (self *Rope) CropRect() *Rectangle

CropRect The Rectangle used to crop the texture this Game Object uses. Set this property via `crop`. If you modify this property directly you must call `updateCrop` in order to have the change take effect.

func (*Rope) Data

func (self *Rope) Data() interface{}

Data An empty Object that belongs to this Game Object. This value isn't ever used internally by Phaser, but may be used by your own code, or by Phaser Plugins, to store data that needs to be associated with the Game Object, without polluting the Game Object directly.

func (*Rope) Debug

func (self *Rope) Debug() bool

Debug A debug flag designed for use with `Game.enableStep`.

func (*Rope) DeltaX

func (self *Rope) DeltaX() int

DeltaX Returns the delta x value. The difference between world.x now and in the previous frame.

The value will be positive if the Game Object has moved to the right or negative if to the left.

func (*Rope) DeltaY

func (self *Rope) DeltaY() int

DeltaY Returns the delta y value. The difference between world.y now and in the previous frame.

The value will be positive if the Game Object has moved down or negative if up.

func (*Rope) DeltaZ

func (self *Rope) DeltaZ() int

DeltaZ Returns the delta z value. The difference between rotation now and in the previous frame. The delta value.

func (*Rope) Destroy

func (self *Rope) Destroy()

Destroy Destroys the Game Object. This removes it from its parent group, destroys the input, event and animation handlers if present and nulls its reference to `game`, freeing it up for garbage collection.

If this Game Object has the Events component it will also dispatch the `onDestroy` event.

You can optionally also destroy the BaseTexture this Game Object is using. Be careful if you've more than one Game Object sharing the same BaseTexture.

func (*Rope) Destroy1O

func (self *Rope) Destroy1O(destroyChildren bool)

Destroy1O Destroys the Game Object. This removes it from its parent group, destroys the input, event and animation handlers if present and nulls its reference to `game`, freeing it up for garbage collection.

If this Game Object has the Events component it will also dispatch the `onDestroy` event.

You can optionally also destroy the BaseTexture this Game Object is using. Be careful if you've more than one Game Object sharing the same BaseTexture.

func (*Rope) Destroy2O

func (self *Rope) Destroy2O(destroyChildren bool, destroyTexture bool)

Destroy2O Destroys the Game Object. This removes it from its parent group, destroys the input, event and animation handlers if present and nulls its reference to `game`, freeing it up for garbage collection.

If this Game Object has the Events component it will also dispatch the `onDestroy` event.

You can optionally also destroy the BaseTexture this Game Object is using. Be careful if you've more than one Game Object sharing the same BaseTexture.

func (*Rope) DestroyI

func (self *Rope) DestroyI(args ...interface{})

DestroyI Destroys the Game Object. This removes it from its parent group, destroys the input, event and animation handlers if present and nulls its reference to `game`, freeing it up for garbage collection.

If this Game Object has the Events component it will also dispatch the `onDestroy` event.

You can optionally also destroy the BaseTexture this Game Object is using. Be careful if you've more than one Game Object sharing the same BaseTexture.

func (*Rope) DestroyPhase

func (self *Rope) DestroyPhase() bool

DestroyPhase As a Game Object runs through its destroy method this flag is set to true, and can be checked in any sub-systems or plugins it is being destroyed from.

func (*Rope) Dirty

func (self *Rope) Dirty() bool

Dirty Whether the strip is dirty or not

func (*Rope) Events

func (self *Rope) Events() *Events

Events All Phaser Game Objects have an Events class which contains all of the events that are dispatched when certain things happen to this Game Object, or any of its components.

func (*Rope) Exists

func (self *Rope) Exists() bool

Exists Controls if this Game Object is processed by the core game loop. If this Game Object has a physics body it also controls if its physics body is updated or not. When `exists` is set to `false` it will remove its physics body from the physics world if it has one. It also toggles the `visible` property to false as well.

Setting `exists` to true will add its physics body back in to the physics world, if it has one. It will also set the `visible` property to `true`.

func (*Rope) FixedToCamera

func (self *Rope) FixedToCamera() bool

FixedToCamera A Game Object that is "fixed" to the camera uses its x/y coordinates as offsets from the top left of the camera during rendering.

The values are adjusted at the rendering stage, overriding the Game Objects actual world position.

The end result is that the Game Object will appear to be 'fixed' to the camera, regardless of where in the game world the camera is viewing. This is useful if for example this Game Object is a UI item that you wish to be visible at all times regardless where in the world the camera is.

The offsets are stored in the `cameraOffset` property.

Note that the `cameraOffset` values are in addition to any parent of this Game Object on the display list.

Be careful not to set `fixedToCamera` on Game Objects which are in Groups that already have `fixedToCamera` enabled on them.

func (*Rope) Frame

func (self *Rope) Frame() int

Frame Gets or sets the current frame index of the texture being used to render this Game Object.

To change the frame set `frame` to the index of the new frame in the sprite sheet you wish this Game Object to use, for example: `player.frame = 4`.

If the frame index given doesn't exist it will revert to the first frame found in the texture.

If you are using a texture atlas then you should use the `frameName` property instead.

If you wish to fully replace the texture being used see `loadTexture`.

func (*Rope) FrameName

func (self *Rope) FrameName() string

FrameName Gets or sets the current frame name of the texture being used to render this Game Object.

To change the frame set `frameName` to the name of the new frame in the texture atlas you wish this Game Object to use, for example: `player.frameName = "idle"`.

If the frame name given doesn't exist it will revert to the first frame found in the texture and throw a console warning.

If you are using a sprite sheet then you should use the `frame` property instead.

If you wish to fully replace the texture being used see `loadTexture`.

func (*Rope) Fresh

func (self *Rope) Fresh() bool

Fresh A Game Object is considered `fresh` if it has just been created or reset and is yet to receive a renderer transform update. This property is mostly used internally by the physics systems, but is exposed for the use of plugins.

func (*Rope) Game

func (self *Rope) Game() *Game

Game A reference to the currently running Game.

func (*Rope) GetBounds

func (self *Rope) GetBounds(matrix *Matrix) *Rectangle

GetBounds Returns the bounds of the mesh as a rectangle. The bounds calculation takes the worldTransform into account.

func (*Rope) GetBoundsI

func (self *Rope) GetBoundsI(args ...interface{}) *Rectangle

GetBoundsI Returns the bounds of the mesh as a rectangle. The bounds calculation takes the worldTransform into account.

func (*Rope) GetChildAt

func (self *Rope) GetChildAt(index int) *DisplayObject

GetChildAt Returns the child at the specified index

func (*Rope) GetChildAtI

func (self *Rope) GetChildAtI(args ...interface{}) *DisplayObject

GetChildAtI Returns the child at the specified index

func (*Rope) GetChildIndex

func (self *Rope) GetChildIndex(child *DisplayObject) int

GetChildIndex Returns the index position of a child DisplayObject instance

func (*Rope) GetChildIndexI

func (self *Rope) GetChildIndexI(args ...interface{}) int

GetChildIndexI Returns the index position of a child DisplayObject instance

func (*Rope) GetLocalBounds

func (self *Rope) GetLocalBounds() *Rectangle

GetLocalBounds Retrieves the non-global local bounds of the displayObjectContainer as a rectangle without any transformations. The calculation takes all visible children into consideration.

func (*Rope) GetLocalBoundsI

func (self *Rope) GetLocalBoundsI(args ...interface{}) *Rectangle

GetLocalBoundsI Retrieves the non-global local bounds of the displayObjectContainer as a rectangle without any transformations. The calculation takes all visible children into consideration.

func (*Rope) Height

func (self *Rope) Height() int

Height The height of the displayObjectContainer, setting this will actually modify the scale to achieve the value set

func (*Rope) IgnoreChildInput

func (self *Rope) IgnoreChildInput() bool

IgnoreChildInput If `ignoreChildInput` is `false` it will allow this objects _children_ to be considered as valid for Input events.

If this property is `true` then the children will _not_ be considered as valid for Input events.

Note that this property isn't recursive: only immediate children are influenced, it doesn't scan further down.

func (*Rope) InCamera

func (self *Rope) InCamera() bool

InCamera Checks if the Game Objects bounds intersect with the Game Camera bounds. Returns `true` if they do, otherwise `false` if fully outside of the Cameras bounds.

func (*Rope) InWorld

func (self *Rope) InWorld() bool

InWorld Checks if the Game Objects bounds are within, or intersect at any point with the Game World bounds.

func (*Rope) Key

func (self *Rope) Key() interface{}

Key The key of the image or texture used by this Game Object during rendering. If it is a string it's the string used to retrieve the texture from the Phaser Image Cache. It can also be an instance of a RenderTexture, BitmapData, Video or PIXI.Texture. If a Game Object is created without a key it is automatically assigned the key `__default` which is a 32x32 transparent PNG stored within the Cache. If a Game Object is given a key which doesn't exist in the Image Cache it is re-assigned the key `__missing` which is a 32x32 PNG of a green box with a line through it.

func (*Rope) Kill

func (self *Rope) Kill() *DisplayObject

Kill Kills a Game Object. A killed Game Object has its `alive`, `exists` and `visible` properties all set to false.

It will dispatch the `onKilled` event. You can listen to `events.onKilled` for the signal.

Note that killing a Game Object is a way for you to quickly recycle it in an object pool, it doesn't destroy the object or free it up from memory.

If you don't need this Game Object any more you should call `destroy` instead.

func (*Rope) KillI

func (self *Rope) KillI(args ...interface{}) *DisplayObject

KillI Kills a Game Object. A killed Game Object has its `alive`, `exists` and `visible` properties all set to false.

It will dispatch the `onKilled` event. You can listen to `events.onKilled` for the signal.

Note that killing a Game Object is a way for you to quickly recycle it in an object pool, it doesn't destroy the object or free it up from memory.

If you don't need this Game Object any more you should call `destroy` instead.

func (*Rope) Left

func (self *Rope) Left() int

Left The left coordinate of the Game Object. This is the same as `x - offsetX`.

func (*Rope) Lifespan

func (self *Rope) Lifespan() int

Lifespan The lifespan allows you to give a Game Object a lifespan in milliseconds.

Once the Game Object is 'born' you can set this to a positive value.

It is automatically decremented by the millisecond equivalent of `game.time.physicsElapsed` each frame. When it reaches zero it will call the `kill` method.

Very handy for particles, bullets, collectibles, or any other short-lived entity.

func (*Rope) LoadTexture

func (self *Rope) LoadTexture(key interface{})

LoadTexture Changes the base texture the Game Object is using. The old texture is removed and the new one is referenced or fetched from the Cache.

If your Game Object is using a frame from a texture atlas and you just wish to change to another frame, then see the `frame` or `frameName` properties instead.

You should only use `loadTexture` if you want to replace the base texture entirely.

Calling this method causes a WebGL texture update, so use sparingly or in low-intensity portions of your game, or if you know the new texture is already on the GPU.

You can use the new const `Phaser.PENDING_ATLAS` as the texture key for any sprite. Doing this then sets the key to be the `frame` argument (the frame is set to zero).

This allows you to create sprites using `load.image` during development, and then change them to use a Texture Atlas later in development by simply searching your code for 'PENDING_ATLAS' and swapping it to be the key of the atlas data.

Note: You cannot use a RenderTexture as a texture for a TileSprite.

func (*Rope) LoadTexture1O

func (self *Rope) LoadTexture1O(key interface{}, frame interface{})

LoadTexture1O Changes the base texture the Game Object is using. The old texture is removed and the new one is referenced or fetched from the Cache.

If your Game Object is using a frame from a texture atlas and you just wish to change to another frame, then see the `frame` or `frameName` properties instead.

You should only use `loadTexture` if you want to replace the base texture entirely.

Calling this method causes a WebGL texture update, so use sparingly or in low-intensity portions of your game, or if you know the new texture is already on the GPU.

You can use the new const `Phaser.PENDING_ATLAS` as the texture key for any sprite. Doing this then sets the key to be the `frame` argument (the frame is set to zero).

This allows you to create sprites using `load.image` during development, and then change them to use a Texture Atlas later in development by simply searching your code for 'PENDING_ATLAS' and swapping it to be the key of the atlas data.

Note: You cannot use a RenderTexture as a texture for a TileSprite.

func (*Rope) LoadTexture2O

func (self *Rope) LoadTexture2O(key interface{}, frame interface{}, stopAnimation bool)

LoadTexture2O Changes the base texture the Game Object is using. The old texture is removed and the new one is referenced or fetched from the Cache.

If your Game Object is using a frame from a texture atlas and you just wish to change to another frame, then see the `frame` or `frameName` properties instead.

You should only use `loadTexture` if you want to replace the base texture entirely.

Calling this method causes a WebGL texture update, so use sparingly or in low-intensity portions of your game, or if you know the new texture is already on the GPU.

You can use the new const `Phaser.PENDING_ATLAS` as the texture key for any sprite. Doing this then sets the key to be the `frame` argument (the frame is set to zero).

This allows you to create sprites using `load.image` during development, and then change them to use a Texture Atlas later in development by simply searching your code for 'PENDING_ATLAS' and swapping it to be the key of the atlas data.

Note: You cannot use a RenderTexture as a texture for a TileSprite.

func (*Rope) LoadTextureI

func (self *Rope) LoadTextureI(args ...interface{})

LoadTextureI Changes the base texture the Game Object is using. The old texture is removed and the new one is referenced or fetched from the Cache.

If your Game Object is using a frame from a texture atlas and you just wish to change to another frame, then see the `frame` or `frameName` properties instead.

You should only use `loadTexture` if you want to replace the base texture entirely.

Calling this method causes a WebGL texture update, so use sparingly or in low-intensity portions of your game, or if you know the new texture is already on the GPU.

You can use the new const `Phaser.PENDING_ATLAS` as the texture key for any sprite. Doing this then sets the key to be the `frame` argument (the frame is set to zero).

This allows you to create sprites using `load.image` during development, and then change them to use a Texture Atlas later in development by simply searching your code for 'PENDING_ATLAS' and swapping it to be the key of the atlas data.

Note: You cannot use a RenderTexture as a texture for a TileSprite.

func (*Rope) MoveDown

func (self *Rope) MoveDown() *DisplayObject

MoveDown Moves this Game Object down one place in its parents display list. This call has no effect if the Game Object is already at the bottom of the display list.

If this Game Object hasn't been added to a custom Group then this method will move it one object down within the Game World, because the World is the root Group from which all Game Objects descend.

func (*Rope) MoveDownI

func (self *Rope) MoveDownI(args ...interface{}) *DisplayObject

MoveDownI Moves this Game Object down one place in its parents display list. This call has no effect if the Game Object is already at the bottom of the display list.

If this Game Object hasn't been added to a custom Group then this method will move it one object down within the Game World, because the World is the root Group from which all Game Objects descend.

func (*Rope) MoveUp

func (self *Rope) MoveUp() *DisplayObject

MoveUp Moves this Game Object up one place in its parents display list. This call has no effect if the Game Object is already at the top of the display list.

If this Game Object hasn't been added to a custom Group then this method will move it one object up within the Game World, because the World is the root Group from which all Game Objects descend.

func (*Rope) MoveUpI

func (self *Rope) MoveUpI(args ...interface{}) *DisplayObject

MoveUpI Moves this Game Object up one place in its parents display list. This call has no effect if the Game Object is already at the top of the display list.

If this Game Object hasn't been added to a custom Group then this method will move it one object up within the Game World, because the World is the root Group from which all Game Objects descend.

func (*Rope) Name

func (self *Rope) Name() string

Name A user defined name given to this Game Object. This value isn't ever used internally by Phaser, it is meant as a game level property.

func (*Rope) OffsetX

func (self *Rope) OffsetX() int

OffsetX The amount the Game Object is visually offset from its x coordinate. This is the same as `width * anchor.x`. It will only be > 0 if anchor.x is not equal to zero.

func (*Rope) OffsetY

func (self *Rope) OffsetY() int

OffsetY The amount the Game Object is visually offset from its y coordinate. This is the same as `height * anchor.y`. It will only be > 0 if anchor.y is not equal to zero.

func (*Rope) OnTextureUpdate

func (self *Rope) OnTextureUpdate(event interface{})

OnTextureUpdate When the texture is updated, this event will fire to update the scale and frame

func (*Rope) OnTextureUpdateI

func (self *Rope) OnTextureUpdateI(args ...interface{})

OnTextureUpdateI When the texture is updated, this event will fire to update the scale and frame

func (*Rope) OutOfBoundsKill

func (self *Rope) OutOfBoundsKill() bool

OutOfBoundsKill If this and the `checkWorldBounds` property are both set to `true` then the `kill` method is called as soon as `inWorld` returns false.

func (*Rope) OutOfCameraBoundsKill

func (self *Rope) OutOfCameraBoundsKill() bool

OutOfCameraBoundsKill If this and the `autoCull` property are both set to `true`, then the `kill` method is called as soon as the Game Object leaves the camera bounds.

func (*Rope) Overlap

func (self *Rope) Overlap(displayObject interface{}) bool

Overlap Checks to see if the bounds of this Game Object overlaps with the bounds of the given Display Object, which can be a Sprite, Image, TileSprite or anything that extends those such as Button or provides a `getBounds` method and result.

This check ignores the `hitArea` property if set and runs a `getBounds` comparison on both objects to determine the result.

Therefore it's relatively expensive to use in large quantities, i.e. with lots of Sprites at a high frequency. It should be fine for low-volume testing where physics isn't required.

func (*Rope) OverlapI

func (self *Rope) OverlapI(args ...interface{}) bool

OverlapI Checks to see if the bounds of this Game Object overlaps with the bounds of the given Display Object, which can be a Sprite, Image, TileSprite or anything that extends those such as Button or provides a `getBounds` method and result.

This check ignores the `hitArea` property if set and runs a `getBounds` comparison on both objects to determine the result.

Therefore it's relatively expensive to use in large quantities, i.e. with lots of Sprites at a high frequency. It should be fine for low-volume testing where physics isn't required.

func (*Rope) PendingDestroy

func (self *Rope) PendingDestroy() bool

PendingDestroy A Game Object is that is pendingDestroy is flagged to have its destroy method called on the next logic update. You can set it directly to allow you to flag an object to be destroyed on its next update.

This is extremely useful if you wish to destroy an object from within one of its own callbacks such as with Buttons or other Input events.

func (*Rope) Play

func (self *Rope) Play(name string) *Animation

Play Plays an Animation.

The animation should have previously been created via `animations.add`.

If the animation is already playing calling this again won't do anything. If you need to reset an already running animation do so directly on the Animation object itself or via `AnimationManager.stop`.

func (*Rope) Play1O

func (self *Rope) Play1O(name string, frameRate int) *Animation

Play1O Plays an Animation.

The animation should have previously been created via `animations.add`.

If the animation is already playing calling this again won't do anything. If you need to reset an already running animation do so directly on the Animation object itself or via `AnimationManager.stop`.

func (*Rope) Play2O

func (self *Rope) Play2O(name string, frameRate int, loop bool) *Animation

Play2O Plays an Animation.

The animation should have previously been created via `animations.add`.

If the animation is already playing calling this again won't do anything. If you need to reset an already running animation do so directly on the Animation object itself or via `AnimationManager.stop`.

func (*Rope) Play3O

func (self *Rope) Play3O(name string, frameRate int, loop bool, killOnComplete bool) *Animation

Play3O Plays an Animation.

The animation should have previously been created via `animations.add`.

If the animation is already playing calling this again won't do anything. If you need to reset an already running animation do so directly on the Animation object itself or via `AnimationManager.stop`.

func (*Rope) PlayI

func (self *Rope) PlayI(args ...interface{}) *Animation

PlayI Plays an Animation.

The animation should have previously been created via `animations.add`.

If the animation is already playing calling this again won't do anything. If you need to reset an already running animation do so directly on the Animation object itself or via `AnimationManager.stop`.

func (*Rope) PostUpdate

func (self *Rope) PostUpdate()

PostUpdate Internal method called by the World postUpdate cycle.

func (*Rope) PostUpdateI

func (self *Rope) PostUpdateI(args ...interface{})

PostUpdateI Internal method called by the World postUpdate cycle.

func (*Rope) PreUpdate

func (self *Rope) PreUpdate()

PreUpdate Automatically called by World.preUpdate.

func (*Rope) PreUpdateI

func (self *Rope) PreUpdateI(args ...interface{})

PreUpdateI Automatically called by World.preUpdate.

func (*Rope) PreviousPosition

func (self *Rope) PreviousPosition() *Point

PreviousPosition The position the Game Object was located in the previous frame.

func (*Rope) PreviousRotation

func (self *Rope) PreviousRotation() int

PreviousRotation The rotation the Game Object was in set to in the previous frame. Value is in radians.

func (*Rope) RemoveChild

func (self *Rope) RemoveChild(child *DisplayObject) *DisplayObject

RemoveChild Removes a child from the container.

func (*Rope) RemoveChildAt

func (self *Rope) RemoveChildAt(index int) *DisplayObject

RemoveChildAt Removes a child from the specified index position.

func (*Rope) RemoveChildAtI

func (self *Rope) RemoveChildAtI(args ...interface{}) *DisplayObject

RemoveChildAtI Removes a child from the specified index position.

func (*Rope) RemoveChildI

func (self *Rope) RemoveChildI(args ...interface{}) *DisplayObject

RemoveChildI Removes a child from the container.

func (*Rope) RemoveChildren

func (self *Rope) RemoveChildren(beginIndex int, endIndex int)

RemoveChildren Removes all children from this container that are within the begin and end indexes.

func (*Rope) RemoveChildrenI

func (self *Rope) RemoveChildrenI(args ...interface{})

RemoveChildrenI Removes all children from this container that are within the begin and end indexes.

func (*Rope) RenderOrderID

func (self *Rope) RenderOrderID() int

RenderOrderID The render order ID is used internally by the renderer and Input Manager and should not be modified. This property is mostly used internally by the renderers, but is exposed for the use of plugins.

func (*Rope) RenderStripFlat

func (self *Rope) RenderStripFlat(strip *Strip)

RenderStripFlat Renders a flat strip

func (*Rope) RenderStripFlatI

func (self *Rope) RenderStripFlatI(args ...interface{})

RenderStripFlatI Renders a flat strip

func (*Rope) Reset

func (self *Rope) Reset(x int, y int) *Rope

Reset Resets the Rope. This places the Rope at the given x/y world coordinates and then sets alive, exists, visible and renderable all to true. Also resets the outOfBounds state. If the Rope has a physics body that too is reset.

func (*Rope) ResetFrame

func (self *Rope) ResetFrame()

ResetFrame Resets the texture frame dimensions that the Game Object uses for rendering.

func (*Rope) ResetFrameI

func (self *Rope) ResetFrameI(args ...interface{})

ResetFrameI Resets the texture frame dimensions that the Game Object uses for rendering.

func (*Rope) ResetI

func (self *Rope) ResetI(args ...interface{}) *Rope

ResetI Resets the Rope. This places the Rope at the given x/y world coordinates and then sets alive, exists, visible and renderable all to true. Also resets the outOfBounds state. If the Rope has a physics body that too is reset.

func (*Rope) ResizeFrame

func (self *Rope) ResizeFrame(parent interface{}, width int, height int)

ResizeFrame Resizes the Frame dimensions that the Game Object uses for rendering.

You shouldn't normally need to ever call this, but in the case of special texture types such as Video or BitmapData it can be useful to adjust the dimensions directly in this way.

func (*Rope) ResizeFrameI

func (self *Rope) ResizeFrameI(args ...interface{})

ResizeFrameI Resizes the Frame dimensions that the Game Object uses for rendering.

You shouldn't normally need to ever call this, but in the case of special texture types such as Video or BitmapData it can be useful to adjust the dimensions directly in this way.

func (*Rope) Revive

func (self *Rope) Revive() *DisplayObject

Revive Brings a 'dead' Game Object back to life, optionally resetting its health value in the process.

A resurrected Game Object has its `alive`, `exists` and `visible` properties all set to true.

It will dispatch the `onRevived` event. Listen to `events.onRevived` for the signal.

func (*Rope) Revive1O

func (self *Rope) Revive1O(health int) *DisplayObject

Revive1O Brings a 'dead' Game Object back to life, optionally resetting its health value in the process.

A resurrected Game Object has its `alive`, `exists` and `visible` properties all set to true.

It will dispatch the `onRevived` event. Listen to `events.onRevived` for the signal.

func (*Rope) ReviveI

func (self *Rope) ReviveI(args ...interface{}) *DisplayObject

ReviveI Brings a 'dead' Game Object back to life, optionally resetting its health value in the process.

A resurrected Game Object has its `alive`, `exists` and `visible` properties all set to true.

It will dispatch the `onRevived` event. Listen to `events.onRevived` for the signal.

func (*Rope) Right

func (self *Rope) Right() int

Right The right coordinate of the Game Object. This is the same as `x + width - offsetX`.

func (*Rope) ScaleMax

func (self *Rope) ScaleMax() *Point

ScaleMax The maximum scale this Game Object will scale up to.

It allows you to prevent a parent from scaling this Game Object higher than the given value.

Set it to `null` to remove the limit.

func (*Rope) ScaleMin

func (self *Rope) ScaleMin() *Point

ScaleMin The minimum scale this Game Object will scale down to.

It allows you to prevent a parent from scaling this Game Object lower than the given value.

Set it to `null` to remove the limit.

func (*Rope) Segments

func (self *Rope) Segments() interface{}

Segments The segments that make up the rope body as an array of Phaser.Rectangles

func (*Rope) SendToBack

func (self *Rope) SendToBack() *DisplayObject

SendToBack Sends this Game Object to the bottom of its parents display list. Visually this means it will render below all other children in the same Group.

If this Game Object hasn't been added to a custom Group then this method will send it to the bottom of the Game World, because the World is the root Group from which all Game Objects descend.

func (*Rope) SendToBackI

func (self *Rope) SendToBackI(args ...interface{}) *DisplayObject

SendToBackI Sends this Game Object to the bottom of its parents display list. Visually this means it will render below all other children in the same Group.

If this Game Object hasn't been added to a custom Group then this method will send it to the bottom of the Game World, because the World is the root Group from which all Game Objects descend.

func (*Rope) SetAliveA

func (self *Rope) SetAliveA(member bool)

SetAliveA A useful flag to control if the Game Object is alive or dead.

This is set automatically by the Health components `damage` method should the object run out of health. Or you can toggle it via your game code.

This property is mostly just provided to be used by your game - it doesn't effect rendering or logic updates. However you can use `Group.getFirstAlive` in conjunction with this property for fast object pooling and recycling.

func (*Rope) SetAngleA

func (self *Rope) SetAngleA(member int)

SetAngleA The angle property is the rotation of the Game Object in *degrees* from its original orientation.

Values from 0 to 180 represent clockwise rotation; values from 0 to -180 represent counterclockwise rotation.

Values outside this range are added to or subtracted from 360 to obtain a value within the range. For example, the statement player.angle = 450 is the same as player.angle = 90.

If you wish to work in radians instead of degrees you can use the property `rotation` instead. Working in radians is slightly faster as it doesn't have to perform any calculations.

func (*Rope) SetAnimationsA

func (self *Rope) SetAnimationsA(member *AnimationManager)

SetAnimationsA If the Game Object is enabled for animation (such as a Phaser.Sprite) this is a reference to its AnimationManager instance. Through it you can create, play, pause and stop animations.

func (*Rope) SetAutoCullA

func (self *Rope) SetAutoCullA(member bool)

SetAutoCullA A Game Object with `autoCull` set to true will check its bounds against the World Camera every frame. If it is not intersecting the Camera bounds at any point then it has its `renderable` property set to `false`. This keeps the Game Object alive and still processing updates, but forces it to skip the render step entirely.

This is a relatively expensive operation, especially if enabled on hundreds of Game Objects. So enable it only if you know it's required, or you have tested performance and find it acceptable.

func (*Rope) SetBlendModeA

func (self *Rope) SetBlendModeA(member int)

SetBlendModeA The blend mode to be applied to the sprite. Set to PIXI.blendModes.NORMAL to remove any blend mode.

func (*Rope) SetBodyA

func (self *Rope) SetBodyA(member interface{})

SetBodyA `body` is the Game Objects physics body. Once a Game Object is enabled for physics you access all associated properties and methods via it.

By default Game Objects won't add themselves to any physics system and their `body` property will be `null`.

To enable this Game Object for physics you need to call `game.physics.enable(object, system)` where `object` is this object and `system` is the Physics system you are using. If none is given it defaults to `Phaser.Physics.Arcade`.

You can alternatively call `game.physics.arcade.enable(object)`, or add this Game Object to a physics enabled Group.

Important: Enabling a Game Object for P2 or Ninja physics will automatically set its `anchor` property to 0.5, so the physics body is centered on the Game Object.

If you need a different result then adjust or re-create the Body shape offsets manually or reset the anchor after enabling physics.

func (*Rope) SetBottomA

func (self *Rope) SetBottomA(member int)

SetBottomA The sum of the y and height properties. This is the same as `y + height - offsetY`.

func (*Rope) SetCameraOffsetA

func (self *Rope) SetCameraOffsetA(member *Point)

SetCameraOffsetA The x/y coordinate offset applied to the top-left of the camera that this Game Object will be drawn at if `fixedToCamera` is true.

The values are relative to the top-left of the camera view and in addition to any parent of the Game Object on the display list.

func (*Rope) SetCanvasPaddingA

func (self *Rope) SetCanvasPaddingA(member int)

SetCanvasPaddingA Triangles in canvas mode are automatically antialiased, use this value to force triangles to overlap a bit with each other.

func (*Rope) SetCenterXA

func (self *Rope) SetCenterXA(member int)

SetCenterXA The center x coordinate of the Game Object. This is the same as `(x - offsetX) + (width / 2)`.

func (*Rope) SetCenterYA

func (self *Rope) SetCenterYA(member int)

SetCenterYA The center y coordinate of the Game Object. This is the same as `(y - offsetY) + (height / 2)`.

func (*Rope) SetCheckWorldBoundsA

func (self *Rope) SetCheckWorldBoundsA(member bool)

SetCheckWorldBoundsA If this is set to `true` the Game Object checks if it is within the World bounds each frame.

When it is no longer intersecting the world bounds it dispatches the `onOutOfBounds` event.

If it was *previously* out of bounds but is now intersecting the world bounds again it dispatches the `onEnterBounds` event.

It also optionally kills the Game Object if `outOfBoundsKill` is `true`.

When `checkWorldBounds` is enabled it forces the Game Object to calculate its full bounds every frame.

This is a relatively expensive operation, especially if enabled on hundreds of Game Objects. So enable it only if you know it's required, or you have tested performance and find it acceptable.

func (*Rope) SetChildIndex

func (self *Rope) SetChildIndex(child *DisplayObject, index int)

SetChildIndex Changes the position of an existing child in the display object container

func (*Rope) SetChildIndexI

func (self *Rope) SetChildIndexI(args ...interface{})

SetChildIndexI Changes the position of an existing child in the display object container

func (*Rope) SetChildrenA

func (self *Rope) SetChildrenA(member []DisplayObject)

SetChildrenA [read-only] The array of children of this container.

func (*Rope) SetComponentsA

func (self *Rope) SetComponentsA(member interface{})

SetComponentsA The components this Game Object has installed.

func (*Rope) SetCropRectA

func (self *Rope) SetCropRectA(member *Rectangle)

SetCropRectA The Rectangle used to crop the texture this Game Object uses. Set this property via `crop`. If you modify this property directly you must call `updateCrop` in order to have the change take effect.

func (*Rope) SetDataA

func (self *Rope) SetDataA(member interface{})

SetDataA An empty Object that belongs to this Game Object. This value isn't ever used internally by Phaser, but may be used by your own code, or by Phaser Plugins, to store data that needs to be associated with the Game Object, without polluting the Game Object directly.

func (*Rope) SetDebugA

func (self *Rope) SetDebugA(member bool)

SetDebugA A debug flag designed for use with `Game.enableStep`.

func (*Rope) SetDeltaXA

func (self *Rope) SetDeltaXA(member int)

SetDeltaXA Returns the delta x value. The difference between world.x now and in the previous frame.

The value will be positive if the Game Object has moved to the right or negative if to the left.

func (*Rope) SetDeltaYA

func (self *Rope) SetDeltaYA(member int)

SetDeltaYA Returns the delta y value. The difference between world.y now and in the previous frame.

The value will be positive if the Game Object has moved down or negative if up.

func (*Rope) SetDeltaZA

func (self *Rope) SetDeltaZA(member int)

SetDeltaZA Returns the delta z value. The difference between rotation now and in the previous frame. The delta value.

func (*Rope) SetDestroyPhaseA

func (self *Rope) SetDestroyPhaseA(member bool)

SetDestroyPhaseA As a Game Object runs through its destroy method this flag is set to true, and can be checked in any sub-systems or plugins it is being destroyed from.

func (*Rope) SetDirtyA

func (self *Rope) SetDirtyA(member bool)

SetDirtyA Whether the strip is dirty or not

func (*Rope) SetEventsA

func (self *Rope) SetEventsA(member *Events)

SetEventsA All Phaser Game Objects have an Events class which contains all of the events that are dispatched when certain things happen to this Game Object, or any of its components.

func (*Rope) SetExistsA

func (self *Rope) SetExistsA(member bool)

SetExistsA Controls if this Game Object is processed by the core game loop. If this Game Object has a physics body it also controls if its physics body is updated or not. When `exists` is set to `false` it will remove its physics body from the physics world if it has one. It also toggles the `visible` property to false as well.

Setting `exists` to true will add its physics body back in to the physics world, if it has one. It will also set the `visible` property to `true`.

func (*Rope) SetFixedToCameraA

func (self *Rope) SetFixedToCameraA(member bool)

SetFixedToCameraA A Game Object that is "fixed" to the camera uses its x/y coordinates as offsets from the top left of the camera during rendering.

The values are adjusted at the rendering stage, overriding the Game Objects actual world position.

The end result is that the Game Object will appear to be 'fixed' to the camera, regardless of where in the game world the camera is viewing. This is useful if for example this Game Object is a UI item that you wish to be visible at all times regardless where in the world the camera is.

The offsets are stored in the `cameraOffset` property.

Note that the `cameraOffset` values are in addition to any parent of this Game Object on the display list.

Be careful not to set `fixedToCamera` on Game Objects which are in Groups that already have `fixedToCamera` enabled on them.

func (*Rope) SetFrame

func (self *Rope) SetFrame(frame *Frame)

SetFrame Sets the texture frame the Game Object uses for rendering.

This is primarily an internal method used by `loadTexture`, but is exposed for the use of plugins and custom classes.

func (*Rope) SetFrameA

func (self *Rope) SetFrameA(member int)

SetFrameA Gets or sets the current frame index of the texture being used to render this Game Object.

To change the frame set `frame` to the index of the new frame in the sprite sheet you wish this Game Object to use, for example: `player.frame = 4`.

If the frame index given doesn't exist it will revert to the first frame found in the texture.

If you are using a texture atlas then you should use the `frameName` property instead.

If you wish to fully replace the texture being used see `loadTexture`.

func (*Rope) SetFrameI

func (self *Rope) SetFrameI(args ...interface{})

SetFrameI Sets the texture frame the Game Object uses for rendering.

This is primarily an internal method used by `loadTexture`, but is exposed for the use of plugins and custom classes.

func (*Rope) SetFrameNameA

func (self *Rope) SetFrameNameA(member string)

SetFrameNameA Gets or sets the current frame name of the texture being used to render this Game Object.

To change the frame set `frameName` to the name of the new frame in the texture atlas you wish this Game Object to use, for example: `player.frameName = "idle"`.

If the frame name given doesn't exist it will revert to the first frame found in the texture and throw a console warning.

If you are using a sprite sheet then you should use the `frame` property instead.

If you wish to fully replace the texture being used see `loadTexture`.

func (*Rope) SetFreshA

func (self *Rope) SetFreshA(member bool)

SetFreshA A Game Object is considered `fresh` if it has just been created or reset and is yet to receive a renderer transform update. This property is mostly used internally by the physics systems, but is exposed for the use of plugins.

func (*Rope) SetGameA

func (self *Rope) SetGameA(member *Game)

SetGameA A reference to the currently running Game.

func (*Rope) SetHeightA

func (self *Rope) SetHeightA(member int)

SetHeightA The height of the displayObjectContainer, setting this will actually modify the scale to achieve the value set

func (*Rope) SetIgnoreChildInputA

func (self *Rope) SetIgnoreChildInputA(member bool)

SetIgnoreChildInputA If `ignoreChildInput` is `false` it will allow this objects _children_ to be considered as valid for Input events.

If this property is `true` then the children will _not_ be considered as valid for Input events.

Note that this property isn't recursive: only immediate children are influenced, it doesn't scan further down.

func (*Rope) SetInCameraA

func (self *Rope) SetInCameraA(member bool)

SetInCameraA Checks if the Game Objects bounds intersect with the Game Camera bounds. Returns `true` if they do, otherwise `false` if fully outside of the Cameras bounds.

func (*Rope) SetInWorldA

func (self *Rope) SetInWorldA(member bool)

SetInWorldA Checks if the Game Objects bounds are within, or intersect at any point with the Game World bounds.

func (*Rope) SetKeyA

func (self *Rope) SetKeyA(member interface{})

SetKeyA The key of the image or texture used by this Game Object during rendering. If it is a string it's the string used to retrieve the texture from the Phaser Image Cache. It can also be an instance of a RenderTexture, BitmapData, Video or PIXI.Texture. If a Game Object is created without a key it is automatically assigned the key `__default` which is a 32x32 transparent PNG stored within the Cache. If a Game Object is given a key which doesn't exist in the Image Cache it is re-assigned the key `__missing` which is a 32x32 PNG of a green box with a line through it.

func (*Rope) SetLeftA

func (self *Rope) SetLeftA(member int)

SetLeftA The left coordinate of the Game Object. This is the same as `x - offsetX`.

func (*Rope) SetLifespanA

func (self *Rope) SetLifespanA(member int)

SetLifespanA The lifespan allows you to give a Game Object a lifespan in milliseconds.

Once the Game Object is 'born' you can set this to a positive value.

It is automatically decremented by the millisecond equivalent of `game.time.physicsElapsed` each frame. When it reaches zero it will call the `kill` method.

Very handy for particles, bullets, collectibles, or any other short-lived entity.

func (*Rope) SetNameA

func (self *Rope) SetNameA(member string)

SetNameA A user defined name given to this Game Object. This value isn't ever used internally by Phaser, it is meant as a game level property.

func (*Rope) SetOffsetXA

func (self *Rope) SetOffsetXA(member int)

SetOffsetXA The amount the Game Object is visually offset from its x coordinate. This is the same as `width * anchor.x`. It will only be > 0 if anchor.x is not equal to zero.

func (*Rope) SetOffsetYA

func (self *Rope) SetOffsetYA(member int)

SetOffsetYA The amount the Game Object is visually offset from its y coordinate. This is the same as `height * anchor.y`. It will only be > 0 if anchor.y is not equal to zero.

func (*Rope) SetOutOfBoundsKillA

func (self *Rope) SetOutOfBoundsKillA(member bool)

SetOutOfBoundsKillA If this and the `checkWorldBounds` property are both set to `true` then the `kill` method is called as soon as `inWorld` returns false.

func (*Rope) SetOutOfCameraBoundsKillA

func (self *Rope) SetOutOfCameraBoundsKillA(member bool)

SetOutOfCameraBoundsKillA If this and the `autoCull` property are both set to `true`, then the `kill` method is called as soon as the Game Object leaves the camera bounds.

func (*Rope) SetPendingDestroyA

func (self *Rope) SetPendingDestroyA(member bool)

SetPendingDestroyA A Game Object is that is pendingDestroy is flagged to have its destroy method called on the next logic update. You can set it directly to allow you to flag an object to be destroyed on its next update.

This is extremely useful if you wish to destroy an object from within one of its own callbacks such as with Buttons or other Input events.

func (*Rope) SetPreviousPositionA

func (self *Rope) SetPreviousPositionA(member *Point)

SetPreviousPositionA The position the Game Object was located in the previous frame.

func (*Rope) SetPreviousRotationA

func (self *Rope) SetPreviousRotationA(member int)

SetPreviousRotationA The rotation the Game Object was in set to in the previous frame. Value is in radians.

func (*Rope) SetRenderOrderIDA

func (self *Rope) SetRenderOrderIDA(member int)

SetRenderOrderIDA The render order ID is used internally by the renderer and Input Manager and should not be modified. This property is mostly used internally by the renderers, but is exposed for the use of plugins.

func (*Rope) SetRightA

func (self *Rope) SetRightA(member int)

SetRightA The right coordinate of the Game Object. This is the same as `x + width - offsetX`.

func (*Rope) SetScaleMaxA

func (self *Rope) SetScaleMaxA(member *Point)

SetScaleMaxA The maximum scale this Game Object will scale up to.

It allows you to prevent a parent from scaling this Game Object higher than the given value.

Set it to `null` to remove the limit.

func (*Rope) SetScaleMinA

func (self *Rope) SetScaleMinA(member *Point)

SetScaleMinA The minimum scale this Game Object will scale down to.

It allows you to prevent a parent from scaling this Game Object lower than the given value.

Set it to `null` to remove the limit.

func (*Rope) SetScaleMinMax

func (self *Rope) SetScaleMinMax(minX interface{}, minY interface{}, maxX interface{}, maxY interface{})

SetScaleMinMax Sets the scaleMin and scaleMax values. These values are used to limit how far this Game Object will scale based on its parent.

For example if this Game Object has a `minScale` value of 1 and its parent has a `scale` value of 0.5, the 0.5 will be ignored and the scale value of 1 will be used, as the parents scale is lower than the minimum scale this Game Object should adhere to.

By setting these values you can carefully control how Game Objects deal with responsive scaling.

If only one parameter is given then that value will be used for both scaleMin and scaleMax: `setScaleMinMax(1)` = scaleMin.x, scaleMin.y, scaleMax.x and scaleMax.y all = 1

If only two parameters are given the first is set as scaleMin.x and y and the second as scaleMax.x and y: `setScaleMinMax(0.5, 2)` = scaleMin.x and y = 0.5 and scaleMax.x and y = 2

If you wish to set `scaleMin` with different values for x and y then either modify Game Object.scaleMin directly, or pass `null` for the `maxX` and `maxY` parameters.

Call `setScaleMinMax(null)` to clear all previously set values.

func (*Rope) SetScaleMinMaxI

func (self *Rope) SetScaleMinMaxI(args ...interface{})

SetScaleMinMaxI Sets the scaleMin and scaleMax values. These values are used to limit how far this Game Object will scale based on its parent.

For example if this Game Object has a `minScale` value of 1 and its parent has a `scale` value of 0.5, the 0.5 will be ignored and the scale value of 1 will be used, as the parents scale is lower than the minimum scale this Game Object should adhere to.

By setting these values you can carefully control how Game Objects deal with responsive scaling.

If only one parameter is given then that value will be used for both scaleMin and scaleMax: `setScaleMinMax(1)` = scaleMin.x, scaleMin.y, scaleMax.x and scaleMax.y all = 1

If only two parameters are given the first is set as scaleMin.x and y and the second as scaleMax.x and y: `setScaleMinMax(0.5, 2)` = scaleMin.x and y = 0.5 and scaleMax.x and y = 2

If you wish to set `scaleMin` with different values for x and y then either modify Game Object.scaleMin directly, or pass `null` for the `maxX` and `maxY` parameters.

Call `setScaleMinMax(null)` to clear all previously set values.

func (*Rope) SetSegmentsA

func (self *Rope) SetSegmentsA(member interface{})

SetSegmentsA The segments that make up the rope body as an array of Phaser.Rectangles

func (*Rope) SetSmoothedA

func (self *Rope) SetSmoothedA(member bool)

SetSmoothedA Enable or disable texture smoothing for this Game Object.

It only takes effect if the Game Object is using an image based texture.

Smoothing is enabled by default.

func (*Rope) SetTextureA

func (self *Rope) SetTextureA(member *Texture)

SetTextureA The texture of the strip

func (*Rope) SetTopA

func (self *Rope) SetTopA(member int)

SetTopA The y coordinate of the Game Object. This is the same as `y - offsetY`.

func (*Rope) SetTransformCallbackA

func (self *Rope) SetTransformCallbackA(member interface{})

SetTransformCallbackA The callback that will apply any scale limiting to the worldTransform.

func (*Rope) SetTransformCallbackContextA

func (self *Rope) SetTransformCallbackContextA(member interface{})

SetTransformCallbackContextA The context under which `transformCallback` is called.

func (*Rope) SetTypeA

func (self *Rope) SetTypeA(member int)

SetTypeA The const type of this object.

func (*Rope) SetUpdateAnimationA

func (self *Rope) SetUpdateAnimationA(member interface{})

SetUpdateAnimationA A Rope will call its updateAnimation function on each update loop if it has one. Set to a function if you'd like the rope to animate during the update phase. Set to false or null to remove it.

func (*Rope) SetWidthA

func (self *Rope) SetWidthA(member int)

SetWidthA The width of the displayObjectContainer, setting this will actually modify the scale to achieve the value set

func (*Rope) SetWorldA

func (self *Rope) SetWorldA(member *Point)

SetWorldA The world coordinates of this Game Object in pixels. Depending on where in the display list this Game Object is placed this value can differ from `position`, which contains the x/y coordinates relative to the Game Objects parent.

func (*Rope) SetXA

func (self *Rope) SetXA(member int)

SetXA The position of the Game Object on the x axis relative to the local coordinates of the parent.

func (*Rope) SetYA

func (self *Rope) SetYA(member int)

SetYA The position of the Game Object on the y axis relative to the local coordinates of the parent.

func (*Rope) SetZA

func (self *Rope) SetZA(member int)

SetZA The z depth of this Game Object within its parent Group. No two objects in a Group can have the same z value. This value is adjusted automatically whenever the Group hierarchy changes. If you wish to re-order the layering of a Game Object then see methods like Group.moveUp or Group.bringToTop.

func (*Rope) Smoothed

func (self *Rope) Smoothed() bool

Smoothed Enable or disable texture smoothing for this Game Object.

It only takes effect if the Game Object is using an image based texture.

Smoothing is enabled by default.

func (*Rope) SwapChildren

func (self *Rope) SwapChildren(child *DisplayObject, child2 *DisplayObject)

SwapChildren Swaps the position of 2 Display Objects within this container.

func (*Rope) SwapChildrenI

func (self *Rope) SwapChildrenI(args ...interface{})

SwapChildrenI Swaps the position of 2 Display Objects within this container.

func (*Rope) Texture

func (self *Rope) Texture() *Texture

Texture The texture of the strip

func (*Rope) Top

func (self *Rope) Top() int

Top The y coordinate of the Game Object. This is the same as `y - offsetY`.

func (*Rope) TransformCallback

func (self *Rope) TransformCallback() interface{}

TransformCallback The callback that will apply any scale limiting to the worldTransform.

func (*Rope) TransformCallbackContext

func (self *Rope) TransformCallbackContext() interface{}

TransformCallbackContext The context under which `transformCallback` is called.

func (*Rope) Type

func (self *Rope) Type() int

Type The const type of this object.

func (*Rope) Update

func (self *Rope) Update()

Update Override and use this function in your own custom objects to handle any update requirements you may have.

func (*Rope) UpdateAnimation

func (self *Rope) UpdateAnimation() interface{}

UpdateAnimation A Rope will call its updateAnimation function on each update loop if it has one. Set to a function if you'd like the rope to animate during the update phase. Set to false or null to remove it.

func (*Rope) UpdateCrop

func (self *Rope) UpdateCrop()

UpdateCrop If you have set a crop rectangle on this Game Object via `crop` and since modified the `cropRect` property, or the rectangle it references, then you need to update the crop frame by calling this method.

func (*Rope) UpdateCropI

func (self *Rope) UpdateCropI(args ...interface{})

UpdateCropI If you have set a crop rectangle on this Game Object via `crop` and since modified the `cropRect` property, or the rectangle it references, then you need to update the crop frame by calling this method.

func (*Rope) UpdateI

func (self *Rope) UpdateI(args ...interface{})

UpdateI Override and use this function in your own custom objects to handle any update requirements you may have.

func (*Rope) Width

func (self *Rope) Width() int

Width The width of the displayObjectContainer, setting this will actually modify the scale to achieve the value set

func (*Rope) World

func (self *Rope) World() *Point

World The world coordinates of this Game Object in pixels. Depending on where in the display list this Game Object is placed this value can differ from `position`, which contains the x/y coordinates relative to the Game Objects parent.

func (*Rope) X

func (self *Rope) X() int

X The position of the Game Object on the x axis relative to the local coordinates of the parent.

func (*Rope) Y

func (self *Rope) Y() int

Y The position of the Game Object on the y axis relative to the local coordinates of the parent.

func (*Rope) Z

func (self *Rope) Z() int

Z The z depth of this Game Object within its parent Group. No two objects in a Group can have the same z value. This value is adjusted automatically whenever the Group hierarchy changes. If you wish to re-order the layering of a Game Object then see methods like Group.moveUp or Group.bringToTop.

type RoundedRectangle

type RoundedRectangle struct {
	*js.Object
}

RoundedRectangle The Rounded Rectangle object is an area defined by its position and has nice rounded corners, as indicated by its top-left corner point (x, y) and by its width and its height.

func NewRoundedRectangle

func NewRoundedRectangle() *RoundedRectangle

NewRoundedRectangle The Rounded Rectangle object is an area defined by its position and has nice rounded corners, as indicated by its top-left corner point (x, y) and by its width and its height.

func NewRoundedRectangle1O

func NewRoundedRectangle1O(x int) *RoundedRectangle

NewRoundedRectangle1O The Rounded Rectangle object is an area defined by its position and has nice rounded corners, as indicated by its top-left corner point (x, y) and by its width and its height.

func NewRoundedRectangle2O

func NewRoundedRectangle2O(x int, y int) *RoundedRectangle

NewRoundedRectangle2O The Rounded Rectangle object is an area defined by its position and has nice rounded corners, as indicated by its top-left corner point (x, y) and by its width and its height.

func NewRoundedRectangle3O

func NewRoundedRectangle3O(x int, y int, width int) *RoundedRectangle

NewRoundedRectangle3O The Rounded Rectangle object is an area defined by its position and has nice rounded corners, as indicated by its top-left corner point (x, y) and by its width and its height.

func NewRoundedRectangle4O

func NewRoundedRectangle4O(x int, y int, width int, height int) *RoundedRectangle

NewRoundedRectangle4O The Rounded Rectangle object is an area defined by its position and has nice rounded corners, as indicated by its top-left corner point (x, y) and by its width and its height.

func NewRoundedRectangle5O

func NewRoundedRectangle5O(x int, y int, width int, height int, radius int) *RoundedRectangle

NewRoundedRectangle5O The Rounded Rectangle object is an area defined by its position and has nice rounded corners, as indicated by its top-left corner point (x, y) and by its width and its height.

func NewRoundedRectangleI

func NewRoundedRectangleI(args ...interface{}) *RoundedRectangle

NewRoundedRectangleI The Rounded Rectangle object is an area defined by its position and has nice rounded corners, as indicated by its top-left corner point (x, y) and by its width and its height.

func ToRoundedRectangle

func ToRoundedRectangle(jsStruct interface{}) *RoundedRectangle

RoundedRectangle Binding conversion method to RoundedRectangle point

func (*RoundedRectangle) Clone

func (self *RoundedRectangle) Clone() *RoundedRectangle

Clone Returns a new RoundedRectangle object with the same values for the x, y, width, height and radius properties as this RoundedRectangle object.

func (*RoundedRectangle) CloneI

func (self *RoundedRectangle) CloneI(args ...interface{}) *RoundedRectangle

CloneI Returns a new RoundedRectangle object with the same values for the x, y, width, height and radius properties as this RoundedRectangle object.

func (*RoundedRectangle) Contains

func (self *RoundedRectangle) Contains(x int, y int) bool

Contains Determines whether the specified coordinates are contained within the region defined by this Rounded Rectangle object.

func (*RoundedRectangle) ContainsI

func (self *RoundedRectangle) ContainsI(args ...interface{}) bool

ContainsI Determines whether the specified coordinates are contained within the region defined by this Rounded Rectangle object.

func (*RoundedRectangle) Height

func (self *RoundedRectangle) Height() int

Height The height of the Rectangle. This value should never be set to a negative.

func (*RoundedRectangle) Radius

func (self *RoundedRectangle) Radius() int

Radius The radius of the rounded corners.

func (*RoundedRectangle) SetHeightA

func (self *RoundedRectangle) SetHeightA(member int)

SetHeightA The height of the Rectangle. This value should never be set to a negative.

func (*RoundedRectangle) SetRadiusA

func (self *RoundedRectangle) SetRadiusA(member int)

SetRadiusA The radius of the rounded corners.

func (*RoundedRectangle) SetTypeA

func (self *RoundedRectangle) SetTypeA(member int)

SetTypeA The const type of this object.

func (*RoundedRectangle) SetWidthA

func (self *RoundedRectangle) SetWidthA(member int)

SetWidthA The width of the Rectangle. This value should never be set to a negative.

func (*RoundedRectangle) SetXA

func (self *RoundedRectangle) SetXA(member int)

SetXA The x coordinate of the top-left corner of the Rectangle.

func (*RoundedRectangle) SetYA

func (self *RoundedRectangle) SetYA(member int)

SetYA The y coordinate of the top-left corner of the Rectangle.

func (*RoundedRectangle) Type

func (self *RoundedRectangle) Type() int

Type The const type of this object.

func (*RoundedRectangle) Width

func (self *RoundedRectangle) Width() int

Width The width of the Rectangle. This value should never be set to a negative.

func (*RoundedRectangle) X

func (self *RoundedRectangle) X() int

X The x coordinate of the top-left corner of the Rectangle.

func (*RoundedRectangle) Y

func (self *RoundedRectangle) Y() int

Y The y coordinate of the top-left corner of the Rectangle.

type ScaleManager

type ScaleManager struct {
	*js.Object
}

ScaleManager The ScaleManager object handles the the scaling, resizing, and alignment of the Game size and the game Display canvas.

The Game size is the logical size of the game; the Display canvas has size as an HTML element.

The calculations of these are heavily influenced by the bounding Parent size which is the computed dimensions of the Display canvas's Parent container/element - the _effective CSS rules of the canvas's Parent element play an important role_ in the operation of the ScaleManager.

The Display canvas - or Game size, depending {@link Phaser.ScaleManager#scaleMode scaleMode} - is updated to best utilize the Parent size. When in Fullscreen mode or with {@link Phaser.ScaleManager#parentIsWindow parentIsWindow} the Parent size is that of the visual viewport (see {@link Phaser.ScaleManager#getParentBounds getParentBounds}).

Parent and Display canvas containment guidelines:

  • Style the Parent element (of the game canvas) to control the Parent size and thus the Display canvas's size and layout.

- The Parent element's CSS styles should _effectively_ apply maximum (and minimum) bounding behavior.

  • The Parent element should _not_ apply a padding as this is not accounted for. If a padding is required apply it to the Parent's parent or apply a margin to the Parent. If you need to add a border, margin or any other CSS around your game container, then use a parent element and apply the CSS to this instead, otherwise you'll be constantly resizing the shape of the game container.
  • The Display canvas layout CSS styles (i.e. margins, size) should not be altered/specified as they may be updated by the ScaleManager.

func NewScaleManager

func NewScaleManager(game *Game, width interface{}, height interface{}) *ScaleManager

NewScaleManager Create a new ScaleManager object - this is done automatically by {@link Phaser.Game}

The `width` and `height` constructor parameters can either be a number which represents pixels or a string that represents a percentage: e.g. `800` (for 800 pixels) or `"80%"` for 80%.

func NewScaleManagerI

func NewScaleManagerI(args ...interface{}) *ScaleManager

NewScaleManagerI Create a new ScaleManager object - this is done automatically by {@link Phaser.Game}

The `width` and `height` constructor parameters can either be a number which represents pixels or a string that represents a percentage: e.g. `800` (for 800 pixels) or `"80%"` for 80%.

func ToScaleManager

func ToScaleManager(jsStruct interface{}) *ScaleManager

ScaleManager Binding conversion method to ScaleManager point

func (*ScaleManager) AlignCanvas

func (self *ScaleManager) AlignCanvas(horizontal bool, vertical bool)

AlignCanvas Update the canvas position/margins - for alignment within the parent container.

The canvas margins _must_ be reset/cleared prior to invoking this.

func (*ScaleManager) AlignCanvasI

func (self *ScaleManager) AlignCanvasI(args ...interface{})

AlignCanvasI Update the canvas position/margins - for alignment within the parent container.

The canvas margins _must_ be reset/cleared prior to invoking this.

func (*ScaleManager) AspectRatio

func (self *ScaleManager) AspectRatio() int

AspectRatio The aspect ratio of the scaled Display canvas.

func (*ScaleManager) Boot

func (self *ScaleManager) Boot()

Boot Start the ScaleManager.

func (*ScaleManager) BootI

func (self *ScaleManager) BootI(args ...interface{})

BootI Start the ScaleManager.

func (*ScaleManager) BoundingParent

func (self *ScaleManager) BoundingParent() DOMElement

BoundingParent The DOM element that is considered the Parent bounding element, if any.

This `null` if {@link Phaser.ScaleManager#parentIsWindow parentIsWindow} is true or if fullscreen mode is entered and {@link Phaser.ScaleManager#fullScreenTarget fullScreenTarget} is specified. It will also be null if there is no game canvas or if the game canvas has no parent.

func (*ScaleManager) Bounds

func (self *ScaleManager) Bounds() *Rectangle

Bounds The bounds of the scaled game. The x/y will match the offset of the canvas element and the width/height the scaled width and height.

func (*ScaleManager) ClassifyOrientation

func (self *ScaleManager) ClassifyOrientation(orientation string) string

ClassifyOrientation Classify the orientation, per `getScreenOrientation`.

func (*ScaleManager) ClassifyOrientationI

func (self *ScaleManager) ClassifyOrientationI(args ...interface{}) string

ClassifyOrientationI Classify the orientation, per `getScreenOrientation`.

func (*ScaleManager) CleanupCreatedTarget

func (self *ScaleManager) CleanupCreatedTarget()

CleanupCreatedTarget Cleans up the previous fullscreen target, if such was automatically created. This ensures the canvas is restored to its former parent, assuming the target didn't move.

func (*ScaleManager) CleanupCreatedTargetI

func (self *ScaleManager) CleanupCreatedTargetI(args ...interface{})

CleanupCreatedTargetI Cleans up the previous fullscreen target, if such was automatically created. This ensures the canvas is restored to its former parent, assuming the target didn't move.

func (*ScaleManager) Compatibility

func (self *ScaleManager) Compatibility() interface{}

Compatibility Various compatibility settings. A value of "(auto)" indicates the setting is configured based on device and runtime information.

A {@link Phaser.ScaleManager#refresh refresh} may need to be performed after making changes.

func (*ScaleManager) CreateFullScreenTarget

func (self *ScaleManager) CreateFullScreenTarget()

CreateFullScreenTarget Creates a fullscreen target. This is called automatically as as needed when entering fullscreen mode and the resulting element is supplied to {@link Phaser.ScaleManager#onFullScreenInit onFullScreenInit}.

Use {@link Phaser.ScaleManager#onFullScreenInit onFullScreenInit} to customize the created object.

func (*ScaleManager) CreateFullScreenTargetI

func (self *ScaleManager) CreateFullScreenTargetI(args ...interface{})

CreateFullScreenTargetI Creates a fullscreen target. This is called automatically as as needed when entering fullscreen mode and the resulting element is supplied to {@link Phaser.ScaleManager#onFullScreenInit onFullScreenInit}.

Use {@link Phaser.ScaleManager#onFullScreenInit onFullScreenInit} to customize the created object.

func (*ScaleManager) CurrentScaleMode

func (self *ScaleManager) CurrentScaleMode() int

CurrentScaleMode Returns the current scale mode - for normal or fullscreen operation.

See {@link Phaser.ScaleManager#scaleMode scaleMode} for the different modes allowed.

func (*ScaleManager) Destroy

func (self *ScaleManager) Destroy()

Destroy Destroys the ScaleManager and removes any event listeners. This should probably only be called when the game is destroyed.

func (*ScaleManager) DestroyI

func (self *ScaleManager) DestroyI(args ...interface{})

DestroyI Destroys the ScaleManager and removes any event listeners. This should probably only be called when the game is destroyed.

func (*ScaleManager) Dom

func (self *ScaleManager) Dom() *DOM

Dom Provides access to some cross-device DOM functions.

func (*ScaleManager) EXACT_FIT

func (self *ScaleManager) EXACT_FIT() int

EXACT_FIT A scale mode that stretches content to fill all available space - see {@link Phaser.ScaleManager#scaleMode scaleMode}.

func (*ScaleManager) EnterIncorrectOrientation

func (self *ScaleManager) EnterIncorrectOrientation() *Signal

EnterIncorrectOrientation This signal is dispatched when the browser enters an incorrect orientation, as defined by {@link Phaser.ScaleManager#forceOrientation forceOrientation}.

This is signaled from `preUpdate` (or `pauseUpdate`) _even when_ the game is paused.

func (*ScaleManager) ForceLandscape

func (self *ScaleManager) ForceLandscape() bool

ForceLandscape If true, the game should only run in a landscape orientation. Change with {@link Phaser.ScaleManager#forceOrientation forceOrientation}.

func (*ScaleManager) ForceOrientation

func (self *ScaleManager) ForceOrientation(forceLandscape bool)

ForceOrientation Force the game to run in only one orientation.

This enables generation of incorrect orientation signals and affects resizing but does not otherwise rotate or lock the orientation.

Orientation checks are performed via the Screen Orientation API, if available in browser. This means it will check your monitor orientation on desktop, or your device orientation on mobile, rather than comparing actual game dimensions. If you need to check the viewport dimensions instead and bypass the Screen Orientation API then set: `ScaleManager.compatibility.orientationFallback = 'viewport'`

func (*ScaleManager) ForceOrientation1O

func (self *ScaleManager) ForceOrientation1O(forceLandscape bool, forcePortrait bool)

ForceOrientation1O Force the game to run in only one orientation.

This enables generation of incorrect orientation signals and affects resizing but does not otherwise rotate or lock the orientation.

Orientation checks are performed via the Screen Orientation API, if available in browser. This means it will check your monitor orientation on desktop, or your device orientation on mobile, rather than comparing actual game dimensions. If you need to check the viewport dimensions instead and bypass the Screen Orientation API then set: `ScaleManager.compatibility.orientationFallback = 'viewport'`

func (*ScaleManager) ForceOrientationI

func (self *ScaleManager) ForceOrientationI(args ...interface{})

ForceOrientationI Force the game to run in only one orientation.

This enables generation of incorrect orientation signals and affects resizing but does not otherwise rotate or lock the orientation.

Orientation checks are performed via the Screen Orientation API, if available in browser. This means it will check your monitor orientation on desktop, or your device orientation on mobile, rather than comparing actual game dimensions. If you need to check the viewport dimensions instead and bypass the Screen Orientation API then set: `ScaleManager.compatibility.orientationFallback = 'viewport'`

func (*ScaleManager) ForcePortrait

func (self *ScaleManager) ForcePortrait() bool

ForcePortrait If true, the game should only run in a portrait Change with {@link Phaser.ScaleManager#forceOrientation forceOrientation}.

func (*ScaleManager) FullScreenChange

func (self *ScaleManager) FullScreenChange()

FullScreenChange Called automatically when the browser enters of leaves fullscreen mode.

func (*ScaleManager) FullScreenChange1O

func (self *ScaleManager) FullScreenChange1O(event *Event)

FullScreenChange1O Called automatically when the browser enters of leaves fullscreen mode.

func (*ScaleManager) FullScreenChangeI

func (self *ScaleManager) FullScreenChangeI(args ...interface{})

FullScreenChangeI Called automatically when the browser enters of leaves fullscreen mode.

func (*ScaleManager) FullScreenError

func (self *ScaleManager) FullScreenError()

FullScreenError Called automatically when the browser fullscreen request fails; or called when a fullscreen request is made on a device for which it is not supported.

func (*ScaleManager) FullScreenError1O

func (self *ScaleManager) FullScreenError1O(event *Event)

FullScreenError1O Called automatically when the browser fullscreen request fails; or called when a fullscreen request is made on a device for which it is not supported.

func (*ScaleManager) FullScreenErrorI

func (self *ScaleManager) FullScreenErrorI(args ...interface{})

FullScreenErrorI Called automatically when the browser fullscreen request fails; or called when a fullscreen request is made on a device for which it is not supported.

func (*ScaleManager) FullScreenScaleMode

func (self *ScaleManager) FullScreenScaleMode() int

FullScreenScaleMode The scaling method used by the ScaleManager when in fullscreen.

See {@link Phaser.ScaleManager#scaleMode scaleMode} for the different modes allowed.

func (*ScaleManager) FullScreenTarget

func (self *ScaleManager) FullScreenTarget() DOMElement

FullScreenTarget If specified, this is the DOM element on which the Fullscreen API enter request will be invoked. The target element must have the correct CSS styling and contain the Display canvas.

The elements style will be modified (ie. the width and height might be set to 100%) but it will not be added to, removed from, or repositioned within the DOM. An attempt is made to restore relevant style changes when fullscreen mode is left.

For pre-2.2.0 behavior set `game.scale.fullScreenTarget = game.canvas`.

func (*ScaleManager) Game

func (self *ScaleManager) Game() *Game

Game A reference to the currently running game.

func (*ScaleManager) GetParentBounds

func (self *ScaleManager) GetParentBounds() *Rectangle

GetParentBounds Returns the computed Parent size/bounds that the Display canvas is allowed/expected to fill.

If in fullscreen mode or without parent (see {@link Phaser.ScaleManager#parentIsWindow parentIsWindow}), this will be the bounds of the visual viewport itself.

This function takes the {@link Phaser.ScaleManager#windowConstraints windowConstraints} into consideration - if the parent is partially outside the viewport then this function may return a smaller than expected size.

Values are rounded to the nearest pixel.

func (*ScaleManager) GetParentBounds1O

func (self *ScaleManager) GetParentBounds1O(target *Rectangle) *Rectangle

GetParentBounds1O Returns the computed Parent size/bounds that the Display canvas is allowed/expected to fill.

If in fullscreen mode or without parent (see {@link Phaser.ScaleManager#parentIsWindow parentIsWindow}), this will be the bounds of the visual viewport itself.

This function takes the {@link Phaser.ScaleManager#windowConstraints windowConstraints} into consideration - if the parent is partially outside the viewport then this function may return a smaller than expected size.

Values are rounded to the nearest pixel.

func (*ScaleManager) GetParentBoundsI

func (self *ScaleManager) GetParentBoundsI(args ...interface{}) *Rectangle

GetParentBoundsI Returns the computed Parent size/bounds that the Display canvas is allowed/expected to fill.

If in fullscreen mode or without parent (see {@link Phaser.ScaleManager#parentIsWindow parentIsWindow}), this will be the bounds of the visual viewport itself.

This function takes the {@link Phaser.ScaleManager#windowConstraints windowConstraints} into consideration - if the parent is partially outside the viewport then this function may return a smaller than expected size.

Values are rounded to the nearest pixel.

func (*ScaleManager) Grid

func (self *ScaleManager) Grid() *FlexGrid

Grid _EXPERIMENTAL:_ A responsive grid on which you can align game objects.

func (*ScaleManager) HasPhaserSetFullScreen

func (self *ScaleManager) HasPhaserSetFullScreen() bool

HasPhaserSetFullScreen This boolean provides you with a way to determine if the browser is in Full Screen mode (via the Full Screen API), and Phaser was the one responsible for activating it.

It's possible that ScaleManager.isFullScreen returns `true` even if Phaser wasn't the one that made the browser go full-screen, so this flag lets you determine that.

func (*ScaleManager) Height

func (self *ScaleManager) Height() int

Height Target height (in pixels) of the Display canvas.

func (*ScaleManager) IncorrectOrientation

func (self *ScaleManager) IncorrectOrientation() bool

IncorrectOrientation True if {@link Phaser.ScaleManager#forceLandscape forceLandscape} or {@link Phaser.ScaleManager#forcePortrait forcePortrait} are set and do not agree with the browser orientation.

This value is not updated immediately.

func (*ScaleManager) IsFullScreen

func (self *ScaleManager) IsFullScreen() bool

IsFullScreen Returns true if the browser is in fullscreen mode, otherwise false.

func (*ScaleManager) IsGameLandscape

func (self *ScaleManager) IsGameLandscape() bool

IsGameLandscape Returns true if the game dimensions are landscape (width > height). This is especially useful to check when using the RESIZE scale mode but wanting to maintain game orientation on desktop browsers, where typically the screen orientation will always be landscape regardless of the browser viewport.

func (*ScaleManager) IsGamePortrait

func (self *ScaleManager) IsGamePortrait() bool

IsGamePortrait Returns true if the game dimensions are portrait (height > width). This is especially useful to check when using the RESIZE scale mode but wanting to maintain game orientation on desktop browsers, where typically the screen orientation will always be landscape regardless of the browser viewport.

func (*ScaleManager) IsLandscape

func (self *ScaleManager) IsLandscape() bool

IsLandscape Returns true if the screen orientation is in landscape mode.

func (*ScaleManager) IsPortrait

func (self *ScaleManager) IsPortrait() bool

IsPortrait Returns true if the screen orientation is in portrait mode.

func (*ScaleManager) LeaveIncorrectOrientation

func (self *ScaleManager) LeaveIncorrectOrientation() *Signal

LeaveIncorrectOrientation This signal is dispatched when the browser leaves an incorrect orientation, as defined by {@link Phaser.ScaleManager#forceOrientation forceOrientation}.

This is signaled from `preUpdate` (or `pauseUpdate`) _even when_ the game is paused.

func (*ScaleManager) Margin

func (self *ScaleManager) Margin() interface{}

Margin The Display canvas is aligned by adjusting the margins; the last margins are stored here.

func (*ScaleManager) MaxHeight

func (self *ScaleManager) MaxHeight() int

MaxHeight Maximum height the canvas should be scaled to (in pixels). If null it will scale to whatever height the browser can handle. Change with {@link Phaser.ScaleManager#setMinMax setMinMax}.

func (*ScaleManager) MaxWidth

func (self *ScaleManager) MaxWidth() int

MaxWidth Maximum width the canvas should be scaled to (in pixels). If null it will scale to whatever width the browser can handle. Change with {@link Phaser.ScaleManager#setMinMax setMinMax}.

func (*ScaleManager) MinHeight

func (self *ScaleManager) MinHeight() int

MinHeight Minimum height the canvas should be scaled to (in pixels). Change with {@link Phaser.ScaleManager#setMinMax setMinMax}.

func (*ScaleManager) MinWidth

func (self *ScaleManager) MinWidth() int

MinWidth Minimum width the canvas should be scaled to (in pixels). Change with {@link Phaser.ScaleManager#setMinMax setMinMax}.

func (*ScaleManager) NO_SCALE

func (self *ScaleManager) NO_SCALE() int

NO_SCALE A scale mode that prevents any scaling - see {@link Phaser.ScaleManager#scaleMode scaleMode}.

func (*ScaleManager) Offset

func (self *ScaleManager) Offset() *Point

Offset The offset coordinates of the Display canvas from the top-left of the browser window. The is used internally by Phaser.Pointer (for Input) and possibly other types.

func (*ScaleManager) OnFullScreenChange

func (self *ScaleManager) OnFullScreenChange() *Signal

OnFullScreenChange This signal is dispatched when the browser enters or leaves fullscreen mode, if supported.

The signal is supplied with a single argument: `scale` (the ScaleManager). Use `scale.isFullScreen` to determine if currently running in Fullscreen mode.

func (*ScaleManager) OnFullScreenError

func (self *ScaleManager) OnFullScreenError() *Signal

OnFullScreenError This signal is dispatched when the browser fails to enter fullscreen mode; or if the device does not support fullscreen mode and `startFullScreen` is invoked.

The signal is supplied with a single argument: `scale` (the ScaleManager).

func (*ScaleManager) OnFullScreenInit

func (self *ScaleManager) OnFullScreenInit() *Signal

OnFullScreenInit This signal is dispatched when fullscreen mode is ready to be initialized but before the fullscreen request.

The signal is passed two arguments: `scale` (the ScaleManager), and an object in the form `{targetElement: DOMElement}`.

The `targetElement` is the {@link Phaser.ScaleManager#fullScreenTarget fullScreenTarget} element, if such is assigned, or a new element created by {@link Phaser.ScaleManager#createFullScreenTarget createFullScreenTarget}.

Custom CSS styling or resets can be applied to `targetElement` as required.

If `targetElement` is _not_ the same element as {@link Phaser.ScaleManager#fullScreenTarget fullScreenTarget}:

  • After initialization the Display canvas is moved onto the `targetElement` for the duration of the fullscreen mode, and restored to it's original DOM location when fullscreen is exited.
  • The `targetElement` is moved/re-parented within the DOM and may have its CSS styles updated.

The behavior of a pre-assigned target element is covered in {@link Phaser.ScaleManager#fullScreenTarget fullScreenTarget}.

func (*ScaleManager) OnOrientationChange

func (self *ScaleManager) OnOrientationChange() *Signal

OnOrientationChange This signal is dispatched when the orientation changes _or_ the validity of the current orientation changes.

The signal is supplied with the following arguments: - `scale` - the ScaleManager object - `prevOrientation`, a string - The previous orientation as per {@link Phaser.ScaleManager#screenOrientation screenOrientation}. - `wasIncorrect`, a boolean - True if the previous orientation was last determined to be incorrect.

Access the current orientation and validity with `scale.screenOrientation` and `scale.incorrectOrientation`. Thus the following tests can be done:

// The orientation itself changed:
scale.screenOrientation !== prevOrientation
// The orientation just became incorrect:
scale.incorrectOrientation && !wasIncorrect

It is possible that this signal is triggered after {@link Phaser.ScaleManager#forceOrientation forceOrientation} so the orientation correctness changes even if the orientation itself does not change.

This is signaled from `preUpdate` (or `pauseUpdate`) _even when_ the game is paused.

func (*ScaleManager) OnSizeChange

func (self *ScaleManager) OnSizeChange() *Signal

OnSizeChange This signal is dispatched when the size of the Display canvas changes _or_ the size of the Game changes. When invoked this is done _after_ the Canvas size/position have been updated.

This signal is _only_ called when a change occurs and a reflow may be required. For example, if the canvas does not change sizes because of CSS settings (such as min-width) then this signal will _not_ be triggered.

Use this to handle responsive game layout options.

This is signaled from `preUpdate` (or `pauseUpdate`) _even when_ the game is paused.

func (*ScaleManager) OrientationChange

func (self *ScaleManager) OrientationChange(event *Event)

OrientationChange window.orientationchange event handler.

func (*ScaleManager) OrientationChangeI

func (self *ScaleManager) OrientationChangeI(args ...interface{})

OrientationChangeI window.orientationchange event handler.

func (*ScaleManager) PageAlignHorizontally

func (self *ScaleManager) PageAlignHorizontally() bool

PageAlignHorizontally When enabled the Display canvas will be horizontally-aligned _in the Parent container_ (or {@link Phaser.ScaleManager#parentIsWindow window}).

To align horizontally across the page the Display canvas should be added directly to page; or the parent container should itself be horizontally aligned.

Horizontal alignment is not applicable with the {@link Phaser.ScaleManager.RESIZE RESIZE} scaling mode.

func (*ScaleManager) PageAlignVertically

func (self *ScaleManager) PageAlignVertically() bool

PageAlignVertically When enabled the Display canvas will be vertically-aligned _in the Parent container_ (or {@link Phaser.ScaleManager#parentIsWindow window}).

To align vertically the Parent element should have a _non-collapsible_ height, such that it will maintain a height _larger_ than the height of the contained Game canvas - the game canvas will then be scaled vertically _within_ the remaining available height dictated by the Parent element.

One way to prevent the parent from collapsing is to add an absolute "min-height" CSS property to the parent element. If specifying a relative "min-height/height" or adjusting margins, the Parent height must still be non-collapsible (see note).

_Note_: In version 2.2 the minimum document height is _not_ automatically set to the viewport/window height. To automatically update the minimum document height set {@link Phaser.ScaleManager#compatibility compatibility.forceMinimumDocumentHeight} to true.

Vertical alignment is not applicable with the {@link Phaser.ScaleManager.RESIZE RESIZE} scaling mode.

func (*ScaleManager) ParentIsWindow

func (self *ScaleManager) ParentIsWindow() bool

ParentIsWindow If the parent container of the Game canvas is the browser window itself (i.e. document.body), rather than another div, this should set to `true`.

The {@link Phaser.ScaleManager#parentNode parentNode} property is generally ignored while this is in effect.

func (*ScaleManager) ParentNode

func (self *ScaleManager) ParentNode() DOMElement

ParentNode The _original_ DOM element for the parent of the Display canvas. This may be different in fullscreen - see {@link Phaser.ScaleManager#createFullScreenTarget createFullScreenTarget}.

This should only be changed after moving the Game canvas to a different DOM parent.

func (*ScaleManager) ParentScaleFactor

func (self *ScaleManager) ParentScaleFactor() *Point

ParentScaleFactor The scale of the game in relation to its parent container.

func (*ScaleManager) ParseConfig

func (self *ScaleManager) ParseConfig(config interface{})

ParseConfig Load configuration settings.

func (*ScaleManager) ParseConfigI

func (self *ScaleManager) ParseConfigI(args ...interface{})

ParseConfigI Load configuration settings.

func (*ScaleManager) PauseUpdate

func (self *ScaleManager) PauseUpdate()

PauseUpdate Update method while paused.

func (*ScaleManager) PauseUpdateI

func (self *ScaleManager) PauseUpdateI(args ...interface{})

PauseUpdateI Update method while paused.

func (*ScaleManager) PreUpdate

func (self *ScaleManager) PreUpdate()

PreUpdate The ScaleManager.preUpdate is called automatically by the core Game loop.

func (*ScaleManager) PreUpdateI

func (self *ScaleManager) PreUpdateI(args ...interface{})

PreUpdateI The ScaleManager.preUpdate is called automatically by the core Game loop.

func (*ScaleManager) PrepScreenMode

func (self *ScaleManager) PrepScreenMode(enteringFullscreen bool)

PrepScreenMode Used to prepare/restore extra fullscreen mode settings. (This does move any elements within the DOM tree.)

func (*ScaleManager) PrepScreenModeI

func (self *ScaleManager) PrepScreenModeI(args ...interface{})

PrepScreenModeI Used to prepare/restore extra fullscreen mode settings. (This does move any elements within the DOM tree.)

func (*ScaleManager) QueueUpdate

func (self *ScaleManager) QueueUpdate(force bool)

QueueUpdate Queues/marks a size/bounds check as needing to occur (from `preUpdate`).

func (*ScaleManager) QueueUpdateI

func (self *ScaleManager) QueueUpdateI(args ...interface{})

QueueUpdateI Queues/marks a size/bounds check as needing to occur (from `preUpdate`).

func (*ScaleManager) RESIZE

func (self *ScaleManager) RESIZE() int

RESIZE A scale mode that causes the Game size to change - see {@link Phaser.ScaleManager#scaleMode scaleMode}.

func (*ScaleManager) ReflowCanvas

func (self *ScaleManager) ReflowCanvas()

ReflowCanvas Updates the Display canvas size.

The canvas margins may always be adjusted, even alignment is not in effect.

func (*ScaleManager) ReflowCanvasI

func (self *ScaleManager) ReflowCanvasI(args ...interface{})

ReflowCanvasI Updates the Display canvas size.

The canvas margins may always be adjusted, even alignment is not in effect.

func (*ScaleManager) ReflowGame

func (self *ScaleManager) ReflowGame()

ReflowGame Updates the Game state / size.

The canvas margins may always be adjusted, even if alignment is not in effect.

func (*ScaleManager) ReflowGameI

func (self *ScaleManager) ReflowGameI(args ...interface{})

ReflowGameI Updates the Game state / size.

The canvas margins may always be adjusted, even if alignment is not in effect.

func (*ScaleManager) Refresh

func (self *ScaleManager) Refresh()

Refresh The "refresh" methods informs the ScaleManager that a layout refresh is required.

The ScaleManager automatically queues a layout refresh (eg. updates the Game size or Display canvas layout) when the browser is resized, the orientation changes, or when there is a detected change of the Parent size. Refreshing is also done automatically when public properties, such as {@link Phaser.ScaleManager#scaleMode scaleMode}, are updated or state-changing methods are invoked.

The "refresh" method _may_ need to be used in a few (rare) situtations when

- a device change event is not correctly detected; or - the Parent size changes (and an immediate reflow is desired); or - the ScaleManager state is updated by non-standard means; or - certain {@link Phaser.ScaleManager#compatibility compatibility} properties are manually changed.

The queued layout refresh is not immediate but will run promptly in an upcoming `preRender`.

func (*ScaleManager) RefreshI

func (self *ScaleManager) RefreshI(args ...interface{})

RefreshI The "refresh" methods informs the ScaleManager that a layout refresh is required.

The ScaleManager automatically queues a layout refresh (eg. updates the Game size or Display canvas layout) when the browser is resized, the orientation changes, or when there is a detected change of the Parent size. Refreshing is also done automatically when public properties, such as {@link Phaser.ScaleManager#scaleMode scaleMode}, are updated or state-changing methods are invoked.

The "refresh" method _may_ need to be used in a few (rare) situtations when

- a device change event is not correctly detected; or - the Parent size changes (and an immediate reflow is desired); or - the ScaleManager state is updated by non-standard means; or - certain {@link Phaser.ScaleManager#compatibility compatibility} properties are manually changed.

The queued layout refresh is not immediate but will run promptly in an upcoming `preRender`.

func (*ScaleManager) Reset

func (self *ScaleManager) Reset()

Reset Reset internal data/state.

func (*ScaleManager) ResetCanvas

func (self *ScaleManager) ResetCanvas()

ResetCanvas "Reset" the Display canvas and set the specified width/height.

func (*ScaleManager) ResetCanvas1O

func (self *ScaleManager) ResetCanvas1O(cssWidth string)

ResetCanvas1O "Reset" the Display canvas and set the specified width/height.

func (*ScaleManager) ResetCanvas2O

func (self *ScaleManager) ResetCanvas2O(cssWidth string, cssHeight string)

ResetCanvas2O "Reset" the Display canvas and set the specified width/height.

func (*ScaleManager) ResetCanvasI

func (self *ScaleManager) ResetCanvasI(args ...interface{})

ResetCanvasI "Reset" the Display canvas and set the specified width/height.

func (*ScaleManager) ResetI

func (self *ScaleManager) ResetI(args ...interface{})

ResetI Reset internal data/state.

func (*ScaleManager) SHOW_ALL

func (self *ScaleManager) SHOW_ALL() int

SHOW_ALL A scale mode that shows the entire game while maintaining proportions - see {@link Phaser.ScaleManager#scaleMode scaleMode}.

func (*ScaleManager) ScaleFactor

func (self *ScaleManager) ScaleFactor() *Point

ScaleFactor The _current_ scale factor based on the game dimensions vs. the scaled dimensions.

func (*ScaleManager) ScaleFactorInversed

func (self *ScaleManager) ScaleFactorInversed() *Point

ScaleFactorInversed The _current_ inversed scale factor. The displayed dimensions divided by the game dimensions.

func (*ScaleManager) ScaleMode

func (self *ScaleManager) ScaleMode() int

ScaleMode The scaling method used by the ScaleManager when not in fullscreen.

<dl>

<dt>{@link Phaser.ScaleManager.NO_SCALE}</dt>
<dd>
    The Game display area will not be scaled - even if it is too large for the canvas/screen.
    This mode _ignores_ any applied scaling factor and displays the canvas at the Game size.
</dd>
<dt>{@link Phaser.ScaleManager.EXACT_FIT}</dt>
<dd>
    The Game display area will be _stretched_ to fill the entire size of the canvas's parent element and/or screen.
    Proportions are not maintained.
</dd>
<dt>{@link Phaser.ScaleManager.SHOW_ALL}</dt>
<dd>
    Show the entire game display area while _maintaining_ the original aspect ratio.
</dd>
<dt>{@link Phaser.ScaleManager.RESIZE}</dt>
<dd>
    The dimensions of the game display area are changed to match the size of the parent container.
    That is, this mode _changes the Game size_ to match the display size.
    <p>
    Any manually set Game size (see {@link Phaser.ScaleManager#setGameSize setGameSize}) is ignored while in effect.
</dd>
<dt>{@link Phaser.ScaleManager.USER_SCALE}</dt>
<dd>
    The game Display is scaled according to the user-specified scale set by {@link Phaser.ScaleManager#setUserScale setUserScale}.
    <p>
    This scale can be adjusted in the {@link Phaser.ScaleManager#setResizeCallback resize callback}
    for flexible custom-sizing needs.
</dd>

</dl>

func (*ScaleManager) ScaleSprite

func (self *ScaleManager) ScaleSprite(sprite interface{}) interface{}

ScaleSprite Takes a Sprite or Image object and scales it to fit the given dimensions. Scaling happens proportionally without distortion to the sprites texture. The letterBox parameter controls if scaling will produce a letter-box effect or zoom the sprite until it fills the given values. Note that with letterBox set to false the scaled sprite may spill out over either the horizontal or vertical sides of the target dimensions. If you wish to stop this you can crop the Sprite.

func (*ScaleManager) ScaleSprite1O

func (self *ScaleManager) ScaleSprite1O(sprite interface{}, width int) interface{}

ScaleSprite1O Takes a Sprite or Image object and scales it to fit the given dimensions. Scaling happens proportionally without distortion to the sprites texture. The letterBox parameter controls if scaling will produce a letter-box effect or zoom the sprite until it fills the given values. Note that with letterBox set to false the scaled sprite may spill out over either the horizontal or vertical sides of the target dimensions. If you wish to stop this you can crop the Sprite.

func (*ScaleManager) ScaleSprite2O

func (self *ScaleManager) ScaleSprite2O(sprite interface{}, width int, height int) interface{}

ScaleSprite2O Takes a Sprite or Image object and scales it to fit the given dimensions. Scaling happens proportionally without distortion to the sprites texture. The letterBox parameter controls if scaling will produce a letter-box effect or zoom the sprite until it fills the given values. Note that with letterBox set to false the scaled sprite may spill out over either the horizontal or vertical sides of the target dimensions. If you wish to stop this you can crop the Sprite.

func (*ScaleManager) ScaleSprite3O

func (self *ScaleManager) ScaleSprite3O(sprite interface{}, width int, height int, letterBox bool) interface{}

ScaleSprite3O Takes a Sprite or Image object and scales it to fit the given dimensions. Scaling happens proportionally without distortion to the sprites texture. The letterBox parameter controls if scaling will produce a letter-box effect or zoom the sprite until it fills the given values. Note that with letterBox set to false the scaled sprite may spill out over either the horizontal or vertical sides of the target dimensions. If you wish to stop this you can crop the Sprite.

func (*ScaleManager) ScaleSpriteI

func (self *ScaleManager) ScaleSpriteI(args ...interface{}) interface{}

ScaleSpriteI Takes a Sprite or Image object and scales it to fit the given dimensions. Scaling happens proportionally without distortion to the sprites texture. The letterBox parameter controls if scaling will produce a letter-box effect or zoom the sprite until it fills the given values. Note that with letterBox set to false the scaled sprite may spill out over either the horizontal or vertical sides of the target dimensions. If you wish to stop this you can crop the Sprite.

func (*ScaleManager) ScreenOrientation

func (self *ScaleManager) ScreenOrientation() string

ScreenOrientation The _last known_ orientation of the screen, as defined in the Window Screen Web API. See {@link Phaser.DOM.getScreenOrientation} for possible values.

func (*ScaleManager) ScrollTop

func (self *ScaleManager) ScrollTop()

ScrollTop Scroll to the top - in some environments. See `compatibility.scrollTo`.

func (*ScaleManager) ScrollTopI

func (self *ScaleManager) ScrollTopI(args ...interface{})

ScrollTopI Scroll to the top - in some environments. See `compatibility.scrollTo`.

func (*ScaleManager) SetAspectRatioA

func (self *ScaleManager) SetAspectRatioA(member int)

SetAspectRatioA The aspect ratio of the scaled Display canvas.

func (*ScaleManager) SetBoundingParentA

func (self *ScaleManager) SetBoundingParentA(member DOMElement)

SetBoundingParentA The DOM element that is considered the Parent bounding element, if any.

This `null` if {@link Phaser.ScaleManager#parentIsWindow parentIsWindow} is true or if fullscreen mode is entered and {@link Phaser.ScaleManager#fullScreenTarget fullScreenTarget} is specified. It will also be null if there is no game canvas or if the game canvas has no parent.

func (*ScaleManager) SetBoundsA

func (self *ScaleManager) SetBoundsA(member *Rectangle)

SetBoundsA The bounds of the scaled game. The x/y will match the offset of the canvas element and the width/height the scaled width and height.

func (*ScaleManager) SetCompatibilityA

func (self *ScaleManager) SetCompatibilityA(member interface{})

SetCompatibilityA Various compatibility settings. A value of "(auto)" indicates the setting is configured based on device and runtime information.

A {@link Phaser.ScaleManager#refresh refresh} may need to be performed after making changes.

func (*ScaleManager) SetCurrentScaleModeA

func (self *ScaleManager) SetCurrentScaleModeA(member int)

SetCurrentScaleModeA Returns the current scale mode - for normal or fullscreen operation.

See {@link Phaser.ScaleManager#scaleMode scaleMode} for the different modes allowed.

func (*ScaleManager) SetDomA

func (self *ScaleManager) SetDomA(member *DOM)

SetDomA Provides access to some cross-device DOM functions.

func (*ScaleManager) SetEXACT_FITA

func (self *ScaleManager) SetEXACT_FITA(member int)

SetEXACT_FITA A scale mode that stretches content to fill all available space - see {@link Phaser.ScaleManager#scaleMode scaleMode}.

func (*ScaleManager) SetEnterIncorrectOrientationA

func (self *ScaleManager) SetEnterIncorrectOrientationA(member *Signal)

SetEnterIncorrectOrientationA This signal is dispatched when the browser enters an incorrect orientation, as defined by {@link Phaser.ScaleManager#forceOrientation forceOrientation}.

This is signaled from `preUpdate` (or `pauseUpdate`) _even when_ the game is paused.

func (*ScaleManager) SetExactFit

func (self *ScaleManager) SetExactFit()

SetExactFit Updates the width/height such that the game is stretched to the available size. Honors {@link Phaser.ScaleManager#maxWidth maxWidth} and {@link Phaser.ScaleManager#maxHeight maxHeight} when _not_ in fullscreen.

func (*ScaleManager) SetExactFitI

func (self *ScaleManager) SetExactFitI(args ...interface{})

SetExactFitI Updates the width/height such that the game is stretched to the available size. Honors {@link Phaser.ScaleManager#maxWidth maxWidth} and {@link Phaser.ScaleManager#maxHeight maxHeight} when _not_ in fullscreen.

func (*ScaleManager) SetForceLandscapeA

func (self *ScaleManager) SetForceLandscapeA(member bool)

SetForceLandscapeA If true, the game should only run in a landscape orientation. Change with {@link Phaser.ScaleManager#forceOrientation forceOrientation}.

func (*ScaleManager) SetForcePortraitA

func (self *ScaleManager) SetForcePortraitA(member bool)

SetForcePortraitA If true, the game should only run in a portrait Change with {@link Phaser.ScaleManager#forceOrientation forceOrientation}.

func (*ScaleManager) SetFullScreenScaleModeA

func (self *ScaleManager) SetFullScreenScaleModeA(member int)

SetFullScreenScaleModeA The scaling method used by the ScaleManager when in fullscreen.

See {@link Phaser.ScaleManager#scaleMode scaleMode} for the different modes allowed.

func (*ScaleManager) SetFullScreenTargetA

func (self *ScaleManager) SetFullScreenTargetA(member DOMElement)

SetFullScreenTargetA If specified, this is the DOM element on which the Fullscreen API enter request will be invoked. The target element must have the correct CSS styling and contain the Display canvas.

The elements style will be modified (ie. the width and height might be set to 100%) but it will not be added to, removed from, or repositioned within the DOM. An attempt is made to restore relevant style changes when fullscreen mode is left.

For pre-2.2.0 behavior set `game.scale.fullScreenTarget = game.canvas`.

func (*ScaleManager) SetGameA

func (self *ScaleManager) SetGameA(member *Game)

SetGameA A reference to the currently running game.

func (*ScaleManager) SetGameSize

func (self *ScaleManager) SetGameSize(width int, height int)

SetGameSize Set the actual Game size. Use this instead of directly changing `game.width` or `game.height`.

The actual physical display (Canvas element size) depends on various settings including - Scale mode - Scaling factor - Size of Canvas's parent element or CSS rules such as min-height/max-height; - The size of the Window

func (*ScaleManager) SetGameSizeI

func (self *ScaleManager) SetGameSizeI(args ...interface{})

SetGameSizeI Set the actual Game size. Use this instead of directly changing `game.width` or `game.height`.

The actual physical display (Canvas element size) depends on various settings including - Scale mode - Scaling factor - Size of Canvas's parent element or CSS rules such as min-height/max-height; - The size of the Window

func (*ScaleManager) SetGridA

func (self *ScaleManager) SetGridA(member *FlexGrid)

SetGridA _EXPERIMENTAL:_ A responsive grid on which you can align game objects.

func (*ScaleManager) SetHasPhaserSetFullScreenA

func (self *ScaleManager) SetHasPhaserSetFullScreenA(member bool)

SetHasPhaserSetFullScreenA This boolean provides you with a way to determine if the browser is in Full Screen mode (via the Full Screen API), and Phaser was the one responsible for activating it.

It's possible that ScaleManager.isFullScreen returns `true` even if Phaser wasn't the one that made the browser go full-screen, so this flag lets you determine that.

func (*ScaleManager) SetHeightA

func (self *ScaleManager) SetHeightA(member int)

SetHeightA Target height (in pixels) of the Display canvas.

func (*ScaleManager) SetIncorrectOrientationA

func (self *ScaleManager) SetIncorrectOrientationA(member bool)

SetIncorrectOrientationA True if {@link Phaser.ScaleManager#forceLandscape forceLandscape} or {@link Phaser.ScaleManager#forcePortrait forcePortrait} are set and do not agree with the browser orientation.

This value is not updated immediately.

func (*ScaleManager) SetIsFullScreenA

func (self *ScaleManager) SetIsFullScreenA(member bool)

SetIsFullScreenA Returns true if the browser is in fullscreen mode, otherwise false.

func (*ScaleManager) SetIsGameLandscapeA

func (self *ScaleManager) SetIsGameLandscapeA(member bool)

SetIsGameLandscapeA Returns true if the game dimensions are landscape (width > height). This is especially useful to check when using the RESIZE scale mode but wanting to maintain game orientation on desktop browsers, where typically the screen orientation will always be landscape regardless of the browser viewport.

func (*ScaleManager) SetIsGamePortraitA

func (self *ScaleManager) SetIsGamePortraitA(member bool)

SetIsGamePortraitA Returns true if the game dimensions are portrait (height > width). This is especially useful to check when using the RESIZE scale mode but wanting to maintain game orientation on desktop browsers, where typically the screen orientation will always be landscape regardless of the browser viewport.

func (*ScaleManager) SetIsLandscapeA

func (self *ScaleManager) SetIsLandscapeA(member bool)

SetIsLandscapeA Returns true if the screen orientation is in landscape mode.

func (*ScaleManager) SetIsPortraitA

func (self *ScaleManager) SetIsPortraitA(member bool)

SetIsPortraitA Returns true if the screen orientation is in portrait mode.

func (*ScaleManager) SetLeaveIncorrectOrientationA

func (self *ScaleManager) SetLeaveIncorrectOrientationA(member *Signal)

SetLeaveIncorrectOrientationA This signal is dispatched when the browser leaves an incorrect orientation, as defined by {@link Phaser.ScaleManager#forceOrientation forceOrientation}.

This is signaled from `preUpdate` (or `pauseUpdate`) _even when_ the game is paused.

func (*ScaleManager) SetMarginA

func (self *ScaleManager) SetMarginA(member interface{})

SetMarginA The Display canvas is aligned by adjusting the margins; the last margins are stored here.

func (*ScaleManager) SetMaxHeightA

func (self *ScaleManager) SetMaxHeightA(member int)

SetMaxHeightA Maximum height the canvas should be scaled to (in pixels). If null it will scale to whatever height the browser can handle. Change with {@link Phaser.ScaleManager#setMinMax setMinMax}.

func (*ScaleManager) SetMaxWidthA

func (self *ScaleManager) SetMaxWidthA(member int)

SetMaxWidthA Maximum width the canvas should be scaled to (in pixels). If null it will scale to whatever width the browser can handle. Change with {@link Phaser.ScaleManager#setMinMax setMinMax}.

func (*ScaleManager) SetMaximum

func (self *ScaleManager) SetMaximum()

SetMaximum Updates the width/height to that of the window.

func (*ScaleManager) SetMaximumI

func (self *ScaleManager) SetMaximumI(args ...interface{})

SetMaximumI Updates the width/height to that of the window.

func (*ScaleManager) SetMinHeightA

func (self *ScaleManager) SetMinHeightA(member int)

SetMinHeightA Minimum height the canvas should be scaled to (in pixels). Change with {@link Phaser.ScaleManager#setMinMax setMinMax}.

func (*ScaleManager) SetMinMax

func (self *ScaleManager) SetMinMax(minWidth int, minHeight int)

SetMinMax Set the min and max dimensions for the Display canvas.

_Note:_ The min/max dimensions are only applied in some cases - When the device is not in an incorrect orientation; or - The scale mode is EXACT_FIT when not in fullscreen

func (*ScaleManager) SetMinMax1O

func (self *ScaleManager) SetMinMax1O(minWidth int, minHeight int, maxWidth int)

SetMinMax1O Set the min and max dimensions for the Display canvas.

_Note:_ The min/max dimensions are only applied in some cases - When the device is not in an incorrect orientation; or - The scale mode is EXACT_FIT when not in fullscreen

func (*ScaleManager) SetMinMax2O

func (self *ScaleManager) SetMinMax2O(minWidth int, minHeight int, maxWidth int, maxHeight int)

SetMinMax2O Set the min and max dimensions for the Display canvas.

_Note:_ The min/max dimensions are only applied in some cases - When the device is not in an incorrect orientation; or - The scale mode is EXACT_FIT when not in fullscreen

func (*ScaleManager) SetMinMaxI

func (self *ScaleManager) SetMinMaxI(args ...interface{})

SetMinMaxI Set the min and max dimensions for the Display canvas.

_Note:_ The min/max dimensions are only applied in some cases - When the device is not in an incorrect orientation; or - The scale mode is EXACT_FIT when not in fullscreen

func (*ScaleManager) SetMinWidthA

func (self *ScaleManager) SetMinWidthA(member int)

SetMinWidthA Minimum width the canvas should be scaled to (in pixels). Change with {@link Phaser.ScaleManager#setMinMax setMinMax}.

func (*ScaleManager) SetNO_SCALEA

func (self *ScaleManager) SetNO_SCALEA(member int)

SetNO_SCALEA A scale mode that prevents any scaling - see {@link Phaser.ScaleManager#scaleMode scaleMode}.

func (*ScaleManager) SetOffsetA

func (self *ScaleManager) SetOffsetA(member *Point)

SetOffsetA The offset coordinates of the Display canvas from the top-left of the browser window. The is used internally by Phaser.Pointer (for Input) and possibly other types.

func (*ScaleManager) SetOnFullScreenChangeA

func (self *ScaleManager) SetOnFullScreenChangeA(member *Signal)

SetOnFullScreenChangeA This signal is dispatched when the browser enters or leaves fullscreen mode, if supported.

The signal is supplied with a single argument: `scale` (the ScaleManager). Use `scale.isFullScreen` to determine if currently running in Fullscreen mode.

func (*ScaleManager) SetOnFullScreenErrorA

func (self *ScaleManager) SetOnFullScreenErrorA(member *Signal)

SetOnFullScreenErrorA This signal is dispatched when the browser fails to enter fullscreen mode; or if the device does not support fullscreen mode and `startFullScreen` is invoked.

The signal is supplied with a single argument: `scale` (the ScaleManager).

func (*ScaleManager) SetOnFullScreenInitA

func (self *ScaleManager) SetOnFullScreenInitA(member *Signal)

SetOnFullScreenInitA This signal is dispatched when fullscreen mode is ready to be initialized but before the fullscreen request.

The signal is passed two arguments: `scale` (the ScaleManager), and an object in the form `{targetElement: DOMElement}`.

The `targetElement` is the {@link Phaser.ScaleManager#fullScreenTarget fullScreenTarget} element, if such is assigned, or a new element created by {@link Phaser.ScaleManager#createFullScreenTarget createFullScreenTarget}.

Custom CSS styling or resets can be applied to `targetElement` as required.

If `targetElement` is _not_ the same element as {@link Phaser.ScaleManager#fullScreenTarget fullScreenTarget}:

  • After initialization the Display canvas is moved onto the `targetElement` for the duration of the fullscreen mode, and restored to it's original DOM location when fullscreen is exited.
  • The `targetElement` is moved/re-parented within the DOM and may have its CSS styles updated.

The behavior of a pre-assigned target element is covered in {@link Phaser.ScaleManager#fullScreenTarget fullScreenTarget}.

func (*ScaleManager) SetOnOrientationChangeA

func (self *ScaleManager) SetOnOrientationChangeA(member *Signal)

SetOnOrientationChangeA This signal is dispatched when the orientation changes _or_ the validity of the current orientation changes.

The signal is supplied with the following arguments: - `scale` - the ScaleManager object - `prevOrientation`, a string - The previous orientation as per {@link Phaser.ScaleManager#screenOrientation screenOrientation}. - `wasIncorrect`, a boolean - True if the previous orientation was last determined to be incorrect.

Access the current orientation and validity with `scale.screenOrientation` and `scale.incorrectOrientation`. Thus the following tests can be done:

// The orientation itself changed:
scale.screenOrientation !== prevOrientation
// The orientation just became incorrect:
scale.incorrectOrientation && !wasIncorrect

It is possible that this signal is triggered after {@link Phaser.ScaleManager#forceOrientation forceOrientation} so the orientation correctness changes even if the orientation itself does not change.

This is signaled from `preUpdate` (or `pauseUpdate`) _even when_ the game is paused.

func (*ScaleManager) SetOnSizeChangeA

func (self *ScaleManager) SetOnSizeChangeA(member *Signal)

SetOnSizeChangeA This signal is dispatched when the size of the Display canvas changes _or_ the size of the Game changes. When invoked this is done _after_ the Canvas size/position have been updated.

This signal is _only_ called when a change occurs and a reflow may be required. For example, if the canvas does not change sizes because of CSS settings (such as min-width) then this signal will _not_ be triggered.

Use this to handle responsive game layout options.

This is signaled from `preUpdate` (or `pauseUpdate`) _even when_ the game is paused.

func (*ScaleManager) SetPageAlignHorizontallyA

func (self *ScaleManager) SetPageAlignHorizontallyA(member bool)

SetPageAlignHorizontallyA When enabled the Display canvas will be horizontally-aligned _in the Parent container_ (or {@link Phaser.ScaleManager#parentIsWindow window}).

To align horizontally across the page the Display canvas should be added directly to page; or the parent container should itself be horizontally aligned.

Horizontal alignment is not applicable with the {@link Phaser.ScaleManager.RESIZE RESIZE} scaling mode.

func (*ScaleManager) SetPageAlignVerticallyA

func (self *ScaleManager) SetPageAlignVerticallyA(member bool)

SetPageAlignVerticallyA When enabled the Display canvas will be vertically-aligned _in the Parent container_ (or {@link Phaser.ScaleManager#parentIsWindow window}).

To align vertically the Parent element should have a _non-collapsible_ height, such that it will maintain a height _larger_ than the height of the contained Game canvas - the game canvas will then be scaled vertically _within_ the remaining available height dictated by the Parent element.

One way to prevent the parent from collapsing is to add an absolute "min-height" CSS property to the parent element. If specifying a relative "min-height/height" or adjusting margins, the Parent height must still be non-collapsible (see note).

_Note_: In version 2.2 the minimum document height is _not_ automatically set to the viewport/window height. To automatically update the minimum document height set {@link Phaser.ScaleManager#compatibility compatibility.forceMinimumDocumentHeight} to true.

Vertical alignment is not applicable with the {@link Phaser.ScaleManager.RESIZE RESIZE} scaling mode.

func (*ScaleManager) SetParentIsWindowA

func (self *ScaleManager) SetParentIsWindowA(member bool)

SetParentIsWindowA If the parent container of the Game canvas is the browser window itself (i.e. document.body), rather than another div, this should set to `true`.

The {@link Phaser.ScaleManager#parentNode parentNode} property is generally ignored while this is in effect.

func (*ScaleManager) SetParentNodeA

func (self *ScaleManager) SetParentNodeA(member DOMElement)

SetParentNodeA The _original_ DOM element for the parent of the Display canvas. This may be different in fullscreen - see {@link Phaser.ScaleManager#createFullScreenTarget createFullScreenTarget}.

This should only be changed after moving the Game canvas to a different DOM parent.

func (*ScaleManager) SetParentScaleFactorA

func (self *ScaleManager) SetParentScaleFactorA(member *Point)

SetParentScaleFactorA The scale of the game in relation to its parent container.

func (*ScaleManager) SetRESIZEA

func (self *ScaleManager) SetRESIZEA(member int)

SetRESIZEA A scale mode that causes the Game size to change - see {@link Phaser.ScaleManager#scaleMode scaleMode}.

func (*ScaleManager) SetResizeCallback

func (self *ScaleManager) SetResizeCallback(callback interface{}, context interface{})

SetResizeCallback Sets the callback that will be invoked before sizing calculations.

This is the appropriate place to call {@link Phaser.ScaleManager#setUserScale setUserScale} if needing custom dynamic scaling.

The callback is supplied with two arguments `scale` and `parentBounds` where `scale` is the ScaleManager and `parentBounds`, a Phaser.Rectangle, is the size of the Parent element.

This callback - May be invoked even though the parent container or canvas sizes have not changed - Unlike {@link Phaser.ScaleManager#onSizeChange onSizeChange}, it runs _before_ the canvas is guaranteed to be updated - Will be invoked from `preUpdate`, _even when_ the game is paused

See {@link Phaser.ScaleManager#onSizeChange onSizeChange} for a better way of reacting to layout updates.

func (*ScaleManager) SetResizeCallbackI

func (self *ScaleManager) SetResizeCallbackI(args ...interface{})

SetResizeCallbackI Sets the callback that will be invoked before sizing calculations.

This is the appropriate place to call {@link Phaser.ScaleManager#setUserScale setUserScale} if needing custom dynamic scaling.

The callback is supplied with two arguments `scale` and `parentBounds` where `scale` is the ScaleManager and `parentBounds`, a Phaser.Rectangle, is the size of the Parent element.

This callback - May be invoked even though the parent container or canvas sizes have not changed - Unlike {@link Phaser.ScaleManager#onSizeChange onSizeChange}, it runs _before_ the canvas is guaranteed to be updated - Will be invoked from `preUpdate`, _even when_ the game is paused

See {@link Phaser.ScaleManager#onSizeChange onSizeChange} for a better way of reacting to layout updates.

func (*ScaleManager) SetSHOW_ALLA

func (self *ScaleManager) SetSHOW_ALLA(member int)

SetSHOW_ALLA A scale mode that shows the entire game while maintaining proportions - see {@link Phaser.ScaleManager#scaleMode scaleMode}.

func (*ScaleManager) SetScaleFactorA

func (self *ScaleManager) SetScaleFactorA(member *Point)

SetScaleFactorA The _current_ scale factor based on the game dimensions vs. the scaled dimensions.

func (*ScaleManager) SetScaleFactorInversedA

func (self *ScaleManager) SetScaleFactorInversedA(member *Point)

SetScaleFactorInversedA The _current_ inversed scale factor. The displayed dimensions divided by the game dimensions.

func (*ScaleManager) SetScaleModeA

func (self *ScaleManager) SetScaleModeA(member int)

SetScaleModeA The scaling method used by the ScaleManager when not in fullscreen.

<dl>

<dt>{@link Phaser.ScaleManager.NO_SCALE}</dt>
<dd>
    The Game display area will not be scaled - even if it is too large for the canvas/screen.
    This mode _ignores_ any applied scaling factor and displays the canvas at the Game size.
</dd>
<dt>{@link Phaser.ScaleManager.EXACT_FIT}</dt>
<dd>
    The Game display area will be _stretched_ to fill the entire size of the canvas's parent element and/or screen.
    Proportions are not maintained.
</dd>
<dt>{@link Phaser.ScaleManager.SHOW_ALL}</dt>
<dd>
    Show the entire game display area while _maintaining_ the original aspect ratio.
</dd>
<dt>{@link Phaser.ScaleManager.RESIZE}</dt>
<dd>
    The dimensions of the game display area are changed to match the size of the parent container.
    That is, this mode _changes the Game size_ to match the display size.
    <p>
    Any manually set Game size (see {@link Phaser.ScaleManager#setGameSize setGameSize}) is ignored while in effect.
</dd>
<dt>{@link Phaser.ScaleManager.USER_SCALE}</dt>
<dd>
    The game Display is scaled according to the user-specified scale set by {@link Phaser.ScaleManager#setUserScale setUserScale}.
    <p>
    This scale can be adjusted in the {@link Phaser.ScaleManager#setResizeCallback resize callback}
    for flexible custom-sizing needs.
</dd>

</dl>

func (*ScaleManager) SetScreenOrientationA

func (self *ScaleManager) SetScreenOrientationA(member string)

SetScreenOrientationA The _last known_ orientation of the screen, as defined in the Window Screen Web API. See {@link Phaser.DOM.getScreenOrientation} for possible values.

func (*ScaleManager) SetShowAll

func (self *ScaleManager) SetShowAll(expanding bool)

SetShowAll Updates the width/height such that the game is scaled proportionally.

func (*ScaleManager) SetShowAllI

func (self *ScaleManager) SetShowAllI(args ...interface{})

SetShowAllI Updates the width/height such that the game is scaled proportionally.

func (*ScaleManager) SetSourceAspectRatioA

func (self *ScaleManager) SetSourceAspectRatioA(member int)

SetSourceAspectRatioA The aspect ratio of the original game dimensions.

func (*ScaleManager) SetTrackParentIntervalA

func (self *ScaleManager) SetTrackParentIntervalA(member int)

SetTrackParentIntervalA The maximum time (in ms) between dimension update checks for the Canvas's parent element (or window). Update checks normally happen quicker in response to other events.

func (*ScaleManager) SetUSER_SCALEA

func (self *ScaleManager) SetUSER_SCALEA(member int)

SetUSER_SCALEA A scale mode that allows a custom scale factor - see {@link Phaser.ScaleManager#scaleMode scaleMode}.

func (*ScaleManager) SetUserScale

func (self *ScaleManager) SetUserScale(hScale int, vScale float64)

SetUserScale Set a User scaling factor used in the USER_SCALE scaling mode.

The target canvas size is computed by:

canvas.width = (game.width * hScale) - hTrim
canvas.height = (game.height * vScale) - vTrim

This method can be used in the {@link Phaser.ScaleManager#setResizeCallback resize callback}.

func (*ScaleManager) SetUserScale1O

func (self *ScaleManager) SetUserScale1O(hScale int, vScale float64, hTrim int)

SetUserScale1O Set a User scaling factor used in the USER_SCALE scaling mode.

The target canvas size is computed by:

canvas.width = (game.width * hScale) - hTrim
canvas.height = (game.height * vScale) - vTrim

This method can be used in the {@link Phaser.ScaleManager#setResizeCallback resize callback}.

func (*ScaleManager) SetUserScale2O

func (self *ScaleManager) SetUserScale2O(hScale int, vScale float64, hTrim int, vTrim int)

SetUserScale2O Set a User scaling factor used in the USER_SCALE scaling mode.

The target canvas size is computed by:

canvas.width = (game.width * hScale) - hTrim
canvas.height = (game.height * vScale) - vTrim

This method can be used in the {@link Phaser.ScaleManager#setResizeCallback resize callback}.

func (*ScaleManager) SetUserScaleI

func (self *ScaleManager) SetUserScaleI(args ...interface{})

SetUserScaleI Set a User scaling factor used in the USER_SCALE scaling mode.

The target canvas size is computed by:

canvas.width = (game.width * hScale) - hTrim
canvas.height = (game.height * vScale) - vTrim

This method can be used in the {@link Phaser.ScaleManager#setResizeCallback resize callback}.

func (*ScaleManager) SetWidthA

func (self *ScaleManager) SetWidthA(member int)

SetWidthA Target width (in pixels) of the Display canvas.

func (*ScaleManager) SetWindowConstraintsA

func (self *ScaleManager) SetWindowConstraintsA(member interface{})

SetWindowConstraintsA The edges on which to constrain the game Display/canvas in _addition_ to the restrictions of the parent container.

The properties are strings and can be ”, 'visual', 'layout', or 'layout-soft'. - If 'visual', the edge will be constrained to the Window / displayed screen area - If 'layout', the edge will be constrained to the CSS Layout bounds - An invalid value is treated as 'visual'

func (*ScaleManager) SetupScale

func (self *ScaleManager) SetupScale(width interface{}, height interface{})

SetupScale Calculates and sets the game dimensions based on the given width and height.

This should _not_ be called when in fullscreen mode.

func (*ScaleManager) SetupScaleI

func (self *ScaleManager) SetupScaleI(args ...interface{})

SetupScaleI Calculates and sets the game dimensions based on the given width and height.

This should _not_ be called when in fullscreen mode.

func (*ScaleManager) SignalSizeChange

func (self *ScaleManager) SignalSizeChange()

SignalSizeChange Signals a resize - IF the canvas or Game size differs from the last signal.

This also triggers updates on {@link Phaser.ScaleManager#grid grid} (FlexGrid) and, if in a RESIZE mode, `game.state` (StateManager).

func (*ScaleManager) SignalSizeChangeI

func (self *ScaleManager) SignalSizeChangeI(args ...interface{})

SignalSizeChangeI Signals a resize - IF the canvas or Game size differs from the last signal.

This also triggers updates on {@link Phaser.ScaleManager#grid grid} (FlexGrid) and, if in a RESIZE mode, `game.state` (StateManager).

func (*ScaleManager) SourceAspectRatio

func (self *ScaleManager) SourceAspectRatio() int

SourceAspectRatio The aspect ratio of the original game dimensions.

func (*ScaleManager) StartFullScreen

func (self *ScaleManager) StartFullScreen() bool

StartFullScreen Start the browsers fullscreen mode - this _must_ be called from a user input Pointer or Mouse event.

The Fullscreen API must be supported by the browser for this to work - it is not the same as setting the game size to fill the browser window. See {@link Phaser.ScaleManager#compatibility compatibility.supportsFullScreen} to check if the current device is reported to support fullscreen mode.

The {@link Phaser.ScaleManager#fullScreenFailed fullScreenFailed} signal will be dispatched if the fullscreen change request failed or the game does not support the Fullscreen API.

func (*ScaleManager) StartFullScreen1O

func (self *ScaleManager) StartFullScreen1O(antialias bool) bool

StartFullScreen1O Start the browsers fullscreen mode - this _must_ be called from a user input Pointer or Mouse event.

The Fullscreen API must be supported by the browser for this to work - it is not the same as setting the game size to fill the browser window. See {@link Phaser.ScaleManager#compatibility compatibility.supportsFullScreen} to check if the current device is reported to support fullscreen mode.

The {@link Phaser.ScaleManager#fullScreenFailed fullScreenFailed} signal will be dispatched if the fullscreen change request failed or the game does not support the Fullscreen API.

func (*ScaleManager) StartFullScreen2O

func (self *ScaleManager) StartFullScreen2O(antialias bool, allowTrampoline bool) bool

StartFullScreen2O Start the browsers fullscreen mode - this _must_ be called from a user input Pointer or Mouse event.

The Fullscreen API must be supported by the browser for this to work - it is not the same as setting the game size to fill the browser window. See {@link Phaser.ScaleManager#compatibility compatibility.supportsFullScreen} to check if the current device is reported to support fullscreen mode.

The {@link Phaser.ScaleManager#fullScreenFailed fullScreenFailed} signal will be dispatched if the fullscreen change request failed or the game does not support the Fullscreen API.

func (*ScaleManager) StartFullScreenI

func (self *ScaleManager) StartFullScreenI(args ...interface{}) bool

StartFullScreenI Start the browsers fullscreen mode - this _must_ be called from a user input Pointer or Mouse event.

The Fullscreen API must be supported by the browser for this to work - it is not the same as setting the game size to fill the browser window. See {@link Phaser.ScaleManager#compatibility compatibility.supportsFullScreen} to check if the current device is reported to support fullscreen mode.

The {@link Phaser.ScaleManager#fullScreenFailed fullScreenFailed} signal will be dispatched if the fullscreen change request failed or the game does not support the Fullscreen API.

func (*ScaleManager) StopFullScreen

func (self *ScaleManager) StopFullScreen() bool

StopFullScreen Stops / exits fullscreen mode, if active.

func (*ScaleManager) StopFullScreenI

func (self *ScaleManager) StopFullScreenI(args ...interface{}) bool

StopFullScreenI Stops / exits fullscreen mode, if active.

func (*ScaleManager) TrackParentInterval

func (self *ScaleManager) TrackParentInterval() int

TrackParentInterval The maximum time (in ms) between dimension update checks for the Canvas's parent element (or window). Update checks normally happen quicker in response to other events.

func (*ScaleManager) USER_SCALE

func (self *ScaleManager) USER_SCALE() int

USER_SCALE A scale mode that allows a custom scale factor - see {@link Phaser.ScaleManager#scaleMode scaleMode}.

func (*ScaleManager) UpdateDimensions

func (self *ScaleManager) UpdateDimensions(width int, height int, resize bool)

UpdateDimensions Update the dimensions taking the parent scaling factor into account.

func (*ScaleManager) UpdateDimensionsI

func (self *ScaleManager) UpdateDimensionsI(args ...interface{})

UpdateDimensionsI Update the dimensions taking the parent scaling factor into account.

func (*ScaleManager) UpdateLayout

func (self *ScaleManager) UpdateLayout()

UpdateLayout Updates the game / canvas position and size.

func (*ScaleManager) UpdateLayoutI

func (self *ScaleManager) UpdateLayoutI(args ...interface{})

UpdateLayoutI Updates the game / canvas position and size.

func (*ScaleManager) UpdateOrientationState

func (self *ScaleManager) UpdateOrientationState() bool

UpdateOrientationState Updates the current orientation and dispatches orientation change events.

func (*ScaleManager) UpdateOrientationStateI

func (self *ScaleManager) UpdateOrientationStateI(args ...interface{}) bool

UpdateOrientationStateI Updates the current orientation and dispatches orientation change events.

func (*ScaleManager) UpdateScalingAndBounds

func (self *ScaleManager) UpdateScalingAndBounds()

UpdateScalingAndBounds Update relevant scaling values based on the ScaleManager dimension and game dimensions, which should already be set. This does not change {@link Phaser.ScaleManager#sourceAspectRatio sourceAspectRatio}.

func (*ScaleManager) UpdateScalingAndBoundsI

func (self *ScaleManager) UpdateScalingAndBoundsI(args ...interface{})

UpdateScalingAndBoundsI Update relevant scaling values based on the ScaleManager dimension and game dimensions, which should already be set. This does not change {@link Phaser.ScaleManager#sourceAspectRatio sourceAspectRatio}.

func (*ScaleManager) Width

func (self *ScaleManager) Width() int

Width Target width (in pixels) of the Display canvas.

func (*ScaleManager) WindowConstraints

func (self *ScaleManager) WindowConstraints() interface{}

WindowConstraints The edges on which to constrain the game Display/canvas in _addition_ to the restrictions of the parent container.

The properties are strings and can be ”, 'visual', 'layout', or 'layout-soft'. - If 'visual', the edge will be constrained to the Window / displayed screen area - If 'layout', the edge will be constrained to the CSS Layout bounds - An invalid value is treated as 'visual'

func (*ScaleManager) WindowResize

func (self *ScaleManager) WindowResize(event *Event)

WindowResize window.resize event handler.

func (*ScaleManager) WindowResizeI

func (self *ScaleManager) WindowResizeI(args ...interface{})

WindowResizeI window.resize event handler.

type Signal

type Signal struct {
	*js.Object
}

Signal Signals are what Phaser uses to handle events and event dispatching. You can listen for a Signal by binding a callback / function to it. This is done by using either `Signal.add` or `Signal.addOnce`.

For example you can listen for a touch or click event from the Input Manager by using its `onDown` Signal:

`game.input.onDown.add(function() { ... });`

Rather than inline your function, you can pass a reference:

`game.input.onDown.add(clicked, this);` `function clicked () { ... }`

In this case the second argument (`this`) is the context in which your function should be called.

Now every time the InputManager dispatches the `onDown` signal (or event), your function will be called.

Very often a Signal will send arguments to your function. This is specific to the Signal itself. If you're unsure then check the documentation, or failing that simply do:

`Signal.add(function() { console.log(arguments); })`

and it will log all of the arguments your function received from the Signal.

Sprites have lots of default signals you can listen to in their Events class, such as:

`sprite.events.onKilled`

Which is called automatically whenever the Sprite is killed. There are lots of other events, see the Events component for a list.

As well as listening to pre-defined Signals you can also create your own:

`var mySignal = new Phaser.Signal();`

This creates a new Signal. You can bind a callback to it:

`mySignal.add(myCallback, this);`

and then finally when ready you can dispatch the Signal:

`mySignal.dispatch(your arguments);`

And your callback will be invoked. See the dispatch method for more details.

func NewSignal

func NewSignal() *Signal

NewSignal Signals are what Phaser uses to handle events and event dispatching. You can listen for a Signal by binding a callback / function to it. This is done by using either `Signal.add` or `Signal.addOnce`.

For example you can listen for a touch or click event from the Input Manager by using its `onDown` Signal:

`game.input.onDown.add(function() { ... });`

Rather than inline your function, you can pass a reference:

`game.input.onDown.add(clicked, this);` `function clicked () { ... }`

In this case the second argument (`this`) is the context in which your function should be called.

Now every time the InputManager dispatches the `onDown` signal (or event), your function will be called.

Very often a Signal will send arguments to your function. This is specific to the Signal itself. If you're unsure then check the documentation, or failing that simply do:

`Signal.add(function() { console.log(arguments); })`

and it will log all of the arguments your function received from the Signal.

Sprites have lots of default signals you can listen to in their Events class, such as:

`sprite.events.onKilled`

Which is called automatically whenever the Sprite is killed. There are lots of other events, see the Events component for a list.

As well as listening to pre-defined Signals you can also create your own:

`var mySignal = new Phaser.Signal();`

This creates a new Signal. You can bind a callback to it:

`mySignal.add(myCallback, this);`

and then finally when ready you can dispatch the Signal:

`mySignal.dispatch(your arguments);`

And your callback will be invoked. See the dispatch method for more details.

func NewSignalI

func NewSignalI(args ...interface{}) *Signal

NewSignalI Signals are what Phaser uses to handle events and event dispatching. You can listen for a Signal by binding a callback / function to it. This is done by using either `Signal.add` or `Signal.addOnce`.

For example you can listen for a touch or click event from the Input Manager by using its `onDown` Signal:

`game.input.onDown.add(function() { ... });`

Rather than inline your function, you can pass a reference:

`game.input.onDown.add(clicked, this);` `function clicked () { ... }`

In this case the second argument (`this`) is the context in which your function should be called.

Now every time the InputManager dispatches the `onDown` signal (or event), your function will be called.

Very often a Signal will send arguments to your function. This is specific to the Signal itself. If you're unsure then check the documentation, or failing that simply do:

`Signal.add(function() { console.log(arguments); })`

and it will log all of the arguments your function received from the Signal.

Sprites have lots of default signals you can listen to in their Events class, such as:

`sprite.events.onKilled`

Which is called automatically whenever the Sprite is killed. There are lots of other events, see the Events component for a list.

As well as listening to pre-defined Signals you can also create your own:

`var mySignal = new Phaser.Signal();`

This creates a new Signal. You can bind a callback to it:

`mySignal.add(myCallback, this);`

and then finally when ready you can dispatch the Signal:

`mySignal.dispatch(your arguments);`

And your callback will be invoked. See the dispatch method for more details.

func ToSignal

func ToSignal(jsStruct interface{}) *Signal

Signal Binding conversion method to Signal point

func (*Signal) Active

func (self *Signal) Active() bool

Active Is the Signal active? Only active signals will broadcast dispatched events.

Setting this property during a dispatch will only affect the next dispatch. To stop the propagation of a signal from a listener use {@link Phaser.Signal#halt halt}.

func (*Signal) Add

func (self *Signal) Add(listener interface{}) *SignalBinding

Add Add an event listener for this signal.

An event listener is a callback with a related context and priority.

You can optionally provide extra arguments which will be passed to the callback after any internal parameters.

For example: `Phaser.Key.onDown` when dispatched will send the Phaser.Key object that caused the signal as the first parameter. Any arguments you've specified after `priority` will be sent as well:

`fireButton.onDown.add(shoot, this, 0, 'lazer', 100);`

When onDown dispatches it will call the `shoot` callback passing it: `Phaser.Key, 'lazer', 100`.

Where the first parameter is the one that Key.onDown dispatches internally and 'lazer', and the value 100 were the custom arguments given in the call to 'add'.

func (*Signal) Add1O

func (self *Signal) Add1O(listener interface{}, listenerContext interface{}) *SignalBinding

Add1O Add an event listener for this signal.

An event listener is a callback with a related context and priority.

You can optionally provide extra arguments which will be passed to the callback after any internal parameters.

For example: `Phaser.Key.onDown` when dispatched will send the Phaser.Key object that caused the signal as the first parameter. Any arguments you've specified after `priority` will be sent as well:

`fireButton.onDown.add(shoot, this, 0, 'lazer', 100);`

When onDown dispatches it will call the `shoot` callback passing it: `Phaser.Key, 'lazer', 100`.

Where the first parameter is the one that Key.onDown dispatches internally and 'lazer', and the value 100 were the custom arguments given in the call to 'add'.

func (*Signal) Add2O

func (self *Signal) Add2O(listener interface{}, listenerContext interface{}, priority int) *SignalBinding

Add2O Add an event listener for this signal.

An event listener is a callback with a related context and priority.

You can optionally provide extra arguments which will be passed to the callback after any internal parameters.

For example: `Phaser.Key.onDown` when dispatched will send the Phaser.Key object that caused the signal as the first parameter. Any arguments you've specified after `priority` will be sent as well:

`fireButton.onDown.add(shoot, this, 0, 'lazer', 100);`

When onDown dispatches it will call the `shoot` callback passing it: `Phaser.Key, 'lazer', 100`.

Where the first parameter is the one that Key.onDown dispatches internally and 'lazer', and the value 100 were the custom arguments given in the call to 'add'.

func (*Signal) Add3O

func (self *Signal) Add3O(listener interface{}, listenerContext interface{}, priority int, args interface{}) *SignalBinding

Add3O Add an event listener for this signal.

An event listener is a callback with a related context and priority.

You can optionally provide extra arguments which will be passed to the callback after any internal parameters.

For example: `Phaser.Key.onDown` when dispatched will send the Phaser.Key object that caused the signal as the first parameter. Any arguments you've specified after `priority` will be sent as well:

`fireButton.onDown.add(shoot, this, 0, 'lazer', 100);`

When onDown dispatches it will call the `shoot` callback passing it: `Phaser.Key, 'lazer', 100`.

Where the first parameter is the one that Key.onDown dispatches internally and 'lazer', and the value 100 were the custom arguments given in the call to 'add'.

func (*Signal) AddI

func (self *Signal) AddI(args ...interface{}) *SignalBinding

AddI Add an event listener for this signal.

An event listener is a callback with a related context and priority.

You can optionally provide extra arguments which will be passed to the callback after any internal parameters.

For example: `Phaser.Key.onDown` when dispatched will send the Phaser.Key object that caused the signal as the first parameter. Any arguments you've specified after `priority` will be sent as well:

`fireButton.onDown.add(shoot, this, 0, 'lazer', 100);`

When onDown dispatches it will call the `shoot` callback passing it: `Phaser.Key, 'lazer', 100`.

Where the first parameter is the one that Key.onDown dispatches internally and 'lazer', and the value 100 were the custom arguments given in the call to 'add'.

func (*Signal) AddOnce

func (self *Signal) AddOnce(listener interface{}) *SignalBinding

AddOnce Add a one-time listener - the listener is automatically removed after the first execution.

If there is as {@link Phaser.Signal#memorize memorized} event then it will be dispatched and the listener will be removed immediately.

func (*Signal) AddOnce1O

func (self *Signal) AddOnce1O(listener interface{}, listenerContext interface{}) *SignalBinding

AddOnce1O Add a one-time listener - the listener is automatically removed after the first execution.

If there is as {@link Phaser.Signal#memorize memorized} event then it will be dispatched and the listener will be removed immediately.

func (*Signal) AddOnce2O

func (self *Signal) AddOnce2O(listener interface{}, listenerContext interface{}, priority int) *SignalBinding

AddOnce2O Add a one-time listener - the listener is automatically removed after the first execution.

If there is as {@link Phaser.Signal#memorize memorized} event then it will be dispatched and the listener will be removed immediately.

func (*Signal) AddOnce3O

func (self *Signal) AddOnce3O(listener interface{}, listenerContext interface{}, priority int, args interface{}) *SignalBinding

AddOnce3O Add a one-time listener - the listener is automatically removed after the first execution.

If there is as {@link Phaser.Signal#memorize memorized} event then it will be dispatched and the listener will be removed immediately.

func (*Signal) AddOnceI

func (self *Signal) AddOnceI(args ...interface{}) *SignalBinding

AddOnceI Add a one-time listener - the listener is automatically removed after the first execution.

If there is as {@link Phaser.Signal#memorize memorized} event then it will be dispatched and the listener will be removed immediately.

func (*Signal) Dispatch

func (self *Signal) Dispatch()

Dispatch Dispatch / broadcast the event to all listeners.

To create an instance-bound dispatch for this Signal, use {@link Phaser.Signal#boundDispatch boundDispatch}.

func (*Signal) Dispatch1O

func (self *Signal) Dispatch1O(params interface{})

Dispatch1O Dispatch / broadcast the event to all listeners.

To create an instance-bound dispatch for this Signal, use {@link Phaser.Signal#boundDispatch boundDispatch}.

func (*Signal) DispatchI

func (self *Signal) DispatchI(args ...interface{})

DispatchI Dispatch / broadcast the event to all listeners.

To create an instance-bound dispatch for this Signal, use {@link Phaser.Signal#boundDispatch boundDispatch}.

func (*Signal) Dispose

func (self *Signal) Dispose()

Dispose Dispose the signal - no more events can be dispatched.

This removes all event listeners and clears references to external objects. Calling methods on a disposed objects results in undefined behavior.

func (*Signal) DisposeI

func (self *Signal) DisposeI(args ...interface{})

DisposeI Dispose the signal - no more events can be dispatched.

This removes all event listeners and clears references to external objects. Calling methods on a disposed objects results in undefined behavior.

func (*Signal) Forget

func (self *Signal) Forget()

Forget Forget the currently {@link Phaser.Signal#memorize memorized} event, if any.

func (*Signal) ForgetI

func (self *Signal) ForgetI(args ...interface{})

ForgetI Forget the currently {@link Phaser.Signal#memorize memorized} event, if any.

func (*Signal) GetNumListeners

func (self *Signal) GetNumListeners() int

GetNumListeners Gets the total number of listeners attached to this Signal.

func (*Signal) GetNumListenersI

func (self *Signal) GetNumListenersI(args ...interface{}) int

GetNumListenersI Gets the total number of listeners attached to this Signal.

func (*Signal) Halt

func (self *Signal) Halt()

Halt Stop propagation of the event, blocking the dispatch to next listener on the queue.

This should be called only during event dispatch as calling it before/after dispatch won't affect another broadcast. See {@link Phaser.Signal#active active} to enable/disable the signal entirely.

func (*Signal) HaltI

func (self *Signal) HaltI(args ...interface{})

HaltI Stop propagation of the event, blocking the dispatch to next listener on the queue.

This should be called only during event dispatch as calling it before/after dispatch won't affect another broadcast. See {@link Phaser.Signal#active active} to enable/disable the signal entirely.

func (*Signal) Has

func (self *Signal) Has(listener interface{}) bool

Has Check if a specific listener is attached.

func (*Signal) Has1O

func (self *Signal) Has1O(listener interface{}, context interface{}) bool

Has1O Check if a specific listener is attached.

func (*Signal) HasI

func (self *Signal) HasI(args ...interface{}) bool

HasI Check if a specific listener is attached.

func (*Signal) Memorize

func (self *Signal) Memorize() bool

Memorize Memorize the previously dispatched event?

If an event has been memorized it is automatically dispatched when a new listener is added with {@link Phaser.Signal#add add} or {@link Phaser.Signal#addOnce addOnce}. Use {@link Phaser.Signal#forget forget} to clear any currently memorized event.

func (*Signal) Remove

func (self *Signal) Remove(listener interface{}) interface{}

Remove Remove a single event listener.

func (*Signal) Remove1O

func (self *Signal) Remove1O(listener interface{}, context interface{}) interface{}

Remove1O Remove a single event listener.

func (*Signal) RemoveAll

func (self *Signal) RemoveAll()

RemoveAll Remove all event listeners.

func (*Signal) RemoveAll1O

func (self *Signal) RemoveAll1O(context interface{})

RemoveAll1O Remove all event listeners.

func (*Signal) RemoveAllI

func (self *Signal) RemoveAllI(args ...interface{})

RemoveAllI Remove all event listeners.

func (*Signal) RemoveI

func (self *Signal) RemoveI(args ...interface{}) interface{}

RemoveI Remove a single event listener.

func (*Signal) SetActiveA

func (self *Signal) SetActiveA(member bool)

SetActiveA Is the Signal active? Only active signals will broadcast dispatched events.

Setting this property during a dispatch will only affect the next dispatch. To stop the propagation of a signal from a listener use {@link Phaser.Signal#halt halt}.

func (*Signal) SetMemorizeA

func (self *Signal) SetMemorizeA(member bool)

SetMemorizeA Memorize the previously dispatched event?

If an event has been memorized it is automatically dispatched when a new listener is added with {@link Phaser.Signal#add add} or {@link Phaser.Signal#addOnce addOnce}. Use {@link Phaser.Signal#forget forget} to clear any currently memorized event.

func (*Signal) ToString

func (self *Signal) ToString() string

ToString A string representation of the object.

func (*Signal) ToStringI

func (self *Signal) ToStringI(args ...interface{}) string

ToStringI A string representation of the object.

func (*Signal) ValidateListener

func (self *Signal) ValidateListener(listener interface{}, fnName string)

ValidateListener empty description

func (*Signal) ValidateListenerI

func (self *Signal) ValidateListenerI(args ...interface{})

ValidateListenerI empty description

type SignalBinding

type SignalBinding struct {
	*js.Object
}

SignalBinding Object that represents a binding between a Signal and a listener function. This is an internal constructor and shouldn't be created directly. Inspired by Joa Ebert AS3 SignalBinding and Robert Penner's Slot classes.

func NewSignalBinding

func NewSignalBinding(signal *Signal, listener interface{}, isOnce bool) *SignalBinding

NewSignalBinding Object that represents a binding between a Signal and a listener function. This is an internal constructor and shouldn't be created directly. Inspired by Joa Ebert AS3 SignalBinding and Robert Penner's Slot classes.

func NewSignalBinding1O

func NewSignalBinding1O(signal *Signal, listener interface{}, isOnce bool, listenerContext interface{}) *SignalBinding

NewSignalBinding1O Object that represents a binding between a Signal and a listener function. This is an internal constructor and shouldn't be created directly. Inspired by Joa Ebert AS3 SignalBinding and Robert Penner's Slot classes.

func NewSignalBinding2O

func NewSignalBinding2O(signal *Signal, listener interface{}, isOnce bool, listenerContext interface{}, priority int) *SignalBinding

NewSignalBinding2O Object that represents a binding between a Signal and a listener function. This is an internal constructor and shouldn't be created directly. Inspired by Joa Ebert AS3 SignalBinding and Robert Penner's Slot classes.

func NewSignalBinding3O

func NewSignalBinding3O(signal *Signal, listener interface{}, isOnce bool, listenerContext interface{}, priority int, args interface{}) *SignalBinding

NewSignalBinding3O Object that represents a binding between a Signal and a listener function. This is an internal constructor and shouldn't be created directly. Inspired by Joa Ebert AS3 SignalBinding and Robert Penner's Slot classes.

func NewSignalBindingI

func NewSignalBindingI(args ...interface{}) *SignalBinding

NewSignalBindingI Object that represents a binding between a Signal and a listener function. This is an internal constructor and shouldn't be created directly. Inspired by Joa Ebert AS3 SignalBinding and Robert Penner's Slot classes.

func ToSignalBinding

func ToSignalBinding(jsStruct interface{}) *SignalBinding

SignalBinding Binding conversion method to SignalBinding point

func (*SignalBinding) Active

func (self *SignalBinding) Active() bool

Active If binding is active and should be executed.

func (*SignalBinding) CallCount

func (self *SignalBinding) CallCount() int

CallCount The number of times the handler function has been called.

func (*SignalBinding) Context

func (self *SignalBinding) Context() interface{}

Context Context on which listener will be executed (object that should represent the `this` variable inside listener function).

func (*SignalBinding) Detach

func (self *SignalBinding) Detach() interface{}

Detach Detach binding from signal. alias to: @see mySignal.remove(myBinding.getListener());

func (*SignalBinding) DetachI

func (self *SignalBinding) DetachI(args ...interface{}) interface{}

DetachI Detach binding from signal. alias to: @see mySignal.remove(myBinding.getListener());

func (*SignalBinding) Execute

func (self *SignalBinding) Execute() interface{}

Execute Call listener passing arbitrary parameters. If binding was added using `Signal.addOnce()` it will be automatically removed from signal dispatch queue, this method is used internally for the signal dispatch.

func (*SignalBinding) Execute1O

func (self *SignalBinding) Execute1O(paramsArr []interface{}) interface{}

Execute1O Call listener passing arbitrary parameters. If binding was added using `Signal.addOnce()` it will be automatically removed from signal dispatch queue, this method is used internally for the signal dispatch.

func (*SignalBinding) ExecuteI

func (self *SignalBinding) ExecuteI(args ...interface{}) interface{}

ExecuteI Call listener passing arbitrary parameters. If binding was added using `Signal.addOnce()` it will be automatically removed from signal dispatch queue, this method is used internally for the signal dispatch.

func (*SignalBinding) GetListener

func (self *SignalBinding) GetListener() interface{}

GetListener empty description

func (*SignalBinding) GetListenerI

func (self *SignalBinding) GetListenerI(args ...interface{}) interface{}

GetListenerI empty description

func (*SignalBinding) GetSignal

func (self *SignalBinding) GetSignal() *Signal

GetSignal empty description

func (*SignalBinding) GetSignalI

func (self *SignalBinding) GetSignalI(args ...interface{}) *Signal

GetSignalI empty description

func (*SignalBinding) IsBound

func (self *SignalBinding) IsBound() bool

IsBound empty description

func (*SignalBinding) IsBoundI

func (self *SignalBinding) IsBoundI(args ...interface{}) bool

IsBoundI empty description

func (*SignalBinding) IsOnce

func (self *SignalBinding) IsOnce() bool

IsOnce empty description

func (*SignalBinding) IsOnceI

func (self *SignalBinding) IsOnceI(args ...interface{}) bool

IsOnceI empty description

func (*SignalBinding) Params

func (self *SignalBinding) Params() interface{}

Params Default parameters passed to listener during `Signal.dispatch` and `SignalBinding.execute` (curried parameters).

func (*SignalBinding) SetActiveA

func (self *SignalBinding) SetActiveA(member bool)

SetActiveA If binding is active and should be executed.

func (*SignalBinding) SetCallCountA

func (self *SignalBinding) SetCallCountA(member int)

SetCallCountA The number of times the handler function has been called.

func (*SignalBinding) SetContextA

func (self *SignalBinding) SetContextA(member interface{})

SetContextA Context on which listener will be executed (object that should represent the `this` variable inside listener function).

func (*SignalBinding) SetParamsA

func (self *SignalBinding) SetParamsA(member interface{})

SetParamsA Default parameters passed to listener during `Signal.dispatch` and `SignalBinding.execute` (curried parameters).

func (*SignalBinding) ToString

func (self *SignalBinding) ToString() string

ToString empty description

func (*SignalBinding) ToStringI

func (self *SignalBinding) ToStringI(args ...interface{}) string

ToStringI empty description

type SinglePad

type SinglePad struct {
	*js.Object
}

SinglePad A single Phaser Gamepad

func NewSinglePad

func NewSinglePad(game *Game, padParent interface{}) *SinglePad

NewSinglePad A single Phaser Gamepad

func NewSinglePadI

func NewSinglePadI(args ...interface{}) *SinglePad

NewSinglePadI A single Phaser Gamepad

func ToSinglePad

func ToSinglePad(jsStruct interface{}) *SinglePad

SinglePad Binding conversion method to SinglePad point

func (*SinglePad) AddCallbacks

func (self *SinglePad) AddCallbacks(context interface{}, callbacks interface{})

AddCallbacks Add callbacks to this Gamepad to handle connect / disconnect / button down / button up / axis change / float value buttons.

func (*SinglePad) AddCallbacksI

func (self *SinglePad) AddCallbacksI(args ...interface{})

AddCallbacksI Add callbacks to this Gamepad to handle connect / disconnect / button down / button up / axis change / float value buttons.

func (*SinglePad) Axis

func (self *SinglePad) Axis(axisCode int) int

Axis Returns value of requested axis.

func (*SinglePad) AxisI

func (self *SinglePad) AxisI(args ...interface{}) int

AxisI Returns value of requested axis.

func (*SinglePad) ButtonValue

func (self *SinglePad) ButtonValue(buttonCode int) int

ButtonValue Returns the value of a gamepad button. Intended mainly for cases when you have floating button values, for example analog trigger buttons on the XBOX 360 controller.

func (*SinglePad) ButtonValueI

func (self *SinglePad) ButtonValueI(args ...interface{}) int

ButtonValueI Returns the value of a gamepad button. Intended mainly for cases when you have floating button values, for example analog trigger buttons on the XBOX 360 controller.

func (*SinglePad) CallbackContext

func (self *SinglePad) CallbackContext() interface{}

CallbackContext The context under which the callbacks are run.

func (*SinglePad) Connect

func (self *SinglePad) Connect(rawPad interface{})

Connect Gamepad connect function, should be called by Phaser.Gamepad.

func (*SinglePad) ConnectI

func (self *SinglePad) ConnectI(args ...interface{})

ConnectI Gamepad connect function, should be called by Phaser.Gamepad.

func (*SinglePad) Connected

func (self *SinglePad) Connected() bool

Connected Whether or not this particular gamepad is connected or not.

func (*SinglePad) DeadZone

func (self *SinglePad) DeadZone() int

DeadZone Dead zone for axis feedback - within this value you won't trigger updates.

func (*SinglePad) Destroy

func (self *SinglePad) Destroy()

Destroy Destroys this object and associated callback references.

func (*SinglePad) DestroyI

func (self *SinglePad) DestroyI(args ...interface{})

DestroyI Destroys this object and associated callback references.

func (*SinglePad) Disconnect

func (self *SinglePad) Disconnect()

Disconnect Gamepad disconnect function, should be called by Phaser.Gamepad.

func (*SinglePad) DisconnectI

func (self *SinglePad) DisconnectI(args ...interface{})

DisconnectI Gamepad disconnect function, should be called by Phaser.Gamepad.

func (*SinglePad) Game

func (self *SinglePad) Game() *Game

Game Local reference to game.

func (*SinglePad) GetButton

func (self *SinglePad) GetButton(buttonCode int) *DeviceButton

GetButton Gets a DeviceButton object from this controller to be stored and referenced locally. The DeviceButton object can then be polled, have events attached to it, etc.

func (*SinglePad) GetButtonI

func (self *SinglePad) GetButtonI(args ...interface{}) *DeviceButton

GetButtonI Gets a DeviceButton object from this controller to be stored and referenced locally. The DeviceButton object can then be polled, have events attached to it, etc.

func (*SinglePad) Index

func (self *SinglePad) Index() int

Index The gamepad index as per browsers data

func (*SinglePad) IsDown

func (self *SinglePad) IsDown(buttonCode int) bool

IsDown Returns true if the button is pressed down.

func (*SinglePad) IsDownI

func (self *SinglePad) IsDownI(args ...interface{}) bool

IsDownI Returns true if the button is pressed down.

func (*SinglePad) IsUp

func (self *SinglePad) IsUp(buttonCode int) bool

IsUp Returns true if the button is not currently pressed.

func (*SinglePad) IsUpI

func (self *SinglePad) IsUpI(args ...interface{}) bool

IsUpI Returns true if the button is not currently pressed.

func (*SinglePad) JustPressed

func (self *SinglePad) JustPressed(buttonCode int) bool

JustPressed Returns the "just pressed" state of a button from this gamepad. Just pressed is considered true if the button was pressed down within the duration given (default 250ms).

func (*SinglePad) JustPressed1O

func (self *SinglePad) JustPressed1O(buttonCode int, duration int) bool

JustPressed1O Returns the "just pressed" state of a button from this gamepad. Just pressed is considered true if the button was pressed down within the duration given (default 250ms).

func (*SinglePad) JustPressedI

func (self *SinglePad) JustPressedI(args ...interface{}) bool

JustPressedI Returns the "just pressed" state of a button from this gamepad. Just pressed is considered true if the button was pressed down within the duration given (default 250ms).

func (*SinglePad) JustReleased

func (self *SinglePad) JustReleased(buttonCode int) bool

JustReleased Returns the "just released" state of a button from this gamepad. Just released is considered as being true if the button was released within the duration given (default 250ms).

func (*SinglePad) JustReleased1O

func (self *SinglePad) JustReleased1O(buttonCode int, duration int) bool

JustReleased1O Returns the "just released" state of a button from this gamepad. Just released is considered as being true if the button was released within the duration given (default 250ms).

func (*SinglePad) JustReleasedI

func (self *SinglePad) JustReleasedI(args ...interface{}) bool

JustReleasedI Returns the "just released" state of a button from this gamepad. Just released is considered as being true if the button was released within the duration given (default 250ms).

func (*SinglePad) OnAxisCallback

func (self *SinglePad) OnAxisCallback() interface{}

OnAxisCallback This callback is invoked every time an axis is changed.

func (*SinglePad) OnConnectCallback

func (self *SinglePad) OnConnectCallback() interface{}

OnConnectCallback This callback is invoked every time this gamepad is connected

func (*SinglePad) OnDisconnectCallback

func (self *SinglePad) OnDisconnectCallback() interface{}

OnDisconnectCallback This callback is invoked every time this gamepad is disconnected

func (*SinglePad) OnDownCallback

func (self *SinglePad) OnDownCallback() interface{}

OnDownCallback This callback is invoked every time a button is pressed down.

func (*SinglePad) OnFloatCallback

func (self *SinglePad) OnFloatCallback() interface{}

OnFloatCallback This callback is invoked every time a button is changed to a value where value > 0 and value < 1.

func (*SinglePad) OnUpCallback

func (self *SinglePad) OnUpCallback() interface{}

OnUpCallback This callback is invoked every time a gamepad button is released.

func (*SinglePad) PollStatus

func (self *SinglePad) PollStatus()

PollStatus Main update function called by Phaser.Gamepad.

func (*SinglePad) PollStatusI

func (self *SinglePad) PollStatusI(args ...interface{})

PollStatusI Main update function called by Phaser.Gamepad.

func (*SinglePad) ProcessAxisChange

func (self *SinglePad) ProcessAxisChange(axisState interface{})

ProcessAxisChange Handles changes in axis.

func (*SinglePad) ProcessAxisChangeI

func (self *SinglePad) ProcessAxisChangeI(args ...interface{})

ProcessAxisChangeI Handles changes in axis.

func (*SinglePad) ProcessButtonDown

func (self *SinglePad) ProcessButtonDown(buttonCode int, value interface{})

ProcessButtonDown Handles button down press.

func (*SinglePad) ProcessButtonDownI

func (self *SinglePad) ProcessButtonDownI(args ...interface{})

ProcessButtonDownI Handles button down press.

func (*SinglePad) ProcessButtonFloat

func (self *SinglePad) ProcessButtonFloat(buttonCode int, value interface{})

ProcessButtonFloat Handles buttons with floating values (like analog buttons that acts almost like an axis but still registers like a button)

func (*SinglePad) ProcessButtonFloatI

func (self *SinglePad) ProcessButtonFloatI(args ...interface{})

ProcessButtonFloatI Handles buttons with floating values (like analog buttons that acts almost like an axis but still registers like a button)

func (*SinglePad) ProcessButtonUp

func (self *SinglePad) ProcessButtonUp(buttonCode int, value interface{})

ProcessButtonUp Handles button release.

func (*SinglePad) ProcessButtonUpI

func (self *SinglePad) ProcessButtonUpI(args ...interface{})

ProcessButtonUpI Handles button release.

func (*SinglePad) Reset

func (self *SinglePad) Reset()

Reset Reset all buttons/axes of this gamepad.

func (*SinglePad) ResetI

func (self *SinglePad) ResetI(args ...interface{})

ResetI Reset all buttons/axes of this gamepad.

func (*SinglePad) SetCallbackContextA

func (self *SinglePad) SetCallbackContextA(member interface{})

SetCallbackContextA The context under which the callbacks are run.

func (*SinglePad) SetConnectedA

func (self *SinglePad) SetConnectedA(member bool)

SetConnectedA Whether or not this particular gamepad is connected or not.

func (*SinglePad) SetDeadZoneA

func (self *SinglePad) SetDeadZoneA(member int)

SetDeadZoneA Dead zone for axis feedback - within this value you won't trigger updates.

func (*SinglePad) SetGameA

func (self *SinglePad) SetGameA(member *Game)

SetGameA Local reference to game.

func (*SinglePad) SetIndexA

func (self *SinglePad) SetIndexA(member int)

SetIndexA The gamepad index as per browsers data

func (*SinglePad) SetOnAxisCallbackA

func (self *SinglePad) SetOnAxisCallbackA(member interface{})

SetOnAxisCallbackA This callback is invoked every time an axis is changed.

func (*SinglePad) SetOnConnectCallbackA

func (self *SinglePad) SetOnConnectCallbackA(member interface{})

SetOnConnectCallbackA This callback is invoked every time this gamepad is connected

func (*SinglePad) SetOnDisconnectCallbackA

func (self *SinglePad) SetOnDisconnectCallbackA(member interface{})

SetOnDisconnectCallbackA This callback is invoked every time this gamepad is disconnected

func (*SinglePad) SetOnDownCallbackA

func (self *SinglePad) SetOnDownCallbackA(member interface{})

SetOnDownCallbackA This callback is invoked every time a button is pressed down.

func (*SinglePad) SetOnFloatCallbackA

func (self *SinglePad) SetOnFloatCallbackA(member interface{})

SetOnFloatCallbackA This callback is invoked every time a button is changed to a value where value > 0 and value < 1.

func (*SinglePad) SetOnUpCallbackA

func (self *SinglePad) SetOnUpCallbackA(member interface{})

SetOnUpCallbackA This callback is invoked every time a gamepad button is released.

type Sound

type Sound struct {
	*js.Object
}

Sound The Sound class constructor.

func NewSound

func NewSound(game *Game, key string) *Sound

NewSound The Sound class constructor.

func NewSound1O

func NewSound1O(game *Game, key string, volume int) *Sound

NewSound1O The Sound class constructor.

func NewSound2O

func NewSound2O(game *Game, key string, volume int, loop bool) *Sound

NewSound2O The Sound class constructor.

func NewSoundI

func NewSoundI(args ...interface{}) *Sound

NewSoundI The Sound class constructor.

func ToSound

func ToSound(jsStruct interface{}) *Sound

Sound Binding conversion method to Sound point

func (*Sound) AddMarker

func (self *Sound) AddMarker(name string, start int)

AddMarker Adds a marker into the current Sound. A marker is represented by a unique key and a start time and duration. This allows you to bundle multiple sounds together into a single audio file and use markers to jump between them for playback.

func (*Sound) AddMarker1O

func (self *Sound) AddMarker1O(name string, start int, duration int)

AddMarker1O Adds a marker into the current Sound. A marker is represented by a unique key and a start time and duration. This allows you to bundle multiple sounds together into a single audio file and use markers to jump between them for playback.

func (*Sound) AddMarker2O

func (self *Sound) AddMarker2O(name string, start int, duration int, volume int)

AddMarker2O Adds a marker into the current Sound. A marker is represented by a unique key and a start time and duration. This allows you to bundle multiple sounds together into a single audio file and use markers to jump between them for playback.

func (*Sound) AddMarker3O

func (self *Sound) AddMarker3O(name string, start int, duration int, volume int, loop bool)

AddMarker3O Adds a marker into the current Sound. A marker is represented by a unique key and a start time and duration. This allows you to bundle multiple sounds together into a single audio file and use markers to jump between them for playback.

func (*Sound) AddMarkerI

func (self *Sound) AddMarkerI(args ...interface{})

AddMarkerI Adds a marker into the current Sound. A marker is represented by a unique key and a start time and duration. This allows you to bundle multiple sounds together into a single audio file and use markers to jump between them for playback.

func (*Sound) AllowMultiple

func (self *Sound) AllowMultiple() bool

AllowMultiple This will allow you to have multiple instances of this Sound playing at once. This is only useful when running under Web Audio, and we recommend you implement a local pooling system to not flood the sound channels.

func (*Sound) Autoplay

func (self *Sound) Autoplay() bool

Autoplay Boolean indicating whether the sound should start automatically.

func (*Sound) Context

func (self *Sound) Context() *AudioContext

Context Reference to the AudioContext instance.

func (*Sound) CurrentMarker

func (self *Sound) CurrentMarker() string

CurrentMarker The string ID of the currently playing marker, if any.

func (*Sound) CurrentTime

func (self *Sound) CurrentTime() int

CurrentTime The current time the sound is at.

func (*Sound) Destroy

func (self *Sound) Destroy()

Destroy Destroys this sound and all associated events and removes it from the SoundManager.

func (*Sound) Destroy1O

func (self *Sound) Destroy1O(remove bool)

Destroy1O Destroys this sound and all associated events and removes it from the SoundManager.

func (*Sound) DestroyI

func (self *Sound) DestroyI(args ...interface{})

DestroyI Destroys this sound and all associated events and removes it from the SoundManager.

func (*Sound) Duration

func (self *Sound) Duration() int

Duration The duration of the current sound marker in seconds.

func (*Sound) DurationMS

func (self *Sound) DurationMS() int

DurationMS The duration of the current sound marker in ms.

func (*Sound) ExternalNode

func (self *Sound) ExternalNode() interface{}

ExternalNode If defined this Sound won't connect to the SoundManager master gain node, but will instead connect to externalNode.

func (*Sound) FadeComplete

func (self *Sound) FadeComplete()

FadeComplete Internal handler for Sound.fadeIn, Sound.fadeOut and Sound.fadeTo.

func (*Sound) FadeCompleteI

func (self *Sound) FadeCompleteI(args ...interface{})

FadeCompleteI Internal handler for Sound.fadeIn, Sound.fadeOut and Sound.fadeTo.

func (*Sound) FadeIn

func (self *Sound) FadeIn()

FadeIn Starts this sound playing (or restarts it if already doing so) and sets the volume to zero. Then increases the volume from 0 to 1 over the duration specified.

At the end of the fade Sound.onFadeComplete is dispatched with this Sound object as the first parameter, and the final volume (1) as the second parameter.

func (*Sound) FadeIn1O

func (self *Sound) FadeIn1O(duration int)

FadeIn1O Starts this sound playing (or restarts it if already doing so) and sets the volume to zero. Then increases the volume from 0 to 1 over the duration specified.

At the end of the fade Sound.onFadeComplete is dispatched with this Sound object as the first parameter, and the final volume (1) as the second parameter.

func (*Sound) FadeIn2O

func (self *Sound) FadeIn2O(duration int, loop bool)

FadeIn2O Starts this sound playing (or restarts it if already doing so) and sets the volume to zero. Then increases the volume from 0 to 1 over the duration specified.

At the end of the fade Sound.onFadeComplete is dispatched with this Sound object as the first parameter, and the final volume (1) as the second parameter.

func (*Sound) FadeIn3O

func (self *Sound) FadeIn3O(duration int, loop bool, marker string)

FadeIn3O Starts this sound playing (or restarts it if already doing so) and sets the volume to zero. Then increases the volume from 0 to 1 over the duration specified.

At the end of the fade Sound.onFadeComplete is dispatched with this Sound object as the first parameter, and the final volume (1) as the second parameter.

func (*Sound) FadeInI

func (self *Sound) FadeInI(args ...interface{})

FadeInI Starts this sound playing (or restarts it if already doing so) and sets the volume to zero. Then increases the volume from 0 to 1 over the duration specified.

At the end of the fade Sound.onFadeComplete is dispatched with this Sound object as the first parameter, and the final volume (1) as the second parameter.

func (*Sound) FadeOut

func (self *Sound) FadeOut()

FadeOut Decreases the volume of this Sound from its current value to 0 over the duration specified. At the end of the fade Sound.onFadeComplete is dispatched with this Sound object as the first parameter, and the final volume (0) as the second parameter.

func (*Sound) FadeOut1O

func (self *Sound) FadeOut1O(duration int)

FadeOut1O Decreases the volume of this Sound from its current value to 0 over the duration specified. At the end of the fade Sound.onFadeComplete is dispatched with this Sound object as the first parameter, and the final volume (0) as the second parameter.

func (*Sound) FadeOutI

func (self *Sound) FadeOutI(args ...interface{})

FadeOutI Decreases the volume of this Sound from its current value to 0 over the duration specified. At the end of the fade Sound.onFadeComplete is dispatched with this Sound object as the first parameter, and the final volume (0) as the second parameter.

func (*Sound) FadeTo

func (self *Sound) FadeTo()

FadeTo Fades the volume of this Sound from its current value to the given volume over the duration specified. At the end of the fade Sound.onFadeComplete is dispatched with this Sound object as the first parameter, and the final volume (volume) as the second parameter.

func (*Sound) FadeTo1O

func (self *Sound) FadeTo1O(duration int)

FadeTo1O Fades the volume of this Sound from its current value to the given volume over the duration specified. At the end of the fade Sound.onFadeComplete is dispatched with this Sound object as the first parameter, and the final volume (volume) as the second parameter.

func (*Sound) FadeTo2O

func (self *Sound) FadeTo2O(duration int, volume int)

FadeTo2O Fades the volume of this Sound from its current value to the given volume over the duration specified. At the end of the fade Sound.onFadeComplete is dispatched with this Sound object as the first parameter, and the final volume (volume) as the second parameter.

func (*Sound) FadeToI

func (self *Sound) FadeToI(args ...interface{})

FadeToI Fades the volume of this Sound from its current value to the given volume over the duration specified. At the end of the fade Sound.onFadeComplete is dispatched with this Sound object as the first parameter, and the final volume (volume) as the second parameter.

func (*Sound) FadeTween

func (self *Sound) FadeTween() *Tween

FadeTween The tween that fades the audio, set via Sound.fadeIn and Sound.fadeOut.

func (*Sound) GainNode

func (self *Sound) GainNode() interface{}

GainNode The gain node in a Web Audio system.

func (*Sound) Game

func (self *Sound) Game() *Game

Game A reference to the currently running Game.

func (*Sound) IsDecoded

func (self *Sound) IsDecoded() bool

IsDecoded Returns true if the sound file has decoded.

func (*Sound) IsDecoding

func (self *Sound) IsDecoding() bool

IsDecoding Returns true if the sound file is still decoding.

func (*Sound) IsPlaying

func (self *Sound) IsPlaying() bool

IsPlaying true if the sound is currently playing, otherwise false.

func (*Sound) Key

func (self *Sound) Key() string

Key Asset key for the sound.

func (*Sound) Loop

func (self *Sound) Loop() bool

Loop Whether or not the sound or current sound marker will loop.

func (*Sound) LoopFull

func (self *Sound) LoopFull() *Sound

LoopFull Loops this entire sound. If you need to loop a section of it then use Sound.play and the marker and loop parameters.

func (*Sound) LoopFull1O

func (self *Sound) LoopFull1O(volume int) *Sound

LoopFull1O Loops this entire sound. If you need to loop a section of it then use Sound.play and the marker and loop parameters.

func (*Sound) LoopFullI

func (self *Sound) LoopFullI(args ...interface{}) *Sound

LoopFullI Loops this entire sound. If you need to loop a section of it then use Sound.play and the marker and loop parameters.

func (*Sound) Markers

func (self *Sound) Markers() interface{}

Markers The sound markers.

func (*Sound) MasterGainNode

func (self *Sound) MasterGainNode() interface{}

MasterGainNode The master gain node in a Web Audio system.

func (*Sound) Mute

func (self *Sound) Mute() bool

Mute Gets or sets the muted state of this sound.

func (*Sound) Name

func (self *Sound) Name() string

Name Name of the sound.

func (*Sound) OnDecoded

func (self *Sound) OnDecoded() *Signal

OnDecoded The onDecoded event is dispatched when the sound has finished decoding (typically for mp3 files)

func (*Sound) OnEndedHandler

func (self *Sound) OnEndedHandler()

OnEndedHandler Called automatically by the AudioContext when the sound stops playing. Doesn't get called if the sound is set to loop or is a section of an Audio Sprite.

func (*Sound) OnEndedHandlerI

func (self *Sound) OnEndedHandlerI(args ...interface{})

OnEndedHandlerI Called automatically by the AudioContext when the sound stops playing. Doesn't get called if the sound is set to loop or is a section of an Audio Sprite.

func (*Sound) OnFadeComplete

func (self *Sound) OnFadeComplete() *Signal

OnFadeComplete The onFadeComplete event is dispatched when this sound finishes fading either in or out.

func (*Sound) OnLoop

func (self *Sound) OnLoop() *Signal

OnLoop The onLoop event is dispatched when this sound loops during playback.

func (*Sound) OnMarkerComplete

func (self *Sound) OnMarkerComplete() *Signal

OnMarkerComplete The onMarkerComplete event is dispatched when a marker within this sound completes playback.

func (*Sound) OnMute

func (self *Sound) OnMute() *Signal

OnMute The onMute event is dispatched when this sound is muted.

func (*Sound) OnPause

func (self *Sound) OnPause() *Signal

OnPause The onPause event is dispatched when this sound is paused.

func (*Sound) OnPlay

func (self *Sound) OnPlay() *Signal

OnPlay The onPlay event is dispatched each time this sound is played.

func (*Sound) OnResume

func (self *Sound) OnResume() *Signal

OnResume The onResume event is dispatched when this sound is resumed from a paused state.

func (*Sound) OnStop

func (self *Sound) OnStop() *Signal

OnStop The onStop event is dispatched when this sound stops playback.

func (*Sound) Override

func (self *Sound) Override() bool

Override if true when you play this sound it will always start from the beginning.

func (*Sound) Pause

func (self *Sound) Pause()

Pause Pauses the sound.

func (*Sound) PauseI

func (self *Sound) PauseI(args ...interface{})

PauseI Pauses the sound.

func (*Sound) Paused

func (self *Sound) Paused() bool

Paused true if the sound is paused, otherwise false.

func (*Sound) PausedPosition

func (self *Sound) PausedPosition() int

PausedPosition The position the sound had reached when it was paused.

func (*Sound) PausedTime

func (self *Sound) PausedTime() int

PausedTime The game time at which the sound was paused.

func (*Sound) PendingPlayback

func (self *Sound) PendingPlayback() bool

PendingPlayback true if the sound file is pending playback

func (*Sound) Play

func (self *Sound) Play() *Sound

Play Play this sound, or a marked section of it.

func (*Sound) Play1O

func (self *Sound) Play1O(marker string) *Sound

Play1O Play this sound, or a marked section of it.

func (*Sound) Play2O

func (self *Sound) Play2O(marker string, position int) *Sound

Play2O Play this sound, or a marked section of it.

func (*Sound) Play3O

func (self *Sound) Play3O(marker string, position int, volume int) *Sound

Play3O Play this sound, or a marked section of it.

func (*Sound) Play4O

func (self *Sound) Play4O(marker string, position int, volume int, loop bool) *Sound

Play4O Play this sound, or a marked section of it.

func (*Sound) Play5O

func (self *Sound) Play5O(marker string, position int, volume int, loop bool, forceRestart bool) *Sound

Play5O Play this sound, or a marked section of it.

func (*Sound) PlayI

func (self *Sound) PlayI(args ...interface{}) *Sound

PlayI Play this sound, or a marked section of it.

func (*Sound) Position

func (self *Sound) Position() int

Position The position of the current sound marker.

func (*Sound) RemoveMarker

func (self *Sound) RemoveMarker(name string)

RemoveMarker Removes a marker from the sound.

func (*Sound) RemoveMarkerI

func (self *Sound) RemoveMarkerI(args ...interface{})

RemoveMarkerI Removes a marker from the sound.

func (*Sound) Restart

func (self *Sound) Restart()

Restart Restart the sound, or a marked section of it.

func (*Sound) Restart1O

func (self *Sound) Restart1O(marker string)

Restart1O Restart the sound, or a marked section of it.

func (*Sound) Restart2O

func (self *Sound) Restart2O(marker string, position int)

Restart2O Restart the sound, or a marked section of it.

func (*Sound) Restart3O

func (self *Sound) Restart3O(marker string, position int, volume int)

Restart3O Restart the sound, or a marked section of it.

func (*Sound) Restart4O

func (self *Sound) Restart4O(marker string, position int, volume int, loop bool)

Restart4O Restart the sound, or a marked section of it.

func (*Sound) RestartI

func (self *Sound) RestartI(args ...interface{})

RestartI Restart the sound, or a marked section of it.

func (*Sound) Resume

func (self *Sound) Resume()

Resume Resumes the sound.

func (*Sound) ResumeI

func (self *Sound) ResumeI(args ...interface{})

ResumeI Resumes the sound.

func (*Sound) SetAllowMultipleA

func (self *Sound) SetAllowMultipleA(member bool)

SetAllowMultipleA This will allow you to have multiple instances of this Sound playing at once. This is only useful when running under Web Audio, and we recommend you implement a local pooling system to not flood the sound channels.

func (*Sound) SetAutoplayA

func (self *Sound) SetAutoplayA(member bool)

SetAutoplayA Boolean indicating whether the sound should start automatically.

func (*Sound) SetContextA

func (self *Sound) SetContextA(member *AudioContext)

SetContextA Reference to the AudioContext instance.

func (*Sound) SetCurrentMarkerA

func (self *Sound) SetCurrentMarkerA(member string)

SetCurrentMarkerA The string ID of the currently playing marker, if any.

func (*Sound) SetCurrentTimeA

func (self *Sound) SetCurrentTimeA(member int)

SetCurrentTimeA The current time the sound is at.

func (*Sound) SetDurationA

func (self *Sound) SetDurationA(member int)

SetDurationA The duration of the current sound marker in seconds.

func (*Sound) SetDurationMSA

func (self *Sound) SetDurationMSA(member int)

SetDurationMSA The duration of the current sound marker in ms.

func (*Sound) SetExternalNodeA

func (self *Sound) SetExternalNodeA(member interface{})

SetExternalNodeA If defined this Sound won't connect to the SoundManager master gain node, but will instead connect to externalNode.

func (*Sound) SetFadeTweenA

func (self *Sound) SetFadeTweenA(member *Tween)

SetFadeTweenA The tween that fades the audio, set via Sound.fadeIn and Sound.fadeOut.

func (*Sound) SetGainNodeA

func (self *Sound) SetGainNodeA(member interface{})

SetGainNodeA The gain node in a Web Audio system.

func (*Sound) SetGameA

func (self *Sound) SetGameA(member *Game)

SetGameA A reference to the currently running Game.

func (*Sound) SetIsDecodedA

func (self *Sound) SetIsDecodedA(member bool)

SetIsDecodedA Returns true if the sound file has decoded.

func (*Sound) SetIsDecodingA

func (self *Sound) SetIsDecodingA(member bool)

SetIsDecodingA Returns true if the sound file is still decoding.

func (*Sound) SetIsPlayingA

func (self *Sound) SetIsPlayingA(member bool)

SetIsPlayingA true if the sound is currently playing, otherwise false.

func (*Sound) SetKeyA

func (self *Sound) SetKeyA(member string)

SetKeyA Asset key for the sound.

func (*Sound) SetLoopA

func (self *Sound) SetLoopA(member bool)

SetLoopA Whether or not the sound or current sound marker will loop.

func (*Sound) SetMarkersA

func (self *Sound) SetMarkersA(member interface{})

SetMarkersA The sound markers.

func (*Sound) SetMasterGainNodeA

func (self *Sound) SetMasterGainNodeA(member interface{})

SetMasterGainNodeA The master gain node in a Web Audio system.

func (*Sound) SetMuteA

func (self *Sound) SetMuteA(member bool)

SetMuteA Gets or sets the muted state of this sound.

func (*Sound) SetNameA

func (self *Sound) SetNameA(member string)

SetNameA Name of the sound.

func (*Sound) SetOnDecodedA

func (self *Sound) SetOnDecodedA(member *Signal)

SetOnDecodedA The onDecoded event is dispatched when the sound has finished decoding (typically for mp3 files)

func (*Sound) SetOnFadeCompleteA

func (self *Sound) SetOnFadeCompleteA(member *Signal)

SetOnFadeCompleteA The onFadeComplete event is dispatched when this sound finishes fading either in or out.

func (*Sound) SetOnLoopA

func (self *Sound) SetOnLoopA(member *Signal)

SetOnLoopA The onLoop event is dispatched when this sound loops during playback.

func (*Sound) SetOnMarkerCompleteA

func (self *Sound) SetOnMarkerCompleteA(member *Signal)

SetOnMarkerCompleteA The onMarkerComplete event is dispatched when a marker within this sound completes playback.

func (*Sound) SetOnMuteA

func (self *Sound) SetOnMuteA(member *Signal)

SetOnMuteA The onMute event is dispatched when this sound is muted.

func (*Sound) SetOnPauseA

func (self *Sound) SetOnPauseA(member *Signal)

SetOnPauseA The onPause event is dispatched when this sound is paused.

func (*Sound) SetOnPlayA

func (self *Sound) SetOnPlayA(member *Signal)

SetOnPlayA The onPlay event is dispatched each time this sound is played.

func (*Sound) SetOnResumeA

func (self *Sound) SetOnResumeA(member *Signal)

SetOnResumeA The onResume event is dispatched when this sound is resumed from a paused state.

func (*Sound) SetOnStopA

func (self *Sound) SetOnStopA(member *Signal)

SetOnStopA The onStop event is dispatched when this sound stops playback.

func (*Sound) SetOverrideA

func (self *Sound) SetOverrideA(member bool)

SetOverrideA if true when you play this sound it will always start from the beginning.

func (*Sound) SetPausedA

func (self *Sound) SetPausedA(member bool)

SetPausedA true if the sound is paused, otherwise false.

func (*Sound) SetPausedPositionA

func (self *Sound) SetPausedPositionA(member int)

SetPausedPositionA The position the sound had reached when it was paused.

func (*Sound) SetPausedTimeA

func (self *Sound) SetPausedTimeA(member int)

SetPausedTimeA The game time at which the sound was paused.

func (*Sound) SetPendingPlaybackA

func (self *Sound) SetPendingPlaybackA(member bool)

SetPendingPlaybackA true if the sound file is pending playback

func (*Sound) SetPositionA

func (self *Sound) SetPositionA(member int)

SetPositionA The position of the current sound marker.

func (*Sound) SetStartTimeA

func (self *Sound) SetStartTimeA(member int)

SetStartTimeA The time the Sound starts at (typically 0 unless starting from a marker)

func (*Sound) SetStopTimeA

func (self *Sound) SetStopTimeA(member int)

SetStopTimeA The time the sound stopped.

func (*Sound) SetTotalDurationA

func (self *Sound) SetTotalDurationA(member int)

SetTotalDurationA The total duration of the sound in seconds.

func (*Sound) SetUsingAudioTagA

func (self *Sound) SetUsingAudioTagA(member bool)

SetUsingAudioTagA true if the sound is being played via the Audio tag.

func (*Sound) SetUsingWebAudioA

func (self *Sound) SetUsingWebAudioA(member bool)

SetUsingWebAudioA true if this sound is being played with Web Audio.

func (*Sound) SetVolumeA

func (self *Sound) SetVolumeA(member int)

SetVolumeA Gets or sets the volume of this sound, a value between 0 and 1. The value given is clamped to the range 0 to 1.

func (*Sound) SoundHasUnlocked

func (self *Sound) SoundHasUnlocked(key string)

SoundHasUnlocked Called automatically when this sound is unlocked.

func (*Sound) SoundHasUnlockedI

func (self *Sound) SoundHasUnlockedI(args ...interface{})

SoundHasUnlockedI Called automatically when this sound is unlocked.

func (*Sound) StartTime

func (self *Sound) StartTime() int

StartTime The time the Sound starts at (typically 0 unless starting from a marker)

func (*Sound) Stop

func (self *Sound) Stop()

Stop Stop playing this sound.

func (*Sound) StopI

func (self *Sound) StopI(args ...interface{})

StopI Stop playing this sound.

func (*Sound) StopTime

func (self *Sound) StopTime() int

StopTime The time the sound stopped.

func (*Sound) TotalDuration

func (self *Sound) TotalDuration() int

TotalDuration The total duration of the sound in seconds.

func (*Sound) Update

func (self *Sound) Update()

Update Called automatically by Phaser.SoundManager.

func (*Sound) UpdateGlobalVolume

func (self *Sound) UpdateGlobalVolume(globalVolume float64)

UpdateGlobalVolume Called automatically by SoundManager.volume.

Sets the volume of AudioTag Sounds as a percentage of the Global Volume.

You should not normally call this directly.

func (*Sound) UpdateGlobalVolumeI

func (self *Sound) UpdateGlobalVolumeI(args ...interface{})

UpdateGlobalVolumeI Called automatically by SoundManager.volume.

Sets the volume of AudioTag Sounds as a percentage of the Global Volume.

You should not normally call this directly.

func (*Sound) UpdateI

func (self *Sound) UpdateI(args ...interface{})

UpdateI Called automatically by Phaser.SoundManager.

func (*Sound) UsingAudioTag

func (self *Sound) UsingAudioTag() bool

UsingAudioTag true if the sound is being played via the Audio tag.

func (*Sound) UsingWebAudio

func (self *Sound) UsingWebAudio() bool

UsingWebAudio true if this sound is being played with Web Audio.

func (*Sound) Volume

func (self *Sound) Volume() int

Volume Gets or sets the volume of this sound, a value between 0 and 1. The value given is clamped to the range 0 to 1.

type SoundManager

type SoundManager struct {
	*js.Object
}

SoundManager The Sound Manager is responsible for playing back audio via either the Legacy HTML Audio tag or via Web Audio if the browser supports it. Note: On Firefox 25+ on Linux if you have media.gstreamer disabled in about:config then it cannot play back mp3 or m4a files. The audio file type and the encoding of those files are extremely important. Not all browsers can play all audio formats. There is a good guide to what's supported here: http://hpr.dogphilosophy.net/test/

If you are reloading a Phaser Game on a page that never properly refreshes (such as in an AngularJS project) then you will quickly run out of AudioContext nodes. If this is the case create a global var called PhaserGlobal on the window object before creating the game. The active AudioContext will then be saved to window.PhaserGlobal.audioContext when the Phaser game is destroyed, and re-used when it starts again.

Mobile warning: There are some mobile devices (certain iPad 2 and iPad Mini revisions) that cannot play 48000 Hz audio. When they try to play the audio becomes extremely distorted and buzzes, eventually crashing the sound system. The solution is to use a lower encoding rate such as 44100 Hz. Sometimes the audio context will be created with a sampleRate of 48000. If this happens and audio distorts you should re-create the context.

func NewSoundManager

func NewSoundManager(game *Game) *SoundManager

NewSoundManager The Sound Manager is responsible for playing back audio via either the Legacy HTML Audio tag or via Web Audio if the browser supports it. Note: On Firefox 25+ on Linux if you have media.gstreamer disabled in about:config then it cannot play back mp3 or m4a files. The audio file type and the encoding of those files are extremely important. Not all browsers can play all audio formats. There is a good guide to what's supported here: http://hpr.dogphilosophy.net/test/

If you are reloading a Phaser Game on a page that never properly refreshes (such as in an AngularJS project) then you will quickly run out of AudioContext nodes. If this is the case create a global var called PhaserGlobal on the window object before creating the game. The active AudioContext will then be saved to window.PhaserGlobal.audioContext when the Phaser game is destroyed, and re-used when it starts again.

Mobile warning: There are some mobile devices (certain iPad 2 and iPad Mini revisions) that cannot play 48000 Hz audio. When they try to play the audio becomes extremely distorted and buzzes, eventually crashing the sound system. The solution is to use a lower encoding rate such as 44100 Hz. Sometimes the audio context will be created with a sampleRate of 48000. If this happens and audio distorts you should re-create the context.

func NewSoundManagerI

func NewSoundManagerI(args ...interface{}) *SoundManager

NewSoundManagerI The Sound Manager is responsible for playing back audio via either the Legacy HTML Audio tag or via Web Audio if the browser supports it. Note: On Firefox 25+ on Linux if you have media.gstreamer disabled in about:config then it cannot play back mp3 or m4a files. The audio file type and the encoding of those files are extremely important. Not all browsers can play all audio formats. There is a good guide to what's supported here: http://hpr.dogphilosophy.net/test/

If you are reloading a Phaser Game on a page that never properly refreshes (such as in an AngularJS project) then you will quickly run out of AudioContext nodes. If this is the case create a global var called PhaserGlobal on the window object before creating the game. The active AudioContext will then be saved to window.PhaserGlobal.audioContext when the Phaser game is destroyed, and re-used when it starts again.

Mobile warning: There are some mobile devices (certain iPad 2 and iPad Mini revisions) that cannot play 48000 Hz audio. When they try to play the audio becomes extremely distorted and buzzes, eventually crashing the sound system. The solution is to use a lower encoding rate such as 44100 Hz. Sometimes the audio context will be created with a sampleRate of 48000. If this happens and audio distorts you should re-create the context.

func ToSoundManager

func ToSoundManager(jsStruct interface{}) *SoundManager

SoundManager Binding conversion method to SoundManager point

func (*SoundManager) Add

func (self *SoundManager) Add(key string) *Sound

Add Adds a new Sound into the SoundManager.

func (*SoundManager) Add1O

func (self *SoundManager) Add1O(key string, volume int) *Sound

Add1O Adds a new Sound into the SoundManager.

func (*SoundManager) Add2O

func (self *SoundManager) Add2O(key string, volume int, loop bool) *Sound

Add2O Adds a new Sound into the SoundManager.

func (*SoundManager) Add3O

func (self *SoundManager) Add3O(key string, volume int, loop bool, connect bool) *Sound

Add3O Adds a new Sound into the SoundManager.

func (*SoundManager) AddI

func (self *SoundManager) AddI(args ...interface{}) *Sound

AddI Adds a new Sound into the SoundManager.

func (*SoundManager) AddSprite

func (self *SoundManager) AddSprite(key string) *AudioSprite

AddSprite Adds a new AudioSprite into the SoundManager.

func (*SoundManager) AddSpriteI

func (self *SoundManager) AddSpriteI(args ...interface{}) *AudioSprite

AddSpriteI Adds a new AudioSprite into the SoundManager.

func (*SoundManager) Boot

func (self *SoundManager) Boot()

Boot Initialises the sound manager.

func (*SoundManager) BootI

func (self *SoundManager) BootI(args ...interface{})

BootI Initialises the sound manager.

func (*SoundManager) Channels

func (self *SoundManager) Channels() int

Channels The number of audio channels to use in playback.

func (*SoundManager) ConnectToMaster

func (self *SoundManager) ConnectToMaster() bool

ConnectToMaster Used in conjunction with Sound.externalNode this allows you to stop a Sound node being connected to the SoundManager master gain node.

func (*SoundManager) Context

func (self *SoundManager) Context() *AudioContext

Context The AudioContext being used for playback.

func (*SoundManager) Decode

func (self *SoundManager) Decode(key string)

Decode Decode a sound by its asset key.

func (*SoundManager) Decode1O

func (self *SoundManager) Decode1O(key string, sound *Sound)

Decode1O Decode a sound by its asset key.

func (*SoundManager) DecodeI

func (self *SoundManager) DecodeI(args ...interface{})

DecodeI Decode a sound by its asset key.

func (*SoundManager) Destroy

func (self *SoundManager) Destroy()

Destroy Stops all the sounds in the game, then destroys them and finally clears up any callbacks.

func (*SoundManager) DestroyI

func (self *SoundManager) DestroyI(args ...interface{})

DestroyI Stops all the sounds in the game, then destroys them and finally clears up any callbacks.

func (*SoundManager) Game

func (self *SoundManager) Game() *Game

Game Local reference to game.

func (*SoundManager) Mute

func (self *SoundManager) Mute() bool

Mute Gets or sets the muted state of the SoundManager. This effects all sounds in the game.

func (*SoundManager) MuteOnPause

func (self *SoundManager) MuteOnPause() bool

MuteOnPause Set to true to have all sound muted when the Phaser game pauses (such as on loss of focus), or set to false to keep audio playing, regardless of the game pause state. You may need to do this should you wish to control audio muting via external DOM buttons or similar.

func (*SoundManager) NoAudio

func (self *SoundManager) NoAudio() bool

NoAudio True if audio been disabled via the PhaserGlobal (useful if you need to use a 3rd party audio library) or the device doesn't support any audio.

func (*SoundManager) OnMute

func (self *SoundManager) OnMute() *Signal

OnMute This signal is dispatched when the SoundManager is globally muted, either directly via game code or as a result of the game pausing.

func (*SoundManager) OnSoundDecode

func (self *SoundManager) OnSoundDecode() *Signal

OnSoundDecode The event dispatched when a sound decodes (typically only for mp3 files)

func (*SoundManager) OnUnMute

func (self *SoundManager) OnUnMute() *Signal

OnUnMute This signal is dispatched when the SoundManager is globally un-muted, either directly via game code or as a result of the game resuming from a pause.

func (*SoundManager) OnVolumeChange

func (self *SoundManager) OnVolumeChange() *Signal

OnVolumeChange This signal is dispatched whenever the global volume changes. The new volume is passed as the only parameter to your callback.

func (*SoundManager) PauseAll

func (self *SoundManager) PauseAll()

PauseAll Pauses all the sounds in the game.

func (*SoundManager) PauseAllI

func (self *SoundManager) PauseAllI(args ...interface{})

PauseAllI Pauses all the sounds in the game.

func (*SoundManager) Play

func (self *SoundManager) Play(key string) *Sound

Play Adds a new Sound into the SoundManager and starts it playing.

func (*SoundManager) Play1O

func (self *SoundManager) Play1O(key string, volume int) *Sound

Play1O Adds a new Sound into the SoundManager and starts it playing.

func (*SoundManager) Play2O

func (self *SoundManager) Play2O(key string, volume int, loop bool) *Sound

Play2O Adds a new Sound into the SoundManager and starts it playing.

func (*SoundManager) PlayI

func (self *SoundManager) PlayI(args ...interface{}) *Sound

PlayI Adds a new Sound into the SoundManager and starts it playing.

func (*SoundManager) Remove

func (self *SoundManager) Remove(sound *Sound) bool

Remove Removes a Sound from the SoundManager. The removed Sound is destroyed before removal.

func (*SoundManager) RemoveByKey

func (self *SoundManager) RemoveByKey(key string) int

RemoveByKey Removes all Sounds from the SoundManager that have an asset key matching the given value. The removed Sounds are destroyed before removal.

func (*SoundManager) RemoveByKeyI

func (self *SoundManager) RemoveByKeyI(args ...interface{}) int

RemoveByKeyI Removes all Sounds from the SoundManager that have an asset key matching the given value. The removed Sounds are destroyed before removal.

func (*SoundManager) RemoveI

func (self *SoundManager) RemoveI(args ...interface{}) bool

RemoveI Removes a Sound from the SoundManager. The removed Sound is destroyed before removal.

func (*SoundManager) ResumeAll

func (self *SoundManager) ResumeAll()

ResumeAll Resumes every sound in the game.

func (*SoundManager) ResumeAllI

func (self *SoundManager) ResumeAllI(args ...interface{})

ResumeAllI Resumes every sound in the game.

func (*SoundManager) SetChannelsA

func (self *SoundManager) SetChannelsA(member int)

SetChannelsA The number of audio channels to use in playback.

func (*SoundManager) SetConnectToMasterA

func (self *SoundManager) SetConnectToMasterA(member bool)

SetConnectToMasterA Used in conjunction with Sound.externalNode this allows you to stop a Sound node being connected to the SoundManager master gain node.

func (*SoundManager) SetContextA

func (self *SoundManager) SetContextA(member *AudioContext)

SetContextA The AudioContext being used for playback.

func (*SoundManager) SetDecodedCallback

func (self *SoundManager) SetDecodedCallback(files interface{}, callback interface{}, callbackContext interface{})

SetDecodedCallback This method allows you to give the SoundManager a list of Sound files, or keys, and a callback. Once all of the Sound files have finished decoding the callback will be invoked. The amount of time spent decoding depends on the codec used and file size. If all of the files given have already decoded the callback is triggered immediately.

func (*SoundManager) SetDecodedCallbackI

func (self *SoundManager) SetDecodedCallbackI(args ...interface{})

SetDecodedCallbackI This method allows you to give the SoundManager a list of Sound files, or keys, and a callback. Once all of the Sound files have finished decoding the callback will be invoked. The amount of time spent decoding depends on the codec used and file size. If all of the files given have already decoded the callback is triggered immediately.

func (*SoundManager) SetGameA

func (self *SoundManager) SetGameA(member *Game)

SetGameA Local reference to game.

func (*SoundManager) SetMute

func (self *SoundManager) SetMute()

SetMute Internal mute handler called automatically by the SoundManager.mute setter.

func (*SoundManager) SetMuteA

func (self *SoundManager) SetMuteA(member bool)

SetMuteA Gets or sets the muted state of the SoundManager. This effects all sounds in the game.

func (*SoundManager) SetMuteI

func (self *SoundManager) SetMuteI(args ...interface{})

SetMuteI Internal mute handler called automatically by the SoundManager.mute setter.

func (*SoundManager) SetMuteOnPauseA

func (self *SoundManager) SetMuteOnPauseA(member bool)

SetMuteOnPauseA Set to true to have all sound muted when the Phaser game pauses (such as on loss of focus), or set to false to keep audio playing, regardless of the game pause state. You may need to do this should you wish to control audio muting via external DOM buttons or similar.

func (*SoundManager) SetNoAudioA

func (self *SoundManager) SetNoAudioA(member bool)

SetNoAudioA True if audio been disabled via the PhaserGlobal (useful if you need to use a 3rd party audio library) or the device doesn't support any audio.

func (*SoundManager) SetOnMuteA

func (self *SoundManager) SetOnMuteA(member *Signal)

SetOnMuteA This signal is dispatched when the SoundManager is globally muted, either directly via game code or as a result of the game pausing.

func (*SoundManager) SetOnSoundDecodeA

func (self *SoundManager) SetOnSoundDecodeA(member *Signal)

SetOnSoundDecodeA The event dispatched when a sound decodes (typically only for mp3 files)

func (*SoundManager) SetOnUnMuteA

func (self *SoundManager) SetOnUnMuteA(member *Signal)

SetOnUnMuteA This signal is dispatched when the SoundManager is globally un-muted, either directly via game code or as a result of the game resuming from a pause.

func (*SoundManager) SetOnVolumeChangeA

func (self *SoundManager) SetOnVolumeChangeA(member *Signal)

SetOnVolumeChangeA This signal is dispatched whenever the global volume changes. The new volume is passed as the only parameter to your callback.

func (*SoundManager) SetTouchLock

func (self *SoundManager) SetTouchLock()

SetTouchLock Sets the Input Manager touch callback to be SoundManager.unlock. Required for iOS audio device unlocking. Mostly just used internally.

func (*SoundManager) SetTouchLockI

func (self *SoundManager) SetTouchLockI(args ...interface{})

SetTouchLockI Sets the Input Manager touch callback to be SoundManager.unlock. Required for iOS audio device unlocking. Mostly just used internally.

func (*SoundManager) SetTouchLockedA

func (self *SoundManager) SetTouchLockedA(member bool)

SetTouchLockedA true if the audio system is currently locked awaiting a touch event.

func (*SoundManager) SetUsingAudioTagA

func (self *SoundManager) SetUsingAudioTagA(member bool)

SetUsingAudioTagA True the SoundManager and device are both using the Audio tag instead of Web Audio.

func (*SoundManager) SetUsingWebAudioA

func (self *SoundManager) SetUsingWebAudioA(member bool)

SetUsingWebAudioA True the SoundManager and device are both using Web Audio.

func (*SoundManager) SetVolumeA

func (self *SoundManager) SetVolumeA(member int)

SetVolumeA Gets or sets the global volume of the SoundManager, a value between 0 and 1. The value given is clamped to the range 0 to 1.

func (*SoundManager) StopAll

func (self *SoundManager) StopAll()

StopAll Stops all the sounds in the game.

func (*SoundManager) StopAllI

func (self *SoundManager) StopAllI(args ...interface{})

StopAllI Stops all the sounds in the game.

func (*SoundManager) TouchLocked

func (self *SoundManager) TouchLocked() bool

TouchLocked true if the audio system is currently locked awaiting a touch event.

func (*SoundManager) Unlock

func (self *SoundManager) Unlock() bool

Unlock Enables the audio, usually after the first touch.

func (*SoundManager) UnlockI

func (self *SoundManager) UnlockI(args ...interface{}) bool

UnlockI Enables the audio, usually after the first touch.

func (*SoundManager) UnsetMute

func (self *SoundManager) UnsetMute()

UnsetMute Internal mute handler called automatically by the SoundManager.mute setter.

func (*SoundManager) UnsetMuteI

func (self *SoundManager) UnsetMuteI(args ...interface{})

UnsetMuteI Internal mute handler called automatically by the SoundManager.mute setter.

func (*SoundManager) Update

func (self *SoundManager) Update()

Update Updates every sound in the game, checks for audio unlock on mobile and monitors the decoding watch list.

func (*SoundManager) UpdateI

func (self *SoundManager) UpdateI(args ...interface{})

UpdateI Updates every sound in the game, checks for audio unlock on mobile and monitors the decoding watch list.

func (*SoundManager) UsingAudioTag

func (self *SoundManager) UsingAudioTag() bool

UsingAudioTag True the SoundManager and device are both using the Audio tag instead of Web Audio.

func (*SoundManager) UsingWebAudio

func (self *SoundManager) UsingWebAudio() bool

UsingWebAudio True the SoundManager and device are both using Web Audio.

func (*SoundManager) Volume

func (self *SoundManager) Volume() int

Volume Gets or sets the global volume of the SoundManager, a value between 0 and 1. The value given is clamped to the range 0 to 1.

type Sprite

type Sprite struct {
	*js.Object
}

Sprite Sprites are the lifeblood of your game, used for nearly everything visual.

At its most basic a Sprite consists of a set of coordinates and a texture that is rendered to the canvas. They also contain additional properties allowing for physics motion (via Sprite.body), input handling (via Sprite.input), events (via Sprite.events), animation (via Sprite.animations), camera culling and more. Please see the Examples for use cases.

func NewSprite

func NewSprite(game *Game, x int, y int, key interface{}, frame interface{}) *Sprite

NewSprite Sprites are the lifeblood of your game, used for nearly everything visual.

At its most basic a Sprite consists of a set of coordinates and a texture that is rendered to the canvas. They also contain additional properties allowing for physics motion (via Sprite.body), input handling (via Sprite.input), events (via Sprite.events), animation (via Sprite.animations), camera culling and more. Please see the Examples for use cases.

func NewSpriteI

func NewSpriteI(args ...interface{}) *Sprite

NewSpriteI Sprites are the lifeblood of your game, used for nearly everything visual.

At its most basic a Sprite consists of a set of coordinates and a texture that is rendered to the canvas. They also contain additional properties allowing for physics motion (via Sprite.body), input handling (via Sprite.input), events (via Sprite.events), animation (via Sprite.animations), camera culling and more. Please see the Examples for use cases.

func ToSprite

func ToSprite(jsStruct interface{}) *Sprite

Sprite Binding conversion method to Sprite point

func (*Sprite) AddChild

func (self *Sprite) AddChild(child *DisplayObject) *DisplayObject

AddChild Adds a child to the container.

func (*Sprite) AddChildAt

func (self *Sprite) AddChildAt(child *DisplayObject, index int) *DisplayObject

AddChildAt Adds a child to the container at a specified index. If the index is out of bounds an error will be thrown

func (*Sprite) AddChildAtI

func (self *Sprite) AddChildAtI(args ...interface{}) *DisplayObject

AddChildAtI Adds a child to the container at a specified index. If the index is out of bounds an error will be thrown

func (*Sprite) AddChildI

func (self *Sprite) AddChildI(args ...interface{}) *DisplayObject

AddChildI Adds a child to the container.

func (*Sprite) AlignIn

func (self *Sprite) AlignIn(container interface{}) interface{}

AlignIn Aligns this Game Object within another Game Object, or Rectangle, known as the 'container', to one of 9 possible positions.

The container must be a Game Object, or Phaser.Rectangle object. This can include properties such as `World.bounds` or `Camera.view`, for aligning Game Objects within the world and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText, TileSprites or Buttons.

Please note that aligning a Sprite to another Game Object does **not** make it a child of the container. It simply modifies its position coordinates so it aligns with it.

The position constants you can use are:

`Phaser.TOP_LEFT`, `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

The Game Objects are placed in such a way that their _bounds_ align with the container, taking into consideration rotation, scale and the anchor property. This allows you to neatly align Game Objects, irrespective of their position value.

The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final aligned position of the Game Object. For example:

`sprite.alignIn(background, Phaser.BOTTOM_RIGHT, -20, -20)`

Would align the `sprite` to the bottom-right, but moved 20 pixels in from the corner. Think of the offsets as applying an adjustment to the containers bounds before the alignment takes place. So providing a negative offset will 'shrink' the container bounds by that amount, and providing a positive one expands it.

func (*Sprite) AlignIn1O

func (self *Sprite) AlignIn1O(container interface{}, position int) interface{}

AlignIn1O Aligns this Game Object within another Game Object, or Rectangle, known as the 'container', to one of 9 possible positions.

The container must be a Game Object, or Phaser.Rectangle object. This can include properties such as `World.bounds` or `Camera.view`, for aligning Game Objects within the world and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText, TileSprites or Buttons.

Please note that aligning a Sprite to another Game Object does **not** make it a child of the container. It simply modifies its position coordinates so it aligns with it.

The position constants you can use are:

`Phaser.TOP_LEFT`, `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

The Game Objects are placed in such a way that their _bounds_ align with the container, taking into consideration rotation, scale and the anchor property. This allows you to neatly align Game Objects, irrespective of their position value.

The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final aligned position of the Game Object. For example:

`sprite.alignIn(background, Phaser.BOTTOM_RIGHT, -20, -20)`

Would align the `sprite` to the bottom-right, but moved 20 pixels in from the corner. Think of the offsets as applying an adjustment to the containers bounds before the alignment takes place. So providing a negative offset will 'shrink' the container bounds by that amount, and providing a positive one expands it.

func (*Sprite) AlignIn2O

func (self *Sprite) AlignIn2O(container interface{}, position int, offsetX int) interface{}

AlignIn2O Aligns this Game Object within another Game Object, or Rectangle, known as the 'container', to one of 9 possible positions.

The container must be a Game Object, or Phaser.Rectangle object. This can include properties such as `World.bounds` or `Camera.view`, for aligning Game Objects within the world and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText, TileSprites or Buttons.

Please note that aligning a Sprite to another Game Object does **not** make it a child of the container. It simply modifies its position coordinates so it aligns with it.

The position constants you can use are:

`Phaser.TOP_LEFT`, `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

The Game Objects are placed in such a way that their _bounds_ align with the container, taking into consideration rotation, scale and the anchor property. This allows you to neatly align Game Objects, irrespective of their position value.

The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final aligned position of the Game Object. For example:

`sprite.alignIn(background, Phaser.BOTTOM_RIGHT, -20, -20)`

Would align the `sprite` to the bottom-right, but moved 20 pixels in from the corner. Think of the offsets as applying an adjustment to the containers bounds before the alignment takes place. So providing a negative offset will 'shrink' the container bounds by that amount, and providing a positive one expands it.

func (*Sprite) AlignIn3O

func (self *Sprite) AlignIn3O(container interface{}, position int, offsetX int, offsetY int) interface{}

AlignIn3O Aligns this Game Object within another Game Object, or Rectangle, known as the 'container', to one of 9 possible positions.

The container must be a Game Object, or Phaser.Rectangle object. This can include properties such as `World.bounds` or `Camera.view`, for aligning Game Objects within the world and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText, TileSprites or Buttons.

Please note that aligning a Sprite to another Game Object does **not** make it a child of the container. It simply modifies its position coordinates so it aligns with it.

The position constants you can use are:

`Phaser.TOP_LEFT`, `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

The Game Objects are placed in such a way that their _bounds_ align with the container, taking into consideration rotation, scale and the anchor property. This allows you to neatly align Game Objects, irrespective of their position value.

The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final aligned position of the Game Object. For example:

`sprite.alignIn(background, Phaser.BOTTOM_RIGHT, -20, -20)`

Would align the `sprite` to the bottom-right, but moved 20 pixels in from the corner. Think of the offsets as applying an adjustment to the containers bounds before the alignment takes place. So providing a negative offset will 'shrink' the container bounds by that amount, and providing a positive one expands it.

func (*Sprite) AlignInI

func (self *Sprite) AlignInI(args ...interface{}) interface{}

AlignInI Aligns this Game Object within another Game Object, or Rectangle, known as the 'container', to one of 9 possible positions.

The container must be a Game Object, or Phaser.Rectangle object. This can include properties such as `World.bounds` or `Camera.view`, for aligning Game Objects within the world and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText, TileSprites or Buttons.

Please note that aligning a Sprite to another Game Object does **not** make it a child of the container. It simply modifies its position coordinates so it aligns with it.

The position constants you can use are:

`Phaser.TOP_LEFT`, `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

The Game Objects are placed in such a way that their _bounds_ align with the container, taking into consideration rotation, scale and the anchor property. This allows you to neatly align Game Objects, irrespective of their position value.

The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final aligned position of the Game Object. For example:

`sprite.alignIn(background, Phaser.BOTTOM_RIGHT, -20, -20)`

Would align the `sprite` to the bottom-right, but moved 20 pixels in from the corner. Think of the offsets as applying an adjustment to the containers bounds before the alignment takes place. So providing a negative offset will 'shrink' the container bounds by that amount, and providing a positive one expands it.

func (*Sprite) AlignTo

func (self *Sprite) AlignTo(parent interface{}) interface{}

AlignTo Aligns this Game Object to the side of another Game Object, or Rectangle, known as the 'parent', in one of 11 possible positions.

The parent must be a Game Object, or Phaser.Rectangle object. This can include properties such as `World.bounds` or `Camera.view`, for aligning Game Objects within the world and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText, TileSprites or Buttons.

Please note that aligning a Sprite to another Game Object does **not** make it a child of the parent. It simply modifies its position coordinates so it aligns with it.

The position constants you can use are:

`Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_TOP`, `Phaser.LEFT_CENTER`, `Phaser.LEFT_BOTTOM`, `Phaser.RIGHT_TOP`, `Phaser.RIGHT_CENTER`, `Phaser.RIGHT_BOTTOM`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

The Game Objects are placed in such a way that their _bounds_ align with the parent, taking into consideration rotation, scale and the anchor property. This allows you to neatly align Game Objects, irrespective of their position value.

The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final aligned position of the Game Object. For example:

`sprite.alignTo(background, Phaser.BOTTOM_RIGHT, -20, -20)`

Would align the `sprite` to the bottom-right, but moved 20 pixels in from the corner. Think of the offsets as applying an adjustment to the parents bounds before the alignment takes place. So providing a negative offset will 'shrink' the parent bounds by that amount, and providing a positive one expands it.

func (*Sprite) AlignTo1O

func (self *Sprite) AlignTo1O(parent interface{}, position int) interface{}

AlignTo1O Aligns this Game Object to the side of another Game Object, or Rectangle, known as the 'parent', in one of 11 possible positions.

The parent must be a Game Object, or Phaser.Rectangle object. This can include properties such as `World.bounds` or `Camera.view`, for aligning Game Objects within the world and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText, TileSprites or Buttons.

Please note that aligning a Sprite to another Game Object does **not** make it a child of the parent. It simply modifies its position coordinates so it aligns with it.

The position constants you can use are:

`Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_TOP`, `Phaser.LEFT_CENTER`, `Phaser.LEFT_BOTTOM`, `Phaser.RIGHT_TOP`, `Phaser.RIGHT_CENTER`, `Phaser.RIGHT_BOTTOM`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

The Game Objects are placed in such a way that their _bounds_ align with the parent, taking into consideration rotation, scale and the anchor property. This allows you to neatly align Game Objects, irrespective of their position value.

The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final aligned position of the Game Object. For example:

`sprite.alignTo(background, Phaser.BOTTOM_RIGHT, -20, -20)`

Would align the `sprite` to the bottom-right, but moved 20 pixels in from the corner. Think of the offsets as applying an adjustment to the parents bounds before the alignment takes place. So providing a negative offset will 'shrink' the parent bounds by that amount, and providing a positive one expands it.

func (*Sprite) AlignTo2O

func (self *Sprite) AlignTo2O(parent interface{}, position int, offsetX int) interface{}

AlignTo2O Aligns this Game Object to the side of another Game Object, or Rectangle, known as the 'parent', in one of 11 possible positions.

The parent must be a Game Object, or Phaser.Rectangle object. This can include properties such as `World.bounds` or `Camera.view`, for aligning Game Objects within the world and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText, TileSprites or Buttons.

Please note that aligning a Sprite to another Game Object does **not** make it a child of the parent. It simply modifies its position coordinates so it aligns with it.

The position constants you can use are:

`Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_TOP`, `Phaser.LEFT_CENTER`, `Phaser.LEFT_BOTTOM`, `Phaser.RIGHT_TOP`, `Phaser.RIGHT_CENTER`, `Phaser.RIGHT_BOTTOM`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

The Game Objects are placed in such a way that their _bounds_ align with the parent, taking into consideration rotation, scale and the anchor property. This allows you to neatly align Game Objects, irrespective of their position value.

The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final aligned position of the Game Object. For example:

`sprite.alignTo(background, Phaser.BOTTOM_RIGHT, -20, -20)`

Would align the `sprite` to the bottom-right, but moved 20 pixels in from the corner. Think of the offsets as applying an adjustment to the parents bounds before the alignment takes place. So providing a negative offset will 'shrink' the parent bounds by that amount, and providing a positive one expands it.

func (*Sprite) AlignTo3O

func (self *Sprite) AlignTo3O(parent interface{}, position int, offsetX int, offsetY int) interface{}

AlignTo3O Aligns this Game Object to the side of another Game Object, or Rectangle, known as the 'parent', in one of 11 possible positions.

The parent must be a Game Object, or Phaser.Rectangle object. This can include properties such as `World.bounds` or `Camera.view`, for aligning Game Objects within the world and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText, TileSprites or Buttons.

Please note that aligning a Sprite to another Game Object does **not** make it a child of the parent. It simply modifies its position coordinates so it aligns with it.

The position constants you can use are:

`Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_TOP`, `Phaser.LEFT_CENTER`, `Phaser.LEFT_BOTTOM`, `Phaser.RIGHT_TOP`, `Phaser.RIGHT_CENTER`, `Phaser.RIGHT_BOTTOM`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

The Game Objects are placed in such a way that their _bounds_ align with the parent, taking into consideration rotation, scale and the anchor property. This allows you to neatly align Game Objects, irrespective of their position value.

The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final aligned position of the Game Object. For example:

`sprite.alignTo(background, Phaser.BOTTOM_RIGHT, -20, -20)`

Would align the `sprite` to the bottom-right, but moved 20 pixels in from the corner. Think of the offsets as applying an adjustment to the parents bounds before the alignment takes place. So providing a negative offset will 'shrink' the parent bounds by that amount, and providing a positive one expands it.

func (*Sprite) AlignToI

func (self *Sprite) AlignToI(args ...interface{}) interface{}

AlignToI Aligns this Game Object to the side of another Game Object, or Rectangle, known as the 'parent', in one of 11 possible positions.

The parent must be a Game Object, or Phaser.Rectangle object. This can include properties such as `World.bounds` or `Camera.view`, for aligning Game Objects within the world and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText, TileSprites or Buttons.

Please note that aligning a Sprite to another Game Object does **not** make it a child of the parent. It simply modifies its position coordinates so it aligns with it.

The position constants you can use are:

`Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_TOP`, `Phaser.LEFT_CENTER`, `Phaser.LEFT_BOTTOM`, `Phaser.RIGHT_TOP`, `Phaser.RIGHT_CENTER`, `Phaser.RIGHT_BOTTOM`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

The Game Objects are placed in such a way that their _bounds_ align with the parent, taking into consideration rotation, scale and the anchor property. This allows you to neatly align Game Objects, irrespective of their position value.

The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final aligned position of the Game Object. For example:

`sprite.alignTo(background, Phaser.BOTTOM_RIGHT, -20, -20)`

Would align the `sprite` to the bottom-right, but moved 20 pixels in from the corner. Think of the offsets as applying an adjustment to the parents bounds before the alignment takes place. So providing a negative offset will 'shrink' the parent bounds by that amount, and providing a positive one expands it.

func (*Sprite) Alive

func (self *Sprite) Alive() bool

Alive A useful flag to control if the Game Object is alive or dead.

This is set automatically by the Health components `damage` method should the object run out of health. Or you can toggle it via your game code.

This property is mostly just provided to be used by your game - it doesn't effect rendering or logic updates. However you can use `Group.getFirstAlive` in conjunction with this property for fast object pooling and recycling.

func (*Sprite) Anchor

func (self *Sprite) Anchor() *Point

Anchor The anchor sets the origin point of the texture.

The default is 0,0 this means the texture's origin is the top left

Setting than anchor to 0.5,0.5 means the textures origin is centered

Setting the anchor to 1,1 would mean the textures origin points will be the bottom right corner

func (*Sprite) Angle

func (self *Sprite) Angle() int

Angle The angle property is the rotation of the Game Object in *degrees* from its original orientation.

Values from 0 to 180 represent clockwise rotation; values from 0 to -180 represent counterclockwise rotation.

Values outside this range are added to or subtracted from 360 to obtain a value within the range. For example, the statement player.angle = 450 is the same as player.angle = 90.

If you wish to work in radians instead of degrees you can use the property `rotation` instead. Working in radians is slightly faster as it doesn't have to perform any calculations.

func (*Sprite) Animations

func (self *Sprite) Animations() *AnimationManager

Animations If the Game Object is enabled for animation (such as a Phaser.Sprite) this is a reference to its AnimationManager instance. Through it you can create, play, pause and stop animations.

func (*Sprite) AutoCull

func (self *Sprite) AutoCull() bool

AutoCull A Game Object with `autoCull` set to true will check its bounds against the World Camera every frame. If it is not intersecting the Camera bounds at any point then it has its `renderable` property set to `false`. This keeps the Game Object alive and still processing updates, but forces it to skip the render step entirely.

This is a relatively expensive operation, especially if enabled on hundreds of Game Objects. So enable it only if you know it's required, or you have tested performance and find it acceptable.

func (*Sprite) BlendMode

func (self *Sprite) BlendMode() int

BlendMode The blend mode to be applied to the sprite. Set to PIXI.blendModes.NORMAL to remove any blend mode.

Warning: You cannot have a blend mode and a filter active on the same Sprite. Doing so will render the sprite invisible.

func (*Sprite) Body

func (self *Sprite) Body() interface{}

Body `body` is the Game Objects physics body. Once a Game Object is enabled for physics you access all associated properties and methods via it.

By default Game Objects won't add themselves to any physics system and their `body` property will be `null`.

To enable this Game Object for physics you need to call `game.physics.enable(object, system)` where `object` is this object and `system` is the Physics system you are using. If none is given it defaults to `Phaser.Physics.Arcade`.

You can alternatively call `game.physics.arcade.enable(object)`, or add this Game Object to a physics enabled Group.

Important: Enabling a Game Object for P2 or Ninja physics will automatically set its `anchor` property to 0.5, so the physics body is centered on the Game Object.

If you need a different result then adjust or re-create the Body shape offsets manually or reset the anchor after enabling physics.

func (*Sprite) Bottom

func (self *Sprite) Bottom() int

Bottom The sum of the y and height properties. This is the same as `y + height - offsetY`.

func (*Sprite) BringToTop

func (self *Sprite) BringToTop() *DisplayObject

BringToTop Brings this Game Object to the top of its parents display list. Visually this means it will render over the top of any old child in the same Group.

If this Game Object hasn't been added to a custom Group then this method will bring it to the top of the Game World, because the World is the root Group from which all Game Objects descend.

func (*Sprite) BringToTopI

func (self *Sprite) BringToTopI(args ...interface{}) *DisplayObject

BringToTopI Brings this Game Object to the top of its parents display list. Visually this means it will render over the top of any old child in the same Group.

If this Game Object hasn't been added to a custom Group then this method will bring it to the top of the Game World, because the World is the root Group from which all Game Objects descend.

func (*Sprite) CameraOffset

func (self *Sprite) CameraOffset() *Point

CameraOffset The x/y coordinate offset applied to the top-left of the camera that this Game Object will be drawn at if `fixedToCamera` is true.

The values are relative to the top-left of the camera view and in addition to any parent of the Game Object on the display list.

func (*Sprite) CenterX

func (self *Sprite) CenterX() int

CenterX The center x coordinate of the Game Object. This is the same as `(x - offsetX) + (width / 2)`.

func (*Sprite) CenterY

func (self *Sprite) CenterY() int

CenterY The center y coordinate of the Game Object. This is the same as `(y - offsetY) + (height / 2)`.

func (*Sprite) CheckTransform

func (self *Sprite) CheckTransform(wt *Matrix)

CheckTransform Adjust scaling limits, if set, to this Game Object.

func (*Sprite) CheckTransformI

func (self *Sprite) CheckTransformI(args ...interface{})

CheckTransformI Adjust scaling limits, if set, to this Game Object.

func (*Sprite) CheckWorldBounds

func (self *Sprite) CheckWorldBounds() bool

CheckWorldBounds If this is set to `true` the Game Object checks if it is within the World bounds each frame.

When it is no longer intersecting the world bounds it dispatches the `onOutOfBounds` event.

If it was *previously* out of bounds but is now intersecting the world bounds again it dispatches the `onEnterBounds` event.

It also optionally kills the Game Object if `outOfBoundsKill` is `true`.

When `checkWorldBounds` is enabled it forces the Game Object to calculate its full bounds every frame.

This is a relatively expensive operation, especially if enabled on hundreds of Game Objects. So enable it only if you know it's required, or you have tested performance and find it acceptable.

func (*Sprite) Children

func (self *Sprite) Children() []DisplayObject

Children [read-only] The array of children of this container.

func (*Sprite) Components

func (self *Sprite) Components() interface{}

Components The components this Game Object has installed.

func (*Sprite) Contains

func (self *Sprite) Contains(child *DisplayObject) bool

Contains Determines whether the specified display object is a child of the DisplayObjectContainer instance or the instance itself.

func (*Sprite) ContainsI

func (self *Sprite) ContainsI(args ...interface{}) bool

ContainsI Determines whether the specified display object is a child of the DisplayObjectContainer instance or the instance itself.

func (*Sprite) Crop

func (self *Sprite) Crop(rect *Rectangle)

Crop Crop allows you to crop the texture being used to display this Game Object. Setting a crop rectangle modifies the core texture frame. The Game Object width and height properties will be adjusted accordingly.

Cropping takes place from the top-left and can be modified in real-time either by providing an updated rectangle object to this method, or by modifying `cropRect` property directly and then calling `updateCrop`.

The rectangle object given to this method can be either a `Phaser.Rectangle` or any other object so long as it has public `x`, `y`, `width`, `height`, `right` and `bottom` properties.

A reference to the rectangle is stored in `cropRect` unless the `copy` parameter is `true`, in which case the values are duplicated to a local object.

func (*Sprite) Crop1O

func (self *Sprite) Crop1O(rect *Rectangle, copy bool)

Crop1O Crop allows you to crop the texture being used to display this Game Object. Setting a crop rectangle modifies the core texture frame. The Game Object width and height properties will be adjusted accordingly.

Cropping takes place from the top-left and can be modified in real-time either by providing an updated rectangle object to this method, or by modifying `cropRect` property directly and then calling `updateCrop`.

The rectangle object given to this method can be either a `Phaser.Rectangle` or any other object so long as it has public `x`, `y`, `width`, `height`, `right` and `bottom` properties.

A reference to the rectangle is stored in `cropRect` unless the `copy` parameter is `true`, in which case the values are duplicated to a local object.

func (*Sprite) CropI

func (self *Sprite) CropI(args ...interface{})

CropI Crop allows you to crop the texture being used to display this Game Object. Setting a crop rectangle modifies the core texture frame. The Game Object width and height properties will be adjusted accordingly.

Cropping takes place from the top-left and can be modified in real-time either by providing an updated rectangle object to this method, or by modifying `cropRect` property directly and then calling `updateCrop`.

The rectangle object given to this method can be either a `Phaser.Rectangle` or any other object so long as it has public `x`, `y`, `width`, `height`, `right` and `bottom` properties.

A reference to the rectangle is stored in `cropRect` unless the `copy` parameter is `true`, in which case the values are duplicated to a local object.

func (*Sprite) CropRect

func (self *Sprite) CropRect() *Rectangle

CropRect The Rectangle used to crop the texture this Game Object uses. Set this property via `crop`. If you modify this property directly you must call `updateCrop` in order to have the change take effect.

func (*Sprite) Damage

func (self *Sprite) Damage() interface{}

Damage Damages the Game Object. This removes the given amount of health from the `health` property.

If health is taken below or is equal to zero then the `kill` method is called.

func (*Sprite) Data

func (self *Sprite) Data() interface{}

Data An empty Object that belongs to this Game Object. This value isn't ever used internally by Phaser, but may be used by your own code, or by Phaser Plugins, to store data that needs to be associated with the Game Object, without polluting the Game Object directly.

func (*Sprite) Debug

func (self *Sprite) Debug() bool

Debug A debug flag designed for use with `Game.enableStep`.

func (*Sprite) DeltaX

func (self *Sprite) DeltaX() int

DeltaX Returns the delta x value. The difference between world.x now and in the previous frame.

The value will be positive if the Game Object has moved to the right or negative if to the left.

func (*Sprite) DeltaY

func (self *Sprite) DeltaY() int

DeltaY Returns the delta y value. The difference between world.y now and in the previous frame.

The value will be positive if the Game Object has moved down or negative if up.

func (*Sprite) DeltaZ

func (self *Sprite) DeltaZ() int

DeltaZ Returns the delta z value. The difference between rotation now and in the previous frame. The delta value.

func (*Sprite) Destroy

func (self *Sprite) Destroy()

Destroy Destroys the Game Object. This removes it from its parent group, destroys the input, event and animation handlers if present and nulls its reference to `game`, freeing it up for garbage collection.

If this Game Object has the Events component it will also dispatch the `onDestroy` event.

You can optionally also destroy the BaseTexture this Game Object is using. Be careful if you've more than one Game Object sharing the same BaseTexture.

func (*Sprite) Destroy1O

func (self *Sprite) Destroy1O(destroyChildren bool)

Destroy1O Destroys the Game Object. This removes it from its parent group, destroys the input, event and animation handlers if present and nulls its reference to `game`, freeing it up for garbage collection.

If this Game Object has the Events component it will also dispatch the `onDestroy` event.

You can optionally also destroy the BaseTexture this Game Object is using. Be careful if you've more than one Game Object sharing the same BaseTexture.

func (*Sprite) Destroy2O

func (self *Sprite) Destroy2O(destroyChildren bool, destroyTexture bool)

Destroy2O Destroys the Game Object. This removes it from its parent group, destroys the input, event and animation handlers if present and nulls its reference to `game`, freeing it up for garbage collection.

If this Game Object has the Events component it will also dispatch the `onDestroy` event.

You can optionally also destroy the BaseTexture this Game Object is using. Be careful if you've more than one Game Object sharing the same BaseTexture.

func (*Sprite) DestroyI

func (self *Sprite) DestroyI(args ...interface{})

DestroyI Destroys the Game Object. This removes it from its parent group, destroys the input, event and animation handlers if present and nulls its reference to `game`, freeing it up for garbage collection.

If this Game Object has the Events component it will also dispatch the `onDestroy` event.

You can optionally also destroy the BaseTexture this Game Object is using. Be careful if you've more than one Game Object sharing the same BaseTexture.

func (*Sprite) DestroyPhase

func (self *Sprite) DestroyPhase() bool

DestroyPhase As a Game Object runs through its destroy method this flag is set to true, and can be checked in any sub-systems or plugins it is being destroyed from.

func (*Sprite) Events

func (self *Sprite) Events() *Events

Events All Phaser Game Objects have an Events class which contains all of the events that are dispatched when certain things happen to this Game Object, or any of its components.

func (*Sprite) Exists

func (self *Sprite) Exists() bool

Exists Controls if this Sprite is processed by the core Phaser game loops and Group loops.

func (*Sprite) FixedToCamera

func (self *Sprite) FixedToCamera() bool

FixedToCamera A Game Object that is "fixed" to the camera uses its x/y coordinates as offsets from the top left of the camera during rendering.

The values are adjusted at the rendering stage, overriding the Game Objects actual world position.

The end result is that the Game Object will appear to be 'fixed' to the camera, regardless of where in the game world the camera is viewing. This is useful if for example this Game Object is a UI item that you wish to be visible at all times regardless where in the world the camera is.

The offsets are stored in the `cameraOffset` property.

Note that the `cameraOffset` values are in addition to any parent of this Game Object on the display list.

Be careful not to set `fixedToCamera` on Game Objects which are in Groups that already have `fixedToCamera` enabled on them.

func (*Sprite) Frame

func (self *Sprite) Frame() int

Frame Gets or sets the current frame index of the texture being used to render this Game Object.

To change the frame set `frame` to the index of the new frame in the sprite sheet you wish this Game Object to use, for example: `player.frame = 4`.

If the frame index given doesn't exist it will revert to the first frame found in the texture.

If you are using a texture atlas then you should use the `frameName` property instead.

If you wish to fully replace the texture being used see `loadTexture`.

func (*Sprite) FrameName

func (self *Sprite) FrameName() string

FrameName Gets or sets the current frame name of the texture being used to render this Game Object.

To change the frame set `frameName` to the name of the new frame in the texture atlas you wish this Game Object to use, for example: `player.frameName = "idle"`.

If the frame name given doesn't exist it will revert to the first frame found in the texture and throw a console warning.

If you are using a sprite sheet then you should use the `frame` property instead.

If you wish to fully replace the texture being used see `loadTexture`.

func (*Sprite) Fresh

func (self *Sprite) Fresh() bool

Fresh A Game Object is considered `fresh` if it has just been created or reset and is yet to receive a renderer transform update. This property is mostly used internally by the physics systems, but is exposed for the use of plugins.

func (*Sprite) Game

func (self *Sprite) Game() *Game

Game A reference to the currently running Game.

func (*Sprite) GetBounds

func (self *Sprite) GetBounds(matrix *Matrix) *Rectangle

GetBounds Returns the bounds of the Sprite as a rectangle.

The bounds calculation takes the worldTransform into account.

It is important to note that the transform is not updated when you call this method.

So if this Sprite is the child of a Display Object which has had its transform

updated since the last render pass, those changes will not yet have been applied

to this Sprites worldTransform. If you need to ensure that all parent transforms

are factored into this getBounds operation then you should call `updateTransform`

on the root most object in this Sprites display list first.

func (*Sprite) GetBoundsI

func (self *Sprite) GetBoundsI(args ...interface{}) *Rectangle

GetBoundsI Returns the bounds of the Sprite as a rectangle.

The bounds calculation takes the worldTransform into account.

It is important to note that the transform is not updated when you call this method.

So if this Sprite is the child of a Display Object which has had its transform

updated since the last render pass, those changes will not yet have been applied

to this Sprites worldTransform. If you need to ensure that all parent transforms

are factored into this getBounds operation then you should call `updateTransform`

on the root most object in this Sprites display list first.

func (*Sprite) GetChildAt

func (self *Sprite) GetChildAt(index int) *DisplayObject

GetChildAt Returns the child at the specified index

func (*Sprite) GetChildAtI

func (self *Sprite) GetChildAtI(args ...interface{}) *DisplayObject

GetChildAtI Returns the child at the specified index

func (*Sprite) GetChildIndex

func (self *Sprite) GetChildIndex(child *DisplayObject) int

GetChildIndex Returns the index position of a child DisplayObject instance

func (*Sprite) GetChildIndexI

func (self *Sprite) GetChildIndexI(args ...interface{}) int

GetChildIndexI Returns the index position of a child DisplayObject instance

func (*Sprite) GetLocalBounds

func (self *Sprite) GetLocalBounds() *Rectangle

GetLocalBounds Retrieves the non-global local bounds of the Sprite as a rectangle. The calculation takes all visible children into consideration.

func (*Sprite) GetLocalBoundsI

func (self *Sprite) GetLocalBoundsI(args ...interface{}) *Rectangle

GetLocalBoundsI Retrieves the non-global local bounds of the Sprite as a rectangle. The calculation takes all visible children into consideration.

func (*Sprite) Heal

func (self *Sprite) Heal() interface{}

Heal Heal the Game Object. This adds the given amount of health to the `health` property.

func (*Sprite) Health

func (self *Sprite) Health() int

Health The Game Objects health value. This is a handy property for setting and manipulating health on a Game Object.

It can be used in combination with the `damage` method or modified directly.

func (*Sprite) Height

func (self *Sprite) Height() int

Height The height of the sprite, setting this will actually modify the scale to achieve the value set

func (*Sprite) IgnoreChildInput

func (self *Sprite) IgnoreChildInput() bool

IgnoreChildInput If `ignoreChildInput` is `false` it will allow this objects _children_ to be considered as valid for Input events.

If this property is `true` then the children will _not_ be considered as valid for Input events.

Note that this property isn't recursive: only immediate children are influenced, it doesn't scan further down.

func (*Sprite) InCamera

func (self *Sprite) InCamera() bool

InCamera Checks if the Game Objects bounds intersect with the Game Camera bounds. Returns `true` if they do, otherwise `false` if fully outside of the Cameras bounds.

func (*Sprite) InWorld

func (self *Sprite) InWorld() bool

InWorld Checks if the Game Objects bounds are within, or intersect at any point with the Game World bounds.

func (*Sprite) Input

func (self *Sprite) Input() interface{}

Input The Input Handler for this Game Object.

By default it is disabled. If you wish this Game Object to process input events you should enable it with: `inputEnabled = true`.

After you have done this, this property will be a reference to the Phaser InputHandler.

func (*Sprite) InputEnabled

func (self *Sprite) InputEnabled() bool

InputEnabled By default a Game Object won't process any input events. By setting `inputEnabled` to true a Phaser.InputHandler is created for this Game Object and it will then start to process click / touch events and more.

You can then access the Input Handler via `this.input`.

Note that Input related events are dispatched from `this.events`, i.e.: `events.onInputDown`.

If you set this property to false it will stop the Input Handler from processing any more input events.

If you want to _temporarily_ disable input for a Game Object, then it's better to set `input.enabled = false`, as it won't reset any of the Input Handlers internal properties. You can then toggle this back on as needed.

func (*Sprite) Key

func (self *Sprite) Key() interface{}

Key The key of the image or texture used by this Game Object during rendering. If it is a string it's the string used to retrieve the texture from the Phaser Image Cache. It can also be an instance of a RenderTexture, BitmapData, Video or PIXI.Texture. If a Game Object is created without a key it is automatically assigned the key `__default` which is a 32x32 transparent PNG stored within the Cache. If a Game Object is given a key which doesn't exist in the Image Cache it is re-assigned the key `__missing` which is a 32x32 PNG of a green box with a line through it.

func (*Sprite) Kill

func (self *Sprite) Kill() *DisplayObject

Kill Kills a Game Object. A killed Game Object has its `alive`, `exists` and `visible` properties all set to false.

It will dispatch the `onKilled` event. You can listen to `events.onKilled` for the signal.

Note that killing a Game Object is a way for you to quickly recycle it in an object pool, it doesn't destroy the object or free it up from memory.

If you don't need this Game Object any more you should call `destroy` instead.

func (*Sprite) KillI

func (self *Sprite) KillI(args ...interface{}) *DisplayObject

KillI Kills a Game Object. A killed Game Object has its `alive`, `exists` and `visible` properties all set to false.

It will dispatch the `onKilled` event. You can listen to `events.onKilled` for the signal.

Note that killing a Game Object is a way for you to quickly recycle it in an object pool, it doesn't destroy the object or free it up from memory.

If you don't need this Game Object any more you should call `destroy` instead.

func (*Sprite) Left

func (self *Sprite) Left() int

Left The left coordinate of the Game Object. This is the same as `x - offsetX`.

func (*Sprite) Lifespan

func (self *Sprite) Lifespan() int

Lifespan The lifespan allows you to give a Game Object a lifespan in milliseconds.

Once the Game Object is 'born' you can set this to a positive value.

It is automatically decremented by the millisecond equivalent of `game.time.physicsElapsed` each frame. When it reaches zero it will call the `kill` method.

Very handy for particles, bullets, collectibles, or any other short-lived entity.

func (*Sprite) LoadTexture

func (self *Sprite) LoadTexture(key interface{})

LoadTexture Changes the base texture the Game Object is using. The old texture is removed and the new one is referenced or fetched from the Cache.

If your Game Object is using a frame from a texture atlas and you just wish to change to another frame, then see the `frame` or `frameName` properties instead.

You should only use `loadTexture` if you want to replace the base texture entirely.

Calling this method causes a WebGL texture update, so use sparingly or in low-intensity portions of your game, or if you know the new texture is already on the GPU.

You can use the new const `Phaser.PENDING_ATLAS` as the texture key for any sprite. Doing this then sets the key to be the `frame` argument (the frame is set to zero).

This allows you to create sprites using `load.image` during development, and then change them to use a Texture Atlas later in development by simply searching your code for 'PENDING_ATLAS' and swapping it to be the key of the atlas data.

Note: You cannot use a RenderTexture as a texture for a TileSprite.

func (*Sprite) LoadTexture1O

func (self *Sprite) LoadTexture1O(key interface{}, frame interface{})

LoadTexture1O Changes the base texture the Game Object is using. The old texture is removed and the new one is referenced or fetched from the Cache.

If your Game Object is using a frame from a texture atlas and you just wish to change to another frame, then see the `frame` or `frameName` properties instead.

You should only use `loadTexture` if you want to replace the base texture entirely.

Calling this method causes a WebGL texture update, so use sparingly or in low-intensity portions of your game, or if you know the new texture is already on the GPU.

You can use the new const `Phaser.PENDING_ATLAS` as the texture key for any sprite. Doing this then sets the key to be the `frame` argument (the frame is set to zero).

This allows you to create sprites using `load.image` during development, and then change them to use a Texture Atlas later in development by simply searching your code for 'PENDING_ATLAS' and swapping it to be the key of the atlas data.

Note: You cannot use a RenderTexture as a texture for a TileSprite.

func (*Sprite) LoadTexture2O

func (self *Sprite) LoadTexture2O(key interface{}, frame interface{}, stopAnimation bool)

LoadTexture2O Changes the base texture the Game Object is using. The old texture is removed and the new one is referenced or fetched from the Cache.

If your Game Object is using a frame from a texture atlas and you just wish to change to another frame, then see the `frame` or `frameName` properties instead.

You should only use `loadTexture` if you want to replace the base texture entirely.

Calling this method causes a WebGL texture update, so use sparingly or in low-intensity portions of your game, or if you know the new texture is already on the GPU.

You can use the new const `Phaser.PENDING_ATLAS` as the texture key for any sprite. Doing this then sets the key to be the `frame` argument (the frame is set to zero).

This allows you to create sprites using `load.image` during development, and then change them to use a Texture Atlas later in development by simply searching your code for 'PENDING_ATLAS' and swapping it to be the key of the atlas data.

Note: You cannot use a RenderTexture as a texture for a TileSprite.

func (*Sprite) LoadTextureI

func (self *Sprite) LoadTextureI(args ...interface{})

LoadTextureI Changes the base texture the Game Object is using. The old texture is removed and the new one is referenced or fetched from the Cache.

If your Game Object is using a frame from a texture atlas and you just wish to change to another frame, then see the `frame` or `frameName` properties instead.

You should only use `loadTexture` if you want to replace the base texture entirely.

Calling this method causes a WebGL texture update, so use sparingly or in low-intensity portions of your game, or if you know the new texture is already on the GPU.

You can use the new const `Phaser.PENDING_ATLAS` as the texture key for any sprite. Doing this then sets the key to be the `frame` argument (the frame is set to zero).

This allows you to create sprites using `load.image` during development, and then change them to use a Texture Atlas later in development by simply searching your code for 'PENDING_ATLAS' and swapping it to be the key of the atlas data.

Note: You cannot use a RenderTexture as a texture for a TileSprite.

func (*Sprite) MaxHealth

func (self *Sprite) MaxHealth() int

MaxHealth The Game Objects maximum health value. This works in combination with the `heal` method to ensure the health value never exceeds the maximum.

func (*Sprite) MoveDown

func (self *Sprite) MoveDown() *DisplayObject

MoveDown Moves this Game Object down one place in its parents display list. This call has no effect if the Game Object is already at the bottom of the display list.

If this Game Object hasn't been added to a custom Group then this method will move it one object down within the Game World, because the World is the root Group from which all Game Objects descend.

func (*Sprite) MoveDownI

func (self *Sprite) MoveDownI(args ...interface{}) *DisplayObject

MoveDownI Moves this Game Object down one place in its parents display list. This call has no effect if the Game Object is already at the bottom of the display list.

If this Game Object hasn't been added to a custom Group then this method will move it one object down within the Game World, because the World is the root Group from which all Game Objects descend.

func (*Sprite) MoveUp

func (self *Sprite) MoveUp() *DisplayObject

MoveUp Moves this Game Object up one place in its parents display list. This call has no effect if the Game Object is already at the top of the display list.

If this Game Object hasn't been added to a custom Group then this method will move it one object up within the Game World, because the World is the root Group from which all Game Objects descend.

func (*Sprite) MoveUpI

func (self *Sprite) MoveUpI(args ...interface{}) *DisplayObject

MoveUpI Moves this Game Object up one place in its parents display list. This call has no effect if the Game Object is already at the top of the display list.

If this Game Object hasn't been added to a custom Group then this method will move it one object up within the Game World, because the World is the root Group from which all Game Objects descend.

func (*Sprite) Name

func (self *Sprite) Name() string

Name A user defined name given to this Game Object. This value isn't ever used internally by Phaser, it is meant as a game level property.

func (*Sprite) OffsetX

func (self *Sprite) OffsetX() int

OffsetX The amount the Game Object is visually offset from its x coordinate. This is the same as `width * anchor.x`. It will only be > 0 if anchor.x is not equal to zero.

func (*Sprite) OffsetY

func (self *Sprite) OffsetY() int

OffsetY The amount the Game Object is visually offset from its y coordinate. This is the same as `height * anchor.y`. It will only be > 0 if anchor.y is not equal to zero.

func (*Sprite) OnTextureUpdate

func (self *Sprite) OnTextureUpdate(event interface{})

OnTextureUpdate When the texture is updated, this event will fire to update the scale and frame

func (*Sprite) OnTextureUpdateI

func (self *Sprite) OnTextureUpdateI(args ...interface{})

OnTextureUpdateI When the texture is updated, this event will fire to update the scale and frame

func (*Sprite) OutOfBoundsKill

func (self *Sprite) OutOfBoundsKill() bool

OutOfBoundsKill If this and the `checkWorldBounds` property are both set to `true` then the `kill` method is called as soon as `inWorld` returns false.

func (*Sprite) OutOfCameraBoundsKill

func (self *Sprite) OutOfCameraBoundsKill() bool

OutOfCameraBoundsKill If this and the `autoCull` property are both set to `true`, then the `kill` method is called as soon as the Game Object leaves the camera bounds.

func (*Sprite) Overlap

func (self *Sprite) Overlap(displayObject interface{}) bool

Overlap Checks to see if the bounds of this Game Object overlaps with the bounds of the given Display Object, which can be a Sprite, Image, TileSprite or anything that extends those such as Button or provides a `getBounds` method and result.

This check ignores the `hitArea` property if set and runs a `getBounds` comparison on both objects to determine the result.

Therefore it's relatively expensive to use in large quantities, i.e. with lots of Sprites at a high frequency. It should be fine for low-volume testing where physics isn't required.

func (*Sprite) OverlapI

func (self *Sprite) OverlapI(args ...interface{}) bool

OverlapI Checks to see if the bounds of this Game Object overlaps with the bounds of the given Display Object, which can be a Sprite, Image, TileSprite or anything that extends those such as Button or provides a `getBounds` method and result.

This check ignores the `hitArea` property if set and runs a `getBounds` comparison on both objects to determine the result.

Therefore it's relatively expensive to use in large quantities, i.e. with lots of Sprites at a high frequency. It should be fine for low-volume testing where physics isn't required.

func (*Sprite) PendingDestroy

func (self *Sprite) PendingDestroy() bool

PendingDestroy A Game Object is that is pendingDestroy is flagged to have its destroy method called on the next logic update. You can set it directly to allow you to flag an object to be destroyed on its next update.

This is extremely useful if you wish to destroy an object from within one of its own callbacks such as with Buttons or other Input events.

func (*Sprite) PhysicsType

func (self *Sprite) PhysicsType() int

PhysicsType The const physics body type of this object.

func (*Sprite) Play

func (self *Sprite) Play(name string) *Animation

Play Plays an Animation.

The animation should have previously been created via `animations.add`.

If the animation is already playing calling this again won't do anything. If you need to reset an already running animation do so directly on the Animation object itself or via `AnimationManager.stop`.

func (*Sprite) Play1O

func (self *Sprite) Play1O(name string, frameRate int) *Animation

Play1O Plays an Animation.

The animation should have previously been created via `animations.add`.

If the animation is already playing calling this again won't do anything. If you need to reset an already running animation do so directly on the Animation object itself or via `AnimationManager.stop`.

func (*Sprite) Play2O

func (self *Sprite) Play2O(name string, frameRate int, loop bool) *Animation

Play2O Plays an Animation.

The animation should have previously been created via `animations.add`.

If the animation is already playing calling this again won't do anything. If you need to reset an already running animation do so directly on the Animation object itself or via `AnimationManager.stop`.

func (*Sprite) Play3O

func (self *Sprite) Play3O(name string, frameRate int, loop bool, killOnComplete bool) *Animation

Play3O Plays an Animation.

The animation should have previously been created via `animations.add`.

If the animation is already playing calling this again won't do anything. If you need to reset an already running animation do so directly on the Animation object itself or via `AnimationManager.stop`.

func (*Sprite) PlayI

func (self *Sprite) PlayI(args ...interface{}) *Animation

PlayI Plays an Animation.

The animation should have previously been created via `animations.add`.

If the animation is already playing calling this again won't do anything. If you need to reset an already running animation do so directly on the Animation object itself or via `AnimationManager.stop`.

func (*Sprite) PostUpdate

func (self *Sprite) PostUpdate()

PostUpdate Internal method called by the World postUpdate cycle.

func (*Sprite) PostUpdateI

func (self *Sprite) PostUpdateI(args ...interface{})

PostUpdateI Internal method called by the World postUpdate cycle.

func (*Sprite) PreUpdate

func (self *Sprite) PreUpdate() bool

PreUpdate Automatically called by World.preUpdate.

func (*Sprite) PreUpdateI

func (self *Sprite) PreUpdateI(args ...interface{}) bool

PreUpdateI Automatically called by World.preUpdate.

func (*Sprite) PreviousPosition

func (self *Sprite) PreviousPosition() *Point

PreviousPosition The position the Game Object was located in the previous frame.

func (*Sprite) PreviousRotation

func (self *Sprite) PreviousRotation() int

PreviousRotation The rotation the Game Object was in set to in the previous frame. Value is in radians.

func (*Sprite) RemoveChild

func (self *Sprite) RemoveChild(child *DisplayObject) *DisplayObject

RemoveChild Removes a child from the container.

func (*Sprite) RemoveChildAt

func (self *Sprite) RemoveChildAt(index int) *DisplayObject

RemoveChildAt Removes a child from the specified index position.

func (*Sprite) RemoveChildAtI

func (self *Sprite) RemoveChildAtI(args ...interface{}) *DisplayObject

RemoveChildAtI Removes a child from the specified index position.

func (*Sprite) RemoveChildI

func (self *Sprite) RemoveChildI(args ...interface{}) *DisplayObject

RemoveChildI Removes a child from the container.

func (*Sprite) RemoveChildren

func (self *Sprite) RemoveChildren(beginIndex int, endIndex int)

RemoveChildren Removes all children from this container that are within the begin and end indexes.

func (*Sprite) RemoveChildrenI

func (self *Sprite) RemoveChildrenI(args ...interface{})

RemoveChildrenI Removes all children from this container that are within the begin and end indexes.

func (*Sprite) RenderOrderID

func (self *Sprite) RenderOrderID() int

RenderOrderID The render order ID is used internally by the renderer and Input Manager and should not be modified. This property is mostly used internally by the renderers, but is exposed for the use of plugins.

func (*Sprite) Reset

func (self *Sprite) Reset(x int, y int) *DisplayObject

Reset Resets the Game Object.

This moves the Game Object to the given x/y world coordinates and sets `fresh`, `exists`, `visible` and `renderable` to true.

If this Game Object has the LifeSpan component it will also set `alive` to true and `health` to the given value.

If this Game Object has a Physics Body it will reset the Body.

func (*Sprite) Reset1O

func (self *Sprite) Reset1O(x int, y int, health int) *DisplayObject

Reset1O Resets the Game Object.

This moves the Game Object to the given x/y world coordinates and sets `fresh`, `exists`, `visible` and `renderable` to true.

If this Game Object has the LifeSpan component it will also set `alive` to true and `health` to the given value.

If this Game Object has a Physics Body it will reset the Body.

func (*Sprite) ResetFrame

func (self *Sprite) ResetFrame()

ResetFrame Resets the texture frame dimensions that the Game Object uses for rendering.

func (*Sprite) ResetFrameI

func (self *Sprite) ResetFrameI(args ...interface{})

ResetFrameI Resets the texture frame dimensions that the Game Object uses for rendering.

func (*Sprite) ResetI

func (self *Sprite) ResetI(args ...interface{}) *DisplayObject

ResetI Resets the Game Object.

This moves the Game Object to the given x/y world coordinates and sets `fresh`, `exists`, `visible` and `renderable` to true.

If this Game Object has the LifeSpan component it will also set `alive` to true and `health` to the given value.

If this Game Object has a Physics Body it will reset the Body.

func (*Sprite) ResizeFrame

func (self *Sprite) ResizeFrame(parent interface{}, width int, height int)

ResizeFrame Resizes the Frame dimensions that the Game Object uses for rendering.

You shouldn't normally need to ever call this, but in the case of special texture types such as Video or BitmapData it can be useful to adjust the dimensions directly in this way.

func (*Sprite) ResizeFrameI

func (self *Sprite) ResizeFrameI(args ...interface{})

ResizeFrameI Resizes the Frame dimensions that the Game Object uses for rendering.

You shouldn't normally need to ever call this, but in the case of special texture types such as Video or BitmapData it can be useful to adjust the dimensions directly in this way.

func (*Sprite) Revive

func (self *Sprite) Revive() *DisplayObject

Revive Brings a 'dead' Game Object back to life, optionally resetting its health value in the process.

A resurrected Game Object has its `alive`, `exists` and `visible` properties all set to true.

It will dispatch the `onRevived` event. Listen to `events.onRevived` for the signal.

func (*Sprite) Revive1O

func (self *Sprite) Revive1O(health int) *DisplayObject

Revive1O Brings a 'dead' Game Object back to life, optionally resetting its health value in the process.

A resurrected Game Object has its `alive`, `exists` and `visible` properties all set to true.

It will dispatch the `onRevived` event. Listen to `events.onRevived` for the signal.

func (*Sprite) ReviveI

func (self *Sprite) ReviveI(args ...interface{}) *DisplayObject

ReviveI Brings a 'dead' Game Object back to life, optionally resetting its health value in the process.

A resurrected Game Object has its `alive`, `exists` and `visible` properties all set to true.

It will dispatch the `onRevived` event. Listen to `events.onRevived` for the signal.

func (*Sprite) Right

func (self *Sprite) Right() int

Right The right coordinate of the Game Object. This is the same as `x + width - offsetX`.

func (*Sprite) ScaleMax

func (self *Sprite) ScaleMax() *Point

ScaleMax The maximum scale this Game Object will scale up to.

It allows you to prevent a parent from scaling this Game Object higher than the given value.

Set it to `null` to remove the limit.

func (*Sprite) ScaleMin

func (self *Sprite) ScaleMin() *Point

ScaleMin The minimum scale this Game Object will scale down to.

It allows you to prevent a parent from scaling this Game Object lower than the given value.

Set it to `null` to remove the limit.

func (*Sprite) SendToBack

func (self *Sprite) SendToBack() *DisplayObject

SendToBack Sends this Game Object to the bottom of its parents display list. Visually this means it will render below all other children in the same Group.

If this Game Object hasn't been added to a custom Group then this method will send it to the bottom of the Game World, because the World is the root Group from which all Game Objects descend.

func (*Sprite) SendToBackI

func (self *Sprite) SendToBackI(args ...interface{}) *DisplayObject

SendToBackI Sends this Game Object to the bottom of its parents display list. Visually this means it will render below all other children in the same Group.

If this Game Object hasn't been added to a custom Group then this method will send it to the bottom of the Game World, because the World is the root Group from which all Game Objects descend.

func (*Sprite) SetAliveA

func (self *Sprite) SetAliveA(member bool)

SetAliveA A useful flag to control if the Game Object is alive or dead.

This is set automatically by the Health components `damage` method should the object run out of health. Or you can toggle it via your game code.

This property is mostly just provided to be used by your game - it doesn't effect rendering or logic updates. However you can use `Group.getFirstAlive` in conjunction with this property for fast object pooling and recycling.

func (*Sprite) SetAnchorA

func (self *Sprite) SetAnchorA(member *Point)

SetAnchorA The anchor sets the origin point of the texture.

The default is 0,0 this means the texture's origin is the top left

Setting than anchor to 0.5,0.5 means the textures origin is centered

Setting the anchor to 1,1 would mean the textures origin points will be the bottom right corner

func (*Sprite) SetAngleA

func (self *Sprite) SetAngleA(member int)

SetAngleA The angle property is the rotation of the Game Object in *degrees* from its original orientation.

Values from 0 to 180 represent clockwise rotation; values from 0 to -180 represent counterclockwise rotation.

Values outside this range are added to or subtracted from 360 to obtain a value within the range. For example, the statement player.angle = 450 is the same as player.angle = 90.

If you wish to work in radians instead of degrees you can use the property `rotation` instead. Working in radians is slightly faster as it doesn't have to perform any calculations.

func (*Sprite) SetAnimationsA

func (self *Sprite) SetAnimationsA(member *AnimationManager)

SetAnimationsA If the Game Object is enabled for animation (such as a Phaser.Sprite) this is a reference to its AnimationManager instance. Through it you can create, play, pause and stop animations.

func (*Sprite) SetAutoCullA

func (self *Sprite) SetAutoCullA(member bool)

SetAutoCullA A Game Object with `autoCull` set to true will check its bounds against the World Camera every frame. If it is not intersecting the Camera bounds at any point then it has its `renderable` property set to `false`. This keeps the Game Object alive and still processing updates, but forces it to skip the render step entirely.

This is a relatively expensive operation, especially if enabled on hundreds of Game Objects. So enable it only if you know it's required, or you have tested performance and find it acceptable.

func (*Sprite) SetBlendModeA

func (self *Sprite) SetBlendModeA(member int)

SetBlendModeA The blend mode to be applied to the sprite. Set to PIXI.blendModes.NORMAL to remove any blend mode.

Warning: You cannot have a blend mode and a filter active on the same Sprite. Doing so will render the sprite invisible.

func (*Sprite) SetBodyA

func (self *Sprite) SetBodyA(member interface{})

SetBodyA `body` is the Game Objects physics body. Once a Game Object is enabled for physics you access all associated properties and methods via it.

By default Game Objects won't add themselves to any physics system and their `body` property will be `null`.

To enable this Game Object for physics you need to call `game.physics.enable(object, system)` where `object` is this object and `system` is the Physics system you are using. If none is given it defaults to `Phaser.Physics.Arcade`.

You can alternatively call `game.physics.arcade.enable(object)`, or add this Game Object to a physics enabled Group.

Important: Enabling a Game Object for P2 or Ninja physics will automatically set its `anchor` property to 0.5, so the physics body is centered on the Game Object.

If you need a different result then adjust or re-create the Body shape offsets manually or reset the anchor after enabling physics.

func (*Sprite) SetBottomA

func (self *Sprite) SetBottomA(member int)

SetBottomA The sum of the y and height properties. This is the same as `y + height - offsetY`.

func (*Sprite) SetCameraOffsetA

func (self *Sprite) SetCameraOffsetA(member *Point)

SetCameraOffsetA The x/y coordinate offset applied to the top-left of the camera that this Game Object will be drawn at if `fixedToCamera` is true.

The values are relative to the top-left of the camera view and in addition to any parent of the Game Object on the display list.

func (*Sprite) SetCenterXA

func (self *Sprite) SetCenterXA(member int)

SetCenterXA The center x coordinate of the Game Object. This is the same as `(x - offsetX) + (width / 2)`.

func (*Sprite) SetCenterYA

func (self *Sprite) SetCenterYA(member int)

SetCenterYA The center y coordinate of the Game Object. This is the same as `(y - offsetY) + (height / 2)`.

func (*Sprite) SetCheckWorldBoundsA

func (self *Sprite) SetCheckWorldBoundsA(member bool)

SetCheckWorldBoundsA If this is set to `true` the Game Object checks if it is within the World bounds each frame.

When it is no longer intersecting the world bounds it dispatches the `onOutOfBounds` event.

If it was *previously* out of bounds but is now intersecting the world bounds again it dispatches the `onEnterBounds` event.

It also optionally kills the Game Object if `outOfBoundsKill` is `true`.

When `checkWorldBounds` is enabled it forces the Game Object to calculate its full bounds every frame.

This is a relatively expensive operation, especially if enabled on hundreds of Game Objects. So enable it only if you know it's required, or you have tested performance and find it acceptable.

func (*Sprite) SetChildIndex

func (self *Sprite) SetChildIndex(child *DisplayObject, index int)

SetChildIndex Changes the position of an existing child in the display object container

func (*Sprite) SetChildIndexI

func (self *Sprite) SetChildIndexI(args ...interface{})

SetChildIndexI Changes the position of an existing child in the display object container

func (*Sprite) SetChildrenA

func (self *Sprite) SetChildrenA(member []DisplayObject)

SetChildrenA [read-only] The array of children of this container.

func (*Sprite) SetComponentsA

func (self *Sprite) SetComponentsA(member interface{})

SetComponentsA The components this Game Object has installed.

func (*Sprite) SetCropRectA

func (self *Sprite) SetCropRectA(member *Rectangle)

SetCropRectA The Rectangle used to crop the texture this Game Object uses. Set this property via `crop`. If you modify this property directly you must call `updateCrop` in order to have the change take effect.

func (*Sprite) SetDamageA

func (self *Sprite) SetDamageA(member interface{})

SetDamageA Damages the Game Object. This removes the given amount of health from the `health` property.

If health is taken below or is equal to zero then the `kill` method is called.

func (*Sprite) SetDataA

func (self *Sprite) SetDataA(member interface{})

SetDataA An empty Object that belongs to this Game Object. This value isn't ever used internally by Phaser, but may be used by your own code, or by Phaser Plugins, to store data that needs to be associated with the Game Object, without polluting the Game Object directly.

func (*Sprite) SetDebugA

func (self *Sprite) SetDebugA(member bool)

SetDebugA A debug flag designed for use with `Game.enableStep`.

func (*Sprite) SetDeltaXA

func (self *Sprite) SetDeltaXA(member int)

SetDeltaXA Returns the delta x value. The difference between world.x now and in the previous frame.

The value will be positive if the Game Object has moved to the right or negative if to the left.

func (*Sprite) SetDeltaYA

func (self *Sprite) SetDeltaYA(member int)

SetDeltaYA Returns the delta y value. The difference between world.y now and in the previous frame.

The value will be positive if the Game Object has moved down or negative if up.

func (*Sprite) SetDeltaZA

func (self *Sprite) SetDeltaZA(member int)

SetDeltaZA Returns the delta z value. The difference between rotation now and in the previous frame. The delta value.

func (*Sprite) SetDestroyPhaseA

func (self *Sprite) SetDestroyPhaseA(member bool)

SetDestroyPhaseA As a Game Object runs through its destroy method this flag is set to true, and can be checked in any sub-systems or plugins it is being destroyed from.

func (*Sprite) SetEventsA

func (self *Sprite) SetEventsA(member *Events)

SetEventsA All Phaser Game Objects have an Events class which contains all of the events that are dispatched when certain things happen to this Game Object, or any of its components.

func (*Sprite) SetExistsA

func (self *Sprite) SetExistsA(member bool)

SetExistsA Controls if this Sprite is processed by the core Phaser game loops and Group loops.

func (*Sprite) SetFixedToCameraA

func (self *Sprite) SetFixedToCameraA(member bool)

SetFixedToCameraA A Game Object that is "fixed" to the camera uses its x/y coordinates as offsets from the top left of the camera during rendering.

The values are adjusted at the rendering stage, overriding the Game Objects actual world position.

The end result is that the Game Object will appear to be 'fixed' to the camera, regardless of where in the game world the camera is viewing. This is useful if for example this Game Object is a UI item that you wish to be visible at all times regardless where in the world the camera is.

The offsets are stored in the `cameraOffset` property.

Note that the `cameraOffset` values are in addition to any parent of this Game Object on the display list.

Be careful not to set `fixedToCamera` on Game Objects which are in Groups that already have `fixedToCamera` enabled on them.

func (*Sprite) SetFrame

func (self *Sprite) SetFrame(frame *Frame)

SetFrame Sets the texture frame the Game Object uses for rendering.

This is primarily an internal method used by `loadTexture`, but is exposed for the use of plugins and custom classes.

func (*Sprite) SetFrameA

func (self *Sprite) SetFrameA(member int)

SetFrameA Gets or sets the current frame index of the texture being used to render this Game Object.

To change the frame set `frame` to the index of the new frame in the sprite sheet you wish this Game Object to use, for example: `player.frame = 4`.

If the frame index given doesn't exist it will revert to the first frame found in the texture.

If you are using a texture atlas then you should use the `frameName` property instead.

If you wish to fully replace the texture being used see `loadTexture`.

func (*Sprite) SetFrameI

func (self *Sprite) SetFrameI(args ...interface{})

SetFrameI Sets the texture frame the Game Object uses for rendering.

This is primarily an internal method used by `loadTexture`, but is exposed for the use of plugins and custom classes.

func (*Sprite) SetFrameNameA

func (self *Sprite) SetFrameNameA(member string)

SetFrameNameA Gets or sets the current frame name of the texture being used to render this Game Object.

To change the frame set `frameName` to the name of the new frame in the texture atlas you wish this Game Object to use, for example: `player.frameName = "idle"`.

If the frame name given doesn't exist it will revert to the first frame found in the texture and throw a console warning.

If you are using a sprite sheet then you should use the `frame` property instead.

If you wish to fully replace the texture being used see `loadTexture`.

func (*Sprite) SetFreshA

func (self *Sprite) SetFreshA(member bool)

SetFreshA A Game Object is considered `fresh` if it has just been created or reset and is yet to receive a renderer transform update. This property is mostly used internally by the physics systems, but is exposed for the use of plugins.

func (*Sprite) SetGameA

func (self *Sprite) SetGameA(member *Game)

SetGameA A reference to the currently running Game.

func (*Sprite) SetHealA

func (self *Sprite) SetHealA(member interface{})

SetHealA Heal the Game Object. This adds the given amount of health to the `health` property.

func (*Sprite) SetHealth

func (self *Sprite) SetHealth() interface{}

SetHealth Sets the health property of the Game Object to the given amount. Will never exceed the `maxHealth` value.

func (*Sprite) SetHealthA

func (self *Sprite) SetHealthA(member int)

SetHealthA The Game Objects health value. This is a handy property for setting and manipulating health on a Game Object.

It can be used in combination with the `damage` method or modified directly.

func (*Sprite) SetHeightA

func (self *Sprite) SetHeightA(member int)

SetHeightA The height of the sprite, setting this will actually modify the scale to achieve the value set

func (*Sprite) SetIgnoreChildInputA

func (self *Sprite) SetIgnoreChildInputA(member bool)

SetIgnoreChildInputA If `ignoreChildInput` is `false` it will allow this objects _children_ to be considered as valid for Input events.

If this property is `true` then the children will _not_ be considered as valid for Input events.

Note that this property isn't recursive: only immediate children are influenced, it doesn't scan further down.

func (*Sprite) SetInCameraA

func (self *Sprite) SetInCameraA(member bool)

SetInCameraA Checks if the Game Objects bounds intersect with the Game Camera bounds. Returns `true` if they do, otherwise `false` if fully outside of the Cameras bounds.

func (*Sprite) SetInWorldA

func (self *Sprite) SetInWorldA(member bool)

SetInWorldA Checks if the Game Objects bounds are within, or intersect at any point with the Game World bounds.

func (*Sprite) SetInputA

func (self *Sprite) SetInputA(member interface{})

SetInputA The Input Handler for this Game Object.

By default it is disabled. If you wish this Game Object to process input events you should enable it with: `inputEnabled = true`.

After you have done this, this property will be a reference to the Phaser InputHandler.

func (*Sprite) SetInputEnabledA

func (self *Sprite) SetInputEnabledA(member bool)

SetInputEnabledA By default a Game Object won't process any input events. By setting `inputEnabled` to true a Phaser.InputHandler is created for this Game Object and it will then start to process click / touch events and more.

You can then access the Input Handler via `this.input`.

Note that Input related events are dispatched from `this.events`, i.e.: `events.onInputDown`.

If you set this property to false it will stop the Input Handler from processing any more input events.

If you want to _temporarily_ disable input for a Game Object, then it's better to set `input.enabled = false`, as it won't reset any of the Input Handlers internal properties. You can then toggle this back on as needed.

func (*Sprite) SetKeyA

func (self *Sprite) SetKeyA(member interface{})

SetKeyA The key of the image or texture used by this Game Object during rendering. If it is a string it's the string used to retrieve the texture from the Phaser Image Cache. It can also be an instance of a RenderTexture, BitmapData, Video or PIXI.Texture. If a Game Object is created without a key it is automatically assigned the key `__default` which is a 32x32 transparent PNG stored within the Cache. If a Game Object is given a key which doesn't exist in the Image Cache it is re-assigned the key `__missing` which is a 32x32 PNG of a green box with a line through it.

func (*Sprite) SetLeftA

func (self *Sprite) SetLeftA(member int)

SetLeftA The left coordinate of the Game Object. This is the same as `x - offsetX`.

func (*Sprite) SetLifespanA

func (self *Sprite) SetLifespanA(member int)

SetLifespanA The lifespan allows you to give a Game Object a lifespan in milliseconds.

Once the Game Object is 'born' you can set this to a positive value.

It is automatically decremented by the millisecond equivalent of `game.time.physicsElapsed` each frame. When it reaches zero it will call the `kill` method.

Very handy for particles, bullets, collectibles, or any other short-lived entity.

func (*Sprite) SetMaxHealthA

func (self *Sprite) SetMaxHealthA(member int)

SetMaxHealthA The Game Objects maximum health value. This works in combination with the `heal` method to ensure the health value never exceeds the maximum.

func (*Sprite) SetNameA

func (self *Sprite) SetNameA(member string)

SetNameA A user defined name given to this Game Object. This value isn't ever used internally by Phaser, it is meant as a game level property.

func (*Sprite) SetOffsetXA

func (self *Sprite) SetOffsetXA(member int)

SetOffsetXA The amount the Game Object is visually offset from its x coordinate. This is the same as `width * anchor.x`. It will only be > 0 if anchor.x is not equal to zero.

func (*Sprite) SetOffsetYA

func (self *Sprite) SetOffsetYA(member int)

SetOffsetYA The amount the Game Object is visually offset from its y coordinate. This is the same as `height * anchor.y`. It will only be > 0 if anchor.y is not equal to zero.

func (*Sprite) SetOutOfBoundsKillA

func (self *Sprite) SetOutOfBoundsKillA(member bool)

SetOutOfBoundsKillA If this and the `checkWorldBounds` property are both set to `true` then the `kill` method is called as soon as `inWorld` returns false.

func (*Sprite) SetOutOfCameraBoundsKillA

func (self *Sprite) SetOutOfCameraBoundsKillA(member bool)

SetOutOfCameraBoundsKillA If this and the `autoCull` property are both set to `true`, then the `kill` method is called as soon as the Game Object leaves the camera bounds.

func (*Sprite) SetPendingDestroyA

func (self *Sprite) SetPendingDestroyA(member bool)

SetPendingDestroyA A Game Object is that is pendingDestroy is flagged to have its destroy method called on the next logic update. You can set it directly to allow you to flag an object to be destroyed on its next update.

This is extremely useful if you wish to destroy an object from within one of its own callbacks such as with Buttons or other Input events.

func (*Sprite) SetPhysicsTypeA

func (self *Sprite) SetPhysicsTypeA(member int)

SetPhysicsTypeA The const physics body type of this object.

func (*Sprite) SetPreviousPositionA

func (self *Sprite) SetPreviousPositionA(member *Point)

SetPreviousPositionA The position the Game Object was located in the previous frame.

func (*Sprite) SetPreviousRotationA

func (self *Sprite) SetPreviousRotationA(member int)

SetPreviousRotationA The rotation the Game Object was in set to in the previous frame. Value is in radians.

func (*Sprite) SetRenderOrderIDA

func (self *Sprite) SetRenderOrderIDA(member int)

SetRenderOrderIDA The render order ID is used internally by the renderer and Input Manager and should not be modified. This property is mostly used internally by the renderers, but is exposed for the use of plugins.

func (*Sprite) SetRightA

func (self *Sprite) SetRightA(member int)

SetRightA The right coordinate of the Game Object. This is the same as `x + width - offsetX`.

func (*Sprite) SetScaleMaxA

func (self *Sprite) SetScaleMaxA(member *Point)

SetScaleMaxA The maximum scale this Game Object will scale up to.

It allows you to prevent a parent from scaling this Game Object higher than the given value.

Set it to `null` to remove the limit.

func (*Sprite) SetScaleMinA

func (self *Sprite) SetScaleMinA(member *Point)

SetScaleMinA The minimum scale this Game Object will scale down to.

It allows you to prevent a parent from scaling this Game Object lower than the given value.

Set it to `null` to remove the limit.

func (*Sprite) SetScaleMinMax

func (self *Sprite) SetScaleMinMax(minX interface{}, minY interface{}, maxX interface{}, maxY interface{})

SetScaleMinMax Sets the scaleMin and scaleMax values. These values are used to limit how far this Game Object will scale based on its parent.

For example if this Game Object has a `minScale` value of 1 and its parent has a `scale` value of 0.5, the 0.5 will be ignored and the scale value of 1 will be used, as the parents scale is lower than the minimum scale this Game Object should adhere to.

By setting these values you can carefully control how Game Objects deal with responsive scaling.

If only one parameter is given then that value will be used for both scaleMin and scaleMax: `setScaleMinMax(1)` = scaleMin.x, scaleMin.y, scaleMax.x and scaleMax.y all = 1

If only two parameters are given the first is set as scaleMin.x and y and the second as scaleMax.x and y: `setScaleMinMax(0.5, 2)` = scaleMin.x and y = 0.5 and scaleMax.x and y = 2

If you wish to set `scaleMin` with different values for x and y then either modify Game Object.scaleMin directly, or pass `null` for the `maxX` and `maxY` parameters.

Call `setScaleMinMax(null)` to clear all previously set values.

func (*Sprite) SetScaleMinMaxI

func (self *Sprite) SetScaleMinMaxI(args ...interface{})

SetScaleMinMaxI Sets the scaleMin and scaleMax values. These values are used to limit how far this Game Object will scale based on its parent.

For example if this Game Object has a `minScale` value of 1 and its parent has a `scale` value of 0.5, the 0.5 will be ignored and the scale value of 1 will be used, as the parents scale is lower than the minimum scale this Game Object should adhere to.

By setting these values you can carefully control how Game Objects deal with responsive scaling.

If only one parameter is given then that value will be used for both scaleMin and scaleMax: `setScaleMinMax(1)` = scaleMin.x, scaleMin.y, scaleMax.x and scaleMax.y all = 1

If only two parameters are given the first is set as scaleMin.x and y and the second as scaleMax.x and y: `setScaleMinMax(0.5, 2)` = scaleMin.x and y = 0.5 and scaleMax.x and y = 2

If you wish to set `scaleMin` with different values for x and y then either modify Game Object.scaleMin directly, or pass `null` for the `maxX` and `maxY` parameters.

Call `setScaleMinMax(null)` to clear all previously set values.

func (*Sprite) SetSetHealthA

func (self *Sprite) SetSetHealthA(member interface{})

SetSetHealthA Sets the health property of the Game Object to the given amount. Will never exceed the `maxHealth` value.

func (*Sprite) SetShaderA

func (self *Sprite) SetShaderA(member *AbstractFilter)

SetShaderA The shader that will be used to render this Sprite.

Set to null to remove a current shader.

func (*Sprite) SetSmoothedA

func (self *Sprite) SetSmoothedA(member bool)

SetSmoothedA Enable or disable texture smoothing for this Game Object.

It only takes effect if the Game Object is using an image based texture.

Smoothing is enabled by default.

func (*Sprite) SetTexture

func (self *Sprite) SetTexture(texture *Texture)

SetTexture Sets the texture of the sprite. Be warned that this doesn't remove or destroy the previous

texture this Sprite was using.

func (*Sprite) SetTexture1O

func (self *Sprite) SetTexture1O(texture *Texture, destroy bool)

SetTexture1O Sets the texture of the sprite. Be warned that this doesn't remove or destroy the previous

texture this Sprite was using.

func (*Sprite) SetTextureA

func (self *Sprite) SetTextureA(member *Texture)

SetTextureA The texture that the sprite is using

func (*Sprite) SetTextureI

func (self *Sprite) SetTextureI(args ...interface{})

SetTextureI Sets the texture of the sprite. Be warned that this doesn't remove or destroy the previous

texture this Sprite was using.

func (*Sprite) SetTintA

func (self *Sprite) SetTintA(member int)

SetTintA The tint applied to the sprite. This is a hex value. A value of 0xFFFFFF will remove any tint effect.

func (*Sprite) SetTintedTextureA

func (self *Sprite) SetTintedTextureA(member *Canvas)

SetTintedTextureA A canvas that contains the tinted version of the Sprite (in Canvas mode, WebGL doesn't populate this)

func (*Sprite) SetTopA

func (self *Sprite) SetTopA(member int)

SetTopA The y coordinate of the Game Object. This is the same as `y - offsetY`.

func (*Sprite) SetTransformCallbackA

func (self *Sprite) SetTransformCallbackA(member interface{})

SetTransformCallbackA The callback that will apply any scale limiting to the worldTransform.

func (*Sprite) SetTransformCallbackContextA

func (self *Sprite) SetTransformCallbackContextA(member interface{})

SetTransformCallbackContextA The context under which `transformCallback` is called.

func (*Sprite) SetTypeA

func (self *Sprite) SetTypeA(member int)

SetTypeA The const type of this object.

func (*Sprite) SetWidthA

func (self *Sprite) SetWidthA(member int)

SetWidthA The width of the sprite, setting this will actually modify the scale to achieve the value set

func (*Sprite) SetWorldA

func (self *Sprite) SetWorldA(member *Point)

SetWorldA The world coordinates of this Game Object in pixels. Depending on where in the display list this Game Object is placed this value can differ from `position`, which contains the x/y coordinates relative to the Game Objects parent.

func (*Sprite) SetXA

func (self *Sprite) SetXA(member int)

SetXA The position of the Game Object on the x axis relative to the local coordinates of the parent.

func (*Sprite) SetYA

func (self *Sprite) SetYA(member int)

SetYA The position of the Game Object on the y axis relative to the local coordinates of the parent.

func (*Sprite) SetZA

func (self *Sprite) SetZA(member int)

SetZA The z depth of this Game Object within its parent Group. No two objects in a Group can have the same z value. This value is adjusted automatically whenever the Group hierarchy changes. If you wish to re-order the layering of a Game Object then see methods like Group.moveUp or Group.bringToTop.

func (*Sprite) Shader

func (self *Sprite) Shader() *AbstractFilter

Shader The shader that will be used to render this Sprite.

Set to null to remove a current shader.

func (*Sprite) Smoothed

func (self *Sprite) Smoothed() bool

Smoothed Enable or disable texture smoothing for this Game Object.

It only takes effect if the Game Object is using an image based texture.

Smoothing is enabled by default.

func (*Sprite) SwapChildren

func (self *Sprite) SwapChildren(child *DisplayObject, child2 *DisplayObject)

SwapChildren Swaps the position of 2 Display Objects within this container.

func (*Sprite) SwapChildrenI

func (self *Sprite) SwapChildrenI(args ...interface{})

SwapChildrenI Swaps the position of 2 Display Objects within this container.

func (*Sprite) Texture

func (self *Sprite) Texture() *Texture

Texture The texture that the sprite is using

func (*Sprite) Tint

func (self *Sprite) Tint() int

Tint The tint applied to the sprite. This is a hex value. A value of 0xFFFFFF will remove any tint effect.

func (*Sprite) TintedTexture

func (self *Sprite) TintedTexture() *Canvas

TintedTexture A canvas that contains the tinted version of the Sprite (in Canvas mode, WebGL doesn't populate this)

func (*Sprite) Top

func (self *Sprite) Top() int

Top The y coordinate of the Game Object. This is the same as `y - offsetY`.

func (*Sprite) TransformCallback

func (self *Sprite) TransformCallback() interface{}

TransformCallback The callback that will apply any scale limiting to the worldTransform.

func (*Sprite) TransformCallbackContext

func (self *Sprite) TransformCallbackContext() interface{}

TransformCallbackContext The context under which `transformCallback` is called.

func (*Sprite) Type

func (self *Sprite) Type() int

Type The const type of this object.

func (*Sprite) Update

func (self *Sprite) Update()

Update Override this method in your own custom objects to handle any update requirements. It is called immediately after `preUpdate` and before `postUpdate`. Remember if this Game Object has any children you should call update on those too.

func (*Sprite) UpdateCrop

func (self *Sprite) UpdateCrop()

UpdateCrop If you have set a crop rectangle on this Game Object via `crop` and since modified the `cropRect` property, or the rectangle it references, then you need to update the crop frame by calling this method.

func (*Sprite) UpdateCropI

func (self *Sprite) UpdateCropI(args ...interface{})

UpdateCropI If you have set a crop rectangle on this Game Object via `crop` and since modified the `cropRect` property, or the rectangle it references, then you need to update the crop frame by calling this method.

func (*Sprite) UpdateI

func (self *Sprite) UpdateI(args ...interface{})

UpdateI Override this method in your own custom objects to handle any update requirements. It is called immediately after `preUpdate` and before `postUpdate`. Remember if this Game Object has any children you should call update on those too.

func (*Sprite) Width

func (self *Sprite) Width() int

Width The width of the sprite, setting this will actually modify the scale to achieve the value set

func (*Sprite) World

func (self *Sprite) World() *Point

World The world coordinates of this Game Object in pixels. Depending on where in the display list this Game Object is placed this value can differ from `position`, which contains the x/y coordinates relative to the Game Objects parent.

func (*Sprite) X

func (self *Sprite) X() int

X The position of the Game Object on the x axis relative to the local coordinates of the parent.

func (*Sprite) Y

func (self *Sprite) Y() int

Y The position of the Game Object on the y axis relative to the local coordinates of the parent.

func (*Sprite) Z

func (self *Sprite) Z() int

Z The z depth of this Game Object within its parent Group. No two objects in a Group can have the same z value. This value is adjusted automatically whenever the Group hierarchy changes. If you wish to re-order the layering of a Game Object then see methods like Group.moveUp or Group.bringToTop.

type SpriteBatch

type SpriteBatch struct {
	*js.Object
}

SpriteBatch The SpriteBatch class is a really fast version of the DisplayObjectContainer built purely for speed, so use when you need a lot of sprites or particles. It's worth mentioning that by default sprite batches are used through-out the renderer, so you only really need to use a SpriteBatch if you have over 1000 sprites that all share the same texture (or texture atlas). It's also useful if running in Canvas mode and you have a lot of un-rotated or un-scaled Sprites as it skips all of the Canvas setTransform calls, which helps performance, especially on mobile devices.

Please note that any Sprite that is part of a SpriteBatch will not have its bounds updated, so will fail checks such as outOfBounds.

func NewSpriteBatch

func NewSpriteBatch(game *Game, parent interface{}) *SpriteBatch

NewSpriteBatch The SpriteBatch class is a really fast version of the DisplayObjectContainer built purely for speed, so use when you need a lot of sprites or particles. It's worth mentioning that by default sprite batches are used through-out the renderer, so you only really need to use a SpriteBatch if you have over 1000 sprites that all share the same texture (or texture atlas). It's also useful if running in Canvas mode and you have a lot of un-rotated or un-scaled Sprites as it skips all of the Canvas setTransform calls, which helps performance, especially on mobile devices.

Please note that any Sprite that is part of a SpriteBatch will not have its bounds updated, so will fail checks such as outOfBounds.

func NewSpriteBatch1O

func NewSpriteBatch1O(game *Game, parent interface{}, name string) *SpriteBatch

NewSpriteBatch1O The SpriteBatch class is a really fast version of the DisplayObjectContainer built purely for speed, so use when you need a lot of sprites or particles. It's worth mentioning that by default sprite batches are used through-out the renderer, so you only really need to use a SpriteBatch if you have over 1000 sprites that all share the same texture (or texture atlas). It's also useful if running in Canvas mode and you have a lot of un-rotated or un-scaled Sprites as it skips all of the Canvas setTransform calls, which helps performance, especially on mobile devices.

Please note that any Sprite that is part of a SpriteBatch will not have its bounds updated, so will fail checks such as outOfBounds.

func NewSpriteBatch2O

func NewSpriteBatch2O(game *Game, parent interface{}, name string, addToStage bool) *SpriteBatch

NewSpriteBatch2O The SpriteBatch class is a really fast version of the DisplayObjectContainer built purely for speed, so use when you need a lot of sprites or particles. It's worth mentioning that by default sprite batches are used through-out the renderer, so you only really need to use a SpriteBatch if you have over 1000 sprites that all share the same texture (or texture atlas). It's also useful if running in Canvas mode and you have a lot of un-rotated or un-scaled Sprites as it skips all of the Canvas setTransform calls, which helps performance, especially on mobile devices.

Please note that any Sprite that is part of a SpriteBatch will not have its bounds updated, so will fail checks such as outOfBounds.

func NewSpriteBatchI

func NewSpriteBatchI(args ...interface{}) *SpriteBatch

NewSpriteBatchI The SpriteBatch class is a really fast version of the DisplayObjectContainer built purely for speed, so use when you need a lot of sprites or particles. It's worth mentioning that by default sprite batches are used through-out the renderer, so you only really need to use a SpriteBatch if you have over 1000 sprites that all share the same texture (or texture atlas). It's also useful if running in Canvas mode and you have a lot of un-rotated or un-scaled Sprites as it skips all of the Canvas setTransform calls, which helps performance, especially on mobile devices.

Please note that any Sprite that is part of a SpriteBatch will not have its bounds updated, so will fail checks such as outOfBounds.

func ToSpriteBatch

func ToSpriteBatch(jsStruct interface{}) *SpriteBatch

SpriteBatch Binding conversion method to SpriteBatch point

func (*SpriteBatch) Add

func (self *SpriteBatch) Add(child *DisplayObject) *DisplayObject

Add Adds an existing object as the top child in this group.

The child is automatically added to the top of the group, and is displayed above every previous child.

Or if the _optional_ index is specified, the child is added at the location specified by the index value, this allows you to control child ordering.

If the child was already in this Group, it is simply returned, and nothing else happens to it.

If `Group.enableBody` is set, then a physics body will be created on the object, so long as one does not already exist.

If `Group.inputEnableChildren` is set, then an Input Handler will be created on the object, so long as one does not already exist.

Use {@link Phaser.Group#addAt addAt} to control where a child is added. Use {@link Phaser.Group#create create} to create and add a new child.

func (*SpriteBatch) Add1O

func (self *SpriteBatch) Add1O(child *DisplayObject, silent bool) *DisplayObject

Add1O Adds an existing object as the top child in this group.

The child is automatically added to the top of the group, and is displayed above every previous child.

Or if the _optional_ index is specified, the child is added at the location specified by the index value, this allows you to control child ordering.

If the child was already in this Group, it is simply returned, and nothing else happens to it.

If `Group.enableBody` is set, then a physics body will be created on the object, so long as one does not already exist.

If `Group.inputEnableChildren` is set, then an Input Handler will be created on the object, so long as one does not already exist.

Use {@link Phaser.Group#addAt addAt} to control where a child is added. Use {@link Phaser.Group#create create} to create and add a new child.

func (*SpriteBatch) Add2O

func (self *SpriteBatch) Add2O(child *DisplayObject, silent bool, index int) *DisplayObject

Add2O Adds an existing object as the top child in this group.

The child is automatically added to the top of the group, and is displayed above every previous child.

Or if the _optional_ index is specified, the child is added at the location specified by the index value, this allows you to control child ordering.

If the child was already in this Group, it is simply returned, and nothing else happens to it.

If `Group.enableBody` is set, then a physics body will be created on the object, so long as one does not already exist.

If `Group.inputEnableChildren` is set, then an Input Handler will be created on the object, so long as one does not already exist.

Use {@link Phaser.Group#addAt addAt} to control where a child is added. Use {@link Phaser.Group#create create} to create and add a new child.

func (*SpriteBatch) AddAll

func (self *SpriteBatch) AddAll(property string, amount int, checkAlive bool, checkVisible bool)

AddAll Adds the amount to the given property on all children in this group.

`Group.addAll('x', 10)` will add 10 to the child.x value for each child.

func (*SpriteBatch) AddAllI

func (self *SpriteBatch) AddAllI(args ...interface{})

AddAllI Adds the amount to the given property on all children in this group.

`Group.addAll('x', 10)` will add 10 to the child.x value for each child.

func (*SpriteBatch) AddAt

func (self *SpriteBatch) AddAt(child *DisplayObject) *DisplayObject

AddAt Adds an existing object to this group.

The child is added to the group at the location specified by the index value, this allows you to control child ordering.

If `Group.enableBody` is set, then a physics body will be created on the object, so long as one does not already exist.

If `Group.inputEnableChildren` is set, then an Input Handler will be created on the object, so long as one does not already exist.

func (*SpriteBatch) AddAt1O

func (self *SpriteBatch) AddAt1O(child *DisplayObject, index int) *DisplayObject

AddAt1O Adds an existing object to this group.

The child is added to the group at the location specified by the index value, this allows you to control child ordering.

If `Group.enableBody` is set, then a physics body will be created on the object, so long as one does not already exist.

If `Group.inputEnableChildren` is set, then an Input Handler will be created on the object, so long as one does not already exist.

func (*SpriteBatch) AddAt2O

func (self *SpriteBatch) AddAt2O(child *DisplayObject, index int, silent bool) *DisplayObject

AddAt2O Adds an existing object to this group.

The child is added to the group at the location specified by the index value, this allows you to control child ordering.

If `Group.enableBody` is set, then a physics body will be created on the object, so long as one does not already exist.

If `Group.inputEnableChildren` is set, then an Input Handler will be created on the object, so long as one does not already exist.

func (*SpriteBatch) AddAtI

func (self *SpriteBatch) AddAtI(args ...interface{}) *DisplayObject

AddAtI Adds an existing object to this group.

The child is added to the group at the location specified by the index value, this allows you to control child ordering.

If `Group.enableBody` is set, then a physics body will be created on the object, so long as one does not already exist.

If `Group.inputEnableChildren` is set, then an Input Handler will be created on the object, so long as one does not already exist.

func (*SpriteBatch) AddChild

func (self *SpriteBatch) AddChild(child *DisplayObject) *DisplayObject

AddChild Adds a child to the container.

func (*SpriteBatch) AddChildAt

func (self *SpriteBatch) AddChildAt(child *DisplayObject, index int) *DisplayObject

AddChildAt Adds a child to the container at a specified index. If the index is out of bounds an error will be thrown

func (*SpriteBatch) AddChildAtI

func (self *SpriteBatch) AddChildAtI(args ...interface{}) *DisplayObject

AddChildAtI Adds a child to the container at a specified index. If the index is out of bounds an error will be thrown

func (*SpriteBatch) AddChildI

func (self *SpriteBatch) AddChildI(args ...interface{}) *DisplayObject

AddChildI Adds a child to the container.

func (*SpriteBatch) AddI

func (self *SpriteBatch) AddI(args ...interface{}) *DisplayObject

AddI Adds an existing object as the top child in this group.

The child is automatically added to the top of the group, and is displayed above every previous child.

Or if the _optional_ index is specified, the child is added at the location specified by the index value, this allows you to control child ordering.

If the child was already in this Group, it is simply returned, and nothing else happens to it.

If `Group.enableBody` is set, then a physics body will be created on the object, so long as one does not already exist.

If `Group.inputEnableChildren` is set, then an Input Handler will be created on the object, so long as one does not already exist.

Use {@link Phaser.Group#addAt addAt} to control where a child is added. Use {@link Phaser.Group#create create} to create and add a new child.

func (*SpriteBatch) AddMultiple

func (self *SpriteBatch) AddMultiple(children interface{}) interface{}

AddMultiple Adds an array of existing Display Objects to this Group.

The Display Objects are automatically added to the top of this Group, and will render on-top of everything already in this Group.

As well as an array you can also pass another Group as the first argument. In this case all of the children from that Group will be removed from it and added into this Group.

If `Group.enableBody` is set, then a physics body will be created on the objects, so long as one does not already exist.

If `Group.inputEnableChildren` is set, then an Input Handler will be created on the objects, so long as one does not already exist.

func (*SpriteBatch) AddMultiple1O

func (self *SpriteBatch) AddMultiple1O(children interface{}, silent bool) interface{}

AddMultiple1O Adds an array of existing Display Objects to this Group.

The Display Objects are automatically added to the top of this Group, and will render on-top of everything already in this Group.

As well as an array you can also pass another Group as the first argument. In this case all of the children from that Group will be removed from it and added into this Group.

If `Group.enableBody` is set, then a physics body will be created on the objects, so long as one does not already exist.

If `Group.inputEnableChildren` is set, then an Input Handler will be created on the objects, so long as one does not already exist.

func (*SpriteBatch) AddMultipleI

func (self *SpriteBatch) AddMultipleI(args ...interface{}) interface{}

AddMultipleI Adds an array of existing Display Objects to this Group.

The Display Objects are automatically added to the top of this Group, and will render on-top of everything already in this Group.

As well as an array you can also pass another Group as the first argument. In this case all of the children from that Group will be removed from it and added into this Group.

If `Group.enableBody` is set, then a physics body will be created on the objects, so long as one does not already exist.

If `Group.inputEnableChildren` is set, then an Input Handler will be created on the objects, so long as one does not already exist.

func (*SpriteBatch) AddToHash

func (self *SpriteBatch) AddToHash(child *DisplayObject) bool

AddToHash Adds a child of this Group into the hash array. This call will return false if the child is not a child of this Group, or is already in the hash.

func (*SpriteBatch) AddToHashI

func (self *SpriteBatch) AddToHashI(args ...interface{}) bool

AddToHashI Adds a child of this Group into the hash array. This call will return false if the child is not a child of this Group, or is already in the hash.

func (*SpriteBatch) Align

func (self *SpriteBatch) Align(width int, height int, cellWidth int, cellHeight int) bool

Align This method iterates through all children in the Group (regardless if they are visible or exist) and then changes their position so they are arranged in a Grid formation. Children must have the `alignTo` method in order to be positioned by this call. All default Phaser Game Objects have this.

The grid dimensions are determined by the first four arguments. The `width` and `height` arguments relate to the width and height of the grid respectively.

For example if the Group had 100 children in it:

`Group.align(10, 10, 32, 32)`

This will align all of the children into a grid formation of 10x10, using 32 pixels per grid cell. If you want a wider grid, you could do:

`Group.align(25, 4, 32, 32)`

This will align the children into a grid of 25x4, again using 32 pixels per grid cell.

You can choose to set _either_ the `width` or `height` value to -1. Doing so tells the method to keep on aligning children until there are no children left. For example if this Group had 48 children in it, the following:

`Group.align(-1, 8, 32, 32)`

... will align the children so that there are 8 children vertically (the second argument), and each row will contain 6 sprites, except the last one, which will contain 5 (totaling 48)

You can also do:

`Group.align(10, -1, 32, 32)`

In this case it will create a grid 10 wide, and as tall as it needs to be in order to fit all of the children in.

The `position` property allows you to control where in each grid cell the child is positioned. This is a constant and can be one of `Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` or `Phaser.BOTTOM_RIGHT`.

The final argument; `offset` lets you start the alignment from a specific child index.

func (*SpriteBatch) Align1O

func (self *SpriteBatch) Align1O(width int, height int, cellWidth int, cellHeight int, position int) bool

Align1O This method iterates through all children in the Group (regardless if they are visible or exist) and then changes their position so they are arranged in a Grid formation. Children must have the `alignTo` method in order to be positioned by this call. All default Phaser Game Objects have this.

The grid dimensions are determined by the first four arguments. The `width` and `height` arguments relate to the width and height of the grid respectively.

For example if the Group had 100 children in it:

`Group.align(10, 10, 32, 32)`

This will align all of the children into a grid formation of 10x10, using 32 pixels per grid cell. If you want a wider grid, you could do:

`Group.align(25, 4, 32, 32)`

This will align the children into a grid of 25x4, again using 32 pixels per grid cell.

You can choose to set _either_ the `width` or `height` value to -1. Doing so tells the method to keep on aligning children until there are no children left. For example if this Group had 48 children in it, the following:

`Group.align(-1, 8, 32, 32)`

... will align the children so that there are 8 children vertically (the second argument), and each row will contain 6 sprites, except the last one, which will contain 5 (totaling 48)

You can also do:

`Group.align(10, -1, 32, 32)`

In this case it will create a grid 10 wide, and as tall as it needs to be in order to fit all of the children in.

The `position` property allows you to control where in each grid cell the child is positioned. This is a constant and can be one of `Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` or `Phaser.BOTTOM_RIGHT`.

The final argument; `offset` lets you start the alignment from a specific child index.

func (*SpriteBatch) Align2O

func (self *SpriteBatch) Align2O(width int, height int, cellWidth int, cellHeight int, position int, offset int) bool

Align2O This method iterates through all children in the Group (regardless if they are visible or exist) and then changes their position so they are arranged in a Grid formation. Children must have the `alignTo` method in order to be positioned by this call. All default Phaser Game Objects have this.

The grid dimensions are determined by the first four arguments. The `width` and `height` arguments relate to the width and height of the grid respectively.

For example if the Group had 100 children in it:

`Group.align(10, 10, 32, 32)`

This will align all of the children into a grid formation of 10x10, using 32 pixels per grid cell. If you want a wider grid, you could do:

`Group.align(25, 4, 32, 32)`

This will align the children into a grid of 25x4, again using 32 pixels per grid cell.

You can choose to set _either_ the `width` or `height` value to -1. Doing so tells the method to keep on aligning children until there are no children left. For example if this Group had 48 children in it, the following:

`Group.align(-1, 8, 32, 32)`

... will align the children so that there are 8 children vertically (the second argument), and each row will contain 6 sprites, except the last one, which will contain 5 (totaling 48)

You can also do:

`Group.align(10, -1, 32, 32)`

In this case it will create a grid 10 wide, and as tall as it needs to be in order to fit all of the children in.

The `position` property allows you to control where in each grid cell the child is positioned. This is a constant and can be one of `Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` or `Phaser.BOTTOM_RIGHT`.

The final argument; `offset` lets you start the alignment from a specific child index.

func (*SpriteBatch) AlignI

func (self *SpriteBatch) AlignI(args ...interface{}) bool

AlignI This method iterates through all children in the Group (regardless if they are visible or exist) and then changes their position so they are arranged in a Grid formation. Children must have the `alignTo` method in order to be positioned by this call. All default Phaser Game Objects have this.

The grid dimensions are determined by the first four arguments. The `width` and `height` arguments relate to the width and height of the grid respectively.

For example if the Group had 100 children in it:

`Group.align(10, 10, 32, 32)`

This will align all of the children into a grid formation of 10x10, using 32 pixels per grid cell. If you want a wider grid, you could do:

`Group.align(25, 4, 32, 32)`

This will align the children into a grid of 25x4, again using 32 pixels per grid cell.

You can choose to set _either_ the `width` or `height` value to -1. Doing so tells the method to keep on aligning children until there are no children left. For example if this Group had 48 children in it, the following:

`Group.align(-1, 8, 32, 32)`

... will align the children so that there are 8 children vertically (the second argument), and each row will contain 6 sprites, except the last one, which will contain 5 (totaling 48)

You can also do:

`Group.align(10, -1, 32, 32)`

In this case it will create a grid 10 wide, and as tall as it needs to be in order to fit all of the children in.

The `position` property allows you to control where in each grid cell the child is positioned. This is a constant and can be one of `Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` or `Phaser.BOTTOM_RIGHT`.

The final argument; `offset` lets you start the alignment from a specific child index.

func (*SpriteBatch) AlignIn

func (self *SpriteBatch) AlignIn(container interface{}) *Group

AlignIn Aligns this Group within another Game Object, or Rectangle, known as the 'container', to one of 9 possible positions.

The container must be a Game Object, or Phaser.Rectangle object. This can include properties such as `World.bounds` or `Camera.view`, for aligning Groups within the world and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText, TileSprites or Buttons.

Please note that aligning a Group to another Game Object does **not** make it a child of the container. It simply modifies its position coordinates so it aligns with it.

The position constants you can use are:

`Phaser.TOP_LEFT`, `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

Groups are placed in such a way that their _bounds_ align with the container, taking into consideration rotation and scale of its children. This allows you to neatly align Groups, irrespective of their position value.

The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final aligned position of the Group. For example:

`group.alignIn(background, Phaser.BOTTOM_RIGHT, -20, -20)`

Would align the `group` to the bottom-right, but moved 20 pixels in from the corner. Think of the offsets as applying an adjustment to the containers bounds before the alignment takes place. So providing a negative offset will 'shrink' the container bounds by that amount, and providing a positive one expands it.

func (*SpriteBatch) AlignIn1O

func (self *SpriteBatch) AlignIn1O(container interface{}, position int) *Group

AlignIn1O Aligns this Group within another Game Object, or Rectangle, known as the 'container', to one of 9 possible positions.

The container must be a Game Object, or Phaser.Rectangle object. This can include properties such as `World.bounds` or `Camera.view`, for aligning Groups within the world and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText, TileSprites or Buttons.

Please note that aligning a Group to another Game Object does **not** make it a child of the container. It simply modifies its position coordinates so it aligns with it.

The position constants you can use are:

`Phaser.TOP_LEFT`, `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

Groups are placed in such a way that their _bounds_ align with the container, taking into consideration rotation and scale of its children. This allows you to neatly align Groups, irrespective of their position value.

The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final aligned position of the Group. For example:

`group.alignIn(background, Phaser.BOTTOM_RIGHT, -20, -20)`

Would align the `group` to the bottom-right, but moved 20 pixels in from the corner. Think of the offsets as applying an adjustment to the containers bounds before the alignment takes place. So providing a negative offset will 'shrink' the container bounds by that amount, and providing a positive one expands it.

func (*SpriteBatch) AlignIn2O

func (self *SpriteBatch) AlignIn2O(container interface{}, position int, offsetX int) *Group

AlignIn2O Aligns this Group within another Game Object, or Rectangle, known as the 'container', to one of 9 possible positions.

The container must be a Game Object, or Phaser.Rectangle object. This can include properties such as `World.bounds` or `Camera.view`, for aligning Groups within the world and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText, TileSprites or Buttons.

Please note that aligning a Group to another Game Object does **not** make it a child of the container. It simply modifies its position coordinates so it aligns with it.

The position constants you can use are:

`Phaser.TOP_LEFT`, `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

Groups are placed in such a way that their _bounds_ align with the container, taking into consideration rotation and scale of its children. This allows you to neatly align Groups, irrespective of their position value.

The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final aligned position of the Group. For example:

`group.alignIn(background, Phaser.BOTTOM_RIGHT, -20, -20)`

Would align the `group` to the bottom-right, but moved 20 pixels in from the corner. Think of the offsets as applying an adjustment to the containers bounds before the alignment takes place. So providing a negative offset will 'shrink' the container bounds by that amount, and providing a positive one expands it.

func (*SpriteBatch) AlignIn3O

func (self *SpriteBatch) AlignIn3O(container interface{}, position int, offsetX int, offsetY int) *Group

AlignIn3O Aligns this Group within another Game Object, or Rectangle, known as the 'container', to one of 9 possible positions.

The container must be a Game Object, or Phaser.Rectangle object. This can include properties such as `World.bounds` or `Camera.view`, for aligning Groups within the world and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText, TileSprites or Buttons.

Please note that aligning a Group to another Game Object does **not** make it a child of the container. It simply modifies its position coordinates so it aligns with it.

The position constants you can use are:

`Phaser.TOP_LEFT`, `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

Groups are placed in such a way that their _bounds_ align with the container, taking into consideration rotation and scale of its children. This allows you to neatly align Groups, irrespective of their position value.

The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final aligned position of the Group. For example:

`group.alignIn(background, Phaser.BOTTOM_RIGHT, -20, -20)`

Would align the `group` to the bottom-right, but moved 20 pixels in from the corner. Think of the offsets as applying an adjustment to the containers bounds before the alignment takes place. So providing a negative offset will 'shrink' the container bounds by that amount, and providing a positive one expands it.

func (*SpriteBatch) AlignInI

func (self *SpriteBatch) AlignInI(args ...interface{}) *Group

AlignInI Aligns this Group within another Game Object, or Rectangle, known as the 'container', to one of 9 possible positions.

The container must be a Game Object, or Phaser.Rectangle object. This can include properties such as `World.bounds` or `Camera.view`, for aligning Groups within the world and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText, TileSprites or Buttons.

Please note that aligning a Group to another Game Object does **not** make it a child of the container. It simply modifies its position coordinates so it aligns with it.

The position constants you can use are:

`Phaser.TOP_LEFT`, `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

Groups are placed in such a way that their _bounds_ align with the container, taking into consideration rotation and scale of its children. This allows you to neatly align Groups, irrespective of their position value.

The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final aligned position of the Group. For example:

`group.alignIn(background, Phaser.BOTTOM_RIGHT, -20, -20)`

Would align the `group` to the bottom-right, but moved 20 pixels in from the corner. Think of the offsets as applying an adjustment to the containers bounds before the alignment takes place. So providing a negative offset will 'shrink' the container bounds by that amount, and providing a positive one expands it.

func (*SpriteBatch) AlignTo

func (self *SpriteBatch) AlignTo(parent interface{}) *Group

AlignTo Aligns this Group to the side of another Game Object, or Rectangle, known as the 'parent', in one of 11 possible positions.

The parent must be a Game Object, or Phaser.Rectangle object. This can include properties such as `World.bounds` or `Camera.view`, for aligning Groups within the world and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText, TileSprites or Buttons.

Please note that aligning a Group to another Game Object does **not** make it a child of the parent. It simply modifies its position coordinates so it aligns with it.

The position constants you can use are:

`Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_TOP`, `Phaser.LEFT_CENTER`, `Phaser.LEFT_BOTTOM`, `Phaser.RIGHT_TOP`, `Phaser.RIGHT_CENTER`, `Phaser.RIGHT_BOTTOM`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

Groups are placed in such a way that their _bounds_ align with the parent, taking into consideration rotation and scale of the children. This allows you to neatly align Groups, irrespective of their position value.

The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final aligned position of the Group. For example:

`group.alignTo(background, Phaser.BOTTOM_RIGHT, -20, -20)`

Would align the `group` to the bottom-right, but moved 20 pixels in from the corner. Think of the offsets as applying an adjustment to the parents bounds before the alignment takes place. So providing a negative offset will 'shrink' the parent bounds by that amount, and providing a positive one expands it.

func (*SpriteBatch) AlignTo1O

func (self *SpriteBatch) AlignTo1O(parent interface{}, position int) *Group

AlignTo1O Aligns this Group to the side of another Game Object, or Rectangle, known as the 'parent', in one of 11 possible positions.

The parent must be a Game Object, or Phaser.Rectangle object. This can include properties such as `World.bounds` or `Camera.view`, for aligning Groups within the world and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText, TileSprites or Buttons.

Please note that aligning a Group to another Game Object does **not** make it a child of the parent. It simply modifies its position coordinates so it aligns with it.

The position constants you can use are:

`Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_TOP`, `Phaser.LEFT_CENTER`, `Phaser.LEFT_BOTTOM`, `Phaser.RIGHT_TOP`, `Phaser.RIGHT_CENTER`, `Phaser.RIGHT_BOTTOM`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

Groups are placed in such a way that their _bounds_ align with the parent, taking into consideration rotation and scale of the children. This allows you to neatly align Groups, irrespective of their position value.

The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final aligned position of the Group. For example:

`group.alignTo(background, Phaser.BOTTOM_RIGHT, -20, -20)`

Would align the `group` to the bottom-right, but moved 20 pixels in from the corner. Think of the offsets as applying an adjustment to the parents bounds before the alignment takes place. So providing a negative offset will 'shrink' the parent bounds by that amount, and providing a positive one expands it.

func (*SpriteBatch) AlignTo2O

func (self *SpriteBatch) AlignTo2O(parent interface{}, position int, offsetX int) *Group

AlignTo2O Aligns this Group to the side of another Game Object, or Rectangle, known as the 'parent', in one of 11 possible positions.

The parent must be a Game Object, or Phaser.Rectangle object. This can include properties such as `World.bounds` or `Camera.view`, for aligning Groups within the world and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText, TileSprites or Buttons.

Please note that aligning a Group to another Game Object does **not** make it a child of the parent. It simply modifies its position coordinates so it aligns with it.

The position constants you can use are:

`Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_TOP`, `Phaser.LEFT_CENTER`, `Phaser.LEFT_BOTTOM`, `Phaser.RIGHT_TOP`, `Phaser.RIGHT_CENTER`, `Phaser.RIGHT_BOTTOM`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

Groups are placed in such a way that their _bounds_ align with the parent, taking into consideration rotation and scale of the children. This allows you to neatly align Groups, irrespective of their position value.

The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final aligned position of the Group. For example:

`group.alignTo(background, Phaser.BOTTOM_RIGHT, -20, -20)`

Would align the `group` to the bottom-right, but moved 20 pixels in from the corner. Think of the offsets as applying an adjustment to the parents bounds before the alignment takes place. So providing a negative offset will 'shrink' the parent bounds by that amount, and providing a positive one expands it.

func (*SpriteBatch) AlignTo3O

func (self *SpriteBatch) AlignTo3O(parent interface{}, position int, offsetX int, offsetY int) *Group

AlignTo3O Aligns this Group to the side of another Game Object, or Rectangle, known as the 'parent', in one of 11 possible positions.

The parent must be a Game Object, or Phaser.Rectangle object. This can include properties such as `World.bounds` or `Camera.view`, for aligning Groups within the world and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText, TileSprites or Buttons.

Please note that aligning a Group to another Game Object does **not** make it a child of the parent. It simply modifies its position coordinates so it aligns with it.

The position constants you can use are:

`Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_TOP`, `Phaser.LEFT_CENTER`, `Phaser.LEFT_BOTTOM`, `Phaser.RIGHT_TOP`, `Phaser.RIGHT_CENTER`, `Phaser.RIGHT_BOTTOM`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

Groups are placed in such a way that their _bounds_ align with the parent, taking into consideration rotation and scale of the children. This allows you to neatly align Groups, irrespective of their position value.

The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final aligned position of the Group. For example:

`group.alignTo(background, Phaser.BOTTOM_RIGHT, -20, -20)`

Would align the `group` to the bottom-right, but moved 20 pixels in from the corner. Think of the offsets as applying an adjustment to the parents bounds before the alignment takes place. So providing a negative offset will 'shrink' the parent bounds by that amount, and providing a positive one expands it.

func (*SpriteBatch) AlignToI

func (self *SpriteBatch) AlignToI(args ...interface{}) *Group

AlignToI Aligns this Group to the side of another Game Object, or Rectangle, known as the 'parent', in one of 11 possible positions.

The parent must be a Game Object, or Phaser.Rectangle object. This can include properties such as `World.bounds` or `Camera.view`, for aligning Groups within the world and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText, TileSprites or Buttons.

Please note that aligning a Group to another Game Object does **not** make it a child of the parent. It simply modifies its position coordinates so it aligns with it.

The position constants you can use are:

`Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_TOP`, `Phaser.LEFT_CENTER`, `Phaser.LEFT_BOTTOM`, `Phaser.RIGHT_TOP`, `Phaser.RIGHT_CENTER`, `Phaser.RIGHT_BOTTOM`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

Groups are placed in such a way that their _bounds_ align with the parent, taking into consideration rotation and scale of the children. This allows you to neatly align Groups, irrespective of their position value.

The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final aligned position of the Group. For example:

`group.alignTo(background, Phaser.BOTTOM_RIGHT, -20, -20)`

Would align the `group` to the bottom-right, but moved 20 pixels in from the corner. Think of the offsets as applying an adjustment to the parents bounds before the alignment takes place. So providing a negative offset will 'shrink' the parent bounds by that amount, and providing a positive one expands it.

func (*SpriteBatch) Alive

func (self *SpriteBatch) Alive() bool

Alive The alive property is useful for Groups that are children of other Groups and need to be included/excluded in checks like forEachAlive.

func (*SpriteBatch) Alpha

func (self *SpriteBatch) Alpha() int

Alpha The alpha value of the group container.

func (*SpriteBatch) Angle

func (self *SpriteBatch) Angle() int

Angle The angle of rotation of the group container, in degrees.

This adjusts the group itself by modifying its local rotation transform.

This has no impact on the rotation/angle properties of the children, but it will update their worldTransform and on-screen orientation and position.

func (*SpriteBatch) AscendingSortHandler

func (self *SpriteBatch) AscendingSortHandler(a interface{}, b interface{})

AscendingSortHandler An internal helper function for the sort process.

func (*SpriteBatch) AscendingSortHandlerI

func (self *SpriteBatch) AscendingSortHandlerI(args ...interface{})

AscendingSortHandlerI An internal helper function for the sort process.

func (*SpriteBatch) Bottom

func (self *SpriteBatch) Bottom() int

Bottom The bottom coordinate of this Group.

It is derived by calling `getBounds`, calculating the Groups dimensions based on its visible children.

func (*SpriteBatch) BringToTop

func (self *SpriteBatch) BringToTop(child interface{}) interface{}

BringToTop Brings the given child to the top of this group so it renders above all other children.

func (*SpriteBatch) BringToTopI

func (self *SpriteBatch) BringToTopI(args ...interface{}) interface{}

BringToTopI Brings the given child to the top of this group so it renders above all other children.

func (*SpriteBatch) CallAll

func (self *SpriteBatch) CallAll(method string, context string, args interface{})

CallAll Calls a function, specified by name, on all on children.

The function is called for all children regardless if they are dead or alive (see callAllExists for different options). After the method parameter and context you can add as many extra parameters as you like, which will all be passed to the child.

func (*SpriteBatch) CallAllExists

func (self *SpriteBatch) CallAllExists(callback string, existsValue bool, parameter interface{})

CallAllExists Calls a function, specified by name, on all children in the group who exist (or do not exist).

After the existsValue parameter you can add as many parameters as you like, which will all be passed to the child callback.

func (*SpriteBatch) CallAllExistsI

func (self *SpriteBatch) CallAllExistsI(args ...interface{})

CallAllExistsI Calls a function, specified by name, on all children in the group who exist (or do not exist).

After the existsValue parameter you can add as many parameters as you like, which will all be passed to the child callback.

func (*SpriteBatch) CallAllI

func (self *SpriteBatch) CallAllI(args ...interface{})

CallAllI Calls a function, specified by name, on all on children.

The function is called for all children regardless if they are dead or alive (see callAllExists for different options). After the method parameter and context you can add as many extra parameters as you like, which will all be passed to the child.

func (*SpriteBatch) CallbackFromArray

func (self *SpriteBatch) CallbackFromArray(child interface{}, callback []interface{}, length int)

CallbackFromArray Returns a reference to a function that exists on a child of the group based on the given callback array.

func (*SpriteBatch) CallbackFromArrayI

func (self *SpriteBatch) CallbackFromArrayI(args ...interface{})

CallbackFromArrayI Returns a reference to a function that exists on a child of the group based on the given callback array.

func (*SpriteBatch) CameraOffset

func (self *SpriteBatch) CameraOffset() *Point

CameraOffset If this object is {@link Phaser.Group#fixedToCamera fixedToCamera} then this stores the x/y position offset relative to the top-left of the camera view. If the parent of this Group is also `fixedToCamera` then the offset here is in addition to that and should typically be disabled.

func (*SpriteBatch) CenterX

func (self *SpriteBatch) CenterX() int

CenterX The center x coordinate of this Group.

It is derived by calling `getBounds`, calculating the Groups dimensions based on its visible children.

func (*SpriteBatch) CenterY

func (self *SpriteBatch) CenterY() int

CenterY The center y coordinate of this Group.

It is derived by calling `getBounds`, calculating the Groups dimensions based on its visible children.

func (*SpriteBatch) CheckAll

func (self *SpriteBatch) CheckAll(key string, value interface{})

CheckAll Quickly check that the same property across all children of this group is equal to the given value.

This call doesn't descend down children, so if you have a Group inside of this group, the property will be checked on the group but not its children.

func (*SpriteBatch) CheckAll1O

func (self *SpriteBatch) CheckAll1O(key string, value interface{}, checkAlive bool)

CheckAll1O Quickly check that the same property across all children of this group is equal to the given value.

This call doesn't descend down children, so if you have a Group inside of this group, the property will be checked on the group but not its children.

func (*SpriteBatch) CheckAll2O

func (self *SpriteBatch) CheckAll2O(key string, value interface{}, checkAlive bool, checkVisible bool)

CheckAll2O Quickly check that the same property across all children of this group is equal to the given value.

This call doesn't descend down children, so if you have a Group inside of this group, the property will be checked on the group but not its children.

func (*SpriteBatch) CheckAll3O

func (self *SpriteBatch) CheckAll3O(key string, value interface{}, checkAlive bool, checkVisible bool, force bool)

CheckAll3O Quickly check that the same property across all children of this group is equal to the given value.

This call doesn't descend down children, so if you have a Group inside of this group, the property will be checked on the group but not its children.

func (*SpriteBatch) CheckAllI

func (self *SpriteBatch) CheckAllI(args ...interface{})

CheckAllI Quickly check that the same property across all children of this group is equal to the given value.

This call doesn't descend down children, so if you have a Group inside of this group, the property will be checked on the group but not its children.

func (*SpriteBatch) CheckProperty

func (self *SpriteBatch) CheckProperty(child interface{}, key []interface{}, value interface{}) bool

CheckProperty Checks a property for the given value on the child.

func (*SpriteBatch) CheckProperty1O

func (self *SpriteBatch) CheckProperty1O(child interface{}, key []interface{}, value interface{}, force bool) bool

CheckProperty1O Checks a property for the given value on the child.

func (*SpriteBatch) CheckPropertyI

func (self *SpriteBatch) CheckPropertyI(args ...interface{}) bool

CheckPropertyI Checks a property for the given value on the child.

func (*SpriteBatch) Children

func (self *SpriteBatch) Children() []DisplayObject

Children [read-only] The array of children of this container.

func (*SpriteBatch) ClassType

func (self *SpriteBatch) ClassType() interface{}

ClassType The type of objects that will be created when using {@link Phaser.Group#create create} or {@link Phaser.Group#createMultiple createMultiple}.

Any object may be used but it should extend either Sprite or Image and accept the same constructor arguments: when a new object is created it is passed the following parameters to its constructor: `(game, x, y, key, frame)`.

func (*SpriteBatch) Contains

func (self *SpriteBatch) Contains(child *DisplayObject) bool

Contains Determines whether the specified display object is a child of the DisplayObjectContainer instance or the instance itself.

func (*SpriteBatch) ContainsI

func (self *SpriteBatch) ContainsI(args ...interface{}) bool

ContainsI Determines whether the specified display object is a child of the DisplayObjectContainer instance or the instance itself.

func (*SpriteBatch) CountDead

func (self *SpriteBatch) CountDead() int

CountDead Get the number of dead children in this group.

func (*SpriteBatch) CountDeadI

func (self *SpriteBatch) CountDeadI(args ...interface{}) int

CountDeadI Get the number of dead children in this group.

func (*SpriteBatch) CountLiving

func (self *SpriteBatch) CountLiving() int

CountLiving Get the number of living children in this group.

func (*SpriteBatch) CountLivingI

func (self *SpriteBatch) CountLivingI(args ...interface{}) int

CountLivingI Get the number of living children in this group.

func (*SpriteBatch) Create

func (self *SpriteBatch) Create(x int, y int) *DisplayObject

Create Creates a new Phaser.Sprite object and adds it to the top of this group.

Use {@link Phaser.Group#classType classType} to change the type of object created.

The child is automatically added to the top of the group, and is displayed above every previous child.

Or if the _optional_ index is specified, the child is added at the location specified by the index value, this allows you to control child ordering.

If `Group.enableBody` is set, then a physics body will be created on the object, so long as one does not already exist.

If `Group.inputEnableChildren` is set, then an Input Handler will be created on the object, so long as one does not already exist.

func (*SpriteBatch) Create1O

func (self *SpriteBatch) Create1O(x int, y int, key interface{}) *DisplayObject

Create1O Creates a new Phaser.Sprite object and adds it to the top of this group.

Use {@link Phaser.Group#classType classType} to change the type of object created.

The child is automatically added to the top of the group, and is displayed above every previous child.

Or if the _optional_ index is specified, the child is added at the location specified by the index value, this allows you to control child ordering.

If `Group.enableBody` is set, then a physics body will be created on the object, so long as one does not already exist.

If `Group.inputEnableChildren` is set, then an Input Handler will be created on the object, so long as one does not already exist.

func (*SpriteBatch) Create2O

func (self *SpriteBatch) Create2O(x int, y int, key interface{}, frame interface{}) *DisplayObject

Create2O Creates a new Phaser.Sprite object and adds it to the top of this group.

Use {@link Phaser.Group#classType classType} to change the type of object created.

The child is automatically added to the top of the group, and is displayed above every previous child.

Or if the _optional_ index is specified, the child is added at the location specified by the index value, this allows you to control child ordering.

If `Group.enableBody` is set, then a physics body will be created on the object, so long as one does not already exist.

If `Group.inputEnableChildren` is set, then an Input Handler will be created on the object, so long as one does not already exist.

func (*SpriteBatch) Create3O

func (self *SpriteBatch) Create3O(x int, y int, key interface{}, frame interface{}, exists bool) *DisplayObject

Create3O Creates a new Phaser.Sprite object and adds it to the top of this group.

Use {@link Phaser.Group#classType classType} to change the type of object created.

The child is automatically added to the top of the group, and is displayed above every previous child.

Or if the _optional_ index is specified, the child is added at the location specified by the index value, this allows you to control child ordering.

If `Group.enableBody` is set, then a physics body will be created on the object, so long as one does not already exist.

If `Group.inputEnableChildren` is set, then an Input Handler will be created on the object, so long as one does not already exist.

func (*SpriteBatch) Create4O

func (self *SpriteBatch) Create4O(x int, y int, key interface{}, frame interface{}, exists bool, index int) *DisplayObject

Create4O Creates a new Phaser.Sprite object and adds it to the top of this group.

Use {@link Phaser.Group#classType classType} to change the type of object created.

The child is automatically added to the top of the group, and is displayed above every previous child.

Or if the _optional_ index is specified, the child is added at the location specified by the index value, this allows you to control child ordering.

If `Group.enableBody` is set, then a physics body will be created on the object, so long as one does not already exist.

If `Group.inputEnableChildren` is set, then an Input Handler will be created on the object, so long as one does not already exist.

func (*SpriteBatch) CreateI

func (self *SpriteBatch) CreateI(args ...interface{}) *DisplayObject

CreateI Creates a new Phaser.Sprite object and adds it to the top of this group.

Use {@link Phaser.Group#classType classType} to change the type of object created.

The child is automatically added to the top of the group, and is displayed above every previous child.

Or if the _optional_ index is specified, the child is added at the location specified by the index value, this allows you to control child ordering.

If `Group.enableBody` is set, then a physics body will be created on the object, so long as one does not already exist.

If `Group.inputEnableChildren` is set, then an Input Handler will be created on the object, so long as one does not already exist.

func (*SpriteBatch) CreateMultiple

func (self *SpriteBatch) CreateMultiple(quantity int, key interface{}) []interface{}

CreateMultiple Creates multiple Phaser.Sprite objects and adds them to the top of this Group.

This method is useful if you need to quickly generate a pool of sprites, such as bullets.

Use {@link Phaser.Group#classType classType} to change the type of object created.

You can provide an array as the `key` and / or `frame` arguments. When you do this it will create `quantity` Sprites for every key (and frame) in the arrays.

For example:

`createMultiple(25, ['ball', 'carrot'])`

In the above code there are 2 keys (ball and carrot) which means that 50 sprites will be created in total, 25 of each. You can also have the `frame` as an array:

`createMultiple(5, 'bricks', [0, 1, 2, 3])`

In the above there is one key (bricks), which is a sprite sheet. The frames array tells this method to use frames 0, 1, 2 and 3. So in total it will create 20 sprites, because the quantity was set to 5, so that is 5 brick sprites of frame 0, 5 brick sprites with frame 1, and so on.

If you set both the key and frame arguments to be arrays then understand it will create a total quantity of sprites equal to the size of both arrays times each other. I.e.:

`createMultiple(20, ['diamonds', 'balls'], [0, 1, 2])`

The above will create 20 'diamonds' of frame 0, 20 with frame 1 and 20 with frame 2. It will then create 20 'balls' of frame 0, 20 with frame 1 and 20 with frame 2. In total it will have created 120 sprites.

By default the Sprites will have their `exists` property set to `false`, and they will be positioned at 0x0, relative to the `Group.x / y` values.

If `Group.enableBody` is set, then a physics body will be created on the objects, so long as one does not already exist.

If `Group.inputEnableChildren` is set, then an Input Handler will be created on the objects, so long as one does not already exist.

func (*SpriteBatch) CreateMultiple1O

func (self *SpriteBatch) CreateMultiple1O(quantity int, key interface{}, frame interface{}) []interface{}

CreateMultiple1O Creates multiple Phaser.Sprite objects and adds them to the top of this Group.

This method is useful if you need to quickly generate a pool of sprites, such as bullets.

Use {@link Phaser.Group#classType classType} to change the type of object created.

You can provide an array as the `key` and / or `frame` arguments. When you do this it will create `quantity` Sprites for every key (and frame) in the arrays.

For example:

`createMultiple(25, ['ball', 'carrot'])`

In the above code there are 2 keys (ball and carrot) which means that 50 sprites will be created in total, 25 of each. You can also have the `frame` as an array:

`createMultiple(5, 'bricks', [0, 1, 2, 3])`

In the above there is one key (bricks), which is a sprite sheet. The frames array tells this method to use frames 0, 1, 2 and 3. So in total it will create 20 sprites, because the quantity was set to 5, so that is 5 brick sprites of frame 0, 5 brick sprites with frame 1, and so on.

If you set both the key and frame arguments to be arrays then understand it will create a total quantity of sprites equal to the size of both arrays times each other. I.e.:

`createMultiple(20, ['diamonds', 'balls'], [0, 1, 2])`

The above will create 20 'diamonds' of frame 0, 20 with frame 1 and 20 with frame 2. It will then create 20 'balls' of frame 0, 20 with frame 1 and 20 with frame 2. In total it will have created 120 sprites.

By default the Sprites will have their `exists` property set to `false`, and they will be positioned at 0x0, relative to the `Group.x / y` values.

If `Group.enableBody` is set, then a physics body will be created on the objects, so long as one does not already exist.

If `Group.inputEnableChildren` is set, then an Input Handler will be created on the objects, so long as one does not already exist.

func (*SpriteBatch) CreateMultiple2O

func (self *SpriteBatch) CreateMultiple2O(quantity int, key interface{}, frame interface{}, exists bool) []interface{}

CreateMultiple2O Creates multiple Phaser.Sprite objects and adds them to the top of this Group.

This method is useful if you need to quickly generate a pool of sprites, such as bullets.

Use {@link Phaser.Group#classType classType} to change the type of object created.

You can provide an array as the `key` and / or `frame` arguments. When you do this it will create `quantity` Sprites for every key (and frame) in the arrays.

For example:

`createMultiple(25, ['ball', 'carrot'])`

In the above code there are 2 keys (ball and carrot) which means that 50 sprites will be created in total, 25 of each. You can also have the `frame` as an array:

`createMultiple(5, 'bricks', [0, 1, 2, 3])`

In the above there is one key (bricks), which is a sprite sheet. The frames array tells this method to use frames 0, 1, 2 and 3. So in total it will create 20 sprites, because the quantity was set to 5, so that is 5 brick sprites of frame 0, 5 brick sprites with frame 1, and so on.

If you set both the key and frame arguments to be arrays then understand it will create a total quantity of sprites equal to the size of both arrays times each other. I.e.:

`createMultiple(20, ['diamonds', 'balls'], [0, 1, 2])`

The above will create 20 'diamonds' of frame 0, 20 with frame 1 and 20 with frame 2. It will then create 20 'balls' of frame 0, 20 with frame 1 and 20 with frame 2. In total it will have created 120 sprites.

By default the Sprites will have their `exists` property set to `false`, and they will be positioned at 0x0, relative to the `Group.x / y` values.

If `Group.enableBody` is set, then a physics body will be created on the objects, so long as one does not already exist.

If `Group.inputEnableChildren` is set, then an Input Handler will be created on the objects, so long as one does not already exist.

func (*SpriteBatch) CreateMultipleI

func (self *SpriteBatch) CreateMultipleI(args ...interface{}) []interface{}

CreateMultipleI Creates multiple Phaser.Sprite objects and adds them to the top of this Group.

This method is useful if you need to quickly generate a pool of sprites, such as bullets.

Use {@link Phaser.Group#classType classType} to change the type of object created.

You can provide an array as the `key` and / or `frame` arguments. When you do this it will create `quantity` Sprites for every key (and frame) in the arrays.

For example:

`createMultiple(25, ['ball', 'carrot'])`

In the above code there are 2 keys (ball and carrot) which means that 50 sprites will be created in total, 25 of each. You can also have the `frame` as an array:

`createMultiple(5, 'bricks', [0, 1, 2, 3])`

In the above there is one key (bricks), which is a sprite sheet. The frames array tells this method to use frames 0, 1, 2 and 3. So in total it will create 20 sprites, because the quantity was set to 5, so that is 5 brick sprites of frame 0, 5 brick sprites with frame 1, and so on.

If you set both the key and frame arguments to be arrays then understand it will create a total quantity of sprites equal to the size of both arrays times each other. I.e.:

`createMultiple(20, ['diamonds', 'balls'], [0, 1, 2])`

The above will create 20 'diamonds' of frame 0, 20 with frame 1 and 20 with frame 2. It will then create 20 'balls' of frame 0, 20 with frame 1 and 20 with frame 2. In total it will have created 120 sprites.

By default the Sprites will have their `exists` property set to `false`, and they will be positioned at 0x0, relative to the `Group.x / y` values.

If `Group.enableBody` is set, then a physics body will be created on the objects, so long as one does not already exist.

If `Group.inputEnableChildren` is set, then an Input Handler will be created on the objects, so long as one does not already exist.

func (*SpriteBatch) Cursor

func (self *SpriteBatch) Cursor() *DisplayObject

Cursor The current display object that the group cursor is pointing to, if any. (Can be set manually.)

The cursor is a way to iterate through the children in a Group using {@link Phaser.Group#next next} and {@link Phaser.Group#previous previous}.

func (*SpriteBatch) CursorIndex

func (self *SpriteBatch) CursorIndex() int

CursorIndex The current index of the Group cursor. Advance it with Group.next.

func (*SpriteBatch) CustomSort

func (self *SpriteBatch) CustomSort(sortHandler interface{})

CustomSort Sort the children in the group according to custom sort function.

The `sortHandler` is provided the two parameters: the two children involved in the comparison (a and b). It should return -1 if `a > b`, 1 if `a < b` or 0 if `a === b`.

func (*SpriteBatch) CustomSort1O

func (self *SpriteBatch) CustomSort1O(sortHandler interface{}, context interface{})

CustomSort1O Sort the children in the group according to custom sort function.

The `sortHandler` is provided the two parameters: the two children involved in the comparison (a and b). It should return -1 if `a > b`, 1 if `a < b` or 0 if `a === b`.

func (*SpriteBatch) CustomSortI

func (self *SpriteBatch) CustomSortI(args ...interface{})

CustomSortI Sort the children in the group according to custom sort function.

The `sortHandler` is provided the two parameters: the two children involved in the comparison (a and b). It should return -1 if `a > b`, 1 if `a < b` or 0 if `a === b`.

func (*SpriteBatch) DescendingSortHandler

func (self *SpriteBatch) DescendingSortHandler(a interface{}, b interface{})

DescendingSortHandler An internal helper function for the sort process.

func (*SpriteBatch) DescendingSortHandlerI

func (self *SpriteBatch) DescendingSortHandlerI(args ...interface{})

DescendingSortHandlerI An internal helper function for the sort process.

func (*SpriteBatch) Destroy

func (self *SpriteBatch) Destroy()

Destroy Destroys this group.

Removes all children, then removes this group from its parent and nulls references.

func (*SpriteBatch) Destroy1O

func (self *SpriteBatch) Destroy1O(destroyChildren bool)

Destroy1O Destroys this group.

Removes all children, then removes this group from its parent and nulls references.

func (*SpriteBatch) Destroy2O

func (self *SpriteBatch) Destroy2O(destroyChildren bool, soft bool)

Destroy2O Destroys this group.

Removes all children, then removes this group from its parent and nulls references.

func (*SpriteBatch) DestroyI

func (self *SpriteBatch) DestroyI(args ...interface{})

DestroyI Destroys this group.

Removes all children, then removes this group from its parent and nulls references.

func (*SpriteBatch) DivideAll

func (self *SpriteBatch) DivideAll(property string, amount int, checkAlive bool, checkVisible bool)

DivideAll Divides the given property by the amount on all children in this group.

`Group.divideAll('x', 2)` will half the child.x value for each child.

func (*SpriteBatch) DivideAllI

func (self *SpriteBatch) DivideAllI(args ...interface{})

DivideAllI Divides the given property by the amount on all children in this group.

`Group.divideAll('x', 2)` will half the child.x value for each child.

func (*SpriteBatch) EnableBody

func (self *SpriteBatch) EnableBody() bool

EnableBody If true all Sprites created by, or added to this group, will have a physics body enabled on them.

If there are children already in the Group at the time you set this property, they are not changed.

The default body type is controlled with {@link Phaser.Group#physicsBodyType physicsBodyType}.

func (*SpriteBatch) EnableBodyDebug

func (self *SpriteBatch) EnableBodyDebug() bool

EnableBodyDebug If true when a physics body is created (via {@link Phaser.Group#enableBody enableBody}) it will create a physics debug object as well.

This only works for P2 bodies.

func (*SpriteBatch) Exists

func (self *SpriteBatch) Exists() bool

Exists If exists is true the group is updated, otherwise it is skipped.

func (*SpriteBatch) Filter

func (self *SpriteBatch) Filter(predicate interface{}) *ArraySet

Filter Find children matching a certain predicate.

For example:

var healthyList = Group.filter(function(child, index, children) {
    return child.health > 10 ? true : false;
}, true);
healthyList.callAll('attack');

Note: Currently this will skip any children which are Groups themselves.

func (*SpriteBatch) Filter1O

func (self *SpriteBatch) Filter1O(predicate interface{}, checkExists bool) *ArraySet

Filter1O Find children matching a certain predicate.

For example:

var healthyList = Group.filter(function(child, index, children) {
    return child.health > 10 ? true : false;
}, true);
healthyList.callAll('attack');

Note: Currently this will skip any children which are Groups themselves.

func (*SpriteBatch) FilterI

func (self *SpriteBatch) FilterI(args ...interface{}) *ArraySet

FilterI Find children matching a certain predicate.

For example:

var healthyList = Group.filter(function(child, index, children) {
    return child.health > 10 ? true : false;
}, true);
healthyList.callAll('attack');

Note: Currently this will skip any children which are Groups themselves.

func (*SpriteBatch) FixedToCamera

func (self *SpriteBatch) FixedToCamera() bool

FixedToCamera A Group that is fixed to the camera uses its x/y coordinates as offsets from the top left of the camera. These are stored in Group.cameraOffset.

Note that the cameraOffset values are in addition to any parent in the display list. So if this Group was in a Group that has x: 200, then this will be added to the cameraOffset.x

func (*SpriteBatch) ForEach

func (self *SpriteBatch) ForEach(callback interface{}, callbackContext interface{})

ForEach Call a function on each child in this group.

Additional arguments for the callback can be specified after the `checkExists` parameter. For example,

Group.forEach(awardBonusGold, this, true, 100, 500)

would invoke `awardBonusGold` function with the parameters `(child, 100, 500)`.

Note: This check will skip any children which are Groups themselves.

func (*SpriteBatch) ForEach1O

func (self *SpriteBatch) ForEach1O(callback interface{}, callbackContext interface{}, checkExists bool)

ForEach1O Call a function on each child in this group.

Additional arguments for the callback can be specified after the `checkExists` parameter. For example,

Group.forEach(awardBonusGold, this, true, 100, 500)

would invoke `awardBonusGold` function with the parameters `(child, 100, 500)`.

Note: This check will skip any children which are Groups themselves.

func (*SpriteBatch) ForEach2O

func (self *SpriteBatch) ForEach2O(callback interface{}, callbackContext interface{}, checkExists bool, args interface{})

ForEach2O Call a function on each child in this group.

Additional arguments for the callback can be specified after the `checkExists` parameter. For example,

Group.forEach(awardBonusGold, this, true, 100, 500)

would invoke `awardBonusGold` function with the parameters `(child, 100, 500)`.

Note: This check will skip any children which are Groups themselves.

func (*SpriteBatch) ForEachAlive

func (self *SpriteBatch) ForEachAlive(callback interface{}, callbackContext interface{})

ForEachAlive Call a function on each alive child in this group.

See {@link Phaser.Group#forEach forEach} for details.

func (*SpriteBatch) ForEachAlive1O

func (self *SpriteBatch) ForEachAlive1O(callback interface{}, callbackContext interface{}, args interface{})

ForEachAlive1O Call a function on each alive child in this group.

See {@link Phaser.Group#forEach forEach} for details.

func (*SpriteBatch) ForEachAliveI

func (self *SpriteBatch) ForEachAliveI(args ...interface{})

ForEachAliveI Call a function on each alive child in this group.

See {@link Phaser.Group#forEach forEach} for details.

func (*SpriteBatch) ForEachDead

func (self *SpriteBatch) ForEachDead(callback interface{}, callbackContext interface{})

ForEachDead Call a function on each dead child in this group.

See {@link Phaser.Group#forEach forEach} for details.

func (*SpriteBatch) ForEachDead1O

func (self *SpriteBatch) ForEachDead1O(callback interface{}, callbackContext interface{}, args interface{})

ForEachDead1O Call a function on each dead child in this group.

See {@link Phaser.Group#forEach forEach} for details.

func (*SpriteBatch) ForEachDeadI

func (self *SpriteBatch) ForEachDeadI(args ...interface{})

ForEachDeadI Call a function on each dead child in this group.

See {@link Phaser.Group#forEach forEach} for details.

func (*SpriteBatch) ForEachExists

func (self *SpriteBatch) ForEachExists(callback interface{}, callbackContext interface{})

ForEachExists Call a function on each existing child in this group.

See {@link Phaser.Group#forEach forEach} for details.

func (*SpriteBatch) ForEachExists1O

func (self *SpriteBatch) ForEachExists1O(callback interface{}, callbackContext interface{}, args interface{})

ForEachExists1O Call a function on each existing child in this group.

See {@link Phaser.Group#forEach forEach} for details.

func (*SpriteBatch) ForEachExistsI

func (self *SpriteBatch) ForEachExistsI(args ...interface{})

ForEachExistsI Call a function on each existing child in this group.

See {@link Phaser.Group#forEach forEach} for details.

func (*SpriteBatch) ForEachI

func (self *SpriteBatch) ForEachI(args ...interface{})

ForEachI Call a function on each child in this group.

Additional arguments for the callback can be specified after the `checkExists` parameter. For example,

Group.forEach(awardBonusGold, this, true, 100, 500)

would invoke `awardBonusGold` function with the parameters `(child, 100, 500)`.

Note: This check will skip any children which are Groups themselves.

func (*SpriteBatch) Game

func (self *SpriteBatch) Game() *Game

Game A reference to the currently running Game.

func (*SpriteBatch) GetAll

func (self *SpriteBatch) GetAll() interface{}

GetAll Returns all children in this Group.

You can optionally specify a matching criteria using the `property` and `value` arguments.

For example: `getAll('exists', true)` would return only children that have their exists property set.

Optionally you can specify a start and end index. For example if this Group had 100 children, and you set `startIndex` to 0 and `endIndex` to 50, it would return a random child from only the first 50 children in the Group.

func (*SpriteBatch) GetAll1O

func (self *SpriteBatch) GetAll1O(property string) interface{}

GetAll1O Returns all children in this Group.

You can optionally specify a matching criteria using the `property` and `value` arguments.

For example: `getAll('exists', true)` would return only children that have their exists property set.

Optionally you can specify a start and end index. For example if this Group had 100 children, and you set `startIndex` to 0 and `endIndex` to 50, it would return a random child from only the first 50 children in the Group.

func (*SpriteBatch) GetAll2O

func (self *SpriteBatch) GetAll2O(property string, value interface{}) interface{}

GetAll2O Returns all children in this Group.

You can optionally specify a matching criteria using the `property` and `value` arguments.

For example: `getAll('exists', true)` would return only children that have their exists property set.

Optionally you can specify a start and end index. For example if this Group had 100 children, and you set `startIndex` to 0 and `endIndex` to 50, it would return a random child from only the first 50 children in the Group.

func (*SpriteBatch) GetAll3O

func (self *SpriteBatch) GetAll3O(property string, value interface{}, startIndex int) interface{}

GetAll3O Returns all children in this Group.

You can optionally specify a matching criteria using the `property` and `value` arguments.

For example: `getAll('exists', true)` would return only children that have their exists property set.

Optionally you can specify a start and end index. For example if this Group had 100 children, and you set `startIndex` to 0 and `endIndex` to 50, it would return a random child from only the first 50 children in the Group.

func (*SpriteBatch) GetAll4O

func (self *SpriteBatch) GetAll4O(property string, value interface{}, startIndex int, endIndex int) interface{}

GetAll4O Returns all children in this Group.

You can optionally specify a matching criteria using the `property` and `value` arguments.

For example: `getAll('exists', true)` would return only children that have their exists property set.

Optionally you can specify a start and end index. For example if this Group had 100 children, and you set `startIndex` to 0 and `endIndex` to 50, it would return a random child from only the first 50 children in the Group.

func (*SpriteBatch) GetAllI

func (self *SpriteBatch) GetAllI(args ...interface{}) interface{}

GetAllI Returns all children in this Group.

You can optionally specify a matching criteria using the `property` and `value` arguments.

For example: `getAll('exists', true)` would return only children that have their exists property set.

Optionally you can specify a start and end index. For example if this Group had 100 children, and you set `startIndex` to 0 and `endIndex` to 50, it would return a random child from only the first 50 children in the Group.

func (*SpriteBatch) GetAt

func (self *SpriteBatch) GetAt(index int) interface{}

GetAt Returns the child found at the given index within this group.

func (*SpriteBatch) GetAtI

func (self *SpriteBatch) GetAtI(args ...interface{}) interface{}

GetAtI Returns the child found at the given index within this group.

func (*SpriteBatch) GetBottom

func (self *SpriteBatch) GetBottom() interface{}

GetBottom Returns the child at the bottom of this group.

The bottom child the child being displayed (rendered) below every other child.

func (*SpriteBatch) GetBottomI

func (self *SpriteBatch) GetBottomI(args ...interface{}) interface{}

GetBottomI Returns the child at the bottom of this group.

The bottom child the child being displayed (rendered) below every other child.

func (*SpriteBatch) GetBounds

func (self *SpriteBatch) GetBounds() *Rectangle

GetBounds Retrieves the global bounds of the displayObjectContainer as a rectangle. The bounds calculation takes all visible children into consideration.

func (*SpriteBatch) GetBounds1O

func (self *SpriteBatch) GetBounds1O(targetCoordinateSpace interface{}) *Rectangle

GetBounds1O Retrieves the global bounds of the displayObjectContainer as a rectangle. The bounds calculation takes all visible children into consideration.

func (*SpriteBatch) GetBoundsI

func (self *SpriteBatch) GetBoundsI(args ...interface{}) *Rectangle

GetBoundsI Retrieves the global bounds of the displayObjectContainer as a rectangle. The bounds calculation takes all visible children into consideration.

func (*SpriteBatch) GetByName

func (self *SpriteBatch) GetByName(name string) interface{}

GetByName Searches the Group for the first instance of a child with the `name` property matching the given argument. Should more than one child have the same name only the first instance is returned.

func (*SpriteBatch) GetByNameI

func (self *SpriteBatch) GetByNameI(args ...interface{}) interface{}

GetByNameI Searches the Group for the first instance of a child with the `name` property matching the given argument. Should more than one child have the same name only the first instance is returned.

func (*SpriteBatch) GetChildAt

func (self *SpriteBatch) GetChildAt(index int) *DisplayObject

GetChildAt Returns the child at the specified index

func (*SpriteBatch) GetChildAtI

func (self *SpriteBatch) GetChildAtI(args ...interface{}) *DisplayObject

GetChildAtI Returns the child at the specified index

func (*SpriteBatch) GetChildIndex

func (self *SpriteBatch) GetChildIndex(child *DisplayObject) int

GetChildIndex Returns the index position of a child DisplayObject instance

func (*SpriteBatch) GetChildIndexI

func (self *SpriteBatch) GetChildIndexI(args ...interface{}) int

GetChildIndexI Returns the index position of a child DisplayObject instance

func (*SpriteBatch) GetClosestTo

func (self *SpriteBatch) GetClosestTo(object interface{}) interface{}

GetClosestTo Get the closest child to given Object, with optional callback to filter children.

This can be a Sprite, Group, Image or any object with public x and y properties.

'close' is determined by the distance from the objects `x` and `y` properties compared to the childs `x` and `y` properties.

You can use the optional `callback` argument to apply your own filter to the distance checks. If the child is closer then the previous child, it will be sent to `callback` as the first argument, with the distance as the second. The callback should return `true` if it passes your filtering criteria, otherwise it should return `false`.

func (*SpriteBatch) GetClosestTo1O

func (self *SpriteBatch) GetClosestTo1O(object interface{}, callback interface{}) interface{}

GetClosestTo1O Get the closest child to given Object, with optional callback to filter children.

This can be a Sprite, Group, Image or any object with public x and y properties.

'close' is determined by the distance from the objects `x` and `y` properties compared to the childs `x` and `y` properties.

You can use the optional `callback` argument to apply your own filter to the distance checks. If the child is closer then the previous child, it will be sent to `callback` as the first argument, with the distance as the second. The callback should return `true` if it passes your filtering criteria, otherwise it should return `false`.

func (*SpriteBatch) GetClosestTo2O

func (self *SpriteBatch) GetClosestTo2O(object interface{}, callback interface{}, callbackContext interface{}) interface{}

GetClosestTo2O Get the closest child to given Object, with optional callback to filter children.

This can be a Sprite, Group, Image or any object with public x and y properties.

'close' is determined by the distance from the objects `x` and `y` properties compared to the childs `x` and `y` properties.

You can use the optional `callback` argument to apply your own filter to the distance checks. If the child is closer then the previous child, it will be sent to `callback` as the first argument, with the distance as the second. The callback should return `true` if it passes your filtering criteria, otherwise it should return `false`.

func (*SpriteBatch) GetClosestToI

func (self *SpriteBatch) GetClosestToI(args ...interface{}) interface{}

GetClosestToI Get the closest child to given Object, with optional callback to filter children.

This can be a Sprite, Group, Image or any object with public x and y properties.

'close' is determined by the distance from the objects `x` and `y` properties compared to the childs `x` and `y` properties.

You can use the optional `callback` argument to apply your own filter to the distance checks. If the child is closer then the previous child, it will be sent to `callback` as the first argument, with the distance as the second. The callback should return `true` if it passes your filtering criteria, otherwise it should return `false`.

func (*SpriteBatch) GetFirstAlive

func (self *SpriteBatch) GetFirstAlive() *DisplayObject

GetFirstAlive Get the first child that is alive (`child.alive === true`).

This is handy for choosing a squad leader, etc.

You can use the optional argument `createIfNull` to create a new Game Object if no alive ones were found in this Group.

It works by calling `Group.create` passing it the parameters given to this method, and returning the new child.

If a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child will be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.

func (*SpriteBatch) GetFirstAlive1O

func (self *SpriteBatch) GetFirstAlive1O(createIfNull bool) *DisplayObject

GetFirstAlive1O Get the first child that is alive (`child.alive === true`).

This is handy for choosing a squad leader, etc.

You can use the optional argument `createIfNull` to create a new Game Object if no alive ones were found in this Group.

It works by calling `Group.create` passing it the parameters given to this method, and returning the new child.

If a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child will be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.

func (*SpriteBatch) GetFirstAlive2O

func (self *SpriteBatch) GetFirstAlive2O(createIfNull bool, x int) *DisplayObject

GetFirstAlive2O Get the first child that is alive (`child.alive === true`).

This is handy for choosing a squad leader, etc.

You can use the optional argument `createIfNull` to create a new Game Object if no alive ones were found in this Group.

It works by calling `Group.create` passing it the parameters given to this method, and returning the new child.

If a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child will be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.

func (*SpriteBatch) GetFirstAlive3O

func (self *SpriteBatch) GetFirstAlive3O(createIfNull bool, x int, y int) *DisplayObject

GetFirstAlive3O Get the first child that is alive (`child.alive === true`).

This is handy for choosing a squad leader, etc.

You can use the optional argument `createIfNull` to create a new Game Object if no alive ones were found in this Group.

It works by calling `Group.create` passing it the parameters given to this method, and returning the new child.

If a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child will be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.

func (*SpriteBatch) GetFirstAlive4O

func (self *SpriteBatch) GetFirstAlive4O(createIfNull bool, x int, y int, key interface{}) *DisplayObject

GetFirstAlive4O Get the first child that is alive (`child.alive === true`).

This is handy for choosing a squad leader, etc.

You can use the optional argument `createIfNull` to create a new Game Object if no alive ones were found in this Group.

It works by calling `Group.create` passing it the parameters given to this method, and returning the new child.

If a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child will be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.

func (*SpriteBatch) GetFirstAlive5O

func (self *SpriteBatch) GetFirstAlive5O(createIfNull bool, x int, y int, key interface{}, frame interface{}) *DisplayObject

GetFirstAlive5O Get the first child that is alive (`child.alive === true`).

This is handy for choosing a squad leader, etc.

You can use the optional argument `createIfNull` to create a new Game Object if no alive ones were found in this Group.

It works by calling `Group.create` passing it the parameters given to this method, and returning the new child.

If a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child will be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.

func (*SpriteBatch) GetFirstAliveI

func (self *SpriteBatch) GetFirstAliveI(args ...interface{}) *DisplayObject

GetFirstAliveI Get the first child that is alive (`child.alive === true`).

This is handy for choosing a squad leader, etc.

You can use the optional argument `createIfNull` to create a new Game Object if no alive ones were found in this Group.

It works by calling `Group.create` passing it the parameters given to this method, and returning the new child.

If a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child will be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.

func (*SpriteBatch) GetFirstDead

func (self *SpriteBatch) GetFirstDead() *DisplayObject

GetFirstDead Get the first child that is dead (`child.alive === false`).

This is handy for checking if everything has been wiped out and adding to the pool as needed.

You can use the optional argument `createIfNull` to create a new Game Object if no dead ones were found in this Group.

It works by calling `Group.create` passing it the parameters given to this method, and returning the new child.

If a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child will be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.

func (*SpriteBatch) GetFirstDead1O

func (self *SpriteBatch) GetFirstDead1O(createIfNull bool) *DisplayObject

GetFirstDead1O Get the first child that is dead (`child.alive === false`).

This is handy for checking if everything has been wiped out and adding to the pool as needed.

You can use the optional argument `createIfNull` to create a new Game Object if no dead ones were found in this Group.

It works by calling `Group.create` passing it the parameters given to this method, and returning the new child.

If a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child will be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.

func (*SpriteBatch) GetFirstDead2O

func (self *SpriteBatch) GetFirstDead2O(createIfNull bool, x int) *DisplayObject

GetFirstDead2O Get the first child that is dead (`child.alive === false`).

This is handy for checking if everything has been wiped out and adding to the pool as needed.

You can use the optional argument `createIfNull` to create a new Game Object if no dead ones were found in this Group.

It works by calling `Group.create` passing it the parameters given to this method, and returning the new child.

If a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child will be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.

func (*SpriteBatch) GetFirstDead3O

func (self *SpriteBatch) GetFirstDead3O(createIfNull bool, x int, y int) *DisplayObject

GetFirstDead3O Get the first child that is dead (`child.alive === false`).

This is handy for checking if everything has been wiped out and adding to the pool as needed.

You can use the optional argument `createIfNull` to create a new Game Object if no dead ones were found in this Group.

It works by calling `Group.create` passing it the parameters given to this method, and returning the new child.

If a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child will be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.

func (*SpriteBatch) GetFirstDead4O

func (self *SpriteBatch) GetFirstDead4O(createIfNull bool, x int, y int, key interface{}) *DisplayObject

GetFirstDead4O Get the first child that is dead (`child.alive === false`).

This is handy for checking if everything has been wiped out and adding to the pool as needed.

You can use the optional argument `createIfNull` to create a new Game Object if no dead ones were found in this Group.

It works by calling `Group.create` passing it the parameters given to this method, and returning the new child.

If a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child will be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.

func (*SpriteBatch) GetFirstDead5O

func (self *SpriteBatch) GetFirstDead5O(createIfNull bool, x int, y int, key interface{}, frame interface{}) *DisplayObject

GetFirstDead5O Get the first child that is dead (`child.alive === false`).

This is handy for checking if everything has been wiped out and adding to the pool as needed.

You can use the optional argument `createIfNull` to create a new Game Object if no dead ones were found in this Group.

It works by calling `Group.create` passing it the parameters given to this method, and returning the new child.

If a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child will be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.

func (*SpriteBatch) GetFirstDeadI

func (self *SpriteBatch) GetFirstDeadI(args ...interface{}) *DisplayObject

GetFirstDeadI Get the first child that is dead (`child.alive === false`).

This is handy for checking if everything has been wiped out and adding to the pool as needed.

You can use the optional argument `createIfNull` to create a new Game Object if no dead ones were found in this Group.

It works by calling `Group.create` passing it the parameters given to this method, and returning the new child.

If a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child will be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.

func (*SpriteBatch) GetFirstExists

func (self *SpriteBatch) GetFirstExists() *DisplayObject

GetFirstExists Get the first display object that exists, or doesn't exist.

You can use the optional argument `createIfNull` to create a new Game Object if none matching your exists argument were found in this Group.

It works by calling `Group.create` passing it the parameters given to this method, and returning the new child.

If a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child will be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.

func (*SpriteBatch) GetFirstExists1O

func (self *SpriteBatch) GetFirstExists1O(exists bool) *DisplayObject

GetFirstExists1O Get the first display object that exists, or doesn't exist.

You can use the optional argument `createIfNull` to create a new Game Object if none matching your exists argument were found in this Group.

It works by calling `Group.create` passing it the parameters given to this method, and returning the new child.

If a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child will be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.

func (*SpriteBatch) GetFirstExists2O

func (self *SpriteBatch) GetFirstExists2O(exists bool, createIfNull bool) *DisplayObject

GetFirstExists2O Get the first display object that exists, or doesn't exist.

You can use the optional argument `createIfNull` to create a new Game Object if none matching your exists argument were found in this Group.

It works by calling `Group.create` passing it the parameters given to this method, and returning the new child.

If a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child will be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.

func (*SpriteBatch) GetFirstExists3O

func (self *SpriteBatch) GetFirstExists3O(exists bool, createIfNull bool, x int) *DisplayObject

GetFirstExists3O Get the first display object that exists, or doesn't exist.

You can use the optional argument `createIfNull` to create a new Game Object if none matching your exists argument were found in this Group.

It works by calling `Group.create` passing it the parameters given to this method, and returning the new child.

If a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child will be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.

func (*SpriteBatch) GetFirstExists4O

func (self *SpriteBatch) GetFirstExists4O(exists bool, createIfNull bool, x int, y int) *DisplayObject

GetFirstExists4O Get the first display object that exists, or doesn't exist.

You can use the optional argument `createIfNull` to create a new Game Object if none matching your exists argument were found in this Group.

It works by calling `Group.create` passing it the parameters given to this method, and returning the new child.

If a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child will be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.

func (*SpriteBatch) GetFirstExists5O

func (self *SpriteBatch) GetFirstExists5O(exists bool, createIfNull bool, x int, y int, key interface{}) *DisplayObject

GetFirstExists5O Get the first display object that exists, or doesn't exist.

You can use the optional argument `createIfNull` to create a new Game Object if none matching your exists argument were found in this Group.

It works by calling `Group.create` passing it the parameters given to this method, and returning the new child.

If a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child will be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.

func (*SpriteBatch) GetFirstExists6O

func (self *SpriteBatch) GetFirstExists6O(exists bool, createIfNull bool, x int, y int, key interface{}, frame interface{}) *DisplayObject

GetFirstExists6O Get the first display object that exists, or doesn't exist.

You can use the optional argument `createIfNull` to create a new Game Object if none matching your exists argument were found in this Group.

It works by calling `Group.create` passing it the parameters given to this method, and returning the new child.

If a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child will be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.

func (*SpriteBatch) GetFirstExistsI

func (self *SpriteBatch) GetFirstExistsI(args ...interface{}) *DisplayObject

GetFirstExistsI Get the first display object that exists, or doesn't exist.

You can use the optional argument `createIfNull` to create a new Game Object if none matching your exists argument were found in this Group.

It works by calling `Group.create` passing it the parameters given to this method, and returning the new child.

If a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child will be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.

func (*SpriteBatch) GetFurthestFrom

func (self *SpriteBatch) GetFurthestFrom(object interface{}) interface{}

GetFurthestFrom Get the child furthest away from the given Object, with optional callback to filter children.

This can be a Sprite, Group, Image or any object with public x and y properties.

'furthest away' is determined by the distance from the objects `x` and `y` properties compared to the childs `x` and `y` properties.

You can use the optional `callback` argument to apply your own filter to the distance checks. If the child is closer then the previous child, it will be sent to `callback` as the first argument, with the distance as the second. The callback should return `true` if it passes your filtering criteria, otherwise it should return `false`.

func (*SpriteBatch) GetFurthestFrom1O

func (self *SpriteBatch) GetFurthestFrom1O(object interface{}, callback interface{}) interface{}

GetFurthestFrom1O Get the child furthest away from the given Object, with optional callback to filter children.

This can be a Sprite, Group, Image or any object with public x and y properties.

'furthest away' is determined by the distance from the objects `x` and `y` properties compared to the childs `x` and `y` properties.

You can use the optional `callback` argument to apply your own filter to the distance checks. If the child is closer then the previous child, it will be sent to `callback` as the first argument, with the distance as the second. The callback should return `true` if it passes your filtering criteria, otherwise it should return `false`.

func (*SpriteBatch) GetFurthestFrom2O

func (self *SpriteBatch) GetFurthestFrom2O(object interface{}, callback interface{}, callbackContext interface{}) interface{}

GetFurthestFrom2O Get the child furthest away from the given Object, with optional callback to filter children.

This can be a Sprite, Group, Image or any object with public x and y properties.

'furthest away' is determined by the distance from the objects `x` and `y` properties compared to the childs `x` and `y` properties.

You can use the optional `callback` argument to apply your own filter to the distance checks. If the child is closer then the previous child, it will be sent to `callback` as the first argument, with the distance as the second. The callback should return `true` if it passes your filtering criteria, otherwise it should return `false`.

func (*SpriteBatch) GetFurthestFromI

func (self *SpriteBatch) GetFurthestFromI(args ...interface{}) interface{}

GetFurthestFromI Get the child furthest away from the given Object, with optional callback to filter children.

This can be a Sprite, Group, Image or any object with public x and y properties.

'furthest away' is determined by the distance from the objects `x` and `y` properties compared to the childs `x` and `y` properties.

You can use the optional `callback` argument to apply your own filter to the distance checks. If the child is closer then the previous child, it will be sent to `callback` as the first argument, with the distance as the second. The callback should return `true` if it passes your filtering criteria, otherwise it should return `false`.

func (*SpriteBatch) GetIndex

func (self *SpriteBatch) GetIndex(child interface{}) int

GetIndex Get the index position of the given child in this group, which should match the child's `z` property.

func (*SpriteBatch) GetIndexI

func (self *SpriteBatch) GetIndexI(args ...interface{}) int

GetIndexI Get the index position of the given child in this group, which should match the child's `z` property.

func (*SpriteBatch) GetLocalBounds

func (self *SpriteBatch) GetLocalBounds() *Rectangle

GetLocalBounds Retrieves the non-global local bounds of the displayObjectContainer as a rectangle without any transformations. The calculation takes all visible children into consideration.

func (*SpriteBatch) GetLocalBoundsI

func (self *SpriteBatch) GetLocalBoundsI(args ...interface{}) *Rectangle

GetLocalBoundsI Retrieves the non-global local bounds of the displayObjectContainer as a rectangle without any transformations. The calculation takes all visible children into consideration.

func (*SpriteBatch) GetRandom

func (self *SpriteBatch) GetRandom() interface{}

GetRandom Returns a random child from the group.

func (*SpriteBatch) GetRandom1O

func (self *SpriteBatch) GetRandom1O(startIndex int) interface{}

GetRandom1O Returns a random child from the group.

func (*SpriteBatch) GetRandom2O

func (self *SpriteBatch) GetRandom2O(startIndex int, length int) interface{}

GetRandom2O Returns a random child from the group.

func (*SpriteBatch) GetRandomExists

func (self *SpriteBatch) GetRandomExists() interface{}

GetRandomExists Returns a random child from the Group that has `exists` set to `true`.

Optionally you can specify a start and end index. For example if this Group had 100 children, and you set `startIndex` to 0 and `endIndex` to 50, it would return a random child from only the first 50 children in the Group.

func (*SpriteBatch) GetRandomExists1O

func (self *SpriteBatch) GetRandomExists1O(startIndex int) interface{}

GetRandomExists1O Returns a random child from the Group that has `exists` set to `true`.

Optionally you can specify a start and end index. For example if this Group had 100 children, and you set `startIndex` to 0 and `endIndex` to 50, it would return a random child from only the first 50 children in the Group.

func (*SpriteBatch) GetRandomExists2O

func (self *SpriteBatch) GetRandomExists2O(startIndex int, endIndex int) interface{}

GetRandomExists2O Returns a random child from the Group that has `exists` set to `true`.

Optionally you can specify a start and end index. For example if this Group had 100 children, and you set `startIndex` to 0 and `endIndex` to 50, it would return a random child from only the first 50 children in the Group.

func (*SpriteBatch) GetRandomExistsI

func (self *SpriteBatch) GetRandomExistsI(args ...interface{}) interface{}

GetRandomExistsI Returns a random child from the Group that has `exists` set to `true`.

Optionally you can specify a start and end index. For example if this Group had 100 children, and you set `startIndex` to 0 and `endIndex` to 50, it would return a random child from only the first 50 children in the Group.

func (*SpriteBatch) GetRandomI

func (self *SpriteBatch) GetRandomI(args ...interface{}) interface{}

GetRandomI Returns a random child from the group.

func (*SpriteBatch) GetTop

func (self *SpriteBatch) GetTop() interface{}

GetTop Return the child at the top of this group.

The top child is the child displayed (rendered) above every other child.

func (*SpriteBatch) GetTopI

func (self *SpriteBatch) GetTopI(args ...interface{}) interface{}

GetTopI Return the child at the top of this group.

The top child is the child displayed (rendered) above every other child.

func (*SpriteBatch) HasProperty

func (self *SpriteBatch) HasProperty(child interface{}, key []string) bool

HasProperty Checks if the child has the given property.

Will scan up to 4 levels deep only.

func (*SpriteBatch) HasPropertyI

func (self *SpriteBatch) HasPropertyI(args ...interface{}) bool

HasPropertyI Checks if the child has the given property.

Will scan up to 4 levels deep only.

func (*SpriteBatch) Hash

func (self *SpriteBatch) Hash() []interface{}

Hash The hash array is an array belonging to this Group into which you can add any of its children via Group.addToHash and Group.removeFromHash.

Only children of this Group can be added to and removed from the hash.

This hash is used automatically by Phaser Arcade Physics in order to perform non z-index based destructive sorting. However if you don't use Arcade Physics, or this isn't a physics enabled Group, then you can use the hash to perform your own sorting and filtering of Group children without touching their z-index (and therefore display draw order)

func (*SpriteBatch) Height

func (self *SpriteBatch) Height() int

Height The height of the displayObjectContainer, setting this will actually modify the scale to achieve the value set

func (*SpriteBatch) IgnoreChildInput

func (self *SpriteBatch) IgnoreChildInput() bool

IgnoreChildInput If `ignoreChildInput` is `false` it will allow this objects _children_ to be considered as valid for Input events.

If this property is `true` then the children will _not_ be considered as valid for Input events.

Note that this property isn't recursive: only immediate children are influenced, it doesn't scan further down.

func (*SpriteBatch) IgnoreDestroy

func (self *SpriteBatch) IgnoreDestroy() bool

IgnoreDestroy A group with `ignoreDestroy` set to `true` ignores all calls to its `destroy` method.

func (*SpriteBatch) InputEnableChildren

func (self *SpriteBatch) InputEnableChildren() bool

InputEnableChildren A Group with `inputEnableChildren` set to `true` will automatically call `inputEnabled = true` on any children _added_ to, or _created by_, this Group.

If there are children already in the Group at the time you set this property, they are not changed.

func (*SpriteBatch) Iterate

func (self *SpriteBatch) Iterate(key string, value interface{}, returnType int) interface{}

Iterate Iterates over the children of the group performing one of several actions for matched children.

A child is considered a match when it has a property, named `key`, whose value is equal to `value` according to a strict equality comparison.

The result depends on the `returnType`:

  • {@link Phaser.Group.RETURN_TOTAL RETURN_TOTAL}: The callback, if any, is applied to all matching children. The number of matched children is returned.
  • {@link Phaser.Group.RETURN_NONE RETURN_NONE}: The callback, if any, is applied to all matching children. No value is returned.
  • {@link Phaser.Group.RETURN_CHILD RETURN_CHILD}: The callback, if any, is applied to the *first* matching child and the *first* matched child is returned. If there is no matching child then null is returned.

If `args` is specified it must be an array. The matched child will be assigned to the first element and the entire array will be applied to the callback function.

func (*SpriteBatch) Iterate1O

func (self *SpriteBatch) Iterate1O(key string, value interface{}, returnType int, callback interface{}) interface{}

Iterate1O Iterates over the children of the group performing one of several actions for matched children.

A child is considered a match when it has a property, named `key`, whose value is equal to `value` according to a strict equality comparison.

The result depends on the `returnType`:

  • {@link Phaser.Group.RETURN_TOTAL RETURN_TOTAL}: The callback, if any, is applied to all matching children. The number of matched children is returned.
  • {@link Phaser.Group.RETURN_NONE RETURN_NONE}: The callback, if any, is applied to all matching children. No value is returned.
  • {@link Phaser.Group.RETURN_CHILD RETURN_CHILD}: The callback, if any, is applied to the *first* matching child and the *first* matched child is returned. If there is no matching child then null is returned.

If `args` is specified it must be an array. The matched child will be assigned to the first element and the entire array will be applied to the callback function.

func (*SpriteBatch) Iterate2O

func (self *SpriteBatch) Iterate2O(key string, value interface{}, returnType int, callback interface{}, callbackContext interface{}) interface{}

Iterate2O Iterates over the children of the group performing one of several actions for matched children.

A child is considered a match when it has a property, named `key`, whose value is equal to `value` according to a strict equality comparison.

The result depends on the `returnType`:

  • {@link Phaser.Group.RETURN_TOTAL RETURN_TOTAL}: The callback, if any, is applied to all matching children. The number of matched children is returned.
  • {@link Phaser.Group.RETURN_NONE RETURN_NONE}: The callback, if any, is applied to all matching children. No value is returned.
  • {@link Phaser.Group.RETURN_CHILD RETURN_CHILD}: The callback, if any, is applied to the *first* matching child and the *first* matched child is returned. If there is no matching child then null is returned.

If `args` is specified it must be an array. The matched child will be assigned to the first element and the entire array will be applied to the callback function.

func (*SpriteBatch) Iterate3O

func (self *SpriteBatch) Iterate3O(key string, value interface{}, returnType int, callback interface{}, callbackContext interface{}, args []interface{}) interface{}

Iterate3O Iterates over the children of the group performing one of several actions for matched children.

A child is considered a match when it has a property, named `key`, whose value is equal to `value` according to a strict equality comparison.

The result depends on the `returnType`:

  • {@link Phaser.Group.RETURN_TOTAL RETURN_TOTAL}: The callback, if any, is applied to all matching children. The number of matched children is returned.
  • {@link Phaser.Group.RETURN_NONE RETURN_NONE}: The callback, if any, is applied to all matching children. No value is returned.
  • {@link Phaser.Group.RETURN_CHILD RETURN_CHILD}: The callback, if any, is applied to the *first* matching child and the *first* matched child is returned. If there is no matching child then null is returned.

If `args` is specified it must be an array. The matched child will be assigned to the first element and the entire array will be applied to the callback function.

func (*SpriteBatch) IterateI

func (self *SpriteBatch) IterateI(args ...interface{}) interface{}

IterateI Iterates over the children of the group performing one of several actions for matched children.

A child is considered a match when it has a property, named `key`, whose value is equal to `value` according to a strict equality comparison.

The result depends on the `returnType`:

  • {@link Phaser.Group.RETURN_TOTAL RETURN_TOTAL}: The callback, if any, is applied to all matching children. The number of matched children is returned.
  • {@link Phaser.Group.RETURN_NONE RETURN_NONE}: The callback, if any, is applied to all matching children. No value is returned.
  • {@link Phaser.Group.RETURN_CHILD RETURN_CHILD}: The callback, if any, is applied to the *first* matching child and the *first* matched child is returned. If there is no matching child then null is returned.

If `args` is specified it must be an array. The matched child will be assigned to the first element and the entire array will be applied to the callback function.

func (*SpriteBatch) Left

func (self *SpriteBatch) Left() int

Left The left coordinate of this Group.

It is derived by calling `getBounds`, calculating the Groups dimensions based on its visible children.

func (*SpriteBatch) Length

func (self *SpriteBatch) Length() int

Length Total number of children in this group, regardless of exists/alive status.

func (*SpriteBatch) MoveAll

func (self *SpriteBatch) MoveAll(group *Group) *Group

MoveAll Moves all children from this Group to the Group given.

func (*SpriteBatch) MoveAll1O

func (self *SpriteBatch) MoveAll1O(group *Group, silent bool) *Group

MoveAll1O Moves all children from this Group to the Group given.

func (*SpriteBatch) MoveAllI

func (self *SpriteBatch) MoveAllI(args ...interface{}) *Group

MoveAllI Moves all children from this Group to the Group given.

func (*SpriteBatch) MoveDown

func (self *SpriteBatch) MoveDown(child interface{}) interface{}

MoveDown Moves the given child down one place in this group unless it's already at the bottom.

func (*SpriteBatch) MoveDownI

func (self *SpriteBatch) MoveDownI(args ...interface{}) interface{}

MoveDownI Moves the given child down one place in this group unless it's already at the bottom.

func (*SpriteBatch) MoveUp

func (self *SpriteBatch) MoveUp(child interface{}) interface{}

MoveUp Moves the given child up one place in this group unless it's already at the top.

func (*SpriteBatch) MoveUpI

func (self *SpriteBatch) MoveUpI(args ...interface{}) interface{}

MoveUpI Moves the given child up one place in this group unless it's already at the top.

func (*SpriteBatch) MultiplyAll

func (self *SpriteBatch) MultiplyAll(property string, amount int, checkAlive bool, checkVisible bool)

MultiplyAll Multiplies the given property by the amount on all children in this group.

`Group.multiplyAll('x', 2)` will x2 the child.x value for each child.

func (*SpriteBatch) MultiplyAllI

func (self *SpriteBatch) MultiplyAllI(args ...interface{})

MultiplyAllI Multiplies the given property by the amount on all children in this group.

`Group.multiplyAll('x', 2)` will x2 the child.x value for each child.

func (*SpriteBatch) Name

func (self *SpriteBatch) Name() string

Name A name for this group. Not used internally but useful for debugging.

func (*SpriteBatch) Next

func (self *SpriteBatch) Next() interface{}

Next Advances the group cursor to the next (higher) object in the group.

If the cursor is at the end of the group (top child) it is moved the start of the group (bottom child).

func (*SpriteBatch) NextI

func (self *SpriteBatch) NextI(args ...interface{}) interface{}

NextI Advances the group cursor to the next (higher) object in the group.

If the cursor is at the end of the group (top child) it is moved the start of the group (bottom child).

func (*SpriteBatch) OnChildInputDown

func (self *SpriteBatch) OnChildInputDown() *Signal

OnChildInputDown This Signal is dispatched whenever a child of this Group emits an onInputDown signal as a result of having been interacted with by a Pointer. You can bind functions to this Signal instead of to every child Sprite.

This Signal is sent 2 arguments: A reference to the Sprite that triggered the signal, and a reference to the Pointer that caused it.

func (*SpriteBatch) OnChildInputOut

func (self *SpriteBatch) OnChildInputOut() *Signal

OnChildInputOut This Signal is dispatched whenever a child of this Group emits an onInputOut signal as a result of having been interacted with by a Pointer. You can bind functions to this Signal instead of to every child Sprite.

This Signal is sent 2 arguments: A reference to the Sprite that triggered the signal, and a reference to the Pointer that caused it.

func (*SpriteBatch) OnChildInputOver

func (self *SpriteBatch) OnChildInputOver() *Signal

OnChildInputOver This Signal is dispatched whenever a child of this Group emits an onInputOver signal as a result of having been interacted with by a Pointer. You can bind functions to this Signal instead of to every child Sprite.

This Signal is sent 2 arguments: A reference to the Sprite that triggered the signal, and a reference to the Pointer that caused it.

func (*SpriteBatch) OnChildInputUp

func (self *SpriteBatch) OnChildInputUp() *Signal

OnChildInputUp This Signal is dispatched whenever a child of this Group emits an onInputUp signal as a result of having been interacted with by a Pointer. You can bind functions to this Signal instead of to every child Sprite.

This Signal is sent 3 arguments: A reference to the Sprite that triggered the signal, a reference to the Pointer that caused it, and a boolean value `isOver` that tells you if the Pointer is still over the Sprite or not.

func (*SpriteBatch) OnDestroy

func (self *SpriteBatch) OnDestroy() *Signal

OnDestroy This signal is dispatched when the group is destroyed.

func (*SpriteBatch) PendingDestroy

func (self *SpriteBatch) PendingDestroy() bool

PendingDestroy A Group is that has `pendingDestroy` set to `true` is flagged to have its destroy method called on the next logic update. You can set it directly to flag the Group to be destroyed on its next update.

This is extremely useful if you wish to destroy a Group from within one of its own callbacks or a callback of one of its children.

func (*SpriteBatch) PhysicsBodyType

func (self *SpriteBatch) PhysicsBodyType() int

PhysicsBodyType If {@link Phaser.Group#enableBody enableBody} is true this is the type of physics body that is created on new Sprites.

The valid values are {@link Phaser.Physics.ARCADE}, {@link Phaser.Physics.P2JS}, {@link Phaser.Physics.NINJA}, etc.

func (*SpriteBatch) PhysicsSortDirection

func (self *SpriteBatch) PhysicsSortDirection() int

PhysicsSortDirection If this Group contains Arcade Physics Sprites you can set a custom sort direction via this property.

It should be set to one of the Phaser.Physics.Arcade sort direction constants:

Phaser.Physics.Arcade.SORT_NONE Phaser.Physics.Arcade.LEFT_RIGHT Phaser.Physics.Arcade.RIGHT_LEFT Phaser.Physics.Arcade.TOP_BOTTOM Phaser.Physics.Arcade.BOTTOM_TOP

If set to `null` the Group will use whatever Phaser.Physics.Arcade.sortDirection is set to. This is the default behavior.

func (*SpriteBatch) PhysicsType

func (self *SpriteBatch) PhysicsType() int

PhysicsType The const physics body type of this object.

func (*SpriteBatch) PostUpdate

func (self *SpriteBatch) PostUpdate()

PostUpdate The core postUpdate - as called by World.

func (*SpriteBatch) PostUpdateI

func (self *SpriteBatch) PostUpdateI(args ...interface{})

PostUpdateI The core postUpdate - as called by World.

func (*SpriteBatch) PreUpdate

func (self *SpriteBatch) PreUpdate()

PreUpdate The core preUpdate - as called by World.

func (*SpriteBatch) PreUpdateI

func (self *SpriteBatch) PreUpdateI(args ...interface{})

PreUpdateI The core preUpdate - as called by World.

func (*SpriteBatch) Previous

func (self *SpriteBatch) Previous() interface{}

Previous Moves the group cursor to the previous (lower) child in the group.

If the cursor is at the start of the group (bottom child) it is moved to the end (top child).

func (*SpriteBatch) PreviousI

func (self *SpriteBatch) PreviousI(args ...interface{}) interface{}

PreviousI Moves the group cursor to the previous (lower) child in the group.

If the cursor is at the start of the group (bottom child) it is moved to the end (top child).

func (*SpriteBatch) Remove

func (self *SpriteBatch) Remove(child interface{}) bool

Remove Removes the given child from this group.

This will dispatch an `onRemovedFromGroup` event from the child (if it has one), and optionally destroy the child.

If the group cursor was referring to the removed child it is updated to refer to the next child.

func (*SpriteBatch) Remove1O

func (self *SpriteBatch) Remove1O(child interface{}, destroy bool) bool

Remove1O Removes the given child from this group.

This will dispatch an `onRemovedFromGroup` event from the child (if it has one), and optionally destroy the child.

If the group cursor was referring to the removed child it is updated to refer to the next child.

func (*SpriteBatch) Remove2O

func (self *SpriteBatch) Remove2O(child interface{}, destroy bool, silent bool) bool

Remove2O Removes the given child from this group.

This will dispatch an `onRemovedFromGroup` event from the child (if it has one), and optionally destroy the child.

If the group cursor was referring to the removed child it is updated to refer to the next child.

func (*SpriteBatch) RemoveAll

func (self *SpriteBatch) RemoveAll()

RemoveAll Removes all children from this Group, but does not remove the group from its parent.

The children can be optionally destroyed as they are removed.

You can also optionally also destroy the BaseTexture the Child is using. Be careful if you've more than one Game Object sharing the same BaseTexture.

func (*SpriteBatch) RemoveAll1O

func (self *SpriteBatch) RemoveAll1O(destroy bool)

RemoveAll1O Removes all children from this Group, but does not remove the group from its parent.

The children can be optionally destroyed as they are removed.

You can also optionally also destroy the BaseTexture the Child is using. Be careful if you've more than one Game Object sharing the same BaseTexture.

func (*SpriteBatch) RemoveAll2O

func (self *SpriteBatch) RemoveAll2O(destroy bool, silent bool)

RemoveAll2O Removes all children from this Group, but does not remove the group from its parent.

The children can be optionally destroyed as they are removed.

You can also optionally also destroy the BaseTexture the Child is using. Be careful if you've more than one Game Object sharing the same BaseTexture.

func (*SpriteBatch) RemoveAll3O

func (self *SpriteBatch) RemoveAll3O(destroy bool, silent bool, destroyTexture bool)

RemoveAll3O Removes all children from this Group, but does not remove the group from its parent.

The children can be optionally destroyed as they are removed.

You can also optionally also destroy the BaseTexture the Child is using. Be careful if you've more than one Game Object sharing the same BaseTexture.

func (*SpriteBatch) RemoveAllI

func (self *SpriteBatch) RemoveAllI(args ...interface{})

RemoveAllI Removes all children from this Group, but does not remove the group from its parent.

The children can be optionally destroyed as they are removed.

You can also optionally also destroy the BaseTexture the Child is using. Be careful if you've more than one Game Object sharing the same BaseTexture.

func (*SpriteBatch) RemoveBetween

func (self *SpriteBatch) RemoveBetween(startIndex int)

RemoveBetween Removes all children from this group whose index falls beteen the given startIndex and endIndex values.

func (*SpriteBatch) RemoveBetween1O

func (self *SpriteBatch) RemoveBetween1O(startIndex int, endIndex int)

RemoveBetween1O Removes all children from this group whose index falls beteen the given startIndex and endIndex values.

func (*SpriteBatch) RemoveBetween2O

func (self *SpriteBatch) RemoveBetween2O(startIndex int, endIndex int, destroy bool)

RemoveBetween2O Removes all children from this group whose index falls beteen the given startIndex and endIndex values.

func (*SpriteBatch) RemoveBetween3O

func (self *SpriteBatch) RemoveBetween3O(startIndex int, endIndex int, destroy bool, silent bool)

RemoveBetween3O Removes all children from this group whose index falls beteen the given startIndex and endIndex values.

func (*SpriteBatch) RemoveBetweenI

func (self *SpriteBatch) RemoveBetweenI(args ...interface{})

RemoveBetweenI Removes all children from this group whose index falls beteen the given startIndex and endIndex values.

func (*SpriteBatch) RemoveChild

func (self *SpriteBatch) RemoveChild(child *DisplayObject) *DisplayObject

RemoveChild Removes a child from the container.

func (*SpriteBatch) RemoveChildAt

func (self *SpriteBatch) RemoveChildAt(index int) *DisplayObject

RemoveChildAt Removes a child from the specified index position.

func (*SpriteBatch) RemoveChildAtI

func (self *SpriteBatch) RemoveChildAtI(args ...interface{}) *DisplayObject

RemoveChildAtI Removes a child from the specified index position.

func (*SpriteBatch) RemoveChildI

func (self *SpriteBatch) RemoveChildI(args ...interface{}) *DisplayObject

RemoveChildI Removes a child from the container.

func (*SpriteBatch) RemoveChildren

func (self *SpriteBatch) RemoveChildren(beginIndex int, endIndex int)

RemoveChildren Removes all children from this container that are within the begin and end indexes.

func (*SpriteBatch) RemoveChildrenI

func (self *SpriteBatch) RemoveChildrenI(args ...interface{})

RemoveChildrenI Removes all children from this container that are within the begin and end indexes.

func (*SpriteBatch) RemoveFromHash

func (self *SpriteBatch) RemoveFromHash(child *DisplayObject) bool

RemoveFromHash Removes a child of this Group from the hash array. This call will return false if the child is not in the hash.

func (*SpriteBatch) RemoveFromHashI

func (self *SpriteBatch) RemoveFromHashI(args ...interface{}) bool

RemoveFromHashI Removes a child of this Group from the hash array. This call will return false if the child is not in the hash.

func (*SpriteBatch) RemoveI

func (self *SpriteBatch) RemoveI(args ...interface{}) bool

RemoveI Removes the given child from this group.

This will dispatch an `onRemovedFromGroup` event from the child (if it has one), and optionally destroy the child.

If the group cursor was referring to the removed child it is updated to refer to the next child.

func (*SpriteBatch) Replace

func (self *SpriteBatch) Replace(oldChild interface{}, newChild interface{}) interface{}

Replace Replaces a child of this Group with the given newChild. The newChild cannot be a member of this Group.

If `Group.enableBody` is set, then a physics body will be created on the object, so long as one does not already exist.

If `Group.inputEnableChildren` is set, then an Input Handler will be created on the object, so long as one does not already exist.

func (*SpriteBatch) ReplaceI

func (self *SpriteBatch) ReplaceI(args ...interface{}) interface{}

ReplaceI Replaces a child of this Group with the given newChild. The newChild cannot be a member of this Group.

If `Group.enableBody` is set, then a physics body will be created on the object, so long as one does not already exist.

If `Group.inputEnableChildren` is set, then an Input Handler will be created on the object, so long as one does not already exist.

func (*SpriteBatch) ResetChild

func (self *SpriteBatch) ResetChild(child *DisplayObject) *DisplayObject

ResetChild Takes a child and if the `x` and `y` arguments are given it calls `child.reset(x, y)` on it.

If the `key` and optionally the `frame` arguments are given, it calls `child.loadTexture(key, frame)` on it.

The two operations are separate. For example if you just wish to load a new texture then pass `null` as the x and y values.

func (*SpriteBatch) ResetChild1O

func (self *SpriteBatch) ResetChild1O(child *DisplayObject, x int) *DisplayObject

ResetChild1O Takes a child and if the `x` and `y` arguments are given it calls `child.reset(x, y)` on it.

If the `key` and optionally the `frame` arguments are given, it calls `child.loadTexture(key, frame)` on it.

The two operations are separate. For example if you just wish to load a new texture then pass `null` as the x and y values.

func (*SpriteBatch) ResetChild2O

func (self *SpriteBatch) ResetChild2O(child *DisplayObject, x int, y int) *DisplayObject

ResetChild2O Takes a child and if the `x` and `y` arguments are given it calls `child.reset(x, y)` on it.

If the `key` and optionally the `frame` arguments are given, it calls `child.loadTexture(key, frame)` on it.

The two operations are separate. For example if you just wish to load a new texture then pass `null` as the x and y values.

func (*SpriteBatch) ResetChild3O

func (self *SpriteBatch) ResetChild3O(child *DisplayObject, x int, y int, key interface{}) *DisplayObject

ResetChild3O Takes a child and if the `x` and `y` arguments are given it calls `child.reset(x, y)` on it.

If the `key` and optionally the `frame` arguments are given, it calls `child.loadTexture(key, frame)` on it.

The two operations are separate. For example if you just wish to load a new texture then pass `null` as the x and y values.

func (*SpriteBatch) ResetChild4O

func (self *SpriteBatch) ResetChild4O(child *DisplayObject, x int, y int, key interface{}, frame interface{}) *DisplayObject

ResetChild4O Takes a child and if the `x` and `y` arguments are given it calls `child.reset(x, y)` on it.

If the `key` and optionally the `frame` arguments are given, it calls `child.loadTexture(key, frame)` on it.

The two operations are separate. For example if you just wish to load a new texture then pass `null` as the x and y values.

func (*SpriteBatch) ResetChildI

func (self *SpriteBatch) ResetChildI(args ...interface{}) *DisplayObject

ResetChildI Takes a child and if the `x` and `y` arguments are given it calls `child.reset(x, y)` on it.

If the `key` and optionally the `frame` arguments are given, it calls `child.loadTexture(key, frame)` on it.

The two operations are separate. For example if you just wish to load a new texture then pass `null` as the x and y values.

func (*SpriteBatch) ResetCursor

func (self *SpriteBatch) ResetCursor() interface{}

ResetCursor Sets the group cursor to the first child in the group.

If the optional index parameter is given it sets the cursor to the object at that index instead.

func (*SpriteBatch) ResetCursor1O

func (self *SpriteBatch) ResetCursor1O(index int) interface{}

ResetCursor1O Sets the group cursor to the first child in the group.

If the optional index parameter is given it sets the cursor to the object at that index instead.

func (*SpriteBatch) ResetCursorI

func (self *SpriteBatch) ResetCursorI(args ...interface{}) interface{}

ResetCursorI Sets the group cursor to the first child in the group.

If the optional index parameter is given it sets the cursor to the object at that index instead.

func (*SpriteBatch) Reverse

func (self *SpriteBatch) Reverse()

Reverse Reverses all children in this group.

This operation applies only to immediate children and does not propagate to subgroups.

func (*SpriteBatch) ReverseI

func (self *SpriteBatch) ReverseI(args ...interface{})

ReverseI Reverses all children in this group.

This operation applies only to immediate children and does not propagate to subgroups.

func (*SpriteBatch) Right

func (self *SpriteBatch) Right() int

Right The right coordinate of this Group.

It is derived by calling `getBounds`, calculating the Groups dimensions based on its visible children.

func (*SpriteBatch) Rotation

func (self *SpriteBatch) Rotation() int

Rotation The angle of rotation of the group container, in radians.

This will adjust the group container itself by modifying its rotation. This will have no impact on the rotation value of its children, but it will update their worldTransform and on-screen position.

func (*SpriteBatch) SendToBack

func (self *SpriteBatch) SendToBack(child interface{}) interface{}

SendToBack Sends the given child to the bottom of this group so it renders below all other children.

func (*SpriteBatch) SendToBackI

func (self *SpriteBatch) SendToBackI(args ...interface{}) interface{}

SendToBackI Sends the given child to the bottom of this group so it renders below all other children.

func (*SpriteBatch) Set

func (self *SpriteBatch) Set(child *Sprite, key string, value interface{}) bool

Set Quickly set a property on a single child of this group to a new value.

The operation parameter controls how the new value is assigned to the property, from simple replacement to addition and multiplication.

func (*SpriteBatch) Set1O

func (self *SpriteBatch) Set1O(child *Sprite, key string, value interface{}, checkAlive bool) bool

Set1O Quickly set a property on a single child of this group to a new value.

The operation parameter controls how the new value is assigned to the property, from simple replacement to addition and multiplication.

func (*SpriteBatch) Set2O

func (self *SpriteBatch) Set2O(child *Sprite, key string, value interface{}, checkAlive bool, checkVisible bool) bool

Set2O Quickly set a property on a single child of this group to a new value.

The operation parameter controls how the new value is assigned to the property, from simple replacement to addition and multiplication.

func (*SpriteBatch) Set3O

func (self *SpriteBatch) Set3O(child *Sprite, key string, value interface{}, checkAlive bool, checkVisible bool, operation int) bool

Set3O Quickly set a property on a single child of this group to a new value.

The operation parameter controls how the new value is assigned to the property, from simple replacement to addition and multiplication.

func (*SpriteBatch) Set4O

func (self *SpriteBatch) Set4O(child *Sprite, key string, value interface{}, checkAlive bool, checkVisible bool, operation int, force bool) bool

Set4O Quickly set a property on a single child of this group to a new value.

The operation parameter controls how the new value is assigned to the property, from simple replacement to addition and multiplication.

func (*SpriteBatch) SetAliveA

func (self *SpriteBatch) SetAliveA(member bool)

SetAliveA The alive property is useful for Groups that are children of other Groups and need to be included/excluded in checks like forEachAlive.

func (*SpriteBatch) SetAll

func (self *SpriteBatch) SetAll(key string, value interface{})

SetAll Quickly set the same property across all children of this group to a new value.

This call doesn't descend down children, so if you have a Group inside of this group, the property will be set on the group but not its children. If you need that ability please see `Group.setAllChildren`.

The operation parameter controls how the new value is assigned to the property, from simple replacement to addition and multiplication.

func (*SpriteBatch) SetAll1O

func (self *SpriteBatch) SetAll1O(key string, value interface{}, checkAlive bool)

SetAll1O Quickly set the same property across all children of this group to a new value.

This call doesn't descend down children, so if you have a Group inside of this group, the property will be set on the group but not its children. If you need that ability please see `Group.setAllChildren`.

The operation parameter controls how the new value is assigned to the property, from simple replacement to addition and multiplication.

func (*SpriteBatch) SetAll2O

func (self *SpriteBatch) SetAll2O(key string, value interface{}, checkAlive bool, checkVisible bool)

SetAll2O Quickly set the same property across all children of this group to a new value.

This call doesn't descend down children, so if you have a Group inside of this group, the property will be set on the group but not its children. If you need that ability please see `Group.setAllChildren`.

The operation parameter controls how the new value is assigned to the property, from simple replacement to addition and multiplication.

func (*SpriteBatch) SetAll3O

func (self *SpriteBatch) SetAll3O(key string, value interface{}, checkAlive bool, checkVisible bool, operation int)

SetAll3O Quickly set the same property across all children of this group to a new value.

This call doesn't descend down children, so if you have a Group inside of this group, the property will be set on the group but not its children. If you need that ability please see `Group.setAllChildren`.

The operation parameter controls how the new value is assigned to the property, from simple replacement to addition and multiplication.

func (*SpriteBatch) SetAll4O

func (self *SpriteBatch) SetAll4O(key string, value interface{}, checkAlive bool, checkVisible bool, operation int, force bool)

SetAll4O Quickly set the same property across all children of this group to a new value.

This call doesn't descend down children, so if you have a Group inside of this group, the property will be set on the group but not its children. If you need that ability please see `Group.setAllChildren`.

The operation parameter controls how the new value is assigned to the property, from simple replacement to addition and multiplication.

func (*SpriteBatch) SetAllChildren

func (self *SpriteBatch) SetAllChildren(key string, value interface{})

SetAllChildren Quickly set the same property across all children of this group, and any child Groups, to a new value.

If this group contains other Groups then the same property is set across their children as well, iterating down until it reaches the bottom. Unlike with `setAll` the property is NOT set on child Groups itself.

The operation parameter controls how the new value is assigned to the property, from simple replacement to addition and multiplication.

func (*SpriteBatch) SetAllChildren1O

func (self *SpriteBatch) SetAllChildren1O(key string, value interface{}, checkAlive bool)

SetAllChildren1O Quickly set the same property across all children of this group, and any child Groups, to a new value.

If this group contains other Groups then the same property is set across their children as well, iterating down until it reaches the bottom. Unlike with `setAll` the property is NOT set on child Groups itself.

The operation parameter controls how the new value is assigned to the property, from simple replacement to addition and multiplication.

func (*SpriteBatch) SetAllChildren2O

func (self *SpriteBatch) SetAllChildren2O(key string, value interface{}, checkAlive bool, checkVisible bool)

SetAllChildren2O Quickly set the same property across all children of this group, and any child Groups, to a new value.

If this group contains other Groups then the same property is set across their children as well, iterating down until it reaches the bottom. Unlike with `setAll` the property is NOT set on child Groups itself.

The operation parameter controls how the new value is assigned to the property, from simple replacement to addition and multiplication.

func (*SpriteBatch) SetAllChildren3O

func (self *SpriteBatch) SetAllChildren3O(key string, value interface{}, checkAlive bool, checkVisible bool, operation int)

SetAllChildren3O Quickly set the same property across all children of this group, and any child Groups, to a new value.

If this group contains other Groups then the same property is set across their children as well, iterating down until it reaches the bottom. Unlike with `setAll` the property is NOT set on child Groups itself.

The operation parameter controls how the new value is assigned to the property, from simple replacement to addition and multiplication.

func (*SpriteBatch) SetAllChildren4O

func (self *SpriteBatch) SetAllChildren4O(key string, value interface{}, checkAlive bool, checkVisible bool, operation int, force bool)

SetAllChildren4O Quickly set the same property across all children of this group, and any child Groups, to a new value.

If this group contains other Groups then the same property is set across their children as well, iterating down until it reaches the bottom. Unlike with `setAll` the property is NOT set on child Groups itself.

The operation parameter controls how the new value is assigned to the property, from simple replacement to addition and multiplication.

func (*SpriteBatch) SetAllChildrenI

func (self *SpriteBatch) SetAllChildrenI(args ...interface{})

SetAllChildrenI Quickly set the same property across all children of this group, and any child Groups, to a new value.

If this group contains other Groups then the same property is set across their children as well, iterating down until it reaches the bottom. Unlike with `setAll` the property is NOT set on child Groups itself.

The operation parameter controls how the new value is assigned to the property, from simple replacement to addition and multiplication.

func (*SpriteBatch) SetAllI

func (self *SpriteBatch) SetAllI(args ...interface{})

SetAllI Quickly set the same property across all children of this group to a new value.

This call doesn't descend down children, so if you have a Group inside of this group, the property will be set on the group but not its children. If you need that ability please see `Group.setAllChildren`.

The operation parameter controls how the new value is assigned to the property, from simple replacement to addition and multiplication.

func (*SpriteBatch) SetAlphaA

func (self *SpriteBatch) SetAlphaA(member int)

SetAlphaA The alpha value of the group container.

func (*SpriteBatch) SetAngleA

func (self *SpriteBatch) SetAngleA(member int)

SetAngleA The angle of rotation of the group container, in degrees.

This adjusts the group itself by modifying its local rotation transform.

This has no impact on the rotation/angle properties of the children, but it will update their worldTransform and on-screen orientation and position.

func (*SpriteBatch) SetBottomA

func (self *SpriteBatch) SetBottomA(member int)

SetBottomA The bottom coordinate of this Group.

It is derived by calling `getBounds`, calculating the Groups dimensions based on its visible children.

func (*SpriteBatch) SetCameraOffsetA

func (self *SpriteBatch) SetCameraOffsetA(member *Point)

SetCameraOffsetA If this object is {@link Phaser.Group#fixedToCamera fixedToCamera} then this stores the x/y position offset relative to the top-left of the camera view. If the parent of this Group is also `fixedToCamera` then the offset here is in addition to that and should typically be disabled.

func (*SpriteBatch) SetCenterXA

func (self *SpriteBatch) SetCenterXA(member int)

SetCenterXA The center x coordinate of this Group.

It is derived by calling `getBounds`, calculating the Groups dimensions based on its visible children.

func (*SpriteBatch) SetCenterYA

func (self *SpriteBatch) SetCenterYA(member int)

SetCenterYA The center y coordinate of this Group.

It is derived by calling `getBounds`, calculating the Groups dimensions based on its visible children.

func (*SpriteBatch) SetChildIndex

func (self *SpriteBatch) SetChildIndex(child *DisplayObject, index int)

SetChildIndex Changes the position of an existing child in the display object container

func (*SpriteBatch) SetChildIndexI

func (self *SpriteBatch) SetChildIndexI(args ...interface{})

SetChildIndexI Changes the position of an existing child in the display object container

func (*SpriteBatch) SetChildrenA

func (self *SpriteBatch) SetChildrenA(member []DisplayObject)

SetChildrenA [read-only] The array of children of this container.

func (*SpriteBatch) SetClassTypeA

func (self *SpriteBatch) SetClassTypeA(member interface{})

SetClassTypeA The type of objects that will be created when using {@link Phaser.Group#create create} or {@link Phaser.Group#createMultiple createMultiple}.

Any object may be used but it should extend either Sprite or Image and accept the same constructor arguments: when a new object is created it is passed the following parameters to its constructor: `(game, x, y, key, frame)`.

func (*SpriteBatch) SetCursorA

func (self *SpriteBatch) SetCursorA(member *DisplayObject)

SetCursorA The current display object that the group cursor is pointing to, if any. (Can be set manually.)

The cursor is a way to iterate through the children in a Group using {@link Phaser.Group#next next} and {@link Phaser.Group#previous previous}.

func (*SpriteBatch) SetCursorIndexA

func (self *SpriteBatch) SetCursorIndexA(member int)

SetCursorIndexA The current index of the Group cursor. Advance it with Group.next.

func (*SpriteBatch) SetEnableBodyA

func (self *SpriteBatch) SetEnableBodyA(member bool)

SetEnableBodyA If true all Sprites created by, or added to this group, will have a physics body enabled on them.

If there are children already in the Group at the time you set this property, they are not changed.

The default body type is controlled with {@link Phaser.Group#physicsBodyType physicsBodyType}.

func (*SpriteBatch) SetEnableBodyDebugA

func (self *SpriteBatch) SetEnableBodyDebugA(member bool)

SetEnableBodyDebugA If true when a physics body is created (via {@link Phaser.Group#enableBody enableBody}) it will create a physics debug object as well.

This only works for P2 bodies.

func (*SpriteBatch) SetExistsA

func (self *SpriteBatch) SetExistsA(member bool)

SetExistsA If exists is true the group is updated, otherwise it is skipped.

func (*SpriteBatch) SetFixedToCameraA

func (self *SpriteBatch) SetFixedToCameraA(member bool)

SetFixedToCameraA A Group that is fixed to the camera uses its x/y coordinates as offsets from the top left of the camera. These are stored in Group.cameraOffset.

Note that the cameraOffset values are in addition to any parent in the display list. So if this Group was in a Group that has x: 200, then this will be added to the cameraOffset.x

func (*SpriteBatch) SetGameA

func (self *SpriteBatch) SetGameA(member *Game)

SetGameA A reference to the currently running Game.

func (*SpriteBatch) SetHashA

func (self *SpriteBatch) SetHashA(member []interface{})

SetHashA The hash array is an array belonging to this Group into which you can add any of its children via Group.addToHash and Group.removeFromHash.

Only children of this Group can be added to and removed from the hash.

This hash is used automatically by Phaser Arcade Physics in order to perform non z-index based destructive sorting. However if you don't use Arcade Physics, or this isn't a physics enabled Group, then you can use the hash to perform your own sorting and filtering of Group children without touching their z-index (and therefore display draw order)

func (*SpriteBatch) SetHeightA

func (self *SpriteBatch) SetHeightA(member int)

SetHeightA The height of the displayObjectContainer, setting this will actually modify the scale to achieve the value set

func (*SpriteBatch) SetI

func (self *SpriteBatch) SetI(args ...interface{}) bool

SetI Quickly set a property on a single child of this group to a new value.

The operation parameter controls how the new value is assigned to the property, from simple replacement to addition and multiplication.

func (*SpriteBatch) SetIgnoreChildInputA

func (self *SpriteBatch) SetIgnoreChildInputA(member bool)

SetIgnoreChildInputA If `ignoreChildInput` is `false` it will allow this objects _children_ to be considered as valid for Input events.

If this property is `true` then the children will _not_ be considered as valid for Input events.

Note that this property isn't recursive: only immediate children are influenced, it doesn't scan further down.

func (*SpriteBatch) SetIgnoreDestroyA

func (self *SpriteBatch) SetIgnoreDestroyA(member bool)

SetIgnoreDestroyA A group with `ignoreDestroy` set to `true` ignores all calls to its `destroy` method.

func (*SpriteBatch) SetInputEnableChildrenA

func (self *SpriteBatch) SetInputEnableChildrenA(member bool)

SetInputEnableChildrenA A Group with `inputEnableChildren` set to `true` will automatically call `inputEnabled = true` on any children _added_ to, or _created by_, this Group.

If there are children already in the Group at the time you set this property, they are not changed.

func (*SpriteBatch) SetLeftA

func (self *SpriteBatch) SetLeftA(member int)

SetLeftA The left coordinate of this Group.

It is derived by calling `getBounds`, calculating the Groups dimensions based on its visible children.

func (*SpriteBatch) SetLengthA

func (self *SpriteBatch) SetLengthA(member int)

SetLengthA Total number of children in this group, regardless of exists/alive status.

func (*SpriteBatch) SetNameA

func (self *SpriteBatch) SetNameA(member string)

SetNameA A name for this group. Not used internally but useful for debugging.

func (*SpriteBatch) SetOnChildInputDownA

func (self *SpriteBatch) SetOnChildInputDownA(member *Signal)

SetOnChildInputDownA This Signal is dispatched whenever a child of this Group emits an onInputDown signal as a result of having been interacted with by a Pointer. You can bind functions to this Signal instead of to every child Sprite.

This Signal is sent 2 arguments: A reference to the Sprite that triggered the signal, and a reference to the Pointer that caused it.

func (*SpriteBatch) SetOnChildInputOutA

func (self *SpriteBatch) SetOnChildInputOutA(member *Signal)

SetOnChildInputOutA This Signal is dispatched whenever a child of this Group emits an onInputOut signal as a result of having been interacted with by a Pointer. You can bind functions to this Signal instead of to every child Sprite.

This Signal is sent 2 arguments: A reference to the Sprite that triggered the signal, and a reference to the Pointer that caused it.

func (*SpriteBatch) SetOnChildInputOverA

func (self *SpriteBatch) SetOnChildInputOverA(member *Signal)

SetOnChildInputOverA This Signal is dispatched whenever a child of this Group emits an onInputOver signal as a result of having been interacted with by a Pointer. You can bind functions to this Signal instead of to every child Sprite.

This Signal is sent 2 arguments: A reference to the Sprite that triggered the signal, and a reference to the Pointer that caused it.

func (*SpriteBatch) SetOnChildInputUpA

func (self *SpriteBatch) SetOnChildInputUpA(member *Signal)

SetOnChildInputUpA This Signal is dispatched whenever a child of this Group emits an onInputUp signal as a result of having been interacted with by a Pointer. You can bind functions to this Signal instead of to every child Sprite.

This Signal is sent 3 arguments: A reference to the Sprite that triggered the signal, a reference to the Pointer that caused it, and a boolean value `isOver` that tells you if the Pointer is still over the Sprite or not.

func (*SpriteBatch) SetOnDestroyA

func (self *SpriteBatch) SetOnDestroyA(member *Signal)

SetOnDestroyA This signal is dispatched when the group is destroyed.

func (*SpriteBatch) SetPendingDestroyA

func (self *SpriteBatch) SetPendingDestroyA(member bool)

SetPendingDestroyA A Group is that has `pendingDestroy` set to `true` is flagged to have its destroy method called on the next logic update. You can set it directly to flag the Group to be destroyed on its next update.

This is extremely useful if you wish to destroy a Group from within one of its own callbacks or a callback of one of its children.

func (*SpriteBatch) SetPhysicsBodyTypeA

func (self *SpriteBatch) SetPhysicsBodyTypeA(member int)

SetPhysicsBodyTypeA If {@link Phaser.Group#enableBody enableBody} is true this is the type of physics body that is created on new Sprites.

The valid values are {@link Phaser.Physics.ARCADE}, {@link Phaser.Physics.P2JS}, {@link Phaser.Physics.NINJA}, etc.

func (*SpriteBatch) SetPhysicsSortDirectionA

func (self *SpriteBatch) SetPhysicsSortDirectionA(member int)

SetPhysicsSortDirectionA If this Group contains Arcade Physics Sprites you can set a custom sort direction via this property.

It should be set to one of the Phaser.Physics.Arcade sort direction constants:

Phaser.Physics.Arcade.SORT_NONE Phaser.Physics.Arcade.LEFT_RIGHT Phaser.Physics.Arcade.RIGHT_LEFT Phaser.Physics.Arcade.TOP_BOTTOM Phaser.Physics.Arcade.BOTTOM_TOP

If set to `null` the Group will use whatever Phaser.Physics.Arcade.sortDirection is set to. This is the default behavior.

func (*SpriteBatch) SetPhysicsTypeA

func (self *SpriteBatch) SetPhysicsTypeA(member int)

SetPhysicsTypeA The const physics body type of this object.

func (*SpriteBatch) SetProperty

func (self *SpriteBatch) SetProperty(child interface{}, key []interface{}, value interface{}) bool

SetProperty Sets a property to the given value on the child. The operation parameter controls how the value is set.

The operations are: - 0: set the existing value to the given value; if force is `true` a new property will be created if needed - 1: will add the given value to the value already present. - 2: will subtract the given value from the value already present. - 3: will multiply the value already present by the given value. - 4: will divide the value already present by the given value.

func (*SpriteBatch) SetProperty1O

func (self *SpriteBatch) SetProperty1O(child interface{}, key []interface{}, value interface{}, operation int) bool

SetProperty1O Sets a property to the given value on the child. The operation parameter controls how the value is set.

The operations are: - 0: set the existing value to the given value; if force is `true` a new property will be created if needed - 1: will add the given value to the value already present. - 2: will subtract the given value from the value already present. - 3: will multiply the value already present by the given value. - 4: will divide the value already present by the given value.

func (*SpriteBatch) SetProperty2O

func (self *SpriteBatch) SetProperty2O(child interface{}, key []interface{}, value interface{}, operation int, force bool) bool

SetProperty2O Sets a property to the given value on the child. The operation parameter controls how the value is set.

The operations are: - 0: set the existing value to the given value; if force is `true` a new property will be created if needed - 1: will add the given value to the value already present. - 2: will subtract the given value from the value already present. - 3: will multiply the value already present by the given value. - 4: will divide the value already present by the given value.

func (*SpriteBatch) SetPropertyI

func (self *SpriteBatch) SetPropertyI(args ...interface{}) bool

SetPropertyI Sets a property to the given value on the child. The operation parameter controls how the value is set.

The operations are: - 0: set the existing value to the given value; if force is `true` a new property will be created if needed - 1: will add the given value to the value already present. - 2: will subtract the given value from the value already present. - 3: will multiply the value already present by the given value. - 4: will divide the value already present by the given value.

func (*SpriteBatch) SetRightA

func (self *SpriteBatch) SetRightA(member int)

SetRightA The right coordinate of this Group.

It is derived by calling `getBounds`, calculating the Groups dimensions based on its visible children.

func (*SpriteBatch) SetRotationA

func (self *SpriteBatch) SetRotationA(member int)

SetRotationA The angle of rotation of the group container, in radians.

This will adjust the group container itself by modifying its rotation. This will have no impact on the rotation value of its children, but it will update their worldTransform and on-screen position.

func (*SpriteBatch) SetTopA

func (self *SpriteBatch) SetTopA(member int)

SetTopA The top coordinate of this Group.

It is derived by calling `getBounds`, calculating the Groups dimensions based on its visible children.

func (*SpriteBatch) SetTotalA

func (self *SpriteBatch) SetTotalA(member int)

SetTotalA Total number of existing children in the group.

func (*SpriteBatch) SetTypeA

func (self *SpriteBatch) SetTypeA(member int)

SetTypeA Internal Phaser Type value.

func (*SpriteBatch) SetVisibleA

func (self *SpriteBatch) SetVisibleA(member bool)

SetVisibleA The visible state of the group. Non-visible Groups and all of their children are not rendered.

func (*SpriteBatch) SetWidthA

func (self *SpriteBatch) SetWidthA(member int)

SetWidthA The width of the displayObjectContainer, setting this will actually modify the scale to achieve the value set

func (*SpriteBatch) SetXA

func (self *SpriteBatch) SetXA(member int)

SetXA The x coordinate of the group container.

You can adjust the group container itself by modifying its coordinates. This will have no impact on the x/y coordinates of its children, but it will update their worldTransform and on-screen position.

func (*SpriteBatch) SetYA

func (self *SpriteBatch) SetYA(member int)

SetYA The y coordinate of the group container.

You can adjust the group container itself by modifying its coordinates. This will have no impact on the x/y coordinates of its children, but it will update their worldTransform and on-screen position.

func (*SpriteBatch) SetZA

func (self *SpriteBatch) SetZA(member int)

SetZA The z-depth value of this object within its parent container/Group - the World is a Group as well. This value must be unique for each child in a Group.

func (*SpriteBatch) Sort

func (self *SpriteBatch) Sort()

Sort Sort the children in the group according to a particular key and ordering.

Call this function to sort the group according to a particular key value and order.

For example to depth sort Sprites for Zelda-style game you might call `group.sort('y', Phaser.Group.SORT_ASCENDING)` at the bottom of your `State.update()`.

Internally this uses a standard JavaScript Array sort, so everything that applies there also applies here, including alphabetical sorting, mixing strings and numbers, and Unicode sorting. See MDN for more details.

func (*SpriteBatch) Sort1O

func (self *SpriteBatch) Sort1O(key string)

Sort1O Sort the children in the group according to a particular key and ordering.

Call this function to sort the group according to a particular key value and order.

For example to depth sort Sprites for Zelda-style game you might call `group.sort('y', Phaser.Group.SORT_ASCENDING)` at the bottom of your `State.update()`.

Internally this uses a standard JavaScript Array sort, so everything that applies there also applies here, including alphabetical sorting, mixing strings and numbers, and Unicode sorting. See MDN for more details.

func (*SpriteBatch) Sort2O

func (self *SpriteBatch) Sort2O(key string, order int)

Sort2O Sort the children in the group according to a particular key and ordering.

Call this function to sort the group according to a particular key value and order.

For example to depth sort Sprites for Zelda-style game you might call `group.sort('y', Phaser.Group.SORT_ASCENDING)` at the bottom of your `State.update()`.

Internally this uses a standard JavaScript Array sort, so everything that applies there also applies here, including alphabetical sorting, mixing strings and numbers, and Unicode sorting. See MDN for more details.

func (*SpriteBatch) SortI

func (self *SpriteBatch) SortI(args ...interface{})

SortI Sort the children in the group according to a particular key and ordering.

Call this function to sort the group according to a particular key value and order.

For example to depth sort Sprites for Zelda-style game you might call `group.sort('y', Phaser.Group.SORT_ASCENDING)` at the bottom of your `State.update()`.

Internally this uses a standard JavaScript Array sort, so everything that applies there also applies here, including alphabetical sorting, mixing strings and numbers, and Unicode sorting. See MDN for more details.

func (*SpriteBatch) SubAll

func (self *SpriteBatch) SubAll(property string, amount int, checkAlive bool, checkVisible bool)

SubAll Subtracts the amount from the given property on all children in this group.

`Group.subAll('x', 10)` will minus 10 from the child.x value for each child.

func (*SpriteBatch) SubAllI

func (self *SpriteBatch) SubAllI(args ...interface{})

SubAllI Subtracts the amount from the given property on all children in this group.

`Group.subAll('x', 10)` will minus 10 from the child.x value for each child.

func (*SpriteBatch) Swap

func (self *SpriteBatch) Swap(child1 interface{}, child2 interface{})

Swap Swaps the position of two children in this group.

Both children must be in this group, a child cannot be swapped with itself, and unparented children cannot be swapped.

func (*SpriteBatch) SwapChildren

func (self *SpriteBatch) SwapChildren(child *DisplayObject, child2 *DisplayObject)

SwapChildren Swaps the position of 2 Display Objects within this container.

func (*SpriteBatch) SwapChildrenI

func (self *SpriteBatch) SwapChildrenI(args ...interface{})

SwapChildrenI Swaps the position of 2 Display Objects within this container.

func (*SpriteBatch) SwapI

func (self *SpriteBatch) SwapI(args ...interface{})

SwapI Swaps the position of two children in this group.

Both children must be in this group, a child cannot be swapped with itself, and unparented children cannot be swapped.

func (*SpriteBatch) Top

func (self *SpriteBatch) Top() int

Top The top coordinate of this Group.

It is derived by calling `getBounds`, calculating the Groups dimensions based on its visible children.

func (*SpriteBatch) Total

func (self *SpriteBatch) Total() int

Total Total number of existing children in the group.

func (*SpriteBatch) Type

func (self *SpriteBatch) Type() int

Type Internal Phaser Type value.

func (*SpriteBatch) Update

func (self *SpriteBatch) Update()

Update The core update - as called by World.

func (*SpriteBatch) UpdateI

func (self *SpriteBatch) UpdateI(args ...interface{})

UpdateI The core update - as called by World.

func (*SpriteBatch) UpdateZ

func (self *SpriteBatch) UpdateZ()

UpdateZ Internal method that re-applies all of the children's Z values.

This must be called whenever children ordering is altered so that their `z` indices are correctly updated.

func (*SpriteBatch) UpdateZI

func (self *SpriteBatch) UpdateZI(args ...interface{})

UpdateZI Internal method that re-applies all of the children's Z values.

This must be called whenever children ordering is altered so that their `z` indices are correctly updated.

func (*SpriteBatch) Visible

func (self *SpriteBatch) Visible() bool

Visible The visible state of the group. Non-visible Groups and all of their children are not rendered.

func (*SpriteBatch) Width

func (self *SpriteBatch) Width() int

Width The width of the displayObjectContainer, setting this will actually modify the scale to achieve the value set

func (*SpriteBatch) X

func (self *SpriteBatch) X() int

X The x coordinate of the group container.

You can adjust the group container itself by modifying its coordinates. This will have no impact on the x/y coordinates of its children, but it will update their worldTransform and on-screen position.

func (*SpriteBatch) Xy

func (self *SpriteBatch) Xy(index int, x int, y int)

Xy Positions the child found at the given index within this group to the given x and y coordinates.

func (*SpriteBatch) XyI

func (self *SpriteBatch) XyI(args ...interface{})

XyI Positions the child found at the given index within this group to the given x and y coordinates.

func (*SpriteBatch) Y

func (self *SpriteBatch) Y() int

Y The y coordinate of the group container.

You can adjust the group container itself by modifying its coordinates. This will have no impact on the x/y coordinates of its children, but it will update their worldTransform and on-screen position.

func (*SpriteBatch) Z

func (self *SpriteBatch) Z() int

Z The z-depth value of this object within its parent container/Group - the World is a Group as well. This value must be unique for each child in a Group.

type Stage

type Stage struct {
	*js.Object
}

Stage The Stage controls root level display objects upon which everything is displayed. It also handles browser visibility handling and the pausing due to loss of focus.

func NewStage

func NewStage(game *Game) *Stage

NewStage The Stage controls root level display objects upon which everything is displayed. It also handles browser visibility handling and the pausing due to loss of focus.

func NewStageI

func NewStageI(args ...interface{}) *Stage

NewStageI The Stage controls root level display objects upon which everything is displayed. It also handles browser visibility handling and the pausing due to loss of focus.

func ToStage

func ToStage(jsStruct interface{}) *Stage

Stage Binding conversion method to Stage point

func (*Stage) AddChild

func (self *Stage) AddChild(child *DisplayObject) *DisplayObject

AddChild Adds a child to the container.

func (*Stage) AddChildAt

func (self *Stage) AddChildAt(child *DisplayObject, index int) *DisplayObject

AddChildAt Adds a child to the container at a specified index. If the index is out of bounds an error will be thrown

func (*Stage) AddChildAtI

func (self *Stage) AddChildAtI(args ...interface{}) *DisplayObject

AddChildAtI Adds a child to the container at a specified index. If the index is out of bounds an error will be thrown

func (*Stage) AddChildI

func (self *Stage) AddChildI(args ...interface{}) *DisplayObject

AddChildI Adds a child to the container.

func (*Stage) BackgroundColor

func (self *Stage) BackgroundColor() interface{}

BackgroundColor Gets and sets the background color of the stage. The color can be given as a number: 0xff0000 or a hex string: '#ff0000'

func (*Stage) Boot

func (self *Stage) Boot()

Boot Initialises the stage and adds the event listeners.

func (*Stage) BootI

func (self *Stage) BootI(args ...interface{})

BootI Initialises the stage and adds the event listeners.

func (*Stage) CheckVisibility

func (self *Stage) CheckVisibility()

CheckVisibility Starts a page visibility event listener running, or window.onpagehide/onpageshow if not supported by the browser. Also listens for window.onblur and window.onfocus.

func (*Stage) CheckVisibilityI

func (self *Stage) CheckVisibilityI(args ...interface{})

CheckVisibilityI Starts a page visibility event listener running, or window.onpagehide/onpageshow if not supported by the browser. Also listens for window.onblur and window.onfocus.

func (*Stage) Children

func (self *Stage) Children() []DisplayObject

Children [read-only] The array of children of this container.

func (*Stage) Contains

func (self *Stage) Contains(child *DisplayObject) bool

Contains Determines whether the specified display object is a child of the DisplayObjectContainer instance or the instance itself.

func (*Stage) ContainsI

func (self *Stage) ContainsI(args ...interface{}) bool

ContainsI Determines whether the specified display object is a child of the DisplayObjectContainer instance or the instance itself.

func (*Stage) CurrentRenderOrderID

func (self *Stage) CurrentRenderOrderID() int

CurrentRenderOrderID Reset each frame, keeps a count of the total number of objects updated.

func (*Stage) Destroy

func (self *Stage) Destroy()

Destroy Destroys the Stage and removes event listeners.

func (*Stage) DestroyI

func (self *Stage) DestroyI(args ...interface{})

DestroyI Destroys the Stage and removes event listeners.

func (*Stage) DisableVisibilityChange

func (self *Stage) DisableVisibilityChange() bool

DisableVisibilityChange By default if the browser tab loses focus the game will pause. You can stop that behavior by setting this property to true. Note that the browser can still elect to pause your game if it wishes to do so, for example swapping to another browser tab. This will cause the RAF callback to halt, effectively pausing your game, even though no in-game pause event is triggered if you enable this property.

func (*Stage) Exists

func (self *Stage) Exists() bool

Exists If exists is true the Stage and all children are updated, otherwise it is skipped.

func (*Stage) Game

func (self *Stage) Game() *Game

Game A reference to the currently running Game.

func (*Stage) GetBounds

func (self *Stage) GetBounds() *Rectangle

GetBounds Retrieves the global bounds of the displayObjectContainer as a rectangle. The bounds calculation takes all visible children into consideration.

func (*Stage) GetBounds1O

func (self *Stage) GetBounds1O(targetCoordinateSpace interface{}) *Rectangle

GetBounds1O Retrieves the global bounds of the displayObjectContainer as a rectangle. The bounds calculation takes all visible children into consideration.

func (*Stage) GetBoundsI

func (self *Stage) GetBoundsI(args ...interface{}) *Rectangle

GetBoundsI Retrieves the global bounds of the displayObjectContainer as a rectangle. The bounds calculation takes all visible children into consideration.

func (*Stage) GetChildAt

func (self *Stage) GetChildAt(index int) *DisplayObject

GetChildAt Returns the child at the specified index

func (*Stage) GetChildAtI

func (self *Stage) GetChildAtI(args ...interface{}) *DisplayObject

GetChildAtI Returns the child at the specified index

func (*Stage) GetChildIndex

func (self *Stage) GetChildIndex(child *DisplayObject) int

GetChildIndex Returns the index position of a child DisplayObject instance

func (*Stage) GetChildIndexI

func (self *Stage) GetChildIndexI(args ...interface{}) int

GetChildIndexI Returns the index position of a child DisplayObject instance

func (*Stage) GetLocalBounds

func (self *Stage) GetLocalBounds() *Rectangle

GetLocalBounds Retrieves the non-global local bounds of the displayObjectContainer as a rectangle without any transformations. The calculation takes all visible children into consideration.

func (*Stage) GetLocalBoundsI

func (self *Stage) GetLocalBoundsI(args ...interface{}) *Rectangle

GetLocalBoundsI Retrieves the non-global local bounds of the displayObjectContainer as a rectangle without any transformations. The calculation takes all visible children into consideration.

func (*Stage) Height

func (self *Stage) Height() int

Height The height of the displayObjectContainer, setting this will actually modify the scale to achieve the value set

func (*Stage) IgnoreChildInput

func (self *Stage) IgnoreChildInput() bool

IgnoreChildInput If `ignoreChildInput` is `false` it will allow this objects _children_ to be considered as valid for Input events.

If this property is `true` then the children will _not_ be considered as valid for Input events.

Note that this property isn't recursive: only immediate children are influenced, it doesn't scan further down.

func (*Stage) Name

func (self *Stage) Name() string

Name The name of this object.

func (*Stage) ParseConfig

func (self *Stage) ParseConfig(config interface{})

ParseConfig Parses a Game configuration object.

func (*Stage) ParseConfigI

func (self *Stage) ParseConfigI(args ...interface{})

ParseConfigI Parses a Game configuration object.

func (*Stage) PostUpdate

func (self *Stage) PostUpdate()

PostUpdate This is called automatically before the renderer runs and after the plugins have updated. In postUpdate this is where all the final physics calculations and object positioning happens. The objects are processed in the order of the display list.

func (*Stage) PostUpdateI

func (self *Stage) PostUpdateI(args ...interface{})

PostUpdateI This is called automatically before the renderer runs and after the plugins have updated. In postUpdate this is where all the final physics calculations and object positioning happens. The objects are processed in the order of the display list.

func (*Stage) PreUpdate

func (self *Stage) PreUpdate()

PreUpdate This is called automatically after the plugins preUpdate and before the State.update. Most objects have preUpdate methods and it's where initial movement and positioning is done.

func (*Stage) PreUpdateI

func (self *Stage) PreUpdateI(args ...interface{})

PreUpdateI This is called automatically after the plugins preUpdate and before the State.update. Most objects have preUpdate methods and it's where initial movement and positioning is done.

func (*Stage) RemoveChild

func (self *Stage) RemoveChild(child *DisplayObject) *DisplayObject

RemoveChild Removes a child from the container.

func (*Stage) RemoveChildAt

func (self *Stage) RemoveChildAt(index int) *DisplayObject

RemoveChildAt Removes a child from the specified index position.

func (*Stage) RemoveChildAtI

func (self *Stage) RemoveChildAtI(args ...interface{}) *DisplayObject

RemoveChildAtI Removes a child from the specified index position.

func (*Stage) RemoveChildI

func (self *Stage) RemoveChildI(args ...interface{}) *DisplayObject

RemoveChildI Removes a child from the container.

func (*Stage) RemoveChildren

func (self *Stage) RemoveChildren(beginIndex int, endIndex int)

RemoveChildren Removes all children from this container that are within the begin and end indexes.

func (*Stage) RemoveChildrenI

func (self *Stage) RemoveChildrenI(args ...interface{})

RemoveChildrenI Removes all children from this container that are within the begin and end indexes.

func (*Stage) SetBackgroundColor

func (self *Stage) SetBackgroundColor(color interface{})

SetBackgroundColor Sets the background color for the Stage.

The color can be given as a hex string (`'#RRGGBB'`), a CSS color string (`'rgb(r,g,b)'`), or a numeric value (`0xRRGGBB`).

An alpha channel is _not_ supported and will be ignored.

If you've set your game to be transparent then calls to setBackgroundColor are ignored.

func (*Stage) SetBackgroundColorA

func (self *Stage) SetBackgroundColorA(member interface{})

SetBackgroundColorA Gets and sets the background color of the stage. The color can be given as a number: 0xff0000 or a hex string: '#ff0000'

func (*Stage) SetBackgroundColorI

func (self *Stage) SetBackgroundColorI(args ...interface{})

SetBackgroundColorI Sets the background color for the Stage.

The color can be given as a hex string (`'#RRGGBB'`), a CSS color string (`'rgb(r,g,b)'`), or a numeric value (`0xRRGGBB`).

An alpha channel is _not_ supported and will be ignored.

If you've set your game to be transparent then calls to setBackgroundColor are ignored.

func (*Stage) SetChildIndex

func (self *Stage) SetChildIndex(child *DisplayObject, index int)

SetChildIndex Changes the position of an existing child in the display object container

func (*Stage) SetChildIndexI

func (self *Stage) SetChildIndexI(args ...interface{})

SetChildIndexI Changes the position of an existing child in the display object container

func (*Stage) SetChildrenA

func (self *Stage) SetChildrenA(member []DisplayObject)

SetChildrenA [read-only] The array of children of this container.

func (*Stage) SetCurrentRenderOrderIDA

func (self *Stage) SetCurrentRenderOrderIDA(member int)

SetCurrentRenderOrderIDA Reset each frame, keeps a count of the total number of objects updated.

func (*Stage) SetDisableVisibilityChangeA

func (self *Stage) SetDisableVisibilityChangeA(member bool)

SetDisableVisibilityChangeA By default if the browser tab loses focus the game will pause. You can stop that behavior by setting this property to true. Note that the browser can still elect to pause your game if it wishes to do so, for example swapping to another browser tab. This will cause the RAF callback to halt, effectively pausing your game, even though no in-game pause event is triggered if you enable this property.

func (*Stage) SetExistsA

func (self *Stage) SetExistsA(member bool)

SetExistsA If exists is true the Stage and all children are updated, otherwise it is skipped.

func (*Stage) SetGameA

func (self *Stage) SetGameA(member *Game)

SetGameA A reference to the currently running Game.

func (*Stage) SetHeightA

func (self *Stage) SetHeightA(member int)

SetHeightA The height of the displayObjectContainer, setting this will actually modify the scale to achieve the value set

func (*Stage) SetIgnoreChildInputA

func (self *Stage) SetIgnoreChildInputA(member bool)

SetIgnoreChildInputA If `ignoreChildInput` is `false` it will allow this objects _children_ to be considered as valid for Input events.

If this property is `true` then the children will _not_ be considered as valid for Input events.

Note that this property isn't recursive: only immediate children are influenced, it doesn't scan further down.

func (*Stage) SetNameA

func (self *Stage) SetNameA(member string)

SetNameA The name of this object.

func (*Stage) SetSmoothedA

func (self *Stage) SetSmoothedA(member bool)

SetSmoothedA Enable or disable texture smoothing for all objects on this Stage. Only works for bitmap/image textures. Smoothing is enabled by default. Set to true to smooth all sprites rendered on this Stage, or false to disable smoothing (great for pixel art)

func (*Stage) SetWidthA

func (self *Stage) SetWidthA(member int)

SetWidthA The width of the displayObjectContainer, setting this will actually modify the scale to achieve the value set

func (*Stage) Smoothed

func (self *Stage) Smoothed() bool

Smoothed Enable or disable texture smoothing for all objects on this Stage. Only works for bitmap/image textures. Smoothing is enabled by default. Set to true to smooth all sprites rendered on this Stage, or false to disable smoothing (great for pixel art)

func (*Stage) SwapChildren

func (self *Stage) SwapChildren(child *DisplayObject, child2 *DisplayObject)

SwapChildren Swaps the position of 2 Display Objects within this container.

func (*Stage) SwapChildrenI

func (self *Stage) SwapChildrenI(args ...interface{})

SwapChildrenI Swaps the position of 2 Display Objects within this container.

func (*Stage) Update

func (self *Stage) Update()

Update This is called automatically after the State.update, but before particles or plugins update.

func (*Stage) UpdateI

func (self *Stage) UpdateI(args ...interface{})

UpdateI This is called automatically after the State.update, but before particles or plugins update.

func (*Stage) UpdateTransform

func (self *Stage) UpdateTransform()

UpdateTransform Updates the transforms for all objects on the display list. This overrides the Pixi default as we don't need the interactionManager, but do need the game property check.

func (*Stage) UpdateTransformI

func (self *Stage) UpdateTransformI(args ...interface{})

UpdateTransformI Updates the transforms for all objects on the display list. This overrides the Pixi default as we don't need the interactionManager, but do need the game property check.

func (*Stage) VisibilityChange

func (self *Stage) VisibilityChange(event *Event)

VisibilityChange This method is called when the document visibility is changed.

func (*Stage) VisibilityChangeI

func (self *Stage) VisibilityChangeI(args ...interface{})

VisibilityChangeI This method is called when the document visibility is changed.

func (*Stage) Width

func (self *Stage) Width() int

Width The width of the displayObjectContainer, setting this will actually modify the scale to achieve the value set

type State

type State struct {
	*js.Object
}

State This is a base State class which can be extended if you are creating your own game. It provides quick access to common functions such as the camera, cache, input, match, sound and more.

func NewState

func NewState() *State

NewState This is a base State class which can be extended if you are creating your own game. It provides quick access to common functions such as the camera, cache, input, match, sound and more.

func NewStateI

func NewStateI(args ...interface{}) *State

NewStateI This is a base State class which can be extended if you are creating your own game. It provides quick access to common functions such as the camera, cache, input, match, sound and more.

func ToState

func ToState(jsStruct interface{}) *State

State Binding conversion method to State point

func (*State) Add

func (self *State) Add() *GameObjectFactory

Add A reference to the GameObjectFactory which can be used to add new objects to the World.

func (*State) Cache

func (self *State) Cache() *Cache

Cache A reference to the game cache which contains any loaded or generated assets, such as images, sound and more.

func (*State) Camera

func (self *State) Camera() *Camera

Camera A handy reference to World.camera.

func (*State) Create

func (self *State) Create()

Create create is called once preload has completed, this includes the loading of any assets from the Loader. If you don't have a preload method then create is the first method called in your State.

func (*State) CreateI

func (self *State) CreateI(args ...interface{})

CreateI create is called once preload has completed, this includes the loading of any assets from the Loader. If you don't have a preload method then create is the first method called in your State.

func (*State) Game

func (self *State) Game() *Game

Game This is a reference to the currently running Game.

func (*State) Init

func (self *State) Init()

Init init is the very first function called when your State starts up. It's called before preload, create or anything else. If you need to route the game away to another State you could do so here, or if you need to prepare a set of variables or objects before the preloading starts.

func (*State) InitI

func (self *State) InitI(args ...interface{})

InitI init is the very first function called when your State starts up. It's called before preload, create or anything else. If you need to route the game away to another State you could do so here, or if you need to prepare a set of variables or objects before the preloading starts.

func (*State) Input

func (self *State) Input() *Input

Input A reference to the Input Manager.

func (*State) Key

func (self *State) Key() string

Key The string based identifier given to the State when added into the State Manager.

func (*State) Load

func (self *State) Load() *Loader

Load A reference to the Loader, which you mostly use in the preload method of your state to load external assets.

func (*State) LoadRender

func (self *State) LoadRender()

LoadRender loadRender is called during the Loader process. This only happens if you've set one or more assets to load in the preload method. The difference between loadRender and render is that any objects you render in this method you must be sure their assets exist.

func (*State) LoadRenderI

func (self *State) LoadRenderI(args ...interface{})

LoadRenderI loadRender is called during the Loader process. This only happens if you've set one or more assets to load in the preload method. The difference between loadRender and render is that any objects you render in this method you must be sure their assets exist.

func (*State) LoadUpdate

func (self *State) LoadUpdate()

LoadUpdate loadUpdate is called during the Loader process. This only happens if you've set one or more assets to load in the preload method.

func (*State) LoadUpdateI

func (self *State) LoadUpdateI(args ...interface{})

LoadUpdateI loadUpdate is called during the Loader process. This only happens if you've set one or more assets to load in the preload method.

func (*State) Make

func (self *State) Make() *GameObjectCreator

Make A reference to the GameObjectCreator which can be used to make new objects.

func (*State) Math

func (self *State) Math() *Math

Math A reference to Math class with lots of helpful functions.

func (*State) Particles

func (self *State) Particles() *Particles

Particles The Particle Manager. It is called during the core gameloop and updates any Particle Emitters it has created.

func (*State) PauseUpdate

func (self *State) PauseUpdate()

PauseUpdate pauseUpdate is called while the game is paused instead of preUpdate, update and postUpdate.

func (*State) PauseUpdateI

func (self *State) PauseUpdateI(args ...interface{})

PauseUpdateI pauseUpdate is called while the game is paused instead of preUpdate, update and postUpdate.

func (*State) Paused

func (self *State) Paused()

Paused This method will be called if the core game loop is paused.

func (*State) PausedI

func (self *State) PausedI(args ...interface{})

PausedI This method will be called if the core game loop is paused.

func (*State) Physics

func (self *State) Physics() *Physics

Physics A reference to the physics manager which looks after the different physics systems available within Phaser.

func (*State) PreRender

func (self *State) PreRender()

PreRender The preRender method is called after all Game Objects have been updated, but before any rendering takes place.

func (*State) PreRenderI

func (self *State) PreRenderI(args ...interface{})

PreRenderI The preRender method is called after all Game Objects have been updated, but before any rendering takes place.

func (*State) Preload

func (self *State) Preload()

Preload preload is called first. Normally you'd use this to load your game assets (or those needed for the current State) You shouldn't create any objects in this method that require assets that you're also loading in this method, as they won't yet be available.

func (*State) PreloadI

func (self *State) PreloadI(args ...interface{})

PreloadI preload is called first. Normally you'd use this to load your game assets (or those needed for the current State) You shouldn't create any objects in this method that require assets that you're also loading in this method, as they won't yet be available.

func (*State) Render

func (self *State) Render()

Render Nearly all display objects in Phaser render automatically, you don't need to tell them to render. However the render method is called AFTER the game renderer and plugins have rendered, so you're able to do any final post-processing style effects here. Note that this happens before plugins postRender takes place.

func (*State) RenderI

func (self *State) RenderI(args ...interface{})

RenderI Nearly all display objects in Phaser render automatically, you don't need to tell them to render. However the render method is called AFTER the game renderer and plugins have rendered, so you're able to do any final post-processing style effects here. Note that this happens before plugins postRender takes place.

func (*State) Resize

func (self *State) Resize()

Resize If your game is set to Scalemode RESIZE then each time the browser resizes it will call this function, passing in the new width and height.

func (*State) ResizeI

func (self *State) ResizeI(args ...interface{})

ResizeI If your game is set to Scalemode RESIZE then each time the browser resizes it will call this function, passing in the new width and height.

func (*State) Resumed

func (self *State) Resumed()

Resumed This method will be called when the core game loop resumes from a paused state.

func (*State) ResumedI

func (self *State) ResumedI(args ...interface{})

ResumedI This method will be called when the core game loop resumes from a paused state.

func (*State) Rnd

func (self *State) Rnd() *RandomDataGenerator

Rnd A reference to the seeded and repeatable random data generator.

func (*State) Scale

func (self *State) Scale() *ScaleManager

Scale A reference to the Scale Manager which controls the way the game scales on different displays.

func (*State) SetAddA

func (self *State) SetAddA(member *GameObjectFactory)

SetAddA A reference to the GameObjectFactory which can be used to add new objects to the World.

func (*State) SetCacheA

func (self *State) SetCacheA(member *Cache)

SetCacheA A reference to the game cache which contains any loaded or generated assets, such as images, sound and more.

func (*State) SetCameraA

func (self *State) SetCameraA(member *Camera)

SetCameraA A handy reference to World.camera.

func (*State) SetGameA

func (self *State) SetGameA(member *Game)

SetGameA This is a reference to the currently running Game.

func (*State) SetInputA

func (self *State) SetInputA(member *Input)

SetInputA A reference to the Input Manager.

func (*State) SetKeyA

func (self *State) SetKeyA(member string)

SetKeyA The string based identifier given to the State when added into the State Manager.

func (*State) SetLoadA

func (self *State) SetLoadA(member *Loader)

SetLoadA A reference to the Loader, which you mostly use in the preload method of your state to load external assets.

func (*State) SetMakeA

func (self *State) SetMakeA(member *GameObjectCreator)

SetMakeA A reference to the GameObjectCreator which can be used to make new objects.

func (*State) SetMathA

func (self *State) SetMathA(member *Math)

SetMathA A reference to Math class with lots of helpful functions.

func (*State) SetParticlesA

func (self *State) SetParticlesA(member *Particles)

SetParticlesA The Particle Manager. It is called during the core gameloop and updates any Particle Emitters it has created.

func (*State) SetPhysicsA

func (self *State) SetPhysicsA(member *Physics)

SetPhysicsA A reference to the physics manager which looks after the different physics systems available within Phaser.

func (*State) SetRndA

func (self *State) SetRndA(member *RandomDataGenerator)

SetRndA A reference to the seeded and repeatable random data generator.

func (*State) SetScaleA

func (self *State) SetScaleA(member *ScaleManager)

SetScaleA A reference to the Scale Manager which controls the way the game scales on different displays.

func (*State) SetSoundA

func (self *State) SetSoundA(member *SoundManager)

SetSoundA A reference to the Sound Manager which can create, play and stop sounds, as well as adjust global volume.

func (*State) SetStageA

func (self *State) SetStageA(member *Stage)

SetStageA A reference to the Stage.

func (*State) SetStateA

func (self *State) SetStateA(member interface{})

SetStateA A reference to the State Manager, which controls state changes.

func (*State) SetTimeA

func (self *State) SetTimeA(member *Time)

SetTimeA A reference to the game clock and timed events system.

func (*State) SetTweensA

func (self *State) SetTweensA(member *TweenManager)

SetTweensA A reference to the tween manager.

func (*State) SetWorldA

func (self *State) SetWorldA(member *World)

SetWorldA A reference to the game world. All objects live in the Game World and its size is not bound by the display resolution.

func (*State) Shutdown

func (self *State) Shutdown()

Shutdown This method will be called when the State is shutdown (i.e. you switch to another state from this one).

func (*State) ShutdownI

func (self *State) ShutdownI(args ...interface{})

ShutdownI This method will be called when the State is shutdown (i.e. you switch to another state from this one).

func (*State) Sound

func (self *State) Sound() *SoundManager

Sound A reference to the Sound Manager which can create, play and stop sounds, as well as adjust global volume.

func (*State) Stage

func (self *State) Stage() *Stage

Stage A reference to the Stage.

func (*State) State

func (self *State) State() interface{}

State A reference to the State Manager, which controls state changes.

func (*State) Time

func (self *State) Time() *Time

Time A reference to the game clock and timed events system.

func (*State) Tweens

func (self *State) Tweens() *TweenManager

Tweens A reference to the tween manager.

func (*State) Update

func (self *State) Update()

Update The update method is left empty for your own use. It is called during the core game loop AFTER debug, physics, plugins and the Stage have had their preUpdate methods called. It is called BEFORE Stage, Tweens, Sounds, Input, Physics, Particles and Plugins have had their postUpdate methods called.

func (*State) UpdateI

func (self *State) UpdateI(args ...interface{})

UpdateI The update method is left empty for your own use. It is called during the core game loop AFTER debug, physics, plugins and the Stage have had their preUpdate methods called. It is called BEFORE Stage, Tweens, Sounds, Input, Physics, Particles and Plugins have had their postUpdate methods called.

func (*State) World

func (self *State) World() *World

World A reference to the game world. All objects live in the Game World and its size is not bound by the display resolution.

type StateManager

type StateManager struct {
	*js.Object
}

StateManager The State Manager is responsible for loading, setting up and switching game states.

func NewStateManager

func NewStateManager(game *Game) *StateManager

NewStateManager The State Manager is responsible for loading, setting up and switching game states.

func NewStateManager1O

func NewStateManager1O(game *Game, pendingState interface{}) *StateManager

NewStateManager1O The State Manager is responsible for loading, setting up and switching game states.

func NewStateManagerI

func NewStateManagerI(args ...interface{}) *StateManager

NewStateManagerI The State Manager is responsible for loading, setting up and switching game states.

func ToStateManager

func ToStateManager(jsStruct interface{}) *StateManager

StateManager Binding conversion method to StateManager point

func (*StateManager) Add

func (self *StateManager) Add(key string, state interface{})

Add Adds a new State into the StateManager. You must give each State a unique key by which you'll identify it. The State can be either a Phaser.State object (or an object that extends it), a plain JavaScript object or a function. If a function is given a new state object will be created by calling it.

func (*StateManager) Add1O

func (self *StateManager) Add1O(key string, state interface{}, autoStart bool)

Add1O Adds a new State into the StateManager. You must give each State a unique key by which you'll identify it. The State can be either a Phaser.State object (or an object that extends it), a plain JavaScript object or a function. If a function is given a new state object will be created by calling it.

func (*StateManager) AddI

func (self *StateManager) AddI(args ...interface{})

AddI Adds a new State into the StateManager. You must give each State a unique key by which you'll identify it. The State can be either a Phaser.State object (or an object that extends it), a plain JavaScript object or a function. If a function is given a new state object will be created by calling it.

func (*StateManager) Boot

func (self *StateManager) Boot()

Boot The Boot handler is called by Phaser.Game when it first starts up.

func (*StateManager) BootI

func (self *StateManager) BootI(args ...interface{})

BootI The Boot handler is called by Phaser.Game when it first starts up.

func (*StateManager) CheckState

func (self *StateManager) CheckState(key string) bool

CheckState Checks if a given phaser state is valid. A State is considered valid if it has at least one of the core functions: preload, create, update or render.

func (*StateManager) CheckStateI

func (self *StateManager) CheckStateI(args ...interface{}) bool

CheckStateI Checks if a given phaser state is valid. A State is considered valid if it has at least one of the core functions: preload, create, update or render.

func (*StateManager) ClearCurrentState

func (self *StateManager) ClearCurrentState()

ClearCurrentState This method clears the current State, calling its shutdown callback. The process also removes any active tweens, resets the camera, resets input, clears physics, removes timers and if set clears the world and cache too.

func (*StateManager) ClearCurrentStateI

func (self *StateManager) ClearCurrentStateI(args ...interface{})

ClearCurrentStateI This method clears the current State, calling its shutdown callback. The process also removes any active tweens, resets the camera, resets input, clears physics, removes timers and if set clears the world and cache too.

func (*StateManager) Created

func (self *StateManager) Created() bool

Created True if the current state has had its `create` method run (if it has one, if not this is true by default).

func (*StateManager) Current

func (self *StateManager) Current() string

Current The current active State object.

func (*StateManager) Destroy

func (self *StateManager) Destroy()

Destroy Removes all StateManager callback references to the State object, nulls the game reference and clears the States object. You don't recover from this without rebuilding the Phaser instance again.

func (*StateManager) DestroyI

func (self *StateManager) DestroyI(args ...interface{})

DestroyI Removes all StateManager callback references to the State object, nulls the game reference and clears the States object. You don't recover from this without rebuilding the Phaser instance again.

func (*StateManager) Dummy

func (self *StateManager) Dummy()

Dummy Used by onInit and onShutdown when those functions don't exist on the state

func (*StateManager) DummyI

func (self *StateManager) DummyI(args ...interface{})

DummyI Used by onInit and onShutdown when those functions don't exist on the state

func (*StateManager) Game

func (self *StateManager) Game() *Game

Game A reference to the currently running game.

func (*StateManager) GetCurrentState

func (self *StateManager) GetCurrentState() *State

GetCurrentState Gets the current State.

func (*StateManager) GetCurrentStateI

func (self *StateManager) GetCurrentStateI(args ...interface{}) *State

GetCurrentStateI Gets the current State.

func (self *StateManager) Link(key string)

Link Links game properties to the State given by the key.

func (*StateManager) LinkI

func (self *StateManager) LinkI(args ...interface{})

LinkI Links game properties to the State given by the key.

func (*StateManager) LoadComplete

func (self *StateManager) LoadComplete()

LoadComplete empty description

func (*StateManager) LoadCompleteI

func (self *StateManager) LoadCompleteI(args ...interface{})

LoadCompleteI empty description

func (*StateManager) OnCreateCallback

func (self *StateManager) OnCreateCallback() interface{}

OnCreateCallback This is called when the state preload has finished and creation begins.

func (*StateManager) OnInitCallback

func (self *StateManager) OnInitCallback() interface{}

OnInitCallback This is called when the state is set as the active state.

func (*StateManager) OnLoadRenderCallback

func (self *StateManager) OnLoadRenderCallback() interface{}

OnLoadRenderCallback This is called when the State is rendered during the preload phase.

func (*StateManager) OnLoadUpdateCallback

func (self *StateManager) OnLoadUpdateCallback() interface{}

OnLoadUpdateCallback This is called when the State is updated during the preload phase.

func (*StateManager) OnPauseUpdateCallback

func (self *StateManager) OnPauseUpdateCallback() interface{}

OnPauseUpdateCallback This is called every frame while the game is paused.

func (*StateManager) OnPausedCallback

func (self *StateManager) OnPausedCallback() interface{}

OnPausedCallback This is called when the game is paused.

func (*StateManager) OnPreRenderCallback

func (self *StateManager) OnPreRenderCallback() interface{}

OnPreRenderCallback This is called before the state is rendered and before the stage is cleared but after all game objects have had their final properties adjusted.

func (*StateManager) OnPreloadCallback

func (self *StateManager) OnPreloadCallback() interface{}

OnPreloadCallback This is called when the state starts to load assets.

func (*StateManager) OnRenderCallback

func (self *StateManager) OnRenderCallback() interface{}

OnRenderCallback This is called post-render. It doesn't happen during preload (see onLoadRenderCallback).

func (*StateManager) OnResizeCallback

func (self *StateManager) OnResizeCallback() interface{}

OnResizeCallback This is called if ScaleManager.scalemode is RESIZE and a resize event occurs. It's passed the new width and height.

func (*StateManager) OnResumedCallback

func (self *StateManager) OnResumedCallback() interface{}

OnResumedCallback This is called when the game is resumed from a paused state.

func (*StateManager) OnShutDownCallback

func (self *StateManager) OnShutDownCallback() interface{}

OnShutDownCallback This is called when the state is shut down (i.e. swapped to another state).

func (*StateManager) OnStateChange

func (self *StateManager) OnStateChange() *Signal

OnStateChange onStateChange is a Phaser.Signal that is dispatched whenever the game changes state.

It is dispatched only when the new state is started, which isn't usually at the same time as StateManager.start is called because state swapping is done in sync with the game loop. It is dispatched *before* any of the new states methods (such as preload and create) are called, and *after* the previous states shutdown method has been run.

The callback you specify is sent two parameters: the string based key of the new state, and the second parameter is the string based key of the old / previous state.

func (*StateManager) OnUpdateCallback

func (self *StateManager) OnUpdateCallback() interface{}

OnUpdateCallback This is called when the state is updated, every game loop. It doesn't happen during preload (@see onLoadUpdateCallback).

func (*StateManager) Pause

func (self *StateManager) Pause()

Pause empty description

func (*StateManager) PauseI

func (self *StateManager) PauseI(args ...interface{})

PauseI empty description

func (*StateManager) PauseUpdate

func (self *StateManager) PauseUpdate()

PauseUpdate empty description

func (*StateManager) PauseUpdateI

func (self *StateManager) PauseUpdateI(args ...interface{})

PauseUpdateI empty description

func (*StateManager) PreRender

func (self *StateManager) PreRender(elapsedTime int)

PreRender empty description

func (*StateManager) PreRenderI

func (self *StateManager) PreRenderI(args ...interface{})

PreRenderI empty description

func (*StateManager) PreUpdate

func (self *StateManager) PreUpdate()

PreUpdate preUpdate is called right at the start of the game loop. It is responsible for changing to a new state that was requested previously.

func (*StateManager) PreUpdateI

func (self *StateManager) PreUpdateI(args ...interface{})

PreUpdateI preUpdate is called right at the start of the game loop. It is responsible for changing to a new state that was requested previously.

func (*StateManager) Remove

func (self *StateManager) Remove(key string)

Remove Delete the given state.

func (*StateManager) RemoveI

func (self *StateManager) RemoveI(args ...interface{})

RemoveI Delete the given state.

func (*StateManager) Render

func (self *StateManager) Render()

Render empty description

func (*StateManager) RenderI

func (self *StateManager) RenderI(args ...interface{})

RenderI empty description

func (*StateManager) Resize

func (self *StateManager) Resize()

Resize empty description

func (*StateManager) ResizeI

func (self *StateManager) ResizeI(args ...interface{})

ResizeI empty description

func (*StateManager) Restart

func (self *StateManager) Restart(clearWorld bool, clearCache bool, parameter interface{})

Restart Restarts the current State. State.shutDown will be called (if it exists) before the State is restarted.

func (*StateManager) RestartI

func (self *StateManager) RestartI(args ...interface{})

RestartI Restarts the current State. State.shutDown will be called (if it exists) before the State is restarted.

func (*StateManager) Resume

func (self *StateManager) Resume()

Resume empty description

func (*StateManager) ResumeI

func (self *StateManager) ResumeI(args ...interface{})

ResumeI empty description

func (*StateManager) SetCreatedA

func (self *StateManager) SetCreatedA(member bool)

SetCreatedA True if the current state has had its `create` method run (if it has one, if not this is true by default).

func (*StateManager) SetCurrentA

func (self *StateManager) SetCurrentA(member string)

SetCurrentA The current active State object.

func (*StateManager) SetCurrentState

func (self *StateManager) SetCurrentState(key string)

SetCurrentState Sets the current State. Should not be called directly (use StateManager.start)

func (*StateManager) SetCurrentStateI

func (self *StateManager) SetCurrentStateI(args ...interface{})

SetCurrentStateI Sets the current State. Should not be called directly (use StateManager.start)

func (*StateManager) SetGameA

func (self *StateManager) SetGameA(member *Game)

SetGameA A reference to the currently running game.

func (*StateManager) SetOnCreateCallbackA

func (self *StateManager) SetOnCreateCallbackA(member interface{})

SetOnCreateCallbackA This is called when the state preload has finished and creation begins.

func (*StateManager) SetOnInitCallbackA

func (self *StateManager) SetOnInitCallbackA(member interface{})

SetOnInitCallbackA This is called when the state is set as the active state.

func (*StateManager) SetOnLoadRenderCallbackA

func (self *StateManager) SetOnLoadRenderCallbackA(member interface{})

SetOnLoadRenderCallbackA This is called when the State is rendered during the preload phase.

func (*StateManager) SetOnLoadUpdateCallbackA

func (self *StateManager) SetOnLoadUpdateCallbackA(member interface{})

SetOnLoadUpdateCallbackA This is called when the State is updated during the preload phase.

func (*StateManager) SetOnPauseUpdateCallbackA

func (self *StateManager) SetOnPauseUpdateCallbackA(member interface{})

SetOnPauseUpdateCallbackA This is called every frame while the game is paused.

func (*StateManager) SetOnPausedCallbackA

func (self *StateManager) SetOnPausedCallbackA(member interface{})

SetOnPausedCallbackA This is called when the game is paused.

func (*StateManager) SetOnPreRenderCallbackA

func (self *StateManager) SetOnPreRenderCallbackA(member interface{})

SetOnPreRenderCallbackA This is called before the state is rendered and before the stage is cleared but after all game objects have had their final properties adjusted.

func (*StateManager) SetOnPreloadCallbackA

func (self *StateManager) SetOnPreloadCallbackA(member interface{})

SetOnPreloadCallbackA This is called when the state starts to load assets.

func (*StateManager) SetOnRenderCallbackA

func (self *StateManager) SetOnRenderCallbackA(member interface{})

SetOnRenderCallbackA This is called post-render. It doesn't happen during preload (see onLoadRenderCallback).

func (*StateManager) SetOnResizeCallbackA

func (self *StateManager) SetOnResizeCallbackA(member interface{})

SetOnResizeCallbackA This is called if ScaleManager.scalemode is RESIZE and a resize event occurs. It's passed the new width and height.

func (*StateManager) SetOnResumedCallbackA

func (self *StateManager) SetOnResumedCallbackA(member interface{})

SetOnResumedCallbackA This is called when the game is resumed from a paused state.

func (*StateManager) SetOnShutDownCallbackA

func (self *StateManager) SetOnShutDownCallbackA(member interface{})

SetOnShutDownCallbackA This is called when the state is shut down (i.e. swapped to another state).

func (*StateManager) SetOnStateChangeA

func (self *StateManager) SetOnStateChangeA(member *Signal)

SetOnStateChangeA onStateChange is a Phaser.Signal that is dispatched whenever the game changes state.

It is dispatched only when the new state is started, which isn't usually at the same time as StateManager.start is called because state swapping is done in sync with the game loop. It is dispatched *before* any of the new states methods (such as preload and create) are called, and *after* the previous states shutdown method has been run.

The callback you specify is sent two parameters: the string based key of the new state, and the second parameter is the string based key of the old / previous state.

func (*StateManager) SetOnUpdateCallbackA

func (self *StateManager) SetOnUpdateCallbackA(member interface{})

SetOnUpdateCallbackA This is called when the state is updated, every game loop. It doesn't happen during preload (@see onLoadUpdateCallback).

func (*StateManager) SetStatesA

func (self *StateManager) SetStatesA(member interface{})

SetStatesA The object containing Phaser.States.

func (*StateManager) Start

func (self *StateManager) Start(key string, clearWorld bool, clearCache bool, parameter interface{})

Start Start the given State. If a State is already running then State.shutDown will be called (if it exists) before switching to the new State.

func (*StateManager) StartI

func (self *StateManager) StartI(args ...interface{})

StartI Start the given State. If a State is already running then State.shutDown will be called (if it exists) before switching to the new State.

func (*StateManager) States

func (self *StateManager) States() interface{}

States The object containing Phaser.States.

func (self *StateManager) Unlink(key string)

Unlink Nulls all State level Phaser properties, including a reference to Game.

func (*StateManager) UnlinkI

func (self *StateManager) UnlinkI(args ...interface{})

UnlinkI Nulls all State level Phaser properties, including a reference to Game.

func (*StateManager) Update

func (self *StateManager) Update()

Update empty description

func (*StateManager) UpdateI

func (self *StateManager) UpdateI(args ...interface{})

UpdateI empty description

type Strip

type Strip struct {
	*js.Object
}

Strip empty description

func NewStrip

func NewStrip(texture *Texture, width int, height int) *Strip

NewStrip empty description

func NewStripI

func NewStripI(args ...interface{}) *Strip

NewStripI empty description

func ToStrip

func ToStrip(jsStruct interface{}) *Strip

Strip Binding conversion method to Strip point

func (*Strip) AddChild

func (self *Strip) AddChild(child *DisplayObject) *DisplayObject

AddChild Adds a child to the container.

func (*Strip) AddChildAt

func (self *Strip) AddChildAt(child *DisplayObject, index int) *DisplayObject

AddChildAt Adds a child to the container at a specified index. If the index is out of bounds an error will be thrown

func (*Strip) AddChildAtI

func (self *Strip) AddChildAtI(args ...interface{}) *DisplayObject

AddChildAtI Adds a child to the container at a specified index. If the index is out of bounds an error will be thrown

func (*Strip) AddChildI

func (self *Strip) AddChildI(args ...interface{}) *DisplayObject

AddChildI Adds a child to the container.

func (*Strip) BlendMode

func (self *Strip) BlendMode() int

BlendMode The blend mode to be applied to the sprite. Set to PIXI.blendModes.NORMAL to remove any blend mode.

func (*Strip) CanvasPadding

func (self *Strip) CanvasPadding() int

CanvasPadding Triangles in canvas mode are automatically antialiased, use this value to force triangles to overlap a bit with each other.

func (*Strip) Children

func (self *Strip) Children() []DisplayObject

Children [read-only] The array of children of this container.

func (*Strip) Contains

func (self *Strip) Contains(child *DisplayObject) bool

Contains Determines whether the specified display object is a child of the DisplayObjectContainer instance or the instance itself.

func (*Strip) ContainsI

func (self *Strip) ContainsI(args ...interface{}) bool

ContainsI Determines whether the specified display object is a child of the DisplayObjectContainer instance or the instance itself.

func (*Strip) Dirty

func (self *Strip) Dirty() bool

Dirty Whether the strip is dirty or not

func (*Strip) GetBounds

func (self *Strip) GetBounds(matrix *Matrix) *Rectangle

GetBounds Returns the bounds of the mesh as a rectangle. The bounds calculation takes the worldTransform into account.

func (*Strip) GetBoundsI

func (self *Strip) GetBoundsI(args ...interface{}) *Rectangle

GetBoundsI Returns the bounds of the mesh as a rectangle. The bounds calculation takes the worldTransform into account.

func (*Strip) GetChildAt

func (self *Strip) GetChildAt(index int) *DisplayObject

GetChildAt Returns the child at the specified index

func (*Strip) GetChildAtI

func (self *Strip) GetChildAtI(args ...interface{}) *DisplayObject

GetChildAtI Returns the child at the specified index

func (*Strip) GetChildIndex

func (self *Strip) GetChildIndex(child *DisplayObject) int

GetChildIndex Returns the index position of a child DisplayObject instance

func (*Strip) GetChildIndexI

func (self *Strip) GetChildIndexI(args ...interface{}) int

GetChildIndexI Returns the index position of a child DisplayObject instance

func (*Strip) GetLocalBounds

func (self *Strip) GetLocalBounds() *Rectangle

GetLocalBounds Retrieves the non-global local bounds of the displayObjectContainer as a rectangle without any transformations. The calculation takes all visible children into consideration.

func (*Strip) GetLocalBoundsI

func (self *Strip) GetLocalBoundsI(args ...interface{}) *Rectangle

GetLocalBoundsI Retrieves the non-global local bounds of the displayObjectContainer as a rectangle without any transformations. The calculation takes all visible children into consideration.

func (*Strip) Height

func (self *Strip) Height() int

Height The height of the displayObjectContainer, setting this will actually modify the scale to achieve the value set

func (*Strip) IgnoreChildInput

func (self *Strip) IgnoreChildInput() bool

IgnoreChildInput If `ignoreChildInput` is `false` it will allow this objects _children_ to be considered as valid for Input events.

If this property is `true` then the children will _not_ be considered as valid for Input events.

Note that this property isn't recursive: only immediate children are influenced, it doesn't scan further down.

func (*Strip) OnTextureUpdate

func (self *Strip) OnTextureUpdate(event interface{})

OnTextureUpdate When the texture is updated, this event will fire to update the scale and frame

func (*Strip) OnTextureUpdateI

func (self *Strip) OnTextureUpdateI(args ...interface{})

OnTextureUpdateI When the texture is updated, this event will fire to update the scale and frame

func (*Strip) RemoveChild

func (self *Strip) RemoveChild(child *DisplayObject) *DisplayObject

RemoveChild Removes a child from the container.

func (*Strip) RemoveChildAt

func (self *Strip) RemoveChildAt(index int) *DisplayObject

RemoveChildAt Removes a child from the specified index position.

func (*Strip) RemoveChildAtI

func (self *Strip) RemoveChildAtI(args ...interface{}) *DisplayObject

RemoveChildAtI Removes a child from the specified index position.

func (*Strip) RemoveChildI

func (self *Strip) RemoveChildI(args ...interface{}) *DisplayObject

RemoveChildI Removes a child from the container.

func (*Strip) RemoveChildren

func (self *Strip) RemoveChildren(beginIndex int, endIndex int)

RemoveChildren Removes all children from this container that are within the begin and end indexes.

func (*Strip) RemoveChildrenI

func (self *Strip) RemoveChildrenI(args ...interface{})

RemoveChildrenI Removes all children from this container that are within the begin and end indexes.

func (*Strip) RenderStripFlat

func (self *Strip) RenderStripFlat(strip *Strip)

RenderStripFlat Renders a flat strip

func (*Strip) RenderStripFlatI

func (self *Strip) RenderStripFlatI(args ...interface{})

RenderStripFlatI Renders a flat strip

func (*Strip) SetBlendModeA

func (self *Strip) SetBlendModeA(member int)

SetBlendModeA The blend mode to be applied to the sprite. Set to PIXI.blendModes.NORMAL to remove any blend mode.

func (*Strip) SetCanvasPaddingA

func (self *Strip) SetCanvasPaddingA(member int)

SetCanvasPaddingA Triangles in canvas mode are automatically antialiased, use this value to force triangles to overlap a bit with each other.

func (*Strip) SetChildIndex

func (self *Strip) SetChildIndex(child *DisplayObject, index int)

SetChildIndex Changes the position of an existing child in the display object container

func (*Strip) SetChildIndexI

func (self *Strip) SetChildIndexI(args ...interface{})

SetChildIndexI Changes the position of an existing child in the display object container

func (*Strip) SetChildrenA

func (self *Strip) SetChildrenA(member []DisplayObject)

SetChildrenA [read-only] The array of children of this container.

func (*Strip) SetDirtyA

func (self *Strip) SetDirtyA(member bool)

SetDirtyA Whether the strip is dirty or not

func (*Strip) SetHeightA

func (self *Strip) SetHeightA(member int)

SetHeightA The height of the displayObjectContainer, setting this will actually modify the scale to achieve the value set

func (*Strip) SetIgnoreChildInputA

func (self *Strip) SetIgnoreChildInputA(member bool)

SetIgnoreChildInputA If `ignoreChildInput` is `false` it will allow this objects _children_ to be considered as valid for Input events.

If this property is `true` then the children will _not_ be considered as valid for Input events.

Note that this property isn't recursive: only immediate children are influenced, it doesn't scan further down.

func (*Strip) SetTextureA

func (self *Strip) SetTextureA(member *Texture)

SetTextureA The texture of the strip

func (*Strip) SetWidthA

func (self *Strip) SetWidthA(member int)

SetWidthA The width of the displayObjectContainer, setting this will actually modify the scale to achieve the value set

func (*Strip) SwapChildren

func (self *Strip) SwapChildren(child *DisplayObject, child2 *DisplayObject)

SwapChildren Swaps the position of 2 Display Objects within this container.

func (*Strip) SwapChildrenI

func (self *Strip) SwapChildrenI(args ...interface{})

SwapChildrenI Swaps the position of 2 Display Objects within this container.

func (*Strip) Texture

func (self *Strip) Texture() *Texture

Texture The texture of the strip

func (*Strip) Width

func (self *Strip) Width() int

Width The width of the displayObjectContainer, setting this will actually modify the scale to achieve the value set

type StripShader

type StripShader struct {
	*js.Object
}

StripShader empty description

func NewStripShader

func NewStripShader(gl *WebGLContext) *StripShader

NewStripShader empty description

func NewStripShaderI

func NewStripShaderI(args ...interface{}) *StripShader

NewStripShaderI empty description

func ToStripShader

func ToStripShader(jsStruct interface{}) *StripShader

StripShader Binding conversion method to StripShader point

func (*StripShader) Destroy

func (self *StripShader) Destroy()

Destroy Destroys the shader.

func (*StripShader) DestroyI

func (self *StripShader) DestroyI(args ...interface{})

DestroyI Destroys the shader.

func (*StripShader) FragmentSrc

func (self *StripShader) FragmentSrc() []interface{}

FragmentSrc The fragment shader.

func (*StripShader) Gl

func (self *StripShader) Gl() WebGLContext

Gl empty description

func (*StripShader) Init

func (self *StripShader) Init()

Init Initialises the shader.

func (*StripShader) InitI

func (self *StripShader) InitI(args ...interface{})

InitI Initialises the shader.

func (*StripShader) Program

func (self *StripShader) Program() interface{}

Program The WebGL program.

func (*StripShader) SetFragmentSrcA

func (self *StripShader) SetFragmentSrcA(member []interface{})

SetFragmentSrcA The fragment shader.

func (*StripShader) SetGlA

func (self *StripShader) SetGlA(member WebGLContext)

SetGlA empty description

func (*StripShader) SetProgramA

func (self *StripShader) SetProgramA(member interface{})

SetProgramA The WebGL program.

func (*StripShader) SetVertexSrcA

func (self *StripShader) SetVertexSrcA(member []interface{})

SetVertexSrcA The vertex shader.

func (*StripShader) VertexSrc

func (self *StripShader) VertexSrc() []interface{}

VertexSrc The vertex shader.

type Text

type Text struct {
	*js.Object
}

Text Create a new game object for displaying Text.

This uses a local hidden Canvas object and renders the type into it. It then makes a texture from this for rendering to the view. Because of this you can only display fonts that are currently loaded and available to the browser: fonts must be pre-loaded.

See {@link http://www.jordanm.co.uk/tinytype this compatibility table} for the available default fonts across mobile browsers.

func NewText

func NewText(game *Game, x int, y int, text string) *Text

NewText Create a new game object for displaying Text.

This uses a local hidden Canvas object and renders the type into it. It then makes a texture from this for rendering to the view. Because of this you can only display fonts that are currently loaded and available to the browser: fonts must be pre-loaded.

See {@link http://www.jordanm.co.uk/tinytype this compatibility table} for the available default fonts across mobile browsers.

func NewText10O

func NewText10O(game *Game, x int, y int, text string, style interface{}) *Text

NewText10O Create a new game object for displaying Text.

This uses a local hidden Canvas object and renders the type into it. It then makes a texture from this for rendering to the view. Because of this you can only display fonts that are currently loaded and available to the browser: fonts must be pre-loaded.

See {@link http://www.jordanm.co.uk/tinytype this compatibility table} for the available default fonts across mobile browsers.

func NewText11O

func NewText11O(game *Game, x int, y int, text string, style interface{}) *Text

NewText11O Create a new game object for displaying Text.

This uses a local hidden Canvas object and renders the type into it. It then makes a texture from this for rendering to the view. Because of this you can only display fonts that are currently loaded and available to the browser: fonts must be pre-loaded.

See {@link http://www.jordanm.co.uk/tinytype this compatibility table} for the available default fonts across mobile browsers.

func NewText12O

func NewText12O(game *Game, x int, y int, text string, style interface{}) *Text

NewText12O Create a new game object for displaying Text.

This uses a local hidden Canvas object and renders the type into it. It then makes a texture from this for rendering to the view. Because of this you can only display fonts that are currently loaded and available to the browser: fonts must be pre-loaded.

See {@link http://www.jordanm.co.uk/tinytype this compatibility table} for the available default fonts across mobile browsers.

func NewText13O

func NewText13O(game *Game, x int, y int, text string, style interface{}) *Text

NewText13O Create a new game object for displaying Text.

This uses a local hidden Canvas object and renders the type into it. It then makes a texture from this for rendering to the view. Because of this you can only display fonts that are currently loaded and available to the browser: fonts must be pre-loaded.

See {@link http://www.jordanm.co.uk/tinytype this compatibility table} for the available default fonts across mobile browsers.

func NewText14O

func NewText14O(game *Game, x int, y int, text string, style interface{}) *Text

NewText14O Create a new game object for displaying Text.

This uses a local hidden Canvas object and renders the type into it. It then makes a texture from this for rendering to the view. Because of this you can only display fonts that are currently loaded and available to the browser: fonts must be pre-loaded.

See {@link http://www.jordanm.co.uk/tinytype this compatibility table} for the available default fonts across mobile browsers.

func NewText15O

func NewText15O(game *Game, x int, y int, text string, style interface{}) *Text

NewText15O Create a new game object for displaying Text.

This uses a local hidden Canvas object and renders the type into it. It then makes a texture from this for rendering to the view. Because of this you can only display fonts that are currently loaded and available to the browser: fonts must be pre-loaded.

See {@link http://www.jordanm.co.uk/tinytype this compatibility table} for the available default fonts across mobile browsers.

func NewText16O

func NewText16O(game *Game, x int, y int, text string, style interface{}) *Text

NewText16O Create a new game object for displaying Text.

This uses a local hidden Canvas object and renders the type into it. It then makes a texture from this for rendering to the view. Because of this you can only display fonts that are currently loaded and available to the browser: fonts must be pre-loaded.

See {@link http://www.jordanm.co.uk/tinytype this compatibility table} for the available default fonts across mobile browsers.

func NewText17O

func NewText17O(game *Game, x int, y int, text string, style interface{}) *Text

NewText17O Create a new game object for displaying Text.

This uses a local hidden Canvas object and renders the type into it. It then makes a texture from this for rendering to the view. Because of this you can only display fonts that are currently loaded and available to the browser: fonts must be pre-loaded.

See {@link http://www.jordanm.co.uk/tinytype this compatibility table} for the available default fonts across mobile browsers.

func NewText1O

func NewText1O(game *Game, x int, y int, text string, style interface{}) *Text

NewText1O Create a new game object for displaying Text.

This uses a local hidden Canvas object and renders the type into it. It then makes a texture from this for rendering to the view. Because of this you can only display fonts that are currently loaded and available to the browser: fonts must be pre-loaded.

See {@link http://www.jordanm.co.uk/tinytype this compatibility table} for the available default fonts across mobile browsers.

func NewText2O

func NewText2O(game *Game, x int, y int, text string, style interface{}) *Text

NewText2O Create a new game object for displaying Text.

This uses a local hidden Canvas object and renders the type into it. It then makes a texture from this for rendering to the view. Because of this you can only display fonts that are currently loaded and available to the browser: fonts must be pre-loaded.

See {@link http://www.jordanm.co.uk/tinytype this compatibility table} for the available default fonts across mobile browsers.

func NewText3O

func NewText3O(game *Game, x int, y int, text string, style interface{}) *Text

NewText3O Create a new game object for displaying Text.

This uses a local hidden Canvas object and renders the type into it. It then makes a texture from this for rendering to the view. Because of this you can only display fonts that are currently loaded and available to the browser: fonts must be pre-loaded.

See {@link http://www.jordanm.co.uk/tinytype this compatibility table} for the available default fonts across mobile browsers.

func NewText4O

func NewText4O(game *Game, x int, y int, text string, style interface{}) *Text

NewText4O Create a new game object for displaying Text.

This uses a local hidden Canvas object and renders the type into it. It then makes a texture from this for rendering to the view. Because of this you can only display fonts that are currently loaded and available to the browser: fonts must be pre-loaded.

See {@link http://www.jordanm.co.uk/tinytype this compatibility table} for the available default fonts across mobile browsers.

func NewText5O

func NewText5O(game *Game, x int, y int, text string, style interface{}) *Text

NewText5O Create a new game object for displaying Text.

This uses a local hidden Canvas object and renders the type into it. It then makes a texture from this for rendering to the view. Because of this you can only display fonts that are currently loaded and available to the browser: fonts must be pre-loaded.

See {@link http://www.jordanm.co.uk/tinytype this compatibility table} for the available default fonts across mobile browsers.

func NewText6O

func NewText6O(game *Game, x int, y int, text string, style interface{}) *Text

NewText6O Create a new game object for displaying Text.

This uses a local hidden Canvas object and renders the type into it. It then makes a texture from this for rendering to the view. Because of this you can only display fonts that are currently loaded and available to the browser: fonts must be pre-loaded.

See {@link http://www.jordanm.co.uk/tinytype this compatibility table} for the available default fonts across mobile browsers.

func NewText7O

func NewText7O(game *Game, x int, y int, text string, style interface{}) *Text

NewText7O Create a new game object for displaying Text.

This uses a local hidden Canvas object and renders the type into it. It then makes a texture from this for rendering to the view. Because of this you can only display fonts that are currently loaded and available to the browser: fonts must be pre-loaded.

See {@link http://www.jordanm.co.uk/tinytype this compatibility table} for the available default fonts across mobile browsers.

func NewText8O

func NewText8O(game *Game, x int, y int, text string, style interface{}) *Text

NewText8O Create a new game object for displaying Text.

This uses a local hidden Canvas object and renders the type into it. It then makes a texture from this for rendering to the view. Because of this you can only display fonts that are currently loaded and available to the browser: fonts must be pre-loaded.

See {@link http://www.jordanm.co.uk/tinytype this compatibility table} for the available default fonts across mobile browsers.

func NewText9O

func NewText9O(game *Game, x int, y int, text string, style interface{}) *Text

NewText9O Create a new game object for displaying Text.

This uses a local hidden Canvas object and renders the type into it. It then makes a texture from this for rendering to the view. Because of this you can only display fonts that are currently loaded and available to the browser: fonts must be pre-loaded.

See {@link http://www.jordanm.co.uk/tinytype this compatibility table} for the available default fonts across mobile browsers.

func NewTextI

func NewTextI(args ...interface{}) *Text

NewTextI Create a new game object for displaying Text.

This uses a local hidden Canvas object and renders the type into it. It then makes a texture from this for rendering to the view. Because of this you can only display fonts that are currently loaded and available to the browser: fonts must be pre-loaded.

See {@link http://www.jordanm.co.uk/tinytype this compatibility table} for the available default fonts across mobile browsers.

func ToText

func ToText(jsStruct interface{}) *Text

Text Binding conversion method to Text point

func (*Text) AddChild

func (self *Text) AddChild(child *DisplayObject) *DisplayObject

AddChild Adds a child to the container.

func (*Text) AddChildAt

func (self *Text) AddChildAt(child *DisplayObject, index int) *DisplayObject

AddChildAt Adds a child to the container at a specified index. If the index is out of bounds an error will be thrown

func (*Text) AddChildAtI

func (self *Text) AddChildAtI(args ...interface{}) *DisplayObject

AddChildAtI Adds a child to the container at a specified index. If the index is out of bounds an error will be thrown

func (*Text) AddChildI

func (self *Text) AddChildI(args ...interface{}) *DisplayObject

AddChildI Adds a child to the container.

func (*Text) AddColor

func (self *Text) AddColor(color string, position int) *Text

AddColor Set specific colors for certain characters within the Text.

It works by taking a color value, which is a typical HTML string such as `#ff0000` or `rgb(255,0,0)` and a position. The position value is the index of the character in the Text string to start applying this color to. Once set the color remains in use until either another color or the end of the string is encountered. For example if the Text was `Photon Storm` and you did `Text.addColor('#ffff00', 6)` it would color in the word `Storm` in yellow.

If you wish to change the stroke color see addStrokeColor instead.

func (*Text) AddColorI

func (self *Text) AddColorI(args ...interface{}) *Text

AddColorI Set specific colors for certain characters within the Text.

It works by taking a color value, which is a typical HTML string such as `#ff0000` or `rgb(255,0,0)` and a position. The position value is the index of the character in the Text string to start applying this color to. Once set the color remains in use until either another color or the end of the string is encountered. For example if the Text was `Photon Storm` and you did `Text.addColor('#ffff00', 6)` it would color in the word `Storm` in yellow.

If you wish to change the stroke color see addStrokeColor instead.

func (*Text) AddFontStyle

func (self *Text) AddFontStyle(style string, position int) *Text

AddFontStyle Set specific font styles for certain characters within the Text.

It works by taking a font style value, which is a typical string such as `normal`, `italic` or `oblique`. The position value is the index of the character in the Text string to start applying this font style to. Once set the font style remains in use until either another font style or the end of the string is encountered. For example if the Text was `Photon Storm` and you did `Text.addFontStyle('italic', 6)` it would font style in the word `Storm` in italic.

If you wish to change the text font weight see addFontWeight instead.

func (*Text) AddFontStyleI

func (self *Text) AddFontStyleI(args ...interface{}) *Text

AddFontStyleI Set specific font styles for certain characters within the Text.

It works by taking a font style value, which is a typical string such as `normal`, `italic` or `oblique`. The position value is the index of the character in the Text string to start applying this font style to. Once set the font style remains in use until either another font style or the end of the string is encountered. For example if the Text was `Photon Storm` and you did `Text.addFontStyle('italic', 6)` it would font style in the word `Storm` in italic.

If you wish to change the text font weight see addFontWeight instead.

func (*Text) AddFontWeight

func (self *Text) AddFontWeight(style string, position int) *Text

AddFontWeight Set specific font weights for certain characters within the Text.

It works by taking a font weight value, which is a typical string such as `normal`, `bold`, `bolder`, etc. The position value is the index of the character in the Text string to start applying this font weight to. Once set the font weight remains in use until either another font weight or the end of the string is encountered. For example if the Text was `Photon Storm` and you did `Text.addFontWeight('bold', 6)` it would font weight in the word `Storm` in bold.

If you wish to change the text font style see addFontStyle instead.

func (*Text) AddFontWeightI

func (self *Text) AddFontWeightI(args ...interface{}) *Text

AddFontWeightI Set specific font weights for certain characters within the Text.

It works by taking a font weight value, which is a typical string such as `normal`, `bold`, `bolder`, etc. The position value is the index of the character in the Text string to start applying this font weight to. Once set the font weight remains in use until either another font weight or the end of the string is encountered. For example if the Text was `Photon Storm` and you did `Text.addFontWeight('bold', 6)` it would font weight in the word `Storm` in bold.

If you wish to change the text font style see addFontStyle instead.

func (*Text) AddStrokeColor

func (self *Text) AddStrokeColor(color string, position int) *Text

AddStrokeColor Set specific stroke colors for certain characters within the Text.

It works by taking a color value, which is a typical HTML string such as `#ff0000` or `rgb(255,0,0)` and a position. The position value is the index of the character in the Text string to start applying this color to. Once set the color remains in use until either another color or the end of the string is encountered. For example if the Text was `Photon Storm` and you did `Text.addColor('#ffff00', 6)` it would color in the word `Storm` in yellow.

This has no effect if stroke is disabled or has a thickness of 0.

If you wish to change the text fill color see addColor instead.

func (*Text) AddStrokeColorI

func (self *Text) AddStrokeColorI(args ...interface{}) *Text

AddStrokeColorI Set specific stroke colors for certain characters within the Text.

It works by taking a color value, which is a typical HTML string such as `#ff0000` or `rgb(255,0,0)` and a position. The position value is the index of the character in the Text string to start applying this color to. Once set the color remains in use until either another color or the end of the string is encountered. For example if the Text was `Photon Storm` and you did `Text.addColor('#ffff00', 6)` it would color in the word `Storm` in yellow.

This has no effect if stroke is disabled or has a thickness of 0.

If you wish to change the text fill color see addColor instead.

func (*Text) AdvancedWordWrap

func (self *Text) AdvancedWordWrap(text string)

AdvancedWordWrap Advanced wrapping algorithm that will wrap words as the line grows longer than its horizontal bounds. White space is condensed (e.g., consecutive spaces are replaced with one). Lines are trimmed of white space before processing. Throws an error if the user was smart enough to specify a wordWrapWidth less than a single character.

func (*Text) AdvancedWordWrapI

func (self *Text) AdvancedWordWrapI(args ...interface{})

AdvancedWordWrapI Advanced wrapping algorithm that will wrap words as the line grows longer than its horizontal bounds. White space is condensed (e.g., consecutive spaces are replaced with one). Lines are trimmed of white space before processing. Throws an error if the user was smart enough to specify a wordWrapWidth less than a single character.

func (*Text) Align

func (self *Text) Align() string

Align Controls the horizontal alignment for multiline text. Can be: 'left', 'center' or 'right'. Does not affect single lines of text. For that please see `setTextBounds`.

func (*Text) AlignIn

func (self *Text) AlignIn(container interface{}) interface{}

AlignIn Aligns this Game Object within another Game Object, or Rectangle, known as the 'container', to one of 9 possible positions.

The container must be a Game Object, or Phaser.Rectangle object. This can include properties such as `World.bounds` or `Camera.view`, for aligning Game Objects within the world and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText, TileSprites or Buttons.

Please note that aligning a Sprite to another Game Object does **not** make it a child of the container. It simply modifies its position coordinates so it aligns with it.

The position constants you can use are:

`Phaser.TOP_LEFT`, `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

The Game Objects are placed in such a way that their _bounds_ align with the container, taking into consideration rotation, scale and the anchor property. This allows you to neatly align Game Objects, irrespective of their position value.

The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final aligned position of the Game Object. For example:

`sprite.alignIn(background, Phaser.BOTTOM_RIGHT, -20, -20)`

Would align the `sprite` to the bottom-right, but moved 20 pixels in from the corner. Think of the offsets as applying an adjustment to the containers bounds before the alignment takes place. So providing a negative offset will 'shrink' the container bounds by that amount, and providing a positive one expands it.

func (*Text) AlignIn1O

func (self *Text) AlignIn1O(container interface{}, position int) interface{}

AlignIn1O Aligns this Game Object within another Game Object, or Rectangle, known as the 'container', to one of 9 possible positions.

The container must be a Game Object, or Phaser.Rectangle object. This can include properties such as `World.bounds` or `Camera.view`, for aligning Game Objects within the world and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText, TileSprites or Buttons.

Please note that aligning a Sprite to another Game Object does **not** make it a child of the container. It simply modifies its position coordinates so it aligns with it.

The position constants you can use are:

`Phaser.TOP_LEFT`, `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

The Game Objects are placed in such a way that their _bounds_ align with the container, taking into consideration rotation, scale and the anchor property. This allows you to neatly align Game Objects, irrespective of their position value.

The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final aligned position of the Game Object. For example:

`sprite.alignIn(background, Phaser.BOTTOM_RIGHT, -20, -20)`

Would align the `sprite` to the bottom-right, but moved 20 pixels in from the corner. Think of the offsets as applying an adjustment to the containers bounds before the alignment takes place. So providing a negative offset will 'shrink' the container bounds by that amount, and providing a positive one expands it.

func (*Text) AlignIn2O

func (self *Text) AlignIn2O(container interface{}, position int, offsetX int) interface{}

AlignIn2O Aligns this Game Object within another Game Object, or Rectangle, known as the 'container', to one of 9 possible positions.

The container must be a Game Object, or Phaser.Rectangle object. This can include properties such as `World.bounds` or `Camera.view`, for aligning Game Objects within the world and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText, TileSprites or Buttons.

Please note that aligning a Sprite to another Game Object does **not** make it a child of the container. It simply modifies its position coordinates so it aligns with it.

The position constants you can use are:

`Phaser.TOP_LEFT`, `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

The Game Objects are placed in such a way that their _bounds_ align with the container, taking into consideration rotation, scale and the anchor property. This allows you to neatly align Game Objects, irrespective of their position value.

The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final aligned position of the Game Object. For example:

`sprite.alignIn(background, Phaser.BOTTOM_RIGHT, -20, -20)`

Would align the `sprite` to the bottom-right, but moved 20 pixels in from the corner. Think of the offsets as applying an adjustment to the containers bounds before the alignment takes place. So providing a negative offset will 'shrink' the container bounds by that amount, and providing a positive one expands it.

func (*Text) AlignIn3O

func (self *Text) AlignIn3O(container interface{}, position int, offsetX int, offsetY int) interface{}

AlignIn3O Aligns this Game Object within another Game Object, or Rectangle, known as the 'container', to one of 9 possible positions.

The container must be a Game Object, or Phaser.Rectangle object. This can include properties such as `World.bounds` or `Camera.view`, for aligning Game Objects within the world and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText, TileSprites or Buttons.

Please note that aligning a Sprite to another Game Object does **not** make it a child of the container. It simply modifies its position coordinates so it aligns with it.

The position constants you can use are:

`Phaser.TOP_LEFT`, `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

The Game Objects are placed in such a way that their _bounds_ align with the container, taking into consideration rotation, scale and the anchor property. This allows you to neatly align Game Objects, irrespective of their position value.

The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final aligned position of the Game Object. For example:

`sprite.alignIn(background, Phaser.BOTTOM_RIGHT, -20, -20)`

Would align the `sprite` to the bottom-right, but moved 20 pixels in from the corner. Think of the offsets as applying an adjustment to the containers bounds before the alignment takes place. So providing a negative offset will 'shrink' the container bounds by that amount, and providing a positive one expands it.

func (*Text) AlignInI

func (self *Text) AlignInI(args ...interface{}) interface{}

AlignInI Aligns this Game Object within another Game Object, or Rectangle, known as the 'container', to one of 9 possible positions.

The container must be a Game Object, or Phaser.Rectangle object. This can include properties such as `World.bounds` or `Camera.view`, for aligning Game Objects within the world and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText, TileSprites or Buttons.

Please note that aligning a Sprite to another Game Object does **not** make it a child of the container. It simply modifies its position coordinates so it aligns with it.

The position constants you can use are:

`Phaser.TOP_LEFT`, `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

The Game Objects are placed in such a way that their _bounds_ align with the container, taking into consideration rotation, scale and the anchor property. This allows you to neatly align Game Objects, irrespective of their position value.

The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final aligned position of the Game Object. For example:

`sprite.alignIn(background, Phaser.BOTTOM_RIGHT, -20, -20)`

Would align the `sprite` to the bottom-right, but moved 20 pixels in from the corner. Think of the offsets as applying an adjustment to the containers bounds before the alignment takes place. So providing a negative offset will 'shrink' the container bounds by that amount, and providing a positive one expands it.

func (*Text) AlignTo

func (self *Text) AlignTo(parent interface{}) interface{}

AlignTo Aligns this Game Object to the side of another Game Object, or Rectangle, known as the 'parent', in one of 11 possible positions.

The parent must be a Game Object, or Phaser.Rectangle object. This can include properties such as `World.bounds` or `Camera.view`, for aligning Game Objects within the world and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText, TileSprites or Buttons.

Please note that aligning a Sprite to another Game Object does **not** make it a child of the parent. It simply modifies its position coordinates so it aligns with it.

The position constants you can use are:

`Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_TOP`, `Phaser.LEFT_CENTER`, `Phaser.LEFT_BOTTOM`, `Phaser.RIGHT_TOP`, `Phaser.RIGHT_CENTER`, `Phaser.RIGHT_BOTTOM`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

The Game Objects are placed in such a way that their _bounds_ align with the parent, taking into consideration rotation, scale and the anchor property. This allows you to neatly align Game Objects, irrespective of their position value.

The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final aligned position of the Game Object. For example:

`sprite.alignTo(background, Phaser.BOTTOM_RIGHT, -20, -20)`

Would align the `sprite` to the bottom-right, but moved 20 pixels in from the corner. Think of the offsets as applying an adjustment to the parents bounds before the alignment takes place. So providing a negative offset will 'shrink' the parent bounds by that amount, and providing a positive one expands it.

func (*Text) AlignTo1O

func (self *Text) AlignTo1O(parent interface{}, position int) interface{}

AlignTo1O Aligns this Game Object to the side of another Game Object, or Rectangle, known as the 'parent', in one of 11 possible positions.

The parent must be a Game Object, or Phaser.Rectangle object. This can include properties such as `World.bounds` or `Camera.view`, for aligning Game Objects within the world and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText, TileSprites or Buttons.

Please note that aligning a Sprite to another Game Object does **not** make it a child of the parent. It simply modifies its position coordinates so it aligns with it.

The position constants you can use are:

`Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_TOP`, `Phaser.LEFT_CENTER`, `Phaser.LEFT_BOTTOM`, `Phaser.RIGHT_TOP`, `Phaser.RIGHT_CENTER`, `Phaser.RIGHT_BOTTOM`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

The Game Objects are placed in such a way that their _bounds_ align with the parent, taking into consideration rotation, scale and the anchor property. This allows you to neatly align Game Objects, irrespective of their position value.

The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final aligned position of the Game Object. For example:

`sprite.alignTo(background, Phaser.BOTTOM_RIGHT, -20, -20)`

Would align the `sprite` to the bottom-right, but moved 20 pixels in from the corner. Think of the offsets as applying an adjustment to the parents bounds before the alignment takes place. So providing a negative offset will 'shrink' the parent bounds by that amount, and providing a positive one expands it.

func (*Text) AlignTo2O

func (self *Text) AlignTo2O(parent interface{}, position int, offsetX int) interface{}

AlignTo2O Aligns this Game Object to the side of another Game Object, or Rectangle, known as the 'parent', in one of 11 possible positions.

The parent must be a Game Object, or Phaser.Rectangle object. This can include properties such as `World.bounds` or `Camera.view`, for aligning Game Objects within the world and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText, TileSprites or Buttons.

Please note that aligning a Sprite to another Game Object does **not** make it a child of the parent. It simply modifies its position coordinates so it aligns with it.

The position constants you can use are:

`Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_TOP`, `Phaser.LEFT_CENTER`, `Phaser.LEFT_BOTTOM`, `Phaser.RIGHT_TOP`, `Phaser.RIGHT_CENTER`, `Phaser.RIGHT_BOTTOM`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

The Game Objects are placed in such a way that their _bounds_ align with the parent, taking into consideration rotation, scale and the anchor property. This allows you to neatly align Game Objects, irrespective of their position value.

The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final aligned position of the Game Object. For example:

`sprite.alignTo(background, Phaser.BOTTOM_RIGHT, -20, -20)`

Would align the `sprite` to the bottom-right, but moved 20 pixels in from the corner. Think of the offsets as applying an adjustment to the parents bounds before the alignment takes place. So providing a negative offset will 'shrink' the parent bounds by that amount, and providing a positive one expands it.

func (*Text) AlignTo3O

func (self *Text) AlignTo3O(parent interface{}, position int, offsetX int, offsetY int) interface{}

AlignTo3O Aligns this Game Object to the side of another Game Object, or Rectangle, known as the 'parent', in one of 11 possible positions.

The parent must be a Game Object, or Phaser.Rectangle object. This can include properties such as `World.bounds` or `Camera.view`, for aligning Game Objects within the world and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText, TileSprites or Buttons.

Please note that aligning a Sprite to another Game Object does **not** make it a child of the parent. It simply modifies its position coordinates so it aligns with it.

The position constants you can use are:

`Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_TOP`, `Phaser.LEFT_CENTER`, `Phaser.LEFT_BOTTOM`, `Phaser.RIGHT_TOP`, `Phaser.RIGHT_CENTER`, `Phaser.RIGHT_BOTTOM`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

The Game Objects are placed in such a way that their _bounds_ align with the parent, taking into consideration rotation, scale and the anchor property. This allows you to neatly align Game Objects, irrespective of their position value.

The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final aligned position of the Game Object. For example:

`sprite.alignTo(background, Phaser.BOTTOM_RIGHT, -20, -20)`

Would align the `sprite` to the bottom-right, but moved 20 pixels in from the corner. Think of the offsets as applying an adjustment to the parents bounds before the alignment takes place. So providing a negative offset will 'shrink' the parent bounds by that amount, and providing a positive one expands it.

func (*Text) AlignToI

func (self *Text) AlignToI(args ...interface{}) interface{}

AlignToI Aligns this Game Object to the side of another Game Object, or Rectangle, known as the 'parent', in one of 11 possible positions.

The parent must be a Game Object, or Phaser.Rectangle object. This can include properties such as `World.bounds` or `Camera.view`, for aligning Game Objects within the world and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText, TileSprites or Buttons.

Please note that aligning a Sprite to another Game Object does **not** make it a child of the parent. It simply modifies its position coordinates so it aligns with it.

The position constants you can use are:

`Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_TOP`, `Phaser.LEFT_CENTER`, `Phaser.LEFT_BOTTOM`, `Phaser.RIGHT_TOP`, `Phaser.RIGHT_CENTER`, `Phaser.RIGHT_BOTTOM`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

The Game Objects are placed in such a way that their _bounds_ align with the parent, taking into consideration rotation, scale and the anchor property. This allows you to neatly align Game Objects, irrespective of their position value.

The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final aligned position of the Game Object. For example:

`sprite.alignTo(background, Phaser.BOTTOM_RIGHT, -20, -20)`

Would align the `sprite` to the bottom-right, but moved 20 pixels in from the corner. Think of the offsets as applying an adjustment to the parents bounds before the alignment takes place. So providing a negative offset will 'shrink' the parent bounds by that amount, and providing a positive one expands it.

func (*Text) Alive

func (self *Text) Alive() bool

Alive A useful flag to control if the Game Object is alive or dead.

This is set automatically by the Health components `damage` method should the object run out of health. Or you can toggle it via your game code.

This property is mostly just provided to be used by your game - it doesn't effect rendering or logic updates. However you can use `Group.getFirstAlive` in conjunction with this property for fast object pooling and recycling.

func (*Text) Anchor

func (self *Text) Anchor() *Point

Anchor The anchor sets the origin point of the texture.

The default is 0,0 this means the texture's origin is the top left

Setting than anchor to 0.5,0.5 means the textures origin is centered

Setting the anchor to 1,1 would mean the textures origin points will be the bottom right corner

func (*Text) Angle

func (self *Text) Angle() int

Angle The angle property is the rotation of the Game Object in *degrees* from its original orientation.

Values from 0 to 180 represent clockwise rotation; values from 0 to -180 represent counterclockwise rotation.

Values outside this range are added to or subtracted from 360 to obtain a value within the range. For example, the statement player.angle = 450 is the same as player.angle = 90.

If you wish to work in radians instead of degrees you can use the property `rotation` instead. Working in radians is slightly faster as it doesn't have to perform any calculations.

func (*Text) Animations

func (self *Text) Animations() *AnimationManager

Animations If the Game Object is enabled for animation (such as a Phaser.Sprite) this is a reference to its AnimationManager instance. Through it you can create, play, pause and stop animations.

func (*Text) AutoCull

func (self *Text) AutoCull() bool

AutoCull A Game Object with `autoCull` set to true will check its bounds against the World Camera every frame. If it is not intersecting the Camera bounds at any point then it has its `renderable` property set to `false`. This keeps the Game Object alive and still processing updates, but forces it to skip the render step entirely.

This is a relatively expensive operation, especially if enabled on hundreds of Game Objects. So enable it only if you know it's required, or you have tested performance and find it acceptable.

func (*Text) AutoRound

func (self *Text) AutoRound() bool

AutoRound Should the linePositionX and Y values be automatically rounded before rendering the Text? You may wish to enable this if you want to remove the effect of sub-pixel aliasing from text.

func (*Text) BasicWordWrap

func (self *Text) BasicWordWrap(text string)

BasicWordWrap Greedy wrapping algorithm that will wrap words as the line grows longer than its horizontal bounds.

func (*Text) BasicWordWrapI

func (self *Text) BasicWordWrapI(args ...interface{})

BasicWordWrapI Greedy wrapping algorithm that will wrap words as the line grows longer than its horizontal bounds.

func (*Text) BlendMode

func (self *Text) BlendMode() int

BlendMode The blend mode to be applied to the sprite. Set to PIXI.blendModes.NORMAL to remove any blend mode.

Warning: You cannot have a blend mode and a filter active on the same Sprite. Doing so will render the sprite invisible.

func (*Text) Body

func (self *Text) Body() interface{}

Body `body` is the Game Objects physics body. Once a Game Object is enabled for physics you access all associated properties and methods via it.

By default Game Objects won't add themselves to any physics system and their `body` property will be `null`.

To enable this Game Object for physics you need to call `game.physics.enable(object, system)` where `object` is this object and `system` is the Physics system you are using. If none is given it defaults to `Phaser.Physics.Arcade`.

You can alternatively call `game.physics.arcade.enable(object)`, or add this Game Object to a physics enabled Group.

Important: Enabling a Game Object for P2 or Ninja physics will automatically set its `anchor` property to 0.5, so the physics body is centered on the Game Object.

If you need a different result then adjust or re-create the Body shape offsets manually or reset the anchor after enabling physics.

func (*Text) Bottom

func (self *Text) Bottom() int

Bottom The sum of the y and height properties. This is the same as `y + height - offsetY`.

func (*Text) BoundsAlignH

func (self *Text) BoundsAlignH() string

BoundsAlignH Horizontal alignment of the text within the `textBounds`. Can be: 'left', 'center' or 'right'.

func (*Text) BoundsAlignV

func (self *Text) BoundsAlignV() string

BoundsAlignV Vertical alignment of the text within the `textBounds`. Can be: 'top', 'middle' or 'bottom'.

func (*Text) BringToTop

func (self *Text) BringToTop() *DisplayObject

BringToTop Brings this Game Object to the top of its parents display list. Visually this means it will render over the top of any old child in the same Group.

If this Game Object hasn't been added to a custom Group then this method will bring it to the top of the Game World, because the World is the root Group from which all Game Objects descend.

func (*Text) BringToTopI

func (self *Text) BringToTopI(args ...interface{}) *DisplayObject

BringToTopI Brings this Game Object to the top of its parents display list. Visually this means it will render over the top of any old child in the same Group.

If this Game Object hasn't been added to a custom Group then this method will bring it to the top of the Game World, because the World is the root Group from which all Game Objects descend.

func (*Text) CameraOffset

func (self *Text) CameraOffset() *Point

CameraOffset The x/y coordinate offset applied to the top-left of the camera that this Game Object will be drawn at if `fixedToCamera` is true.

The values are relative to the top-left of the camera view and in addition to any parent of the Game Object on the display list.

func (*Text) Canvas

func (self *Text) Canvas() dom.HTMLCanvasElement

Canvas The canvas element that the text is rendered.

func (*Text) CenterX

func (self *Text) CenterX() int

CenterX The center x coordinate of the Game Object. This is the same as `(x - offsetX) + (width / 2)`.

func (*Text) CenterY

func (self *Text) CenterY() int

CenterY The center y coordinate of the Game Object. This is the same as `(y - offsetY) + (height / 2)`.

func (*Text) CheckTransform

func (self *Text) CheckTransform(wt *Matrix)

CheckTransform Adjust scaling limits, if set, to this Game Object.

func (*Text) CheckTransformI

func (self *Text) CheckTransformI(args ...interface{})

CheckTransformI Adjust scaling limits, if set, to this Game Object.

func (*Text) CheckWorldBounds

func (self *Text) CheckWorldBounds() bool

CheckWorldBounds If this is set to `true` the Game Object checks if it is within the World bounds each frame.

When it is no longer intersecting the world bounds it dispatches the `onOutOfBounds` event.

If it was *previously* out of bounds but is now intersecting the world bounds again it dispatches the `onEnterBounds` event.

It also optionally kills the Game Object if `outOfBoundsKill` is `true`.

When `checkWorldBounds` is enabled it forces the Game Object to calculate its full bounds every frame.

This is a relatively expensive operation, especially if enabled on hundreds of Game Objects. So enable it only if you know it's required, or you have tested performance and find it acceptable.

func (*Text) Children

func (self *Text) Children() []DisplayObject

Children [read-only] The array of children of this container.

func (*Text) ClearColors

func (self *Text) ClearColors() *Text

ClearColors Clears any text fill or stroke colors that were set by `addColor` or `addStrokeColor`.

func (*Text) ClearColorsI

func (self *Text) ClearColorsI(args ...interface{}) *Text

ClearColorsI Clears any text fill or stroke colors that were set by `addColor` or `addStrokeColor`.

func (*Text) ClearFontValues

func (self *Text) ClearFontValues() *Text

ClearFontValues Clears any text styles or weights font that were set by `addFontStyle` or `addFontWeight`.

func (*Text) ClearFontValuesI

func (self *Text) ClearFontValuesI(args ...interface{}) *Text

ClearFontValuesI Clears any text styles or weights font that were set by `addFontStyle` or `addFontWeight`.

func (*Text) Colors

func (self *Text) Colors() []interface{}

Colors An array of the color values as specified by {@link Phaser.Text#addColor addColor}.

func (*Text) Components

func (self *Text) Components() interface{}

Components The components this Game Object has installed.

func (*Text) ComponentsToFont

func (self *Text) ComponentsToFont(components interface{})

ComponentsToFont Converts individual font components (see `fontToComponents`) to a short CSS font string.

func (*Text) ComponentsToFontI

func (self *Text) ComponentsToFontI(args ...interface{})

ComponentsToFontI Converts individual font components (see `fontToComponents`) to a short CSS font string.

func (*Text) Contains

func (self *Text) Contains(child *DisplayObject) bool

Contains Determines whether the specified display object is a child of the DisplayObjectContainer instance or the instance itself.

func (*Text) ContainsI

func (self *Text) ContainsI(args ...interface{}) bool

ContainsI Determines whether the specified display object is a child of the DisplayObjectContainer instance or the instance itself.

func (*Text) Context

func (self *Text) Context() dom.HTMLCanvasElement

Context The context of the canvas element that the text is rendered to.

func (*Text) Crop

func (self *Text) Crop(rect *Rectangle)

Crop Crop allows you to crop the texture being used to display this Game Object. Setting a crop rectangle modifies the core texture frame. The Game Object width and height properties will be adjusted accordingly.

Cropping takes place from the top-left and can be modified in real-time either by providing an updated rectangle object to this method, or by modifying `cropRect` property directly and then calling `updateCrop`.

The rectangle object given to this method can be either a `Phaser.Rectangle` or any other object so long as it has public `x`, `y`, `width`, `height`, `right` and `bottom` properties.

A reference to the rectangle is stored in `cropRect` unless the `copy` parameter is `true`, in which case the values are duplicated to a local object.

func (*Text) Crop1O

func (self *Text) Crop1O(rect *Rectangle, copy bool)

Crop1O Crop allows you to crop the texture being used to display this Game Object. Setting a crop rectangle modifies the core texture frame. The Game Object width and height properties will be adjusted accordingly.

Cropping takes place from the top-left and can be modified in real-time either by providing an updated rectangle object to this method, or by modifying `cropRect` property directly and then calling `updateCrop`.

The rectangle object given to this method can be either a `Phaser.Rectangle` or any other object so long as it has public `x`, `y`, `width`, `height`, `right` and `bottom` properties.

A reference to the rectangle is stored in `cropRect` unless the `copy` parameter is `true`, in which case the values are duplicated to a local object.

func (*Text) CropI

func (self *Text) CropI(args ...interface{})

CropI Crop allows you to crop the texture being used to display this Game Object. Setting a crop rectangle modifies the core texture frame. The Game Object width and height properties will be adjusted accordingly.

Cropping takes place from the top-left and can be modified in real-time either by providing an updated rectangle object to this method, or by modifying `cropRect` property directly and then calling `updateCrop`.

The rectangle object given to this method can be either a `Phaser.Rectangle` or any other object so long as it has public `x`, `y`, `width`, `height`, `right` and `bottom` properties.

A reference to the rectangle is stored in `cropRect` unless the `copy` parameter is `true`, in which case the values are duplicated to a local object.

func (*Text) CropRect

func (self *Text) CropRect() *Rectangle

CropRect The Rectangle used to crop the texture this Game Object uses. Set this property via `crop`. If you modify this property directly you must call `updateCrop` in order to have the change take effect.

func (*Text) CssFont

func (self *Text) CssFont() string

CssFont Change the font used.

This is equivalent of the `font` property specified to {@link Phaser.Text#setStyle setStyle}, except that unlike using `setStyle` this will not change any current font fill/color settings.

The CSS font string can also be individually altered with the `font`, `fontSize`, `fontWeight`, `fontStyle`, and `fontVariant` properties.

func (*Text) Damage

func (self *Text) Damage() interface{}

Damage Damages the Game Object. This removes the given amount of health from the `health` property.

If health is taken below or is equal to zero then the `kill` method is called.

func (*Text) Data

func (self *Text) Data() interface{}

Data An empty Object that belongs to this Game Object. This value isn't ever used internally by Phaser, but may be used by your own code, or by Phaser Plugins, to store data that needs to be associated with the Game Object, without polluting the Game Object directly.

func (*Text) Debug

func (self *Text) Debug() bool

Debug A debug flag designed for use with `Game.enableStep`.

func (*Text) DeltaX

func (self *Text) DeltaX() int

DeltaX Returns the delta x value. The difference between world.x now and in the previous frame.

The value will be positive if the Game Object has moved to the right or negative if to the left.

func (*Text) DeltaY

func (self *Text) DeltaY() int

DeltaY Returns the delta y value. The difference between world.y now and in the previous frame.

The value will be positive if the Game Object has moved down or negative if up.

func (*Text) DeltaZ

func (self *Text) DeltaZ() int

DeltaZ Returns the delta z value. The difference between rotation now and in the previous frame. The delta value.

func (*Text) Destroy

func (self *Text) Destroy()

Destroy Destroy this Text object, removing it from the group it belongs to.

func (*Text) Destroy1O

func (self *Text) Destroy1O(destroyChildren bool)

Destroy1O Destroy this Text object, removing it from the group it belongs to.

func (*Text) DestroyI

func (self *Text) DestroyI(args ...interface{})

DestroyI Destroy this Text object, removing it from the group it belongs to.

func (*Text) DestroyPhase

func (self *Text) DestroyPhase() bool

DestroyPhase As a Game Object runs through its destroy method this flag is set to true, and can be checked in any sub-systems or plugins it is being destroyed from.

func (*Text) DetermineFontProperties

func (self *Text) DetermineFontProperties(fontStyle interface{})

DetermineFontProperties Calculates the ascent, descent and fontSize of a given font style.

func (*Text) DetermineFontPropertiesI

func (self *Text) DetermineFontPropertiesI(args ...interface{})

DetermineFontPropertiesI Calculates the ascent, descent and fontSize of a given font style.

func (*Text) Events

func (self *Text) Events() *Events

Events All Phaser Game Objects have an Events class which contains all of the events that are dispatched when certain things happen to this Game Object, or any of its components.

func (*Text) Exists

func (self *Text) Exists() bool

Exists Controls if this Sprite is processed by the core Phaser game loops and Group loops.

func (*Text) Fill

func (self *Text) Fill() interface{}

Fill A canvas fillstyle that will be used on the text eg 'red', '#00FF00'.

func (*Text) FixedToCamera

func (self *Text) FixedToCamera() bool

FixedToCamera A Game Object that is "fixed" to the camera uses its x/y coordinates as offsets from the top left of the camera during rendering.

The values are adjusted at the rendering stage, overriding the Game Objects actual world position.

The end result is that the Game Object will appear to be 'fixed' to the camera, regardless of where in the game world the camera is viewing. This is useful if for example this Game Object is a UI item that you wish to be visible at all times regardless where in the world the camera is.

The offsets are stored in the `cameraOffset` property.

Note that the `cameraOffset` values are in addition to any parent of this Game Object on the display list.

Be careful not to set `fixedToCamera` on Game Objects which are in Groups that already have `fixedToCamera` enabled on them.

func (*Text) Font

func (self *Text) Font() string

Font Change the font family that the text will be rendered in, such as 'Arial'.

Multiple CSS font families and generic fallbacks can be specified as long as {@link http://www.w3.org/TR/CSS2/fonts.html#propdef-font-family CSS font-family rules} are followed.

To change the entire font string use {@link Phaser.Text#cssFont cssFont} instead: eg. `text.cssFont = 'bold 20pt Arial'`.

func (*Text) FontSize

func (self *Text) FontSize() interface{}

FontSize The size of the font.

If the font size is specified in pixels (eg. `32` or `'32px`') then a number (ie. `32`) representing the font size in pixels is returned; otherwise the value with CSS unit is returned as a string (eg. `'12pt'`).

func (*Text) FontStyle

func (self *Text) FontStyle() string

FontStyle The style of the font: 'normal', 'italic', 'oblique'

func (*Text) FontStyles

func (self *Text) FontStyles() []interface{}

FontStyles An array of the font styles values as specified by {@link Phaser.Text#addFontStyle addFontStyle}.

func (*Text) FontToComponents

func (self *Text) FontToComponents(font string)

FontToComponents Converting a short CSS-font string into the relevant components.

func (*Text) FontToComponentsI

func (self *Text) FontToComponentsI(args ...interface{})

FontToComponentsI Converting a short CSS-font string into the relevant components.

func (*Text) FontVariant

func (self *Text) FontVariant() string

FontVariant The variant the font: 'normal', 'small-caps'

func (*Text) FontWeight

func (self *Text) FontWeight() string

FontWeight The weight of the font: 'normal', 'bold', or {@link http://www.w3.org/TR/CSS2/fonts.html#propdef-font-weight a valid CSS font weight}.

func (*Text) FontWeights

func (self *Text) FontWeights() []interface{}

FontWeights An array of the font weights values as specified by {@link Phaser.Text#addFontWeight addFontWeight}.

func (*Text) Frame

func (self *Text) Frame() int

Frame Gets or sets the current frame index of the texture being used to render this Game Object.

To change the frame set `frame` to the index of the new frame in the sprite sheet you wish this Game Object to use, for example: `player.frame = 4`.

If the frame index given doesn't exist it will revert to the first frame found in the texture.

If you are using a texture atlas then you should use the `frameName` property instead.

If you wish to fully replace the texture being used see `loadTexture`.

func (*Text) FrameName

func (self *Text) FrameName() string

FrameName Gets or sets the current frame name of the texture being used to render this Game Object.

To change the frame set `frameName` to the name of the new frame in the texture atlas you wish this Game Object to use, for example: `player.frameName = "idle"`.

If the frame name given doesn't exist it will revert to the first frame found in the texture and throw a console warning.

If you are using a sprite sheet then you should use the `frame` property instead.

If you wish to fully replace the texture being used see `loadTexture`.

func (*Text) Fresh

func (self *Text) Fresh() bool

Fresh A Game Object is considered `fresh` if it has just been created or reset and is yet to receive a renderer transform update. This property is mostly used internally by the physics systems, but is exposed for the use of plugins.

func (*Text) Game

func (self *Text) Game() *Game

Game A reference to the currently running Game.

func (*Text) GetBounds

func (self *Text) GetBounds(matrix *Matrix) *Rectangle

GetBounds Returns the bounds of the Text as a rectangle. The bounds calculation takes the worldTransform into account.

func (*Text) GetBoundsI

func (self *Text) GetBoundsI(args ...interface{}) *Rectangle

GetBoundsI Returns the bounds of the Text as a rectangle. The bounds calculation takes the worldTransform into account.

func (*Text) GetChildAt

func (self *Text) GetChildAt(index int) *DisplayObject

GetChildAt Returns the child at the specified index

func (*Text) GetChildAtI

func (self *Text) GetChildAtI(args ...interface{}) *DisplayObject

GetChildAtI Returns the child at the specified index

func (*Text) GetChildIndex

func (self *Text) GetChildIndex(child *DisplayObject) int

GetChildIndex Returns the index position of a child DisplayObject instance

func (*Text) GetChildIndexI

func (self *Text) GetChildIndexI(args ...interface{}) int

GetChildIndexI Returns the index position of a child DisplayObject instance

func (*Text) GetLocalBounds

func (self *Text) GetLocalBounds() *Rectangle

GetLocalBounds Retrieves the non-global local bounds of the Sprite as a rectangle. The calculation takes all visible children into consideration.

func (*Text) GetLocalBoundsI

func (self *Text) GetLocalBoundsI(args ...interface{}) *Rectangle

GetLocalBoundsI Retrieves the non-global local bounds of the Sprite as a rectangle. The calculation takes all visible children into consideration.

func (*Text) Heal

func (self *Text) Heal() interface{}

Heal Heal the Game Object. This adds the given amount of health to the `health` property.

func (*Text) Health

func (self *Text) Health() int

Health The Game Objects health value. This is a handy property for setting and manipulating health on a Game Object.

It can be used in combination with the `damage` method or modified directly.

func (*Text) Height

func (self *Text) Height() int

Height The height of the Text. Setting this will modify the scale to achieve the value requested.

func (*Text) IgnoreChildInput

func (self *Text) IgnoreChildInput() bool

IgnoreChildInput If `ignoreChildInput` is `false` it will allow this objects _children_ to be considered as valid for Input events.

If this property is `true` then the children will _not_ be considered as valid for Input events.

Note that this property isn't recursive: only immediate children are influenced, it doesn't scan further down.

func (*Text) InCamera

func (self *Text) InCamera() bool

InCamera Checks if the Game Objects bounds intersect with the Game Camera bounds. Returns `true` if they do, otherwise `false` if fully outside of the Cameras bounds.

func (*Text) InWorld

func (self *Text) InWorld() bool

InWorld Checks if the Game Objects bounds are within, or intersect at any point with the Game World bounds.

func (*Text) Input

func (self *Text) Input() interface{}

Input The Input Handler for this Game Object.

By default it is disabled. If you wish this Game Object to process input events you should enable it with: `inputEnabled = true`.

After you have done this, this property will be a reference to the Phaser InputHandler.

func (*Text) InputEnabled

func (self *Text) InputEnabled() bool

InputEnabled By default a Game Object won't process any input events. By setting `inputEnabled` to true a Phaser.InputHandler is created for this Game Object and it will then start to process click / touch events and more.

You can then access the Input Handler via `this.input`.

Note that Input related events are dispatched from `this.events`, i.e.: `events.onInputDown`.

If you set this property to false it will stop the Input Handler from processing any more input events.

If you want to _temporarily_ disable input for a Game Object, then it's better to set `input.enabled = false`, as it won't reset any of the Input Handlers internal properties. You can then toggle this back on as needed.

func (*Text) Key

func (self *Text) Key() interface{}

Key The key of the image or texture used by this Game Object during rendering. If it is a string it's the string used to retrieve the texture from the Phaser Image Cache. It can also be an instance of a RenderTexture, BitmapData, Video or PIXI.Texture. If a Game Object is created without a key it is automatically assigned the key `__default` which is a 32x32 transparent PNG stored within the Cache. If a Game Object is given a key which doesn't exist in the Image Cache it is re-assigned the key `__missing` which is a 32x32 PNG of a green box with a line through it.

func (*Text) Kill

func (self *Text) Kill() *DisplayObject

Kill Kills a Game Object. A killed Game Object has its `alive`, `exists` and `visible` properties all set to false.

It will dispatch the `onKilled` event. You can listen to `events.onKilled` for the signal.

Note that killing a Game Object is a way for you to quickly recycle it in an object pool, it doesn't destroy the object or free it up from memory.

If you don't need this Game Object any more you should call `destroy` instead.

func (*Text) KillI

func (self *Text) KillI(args ...interface{}) *DisplayObject

KillI Kills a Game Object. A killed Game Object has its `alive`, `exists` and `visible` properties all set to false.

It will dispatch the `onKilled` event. You can listen to `events.onKilled` for the signal.

Note that killing a Game Object is a way for you to quickly recycle it in an object pool, it doesn't destroy the object or free it up from memory.

If you don't need this Game Object any more you should call `destroy` instead.

func (*Text) Left

func (self *Text) Left() int

Left The left coordinate of the Game Object. This is the same as `x - offsetX`.

func (*Text) Lifespan

func (self *Text) Lifespan() int

Lifespan The lifespan allows you to give a Game Object a lifespan in milliseconds.

Once the Game Object is 'born' you can set this to a positive value.

It is automatically decremented by the millisecond equivalent of `game.time.physicsElapsed` each frame. When it reaches zero it will call the `kill` method.

Very handy for particles, bullets, collectibles, or any other short-lived entity.

func (*Text) LineSpacing

func (self *Text) LineSpacing() int

LineSpacing Additional spacing (in pixels) between each line of text if multi-line.

func (*Text) LoadTexture

func (self *Text) LoadTexture(key interface{})

LoadTexture Changes the base texture the Game Object is using. The old texture is removed and the new one is referenced or fetched from the Cache.

If your Game Object is using a frame from a texture atlas and you just wish to change to another frame, then see the `frame` or `frameName` properties instead.

You should only use `loadTexture` if you want to replace the base texture entirely.

Calling this method causes a WebGL texture update, so use sparingly or in low-intensity portions of your game, or if you know the new texture is already on the GPU.

You can use the new const `Phaser.PENDING_ATLAS` as the texture key for any sprite. Doing this then sets the key to be the `frame` argument (the frame is set to zero).

This allows you to create sprites using `load.image` during development, and then change them to use a Texture Atlas later in development by simply searching your code for 'PENDING_ATLAS' and swapping it to be the key of the atlas data.

Note: You cannot use a RenderTexture as a texture for a TileSprite.

func (*Text) LoadTexture1O

func (self *Text) LoadTexture1O(key interface{}, frame interface{})

LoadTexture1O Changes the base texture the Game Object is using. The old texture is removed and the new one is referenced or fetched from the Cache.

If your Game Object is using a frame from a texture atlas and you just wish to change to another frame, then see the `frame` or `frameName` properties instead.

You should only use `loadTexture` if you want to replace the base texture entirely.

Calling this method causes a WebGL texture update, so use sparingly or in low-intensity portions of your game, or if you know the new texture is already on the GPU.

You can use the new const `Phaser.PENDING_ATLAS` as the texture key for any sprite. Doing this then sets the key to be the `frame` argument (the frame is set to zero).

This allows you to create sprites using `load.image` during development, and then change them to use a Texture Atlas later in development by simply searching your code for 'PENDING_ATLAS' and swapping it to be the key of the atlas data.

Note: You cannot use a RenderTexture as a texture for a TileSprite.

func (*Text) LoadTexture2O

func (self *Text) LoadTexture2O(key interface{}, frame interface{}, stopAnimation bool)

LoadTexture2O Changes the base texture the Game Object is using. The old texture is removed and the new one is referenced or fetched from the Cache.

If your Game Object is using a frame from a texture atlas and you just wish to change to another frame, then see the `frame` or `frameName` properties instead.

You should only use `loadTexture` if you want to replace the base texture entirely.

Calling this method causes a WebGL texture update, so use sparingly or in low-intensity portions of your game, or if you know the new texture is already on the GPU.

You can use the new const `Phaser.PENDING_ATLAS` as the texture key for any sprite. Doing this then sets the key to be the `frame` argument (the frame is set to zero).

This allows you to create sprites using `load.image` during development, and then change them to use a Texture Atlas later in development by simply searching your code for 'PENDING_ATLAS' and swapping it to be the key of the atlas data.

Note: You cannot use a RenderTexture as a texture for a TileSprite.

func (*Text) LoadTextureI

func (self *Text) LoadTextureI(args ...interface{})

LoadTextureI Changes the base texture the Game Object is using. The old texture is removed and the new one is referenced or fetched from the Cache.

If your Game Object is using a frame from a texture atlas and you just wish to change to another frame, then see the `frame` or `frameName` properties instead.

You should only use `loadTexture` if you want to replace the base texture entirely.

Calling this method causes a WebGL texture update, so use sparingly or in low-intensity portions of your game, or if you know the new texture is already on the GPU.

You can use the new const `Phaser.PENDING_ATLAS` as the texture key for any sprite. Doing this then sets the key to be the `frame` argument (the frame is set to zero).

This allows you to create sprites using `load.image` during development, and then change them to use a Texture Atlas later in development by simply searching your code for 'PENDING_ATLAS' and swapping it to be the key of the atlas data.

Note: You cannot use a RenderTexture as a texture for a TileSprite.

func (*Text) MaxHealth

func (self *Text) MaxHealth() int

MaxHealth The Game Objects maximum health value. This works in combination with the `heal` method to ensure the health value never exceeds the maximum.

func (*Text) MeasureLine

func (self *Text) MeasureLine(line string) int

MeasureLine Measures a line of text character by character taking into the account the specified character styles.

func (*Text) MeasureLineI

func (self *Text) MeasureLineI(args ...interface{}) int

MeasureLineI Measures a line of text character by character taking into the account the specified character styles.

func (*Text) MoveDown

func (self *Text) MoveDown() *DisplayObject

MoveDown Moves this Game Object down one place in its parents display list. This call has no effect if the Game Object is already at the bottom of the display list.

If this Game Object hasn't been added to a custom Group then this method will move it one object down within the Game World, because the World is the root Group from which all Game Objects descend.

func (*Text) MoveDownI

func (self *Text) MoveDownI(args ...interface{}) *DisplayObject

MoveDownI Moves this Game Object down one place in its parents display list. This call has no effect if the Game Object is already at the bottom of the display list.

If this Game Object hasn't been added to a custom Group then this method will move it one object down within the Game World, because the World is the root Group from which all Game Objects descend.

func (*Text) MoveUp

func (self *Text) MoveUp() *DisplayObject

MoveUp Moves this Game Object up one place in its parents display list. This call has no effect if the Game Object is already at the top of the display list.

If this Game Object hasn't been added to a custom Group then this method will move it one object up within the Game World, because the World is the root Group from which all Game Objects descend.

func (*Text) MoveUpI

func (self *Text) MoveUpI(args ...interface{}) *DisplayObject

MoveUpI Moves this Game Object up one place in its parents display list. This call has no effect if the Game Object is already at the top of the display list.

If this Game Object hasn't been added to a custom Group then this method will move it one object up within the Game World, because the World is the root Group from which all Game Objects descend.

func (*Text) Name

func (self *Text) Name() string

Name A user defined name given to this Game Object. This value isn't ever used internally by Phaser, it is meant as a game level property.

func (*Text) OffsetX

func (self *Text) OffsetX() int

OffsetX The amount the Game Object is visually offset from its x coordinate. This is the same as `width * anchor.x`. It will only be > 0 if anchor.x is not equal to zero.

func (*Text) OffsetY

func (self *Text) OffsetY() int

OffsetY The amount the Game Object is visually offset from its y coordinate. This is the same as `height * anchor.y`. It will only be > 0 if anchor.y is not equal to zero.

func (*Text) OnTextureUpdate

func (self *Text) OnTextureUpdate(event interface{})

OnTextureUpdate When the texture is updated, this event will fire to update the scale and frame

func (*Text) OnTextureUpdateI

func (self *Text) OnTextureUpdateI(args ...interface{})

OnTextureUpdateI When the texture is updated, this event will fire to update the scale and frame

func (*Text) OutOfBoundsKill

func (self *Text) OutOfBoundsKill() bool

OutOfBoundsKill If this and the `checkWorldBounds` property are both set to `true` then the `kill` method is called as soon as `inWorld` returns false.

func (*Text) OutOfCameraBoundsKill

func (self *Text) OutOfCameraBoundsKill() bool

OutOfCameraBoundsKill If this and the `autoCull` property are both set to `true`, then the `kill` method is called as soon as the Game Object leaves the camera bounds.

func (*Text) Overlap

func (self *Text) Overlap(displayObject interface{}) bool

Overlap Checks to see if the bounds of this Game Object overlaps with the bounds of the given Display Object, which can be a Sprite, Image, TileSprite or anything that extends those such as Button or provides a `getBounds` method and result.

This check ignores the `hitArea` property if set and runs a `getBounds` comparison on both objects to determine the result.

Therefore it's relatively expensive to use in large quantities, i.e. with lots of Sprites at a high frequency. It should be fine for low-volume testing where physics isn't required.

func (*Text) OverlapI

func (self *Text) OverlapI(args ...interface{}) bool

OverlapI Checks to see if the bounds of this Game Object overlaps with the bounds of the given Display Object, which can be a Sprite, Image, TileSprite or anything that extends those such as Button or provides a `getBounds` method and result.

This check ignores the `hitArea` property if set and runs a `getBounds` comparison on both objects to determine the result.

Therefore it's relatively expensive to use in large quantities, i.e. with lots of Sprites at a high frequency. It should be fine for low-volume testing where physics isn't required.

func (*Text) Padding

func (self *Text) Padding() *Point

Padding Specify a padding value which is added to the line width and height when calculating the Text size. ALlows you to add extra spacing if Phaser is unable to accurately determine the true font dimensions.

func (*Text) ParseList

func (self *Text) ParseList(list []interface{}) *Text

ParseList Converts the given array into a tab delimited string and then updates this Text object. This is mostly used when you want to display external data using tab stops.

The array can be either single or multi dimensional depending on the result you need:

`[ 'a', 'b', 'c' ]` would convert in to `"a\tb\tc"`.

Where as:

`[

[ 'a', 'b', 'c' ],
[ 'd', 'e', 'f']

]`

would convert in to: `"a\tb\tc\nd\te\tf"`

func (*Text) ParseListI

func (self *Text) ParseListI(args ...interface{}) *Text

ParseListI Converts the given array into a tab delimited string and then updates this Text object. This is mostly used when you want to display external data using tab stops.

The array can be either single or multi dimensional depending on the result you need:

`[ 'a', 'b', 'c' ]` would convert in to `"a\tb\tc"`.

Where as:

`[

[ 'a', 'b', 'c' ],
[ 'd', 'e', 'f']

]`

would convert in to: `"a\tb\tc\nd\te\tf"`

func (*Text) PendingDestroy

func (self *Text) PendingDestroy() bool

PendingDestroy A Game Object is that is pendingDestroy is flagged to have its destroy method called on the next logic update. You can set it directly to allow you to flag an object to be destroyed on its next update.

This is extremely useful if you wish to destroy an object from within one of its own callbacks such as with Buttons or other Input events.

func (*Text) PhysicsType

func (self *Text) PhysicsType() int

PhysicsType The const physics body type of this object.

func (*Text) Play

func (self *Text) Play(name string) *Animation

Play Plays an Animation.

The animation should have previously been created via `animations.add`.

If the animation is already playing calling this again won't do anything. If you need to reset an already running animation do so directly on the Animation object itself or via `AnimationManager.stop`.

func (*Text) Play1O

func (self *Text) Play1O(name string, frameRate int) *Animation

Play1O Plays an Animation.

The animation should have previously been created via `animations.add`.

If the animation is already playing calling this again won't do anything. If you need to reset an already running animation do so directly on the Animation object itself or via `AnimationManager.stop`.

func (*Text) Play2O

func (self *Text) Play2O(name string, frameRate int, loop bool) *Animation

Play2O Plays an Animation.

The animation should have previously been created via `animations.add`.

If the animation is already playing calling this again won't do anything. If you need to reset an already running animation do so directly on the Animation object itself or via `AnimationManager.stop`.

func (*Text) Play3O

func (self *Text) Play3O(name string, frameRate int, loop bool, killOnComplete bool) *Animation

Play3O Plays an Animation.

The animation should have previously been created via `animations.add`.

If the animation is already playing calling this again won't do anything. If you need to reset an already running animation do so directly on the Animation object itself or via `AnimationManager.stop`.

func (*Text) PlayI

func (self *Text) PlayI(args ...interface{}) *Animation

PlayI Plays an Animation.

The animation should have previously been created via `animations.add`.

If the animation is already playing calling this again won't do anything. If you need to reset an already running animation do so directly on the Animation object itself or via `AnimationManager.stop`.

func (*Text) PostUpdate

func (self *Text) PostUpdate()

PostUpdate Internal method called by the World postUpdate cycle.

func (*Text) PostUpdateI

func (self *Text) PostUpdateI(args ...interface{})

PostUpdateI Internal method called by the World postUpdate cycle.

func (*Text) PreUpdate

func (self *Text) PreUpdate()

PreUpdate Automatically called by World.preUpdate.

func (*Text) PreUpdateI

func (self *Text) PreUpdateI(args ...interface{})

PreUpdateI Automatically called by World.preUpdate.

func (*Text) PrecalculateWordWrap

func (self *Text) PrecalculateWordWrap(text string) []interface{}

PrecalculateWordWrap Runs the given text through the Text.runWordWrap function and returns the results as an array, where each element of the array corresponds to a wrapped line of text.

Useful if you wish to control pagination on long pieces of content.

func (*Text) PrecalculateWordWrapI

func (self *Text) PrecalculateWordWrapI(args ...interface{}) []interface{}

PrecalculateWordWrapI Runs the given text through the Text.runWordWrap function and returns the results as an array, where each element of the array corresponds to a wrapped line of text.

Useful if you wish to control pagination on long pieces of content.

func (*Text) PreviousPosition

func (self *Text) PreviousPosition() *Point

PreviousPosition The position the Game Object was located in the previous frame.

func (*Text) PreviousRotation

func (self *Text) PreviousRotation() int

PreviousRotation The rotation the Game Object was in set to in the previous frame. Value is in radians.

func (*Text) RemoveChild

func (self *Text) RemoveChild(child *DisplayObject) *DisplayObject

RemoveChild Removes a child from the container.

func (*Text) RemoveChildAt

func (self *Text) RemoveChildAt(index int) *DisplayObject

RemoveChildAt Removes a child from the specified index position.

func (*Text) RemoveChildAtI

func (self *Text) RemoveChildAtI(args ...interface{}) *DisplayObject

RemoveChildAtI Removes a child from the specified index position.

func (*Text) RemoveChildI

func (self *Text) RemoveChildI(args ...interface{}) *DisplayObject

RemoveChildI Removes a child from the container.

func (*Text) RemoveChildren

func (self *Text) RemoveChildren(beginIndex int, endIndex int)

RemoveChildren Removes all children from this container that are within the begin and end indexes.

func (*Text) RemoveChildrenI

func (self *Text) RemoveChildrenI(args ...interface{})

RemoveChildrenI Removes all children from this container that are within the begin and end indexes.

func (*Text) RenderOrderID

func (self *Text) RenderOrderID() int

RenderOrderID The render order ID is used internally by the renderer and Input Manager and should not be modified. This property is mostly used internally by the renderers, but is exposed for the use of plugins.

func (*Text) RenderTabLine

func (self *Text) RenderTabLine(line string, x int, y int, fill bool)

RenderTabLine Renders a line of text that contains tab characters if Text.tab > 0. Called automatically by updateText.

func (*Text) RenderTabLineI

func (self *Text) RenderTabLineI(args ...interface{})

RenderTabLineI Renders a line of text that contains tab characters if Text.tab > 0. Called automatically by updateText.

func (*Text) Reset

func (self *Text) Reset(x int, y int) *DisplayObject

Reset Resets the Game Object.

This moves the Game Object to the given x/y world coordinates and sets `fresh`, `exists`, `visible` and `renderable` to true.

If this Game Object has the LifeSpan component it will also set `alive` to true and `health` to the given value.

If this Game Object has a Physics Body it will reset the Body.

func (*Text) Reset1O

func (self *Text) Reset1O(x int, y int, health int) *DisplayObject

Reset1O Resets the Game Object.

This moves the Game Object to the given x/y world coordinates and sets `fresh`, `exists`, `visible` and `renderable` to true.

If this Game Object has the LifeSpan component it will also set `alive` to true and `health` to the given value.

If this Game Object has a Physics Body it will reset the Body.

func (*Text) ResetFrame

func (self *Text) ResetFrame()

ResetFrame Resets the texture frame dimensions that the Game Object uses for rendering.

func (*Text) ResetFrameI

func (self *Text) ResetFrameI(args ...interface{})

ResetFrameI Resets the texture frame dimensions that the Game Object uses for rendering.

func (*Text) ResetI

func (self *Text) ResetI(args ...interface{}) *DisplayObject

ResetI Resets the Game Object.

This moves the Game Object to the given x/y world coordinates and sets `fresh`, `exists`, `visible` and `renderable` to true.

If this Game Object has the LifeSpan component it will also set `alive` to true and `health` to the given value.

If this Game Object has a Physics Body it will reset the Body.

func (*Text) ResizeFrame

func (self *Text) ResizeFrame(parent interface{}, width int, height int)

ResizeFrame Resizes the Frame dimensions that the Game Object uses for rendering.

You shouldn't normally need to ever call this, but in the case of special texture types such as Video or BitmapData it can be useful to adjust the dimensions directly in this way.

func (*Text) ResizeFrameI

func (self *Text) ResizeFrameI(args ...interface{})

ResizeFrameI Resizes the Frame dimensions that the Game Object uses for rendering.

You shouldn't normally need to ever call this, but in the case of special texture types such as Video or BitmapData it can be useful to adjust the dimensions directly in this way.

func (*Text) Resolution

func (self *Text) Resolution() int

Resolution The resolution of the canvas the text is rendered to. This defaults to match the resolution of the renderer, but can be changed on a per Text object basis.

func (*Text) Revive

func (self *Text) Revive() *DisplayObject

Revive Brings a 'dead' Game Object back to life, optionally resetting its health value in the process.

A resurrected Game Object has its `alive`, `exists` and `visible` properties all set to true.

It will dispatch the `onRevived` event. Listen to `events.onRevived` for the signal.

func (*Text) Revive1O

func (self *Text) Revive1O(health int) *DisplayObject

Revive1O Brings a 'dead' Game Object back to life, optionally resetting its health value in the process.

A resurrected Game Object has its `alive`, `exists` and `visible` properties all set to true.

It will dispatch the `onRevived` event. Listen to `events.onRevived` for the signal.

func (*Text) ReviveI

func (self *Text) ReviveI(args ...interface{}) *DisplayObject

ReviveI Brings a 'dead' Game Object back to life, optionally resetting its health value in the process.

A resurrected Game Object has its `alive`, `exists` and `visible` properties all set to true.

It will dispatch the `onRevived` event. Listen to `events.onRevived` for the signal.

func (*Text) Right

func (self *Text) Right() int

Right The right coordinate of the Game Object. This is the same as `x + width - offsetX`.

func (*Text) RunWordWrap

func (self *Text) RunWordWrap(text string)

RunWordWrap Greedy wrapping algorithm that will wrap words as the line grows longer than its horizontal bounds.

func (*Text) RunWordWrapI

func (self *Text) RunWordWrapI(args ...interface{})

RunWordWrapI Greedy wrapping algorithm that will wrap words as the line grows longer than its horizontal bounds.

func (*Text) ScaleMax

func (self *Text) ScaleMax() *Point

ScaleMax The maximum scale this Game Object will scale up to.

It allows you to prevent a parent from scaling this Game Object higher than the given value.

Set it to `null` to remove the limit.

func (*Text) ScaleMin

func (self *Text) ScaleMin() *Point

ScaleMin The minimum scale this Game Object will scale down to.

It allows you to prevent a parent from scaling this Game Object lower than the given value.

Set it to `null` to remove the limit.

func (*Text) SendToBack

func (self *Text) SendToBack() *DisplayObject

SendToBack Sends this Game Object to the bottom of its parents display list. Visually this means it will render below all other children in the same Group.

If this Game Object hasn't been added to a custom Group then this method will send it to the bottom of the Game World, because the World is the root Group from which all Game Objects descend.

func (*Text) SendToBackI

func (self *Text) SendToBackI(args ...interface{}) *DisplayObject

SendToBackI Sends this Game Object to the bottom of its parents display list. Visually this means it will render below all other children in the same Group.

If this Game Object hasn't been added to a custom Group then this method will send it to the bottom of the Game World, because the World is the root Group from which all Game Objects descend.

func (*Text) SetAlignA

func (self *Text) SetAlignA(member string)

SetAlignA Controls the horizontal alignment for multiline text. Can be: 'left', 'center' or 'right'. Does not affect single lines of text. For that please see `setTextBounds`.

func (*Text) SetAliveA

func (self *Text) SetAliveA(member bool)

SetAliveA A useful flag to control if the Game Object is alive or dead.

This is set automatically by the Health components `damage` method should the object run out of health. Or you can toggle it via your game code.

This property is mostly just provided to be used by your game - it doesn't effect rendering or logic updates. However you can use `Group.getFirstAlive` in conjunction with this property for fast object pooling and recycling.

func (*Text) SetAnchorA

func (self *Text) SetAnchorA(member *Point)

SetAnchorA The anchor sets the origin point of the texture.

The default is 0,0 this means the texture's origin is the top left

Setting than anchor to 0.5,0.5 means the textures origin is centered

Setting the anchor to 1,1 would mean the textures origin points will be the bottom right corner

func (*Text) SetAngleA

func (self *Text) SetAngleA(member int)

SetAngleA The angle property is the rotation of the Game Object in *degrees* from its original orientation.

Values from 0 to 180 represent clockwise rotation; values from 0 to -180 represent counterclockwise rotation.

Values outside this range are added to or subtracted from 360 to obtain a value within the range. For example, the statement player.angle = 450 is the same as player.angle = 90.

If you wish to work in radians instead of degrees you can use the property `rotation` instead. Working in radians is slightly faster as it doesn't have to perform any calculations.

func (*Text) SetAnimationsA

func (self *Text) SetAnimationsA(member *AnimationManager)

SetAnimationsA If the Game Object is enabled for animation (such as a Phaser.Sprite) this is a reference to its AnimationManager instance. Through it you can create, play, pause and stop animations.

func (*Text) SetAutoCullA

func (self *Text) SetAutoCullA(member bool)

SetAutoCullA A Game Object with `autoCull` set to true will check its bounds against the World Camera every frame. If it is not intersecting the Camera bounds at any point then it has its `renderable` property set to `false`. This keeps the Game Object alive and still processing updates, but forces it to skip the render step entirely.

This is a relatively expensive operation, especially if enabled on hundreds of Game Objects. So enable it only if you know it's required, or you have tested performance and find it acceptable.

func (*Text) SetAutoRoundA

func (self *Text) SetAutoRoundA(member bool)

SetAutoRoundA Should the linePositionX and Y values be automatically rounded before rendering the Text? You may wish to enable this if you want to remove the effect of sub-pixel aliasing from text.

func (*Text) SetBlendModeA

func (self *Text) SetBlendModeA(member int)

SetBlendModeA The blend mode to be applied to the sprite. Set to PIXI.blendModes.NORMAL to remove any blend mode.

Warning: You cannot have a blend mode and a filter active on the same Sprite. Doing so will render the sprite invisible.

func (*Text) SetBodyA

func (self *Text) SetBodyA(member interface{})

SetBodyA `body` is the Game Objects physics body. Once a Game Object is enabled for physics you access all associated properties and methods via it.

By default Game Objects won't add themselves to any physics system and their `body` property will be `null`.

To enable this Game Object for physics you need to call `game.physics.enable(object, system)` where `object` is this object and `system` is the Physics system you are using. If none is given it defaults to `Phaser.Physics.Arcade`.

You can alternatively call `game.physics.arcade.enable(object)`, or add this Game Object to a physics enabled Group.

Important: Enabling a Game Object for P2 or Ninja physics will automatically set its `anchor` property to 0.5, so the physics body is centered on the Game Object.

If you need a different result then adjust or re-create the Body shape offsets manually or reset the anchor after enabling physics.

func (*Text) SetBottomA

func (self *Text) SetBottomA(member int)

SetBottomA The sum of the y and height properties. This is the same as `y + height - offsetY`.

func (*Text) SetBoundsAlignHA

func (self *Text) SetBoundsAlignHA(member string)

SetBoundsAlignHA Horizontal alignment of the text within the `textBounds`. Can be: 'left', 'center' or 'right'.

func (*Text) SetBoundsAlignVA

func (self *Text) SetBoundsAlignVA(member string)

SetBoundsAlignVA Vertical alignment of the text within the `textBounds`. Can be: 'top', 'middle' or 'bottom'.

func (*Text) SetCameraOffsetA

func (self *Text) SetCameraOffsetA(member *Point)

SetCameraOffsetA The x/y coordinate offset applied to the top-left of the camera that this Game Object will be drawn at if `fixedToCamera` is true.

The values are relative to the top-left of the camera view and in addition to any parent of the Game Object on the display list.

func (*Text) SetCanvasA

func (self *Text) SetCanvasA(member dom.HTMLCanvasElement)

SetCanvasA The canvas element that the text is rendered.

func (*Text) SetCenterXA

func (self *Text) SetCenterXA(member int)

SetCenterXA The center x coordinate of the Game Object. This is the same as `(x - offsetX) + (width / 2)`.

func (*Text) SetCenterYA

func (self *Text) SetCenterYA(member int)

SetCenterYA The center y coordinate of the Game Object. This is the same as `(y - offsetY) + (height / 2)`.

func (*Text) SetCheckWorldBoundsA

func (self *Text) SetCheckWorldBoundsA(member bool)

SetCheckWorldBoundsA If this is set to `true` the Game Object checks if it is within the World bounds each frame.

When it is no longer intersecting the world bounds it dispatches the `onOutOfBounds` event.

If it was *previously* out of bounds but is now intersecting the world bounds again it dispatches the `onEnterBounds` event.

It also optionally kills the Game Object if `outOfBoundsKill` is `true`.

When `checkWorldBounds` is enabled it forces the Game Object to calculate its full bounds every frame.

This is a relatively expensive operation, especially if enabled on hundreds of Game Objects. So enable it only if you know it's required, or you have tested performance and find it acceptable.

func (*Text) SetChildIndex

func (self *Text) SetChildIndex(child *DisplayObject, index int)

SetChildIndex Changes the position of an existing child in the display object container

func (*Text) SetChildIndexI

func (self *Text) SetChildIndexI(args ...interface{})

SetChildIndexI Changes the position of an existing child in the display object container

func (*Text) SetChildrenA

func (self *Text) SetChildrenA(member []DisplayObject)

SetChildrenA [read-only] The array of children of this container.

func (*Text) SetColorsA

func (self *Text) SetColorsA(member []interface{})

SetColorsA An array of the color values as specified by {@link Phaser.Text#addColor addColor}.

func (*Text) SetComponentsA

func (self *Text) SetComponentsA(member interface{})

SetComponentsA The components this Game Object has installed.

func (*Text) SetContextA

func (self *Text) SetContextA(member dom.HTMLCanvasElement)

SetContextA The context of the canvas element that the text is rendered to.

func (*Text) SetCropRectA

func (self *Text) SetCropRectA(member *Rectangle)

SetCropRectA The Rectangle used to crop the texture this Game Object uses. Set this property via `crop`. If you modify this property directly you must call `updateCrop` in order to have the change take effect.

func (*Text) SetCssFontA

func (self *Text) SetCssFontA(member string)

SetCssFontA Change the font used.

This is equivalent of the `font` property specified to {@link Phaser.Text#setStyle setStyle}, except that unlike using `setStyle` this will not change any current font fill/color settings.

The CSS font string can also be individually altered with the `font`, `fontSize`, `fontWeight`, `fontStyle`, and `fontVariant` properties.

func (*Text) SetDamageA

func (self *Text) SetDamageA(member interface{})

SetDamageA Damages the Game Object. This removes the given amount of health from the `health` property.

If health is taken below or is equal to zero then the `kill` method is called.

func (*Text) SetDataA

func (self *Text) SetDataA(member interface{})

SetDataA An empty Object that belongs to this Game Object. This value isn't ever used internally by Phaser, but may be used by your own code, or by Phaser Plugins, to store data that needs to be associated with the Game Object, without polluting the Game Object directly.

func (*Text) SetDebugA

func (self *Text) SetDebugA(member bool)

SetDebugA A debug flag designed for use with `Game.enableStep`.

func (*Text) SetDeltaXA

func (self *Text) SetDeltaXA(member int)

SetDeltaXA Returns the delta x value. The difference between world.x now and in the previous frame.

The value will be positive if the Game Object has moved to the right or negative if to the left.

func (*Text) SetDeltaYA

func (self *Text) SetDeltaYA(member int)

SetDeltaYA Returns the delta y value. The difference between world.y now and in the previous frame.

The value will be positive if the Game Object has moved down or negative if up.

func (*Text) SetDeltaZA

func (self *Text) SetDeltaZA(member int)

SetDeltaZA Returns the delta z value. The difference between rotation now and in the previous frame. The delta value.

func (*Text) SetDestroyPhaseA

func (self *Text) SetDestroyPhaseA(member bool)

SetDestroyPhaseA As a Game Object runs through its destroy method this flag is set to true, and can be checked in any sub-systems or plugins it is being destroyed from.

func (*Text) SetEventsA

func (self *Text) SetEventsA(member *Events)

SetEventsA All Phaser Game Objects have an Events class which contains all of the events that are dispatched when certain things happen to this Game Object, or any of its components.

func (*Text) SetExistsA

func (self *Text) SetExistsA(member bool)

SetExistsA Controls if this Sprite is processed by the core Phaser game loops and Group loops.

func (*Text) SetFillA

func (self *Text) SetFillA(member interface{})

SetFillA A canvas fillstyle that will be used on the text eg 'red', '#00FF00'.

func (*Text) SetFixedToCameraA

func (self *Text) SetFixedToCameraA(member bool)

SetFixedToCameraA A Game Object that is "fixed" to the camera uses its x/y coordinates as offsets from the top left of the camera during rendering.

The values are adjusted at the rendering stage, overriding the Game Objects actual world position.

The end result is that the Game Object will appear to be 'fixed' to the camera, regardless of where in the game world the camera is viewing. This is useful if for example this Game Object is a UI item that you wish to be visible at all times regardless where in the world the camera is.

The offsets are stored in the `cameraOffset` property.

Note that the `cameraOffset` values are in addition to any parent of this Game Object on the display list.

Be careful not to set `fixedToCamera` on Game Objects which are in Groups that already have `fixedToCamera` enabled on them.

func (*Text) SetFontA

func (self *Text) SetFontA(member string)

SetFontA Change the font family that the text will be rendered in, such as 'Arial'.

Multiple CSS font families and generic fallbacks can be specified as long as {@link http://www.w3.org/TR/CSS2/fonts.html#propdef-font-family CSS font-family rules} are followed.

To change the entire font string use {@link Phaser.Text#cssFont cssFont} instead: eg. `text.cssFont = 'bold 20pt Arial'`.

func (*Text) SetFontSizeA

func (self *Text) SetFontSizeA(member interface{})

SetFontSizeA The size of the font.

If the font size is specified in pixels (eg. `32` or `'32px`') then a number (ie. `32`) representing the font size in pixels is returned; otherwise the value with CSS unit is returned as a string (eg. `'12pt'`).

func (*Text) SetFontStyleA

func (self *Text) SetFontStyleA(member string)

SetFontStyleA The style of the font: 'normal', 'italic', 'oblique'

func (*Text) SetFontStylesA

func (self *Text) SetFontStylesA(member []interface{})

SetFontStylesA An array of the font styles values as specified by {@link Phaser.Text#addFontStyle addFontStyle}.

func (*Text) SetFontVariantA

func (self *Text) SetFontVariantA(member string)

SetFontVariantA The variant the font: 'normal', 'small-caps'

func (*Text) SetFontWeightA

func (self *Text) SetFontWeightA(member string)

SetFontWeightA The weight of the font: 'normal', 'bold', or {@link http://www.w3.org/TR/CSS2/fonts.html#propdef-font-weight a valid CSS font weight}.

func (*Text) SetFontWeightsA

func (self *Text) SetFontWeightsA(member []interface{})

SetFontWeightsA An array of the font weights values as specified by {@link Phaser.Text#addFontWeight addFontWeight}.

func (*Text) SetFrame

func (self *Text) SetFrame(frame *Frame)

SetFrame Sets the texture frame the Game Object uses for rendering.

This is primarily an internal method used by `loadTexture`, but is exposed for the use of plugins and custom classes.

func (*Text) SetFrameA

func (self *Text) SetFrameA(member int)

SetFrameA Gets or sets the current frame index of the texture being used to render this Game Object.

To change the frame set `frame` to the index of the new frame in the sprite sheet you wish this Game Object to use, for example: `player.frame = 4`.

If the frame index given doesn't exist it will revert to the first frame found in the texture.

If you are using a texture atlas then you should use the `frameName` property instead.

If you wish to fully replace the texture being used see `loadTexture`.

func (*Text) SetFrameI

func (self *Text) SetFrameI(args ...interface{})

SetFrameI Sets the texture frame the Game Object uses for rendering.

This is primarily an internal method used by `loadTexture`, but is exposed for the use of plugins and custom classes.

func (*Text) SetFrameNameA

func (self *Text) SetFrameNameA(member string)

SetFrameNameA Gets or sets the current frame name of the texture being used to render this Game Object.

To change the frame set `frameName` to the name of the new frame in the texture atlas you wish this Game Object to use, for example: `player.frameName = "idle"`.

If the frame name given doesn't exist it will revert to the first frame found in the texture and throw a console warning.

If you are using a sprite sheet then you should use the `frame` property instead.

If you wish to fully replace the texture being used see `loadTexture`.

func (*Text) SetFreshA

func (self *Text) SetFreshA(member bool)

SetFreshA A Game Object is considered `fresh` if it has just been created or reset and is yet to receive a renderer transform update. This property is mostly used internally by the physics systems, but is exposed for the use of plugins.

func (*Text) SetGameA

func (self *Text) SetGameA(member *Game)

SetGameA A reference to the currently running Game.

func (*Text) SetHealA

func (self *Text) SetHealA(member interface{})

SetHealA Heal the Game Object. This adds the given amount of health to the `health` property.

func (*Text) SetHealth

func (self *Text) SetHealth() interface{}

SetHealth Sets the health property of the Game Object to the given amount. Will never exceed the `maxHealth` value.

func (*Text) SetHealthA

func (self *Text) SetHealthA(member int)

SetHealthA The Game Objects health value. This is a handy property for setting and manipulating health on a Game Object.

It can be used in combination with the `damage` method or modified directly.

func (*Text) SetHeightA

func (self *Text) SetHeightA(member int)

SetHeightA The height of the Text. Setting this will modify the scale to achieve the value requested.

func (*Text) SetIgnoreChildInputA

func (self *Text) SetIgnoreChildInputA(member bool)

SetIgnoreChildInputA If `ignoreChildInput` is `false` it will allow this objects _children_ to be considered as valid for Input events.

If this property is `true` then the children will _not_ be considered as valid for Input events.

Note that this property isn't recursive: only immediate children are influenced, it doesn't scan further down.

func (*Text) SetInCameraA

func (self *Text) SetInCameraA(member bool)

SetInCameraA Checks if the Game Objects bounds intersect with the Game Camera bounds. Returns `true` if they do, otherwise `false` if fully outside of the Cameras bounds.

func (*Text) SetInWorldA

func (self *Text) SetInWorldA(member bool)

SetInWorldA Checks if the Game Objects bounds are within, or intersect at any point with the Game World bounds.

func (*Text) SetInputA

func (self *Text) SetInputA(member interface{})

SetInputA The Input Handler for this Game Object.

By default it is disabled. If you wish this Game Object to process input events you should enable it with: `inputEnabled = true`.

After you have done this, this property will be a reference to the Phaser InputHandler.

func (*Text) SetInputEnabledA

func (self *Text) SetInputEnabledA(member bool)

SetInputEnabledA By default a Game Object won't process any input events. By setting `inputEnabled` to true a Phaser.InputHandler is created for this Game Object and it will then start to process click / touch events and more.

You can then access the Input Handler via `this.input`.

Note that Input related events are dispatched from `this.events`, i.e.: `events.onInputDown`.

If you set this property to false it will stop the Input Handler from processing any more input events.

If you want to _temporarily_ disable input for a Game Object, then it's better to set `input.enabled = false`, as it won't reset any of the Input Handlers internal properties. You can then toggle this back on as needed.

func (*Text) SetKeyA

func (self *Text) SetKeyA(member interface{})

SetKeyA The key of the image or texture used by this Game Object during rendering. If it is a string it's the string used to retrieve the texture from the Phaser Image Cache. It can also be an instance of a RenderTexture, BitmapData, Video or PIXI.Texture. If a Game Object is created without a key it is automatically assigned the key `__default` which is a 32x32 transparent PNG stored within the Cache. If a Game Object is given a key which doesn't exist in the Image Cache it is re-assigned the key `__missing` which is a 32x32 PNG of a green box with a line through it.

func (*Text) SetLeftA

func (self *Text) SetLeftA(member int)

SetLeftA The left coordinate of the Game Object. This is the same as `x - offsetX`.

func (*Text) SetLifespanA

func (self *Text) SetLifespanA(member int)

SetLifespanA The lifespan allows you to give a Game Object a lifespan in milliseconds.

Once the Game Object is 'born' you can set this to a positive value.

It is automatically decremented by the millisecond equivalent of `game.time.physicsElapsed` each frame. When it reaches zero it will call the `kill` method.

Very handy for particles, bullets, collectibles, or any other short-lived entity.

func (*Text) SetLineSpacingA

func (self *Text) SetLineSpacingA(member int)

SetLineSpacingA Additional spacing (in pixels) between each line of text if multi-line.

func (*Text) SetMaxHealthA

func (self *Text) SetMaxHealthA(member int)

SetMaxHealthA The Game Objects maximum health value. This works in combination with the `heal` method to ensure the health value never exceeds the maximum.

func (*Text) SetNameA

func (self *Text) SetNameA(member string)

SetNameA A user defined name given to this Game Object. This value isn't ever used internally by Phaser, it is meant as a game level property.

func (*Text) SetOffsetXA

func (self *Text) SetOffsetXA(member int)

SetOffsetXA The amount the Game Object is visually offset from its x coordinate. This is the same as `width * anchor.x`. It will only be > 0 if anchor.x is not equal to zero.

func (*Text) SetOffsetYA

func (self *Text) SetOffsetYA(member int)

SetOffsetYA The amount the Game Object is visually offset from its y coordinate. This is the same as `height * anchor.y`. It will only be > 0 if anchor.y is not equal to zero.

func (*Text) SetOutOfBoundsKillA

func (self *Text) SetOutOfBoundsKillA(member bool)

SetOutOfBoundsKillA If this and the `checkWorldBounds` property are both set to `true` then the `kill` method is called as soon as `inWorld` returns false.

func (*Text) SetOutOfCameraBoundsKillA

func (self *Text) SetOutOfCameraBoundsKillA(member bool)

SetOutOfCameraBoundsKillA If this and the `autoCull` property are both set to `true`, then the `kill` method is called as soon as the Game Object leaves the camera bounds.

func (*Text) SetPaddingA

func (self *Text) SetPaddingA(member *Point)

SetPaddingA Specify a padding value which is added to the line width and height when calculating the Text size. ALlows you to add extra spacing if Phaser is unable to accurately determine the true font dimensions.

func (*Text) SetPendingDestroyA

func (self *Text) SetPendingDestroyA(member bool)

SetPendingDestroyA A Game Object is that is pendingDestroy is flagged to have its destroy method called on the next logic update. You can set it directly to allow you to flag an object to be destroyed on its next update.

This is extremely useful if you wish to destroy an object from within one of its own callbacks such as with Buttons or other Input events.

func (*Text) SetPhysicsTypeA

func (self *Text) SetPhysicsTypeA(member int)

SetPhysicsTypeA The const physics body type of this object.

func (*Text) SetPreviousPositionA

func (self *Text) SetPreviousPositionA(member *Point)

SetPreviousPositionA The position the Game Object was located in the previous frame.

func (*Text) SetPreviousRotationA

func (self *Text) SetPreviousRotationA(member int)

SetPreviousRotationA The rotation the Game Object was in set to in the previous frame. Value is in radians.

func (*Text) SetRenderOrderIDA

func (self *Text) SetRenderOrderIDA(member int)

SetRenderOrderIDA The render order ID is used internally by the renderer and Input Manager and should not be modified. This property is mostly used internally by the renderers, but is exposed for the use of plugins.

func (*Text) SetResolutionA

func (self *Text) SetResolutionA(member int)

SetResolutionA The resolution of the canvas the text is rendered to. This defaults to match the resolution of the renderer, but can be changed on a per Text object basis.

func (*Text) SetRightA

func (self *Text) SetRightA(member int)

SetRightA The right coordinate of the Game Object. This is the same as `x + width - offsetX`.

func (*Text) SetScaleMaxA

func (self *Text) SetScaleMaxA(member *Point)

SetScaleMaxA The maximum scale this Game Object will scale up to.

It allows you to prevent a parent from scaling this Game Object higher than the given value.

Set it to `null` to remove the limit.

func (*Text) SetScaleMinA

func (self *Text) SetScaleMinA(member *Point)

SetScaleMinA The minimum scale this Game Object will scale down to.

It allows you to prevent a parent from scaling this Game Object lower than the given value.

Set it to `null` to remove the limit.

func (*Text) SetScaleMinMax

func (self *Text) SetScaleMinMax(minX interface{}, minY interface{}, maxX interface{}, maxY interface{})

SetScaleMinMax Sets the scaleMin and scaleMax values. These values are used to limit how far this Game Object will scale based on its parent.

For example if this Game Object has a `minScale` value of 1 and its parent has a `scale` value of 0.5, the 0.5 will be ignored and the scale value of 1 will be used, as the parents scale is lower than the minimum scale this Game Object should adhere to.

By setting these values you can carefully control how Game Objects deal with responsive scaling.

If only one parameter is given then that value will be used for both scaleMin and scaleMax: `setScaleMinMax(1)` = scaleMin.x, scaleMin.y, scaleMax.x and scaleMax.y all = 1

If only two parameters are given the first is set as scaleMin.x and y and the second as scaleMax.x and y: `setScaleMinMax(0.5, 2)` = scaleMin.x and y = 0.5 and scaleMax.x and y = 2

If you wish to set `scaleMin` with different values for x and y then either modify Game Object.scaleMin directly, or pass `null` for the `maxX` and `maxY` parameters.

Call `setScaleMinMax(null)` to clear all previously set values.

func (*Text) SetScaleMinMaxI

func (self *Text) SetScaleMinMaxI(args ...interface{})

SetScaleMinMaxI Sets the scaleMin and scaleMax values. These values are used to limit how far this Game Object will scale based on its parent.

For example if this Game Object has a `minScale` value of 1 and its parent has a `scale` value of 0.5, the 0.5 will be ignored and the scale value of 1 will be used, as the parents scale is lower than the minimum scale this Game Object should adhere to.

By setting these values you can carefully control how Game Objects deal with responsive scaling.

If only one parameter is given then that value will be used for both scaleMin and scaleMax: `setScaleMinMax(1)` = scaleMin.x, scaleMin.y, scaleMax.x and scaleMax.y all = 1

If only two parameters are given the first is set as scaleMin.x and y and the second as scaleMax.x and y: `setScaleMinMax(0.5, 2)` = scaleMin.x and y = 0.5 and scaleMax.x and y = 2

If you wish to set `scaleMin` with different values for x and y then either modify Game Object.scaleMin directly, or pass `null` for the `maxX` and `maxY` parameters.

Call `setScaleMinMax(null)` to clear all previously set values.

func (*Text) SetSetHealthA

func (self *Text) SetSetHealthA(member interface{})

SetSetHealthA Sets the health property of the Game Object to the given amount. Will never exceed the `maxHealth` value.

func (*Text) SetShaderA

func (self *Text) SetShaderA(member *AbstractFilter)

SetShaderA The shader that will be used to render this Sprite.

Set to null to remove a current shader.

func (*Text) SetShadow

func (self *Text) SetShadow() *Text

SetShadow Sets a drop shadow effect on the Text. You can specify the horizontal and vertical distance of the drop shadow with the `x` and `y` parameters. The color controls the shade of the shadow (default is black) and can be either an `rgba` or `hex` value. The blur is the strength of the shadow. A value of zero means a hard shadow, a value of 10 means a very soft shadow. To remove a shadow already in place you can call this method with no parameters set.

func (*Text) SetShadow1O

func (self *Text) SetShadow1O(x int) *Text

SetShadow1O Sets a drop shadow effect on the Text. You can specify the horizontal and vertical distance of the drop shadow with the `x` and `y` parameters. The color controls the shade of the shadow (default is black) and can be either an `rgba` or `hex` value. The blur is the strength of the shadow. A value of zero means a hard shadow, a value of 10 means a very soft shadow. To remove a shadow already in place you can call this method with no parameters set.

func (*Text) SetShadow2O

func (self *Text) SetShadow2O(x int, y int) *Text

SetShadow2O Sets a drop shadow effect on the Text. You can specify the horizontal and vertical distance of the drop shadow with the `x` and `y` parameters. The color controls the shade of the shadow (default is black) and can be either an `rgba` or `hex` value. The blur is the strength of the shadow. A value of zero means a hard shadow, a value of 10 means a very soft shadow. To remove a shadow already in place you can call this method with no parameters set.

func (*Text) SetShadow3O

func (self *Text) SetShadow3O(x int, y int, color string) *Text

SetShadow3O Sets a drop shadow effect on the Text. You can specify the horizontal and vertical distance of the drop shadow with the `x` and `y` parameters. The color controls the shade of the shadow (default is black) and can be either an `rgba` or `hex` value. The blur is the strength of the shadow. A value of zero means a hard shadow, a value of 10 means a very soft shadow. To remove a shadow already in place you can call this method with no parameters set.

func (*Text) SetShadow4O

func (self *Text) SetShadow4O(x int, y int, color string, blur int) *Text

SetShadow4O Sets a drop shadow effect on the Text. You can specify the horizontal and vertical distance of the drop shadow with the `x` and `y` parameters. The color controls the shade of the shadow (default is black) and can be either an `rgba` or `hex` value. The blur is the strength of the shadow. A value of zero means a hard shadow, a value of 10 means a very soft shadow. To remove a shadow already in place you can call this method with no parameters set.

func (*Text) SetShadow5O

func (self *Text) SetShadow5O(x int, y int, color string, blur int, shadowStroke bool) *Text

SetShadow5O Sets a drop shadow effect on the Text. You can specify the horizontal and vertical distance of the drop shadow with the `x` and `y` parameters. The color controls the shade of the shadow (default is black) and can be either an `rgba` or `hex` value. The blur is the strength of the shadow. A value of zero means a hard shadow, a value of 10 means a very soft shadow. To remove a shadow already in place you can call this method with no parameters set.

func (*Text) SetShadow6O

func (self *Text) SetShadow6O(x int, y int, color string, blur int, shadowStroke bool, shadowFill bool) *Text

SetShadow6O Sets a drop shadow effect on the Text. You can specify the horizontal and vertical distance of the drop shadow with the `x` and `y` parameters. The color controls the shade of the shadow (default is black) and can be either an `rgba` or `hex` value. The blur is the strength of the shadow. A value of zero means a hard shadow, a value of 10 means a very soft shadow. To remove a shadow already in place you can call this method with no parameters set.

func (*Text) SetShadowBlurA

func (self *Text) SetShadowBlurA(member int)

SetShadowBlurA The shadowBlur value. Make the shadow softer by applying a Gaussian blur to it. A number from 0 (no blur) up to approx. 10 (depending on scene).

func (*Text) SetShadowColorA

func (self *Text) SetShadowColorA(member string)

SetShadowColorA The color of the shadow, as given in CSS rgba format. Set the alpha component to 0 to disable the shadow.

func (*Text) SetShadowFillA

func (self *Text) SetShadowFillA(member bool)

SetShadowFillA Sets if the drop shadow is applied to the Text fill.

func (*Text) SetShadowI

func (self *Text) SetShadowI(args ...interface{}) *Text

SetShadowI Sets a drop shadow effect on the Text. You can specify the horizontal and vertical distance of the drop shadow with the `x` and `y` parameters. The color controls the shade of the shadow (default is black) and can be either an `rgba` or `hex` value. The blur is the strength of the shadow. A value of zero means a hard shadow, a value of 10 means a very soft shadow. To remove a shadow already in place you can call this method with no parameters set.

func (*Text) SetShadowOffsetXA

func (self *Text) SetShadowOffsetXA(member int)

SetShadowOffsetXA The shadowOffsetX value in pixels. This is how far offset horizontally the shadow effect will be.

func (*Text) SetShadowOffsetYA

func (self *Text) SetShadowOffsetYA(member int)

SetShadowOffsetYA The shadowOffsetY value in pixels. This is how far offset vertically the shadow effect will be.

func (*Text) SetShadowStrokeA

func (self *Text) SetShadowStrokeA(member bool)

SetShadowStrokeA Sets if the drop shadow is applied to the Text stroke.

func (*Text) SetSmoothedA

func (self *Text) SetSmoothedA(member bool)

SetSmoothedA Enable or disable texture smoothing for this Game Object.

It only takes effect if the Game Object is using an image based texture.

Smoothing is enabled by default.

func (*Text) SetStrokeA

func (self *Text) SetStrokeA(member string)

SetStrokeA A canvas fillstyle that will be used on the text stroke eg 'blue', '#FCFF00'.

func (*Text) SetStrokeColorsA

func (self *Text) SetStrokeColorsA(member []interface{})

SetStrokeColorsA An array of the stroke color values as specified by {@link Phaser.Text#addStrokeColor addStrokeColor}.

func (*Text) SetStrokeThicknessA

func (self *Text) SetStrokeThicknessA(member int)

SetStrokeThicknessA A number that represents the thickness of the stroke. Default is 0 (no stroke)

func (*Text) SetStyle

func (self *Text) SetStyle() *Text

SetStyle Set the style of the text by passing a single style object to it.

func (*Text) SetStyle10O

func (self *Text) SetStyle10O(style interface{}) *Text

SetStyle10O Set the style of the text by passing a single style object to it.

func (*Text) SetStyle11O

func (self *Text) SetStyle11O(style interface{}) *Text

SetStyle11O Set the style of the text by passing a single style object to it.

func (*Text) SetStyle12O

func (self *Text) SetStyle12O(style interface{}) *Text

SetStyle12O Set the style of the text by passing a single style object to it.

func (*Text) SetStyle13O

func (self *Text) SetStyle13O(style interface{}) *Text

SetStyle13O Set the style of the text by passing a single style object to it.

func (*Text) SetStyle14O

func (self *Text) SetStyle14O(style interface{}) *Text

SetStyle14O Set the style of the text by passing a single style object to it.

func (*Text) SetStyle15O

func (self *Text) SetStyle15O(style interface{}) *Text

SetStyle15O Set the style of the text by passing a single style object to it.

func (*Text) SetStyle16O

func (self *Text) SetStyle16O(style interface{}) *Text

SetStyle16O Set the style of the text by passing a single style object to it.

func (*Text) SetStyle17O

func (self *Text) SetStyle17O(style interface{}) *Text

SetStyle17O Set the style of the text by passing a single style object to it.

func (*Text) SetStyle18O

func (self *Text) SetStyle18O(style interface{}, update bool) *Text

SetStyle18O Set the style of the text by passing a single style object to it.

func (*Text) SetStyle1O

func (self *Text) SetStyle1O(style interface{}) *Text

SetStyle1O Set the style of the text by passing a single style object to it.

func (*Text) SetStyle2O

func (self *Text) SetStyle2O(style interface{}) *Text

SetStyle2O Set the style of the text by passing a single style object to it.

func (*Text) SetStyle3O

func (self *Text) SetStyle3O(style interface{}) *Text

SetStyle3O Set the style of the text by passing a single style object to it.

func (*Text) SetStyle4O

func (self *Text) SetStyle4O(style interface{}) *Text

SetStyle4O Set the style of the text by passing a single style object to it.

func (*Text) SetStyle5O

func (self *Text) SetStyle5O(style interface{}) *Text

SetStyle5O Set the style of the text by passing a single style object to it.

func (*Text) SetStyle6O

func (self *Text) SetStyle6O(style interface{}) *Text

SetStyle6O Set the style of the text by passing a single style object to it.

func (*Text) SetStyle7O

func (self *Text) SetStyle7O(style interface{}) *Text

SetStyle7O Set the style of the text by passing a single style object to it.

func (*Text) SetStyle8O

func (self *Text) SetStyle8O(style interface{}) *Text

SetStyle8O Set the style of the text by passing a single style object to it.

func (*Text) SetStyle9O

func (self *Text) SetStyle9O(style interface{}) *Text

SetStyle9O Set the style of the text by passing a single style object to it.

func (*Text) SetStyleI

func (self *Text) SetStyleI(args ...interface{}) *Text

SetStyleI Set the style of the text by passing a single style object to it.

func (*Text) SetTabsA

func (self *Text) SetTabsA(member interface{})

SetTabsA The size (in pixels) of the tabs, for when text includes tab characters. 0 disables. Can be an integer or an array of varying tab sizes, one tab per element. For example if you set tabs to 100 then when Text encounters a tab it will jump ahead 100 pixels. If you set tabs to be `[100,200]` then it will set the first tab at 100px and the second at 200px.

func (*Text) SetText

func (self *Text) SetText() *Text

SetText The text to be displayed by this Text object. Use a \n to insert a carriage return and split the text. The text will be rendered with any style currently set.

Use the optional `immediate` argument if you need the Text display to update immediately.

If not it will re-create the texture of this Text object during the next time the render loop is called.

func (*Text) SetText1O

func (self *Text) SetText1O(text string) *Text

SetText1O The text to be displayed by this Text object. Use a \n to insert a carriage return and split the text. The text will be rendered with any style currently set.

Use the optional `immediate` argument if you need the Text display to update immediately.

If not it will re-create the texture of this Text object during the next time the render loop is called.

func (*Text) SetText2O

func (self *Text) SetText2O(text string, immediate bool) *Text

SetText2O The text to be displayed by this Text object. Use a \n to insert a carriage return and split the text. The text will be rendered with any style currently set.

Use the optional `immediate` argument if you need the Text display to update immediately.

If not it will re-create the texture of this Text object during the next time the render loop is called.

func (*Text) SetTextA

func (self *Text) SetTextA(member string)

SetTextA The text to be displayed by this Text object. Use a \n to insert a carriage return and split the text. The text will be rendered with any style currently set.

func (*Text) SetTextBounds

func (self *Text) SetTextBounds() *Text

SetTextBounds The Text Bounds is a rectangular region that you control the dimensions of into which the Text object itself is positioned, regardless of the number of lines in the text, the font size or any other attribute.

Alignment is controlled via the properties `boundsAlignH` and `boundsAlignV` within the Text.style object, or can be directly set through the setters `Text.boundsAlignH` and `Text.boundsAlignV`. Bounds alignment is independent of text alignment.

For example: If your game is 800x600 in size and you set the text bounds to be 0,0,800,600 then by setting boundsAlignH to 'center' and boundsAlignV to 'bottom' the text will render in the center and at the bottom of your game window, regardless of how many lines of text there may be. Even if you adjust the text content or change the style it will remain at the bottom center of the text bounds.

This is especially powerful when you need to align text against specific coordinates in your game, but the actual text dimensions may vary based on font (say for multi-lingual games).

If `Text.wordWrapWidth` is greater than the width of the text bounds it is clamped to match the bounds width.

Call this method with no arguments given to reset an existing textBounds.

It works by calculating the final position based on the Text.canvas size, which is modified as the text is updated. Some fonts have additional padding around them which you can mitigate by tweaking the Text.padding property. It then adjusts the `pivot` property based on the given bounds and canvas size. This means if you need to set the pivot property directly in your game then you either cannot use `setTextBounds` or you must place the Text object inside another DisplayObject on which you set the pivot.

func (*Text) SetTextBounds1O

func (self *Text) SetTextBounds1O(x int) *Text

SetTextBounds1O The Text Bounds is a rectangular region that you control the dimensions of into which the Text object itself is positioned, regardless of the number of lines in the text, the font size or any other attribute.

Alignment is controlled via the properties `boundsAlignH` and `boundsAlignV` within the Text.style object, or can be directly set through the setters `Text.boundsAlignH` and `Text.boundsAlignV`. Bounds alignment is independent of text alignment.

For example: If your game is 800x600 in size and you set the text bounds to be 0,0,800,600 then by setting boundsAlignH to 'center' and boundsAlignV to 'bottom' the text will render in the center and at the bottom of your game window, regardless of how many lines of text there may be. Even if you adjust the text content or change the style it will remain at the bottom center of the text bounds.

This is especially powerful when you need to align text against specific coordinates in your game, but the actual text dimensions may vary based on font (say for multi-lingual games).

If `Text.wordWrapWidth` is greater than the width of the text bounds it is clamped to match the bounds width.

Call this method with no arguments given to reset an existing textBounds.

It works by calculating the final position based on the Text.canvas size, which is modified as the text is updated. Some fonts have additional padding around them which you can mitigate by tweaking the Text.padding property. It then adjusts the `pivot` property based on the given bounds and canvas size. This means if you need to set the pivot property directly in your game then you either cannot use `setTextBounds` or you must place the Text object inside another DisplayObject on which you set the pivot.

func (*Text) SetTextBounds2O

func (self *Text) SetTextBounds2O(x int, y int) *Text

SetTextBounds2O The Text Bounds is a rectangular region that you control the dimensions of into which the Text object itself is positioned, regardless of the number of lines in the text, the font size or any other attribute.

Alignment is controlled via the properties `boundsAlignH` and `boundsAlignV` within the Text.style object, or can be directly set through the setters `Text.boundsAlignH` and `Text.boundsAlignV`. Bounds alignment is independent of text alignment.

For example: If your game is 800x600 in size and you set the text bounds to be 0,0,800,600 then by setting boundsAlignH to 'center' and boundsAlignV to 'bottom' the text will render in the center and at the bottom of your game window, regardless of how many lines of text there may be. Even if you adjust the text content or change the style it will remain at the bottom center of the text bounds.

This is especially powerful when you need to align text against specific coordinates in your game, but the actual text dimensions may vary based on font (say for multi-lingual games).

If `Text.wordWrapWidth` is greater than the width of the text bounds it is clamped to match the bounds width.

Call this method with no arguments given to reset an existing textBounds.

It works by calculating the final position based on the Text.canvas size, which is modified as the text is updated. Some fonts have additional padding around them which you can mitigate by tweaking the Text.padding property. It then adjusts the `pivot` property based on the given bounds and canvas size. This means if you need to set the pivot property directly in your game then you either cannot use `setTextBounds` or you must place the Text object inside another DisplayObject on which you set the pivot.

func (*Text) SetTextBounds3O

func (self *Text) SetTextBounds3O(x int, y int, width int) *Text

SetTextBounds3O The Text Bounds is a rectangular region that you control the dimensions of into which the Text object itself is positioned, regardless of the number of lines in the text, the font size or any other attribute.

Alignment is controlled via the properties `boundsAlignH` and `boundsAlignV` within the Text.style object, or can be directly set through the setters `Text.boundsAlignH` and `Text.boundsAlignV`. Bounds alignment is independent of text alignment.

For example: If your game is 800x600 in size and you set the text bounds to be 0,0,800,600 then by setting boundsAlignH to 'center' and boundsAlignV to 'bottom' the text will render in the center and at the bottom of your game window, regardless of how many lines of text there may be. Even if you adjust the text content or change the style it will remain at the bottom center of the text bounds.

This is especially powerful when you need to align text against specific coordinates in your game, but the actual text dimensions may vary based on font (say for multi-lingual games).

If `Text.wordWrapWidth` is greater than the width of the text bounds it is clamped to match the bounds width.

Call this method with no arguments given to reset an existing textBounds.

It works by calculating the final position based on the Text.canvas size, which is modified as the text is updated. Some fonts have additional padding around them which you can mitigate by tweaking the Text.padding property. It then adjusts the `pivot` property based on the given bounds and canvas size. This means if you need to set the pivot property directly in your game then you either cannot use `setTextBounds` or you must place the Text object inside another DisplayObject on which you set the pivot.

func (*Text) SetTextBounds4O

func (self *Text) SetTextBounds4O(x int, y int, width int, height int) *Text

SetTextBounds4O The Text Bounds is a rectangular region that you control the dimensions of into which the Text object itself is positioned, regardless of the number of lines in the text, the font size or any other attribute.

Alignment is controlled via the properties `boundsAlignH` and `boundsAlignV` within the Text.style object, or can be directly set through the setters `Text.boundsAlignH` and `Text.boundsAlignV`. Bounds alignment is independent of text alignment.

For example: If your game is 800x600 in size and you set the text bounds to be 0,0,800,600 then by setting boundsAlignH to 'center' and boundsAlignV to 'bottom' the text will render in the center and at the bottom of your game window, regardless of how many lines of text there may be. Even if you adjust the text content or change the style it will remain at the bottom center of the text bounds.

This is especially powerful when you need to align text against specific coordinates in your game, but the actual text dimensions may vary based on font (say for multi-lingual games).

If `Text.wordWrapWidth` is greater than the width of the text bounds it is clamped to match the bounds width.

Call this method with no arguments given to reset an existing textBounds.

It works by calculating the final position based on the Text.canvas size, which is modified as the text is updated. Some fonts have additional padding around them which you can mitigate by tweaking the Text.padding property. It then adjusts the `pivot` property based on the given bounds and canvas size. This means if you need to set the pivot property directly in your game then you either cannot use `setTextBounds` or you must place the Text object inside another DisplayObject on which you set the pivot.

func (*Text) SetTextBoundsA

func (self *Text) SetTextBoundsA(member *Rectangle)

SetTextBoundsA The textBounds property allows you to specify a rectangular region upon which text alignment is based. See `Text.setTextBounds` for more details.

func (*Text) SetTextBoundsI

func (self *Text) SetTextBoundsI(args ...interface{}) *Text

SetTextBoundsI The Text Bounds is a rectangular region that you control the dimensions of into which the Text object itself is positioned, regardless of the number of lines in the text, the font size or any other attribute.

Alignment is controlled via the properties `boundsAlignH` and `boundsAlignV` within the Text.style object, or can be directly set through the setters `Text.boundsAlignH` and `Text.boundsAlignV`. Bounds alignment is independent of text alignment.

For example: If your game is 800x600 in size and you set the text bounds to be 0,0,800,600 then by setting boundsAlignH to 'center' and boundsAlignV to 'bottom' the text will render in the center and at the bottom of your game window, regardless of how many lines of text there may be. Even if you adjust the text content or change the style it will remain at the bottom center of the text bounds.

This is especially powerful when you need to align text against specific coordinates in your game, but the actual text dimensions may vary based on font (say for multi-lingual games).

If `Text.wordWrapWidth` is greater than the width of the text bounds it is clamped to match the bounds width.

Call this method with no arguments given to reset an existing textBounds.

It works by calculating the final position based on the Text.canvas size, which is modified as the text is updated. Some fonts have additional padding around them which you can mitigate by tweaking the Text.padding property. It then adjusts the `pivot` property based on the given bounds and canvas size. This means if you need to set the pivot property directly in your game then you either cannot use `setTextBounds` or you must place the Text object inside another DisplayObject on which you set the pivot.

func (*Text) SetTextI

func (self *Text) SetTextI(args ...interface{}) *Text

SetTextI The text to be displayed by this Text object. Use a \n to insert a carriage return and split the text. The text will be rendered with any style currently set.

Use the optional `immediate` argument if you need the Text display to update immediately.

If not it will re-create the texture of this Text object during the next time the render loop is called.

func (*Text) SetTexture

func (self *Text) SetTexture(texture *Texture)

SetTexture Sets the texture of the sprite. Be warned that this doesn't remove or destroy the previous

texture this Sprite was using.

func (*Text) SetTexture1O

func (self *Text) SetTexture1O(texture *Texture, destroy bool)

SetTexture1O Sets the texture of the sprite. Be warned that this doesn't remove or destroy the previous

texture this Sprite was using.

func (*Text) SetTextureA

func (self *Text) SetTextureA(member *Texture)

SetTextureA The texture that the sprite is using

func (*Text) SetTextureI

func (self *Text) SetTextureI(args ...interface{})

SetTextureI Sets the texture of the sprite. Be warned that this doesn't remove or destroy the previous

texture this Sprite was using.

func (*Text) SetTintA

func (self *Text) SetTintA(member int)

SetTintA The tint applied to the sprite. This is a hex value. A value of 0xFFFFFF will remove any tint effect.

func (*Text) SetTintedTextureA

func (self *Text) SetTintedTextureA(member *Canvas)

SetTintedTextureA A canvas that contains the tinted version of the Sprite (in Canvas mode, WebGL doesn't populate this)

func (*Text) SetTopA

func (self *Text) SetTopA(member int)

SetTopA The y coordinate of the Game Object. This is the same as `y - offsetY`.

func (*Text) SetTransformCallbackA

func (self *Text) SetTransformCallbackA(member interface{})

SetTransformCallbackA The callback that will apply any scale limiting to the worldTransform.

func (*Text) SetTransformCallbackContextA

func (self *Text) SetTransformCallbackContextA(member interface{})

SetTransformCallbackContextA The context under which `transformCallback` is called.

func (*Text) SetTypeA

func (self *Text) SetTypeA(member int)

SetTypeA The const type of this object.

func (*Text) SetUseAdvancedWrapA

func (self *Text) SetUseAdvancedWrapA(member bool)

SetUseAdvancedWrapA Will this Text object use Basic or Advanced Word Wrapping?

Advanced wrapping breaks long words if they are the first of a line, and repeats the process as necessary. White space is condensed (e.g., consecutive spaces are replaced with one). Lines are trimmed of white space before processing.

It throws an error if wordWrapWidth is less than a single character.

func (*Text) SetWidthA

func (self *Text) SetWidthA(member int)

SetWidthA The width of the Text. Setting this will modify the scale to achieve the value requested.

func (*Text) SetWordWrapA

func (self *Text) SetWordWrapA(member bool)

SetWordWrapA Indicates if word wrap should be used.

func (*Text) SetWordWrapWidthA

func (self *Text) SetWordWrapWidthA(member int)

SetWordWrapWidthA The width at which text will wrap.

func (*Text) SetWorldA

func (self *Text) SetWorldA(member *Point)

SetWorldA The world coordinates of this Game Object in pixels. Depending on where in the display list this Game Object is placed this value can differ from `position`, which contains the x/y coordinates relative to the Game Objects parent.

func (*Text) SetXA

func (self *Text) SetXA(member int)

SetXA The position of the Game Object on the x axis relative to the local coordinates of the parent.

func (*Text) SetYA

func (self *Text) SetYA(member int)

SetYA The position of the Game Object on the y axis relative to the local coordinates of the parent.

func (*Text) SetZA

func (self *Text) SetZA(member int)

SetZA The z depth of this Game Object within its parent Group. No two objects in a Group can have the same z value. This value is adjusted automatically whenever the Group hierarchy changes. If you wish to re-order the layering of a Game Object then see methods like Group.moveUp or Group.bringToTop.

func (*Text) Shader

func (self *Text) Shader() *AbstractFilter

Shader The shader that will be used to render this Sprite.

Set to null to remove a current shader.

func (*Text) ShadowBlur

func (self *Text) ShadowBlur() int

ShadowBlur The shadowBlur value. Make the shadow softer by applying a Gaussian blur to it. A number from 0 (no blur) up to approx. 10 (depending on scene).

func (*Text) ShadowColor

func (self *Text) ShadowColor() string

ShadowColor The color of the shadow, as given in CSS rgba format. Set the alpha component to 0 to disable the shadow.

func (*Text) ShadowFill

func (self *Text) ShadowFill() bool

ShadowFill Sets if the drop shadow is applied to the Text fill.

func (*Text) ShadowOffsetX

func (self *Text) ShadowOffsetX() int

ShadowOffsetX The shadowOffsetX value in pixels. This is how far offset horizontally the shadow effect will be.

func (*Text) ShadowOffsetY

func (self *Text) ShadowOffsetY() int

ShadowOffsetY The shadowOffsetY value in pixels. This is how far offset vertically the shadow effect will be.

func (*Text) ShadowStroke

func (self *Text) ShadowStroke() bool

ShadowStroke Sets if the drop shadow is applied to the Text stroke.

func (*Text) Smoothed

func (self *Text) Smoothed() bool

Smoothed Enable or disable texture smoothing for this Game Object.

It only takes effect if the Game Object is using an image based texture.

Smoothing is enabled by default.

func (*Text) Stroke

func (self *Text) Stroke() string

Stroke A canvas fillstyle that will be used on the text stroke eg 'blue', '#FCFF00'.

func (*Text) StrokeColors

func (self *Text) StrokeColors() []interface{}

StrokeColors An array of the stroke color values as specified by {@link Phaser.Text#addStrokeColor addStrokeColor}.

func (*Text) StrokeThickness

func (self *Text) StrokeThickness() int

StrokeThickness A number that represents the thickness of the stroke. Default is 0 (no stroke)

func (*Text) SwapChildren

func (self *Text) SwapChildren(child *DisplayObject, child2 *DisplayObject)

SwapChildren Swaps the position of 2 Display Objects within this container.

func (*Text) SwapChildrenI

func (self *Text) SwapChildrenI(args ...interface{})

SwapChildrenI Swaps the position of 2 Display Objects within this container.

func (*Text) Tabs

func (self *Text) Tabs() interface{}

Tabs The size (in pixels) of the tabs, for when text includes tab characters. 0 disables. Can be an integer or an array of varying tab sizes, one tab per element. For example if you set tabs to 100 then when Text encounters a tab it will jump ahead 100 pixels. If you set tabs to be `[100,200]` then it will set the first tab at 100px and the second at 200px.

func (*Text) Text

func (self *Text) Text() string

Text The text to be displayed by this Text object. Use a \n to insert a carriage return and split the text. The text will be rendered with any style currently set.

func (*Text) TextBounds

func (self *Text) TextBounds() *Rectangle

TextBounds The textBounds property allows you to specify a rectangular region upon which text alignment is based. See `Text.setTextBounds` for more details.

func (*Text) Texture

func (self *Text) Texture() *Texture

Texture The texture that the sprite is using

func (*Text) Tint

func (self *Text) Tint() int

Tint The tint applied to the sprite. This is a hex value. A value of 0xFFFFFF will remove any tint effect.

func (*Text) TintedTexture

func (self *Text) TintedTexture() *Canvas

TintedTexture A canvas that contains the tinted version of the Sprite (in Canvas mode, WebGL doesn't populate this)

func (*Text) Top

func (self *Text) Top() int

Top The y coordinate of the Game Object. This is the same as `y - offsetY`.

func (*Text) TransformCallback

func (self *Text) TransformCallback() interface{}

TransformCallback The callback that will apply any scale limiting to the worldTransform.

func (*Text) TransformCallbackContext

func (self *Text) TransformCallbackContext() interface{}

TransformCallbackContext The context under which `transformCallback` is called.

func (*Text) Type

func (self *Text) Type() int

Type The const type of this object.

func (*Text) Update

func (self *Text) Update()

Update Override this function to handle any special update requirements.

func (*Text) UpdateCrop

func (self *Text) UpdateCrop()

UpdateCrop If you have set a crop rectangle on this Game Object via `crop` and since modified the `cropRect` property, or the rectangle it references, then you need to update the crop frame by calling this method.

func (*Text) UpdateCropI

func (self *Text) UpdateCropI(args ...interface{})

UpdateCropI If you have set a crop rectangle on this Game Object via `crop` and since modified the `cropRect` property, or the rectangle it references, then you need to update the crop frame by calling this method.

func (*Text) UpdateFont

func (self *Text) UpdateFont(components interface{})

UpdateFont Updates the internal `style.font` if it now differs according to generation from components.

func (*Text) UpdateFontI

func (self *Text) UpdateFontI(args ...interface{})

UpdateFontI Updates the internal `style.font` if it now differs according to generation from components.

func (*Text) UpdateI

func (self *Text) UpdateI(args ...interface{})

UpdateI Override this function to handle any special update requirements.

func (*Text) UpdateLine

func (self *Text) UpdateLine()

UpdateLine Updates a line of text, applying fill and stroke per-character colors or style and weight per-character font if applicable.

func (*Text) UpdateLineI

func (self *Text) UpdateLineI(args ...interface{})

UpdateLineI Updates a line of text, applying fill and stroke per-character colors or style and weight per-character font if applicable.

func (*Text) UpdateShadow

func (self *Text) UpdateShadow(state bool)

UpdateShadow Sets the Shadow on the Text.context based on the Style settings, or disables it if not enabled. This is called automatically by Text.updateText.

func (*Text) UpdateShadowI

func (self *Text) UpdateShadowI(args ...interface{})

UpdateShadowI Sets the Shadow on the Text.context based on the Style settings, or disables it if not enabled. This is called automatically by Text.updateText.

func (*Text) UpdateText

func (self *Text) UpdateText()

UpdateText Renders text. This replaces the Pixi.Text.updateText function as we need a few extra bits in here.

func (*Text) UpdateTextI

func (self *Text) UpdateTextI(args ...interface{})

UpdateTextI Renders text. This replaces the Pixi.Text.updateText function as we need a few extra bits in here.

func (*Text) UpdateTexture

func (self *Text) UpdateTexture()

UpdateTexture Updates the texture based on the canvas dimensions.

func (*Text) UpdateTextureI

func (self *Text) UpdateTextureI(args ...interface{})

UpdateTextureI Updates the texture based on the canvas dimensions.

func (*Text) UseAdvancedWrap

func (self *Text) UseAdvancedWrap() bool

UseAdvancedWrap Will this Text object use Basic or Advanced Word Wrapping?

Advanced wrapping breaks long words if they are the first of a line, and repeats the process as necessary. White space is condensed (e.g., consecutive spaces are replaced with one). Lines are trimmed of white space before processing.

It throws an error if wordWrapWidth is less than a single character.

func (*Text) Width

func (self *Text) Width() int

Width The width of the Text. Setting this will modify the scale to achieve the value requested.

func (*Text) WordWrap

func (self *Text) WordWrap() bool

WordWrap Indicates if word wrap should be used.

func (*Text) WordWrapWidth

func (self *Text) WordWrapWidth() int

WordWrapWidth The width at which text will wrap.

func (*Text) World

func (self *Text) World() *Point

World The world coordinates of this Game Object in pixels. Depending on where in the display list this Game Object is placed this value can differ from `position`, which contains the x/y coordinates relative to the Game Objects parent.

func (*Text) X

func (self *Text) X() int

X The position of the Game Object on the x axis relative to the local coordinates of the parent.

func (*Text) Y

func (self *Text) Y() int

Y The position of the Game Object on the y axis relative to the local coordinates of the parent.

func (*Text) Z

func (self *Text) Z() int

Z The z depth of this Game Object within its parent Group. No two objects in a Group can have the same z value. This value is adjusted automatically whenever the Group hierarchy changes. If you wish to re-order the layering of a Game Object then see methods like Group.moveUp or Group.bringToTop.

type Texture

type Texture struct {
	*js.Object
}

Texture A texture stores the information that represents an image or part of an image. It cannot be added

to the display list directly. Instead use it as the texture for a PIXI.Sprite. If no frame is provided then the whole image is used.

func NewTexture

func NewTexture(baseTexture *BaseTexture, frame *Rectangle) *Texture

NewTexture A texture stores the information that represents an image or part of an image. It cannot be added

to the display list directly. Instead use it as the texture for a PIXI.Sprite. If no frame is provided then the whole image is used.

func NewTexture1O

func NewTexture1O(baseTexture *BaseTexture, frame *Rectangle, crop *Rectangle) *Texture

NewTexture1O A texture stores the information that represents an image or part of an image. It cannot be added

to the display list directly. Instead use it as the texture for a PIXI.Sprite. If no frame is provided then the whole image is used.

func NewTexture2O

func NewTexture2O(baseTexture *BaseTexture, frame *Rectangle, crop *Rectangle, trim *Rectangle) *Texture

NewTexture2O A texture stores the information that represents an image or part of an image. It cannot be added

to the display list directly. Instead use it as the texture for a PIXI.Sprite. If no frame is provided then the whole image is used.

func NewTextureI

func NewTextureI(args ...interface{}) *Texture

NewTextureI A texture stores the information that represents an image or part of an image. It cannot be added

to the display list directly. Instead use it as the texture for a PIXI.Sprite. If no frame is provided then the whole image is used.

func ToTexture

func ToTexture(jsStruct interface{}) *Texture

Texture Binding conversion method to Texture point

func (*Texture) BaseTexture

func (self *Texture) BaseTexture() *BaseTexture

BaseTexture The base texture that this texture uses.

func (*Texture) Crop

func (self *Texture) Crop() *Rectangle

Crop This is the area of the BaseTexture image to actually copy to the Canvas / WebGL when rendering,

irrespective of the actual frame size or placement (which can be influenced by trimmed texture atlases)

func (*Texture) Destroy

func (self *Texture) Destroy(destroyBase bool)

Destroy Destroys this texture

func (*Texture) DestroyI

func (self *Texture) DestroyI(args ...interface{})

DestroyI Destroys this texture

func (*Texture) Frame

func (self *Texture) Frame() *Rectangle

Frame The frame specifies the region of the base texture that this texture uses

func (*Texture) FromCanvas

func (self *Texture) FromCanvas(canvas *Canvas, scaleMode int) *Texture

FromCanvas Helper function that creates a new a Texture based on the given canvas element.

func (*Texture) FromCanvasI

func (self *Texture) FromCanvasI(args ...interface{}) *Texture

FromCanvasI Helper function that creates a new a Texture based on the given canvas element.

func (*Texture) Height

func (self *Texture) Height() int

Height The height of the Texture in pixels.

func (*Texture) IsTiling

func (self *Texture) IsTiling() bool

IsTiling Is this a tiling texture? As used by the likes of a TilingSprite.

func (*Texture) NoFrame

func (self *Texture) NoFrame() bool

NoFrame Does this Texture have any frame data assigned to it?

func (*Texture) OnBaseTextureLoaded

func (self *Texture) OnBaseTextureLoaded()

OnBaseTextureLoaded Called when the base texture is loaded

func (*Texture) OnBaseTextureLoadedI

func (self *Texture) OnBaseTextureLoadedI(args ...interface{})

OnBaseTextureLoadedI Called when the base texture is loaded

func (*Texture) RequiresReTint

func (self *Texture) RequiresReTint() bool

RequiresReTint This will let a renderer know that a tinted parent has updated its texture.

func (*Texture) RequiresUpdate

func (self *Texture) RequiresUpdate() bool

RequiresUpdate This will let a renderer know that a texture has been updated (used mainly for webGL uv updates)

func (*Texture) SetBaseTextureA

func (self *Texture) SetBaseTextureA(member *BaseTexture)

SetBaseTextureA The base texture that this texture uses.

func (*Texture) SetCropA

func (self *Texture) SetCropA(member *Rectangle)

SetCropA This is the area of the BaseTexture image to actually copy to the Canvas / WebGL when rendering,

irrespective of the actual frame size or placement (which can be influenced by trimmed texture atlases)

func (*Texture) SetFrame

func (self *Texture) SetFrame(frame *Rectangle)

SetFrame Specifies the region of the baseTexture that this texture will use.

func (*Texture) SetFrameA

func (self *Texture) SetFrameA(member *Rectangle)

SetFrameA The frame specifies the region of the base texture that this texture uses

func (*Texture) SetFrameI

func (self *Texture) SetFrameI(args ...interface{})

SetFrameI Specifies the region of the baseTexture that this texture will use.

func (*Texture) SetHeightA

func (self *Texture) SetHeightA(member int)

SetHeightA The height of the Texture in pixels.

func (*Texture) SetIsTilingA

func (self *Texture) SetIsTilingA(member bool)

SetIsTilingA Is this a tiling texture? As used by the likes of a TilingSprite.

func (*Texture) SetNoFrameA

func (self *Texture) SetNoFrameA(member bool)

SetNoFrameA Does this Texture have any frame data assigned to it?

func (*Texture) SetRequiresReTintA

func (self *Texture) SetRequiresReTintA(member bool)

SetRequiresReTintA This will let a renderer know that a tinted parent has updated its texture.

func (*Texture) SetRequiresUpdateA

func (self *Texture) SetRequiresUpdateA(member bool)

SetRequiresUpdateA This will let a renderer know that a texture has been updated (used mainly for webGL uv updates)

func (*Texture) SetTrimA

func (self *Texture) SetTrimA(member *Rectangle)

SetTrimA The texture trim data.

func (*Texture) SetValidA

func (self *Texture) SetValidA(member bool)

SetValidA This will let the renderer know if the texture is valid. If it's not then it cannot be rendered.

func (*Texture) SetWidthA

func (self *Texture) SetWidthA(member int)

SetWidthA The width of the Texture in pixels.

func (*Texture) Trim

func (self *Texture) Trim() *Rectangle

Trim The texture trim data.

func (*Texture) Valid

func (self *Texture) Valid() bool

Valid This will let the renderer know if the texture is valid. If it's not then it cannot be rendered.

func (*Texture) Width

func (self *Texture) Width() int

Width The width of the Texture in pixels.

type Tile

type Tile struct {
	*js.Object
}

Tile A Tile is a representation of a single tile within the Tilemap.

func NewTile

func NewTile(layer interface{}, index int, x int, y int, width int, height int) *Tile

NewTile A Tile is a representation of a single tile within the Tilemap.

func NewTileI

func NewTileI(args ...interface{}) *Tile

NewTileI A Tile is a representation of a single tile within the Tilemap.

func ToTile

func ToTile(jsStruct interface{}) *Tile

Tile Binding conversion method to Tile point

func (*Tile) Alpha

func (self *Tile) Alpha() int

Alpha The alpha value at which this tile is drawn to the canvas.

func (*Tile) Bottom

func (self *Tile) Bottom() int

Bottom The sum of the y and height properties.

func (*Tile) CanCollide

func (self *Tile) CanCollide() bool

CanCollide True if this tile can collide on any of its faces or has a collision callback set.

func (*Tile) CenterX

func (self *Tile) CenterX() interface{}

CenterX The width of the tile in pixels.

func (*Tile) CenterY

func (self *Tile) CenterY() interface{}

CenterY The height of the tile in pixels.

func (*Tile) CollideDown

func (self *Tile) CollideDown() bool

CollideDown Indicating collide with any object on the bottom.

func (*Tile) CollideLeft

func (self *Tile) CollideLeft() bool

CollideLeft Indicating collide with any object on the left.

func (*Tile) CollideRight

func (self *Tile) CollideRight() bool

CollideRight Indicating collide with any object on the right.

func (*Tile) CollideUp

func (self *Tile) CollideUp() bool

CollideUp Indicating collide with any object on the top.

func (*Tile) Collides

func (self *Tile) Collides() bool

Collides True if this tile can collide on any of its faces.

func (*Tile) CollisionCallback

func (self *Tile) CollisionCallback() interface{}

CollisionCallback Tile collision callback.

func (*Tile) CollisionCallbackContext

func (self *Tile) CollisionCallbackContext() interface{}

CollisionCallbackContext The context in which the collision callback will be called.

func (*Tile) ContainsPoint

func (self *Tile) ContainsPoint(x int, y int) bool

ContainsPoint Check if the given x and y world coordinates are within this Tile.

func (*Tile) ContainsPointI

func (self *Tile) ContainsPointI(args ...interface{}) bool

ContainsPointI Check if the given x and y world coordinates are within this Tile.

func (*Tile) Copy

func (self *Tile) Copy(tile *Tile)

Copy Copies the tile data and properties from the given tile to this tile.

func (*Tile) CopyI

func (self *Tile) CopyI(args ...interface{})

CopyI Copies the tile data and properties from the given tile to this tile.

func (*Tile) Destroy

func (self *Tile) Destroy()

Destroy Clean up memory.

func (*Tile) DestroyI

func (self *Tile) DestroyI(args ...interface{})

DestroyI Clean up memory.

func (*Tile) FaceBottom

func (self *Tile) FaceBottom() bool

FaceBottom Is the bottom of this tile an interesting edge?

func (*Tile) FaceLeft

func (self *Tile) FaceLeft() bool

FaceLeft Is the left of this tile an interesting edge?

func (*Tile) FaceRight

func (self *Tile) FaceRight() bool

FaceRight Is the right of this tile an interesting edge?

func (*Tile) FaceTop

func (self *Tile) FaceTop() bool

FaceTop Is the top of this tile an interesting edge?

func (*Tile) Flipped

func (self *Tile) Flipped() bool

Flipped Whether this tile is flipped (mirrored) or not.

func (*Tile) Height

func (self *Tile) Height() int

Height The height of the tile in pixels.

func (*Tile) Index

func (self *Tile) Index() int

Index The index of this tile within the map data corresponding to the tileset, or -1 if this represents a blank/null tile.

func (*Tile) Intersects

func (self *Tile) Intersects(x int, y int, right int, bottom int)

Intersects Check for intersection with this tile.

func (*Tile) IntersectsI

func (self *Tile) IntersectsI(args ...interface{})

IntersectsI Check for intersection with this tile.

func (*Tile) IsInteresting

func (self *Tile) IsInteresting(collides bool, faces bool) bool

IsInteresting Is this tile interesting?

func (*Tile) IsInterestingI

func (self *Tile) IsInterestingI(args ...interface{}) bool

IsInterestingI Is this tile interesting?

func (*Tile) Layer

func (self *Tile) Layer() interface{}

Layer The layer in the Tilemap data that this tile belongs to.

func (*Tile) Left

func (self *Tile) Left() int

Left The x value in pixels.

func (*Tile) Properties

func (self *Tile) Properties() interface{}

Properties Tile specific properties.

func (*Tile) ResetCollision

func (self *Tile) ResetCollision()

ResetCollision Reset collision status flags.

func (*Tile) ResetCollisionI

func (self *Tile) ResetCollisionI(args ...interface{})

ResetCollisionI Reset collision status flags.

func (*Tile) Right

func (self *Tile) Right() int

Right The sum of the x and width properties.

func (*Tile) Rotation

func (self *Tile) Rotation() int

Rotation The rotation angle of this tile.

func (*Tile) Scanned

func (self *Tile) Scanned() bool

Scanned Has this tile been walked / turned into a poly?

func (*Tile) SetAlphaA

func (self *Tile) SetAlphaA(member int)

SetAlphaA The alpha value at which this tile is drawn to the canvas.

func (*Tile) SetBottomA

func (self *Tile) SetBottomA(member int)

SetBottomA The sum of the y and height properties.

func (*Tile) SetCanCollideA

func (self *Tile) SetCanCollideA(member bool)

SetCanCollideA True if this tile can collide on any of its faces or has a collision callback set.

func (*Tile) SetCenterXA

func (self *Tile) SetCenterXA(member interface{})

SetCenterXA The width of the tile in pixels.

func (*Tile) SetCenterYA

func (self *Tile) SetCenterYA(member interface{})

SetCenterYA The height of the tile in pixels.

func (*Tile) SetCollideDownA

func (self *Tile) SetCollideDownA(member bool)

SetCollideDownA Indicating collide with any object on the bottom.

func (*Tile) SetCollideLeftA

func (self *Tile) SetCollideLeftA(member bool)

SetCollideLeftA Indicating collide with any object on the left.

func (*Tile) SetCollideRightA

func (self *Tile) SetCollideRightA(member bool)

SetCollideRightA Indicating collide with any object on the right.

func (*Tile) SetCollideUpA

func (self *Tile) SetCollideUpA(member bool)

SetCollideUpA Indicating collide with any object on the top.

func (*Tile) SetCollidesA

func (self *Tile) SetCollidesA(member bool)

SetCollidesA True if this tile can collide on any of its faces.

func (*Tile) SetCollision

func (self *Tile) SetCollision(left bool, right bool, up bool, down bool)

SetCollision Sets the collision flags for each side of this tile and updates the interesting faces list.

func (*Tile) SetCollisionCallback

func (self *Tile) SetCollisionCallback(callback interface{}, context interface{})

SetCollisionCallback Set a callback to be called when this tile is hit by an object. The callback must true true for collision processing to take place.

func (*Tile) SetCollisionCallbackA

func (self *Tile) SetCollisionCallbackA(member interface{})

SetCollisionCallbackA Tile collision callback.

func (*Tile) SetCollisionCallbackContextA

func (self *Tile) SetCollisionCallbackContextA(member interface{})

SetCollisionCallbackContextA The context in which the collision callback will be called.

func (*Tile) SetCollisionCallbackI

func (self *Tile) SetCollisionCallbackI(args ...interface{})

SetCollisionCallbackI Set a callback to be called when this tile is hit by an object. The callback must true true for collision processing to take place.

func (*Tile) SetCollisionI

func (self *Tile) SetCollisionI(args ...interface{})

SetCollisionI Sets the collision flags for each side of this tile and updates the interesting faces list.

func (*Tile) SetFaceBottomA

func (self *Tile) SetFaceBottomA(member bool)

SetFaceBottomA Is the bottom of this tile an interesting edge?

func (*Tile) SetFaceLeftA

func (self *Tile) SetFaceLeftA(member bool)

SetFaceLeftA Is the left of this tile an interesting edge?

func (*Tile) SetFaceRightA

func (self *Tile) SetFaceRightA(member bool)

SetFaceRightA Is the right of this tile an interesting edge?

func (*Tile) SetFaceTopA

func (self *Tile) SetFaceTopA(member bool)

SetFaceTopA Is the top of this tile an interesting edge?

func (*Tile) SetFlippedA

func (self *Tile) SetFlippedA(member bool)

SetFlippedA Whether this tile is flipped (mirrored) or not.

func (*Tile) SetHeightA

func (self *Tile) SetHeightA(member int)

SetHeightA The height of the tile in pixels.

func (*Tile) SetIndexA

func (self *Tile) SetIndexA(member int)

SetIndexA The index of this tile within the map data corresponding to the tileset, or -1 if this represents a blank/null tile.

func (*Tile) SetLayerA

func (self *Tile) SetLayerA(member interface{})

SetLayerA The layer in the Tilemap data that this tile belongs to.

func (*Tile) SetLeftA

func (self *Tile) SetLeftA(member int)

SetLeftA The x value in pixels.

func (*Tile) SetPropertiesA

func (self *Tile) SetPropertiesA(member interface{})

SetPropertiesA Tile specific properties.

func (*Tile) SetRightA

func (self *Tile) SetRightA(member int)

SetRightA The sum of the x and width properties.

func (*Tile) SetRotationA

func (self *Tile) SetRotationA(member int)

SetRotationA The rotation angle of this tile.

func (*Tile) SetScannedA

func (self *Tile) SetScannedA(member bool)

SetScannedA Has this tile been walked / turned into a poly?

func (*Tile) SetTopA

func (self *Tile) SetTopA(member int)

SetTopA The y value.

func (*Tile) SetWidthA

func (self *Tile) SetWidthA(member int)

SetWidthA The width of the tile in pixels.

func (*Tile) SetWorldXA

func (self *Tile) SetWorldXA(member interface{})

SetWorldXA The x map coordinate of this tile.

func (*Tile) SetWorldYA

func (self *Tile) SetWorldYA(member interface{})

SetWorldYA The y map coordinate of this tile.

func (*Tile) SetXA

func (self *Tile) SetXA(member int)

SetXA The x map coordinate of this tile.

func (*Tile) SetYA

func (self *Tile) SetYA(member int)

SetYA The y map coordinate of this tile.

func (*Tile) Top

func (self *Tile) Top() int

Top The y value.

func (*Tile) Width

func (self *Tile) Width() int

Width The width of the tile in pixels.

func (*Tile) WorldX

func (self *Tile) WorldX() interface{}

WorldX The x map coordinate of this tile.

func (*Tile) WorldY

func (self *Tile) WorldY() interface{}

WorldY The y map coordinate of this tile.

func (*Tile) X

func (self *Tile) X() int

X The x map coordinate of this tile.

func (*Tile) Y

func (self *Tile) Y() int

Y The y map coordinate of this tile.

type TileSprite

type TileSprite struct {
	*js.Object
}

TileSprite A TileSprite is a Sprite that has a repeating texture. The texture can be scrolled and scaled independently of the TileSprite itself. Textures will automatically wrap and are designed so that you can create game backdrops using seamless textures as a source.

TileSprites have no input handler or physics bodies by default, both need enabling in the same way as for normal Sprites.

You shouldn't ever create a TileSprite any larger than your actual screen size. If you want to create a large repeating background that scrolls across the whole map of your game, then you create a TileSprite that fits the screen size and then use the `tilePosition` property to scroll the texture as the player moves. If you create a TileSprite that is thousands of pixels in size then it will consume huge amounts of memory and cause performance issues. Remember: use `tilePosition` to scroll your texture and `tileScale` to adjust the scale of the texture - don't resize the sprite itself or make it larger than it needs.

An important note about texture dimensions:

When running under Canvas a TileSprite can use any texture size without issue. When running under WebGL the texture should ideally be a power of two in size (i.e. 4, 8, 16, 32, 64, 128, 256, 512, etc pixels width by height). If the texture isn't a power of two it will be rendered to a blank canvas that is the correct size, which means you may have 'blank' areas appearing to the right and bottom of your frame. To avoid this ensure your textures are perfect powers of two.

TileSprites support animations in the same way that Sprites do. You add and play animations using the AnimationManager. However if your game is running under WebGL please note that each frame of the animation must be a power of two in size, or it will receive additional padding to enforce it to be so.

func NewTileSprite

func NewTileSprite(game *Game, x int, y int, width int, height int, key interface{}, frame interface{}) *TileSprite

NewTileSprite A TileSprite is a Sprite that has a repeating texture. The texture can be scrolled and scaled independently of the TileSprite itself. Textures will automatically wrap and are designed so that you can create game backdrops using seamless textures as a source.

TileSprites have no input handler or physics bodies by default, both need enabling in the same way as for normal Sprites.

You shouldn't ever create a TileSprite any larger than your actual screen size. If you want to create a large repeating background that scrolls across the whole map of your game, then you create a TileSprite that fits the screen size and then use the `tilePosition` property to scroll the texture as the player moves. If you create a TileSprite that is thousands of pixels in size then it will consume huge amounts of memory and cause performance issues. Remember: use `tilePosition` to scroll your texture and `tileScale` to adjust the scale of the texture - don't resize the sprite itself or make it larger than it needs.

An important note about texture dimensions:

When running under Canvas a TileSprite can use any texture size without issue. When running under WebGL the texture should ideally be a power of two in size (i.e. 4, 8, 16, 32, 64, 128, 256, 512, etc pixels width by height). If the texture isn't a power of two it will be rendered to a blank canvas that is the correct size, which means you may have 'blank' areas appearing to the right and bottom of your frame. To avoid this ensure your textures are perfect powers of two.

TileSprites support animations in the same way that Sprites do. You add and play animations using the AnimationManager. However if your game is running under WebGL please note that each frame of the animation must be a power of two in size, or it will receive additional padding to enforce it to be so.

func NewTileSpriteI

func NewTileSpriteI(args ...interface{}) *TileSprite

NewTileSpriteI A TileSprite is a Sprite that has a repeating texture. The texture can be scrolled and scaled independently of the TileSprite itself. Textures will automatically wrap and are designed so that you can create game backdrops using seamless textures as a source.

TileSprites have no input handler or physics bodies by default, both need enabling in the same way as for normal Sprites.

You shouldn't ever create a TileSprite any larger than your actual screen size. If you want to create a large repeating background that scrolls across the whole map of your game, then you create a TileSprite that fits the screen size and then use the `tilePosition` property to scroll the texture as the player moves. If you create a TileSprite that is thousands of pixels in size then it will consume huge amounts of memory and cause performance issues. Remember: use `tilePosition` to scroll your texture and `tileScale` to adjust the scale of the texture - don't resize the sprite itself or make it larger than it needs.

An important note about texture dimensions:

When running under Canvas a TileSprite can use any texture size without issue. When running under WebGL the texture should ideally be a power of two in size (i.e. 4, 8, 16, 32, 64, 128, 256, 512, etc pixels width by height). If the texture isn't a power of two it will be rendered to a blank canvas that is the correct size, which means you may have 'blank' areas appearing to the right and bottom of your frame. To avoid this ensure your textures are perfect powers of two.

TileSprites support animations in the same way that Sprites do. You add and play animations using the AnimationManager. However if your game is running under WebGL please note that each frame of the animation must be a power of two in size, or it will receive additional padding to enforce it to be so.

func ToTileSprite

func ToTileSprite(jsStruct interface{}) *TileSprite

TileSprite Binding conversion method to TileSprite point

func (*TileSprite) AddChild

func (self *TileSprite) AddChild(child *DisplayObject) *DisplayObject

AddChild Adds a child to the container.

func (*TileSprite) AddChildAt

func (self *TileSprite) AddChildAt(child *DisplayObject, index int) *DisplayObject

AddChildAt Adds a child to the container at a specified index. If the index is out of bounds an error will be thrown

func (*TileSprite) AddChildAtI

func (self *TileSprite) AddChildAtI(args ...interface{}) *DisplayObject

AddChildAtI Adds a child to the container at a specified index. If the index is out of bounds an error will be thrown

func (*TileSprite) AddChildI

func (self *TileSprite) AddChildI(args ...interface{}) *DisplayObject

AddChildI Adds a child to the container.

func (*TileSprite) AlignIn

func (self *TileSprite) AlignIn(container interface{}) interface{}

AlignIn Aligns this Game Object within another Game Object, or Rectangle, known as the 'container', to one of 9 possible positions.

The container must be a Game Object, or Phaser.Rectangle object. This can include properties such as `World.bounds` or `Camera.view`, for aligning Game Objects within the world and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText, TileSprites or Buttons.

Please note that aligning a Sprite to another Game Object does **not** make it a child of the container. It simply modifies its position coordinates so it aligns with it.

The position constants you can use are:

`Phaser.TOP_LEFT`, `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

The Game Objects are placed in such a way that their _bounds_ align with the container, taking into consideration rotation, scale and the anchor property. This allows you to neatly align Game Objects, irrespective of their position value.

The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final aligned position of the Game Object. For example:

`sprite.alignIn(background, Phaser.BOTTOM_RIGHT, -20, -20)`

Would align the `sprite` to the bottom-right, but moved 20 pixels in from the corner. Think of the offsets as applying an adjustment to the containers bounds before the alignment takes place. So providing a negative offset will 'shrink' the container bounds by that amount, and providing a positive one expands it.

func (*TileSprite) AlignIn1O

func (self *TileSprite) AlignIn1O(container interface{}, position int) interface{}

AlignIn1O Aligns this Game Object within another Game Object, or Rectangle, known as the 'container', to one of 9 possible positions.

The container must be a Game Object, or Phaser.Rectangle object. This can include properties such as `World.bounds` or `Camera.view`, for aligning Game Objects within the world and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText, TileSprites or Buttons.

Please note that aligning a Sprite to another Game Object does **not** make it a child of the container. It simply modifies its position coordinates so it aligns with it.

The position constants you can use are:

`Phaser.TOP_LEFT`, `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

The Game Objects are placed in such a way that their _bounds_ align with the container, taking into consideration rotation, scale and the anchor property. This allows you to neatly align Game Objects, irrespective of their position value.

The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final aligned position of the Game Object. For example:

`sprite.alignIn(background, Phaser.BOTTOM_RIGHT, -20, -20)`

Would align the `sprite` to the bottom-right, but moved 20 pixels in from the corner. Think of the offsets as applying an adjustment to the containers bounds before the alignment takes place. So providing a negative offset will 'shrink' the container bounds by that amount, and providing a positive one expands it.

func (*TileSprite) AlignIn2O

func (self *TileSprite) AlignIn2O(container interface{}, position int, offsetX int) interface{}

AlignIn2O Aligns this Game Object within another Game Object, or Rectangle, known as the 'container', to one of 9 possible positions.

The container must be a Game Object, or Phaser.Rectangle object. This can include properties such as `World.bounds` or `Camera.view`, for aligning Game Objects within the world and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText, TileSprites or Buttons.

Please note that aligning a Sprite to another Game Object does **not** make it a child of the container. It simply modifies its position coordinates so it aligns with it.

The position constants you can use are:

`Phaser.TOP_LEFT`, `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

The Game Objects are placed in such a way that their _bounds_ align with the container, taking into consideration rotation, scale and the anchor property. This allows you to neatly align Game Objects, irrespective of their position value.

The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final aligned position of the Game Object. For example:

`sprite.alignIn(background, Phaser.BOTTOM_RIGHT, -20, -20)`

Would align the `sprite` to the bottom-right, but moved 20 pixels in from the corner. Think of the offsets as applying an adjustment to the containers bounds before the alignment takes place. So providing a negative offset will 'shrink' the container bounds by that amount, and providing a positive one expands it.

func (*TileSprite) AlignIn3O

func (self *TileSprite) AlignIn3O(container interface{}, position int, offsetX int, offsetY int) interface{}

AlignIn3O Aligns this Game Object within another Game Object, or Rectangle, known as the 'container', to one of 9 possible positions.

The container must be a Game Object, or Phaser.Rectangle object. This can include properties such as `World.bounds` or `Camera.view`, for aligning Game Objects within the world and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText, TileSprites or Buttons.

Please note that aligning a Sprite to another Game Object does **not** make it a child of the container. It simply modifies its position coordinates so it aligns with it.

The position constants you can use are:

`Phaser.TOP_LEFT`, `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

The Game Objects are placed in such a way that their _bounds_ align with the container, taking into consideration rotation, scale and the anchor property. This allows you to neatly align Game Objects, irrespective of their position value.

The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final aligned position of the Game Object. For example:

`sprite.alignIn(background, Phaser.BOTTOM_RIGHT, -20, -20)`

Would align the `sprite` to the bottom-right, but moved 20 pixels in from the corner. Think of the offsets as applying an adjustment to the containers bounds before the alignment takes place. So providing a negative offset will 'shrink' the container bounds by that amount, and providing a positive one expands it.

func (*TileSprite) AlignInI

func (self *TileSprite) AlignInI(args ...interface{}) interface{}

AlignInI Aligns this Game Object within another Game Object, or Rectangle, known as the 'container', to one of 9 possible positions.

The container must be a Game Object, or Phaser.Rectangle object. This can include properties such as `World.bounds` or `Camera.view`, for aligning Game Objects within the world and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText, TileSprites or Buttons.

Please note that aligning a Sprite to another Game Object does **not** make it a child of the container. It simply modifies its position coordinates so it aligns with it.

The position constants you can use are:

`Phaser.TOP_LEFT`, `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

The Game Objects are placed in such a way that their _bounds_ align with the container, taking into consideration rotation, scale and the anchor property. This allows you to neatly align Game Objects, irrespective of their position value.

The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final aligned position of the Game Object. For example:

`sprite.alignIn(background, Phaser.BOTTOM_RIGHT, -20, -20)`

Would align the `sprite` to the bottom-right, but moved 20 pixels in from the corner. Think of the offsets as applying an adjustment to the containers bounds before the alignment takes place. So providing a negative offset will 'shrink' the container bounds by that amount, and providing a positive one expands it.

func (*TileSprite) AlignTo

func (self *TileSprite) AlignTo(parent interface{}) interface{}

AlignTo Aligns this Game Object to the side of another Game Object, or Rectangle, known as the 'parent', in one of 11 possible positions.

The parent must be a Game Object, or Phaser.Rectangle object. This can include properties such as `World.bounds` or `Camera.view`, for aligning Game Objects within the world and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText, TileSprites or Buttons.

Please note that aligning a Sprite to another Game Object does **not** make it a child of the parent. It simply modifies its position coordinates so it aligns with it.

The position constants you can use are:

`Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_TOP`, `Phaser.LEFT_CENTER`, `Phaser.LEFT_BOTTOM`, `Phaser.RIGHT_TOP`, `Phaser.RIGHT_CENTER`, `Phaser.RIGHT_BOTTOM`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

The Game Objects are placed in such a way that their _bounds_ align with the parent, taking into consideration rotation, scale and the anchor property. This allows you to neatly align Game Objects, irrespective of their position value.

The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final aligned position of the Game Object. For example:

`sprite.alignTo(background, Phaser.BOTTOM_RIGHT, -20, -20)`

Would align the `sprite` to the bottom-right, but moved 20 pixels in from the corner. Think of the offsets as applying an adjustment to the parents bounds before the alignment takes place. So providing a negative offset will 'shrink' the parent bounds by that amount, and providing a positive one expands it.

func (*TileSprite) AlignTo1O

func (self *TileSprite) AlignTo1O(parent interface{}, position int) interface{}

AlignTo1O Aligns this Game Object to the side of another Game Object, or Rectangle, known as the 'parent', in one of 11 possible positions.

The parent must be a Game Object, or Phaser.Rectangle object. This can include properties such as `World.bounds` or `Camera.view`, for aligning Game Objects within the world and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText, TileSprites or Buttons.

Please note that aligning a Sprite to another Game Object does **not** make it a child of the parent. It simply modifies its position coordinates so it aligns with it.

The position constants you can use are:

`Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_TOP`, `Phaser.LEFT_CENTER`, `Phaser.LEFT_BOTTOM`, `Phaser.RIGHT_TOP`, `Phaser.RIGHT_CENTER`, `Phaser.RIGHT_BOTTOM`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

The Game Objects are placed in such a way that their _bounds_ align with the parent, taking into consideration rotation, scale and the anchor property. This allows you to neatly align Game Objects, irrespective of their position value.

The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final aligned position of the Game Object. For example:

`sprite.alignTo(background, Phaser.BOTTOM_RIGHT, -20, -20)`

Would align the `sprite` to the bottom-right, but moved 20 pixels in from the corner. Think of the offsets as applying an adjustment to the parents bounds before the alignment takes place. So providing a negative offset will 'shrink' the parent bounds by that amount, and providing a positive one expands it.

func (*TileSprite) AlignTo2O

func (self *TileSprite) AlignTo2O(parent interface{}, position int, offsetX int) interface{}

AlignTo2O Aligns this Game Object to the side of another Game Object, or Rectangle, known as the 'parent', in one of 11 possible positions.

The parent must be a Game Object, or Phaser.Rectangle object. This can include properties such as `World.bounds` or `Camera.view`, for aligning Game Objects within the world and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText, TileSprites or Buttons.

Please note that aligning a Sprite to another Game Object does **not** make it a child of the parent. It simply modifies its position coordinates so it aligns with it.

The position constants you can use are:

`Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_TOP`, `Phaser.LEFT_CENTER`, `Phaser.LEFT_BOTTOM`, `Phaser.RIGHT_TOP`, `Phaser.RIGHT_CENTER`, `Phaser.RIGHT_BOTTOM`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

The Game Objects are placed in such a way that their _bounds_ align with the parent, taking into consideration rotation, scale and the anchor property. This allows you to neatly align Game Objects, irrespective of their position value.

The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final aligned position of the Game Object. For example:

`sprite.alignTo(background, Phaser.BOTTOM_RIGHT, -20, -20)`

Would align the `sprite` to the bottom-right, but moved 20 pixels in from the corner. Think of the offsets as applying an adjustment to the parents bounds before the alignment takes place. So providing a negative offset will 'shrink' the parent bounds by that amount, and providing a positive one expands it.

func (*TileSprite) AlignTo3O

func (self *TileSprite) AlignTo3O(parent interface{}, position int, offsetX int, offsetY int) interface{}

AlignTo3O Aligns this Game Object to the side of another Game Object, or Rectangle, known as the 'parent', in one of 11 possible positions.

The parent must be a Game Object, or Phaser.Rectangle object. This can include properties such as `World.bounds` or `Camera.view`, for aligning Game Objects within the world and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText, TileSprites or Buttons.

Please note that aligning a Sprite to another Game Object does **not** make it a child of the parent. It simply modifies its position coordinates so it aligns with it.

The position constants you can use are:

`Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_TOP`, `Phaser.LEFT_CENTER`, `Phaser.LEFT_BOTTOM`, `Phaser.RIGHT_TOP`, `Phaser.RIGHT_CENTER`, `Phaser.RIGHT_BOTTOM`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

The Game Objects are placed in such a way that their _bounds_ align with the parent, taking into consideration rotation, scale and the anchor property. This allows you to neatly align Game Objects, irrespective of their position value.

The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final aligned position of the Game Object. For example:

`sprite.alignTo(background, Phaser.BOTTOM_RIGHT, -20, -20)`

Would align the `sprite` to the bottom-right, but moved 20 pixels in from the corner. Think of the offsets as applying an adjustment to the parents bounds before the alignment takes place. So providing a negative offset will 'shrink' the parent bounds by that amount, and providing a positive one expands it.

func (*TileSprite) AlignToI

func (self *TileSprite) AlignToI(args ...interface{}) interface{}

AlignToI Aligns this Game Object to the side of another Game Object, or Rectangle, known as the 'parent', in one of 11 possible positions.

The parent must be a Game Object, or Phaser.Rectangle object. This can include properties such as `World.bounds` or `Camera.view`, for aligning Game Objects within the world and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText, TileSprites or Buttons.

Please note that aligning a Sprite to another Game Object does **not** make it a child of the parent. It simply modifies its position coordinates so it aligns with it.

The position constants you can use are:

`Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_TOP`, `Phaser.LEFT_CENTER`, `Phaser.LEFT_BOTTOM`, `Phaser.RIGHT_TOP`, `Phaser.RIGHT_CENTER`, `Phaser.RIGHT_BOTTOM`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

The Game Objects are placed in such a way that their _bounds_ align with the parent, taking into consideration rotation, scale and the anchor property. This allows you to neatly align Game Objects, irrespective of their position value.

The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final aligned position of the Game Object. For example:

`sprite.alignTo(background, Phaser.BOTTOM_RIGHT, -20, -20)`

Would align the `sprite` to the bottom-right, but moved 20 pixels in from the corner. Think of the offsets as applying an adjustment to the parents bounds before the alignment takes place. So providing a negative offset will 'shrink' the parent bounds by that amount, and providing a positive one expands it.

func (*TileSprite) Alive

func (self *TileSprite) Alive() bool

Alive A useful flag to control if the Game Object is alive or dead.

This is set automatically by the Health components `damage` method should the object run out of health. Or you can toggle it via your game code.

This property is mostly just provided to be used by your game - it doesn't effect rendering or logic updates. However you can use `Group.getFirstAlive` in conjunction with this property for fast object pooling and recycling.

func (*TileSprite) Anchor

func (self *TileSprite) Anchor() *Point

Anchor The anchor sets the origin point of the texture.

The default is 0,0 this means the texture's origin is the top left

Setting than anchor to 0.5,0.5 means the textures origin is centered

Setting the anchor to 1,1 would mean the textures origin points will be the bottom right corner

func (*TileSprite) Angle

func (self *TileSprite) Angle() int

Angle The angle property is the rotation of the Game Object in *degrees* from its original orientation.

Values from 0 to 180 represent clockwise rotation; values from 0 to -180 represent counterclockwise rotation.

Values outside this range are added to or subtracted from 360 to obtain a value within the range. For example, the statement player.angle = 450 is the same as player.angle = 90.

If you wish to work in radians instead of degrees you can use the property `rotation` instead. Working in radians is slightly faster as it doesn't have to perform any calculations.

func (*TileSprite) Animations

func (self *TileSprite) Animations() *AnimationManager

Animations If the Game Object is enabled for animation (such as a Phaser.Sprite) this is a reference to its AnimationManager instance. Through it you can create, play, pause and stop animations.

func (*TileSprite) AutoCull

func (self *TileSprite) AutoCull() bool

AutoCull A Game Object with `autoCull` set to true will check its bounds against the World Camera every frame. If it is not intersecting the Camera bounds at any point then it has its `renderable` property set to `false`. This keeps the Game Object alive and still processing updates, but forces it to skip the render step entirely.

This is a relatively expensive operation, especially if enabled on hundreds of Game Objects. So enable it only if you know it's required, or you have tested performance and find it acceptable.

func (*TileSprite) AutoScroll

func (self *TileSprite) AutoScroll(x int, y int)

AutoScroll Sets this TileSprite to automatically scroll in the given direction until stopped via TileSprite.stopScroll(). The scroll speed is specified in pixels per second. A negative x value will scroll to the left. A positive x value will scroll to the right. A negative y value will scroll up. A positive y value will scroll down.

func (*TileSprite) AutoScrollI

func (self *TileSprite) AutoScrollI(args ...interface{})

AutoScrollI Sets this TileSprite to automatically scroll in the given direction until stopped via TileSprite.stopScroll(). The scroll speed is specified in pixels per second. A negative x value will scroll to the left. A positive x value will scroll to the right. A negative y value will scroll up. A positive y value will scroll down.

func (*TileSprite) BlendMode

func (self *TileSprite) BlendMode() int

BlendMode The blend mode to be applied to the sprite

func (*TileSprite) Body

func (self *TileSprite) Body() interface{}

Body `body` is the Game Objects physics body. Once a Game Object is enabled for physics you access all associated properties and methods via it.

By default Game Objects won't add themselves to any physics system and their `body` property will be `null`.

To enable this Game Object for physics you need to call `game.physics.enable(object, system)` where `object` is this object and `system` is the Physics system you are using. If none is given it defaults to `Phaser.Physics.Arcade`.

You can alternatively call `game.physics.arcade.enable(object)`, or add this Game Object to a physics enabled Group.

Important: Enabling a Game Object for P2 or Ninja physics will automatically set its `anchor` property to 0.5, so the physics body is centered on the Game Object.

If you need a different result then adjust or re-create the Body shape offsets manually or reset the anchor after enabling physics.

func (*TileSprite) Bottom

func (self *TileSprite) Bottom() int

Bottom The sum of the y and height properties. This is the same as `y + height - offsetY`.

func (*TileSprite) BringToTop

func (self *TileSprite) BringToTop() *DisplayObject

BringToTop Brings this Game Object to the top of its parents display list. Visually this means it will render over the top of any old child in the same Group.

If this Game Object hasn't been added to a custom Group then this method will bring it to the top of the Game World, because the World is the root Group from which all Game Objects descend.

func (*TileSprite) BringToTopI

func (self *TileSprite) BringToTopI(args ...interface{}) *DisplayObject

BringToTopI Brings this Game Object to the top of its parents display list. Visually this means it will render over the top of any old child in the same Group.

If this Game Object hasn't been added to a custom Group then this method will bring it to the top of the Game World, because the World is the root Group from which all Game Objects descend.

func (*TileSprite) CameraOffset

func (self *TileSprite) CameraOffset() *Point

CameraOffset The x/y coordinate offset applied to the top-left of the camera that this Game Object will be drawn at if `fixedToCamera` is true.

The values are relative to the top-left of the camera view and in addition to any parent of the Game Object on the display list.

func (*TileSprite) CanvasBuffer

func (self *TileSprite) CanvasBuffer() *PIXICanvasBuffer

CanvasBuffer The CanvasBuffer object that the tiled texture is drawn to.

func (*TileSprite) CenterX

func (self *TileSprite) CenterX() int

CenterX The center x coordinate of the Game Object. This is the same as `(x - offsetX) + (width / 2)`.

func (*TileSprite) CenterY

func (self *TileSprite) CenterY() int

CenterY The center y coordinate of the Game Object. This is the same as `(y - offsetY) + (height / 2)`.

func (*TileSprite) CheckWorldBounds

func (self *TileSprite) CheckWorldBounds() bool

CheckWorldBounds If this is set to `true` the Game Object checks if it is within the World bounds each frame.

When it is no longer intersecting the world bounds it dispatches the `onOutOfBounds` event.

If it was *previously* out of bounds but is now intersecting the world bounds again it dispatches the `onEnterBounds` event.

It also optionally kills the Game Object if `outOfBoundsKill` is `true`.

When `checkWorldBounds` is enabled it forces the Game Object to calculate its full bounds every frame.

This is a relatively expensive operation, especially if enabled on hundreds of Game Objects. So enable it only if you know it's required, or you have tested performance and find it acceptable.

func (*TileSprite) Children

func (self *TileSprite) Children() []DisplayObject

Children [read-only] The array of children of this container.

func (*TileSprite) Components

func (self *TileSprite) Components() interface{}

Components The components this Game Object has installed.

func (*TileSprite) Contains

func (self *TileSprite) Contains(child *DisplayObject) bool

Contains Determines whether the specified display object is a child of the DisplayObjectContainer instance or the instance itself.

func (*TileSprite) ContainsI

func (self *TileSprite) ContainsI(args ...interface{}) bool

ContainsI Determines whether the specified display object is a child of the DisplayObjectContainer instance or the instance itself.

func (*TileSprite) Damage

func (self *TileSprite) Damage() interface{}

Damage Damages the Game Object. This removes the given amount of health from the `health` property.

If health is taken below or is equal to zero then the `kill` method is called.

func (*TileSprite) Data

func (self *TileSprite) Data() interface{}

Data An empty Object that belongs to this Game Object. This value isn't ever used internally by Phaser, but may be used by your own code, or by Phaser Plugins, to store data that needs to be associated with the Game Object, without polluting the Game Object directly.

func (*TileSprite) Debug

func (self *TileSprite) Debug() bool

Debug A debug flag designed for use with `Game.enableStep`.

func (*TileSprite) Destroy

func (self *TileSprite) Destroy()

Destroy Destroys the TileSprite. This removes it from its parent group, destroys the event and animation handlers if present and nulls its reference to game, freeing it up for garbage collection.

func (*TileSprite) Destroy1O

func (self *TileSprite) Destroy1O(destroyChildren bool)

Destroy1O Destroys the TileSprite. This removes it from its parent group, destroys the event and animation handlers if present and nulls its reference to game, freeing it up for garbage collection.

func (*TileSprite) DestroyI

func (self *TileSprite) DestroyI(args ...interface{})

DestroyI Destroys the TileSprite. This removes it from its parent group, destroys the event and animation handlers if present and nulls its reference to game, freeing it up for garbage collection.

func (*TileSprite) DestroyPhase

func (self *TileSprite) DestroyPhase() bool

DestroyPhase As a Game Object runs through its destroy method this flag is set to true, and can be checked in any sub-systems or plugins it is being destroyed from.

func (*TileSprite) Events

func (self *TileSprite) Events() *Events

Events All Phaser Game Objects have an Events class which contains all of the events that are dispatched when certain things happen to this Game Object, or any of its components.

func (*TileSprite) Exists

func (self *TileSprite) Exists() bool

Exists Controls if this Sprite is processed by the core Phaser game loops and Group loops.

func (*TileSprite) FixedToCamera

func (self *TileSprite) FixedToCamera() bool

FixedToCamera A Game Object that is "fixed" to the camera uses its x/y coordinates as offsets from the top left of the camera during rendering.

The values are adjusted at the rendering stage, overriding the Game Objects actual world position.

The end result is that the Game Object will appear to be 'fixed' to the camera, regardless of where in the game world the camera is viewing. This is useful if for example this Game Object is a UI item that you wish to be visible at all times regardless where in the world the camera is.

The offsets are stored in the `cameraOffset` property.

Note that the `cameraOffset` values are in addition to any parent of this Game Object on the display list.

Be careful not to set `fixedToCamera` on Game Objects which are in Groups that already have `fixedToCamera` enabled on them.

func (*TileSprite) Frame

func (self *TileSprite) Frame() int

Frame Gets or sets the current frame index of the texture being used to render this Game Object.

To change the frame set `frame` to the index of the new frame in the sprite sheet you wish this Game Object to use, for example: `player.frame = 4`.

If the frame index given doesn't exist it will revert to the first frame found in the texture.

If you are using a texture atlas then you should use the `frameName` property instead.

If you wish to fully replace the texture being used see `loadTexture`.

func (*TileSprite) FrameName

func (self *TileSprite) FrameName() string

FrameName Gets or sets the current frame name of the texture being used to render this Game Object.

To change the frame set `frameName` to the name of the new frame in the texture atlas you wish this Game Object to use, for example: `player.frameName = "idle"`.

If the frame name given doesn't exist it will revert to the first frame found in the texture and throw a console warning.

If you are using a sprite sheet then you should use the `frame` property instead.

If you wish to fully replace the texture being used see `loadTexture`.

func (*TileSprite) Fresh

func (self *TileSprite) Fresh() bool

Fresh A Game Object is considered `fresh` if it has just been created or reset and is yet to receive a renderer transform update. This property is mostly used internally by the physics systems, but is exposed for the use of plugins.

func (*TileSprite) Game

func (self *TileSprite) Game() *Game

Game A reference to the currently running Game.

func (*TileSprite) GenerateTilingTexture

func (self *TileSprite) GenerateTilingTexture(forcePowerOfTwo bool, renderSession *RenderSession)

GenerateTilingTexture empty description

func (*TileSprite) GenerateTilingTextureI

func (self *TileSprite) GenerateTilingTextureI(args ...interface{})

GenerateTilingTextureI empty description

func (*TileSprite) GetBounds

func (self *TileSprite) GetBounds() *Rectangle

GetBounds Returns the framing rectangle of the sprite as a PIXI.Rectangle object

func (*TileSprite) GetBoundsI

func (self *TileSprite) GetBoundsI(args ...interface{}) *Rectangle

GetBoundsI Returns the framing rectangle of the sprite as a PIXI.Rectangle object

func (*TileSprite) GetChildAt

func (self *TileSprite) GetChildAt(index int) *DisplayObject

GetChildAt Returns the child at the specified index

func (*TileSprite) GetChildAtI

func (self *TileSprite) GetChildAtI(args ...interface{}) *DisplayObject

GetChildAtI Returns the child at the specified index

func (*TileSprite) GetChildIndex

func (self *TileSprite) GetChildIndex(child *DisplayObject) int

GetChildIndex Returns the index position of a child DisplayObject instance

func (*TileSprite) GetChildIndexI

func (self *TileSprite) GetChildIndexI(args ...interface{}) int

GetChildIndexI Returns the index position of a child DisplayObject instance

func (*TileSprite) GetLocalBounds

func (self *TileSprite) GetLocalBounds() *Rectangle

GetLocalBounds Retrieves the non-global local bounds of the Sprite as a rectangle. The calculation takes all visible children into consideration.

func (*TileSprite) GetLocalBoundsI

func (self *TileSprite) GetLocalBoundsI(args ...interface{}) *Rectangle

GetLocalBoundsI Retrieves the non-global local bounds of the Sprite as a rectangle. The calculation takes all visible children into consideration.

func (*TileSprite) Heal

func (self *TileSprite) Heal() interface{}

Heal Heal the Game Object. This adds the given amount of health to the `health` property.

func (*TileSprite) Health

func (self *TileSprite) Health() int

Health The Game Objects health value. This is a handy property for setting and manipulating health on a Game Object.

It can be used in combination with the `damage` method or modified directly.

func (*TileSprite) Height

func (self *TileSprite) Height() int

Height The height of the tiling sprite

func (*TileSprite) IgnoreChildInput

func (self *TileSprite) IgnoreChildInput() bool

IgnoreChildInput If `ignoreChildInput` is `false` it will allow this objects _children_ to be considered as valid for Input events.

If this property is `true` then the children will _not_ be considered as valid for Input events.

Note that this property isn't recursive: only immediate children are influenced, it doesn't scan further down.

func (*TileSprite) InCamera

func (self *TileSprite) InCamera() bool

InCamera Checks if the Game Objects bounds intersect with the Game Camera bounds. Returns `true` if they do, otherwise `false` if fully outside of the Cameras bounds.

func (*TileSprite) InWorld

func (self *TileSprite) InWorld() bool

InWorld Checks if the Game Objects bounds are within, or intersect at any point with the Game World bounds.

func (*TileSprite) Input

func (self *TileSprite) Input() interface{}

Input The Input Handler for this Game Object.

By default it is disabled. If you wish this Game Object to process input events you should enable it with: `inputEnabled = true`.

After you have done this, this property will be a reference to the Phaser InputHandler.

func (*TileSprite) InputEnabled

func (self *TileSprite) InputEnabled() bool

InputEnabled By default a Game Object won't process any input events. By setting `inputEnabled` to true a Phaser.InputHandler is created for this Game Object and it will then start to process click / touch events and more.

You can then access the Input Handler via `this.input`.

Note that Input related events are dispatched from `this.events`, i.e.: `events.onInputDown`.

If you set this property to false it will stop the Input Handler from processing any more input events.

If you want to _temporarily_ disable input for a Game Object, then it's better to set `input.enabled = false`, as it won't reset any of the Input Handlers internal properties. You can then toggle this back on as needed.

func (*TileSprite) Key

func (self *TileSprite) Key() interface{}

Key The key of the image or texture used by this Game Object during rendering. If it is a string it's the string used to retrieve the texture from the Phaser Image Cache. It can also be an instance of a RenderTexture, BitmapData, Video or PIXI.Texture. If a Game Object is created without a key it is automatically assigned the key `__default` which is a 32x32 transparent PNG stored within the Cache. If a Game Object is given a key which doesn't exist in the Image Cache it is re-assigned the key `__missing` which is a 32x32 PNG of a green box with a line through it.

func (*TileSprite) Kill

func (self *TileSprite) Kill() *DisplayObject

Kill Kills a Game Object. A killed Game Object has its `alive`, `exists` and `visible` properties all set to false.

It will dispatch the `onKilled` event. You can listen to `events.onKilled` for the signal.

Note that killing a Game Object is a way for you to quickly recycle it in an object pool, it doesn't destroy the object or free it up from memory.

If you don't need this Game Object any more you should call `destroy` instead.

func (*TileSprite) KillI

func (self *TileSprite) KillI(args ...interface{}) *DisplayObject

KillI Kills a Game Object. A killed Game Object has its `alive`, `exists` and `visible` properties all set to false.

It will dispatch the `onKilled` event. You can listen to `events.onKilled` for the signal.

Note that killing a Game Object is a way for you to quickly recycle it in an object pool, it doesn't destroy the object or free it up from memory.

If you don't need this Game Object any more you should call `destroy` instead.

func (*TileSprite) Left

func (self *TileSprite) Left() int

Left The left coordinate of the Game Object. This is the same as `x - offsetX`.

func (*TileSprite) Lifespan

func (self *TileSprite) Lifespan() int

Lifespan The lifespan allows you to give a Game Object a lifespan in milliseconds.

Once the Game Object is 'born' you can set this to a positive value.

It is automatically decremented by the millisecond equivalent of `game.time.physicsElapsed` each frame. When it reaches zero it will call the `kill` method.

Very handy for particles, bullets, collectibles, or any other short-lived entity.

func (*TileSprite) LoadTexture

func (self *TileSprite) LoadTexture(key interface{})

LoadTexture Changes the base texture the Game Object is using. The old texture is removed and the new one is referenced or fetched from the Cache.

If your Game Object is using a frame from a texture atlas and you just wish to change to another frame, then see the `frame` or `frameName` properties instead.

You should only use `loadTexture` if you want to replace the base texture entirely.

Calling this method causes a WebGL texture update, so use sparingly or in low-intensity portions of your game, or if you know the new texture is already on the GPU.

You can use the new const `Phaser.PENDING_ATLAS` as the texture key for any sprite. Doing this then sets the key to be the `frame` argument (the frame is set to zero).

This allows you to create sprites using `load.image` during development, and then change them to use a Texture Atlas later in development by simply searching your code for 'PENDING_ATLAS' and swapping it to be the key of the atlas data.

Note: You cannot use a RenderTexture as a texture for a TileSprite.

func (*TileSprite) LoadTexture1O

func (self *TileSprite) LoadTexture1O(key interface{}, frame interface{})

LoadTexture1O Changes the base texture the Game Object is using. The old texture is removed and the new one is referenced or fetched from the Cache.

If your Game Object is using a frame from a texture atlas and you just wish to change to another frame, then see the `frame` or `frameName` properties instead.

You should only use `loadTexture` if you want to replace the base texture entirely.

Calling this method causes a WebGL texture update, so use sparingly or in low-intensity portions of your game, or if you know the new texture is already on the GPU.

You can use the new const `Phaser.PENDING_ATLAS` as the texture key for any sprite. Doing this then sets the key to be the `frame` argument (the frame is set to zero).

This allows you to create sprites using `load.image` during development, and then change them to use a Texture Atlas later in development by simply searching your code for 'PENDING_ATLAS' and swapping it to be the key of the atlas data.

Note: You cannot use a RenderTexture as a texture for a TileSprite.

func (*TileSprite) LoadTexture2O

func (self *TileSprite) LoadTexture2O(key interface{}, frame interface{}, stopAnimation bool)

LoadTexture2O Changes the base texture the Game Object is using. The old texture is removed and the new one is referenced or fetched from the Cache.

If your Game Object is using a frame from a texture atlas and you just wish to change to another frame, then see the `frame` or `frameName` properties instead.

You should only use `loadTexture` if you want to replace the base texture entirely.

Calling this method causes a WebGL texture update, so use sparingly or in low-intensity portions of your game, or if you know the new texture is already on the GPU.

You can use the new const `Phaser.PENDING_ATLAS` as the texture key for any sprite. Doing this then sets the key to be the `frame` argument (the frame is set to zero).

This allows you to create sprites using `load.image` during development, and then change them to use a Texture Atlas later in development by simply searching your code for 'PENDING_ATLAS' and swapping it to be the key of the atlas data.

Note: You cannot use a RenderTexture as a texture for a TileSprite.

func (*TileSprite) LoadTextureI

func (self *TileSprite) LoadTextureI(args ...interface{})

LoadTextureI Changes the base texture the Game Object is using. The old texture is removed and the new one is referenced or fetched from the Cache.

If your Game Object is using a frame from a texture atlas and you just wish to change to another frame, then see the `frame` or `frameName` properties instead.

You should only use `loadTexture` if you want to replace the base texture entirely.

Calling this method causes a WebGL texture update, so use sparingly or in low-intensity portions of your game, or if you know the new texture is already on the GPU.

You can use the new const `Phaser.PENDING_ATLAS` as the texture key for any sprite. Doing this then sets the key to be the `frame` argument (the frame is set to zero).

This allows you to create sprites using `load.image` during development, and then change them to use a Texture Atlas later in development by simply searching your code for 'PENDING_ATLAS' and swapping it to be the key of the atlas data.

Note: You cannot use a RenderTexture as a texture for a TileSprite.

func (*TileSprite) MaxHealth

func (self *TileSprite) MaxHealth() int

MaxHealth The Game Objects maximum health value. This works in combination with the `heal` method to ensure the health value never exceeds the maximum.

func (*TileSprite) MoveDown

func (self *TileSprite) MoveDown() *DisplayObject

MoveDown Moves this Game Object down one place in its parents display list. This call has no effect if the Game Object is already at the bottom of the display list.

If this Game Object hasn't been added to a custom Group then this method will move it one object down within the Game World, because the World is the root Group from which all Game Objects descend.

func (*TileSprite) MoveDownI

func (self *TileSprite) MoveDownI(args ...interface{}) *DisplayObject

MoveDownI Moves this Game Object down one place in its parents display list. This call has no effect if the Game Object is already at the bottom of the display list.

If this Game Object hasn't been added to a custom Group then this method will move it one object down within the Game World, because the World is the root Group from which all Game Objects descend.

func (*TileSprite) MoveUp

func (self *TileSprite) MoveUp() *DisplayObject

MoveUp Moves this Game Object up one place in its parents display list. This call has no effect if the Game Object is already at the top of the display list.

If this Game Object hasn't been added to a custom Group then this method will move it one object up within the Game World, because the World is the root Group from which all Game Objects descend.

func (*TileSprite) MoveUpI

func (self *TileSprite) MoveUpI(args ...interface{}) *DisplayObject

MoveUpI Moves this Game Object up one place in its parents display list. This call has no effect if the Game Object is already at the top of the display list.

If this Game Object hasn't been added to a custom Group then this method will move it one object up within the Game World, because the World is the root Group from which all Game Objects descend.

func (*TileSprite) Name

func (self *TileSprite) Name() string

Name A user defined name given to this Game Object. This value isn't ever used internally by Phaser, it is meant as a game level property.

func (*TileSprite) OffsetX

func (self *TileSprite) OffsetX() int

OffsetX The amount the Game Object is visually offset from its x coordinate. This is the same as `width * anchor.x`. It will only be > 0 if anchor.x is not equal to zero.

func (*TileSprite) OffsetY

func (self *TileSprite) OffsetY() int

OffsetY The amount the Game Object is visually offset from its y coordinate. This is the same as `height * anchor.y`. It will only be > 0 if anchor.y is not equal to zero.

func (*TileSprite) OnTextureUpdate

func (self *TileSprite) OnTextureUpdate(event interface{})

OnTextureUpdate When the texture is updated, this event will fire to update the scale and frame

func (*TileSprite) OnTextureUpdateI

func (self *TileSprite) OnTextureUpdateI(args ...interface{})

OnTextureUpdateI When the texture is updated, this event will fire to update the scale and frame

func (*TileSprite) OutOfBoundsKill

func (self *TileSprite) OutOfBoundsKill() bool

OutOfBoundsKill If this and the `checkWorldBounds` property are both set to `true` then the `kill` method is called as soon as `inWorld` returns false.

func (*TileSprite) OutOfCameraBoundsKill

func (self *TileSprite) OutOfCameraBoundsKill() bool

OutOfCameraBoundsKill If this and the `autoCull` property are both set to `true`, then the `kill` method is called as soon as the Game Object leaves the camera bounds.

func (*TileSprite) Overlap

func (self *TileSprite) Overlap(displayObject interface{}) bool

Overlap Checks to see if the bounds of this Game Object overlaps with the bounds of the given Display Object, which can be a Sprite, Image, TileSprite or anything that extends those such as Button or provides a `getBounds` method and result.

This check ignores the `hitArea` property if set and runs a `getBounds` comparison on both objects to determine the result.

Therefore it's relatively expensive to use in large quantities, i.e. with lots of Sprites at a high frequency. It should be fine for low-volume testing where physics isn't required.

func (*TileSprite) OverlapI

func (self *TileSprite) OverlapI(args ...interface{}) bool

OverlapI Checks to see if the bounds of this Game Object overlaps with the bounds of the given Display Object, which can be a Sprite, Image, TileSprite or anything that extends those such as Button or provides a `getBounds` method and result.

This check ignores the `hitArea` property if set and runs a `getBounds` comparison on both objects to determine the result.

Therefore it's relatively expensive to use in large quantities, i.e. with lots of Sprites at a high frequency. It should be fine for low-volume testing where physics isn't required.

func (*TileSprite) PendingDestroy

func (self *TileSprite) PendingDestroy() bool

PendingDestroy A Game Object is that is pendingDestroy is flagged to have its destroy method called on the next logic update. You can set it directly to allow you to flag an object to be destroyed on its next update.

This is extremely useful if you wish to destroy an object from within one of its own callbacks such as with Buttons or other Input events.

func (*TileSprite) PhysicsType

func (self *TileSprite) PhysicsType() int

PhysicsType The const physics body type of this object.

func (*TileSprite) Play

func (self *TileSprite) Play(name string) *Animation

Play Plays an Animation.

The animation should have previously been created via `animations.add`.

If the animation is already playing calling this again won't do anything. If you need to reset an already running animation do so directly on the Animation object itself or via `AnimationManager.stop`.

func (*TileSprite) Play1O

func (self *TileSprite) Play1O(name string, frameRate int) *Animation

Play1O Plays an Animation.

The animation should have previously been created via `animations.add`.

If the animation is already playing calling this again won't do anything. If you need to reset an already running animation do so directly on the Animation object itself or via `AnimationManager.stop`.

func (*TileSprite) Play2O

func (self *TileSprite) Play2O(name string, frameRate int, loop bool) *Animation

Play2O Plays an Animation.

The animation should have previously been created via `animations.add`.

If the animation is already playing calling this again won't do anything. If you need to reset an already running animation do so directly on the Animation object itself or via `AnimationManager.stop`.

func (*TileSprite) Play3O

func (self *TileSprite) Play3O(name string, frameRate int, loop bool, killOnComplete bool) *Animation

Play3O Plays an Animation.

The animation should have previously been created via `animations.add`.

If the animation is already playing calling this again won't do anything. If you need to reset an already running animation do so directly on the Animation object itself or via `AnimationManager.stop`.

func (*TileSprite) PlayI

func (self *TileSprite) PlayI(args ...interface{}) *Animation

PlayI Plays an Animation.

The animation should have previously been created via `animations.add`.

If the animation is already playing calling this again won't do anything. If you need to reset an already running animation do so directly on the Animation object itself or via `AnimationManager.stop`.

func (*TileSprite) PostUpdate

func (self *TileSprite) PostUpdate()

PostUpdate Internal method called by the World postUpdate cycle.

func (*TileSprite) PostUpdateI

func (self *TileSprite) PostUpdateI(args ...interface{})

PostUpdateI Internal method called by the World postUpdate cycle.

func (*TileSprite) PreUpdate

func (self *TileSprite) PreUpdate()

PreUpdate Automatically called by World.preUpdate.

func (*TileSprite) PreUpdateI

func (self *TileSprite) PreUpdateI(args ...interface{})

PreUpdateI Automatically called by World.preUpdate.

func (*TileSprite) PreviousPosition

func (self *TileSprite) PreviousPosition() *Point

PreviousPosition The position the Game Object was located in the previous frame.

func (*TileSprite) PreviousRotation

func (self *TileSprite) PreviousRotation() int

PreviousRotation The rotation the Game Object was in set to in the previous frame. Value is in radians.

func (*TileSprite) RefreshTexture

func (self *TileSprite) RefreshTexture() bool

RefreshTexture If true the TilingSprite will run generateTexture on its **next** render pass.

This is set by the likes of Phaser.LoadTexture.setFrame.

func (*TileSprite) RemoveChild

func (self *TileSprite) RemoveChild(child *DisplayObject) *DisplayObject

RemoveChild Removes a child from the container.

func (*TileSprite) RemoveChildAt

func (self *TileSprite) RemoveChildAt(index int) *DisplayObject

RemoveChildAt Removes a child from the specified index position.

func (*TileSprite) RemoveChildAtI

func (self *TileSprite) RemoveChildAtI(args ...interface{}) *DisplayObject

RemoveChildAtI Removes a child from the specified index position.

func (*TileSprite) RemoveChildI

func (self *TileSprite) RemoveChildI(args ...interface{}) *DisplayObject

RemoveChildI Removes a child from the container.

func (*TileSprite) RemoveChildren

func (self *TileSprite) RemoveChildren(beginIndex int, endIndex int)

RemoveChildren Removes all children from this container that are within the begin and end indexes.

func (*TileSprite) RemoveChildrenI

func (self *TileSprite) RemoveChildrenI(args ...interface{})

RemoveChildrenI Removes all children from this container that are within the begin and end indexes.

func (*TileSprite) RenderOrderID

func (self *TileSprite) RenderOrderID() int

RenderOrderID The render order ID is used internally by the renderer and Input Manager and should not be modified. This property is mostly used internally by the renderers, but is exposed for the use of plugins.

func (*TileSprite) Renderable

func (self *TileSprite) Renderable() bool

Renderable Whether this sprite is renderable or not

func (*TileSprite) Reset

func (self *TileSprite) Reset(x int, y int) *TileSprite

Reset Resets the TileSprite. This places the TileSprite at the given x/y world coordinates, resets the tilePosition and then sets alive, exists, visible and renderable all to true. Also resets the outOfBounds state. If the TileSprite has a physics body that too is reset.

func (*TileSprite) ResetFrame

func (self *TileSprite) ResetFrame()

ResetFrame Resets the texture frame dimensions that the Game Object uses for rendering.

func (*TileSprite) ResetFrameI

func (self *TileSprite) ResetFrameI(args ...interface{})

ResetFrameI Resets the texture frame dimensions that the Game Object uses for rendering.

func (*TileSprite) ResetI

func (self *TileSprite) ResetI(args ...interface{}) *TileSprite

ResetI Resets the TileSprite. This places the TileSprite at the given x/y world coordinates, resets the tilePosition and then sets alive, exists, visible and renderable all to true. Also resets the outOfBounds state. If the TileSprite has a physics body that too is reset.

func (*TileSprite) ResizeFrame

func (self *TileSprite) ResizeFrame(parent interface{}, width int, height int)

ResizeFrame Resizes the Frame dimensions that the Game Object uses for rendering.

You shouldn't normally need to ever call this, but in the case of special texture types such as Video or BitmapData it can be useful to adjust the dimensions directly in this way.

func (*TileSprite) ResizeFrameI

func (self *TileSprite) ResizeFrameI(args ...interface{})

ResizeFrameI Resizes the Frame dimensions that the Game Object uses for rendering.

You shouldn't normally need to ever call this, but in the case of special texture types such as Video or BitmapData it can be useful to adjust the dimensions directly in this way.

func (*TileSprite) Revive

func (self *TileSprite) Revive() *DisplayObject

Revive Brings a 'dead' Game Object back to life, optionally resetting its health value in the process.

A resurrected Game Object has its `alive`, `exists` and `visible` properties all set to true.

It will dispatch the `onRevived` event. Listen to `events.onRevived` for the signal.

func (*TileSprite) Revive1O

func (self *TileSprite) Revive1O(health int) *DisplayObject

Revive1O Brings a 'dead' Game Object back to life, optionally resetting its health value in the process.

A resurrected Game Object has its `alive`, `exists` and `visible` properties all set to true.

It will dispatch the `onRevived` event. Listen to `events.onRevived` for the signal.

func (*TileSprite) ReviveI

func (self *TileSprite) ReviveI(args ...interface{}) *DisplayObject

ReviveI Brings a 'dead' Game Object back to life, optionally resetting its health value in the process.

A resurrected Game Object has its `alive`, `exists` and `visible` properties all set to true.

It will dispatch the `onRevived` event. Listen to `events.onRevived` for the signal.

func (*TileSprite) Right

func (self *TileSprite) Right() int

Right The right coordinate of the Game Object. This is the same as `x + width - offsetX`.

func (*TileSprite) SendToBack

func (self *TileSprite) SendToBack() *DisplayObject

SendToBack Sends this Game Object to the bottom of its parents display list. Visually this means it will render below all other children in the same Group.

If this Game Object hasn't been added to a custom Group then this method will send it to the bottom of the Game World, because the World is the root Group from which all Game Objects descend.

func (*TileSprite) SendToBackI

func (self *TileSprite) SendToBackI(args ...interface{}) *DisplayObject

SendToBackI Sends this Game Object to the bottom of its parents display list. Visually this means it will render below all other children in the same Group.

If this Game Object hasn't been added to a custom Group then this method will send it to the bottom of the Game World, because the World is the root Group from which all Game Objects descend.

func (*TileSprite) SetAliveA

func (self *TileSprite) SetAliveA(member bool)

SetAliveA A useful flag to control if the Game Object is alive or dead.

This is set automatically by the Health components `damage` method should the object run out of health. Or you can toggle it via your game code.

This property is mostly just provided to be used by your game - it doesn't effect rendering or logic updates. However you can use `Group.getFirstAlive` in conjunction with this property for fast object pooling and recycling.

func (*TileSprite) SetAnchorA

func (self *TileSprite) SetAnchorA(member *Point)

SetAnchorA The anchor sets the origin point of the texture.

The default is 0,0 this means the texture's origin is the top left

Setting than anchor to 0.5,0.5 means the textures origin is centered

Setting the anchor to 1,1 would mean the textures origin points will be the bottom right corner

func (*TileSprite) SetAngleA

func (self *TileSprite) SetAngleA(member int)

SetAngleA The angle property is the rotation of the Game Object in *degrees* from its original orientation.

Values from 0 to 180 represent clockwise rotation; values from 0 to -180 represent counterclockwise rotation.

Values outside this range are added to or subtracted from 360 to obtain a value within the range. For example, the statement player.angle = 450 is the same as player.angle = 90.

If you wish to work in radians instead of degrees you can use the property `rotation` instead. Working in radians is slightly faster as it doesn't have to perform any calculations.

func (*TileSprite) SetAnimationsA

func (self *TileSprite) SetAnimationsA(member *AnimationManager)

SetAnimationsA If the Game Object is enabled for animation (such as a Phaser.Sprite) this is a reference to its AnimationManager instance. Through it you can create, play, pause and stop animations.

func (*TileSprite) SetAutoCullA

func (self *TileSprite) SetAutoCullA(member bool)

SetAutoCullA A Game Object with `autoCull` set to true will check its bounds against the World Camera every frame. If it is not intersecting the Camera bounds at any point then it has its `renderable` property set to `false`. This keeps the Game Object alive and still processing updates, but forces it to skip the render step entirely.

This is a relatively expensive operation, especially if enabled on hundreds of Game Objects. So enable it only if you know it's required, or you have tested performance and find it acceptable.

func (*TileSprite) SetBlendModeA

func (self *TileSprite) SetBlendModeA(member int)

SetBlendModeA The blend mode to be applied to the sprite

func (*TileSprite) SetBodyA

func (self *TileSprite) SetBodyA(member interface{})

SetBodyA `body` is the Game Objects physics body. Once a Game Object is enabled for physics you access all associated properties and methods via it.

By default Game Objects won't add themselves to any physics system and their `body` property will be `null`.

To enable this Game Object for physics you need to call `game.physics.enable(object, system)` where `object` is this object and `system` is the Physics system you are using. If none is given it defaults to `Phaser.Physics.Arcade`.

You can alternatively call `game.physics.arcade.enable(object)`, or add this Game Object to a physics enabled Group.

Important: Enabling a Game Object for P2 or Ninja physics will automatically set its `anchor` property to 0.5, so the physics body is centered on the Game Object.

If you need a different result then adjust or re-create the Body shape offsets manually or reset the anchor after enabling physics.

func (*TileSprite) SetBottomA

func (self *TileSprite) SetBottomA(member int)

SetBottomA The sum of the y and height properties. This is the same as `y + height - offsetY`.

func (*TileSprite) SetCameraOffsetA

func (self *TileSprite) SetCameraOffsetA(member *Point)

SetCameraOffsetA The x/y coordinate offset applied to the top-left of the camera that this Game Object will be drawn at if `fixedToCamera` is true.

The values are relative to the top-left of the camera view and in addition to any parent of the Game Object on the display list.

func (*TileSprite) SetCanvasBufferA

func (self *TileSprite) SetCanvasBufferA(member *PIXICanvasBuffer)

SetCanvasBufferA The CanvasBuffer object that the tiled texture is drawn to.

func (*TileSprite) SetCenterXA

func (self *TileSprite) SetCenterXA(member int)

SetCenterXA The center x coordinate of the Game Object. This is the same as `(x - offsetX) + (width / 2)`.

func (*TileSprite) SetCenterYA

func (self *TileSprite) SetCenterYA(member int)

SetCenterYA The center y coordinate of the Game Object. This is the same as `(y - offsetY) + (height / 2)`.

func (*TileSprite) SetCheckWorldBoundsA

func (self *TileSprite) SetCheckWorldBoundsA(member bool)

SetCheckWorldBoundsA If this is set to `true` the Game Object checks if it is within the World bounds each frame.

When it is no longer intersecting the world bounds it dispatches the `onOutOfBounds` event.

If it was *previously* out of bounds but is now intersecting the world bounds again it dispatches the `onEnterBounds` event.

It also optionally kills the Game Object if `outOfBoundsKill` is `true`.

When `checkWorldBounds` is enabled it forces the Game Object to calculate its full bounds every frame.

This is a relatively expensive operation, especially if enabled on hundreds of Game Objects. So enable it only if you know it's required, or you have tested performance and find it acceptable.

func (*TileSprite) SetChildIndex

func (self *TileSprite) SetChildIndex(child *DisplayObject, index int)

SetChildIndex Changes the position of an existing child in the display object container

func (*TileSprite) SetChildIndexI

func (self *TileSprite) SetChildIndexI(args ...interface{})

SetChildIndexI Changes the position of an existing child in the display object container

func (*TileSprite) SetChildrenA

func (self *TileSprite) SetChildrenA(member []DisplayObject)

SetChildrenA [read-only] The array of children of this container.

func (*TileSprite) SetComponentsA

func (self *TileSprite) SetComponentsA(member interface{})

SetComponentsA The components this Game Object has installed.

func (*TileSprite) SetDamageA

func (self *TileSprite) SetDamageA(member interface{})

SetDamageA Damages the Game Object. This removes the given amount of health from the `health` property.

If health is taken below or is equal to zero then the `kill` method is called.

func (*TileSprite) SetDataA

func (self *TileSprite) SetDataA(member interface{})

SetDataA An empty Object that belongs to this Game Object. This value isn't ever used internally by Phaser, but may be used by your own code, or by Phaser Plugins, to store data that needs to be associated with the Game Object, without polluting the Game Object directly.

func (*TileSprite) SetDebugA

func (self *TileSprite) SetDebugA(member bool)

SetDebugA A debug flag designed for use with `Game.enableStep`.

func (*TileSprite) SetDestroyPhaseA

func (self *TileSprite) SetDestroyPhaseA(member bool)

SetDestroyPhaseA As a Game Object runs through its destroy method this flag is set to true, and can be checked in any sub-systems or plugins it is being destroyed from.

func (*TileSprite) SetEventsA

func (self *TileSprite) SetEventsA(member *Events)

SetEventsA All Phaser Game Objects have an Events class which contains all of the events that are dispatched when certain things happen to this Game Object, or any of its components.

func (*TileSprite) SetExistsA

func (self *TileSprite) SetExistsA(member bool)

SetExistsA Controls if this Sprite is processed by the core Phaser game loops and Group loops.

func (*TileSprite) SetFixedToCameraA

func (self *TileSprite) SetFixedToCameraA(member bool)

SetFixedToCameraA A Game Object that is "fixed" to the camera uses its x/y coordinates as offsets from the top left of the camera during rendering.

The values are adjusted at the rendering stage, overriding the Game Objects actual world position.

The end result is that the Game Object will appear to be 'fixed' to the camera, regardless of where in the game world the camera is viewing. This is useful if for example this Game Object is a UI item that you wish to be visible at all times regardless where in the world the camera is.

The offsets are stored in the `cameraOffset` property.

Note that the `cameraOffset` values are in addition to any parent of this Game Object on the display list.

Be careful not to set `fixedToCamera` on Game Objects which are in Groups that already have `fixedToCamera` enabled on them.

func (*TileSprite) SetFrame

func (self *TileSprite) SetFrame(frame *Frame)

SetFrame Sets the texture frame the Game Object uses for rendering.

This is primarily an internal method used by `loadTexture`, but is exposed for the use of plugins and custom classes.

func (*TileSprite) SetFrameA

func (self *TileSprite) SetFrameA(member int)

SetFrameA Gets or sets the current frame index of the texture being used to render this Game Object.

To change the frame set `frame` to the index of the new frame in the sprite sheet you wish this Game Object to use, for example: `player.frame = 4`.

If the frame index given doesn't exist it will revert to the first frame found in the texture.

If you are using a texture atlas then you should use the `frameName` property instead.

If you wish to fully replace the texture being used see `loadTexture`.

func (*TileSprite) SetFrameI

func (self *TileSprite) SetFrameI(args ...interface{})

SetFrameI Sets the texture frame the Game Object uses for rendering.

This is primarily an internal method used by `loadTexture`, but is exposed for the use of plugins and custom classes.

func (*TileSprite) SetFrameNameA

func (self *TileSprite) SetFrameNameA(member string)

SetFrameNameA Gets or sets the current frame name of the texture being used to render this Game Object.

To change the frame set `frameName` to the name of the new frame in the texture atlas you wish this Game Object to use, for example: `player.frameName = "idle"`.

If the frame name given doesn't exist it will revert to the first frame found in the texture and throw a console warning.

If you are using a sprite sheet then you should use the `frame` property instead.

If you wish to fully replace the texture being used see `loadTexture`.

func (*TileSprite) SetFreshA

func (self *TileSprite) SetFreshA(member bool)

SetFreshA A Game Object is considered `fresh` if it has just been created or reset and is yet to receive a renderer transform update. This property is mostly used internally by the physics systems, but is exposed for the use of plugins.

func (*TileSprite) SetGameA

func (self *TileSprite) SetGameA(member *Game)

SetGameA A reference to the currently running Game.

func (*TileSprite) SetHealA

func (self *TileSprite) SetHealA(member interface{})

SetHealA Heal the Game Object. This adds the given amount of health to the `health` property.

func (*TileSprite) SetHealth

func (self *TileSprite) SetHealth() interface{}

SetHealth Sets the health property of the Game Object to the given amount. Will never exceed the `maxHealth` value.

func (*TileSprite) SetHealthA

func (self *TileSprite) SetHealthA(member int)

SetHealthA The Game Objects health value. This is a handy property for setting and manipulating health on a Game Object.

It can be used in combination with the `damage` method or modified directly.

func (*TileSprite) SetHeightA

func (self *TileSprite) SetHeightA(member int)

SetHeightA The height of the tiling sprite

func (*TileSprite) SetIgnoreChildInputA

func (self *TileSprite) SetIgnoreChildInputA(member bool)

SetIgnoreChildInputA If `ignoreChildInput` is `false` it will allow this objects _children_ to be considered as valid for Input events.

If this property is `true` then the children will _not_ be considered as valid for Input events.

Note that this property isn't recursive: only immediate children are influenced, it doesn't scan further down.

func (*TileSprite) SetInCameraA

func (self *TileSprite) SetInCameraA(member bool)

SetInCameraA Checks if the Game Objects bounds intersect with the Game Camera bounds. Returns `true` if they do, otherwise `false` if fully outside of the Cameras bounds.

func (*TileSprite) SetInWorldA

func (self *TileSprite) SetInWorldA(member bool)

SetInWorldA Checks if the Game Objects bounds are within, or intersect at any point with the Game World bounds.

func (*TileSprite) SetInputA

func (self *TileSprite) SetInputA(member interface{})

SetInputA The Input Handler for this Game Object.

By default it is disabled. If you wish this Game Object to process input events you should enable it with: `inputEnabled = true`.

After you have done this, this property will be a reference to the Phaser InputHandler.

func (*TileSprite) SetInputEnabledA

func (self *TileSprite) SetInputEnabledA(member bool)

SetInputEnabledA By default a Game Object won't process any input events. By setting `inputEnabled` to true a Phaser.InputHandler is created for this Game Object and it will then start to process click / touch events and more.

You can then access the Input Handler via `this.input`.

Note that Input related events are dispatched from `this.events`, i.e.: `events.onInputDown`.

If you set this property to false it will stop the Input Handler from processing any more input events.

If you want to _temporarily_ disable input for a Game Object, then it's better to set `input.enabled = false`, as it won't reset any of the Input Handlers internal properties. You can then toggle this back on as needed.

func (*TileSprite) SetKeyA

func (self *TileSprite) SetKeyA(member interface{})

SetKeyA The key of the image or texture used by this Game Object during rendering. If it is a string it's the string used to retrieve the texture from the Phaser Image Cache. It can also be an instance of a RenderTexture, BitmapData, Video or PIXI.Texture. If a Game Object is created without a key it is automatically assigned the key `__default` which is a 32x32 transparent PNG stored within the Cache. If a Game Object is given a key which doesn't exist in the Image Cache it is re-assigned the key `__missing` which is a 32x32 PNG of a green box with a line through it.

func (*TileSprite) SetLeftA

func (self *TileSprite) SetLeftA(member int)

SetLeftA The left coordinate of the Game Object. This is the same as `x - offsetX`.

func (*TileSprite) SetLifespanA

func (self *TileSprite) SetLifespanA(member int)

SetLifespanA The lifespan allows you to give a Game Object a lifespan in milliseconds.

Once the Game Object is 'born' you can set this to a positive value.

It is automatically decremented by the millisecond equivalent of `game.time.physicsElapsed` each frame. When it reaches zero it will call the `kill` method.

Very handy for particles, bullets, collectibles, or any other short-lived entity.

func (*TileSprite) SetMaxHealthA

func (self *TileSprite) SetMaxHealthA(member int)

SetMaxHealthA The Game Objects maximum health value. This works in combination with the `heal` method to ensure the health value never exceeds the maximum.

func (*TileSprite) SetNameA

func (self *TileSprite) SetNameA(member string)

SetNameA A user defined name given to this Game Object. This value isn't ever used internally by Phaser, it is meant as a game level property.

func (*TileSprite) SetOffsetXA

func (self *TileSprite) SetOffsetXA(member int)

SetOffsetXA The amount the Game Object is visually offset from its x coordinate. This is the same as `width * anchor.x`. It will only be > 0 if anchor.x is not equal to zero.

func (*TileSprite) SetOffsetYA

func (self *TileSprite) SetOffsetYA(member int)

SetOffsetYA The amount the Game Object is visually offset from its y coordinate. This is the same as `height * anchor.y`. It will only be > 0 if anchor.y is not equal to zero.

func (*TileSprite) SetOutOfBoundsKillA

func (self *TileSprite) SetOutOfBoundsKillA(member bool)

SetOutOfBoundsKillA If this and the `checkWorldBounds` property are both set to `true` then the `kill` method is called as soon as `inWorld` returns false.

func (*TileSprite) SetOutOfCameraBoundsKillA

func (self *TileSprite) SetOutOfCameraBoundsKillA(member bool)

SetOutOfCameraBoundsKillA If this and the `autoCull` property are both set to `true`, then the `kill` method is called as soon as the Game Object leaves the camera bounds.

func (*TileSprite) SetPendingDestroyA

func (self *TileSprite) SetPendingDestroyA(member bool)

SetPendingDestroyA A Game Object is that is pendingDestroy is flagged to have its destroy method called on the next logic update. You can set it directly to allow you to flag an object to be destroyed on its next update.

This is extremely useful if you wish to destroy an object from within one of its own callbacks such as with Buttons or other Input events.

func (*TileSprite) SetPhysicsTypeA

func (self *TileSprite) SetPhysicsTypeA(member int)

SetPhysicsTypeA The const physics body type of this object.

func (*TileSprite) SetPreviousPositionA

func (self *TileSprite) SetPreviousPositionA(member *Point)

SetPreviousPositionA The position the Game Object was located in the previous frame.

func (*TileSprite) SetPreviousRotationA

func (self *TileSprite) SetPreviousRotationA(member int)

SetPreviousRotationA The rotation the Game Object was in set to in the previous frame. Value is in radians.

func (*TileSprite) SetRefreshTextureA

func (self *TileSprite) SetRefreshTextureA(member bool)

SetRefreshTextureA If true the TilingSprite will run generateTexture on its **next** render pass.

This is set by the likes of Phaser.LoadTexture.setFrame.

func (*TileSprite) SetRenderOrderIDA

func (self *TileSprite) SetRenderOrderIDA(member int)

SetRenderOrderIDA The render order ID is used internally by the renderer and Input Manager and should not be modified. This property is mostly used internally by the renderers, but is exposed for the use of plugins.

func (*TileSprite) SetRenderableA

func (self *TileSprite) SetRenderableA(member bool)

SetRenderableA Whether this sprite is renderable or not

func (*TileSprite) SetRightA

func (self *TileSprite) SetRightA(member int)

SetRightA The right coordinate of the Game Object. This is the same as `x + width - offsetX`.

func (*TileSprite) SetSetHealthA

func (self *TileSprite) SetSetHealthA(member interface{})

SetSetHealthA Sets the health property of the Game Object to the given amount. Will never exceed the `maxHealth` value.

func (*TileSprite) SetShaderA

func (self *TileSprite) SetShaderA(member *AbstractFilter)

SetShaderA The shader that will be used to render this Sprite.

Set to null to remove a current shader.

func (*TileSprite) SetSmoothedA

func (self *TileSprite) SetSmoothedA(member bool)

SetSmoothedA Enable or disable texture smoothing for this Game Object.

It only takes effect if the Game Object is using an image based texture.

Smoothing is enabled by default.

func (*TileSprite) SetTexture

func (self *TileSprite) SetTexture(texture *Texture)

SetTexture Sets the texture of the sprite. Be warned that this doesn't remove or destroy the previous

texture this Sprite was using.

func (*TileSprite) SetTexture1O

func (self *TileSprite) SetTexture1O(texture *Texture, destroy bool)

SetTexture1O Sets the texture of the sprite. Be warned that this doesn't remove or destroy the previous

texture this Sprite was using.

func (*TileSprite) SetTextureA

func (self *TileSprite) SetTextureA(member *Texture)

SetTextureA The texture that the sprite is using

func (*TileSprite) SetTextureDebugA

func (self *TileSprite) SetTextureDebugA(member bool)

SetTextureDebugA If enabled a green rectangle will be drawn behind the generated tiling texture, allowing you to visually

debug the texture being used.

func (*TileSprite) SetTextureI

func (self *TileSprite) SetTextureI(args ...interface{})

SetTextureI Sets the texture of the sprite. Be warned that this doesn't remove or destroy the previous

texture this Sprite was using.

func (*TileSprite) SetTilePatternA

func (self *TileSprite) SetTilePatternA(member *PIXITexture)

SetTilePatternA The Context fill pattern that is used to draw the TilingSprite in Canvas mode only (will be null in WebGL).

func (*TileSprite) SetTilePositionA

func (self *TileSprite) SetTilePositionA(member *Point)

SetTilePositionA The offset position of the image that is being tiled

func (*TileSprite) SetTileScaleA

func (self *TileSprite) SetTileScaleA(member *Point)

SetTileScaleA The scaling of the image that is being tiled

func (*TileSprite) SetTileScaleOffsetA

func (self *TileSprite) SetTileScaleOffsetA(member *Point)

SetTileScaleOffsetA A point that represents the scale of the texture object

func (*TileSprite) SetTilingTextureA

func (self *TileSprite) SetTilingTextureA(member *PIXITexture)

SetTilingTextureA An internal Texture object that holds the tiling texture that was generated from TilingSprite.texture.

func (*TileSprite) SetTintA

func (self *TileSprite) SetTintA(member int)

SetTintA The tint applied to the sprite. This is a hex value

func (*TileSprite) SetTintedTextureA

func (self *TileSprite) SetTintedTextureA(member *Canvas)

SetTintedTextureA A canvas that contains the tinted version of the Sprite (in Canvas mode, WebGL doesn't populate this)

func (*TileSprite) SetTopA

func (self *TileSprite) SetTopA(member int)

SetTopA The y coordinate of the Game Object. This is the same as `y - offsetY`.

func (*TileSprite) SetTypeA

func (self *TileSprite) SetTypeA(member int)

SetTypeA The const type of this object.

func (*TileSprite) SetWidthA

func (self *TileSprite) SetWidthA(member int)

SetWidthA The width of the tiling sprite

func (*TileSprite) SetWorldA

func (self *TileSprite) SetWorldA(member *Point)

SetWorldA The world coordinates of this Game Object in pixels. Depending on where in the display list this Game Object is placed this value can differ from `position`, which contains the x/y coordinates relative to the Game Objects parent.

func (*TileSprite) SetXA

func (self *TileSprite) SetXA(member int)

SetXA The position of the Game Object on the x axis relative to the local coordinates of the parent.

func (*TileSprite) SetYA

func (self *TileSprite) SetYA(member int)

SetYA The position of the Game Object on the y axis relative to the local coordinates of the parent.

func (*TileSprite) SetZA

func (self *TileSprite) SetZA(member int)

SetZA The z depth of this Game Object within its parent Group. No two objects in a Group can have the same z value. This value is adjusted automatically whenever the Group hierarchy changes. If you wish to re-order the layering of a Game Object then see methods like Group.moveUp or Group.bringToTop.

func (*TileSprite) Shader

func (self *TileSprite) Shader() *AbstractFilter

Shader The shader that will be used to render this Sprite.

Set to null to remove a current shader.

func (*TileSprite) Smoothed

func (self *TileSprite) Smoothed() bool

Smoothed Enable or disable texture smoothing for this Game Object.

It only takes effect if the Game Object is using an image based texture.

Smoothing is enabled by default.

func (*TileSprite) StopScroll

func (self *TileSprite) StopScroll()

StopScroll Stops an automatically scrolling TileSprite.

func (*TileSprite) StopScrollI

func (self *TileSprite) StopScrollI(args ...interface{})

StopScrollI Stops an automatically scrolling TileSprite.

func (*TileSprite) SwapChildren

func (self *TileSprite) SwapChildren(child *DisplayObject, child2 *DisplayObject)

SwapChildren Swaps the position of 2 Display Objects within this container.

func (*TileSprite) SwapChildrenI

func (self *TileSprite) SwapChildrenI(args ...interface{})

SwapChildrenI Swaps the position of 2 Display Objects within this container.

func (*TileSprite) Texture

func (self *TileSprite) Texture() *Texture

Texture The texture that the sprite is using

func (*TileSprite) TextureDebug

func (self *TileSprite) TextureDebug() bool

TextureDebug If enabled a green rectangle will be drawn behind the generated tiling texture, allowing you to visually

debug the texture being used.

func (*TileSprite) TilePattern

func (self *TileSprite) TilePattern() *PIXITexture

TilePattern The Context fill pattern that is used to draw the TilingSprite in Canvas mode only (will be null in WebGL).

func (*TileSprite) TilePosition

func (self *TileSprite) TilePosition() *Point

TilePosition The offset position of the image that is being tiled

func (*TileSprite) TileScale

func (self *TileSprite) TileScale() *Point

TileScale The scaling of the image that is being tiled

func (*TileSprite) TileScaleOffset

func (self *TileSprite) TileScaleOffset() *Point

TileScaleOffset A point that represents the scale of the texture object

func (*TileSprite) TilingTexture

func (self *TileSprite) TilingTexture() *PIXITexture

TilingTexture An internal Texture object that holds the tiling texture that was generated from TilingSprite.texture.

func (*TileSprite) Tint

func (self *TileSprite) Tint() int

Tint The tint applied to the sprite. This is a hex value

func (*TileSprite) TintedTexture

func (self *TileSprite) TintedTexture() *Canvas

TintedTexture A canvas that contains the tinted version of the Sprite (in Canvas mode, WebGL doesn't populate this)

func (*TileSprite) Top

func (self *TileSprite) Top() int

Top The y coordinate of the Game Object. This is the same as `y - offsetY`.

func (*TileSprite) Type

func (self *TileSprite) Type() int

Type The const type of this object.

func (*TileSprite) Update

func (self *TileSprite) Update()

Update Override this method in your own custom objects to handle any update requirements. It is called immediately after `preUpdate` and before `postUpdate`. Remember if this Game Object has any children you should call update on those too.

func (*TileSprite) UpdateI

func (self *TileSprite) UpdateI(args ...interface{})

UpdateI Override this method in your own custom objects to handle any update requirements. It is called immediately after `preUpdate` and before `postUpdate`. Remember if this Game Object has any children you should call update on those too.

func (*TileSprite) Width

func (self *TileSprite) Width() int

Width The width of the tiling sprite

func (*TileSprite) World

func (self *TileSprite) World() *Point

World The world coordinates of this Game Object in pixels. Depending on where in the display list this Game Object is placed this value can differ from `position`, which contains the x/y coordinates relative to the Game Objects parent.

func (*TileSprite) X

func (self *TileSprite) X() int

X The position of the Game Object on the x axis relative to the local coordinates of the parent.

func (*TileSprite) Y

func (self *TileSprite) Y() int

Y The position of the Game Object on the y axis relative to the local coordinates of the parent.

func (*TileSprite) Z

func (self *TileSprite) Z() int

Z The z depth of this Game Object within its parent Group. No two objects in a Group can have the same z value. This value is adjusted automatically whenever the Group hierarchy changes. If you wish to re-order the layering of a Game Object then see methods like Group.moveUp or Group.bringToTop.

type Tilemap

type Tilemap struct {
	*js.Object
}

Tilemap Creates a new Phaser.Tilemap object. The map can either be populated with data from a Tiled JSON file or from a CSV file.

Tiled is a free software package specifically for creating tile maps, and is available from http://www.mapeditor.org

To do this pass the Cache key as the first parameter. When using Tiled data you need only provide the key. When using CSV data you must provide the key and the tileWidth and tileHeight parameters. If creating a blank tilemap to be populated later, you can either specify no parameters at all and then use `Tilemap.create` or pass the map and tile dimensions here. Note that all Tilemaps use a base tile size to calculate dimensions from, but that a TilemapLayer may have its own unique tile size that overrides it. A Tile map is rendered to the display using a TilemapLayer. It is not added to the display list directly itself. A map may have multiple layers. You can perform operations on the map data such as copying, pasting, filling and shuffling the tiles around.

func NewTilemap

func NewTilemap(game *Game) *Tilemap

NewTilemap Creates a new Phaser.Tilemap object. The map can either be populated with data from a Tiled JSON file or from a CSV file.

Tiled is a free software package specifically for creating tile maps, and is available from http://www.mapeditor.org

To do this pass the Cache key as the first parameter. When using Tiled data you need only provide the key. When using CSV data you must provide the key and the tileWidth and tileHeight parameters. If creating a blank tilemap to be populated later, you can either specify no parameters at all and then use `Tilemap.create` or pass the map and tile dimensions here. Note that all Tilemaps use a base tile size to calculate dimensions from, but that a TilemapLayer may have its own unique tile size that overrides it. A Tile map is rendered to the display using a TilemapLayer. It is not added to the display list directly itself. A map may have multiple layers. You can perform operations on the map data such as copying, pasting, filling and shuffling the tiles around.

func NewTilemap1O

func NewTilemap1O(game *Game, key string) *Tilemap

NewTilemap1O Creates a new Phaser.Tilemap object. The map can either be populated with data from a Tiled JSON file or from a CSV file.

Tiled is a free software package specifically for creating tile maps, and is available from http://www.mapeditor.org

To do this pass the Cache key as the first parameter. When using Tiled data you need only provide the key. When using CSV data you must provide the key and the tileWidth and tileHeight parameters. If creating a blank tilemap to be populated later, you can either specify no parameters at all and then use `Tilemap.create` or pass the map and tile dimensions here. Note that all Tilemaps use a base tile size to calculate dimensions from, but that a TilemapLayer may have its own unique tile size that overrides it. A Tile map is rendered to the display using a TilemapLayer. It is not added to the display list directly itself. A map may have multiple layers. You can perform operations on the map data such as copying, pasting, filling and shuffling the tiles around.

func NewTilemap2O

func NewTilemap2O(game *Game, key string, tileWidth int) *Tilemap

NewTilemap2O Creates a new Phaser.Tilemap object. The map can either be populated with data from a Tiled JSON file or from a CSV file.

Tiled is a free software package specifically for creating tile maps, and is available from http://www.mapeditor.org

To do this pass the Cache key as the first parameter. When using Tiled data you need only provide the key. When using CSV data you must provide the key and the tileWidth and tileHeight parameters. If creating a blank tilemap to be populated later, you can either specify no parameters at all and then use `Tilemap.create` or pass the map and tile dimensions here. Note that all Tilemaps use a base tile size to calculate dimensions from, but that a TilemapLayer may have its own unique tile size that overrides it. A Tile map is rendered to the display using a TilemapLayer. It is not added to the display list directly itself. A map may have multiple layers. You can perform operations on the map data such as copying, pasting, filling and shuffling the tiles around.

func NewTilemap3O

func NewTilemap3O(game *Game, key string, tileWidth int, tileHeight int) *Tilemap

NewTilemap3O Creates a new Phaser.Tilemap object. The map can either be populated with data from a Tiled JSON file or from a CSV file.

Tiled is a free software package specifically for creating tile maps, and is available from http://www.mapeditor.org

To do this pass the Cache key as the first parameter. When using Tiled data you need only provide the key. When using CSV data you must provide the key and the tileWidth and tileHeight parameters. If creating a blank tilemap to be populated later, you can either specify no parameters at all and then use `Tilemap.create` or pass the map and tile dimensions here. Note that all Tilemaps use a base tile size to calculate dimensions from, but that a TilemapLayer may have its own unique tile size that overrides it. A Tile map is rendered to the display using a TilemapLayer. It is not added to the display list directly itself. A map may have multiple layers. You can perform operations on the map data such as copying, pasting, filling and shuffling the tiles around.

func NewTilemap4O

func NewTilemap4O(game *Game, key string, tileWidth int, tileHeight int, width int) *Tilemap

NewTilemap4O Creates a new Phaser.Tilemap object. The map can either be populated with data from a Tiled JSON file or from a CSV file.

Tiled is a free software package specifically for creating tile maps, and is available from http://www.mapeditor.org

To do this pass the Cache key as the first parameter. When using Tiled data you need only provide the key. When using CSV data you must provide the key and the tileWidth and tileHeight parameters. If creating a blank tilemap to be populated later, you can either specify no parameters at all and then use `Tilemap.create` or pass the map and tile dimensions here. Note that all Tilemaps use a base tile size to calculate dimensions from, but that a TilemapLayer may have its own unique tile size that overrides it. A Tile map is rendered to the display using a TilemapLayer. It is not added to the display list directly itself. A map may have multiple layers. You can perform operations on the map data such as copying, pasting, filling and shuffling the tiles around.

func NewTilemap5O

func NewTilemap5O(game *Game, key string, tileWidth int, tileHeight int, width int, height int) *Tilemap

NewTilemap5O Creates a new Phaser.Tilemap object. The map can either be populated with data from a Tiled JSON file or from a CSV file.

Tiled is a free software package specifically for creating tile maps, and is available from http://www.mapeditor.org

To do this pass the Cache key as the first parameter. When using Tiled data you need only provide the key. When using CSV data you must provide the key and the tileWidth and tileHeight parameters. If creating a blank tilemap to be populated later, you can either specify no parameters at all and then use `Tilemap.create` or pass the map and tile dimensions here. Note that all Tilemaps use a base tile size to calculate dimensions from, but that a TilemapLayer may have its own unique tile size that overrides it. A Tile map is rendered to the display using a TilemapLayer. It is not added to the display list directly itself. A map may have multiple layers. You can perform operations on the map data such as copying, pasting, filling and shuffling the tiles around.

func NewTilemapI

func NewTilemapI(args ...interface{}) *Tilemap

NewTilemapI Creates a new Phaser.Tilemap object. The map can either be populated with data from a Tiled JSON file or from a CSV file.

Tiled is a free software package specifically for creating tile maps, and is available from http://www.mapeditor.org

To do this pass the Cache key as the first parameter. When using Tiled data you need only provide the key. When using CSV data you must provide the key and the tileWidth and tileHeight parameters. If creating a blank tilemap to be populated later, you can either specify no parameters at all and then use `Tilemap.create` or pass the map and tile dimensions here. Note that all Tilemaps use a base tile size to calculate dimensions from, but that a TilemapLayer may have its own unique tile size that overrides it. A Tile map is rendered to the display using a TilemapLayer. It is not added to the display list directly itself. A map may have multiple layers. You can perform operations on the map data such as copying, pasting, filling and shuffling the tiles around.

func ToTilemap

func ToTilemap(jsStruct interface{}) *Tilemap

Tilemap Binding conversion method to Tilemap point

func (*Tilemap) AddTilesetImage

func (self *Tilemap) AddTilesetImage(tileset string) *Tileset

AddTilesetImage Adds an image to the map to be used as a tileset. A single map may use multiple tilesets. Note that the tileset name can be found in the JSON file exported from Tiled, or in the Tiled editor.

func (*Tilemap) AddTilesetImage1O

func (self *Tilemap) AddTilesetImage1O(tileset string, key interface{}) *Tileset

AddTilesetImage1O Adds an image to the map to be used as a tileset. A single map may use multiple tilesets. Note that the tileset name can be found in the JSON file exported from Tiled, or in the Tiled editor.

func (*Tilemap) AddTilesetImage2O

func (self *Tilemap) AddTilesetImage2O(tileset string, key interface{}, tileWidth int) *Tileset

AddTilesetImage2O Adds an image to the map to be used as a tileset. A single map may use multiple tilesets. Note that the tileset name can be found in the JSON file exported from Tiled, or in the Tiled editor.

func (*Tilemap) AddTilesetImage3O

func (self *Tilemap) AddTilesetImage3O(tileset string, key interface{}, tileWidth int, tileHeight int) *Tileset

AddTilesetImage3O Adds an image to the map to be used as a tileset. A single map may use multiple tilesets. Note that the tileset name can be found in the JSON file exported from Tiled, or in the Tiled editor.

func (*Tilemap) AddTilesetImage4O

func (self *Tilemap) AddTilesetImage4O(tileset string, key interface{}, tileWidth int, tileHeight int, tileMargin int) *Tileset

AddTilesetImage4O Adds an image to the map to be used as a tileset. A single map may use multiple tilesets. Note that the tileset name can be found in the JSON file exported from Tiled, or in the Tiled editor.

func (*Tilemap) AddTilesetImage5O

func (self *Tilemap) AddTilesetImage5O(tileset string, key interface{}, tileWidth int, tileHeight int, tileMargin int, tileSpacing int) *Tileset

AddTilesetImage5O Adds an image to the map to be used as a tileset. A single map may use multiple tilesets. Note that the tileset name can be found in the JSON file exported from Tiled, or in the Tiled editor.

func (*Tilemap) AddTilesetImage6O

func (self *Tilemap) AddTilesetImage6O(tileset string, key interface{}, tileWidth int, tileHeight int, tileMargin int, tileSpacing int, gid int) *Tileset

AddTilesetImage6O Adds an image to the map to be used as a tileset. A single map may use multiple tilesets. Note that the tileset name can be found in the JSON file exported from Tiled, or in the Tiled editor.

func (*Tilemap) AddTilesetImageI

func (self *Tilemap) AddTilesetImageI(args ...interface{}) *Tileset

AddTilesetImageI Adds an image to the map to be used as a tileset. A single map may use multiple tilesets. Note that the tileset name can be found in the JSON file exported from Tiled, or in the Tiled editor.

func (*Tilemap) CSV

func (self *Tilemap) CSV() int

CSV empty description

func (*Tilemap) CalculateFaces

func (self *Tilemap) CalculateFaces(layer int)

CalculateFaces Internal function.

func (*Tilemap) CalculateFacesI

func (self *Tilemap) CalculateFacesI(args ...interface{})

CalculateFacesI Internal function.

func (*Tilemap) CollideIndexes

func (self *Tilemap) CollideIndexes() []interface{}

CollideIndexes An array of tile indexes that collide.

func (*Tilemap) Collision

func (self *Tilemap) Collision() []interface{}

Collision An array of collision data (polylines, etc).

func (*Tilemap) Copy

func (self *Tilemap) Copy(x int, y int, width int, height int) []interface{}

Copy Copies all of the tiles in the given rectangular block into the tilemap data buffer.

func (*Tilemap) Copy1O

func (self *Tilemap) Copy1O(x int, y int, width int, height int, layer interface{}) []interface{}

Copy1O Copies all of the tiles in the given rectangular block into the tilemap data buffer.

func (*Tilemap) CopyI

func (self *Tilemap) CopyI(args ...interface{}) []interface{}

CopyI Copies all of the tiles in the given rectangular block into the tilemap data buffer.

func (*Tilemap) Create

func (self *Tilemap) Create(name string, width int, height int, tileWidth int, tileHeight int) *TilemapLayer

Create Creates an empty map of the given dimensions and one blank layer. If layers already exist they are erased.

func (*Tilemap) Create1O

func (self *Tilemap) Create1O(name string, width int, height int, tileWidth int, tileHeight int, group *Group) *TilemapLayer

Create1O Creates an empty map of the given dimensions and one blank layer. If layers already exist they are erased.

func (*Tilemap) CreateBlankLayer

func (self *Tilemap) CreateBlankLayer(name string, width int, height int, tileWidth int, tileHeight int) *TilemapLayer

CreateBlankLayer Creates a new and empty layer on this Tilemap. By default TilemapLayers are fixed to the camera.

func (*Tilemap) CreateBlankLayer1O

func (self *Tilemap) CreateBlankLayer1O(name string, width int, height int, tileWidth int, tileHeight int, group *Group) *TilemapLayer

CreateBlankLayer1O Creates a new and empty layer on this Tilemap. By default TilemapLayers are fixed to the camera.

func (*Tilemap) CreateBlankLayerI

func (self *Tilemap) CreateBlankLayerI(args ...interface{}) *TilemapLayer

CreateBlankLayerI Creates a new and empty layer on this Tilemap. By default TilemapLayers are fixed to the camera.

func (*Tilemap) CreateFromObjects

func (self *Tilemap) CreateFromObjects(name string, gid int, key string)

CreateFromObjects Creates a Sprite for every object matching the given gid in the map data. You can optionally specify the group that the Sprite will be created in. If none is given it will be created in the World. All properties from the map data objectgroup are copied across to the Sprite, so you can use this as an easy way to configure Sprite properties from within the map editor. For example giving an object a property of alpha: 0.5 in the map editor will duplicate that when the Sprite is created. You could also give it a value like: body.velocity.x: 100 to set it moving automatically.

func (*Tilemap) CreateFromObjects1O

func (self *Tilemap) CreateFromObjects1O(name string, gid int, key string, frame interface{})

CreateFromObjects1O Creates a Sprite for every object matching the given gid in the map data. You can optionally specify the group that the Sprite will be created in. If none is given it will be created in the World. All properties from the map data objectgroup are copied across to the Sprite, so you can use this as an easy way to configure Sprite properties from within the map editor. For example giving an object a property of alpha: 0.5 in the map editor will duplicate that when the Sprite is created. You could also give it a value like: body.velocity.x: 100 to set it moving automatically.

func (*Tilemap) CreateFromObjects2O

func (self *Tilemap) CreateFromObjects2O(name string, gid int, key string, frame interface{}, exists bool)

CreateFromObjects2O Creates a Sprite for every object matching the given gid in the map data. You can optionally specify the group that the Sprite will be created in. If none is given it will be created in the World. All properties from the map data objectgroup are copied across to the Sprite, so you can use this as an easy way to configure Sprite properties from within the map editor. For example giving an object a property of alpha: 0.5 in the map editor will duplicate that when the Sprite is created. You could also give it a value like: body.velocity.x: 100 to set it moving automatically.

func (*Tilemap) CreateFromObjects3O

func (self *Tilemap) CreateFromObjects3O(name string, gid int, key string, frame interface{}, exists bool, autoCull bool)

CreateFromObjects3O Creates a Sprite for every object matching the given gid in the map data. You can optionally specify the group that the Sprite will be created in. If none is given it will be created in the World. All properties from the map data objectgroup are copied across to the Sprite, so you can use this as an easy way to configure Sprite properties from within the map editor. For example giving an object a property of alpha: 0.5 in the map editor will duplicate that when the Sprite is created. You could also give it a value like: body.velocity.x: 100 to set it moving automatically.

func (*Tilemap) CreateFromObjects4O

func (self *Tilemap) CreateFromObjects4O(name string, gid int, key string, frame interface{}, exists bool, autoCull bool, group *Group)

CreateFromObjects4O Creates a Sprite for every object matching the given gid in the map data. You can optionally specify the group that the Sprite will be created in. If none is given it will be created in the World. All properties from the map data objectgroup are copied across to the Sprite, so you can use this as an easy way to configure Sprite properties from within the map editor. For example giving an object a property of alpha: 0.5 in the map editor will duplicate that when the Sprite is created. You could also give it a value like: body.velocity.x: 100 to set it moving automatically.

func (*Tilemap) CreateFromObjects5O

func (self *Tilemap) CreateFromObjects5O(name string, gid int, key string, frame interface{}, exists bool, autoCull bool, group *Group, CustomClass interface{})

CreateFromObjects5O Creates a Sprite for every object matching the given gid in the map data. You can optionally specify the group that the Sprite will be created in. If none is given it will be created in the World. All properties from the map data objectgroup are copied across to the Sprite, so you can use this as an easy way to configure Sprite properties from within the map editor. For example giving an object a property of alpha: 0.5 in the map editor will duplicate that when the Sprite is created. You could also give it a value like: body.velocity.x: 100 to set it moving automatically.

func (*Tilemap) CreateFromObjects6O

func (self *Tilemap) CreateFromObjects6O(name string, gid int, key string, frame interface{}, exists bool, autoCull bool, group *Group, CustomClass interface{}, adjustY bool)

CreateFromObjects6O Creates a Sprite for every object matching the given gid in the map data. You can optionally specify the group that the Sprite will be created in. If none is given it will be created in the World. All properties from the map data objectgroup are copied across to the Sprite, so you can use this as an easy way to configure Sprite properties from within the map editor. For example giving an object a property of alpha: 0.5 in the map editor will duplicate that when the Sprite is created. You could also give it a value like: body.velocity.x: 100 to set it moving automatically.

func (*Tilemap) CreateFromObjectsI

func (self *Tilemap) CreateFromObjectsI(args ...interface{})

CreateFromObjectsI Creates a Sprite for every object matching the given gid in the map data. You can optionally specify the group that the Sprite will be created in. If none is given it will be created in the World. All properties from the map data objectgroup are copied across to the Sprite, so you can use this as an easy way to configure Sprite properties from within the map editor. For example giving an object a property of alpha: 0.5 in the map editor will duplicate that when the Sprite is created. You could also give it a value like: body.velocity.x: 100 to set it moving automatically.

func (*Tilemap) CreateFromTiles

func (self *Tilemap) CreateFromTiles(tiles interface{}, replacements interface{}, key string) int

CreateFromTiles Creates a Sprite for every object matching the given tile indexes in the map data. You can specify the group that the Sprite will be created in. If none is given it will be created in the World. You can optional specify if the tile will be replaced with another after the Sprite is created. This is useful if you want to lay down special tiles in a level that are converted to Sprites, but want to replace the tile itself with a floor tile or similar once converted.

func (*Tilemap) CreateFromTiles1O

func (self *Tilemap) CreateFromTiles1O(tiles interface{}, replacements interface{}, key string, layer interface{}) int

CreateFromTiles1O Creates a Sprite for every object matching the given tile indexes in the map data. You can specify the group that the Sprite will be created in. If none is given it will be created in the World. You can optional specify if the tile will be replaced with another after the Sprite is created. This is useful if you want to lay down special tiles in a level that are converted to Sprites, but want to replace the tile itself with a floor tile or similar once converted.

func (*Tilemap) CreateFromTiles2O

func (self *Tilemap) CreateFromTiles2O(tiles interface{}, replacements interface{}, key string, layer interface{}, group *Group) int

CreateFromTiles2O Creates a Sprite for every object matching the given tile indexes in the map data. You can specify the group that the Sprite will be created in. If none is given it will be created in the World. You can optional specify if the tile will be replaced with another after the Sprite is created. This is useful if you want to lay down special tiles in a level that are converted to Sprites, but want to replace the tile itself with a floor tile or similar once converted.

func (*Tilemap) CreateFromTiles3O

func (self *Tilemap) CreateFromTiles3O(tiles interface{}, replacements interface{}, key string, layer interface{}, group *Group, properties interface{}) int

CreateFromTiles3O Creates a Sprite for every object matching the given tile indexes in the map data. You can specify the group that the Sprite will be created in. If none is given it will be created in the World. You can optional specify if the tile will be replaced with another after the Sprite is created. This is useful if you want to lay down special tiles in a level that are converted to Sprites, but want to replace the tile itself with a floor tile or similar once converted.

func (*Tilemap) CreateFromTilesI

func (self *Tilemap) CreateFromTilesI(args ...interface{}) int

CreateFromTilesI Creates a Sprite for every object matching the given tile indexes in the map data. You can specify the group that the Sprite will be created in. If none is given it will be created in the World. You can optional specify if the tile will be replaced with another after the Sprite is created. This is useful if you want to lay down special tiles in a level that are converted to Sprites, but want to replace the tile itself with a floor tile or similar once converted.

func (*Tilemap) CreateI

func (self *Tilemap) CreateI(args ...interface{}) *TilemapLayer

CreateI Creates an empty map of the given dimensions and one blank layer. If layers already exist they are erased.

func (*Tilemap) CreateLayer

func (self *Tilemap) CreateLayer(layer interface{}) *TilemapLayer

CreateLayer Creates a new TilemapLayer object. By default TilemapLayers are fixed to the camera. The `layer` parameter is important. If you've created your map in Tiled then you can get this by looking in Tiled and looking at the Layer name. Or you can open the JSON file it exports and look at the layers[].name value. Either way it must match. If you wish to create a blank layer to put your own tiles on then see Tilemap.createBlankLayer.

func (*Tilemap) CreateLayer1O

func (self *Tilemap) CreateLayer1O(layer interface{}, width int) *TilemapLayer

CreateLayer1O Creates a new TilemapLayer object. By default TilemapLayers are fixed to the camera. The `layer` parameter is important. If you've created your map in Tiled then you can get this by looking in Tiled and looking at the Layer name. Or you can open the JSON file it exports and look at the layers[].name value. Either way it must match. If you wish to create a blank layer to put your own tiles on then see Tilemap.createBlankLayer.

func (*Tilemap) CreateLayer2O

func (self *Tilemap) CreateLayer2O(layer interface{}, width int, height int) *TilemapLayer

CreateLayer2O Creates a new TilemapLayer object. By default TilemapLayers are fixed to the camera. The `layer` parameter is important. If you've created your map in Tiled then you can get this by looking in Tiled and looking at the Layer name. Or you can open the JSON file it exports and look at the layers[].name value. Either way it must match. If you wish to create a blank layer to put your own tiles on then see Tilemap.createBlankLayer.

func (*Tilemap) CreateLayer3O

func (self *Tilemap) CreateLayer3O(layer interface{}, width int, height int, group *Group) *TilemapLayer

CreateLayer3O Creates a new TilemapLayer object. By default TilemapLayers are fixed to the camera. The `layer` parameter is important. If you've created your map in Tiled then you can get this by looking in Tiled and looking at the Layer name. Or you can open the JSON file it exports and look at the layers[].name value. Either way it must match. If you wish to create a blank layer to put your own tiles on then see Tilemap.createBlankLayer.

func (*Tilemap) CreateLayerI

func (self *Tilemap) CreateLayerI(args ...interface{}) *TilemapLayer

CreateLayerI Creates a new TilemapLayer object. By default TilemapLayers are fixed to the camera. The `layer` parameter is important. If you've created your map in Tiled then you can get this by looking in Tiled and looking at the Layer name. Or you can open the JSON file it exports and look at the layers[].name value. Either way it must match. If you wish to create a blank layer to put your own tiles on then see Tilemap.createBlankLayer.

func (*Tilemap) CurrentLayer

func (self *Tilemap) CurrentLayer() int

CurrentLayer The current layer.

func (*Tilemap) DebugMap

func (self *Tilemap) DebugMap() []interface{}

DebugMap Map data used for debug values only.

func (*Tilemap) Destroy

func (self *Tilemap) Destroy()

Destroy Removes all layer data from this tile map and nulls the game reference. Note: You are responsible for destroying any TilemapLayer objects you generated yourself, as Tilemap doesn't keep a reference to them.

func (*Tilemap) DestroyI

func (self *Tilemap) DestroyI(args ...interface{})

DestroyI Removes all layer data from this tile map and nulls the game reference. Note: You are responsible for destroying any TilemapLayer objects you generated yourself, as Tilemap doesn't keep a reference to them.

func (*Tilemap) Dump

func (self *Tilemap) Dump()

Dump Dumps the tilemap data out to the console.

func (*Tilemap) DumpI

func (self *Tilemap) DumpI(args ...interface{})

DumpI Dumps the tilemap data out to the console.

func (*Tilemap) EAST

func (self *Tilemap) EAST() int

EAST empty description

func (*Tilemap) EnableDebug

func (self *Tilemap) EnableDebug() bool

EnableDebug If set then console.log is used to dump out useful layer creation debug data.

func (*Tilemap) Fill

func (self *Tilemap) Fill(index int, x int, y int, width int, height int)

Fill Fills the given area with the specified tile.

func (*Tilemap) Fill1O

func (self *Tilemap) Fill1O(index int, x int, y int, width int, height int, layer interface{})

Fill1O Fills the given area with the specified tile.

func (*Tilemap) FillI

func (self *Tilemap) FillI(args ...interface{})

FillI Fills the given area with the specified tile.

func (*Tilemap) ForEach

func (self *Tilemap) ForEach(callback int, context int, x int, y int, width int, height int)

ForEach For each tile in the given area defined by x/y and width/height run the given callback.

func (*Tilemap) ForEach1O

func (self *Tilemap) ForEach1O(callback int, context int, x int, y int, width int, height int, layer interface{})

ForEach1O For each tile in the given area defined by x/y and width/height run the given callback.

func (*Tilemap) ForEachI

func (self *Tilemap) ForEachI(args ...interface{})

ForEachI For each tile in the given area defined by x/y and width/height run the given callback.

func (*Tilemap) Format

func (self *Tilemap) Format() int

Format The format of the map data, either Phaser.Tilemap.CSV or Phaser.Tilemap.TILED_JSON.

func (*Tilemap) Game

func (self *Tilemap) Game() *Game

Game A reference to the currently running Game.

func (*Tilemap) GetImageIndex

func (self *Tilemap) GetImageIndex(name string) int

GetImageIndex Gets the image index based on its name.

func (*Tilemap) GetImageIndexI

func (self *Tilemap) GetImageIndexI(args ...interface{}) int

GetImageIndexI Gets the image index based on its name.

func (*Tilemap) GetIndex

func (self *Tilemap) GetIndex(location []interface{}, name string) int

GetIndex Gets the layer index based on the layers name.

func (*Tilemap) GetIndexI

func (self *Tilemap) GetIndexI(args ...interface{}) int

GetIndexI Gets the layer index based on the layers name.

func (*Tilemap) GetLayer

func (self *Tilemap) GetLayer(layer interface{}) int

GetLayer Gets the TilemapLayer index as used in the setCollision calls.

func (*Tilemap) GetLayerI

func (self *Tilemap) GetLayerI(args ...interface{}) int

GetLayerI Gets the TilemapLayer index as used in the setCollision calls.

func (*Tilemap) GetLayerIndex

func (self *Tilemap) GetLayerIndex(name string) int

GetLayerIndex Gets the layer index based on its name.

func (*Tilemap) GetLayerIndexI

func (self *Tilemap) GetLayerIndexI(args ...interface{}) int

GetLayerIndexI Gets the layer index based on its name.

func (*Tilemap) GetTile

func (self *Tilemap) GetTile(x int, y int) *Tile

GetTile Gets a tile from the Tilemap Layer. The coordinates are given in tile values.

func (*Tilemap) GetTile1O

func (self *Tilemap) GetTile1O(x int, y int, layer interface{}) *Tile

GetTile1O Gets a tile from the Tilemap Layer. The coordinates are given in tile values.

func (*Tilemap) GetTile2O

func (self *Tilemap) GetTile2O(x int, y int, layer interface{}, nonNull bool) *Tile

GetTile2O Gets a tile from the Tilemap Layer. The coordinates are given in tile values.

func (*Tilemap) GetTileAbove

func (self *Tilemap) GetTileAbove(layer int, x int, y int)

GetTileAbove Gets the tile above the tile coordinates given. Mostly used as an internal function by calculateFaces.

func (*Tilemap) GetTileAboveI

func (self *Tilemap) GetTileAboveI(args ...interface{})

GetTileAboveI Gets the tile above the tile coordinates given. Mostly used as an internal function by calculateFaces.

func (*Tilemap) GetTileBelow

func (self *Tilemap) GetTileBelow(layer int, x int, y int)

GetTileBelow Gets the tile below the tile coordinates given. Mostly used as an internal function by calculateFaces.

func (*Tilemap) GetTileBelowI

func (self *Tilemap) GetTileBelowI(args ...interface{})

GetTileBelowI Gets the tile below the tile coordinates given. Mostly used as an internal function by calculateFaces.

func (*Tilemap) GetTileI

func (self *Tilemap) GetTileI(args ...interface{}) *Tile

GetTileI Gets a tile from the Tilemap Layer. The coordinates are given in tile values.

func (*Tilemap) GetTileLeft

func (self *Tilemap) GetTileLeft(layer int, x int, y int)

GetTileLeft Gets the tile to the left of the tile coordinates given. Mostly used as an internal function by calculateFaces.

func (*Tilemap) GetTileLeftI

func (self *Tilemap) GetTileLeftI(args ...interface{})

GetTileLeftI Gets the tile to the left of the tile coordinates given. Mostly used as an internal function by calculateFaces.

func (*Tilemap) GetTileRight

func (self *Tilemap) GetTileRight(layer int, x int, y int)

GetTileRight Gets the tile to the right of the tile coordinates given. Mostly used as an internal function by calculateFaces.

func (*Tilemap) GetTileRightI

func (self *Tilemap) GetTileRightI(args ...interface{})

GetTileRightI Gets the tile to the right of the tile coordinates given. Mostly used as an internal function by calculateFaces.

func (*Tilemap) GetTileWorldXY

func (self *Tilemap) GetTileWorldXY(x int, y int) *Tile

GetTileWorldXY Gets a tile from the Tilemap layer. The coordinates are given in pixel values.

func (*Tilemap) GetTileWorldXY1O

func (self *Tilemap) GetTileWorldXY1O(x int, y int, tileWidth int) *Tile

GetTileWorldXY1O Gets a tile from the Tilemap layer. The coordinates are given in pixel values.

func (*Tilemap) GetTileWorldXY2O

func (self *Tilemap) GetTileWorldXY2O(x int, y int, tileWidth int, tileHeight int) *Tile

GetTileWorldXY2O Gets a tile from the Tilemap layer. The coordinates are given in pixel values.

func (*Tilemap) GetTileWorldXY3O

func (self *Tilemap) GetTileWorldXY3O(x int, y int, tileWidth int, tileHeight int, layer interface{}) *Tile

GetTileWorldXY3O Gets a tile from the Tilemap layer. The coordinates are given in pixel values.

func (*Tilemap) GetTileWorldXY4O

func (self *Tilemap) GetTileWorldXY4O(x int, y int, tileWidth int, tileHeight int, layer interface{}, nonNull bool) *Tile

GetTileWorldXY4O Gets a tile from the Tilemap layer. The coordinates are given in pixel values.

func (*Tilemap) GetTileWorldXYI

func (self *Tilemap) GetTileWorldXYI(args ...interface{}) *Tile

GetTileWorldXYI Gets a tile from the Tilemap layer. The coordinates are given in pixel values.

func (*Tilemap) GetTilesetIndex

func (self *Tilemap) GetTilesetIndex(name string) int

GetTilesetIndex Gets the tileset index based on its name.

func (*Tilemap) GetTilesetIndexI

func (self *Tilemap) GetTilesetIndexI(args ...interface{}) int

GetTilesetIndexI Gets the tileset index based on its name.

func (*Tilemap) HasTile

func (self *Tilemap) HasTile(x int, y int, layer interface{}) bool

HasTile Checks if there is a tile at the given location.

func (*Tilemap) HasTileI

func (self *Tilemap) HasTileI(args ...interface{}) bool

HasTileI Checks if there is a tile at the given location.

func (*Tilemap) Height

func (self *Tilemap) Height() int

Height The height of the map (in tiles).

func (*Tilemap) HeightInPixels

func (self *Tilemap) HeightInPixels() int

HeightInPixels The height of the map in pixels based on height * tileHeight.

func (*Tilemap) Imagecollections

func (self *Tilemap) Imagecollections() []interface{}

Imagecollections An array of Image Collections.

func (*Tilemap) Images

func (self *Tilemap) Images() []interface{}

Images An array of Tiled Image Layers.

func (*Tilemap) Key

func (self *Tilemap) Key() string

Key The key of this map data in the Phaser.Cache.

func (*Tilemap) Layer

func (self *Tilemap) Layer() interface{}

Layer The current layer object.

func (*Tilemap) Layers

func (self *Tilemap) Layers() []interface{}

Layers An array of Tilemap layer data.

func (*Tilemap) NORTH

func (self *Tilemap) NORTH() int

NORTH empty description

func (*Tilemap) Objects

func (self *Tilemap) Objects() []interface{}

Objects An array of Tiled Object Layers.

func (*Tilemap) Orientation

func (self *Tilemap) Orientation() string

Orientation The orientation of the map data (as specified in Tiled), usually 'orthogonal'.

func (*Tilemap) Paste

func (self *Tilemap) Paste(x int, y int, tileblock []interface{})

Paste Pastes a previously copied block of tile data into the given x/y coordinates. Data should have been prepared with Tilemap.copy.

func (*Tilemap) Paste1O

func (self *Tilemap) Paste1O(x int, y int, tileblock []interface{}, layer interface{})

Paste1O Pastes a previously copied block of tile data into the given x/y coordinates. Data should have been prepared with Tilemap.copy.

func (*Tilemap) PasteI

func (self *Tilemap) PasteI(args ...interface{})

PasteI Pastes a previously copied block of tile data into the given x/y coordinates. Data should have been prepared with Tilemap.copy.

func (*Tilemap) Properties

func (self *Tilemap) Properties() interface{}

Properties Map specific properties as specified in Tiled.

func (*Tilemap) PutTile

func (self *Tilemap) PutTile(tile interface{}, x int, y int) *Tile

PutTile Puts a tile of the given index value at the coordinate specified. If you pass `null` as the tile it will pass your call over to Tilemap.removeTile instead.

func (*Tilemap) PutTile1O

func (self *Tilemap) PutTile1O(tile interface{}, x int, y int, layer interface{}) *Tile

PutTile1O Puts a tile of the given index value at the coordinate specified. If you pass `null` as the tile it will pass your call over to Tilemap.removeTile instead.

func (*Tilemap) PutTileI

func (self *Tilemap) PutTileI(args ...interface{}) *Tile

PutTileI Puts a tile of the given index value at the coordinate specified. If you pass `null` as the tile it will pass your call over to Tilemap.removeTile instead.

func (*Tilemap) PutTileWorldXY

func (self *Tilemap) PutTileWorldXY(tile interface{}, x int, y int, tileWidth int, tileHeight int) *Tile

PutTileWorldXY Puts a tile into the Tilemap layer. The coordinates are given in pixel values.

func (*Tilemap) PutTileWorldXY1O

func (self *Tilemap) PutTileWorldXY1O(tile interface{}, x int, y int, tileWidth int, tileHeight int, layer interface{}) *Tile

PutTileWorldXY1O Puts a tile into the Tilemap layer. The coordinates are given in pixel values.

func (*Tilemap) PutTileWorldXYI

func (self *Tilemap) PutTileWorldXYI(args ...interface{}) *Tile

PutTileWorldXYI Puts a tile into the Tilemap layer. The coordinates are given in pixel values.

func (*Tilemap) Random

func (self *Tilemap) Random(x int, y int, width int, height int)

Random Randomises a set of tiles in a given area.

func (*Tilemap) Random1O

func (self *Tilemap) Random1O(x int, y int, width int, height int, layer interface{})

Random1O Randomises a set of tiles in a given area.

func (*Tilemap) RandomI

func (self *Tilemap) RandomI(args ...interface{})

RandomI Randomises a set of tiles in a given area.

func (*Tilemap) RemoveAllLayers

func (self *Tilemap) RemoveAllLayers()

RemoveAllLayers Removes all layers from this tile map.

func (*Tilemap) RemoveAllLayersI

func (self *Tilemap) RemoveAllLayersI(args ...interface{})

RemoveAllLayersI Removes all layers from this tile map.

func (*Tilemap) RemoveTile

func (self *Tilemap) RemoveTile(x int, y int) *Tile

RemoveTile Removes the tile located at the given coordinates and updates the collision data.

func (*Tilemap) RemoveTile1O

func (self *Tilemap) RemoveTile1O(x int, y int, layer interface{}) *Tile

RemoveTile1O Removes the tile located at the given coordinates and updates the collision data.

func (*Tilemap) RemoveTileI

func (self *Tilemap) RemoveTileI(args ...interface{}) *Tile

RemoveTileI Removes the tile located at the given coordinates and updates the collision data.

func (*Tilemap) RemoveTileWorldXY

func (self *Tilemap) RemoveTileWorldXY(x int, y int, tileWidth int, tileHeight int) *Tile

RemoveTileWorldXY Removes the tile located at the given coordinates and updates the collision data. The coordinates are given in pixel values.

func (*Tilemap) RemoveTileWorldXY1O

func (self *Tilemap) RemoveTileWorldXY1O(x int, y int, tileWidth int, tileHeight int, layer interface{}) *Tile

RemoveTileWorldXY1O Removes the tile located at the given coordinates and updates the collision data. The coordinates are given in pixel values.

func (*Tilemap) RemoveTileWorldXYI

func (self *Tilemap) RemoveTileWorldXYI(args ...interface{}) *Tile

RemoveTileWorldXYI Removes the tile located at the given coordinates and updates the collision data. The coordinates are given in pixel values.

func (*Tilemap) Replace

func (self *Tilemap) Replace(source int, dest int, x int, y int, width int, height int)

Replace Scans the given area for tiles with an index matching `source` and updates their index to match `dest`.

func (*Tilemap) Replace1O

func (self *Tilemap) Replace1O(source int, dest int, x int, y int, width int, height int, layer interface{})

Replace1O Scans the given area for tiles with an index matching `source` and updates their index to match `dest`.

func (*Tilemap) ReplaceI

func (self *Tilemap) ReplaceI(args ...interface{})

ReplaceI Scans the given area for tiles with an index matching `source` and updates their index to match `dest`.

func (*Tilemap) SOUTH

func (self *Tilemap) SOUTH() int

SOUTH empty description

func (*Tilemap) SearchTileIndex

func (self *Tilemap) SearchTileIndex(index int) *Tile

SearchTileIndex Searches the entire map layer for the first tile matching the given index, then returns that Phaser.Tile object. If no match is found it returns null. The search starts from the top-left tile and continues horizontally until it hits the end of the row, then it drops down to the next column. If the reverse boolean is true, it scans starting from the bottom-right corner traveling up to the top-left.

func (*Tilemap) SearchTileIndex1O

func (self *Tilemap) SearchTileIndex1O(index int, skip int) *Tile

SearchTileIndex1O Searches the entire map layer for the first tile matching the given index, then returns that Phaser.Tile object. If no match is found it returns null. The search starts from the top-left tile and continues horizontally until it hits the end of the row, then it drops down to the next column. If the reverse boolean is true, it scans starting from the bottom-right corner traveling up to the top-left.

func (*Tilemap) SearchTileIndex2O

func (self *Tilemap) SearchTileIndex2O(index int, skip int, reverse int) *Tile

SearchTileIndex2O Searches the entire map layer for the first tile matching the given index, then returns that Phaser.Tile object. If no match is found it returns null. The search starts from the top-left tile and continues horizontally until it hits the end of the row, then it drops down to the next column. If the reverse boolean is true, it scans starting from the bottom-right corner traveling up to the top-left.

func (*Tilemap) SearchTileIndex3O

func (self *Tilemap) SearchTileIndex3O(index int, skip int, reverse int, layer interface{}) *Tile

SearchTileIndex3O Searches the entire map layer for the first tile matching the given index, then returns that Phaser.Tile object. If no match is found it returns null. The search starts from the top-left tile and continues horizontally until it hits the end of the row, then it drops down to the next column. If the reverse boolean is true, it scans starting from the bottom-right corner traveling up to the top-left.

func (*Tilemap) SearchTileIndexI

func (self *Tilemap) SearchTileIndexI(args ...interface{}) *Tile

SearchTileIndexI Searches the entire map layer for the first tile matching the given index, then returns that Phaser.Tile object. If no match is found it returns null. The search starts from the top-left tile and continues horizontally until it hits the end of the row, then it drops down to the next column. If the reverse boolean is true, it scans starting from the bottom-right corner traveling up to the top-left.

func (*Tilemap) SetCSVA

func (self *Tilemap) SetCSVA(member int)

SetCSVA empty description

func (*Tilemap) SetCollideIndexesA

func (self *Tilemap) SetCollideIndexesA(member []interface{})

SetCollideIndexesA An array of tile indexes that collide.

func (*Tilemap) SetCollision

func (self *Tilemap) SetCollision(indexes interface{})

SetCollision Sets collision the given tile or tiles. You can pass in either a single numeric index or an array of indexes: [ 2, 3, 15, 20]. The `collides` parameter controls if collision will be enabled (true) or disabled (false).

func (*Tilemap) SetCollision1O

func (self *Tilemap) SetCollision1O(indexes interface{}, collides bool)

SetCollision1O Sets collision the given tile or tiles. You can pass in either a single numeric index or an array of indexes: [ 2, 3, 15, 20]. The `collides` parameter controls if collision will be enabled (true) or disabled (false).

func (*Tilemap) SetCollision2O

func (self *Tilemap) SetCollision2O(indexes interface{}, collides bool, layer interface{})

SetCollision2O Sets collision the given tile or tiles. You can pass in either a single numeric index or an array of indexes: [ 2, 3, 15, 20]. The `collides` parameter controls if collision will be enabled (true) or disabled (false).

func (*Tilemap) SetCollision3O

func (self *Tilemap) SetCollision3O(indexes interface{}, collides bool, layer interface{}, recalculate bool)

SetCollision3O Sets collision the given tile or tiles. You can pass in either a single numeric index or an array of indexes: [ 2, 3, 15, 20]. The `collides` parameter controls if collision will be enabled (true) or disabled (false).

func (*Tilemap) SetCollisionA

func (self *Tilemap) SetCollisionA(member []interface{})

SetCollisionA An array of collision data (polylines, etc).

func (*Tilemap) SetCollisionBetween

func (self *Tilemap) SetCollisionBetween(start int, stop int)

SetCollisionBetween Sets collision on a range of tiles where the tile IDs increment sequentially. Calling this with a start value of 10 and a stop value of 14 would set collision for tiles 10, 11, 12, 13 and 14. The `collides` parameter controls if collision will be enabled (true) or disabled (false).

func (*Tilemap) SetCollisionBetween1O

func (self *Tilemap) SetCollisionBetween1O(start int, stop int, collides bool)

SetCollisionBetween1O Sets collision on a range of tiles where the tile IDs increment sequentially. Calling this with a start value of 10 and a stop value of 14 would set collision for tiles 10, 11, 12, 13 and 14. The `collides` parameter controls if collision will be enabled (true) or disabled (false).

func (*Tilemap) SetCollisionBetween2O

func (self *Tilemap) SetCollisionBetween2O(start int, stop int, collides bool, layer interface{})

SetCollisionBetween2O Sets collision on a range of tiles where the tile IDs increment sequentially. Calling this with a start value of 10 and a stop value of 14 would set collision for tiles 10, 11, 12, 13 and 14. The `collides` parameter controls if collision will be enabled (true) or disabled (false).

func (*Tilemap) SetCollisionBetween3O

func (self *Tilemap) SetCollisionBetween3O(start int, stop int, collides bool, layer interface{}, recalculate bool)

SetCollisionBetween3O Sets collision on a range of tiles where the tile IDs increment sequentially. Calling this with a start value of 10 and a stop value of 14 would set collision for tiles 10, 11, 12, 13 and 14. The `collides` parameter controls if collision will be enabled (true) or disabled (false).

func (*Tilemap) SetCollisionBetweenI

func (self *Tilemap) SetCollisionBetweenI(args ...interface{})

SetCollisionBetweenI Sets collision on a range of tiles where the tile IDs increment sequentially. Calling this with a start value of 10 and a stop value of 14 would set collision for tiles 10, 11, 12, 13 and 14. The `collides` parameter controls if collision will be enabled (true) or disabled (false).

func (*Tilemap) SetCollisionByExclusion

func (self *Tilemap) SetCollisionByExclusion(indexes []interface{})

SetCollisionByExclusion Sets collision on all tiles in the given layer, except for the IDs of those in the given array. The `collides` parameter controls if collision will be enabled (true) or disabled (false).

func (*Tilemap) SetCollisionByExclusion1O

func (self *Tilemap) SetCollisionByExclusion1O(indexes []interface{}, collides bool)

SetCollisionByExclusion1O Sets collision on all tiles in the given layer, except for the IDs of those in the given array. The `collides` parameter controls if collision will be enabled (true) or disabled (false).

func (*Tilemap) SetCollisionByExclusion2O

func (self *Tilemap) SetCollisionByExclusion2O(indexes []interface{}, collides bool, layer interface{})

SetCollisionByExclusion2O Sets collision on all tiles in the given layer, except for the IDs of those in the given array. The `collides` parameter controls if collision will be enabled (true) or disabled (false).

func (*Tilemap) SetCollisionByExclusion3O

func (self *Tilemap) SetCollisionByExclusion3O(indexes []interface{}, collides bool, layer interface{}, recalculate bool)

SetCollisionByExclusion3O Sets collision on all tiles in the given layer, except for the IDs of those in the given array. The `collides` parameter controls if collision will be enabled (true) or disabled (false).

func (*Tilemap) SetCollisionByExclusionI

func (self *Tilemap) SetCollisionByExclusionI(args ...interface{})

SetCollisionByExclusionI Sets collision on all tiles in the given layer, except for the IDs of those in the given array. The `collides` parameter controls if collision will be enabled (true) or disabled (false).

func (*Tilemap) SetCollisionByIndex

func (self *Tilemap) SetCollisionByIndex(index int)

SetCollisionByIndex Sets collision values on a tile in the set. You shouldn't usually call this method directly, instead use setCollision, setCollisionBetween or setCollisionByExclusion.

func (*Tilemap) SetCollisionByIndex1O

func (self *Tilemap) SetCollisionByIndex1O(index int, collides bool)

SetCollisionByIndex1O Sets collision values on a tile in the set. You shouldn't usually call this method directly, instead use setCollision, setCollisionBetween or setCollisionByExclusion.

func (*Tilemap) SetCollisionByIndex2O

func (self *Tilemap) SetCollisionByIndex2O(index int, collides bool, layer int)

SetCollisionByIndex2O Sets collision values on a tile in the set. You shouldn't usually call this method directly, instead use setCollision, setCollisionBetween or setCollisionByExclusion.

func (*Tilemap) SetCollisionByIndex3O

func (self *Tilemap) SetCollisionByIndex3O(index int, collides bool, layer int, recalculate bool)

SetCollisionByIndex3O Sets collision values on a tile in the set. You shouldn't usually call this method directly, instead use setCollision, setCollisionBetween or setCollisionByExclusion.

func (*Tilemap) SetCollisionByIndexI

func (self *Tilemap) SetCollisionByIndexI(args ...interface{})

SetCollisionByIndexI Sets collision values on a tile in the set. You shouldn't usually call this method directly, instead use setCollision, setCollisionBetween or setCollisionByExclusion.

func (*Tilemap) SetCollisionI

func (self *Tilemap) SetCollisionI(args ...interface{})

SetCollisionI Sets collision the given tile or tiles. You can pass in either a single numeric index or an array of indexes: [ 2, 3, 15, 20]. The `collides` parameter controls if collision will be enabled (true) or disabled (false).

func (*Tilemap) SetCurrentLayerA

func (self *Tilemap) SetCurrentLayerA(member int)

SetCurrentLayerA The current layer.

func (*Tilemap) SetDebugMapA

func (self *Tilemap) SetDebugMapA(member []interface{})

SetDebugMapA Map data used for debug values only.

func (*Tilemap) SetEASTA

func (self *Tilemap) SetEASTA(member int)

SetEASTA empty description

func (*Tilemap) SetEnableDebugA

func (self *Tilemap) SetEnableDebugA(member bool)

SetEnableDebugA If set then console.log is used to dump out useful layer creation debug data.

func (*Tilemap) SetFormatA

func (self *Tilemap) SetFormatA(member int)

SetFormatA The format of the map data, either Phaser.Tilemap.CSV or Phaser.Tilemap.TILED_JSON.

func (*Tilemap) SetGameA

func (self *Tilemap) SetGameA(member *Game)

SetGameA A reference to the currently running Game.

func (*Tilemap) SetHeightA

func (self *Tilemap) SetHeightA(member int)

SetHeightA The height of the map (in tiles).

func (*Tilemap) SetHeightInPixelsA

func (self *Tilemap) SetHeightInPixelsA(member int)

SetHeightInPixelsA The height of the map in pixels based on height * tileHeight.

func (*Tilemap) SetImagecollectionsA

func (self *Tilemap) SetImagecollectionsA(member []interface{})

SetImagecollectionsA An array of Image Collections.

func (*Tilemap) SetImagesA

func (self *Tilemap) SetImagesA(member []interface{})

SetImagesA An array of Tiled Image Layers.

func (*Tilemap) SetKeyA

func (self *Tilemap) SetKeyA(member string)

SetKeyA The key of this map data in the Phaser.Cache.

func (*Tilemap) SetLayer

func (self *Tilemap) SetLayer(layer interface{})

SetLayer Sets the current layer to the given index.

func (*Tilemap) SetLayerA

func (self *Tilemap) SetLayerA(member interface{})

SetLayerA The current layer object.

func (*Tilemap) SetLayerI

func (self *Tilemap) SetLayerI(args ...interface{})

SetLayerI Sets the current layer to the given index.

func (*Tilemap) SetLayersA

func (self *Tilemap) SetLayersA(member []interface{})

SetLayersA An array of Tilemap layer data.

func (*Tilemap) SetNORTHA

func (self *Tilemap) SetNORTHA(member int)

SetNORTHA empty description

func (*Tilemap) SetObjectsA

func (self *Tilemap) SetObjectsA(member []interface{})

SetObjectsA An array of Tiled Object Layers.

func (*Tilemap) SetOrientationA

func (self *Tilemap) SetOrientationA(member string)

SetOrientationA The orientation of the map data (as specified in Tiled), usually 'orthogonal'.

func (*Tilemap) SetPreventRecalculate

func (self *Tilemap) SetPreventRecalculate(value bool)

SetPreventRecalculate Turn off/on the recalculation of faces for tile or collision updates. `setPreventRecalculate(true)` puts recalculation on hold while `setPreventRecalculate(false)` recalculates all the changed layers.

func (*Tilemap) SetPreventRecalculateI

func (self *Tilemap) SetPreventRecalculateI(args ...interface{})

SetPreventRecalculateI Turn off/on the recalculation of faces for tile or collision updates. `setPreventRecalculate(true)` puts recalculation on hold while `setPreventRecalculate(false)` recalculates all the changed layers.

func (*Tilemap) SetPropertiesA

func (self *Tilemap) SetPropertiesA(member interface{})

SetPropertiesA Map specific properties as specified in Tiled.

func (*Tilemap) SetSOUTHA

func (self *Tilemap) SetSOUTHA(member int)

SetSOUTHA empty description

func (*Tilemap) SetTILED_JSONA

func (self *Tilemap) SetTILED_JSONA(member int)

SetTILED_JSONA empty description

func (*Tilemap) SetTileHeightA

func (self *Tilemap) SetTileHeightA(member int)

SetTileHeightA The base height of the tiles in the map (in pixels).

func (*Tilemap) SetTileIndexCallback

func (self *Tilemap) SetTileIndexCallback(indexes interface{}, callback interface{}, callbackContext interface{})

SetTileIndexCallback Sets a global collision callback for the given tile index within the layer. This will affect all tiles on this layer that have the same index. If a callback is already set for the tile index it will be replaced. Set the callback to null to remove it. If you want to set a callback for a tile at a specific location on the map then see setTileLocationCallback.

func (*Tilemap) SetTileIndexCallback1O

func (self *Tilemap) SetTileIndexCallback1O(indexes interface{}, callback interface{}, callbackContext interface{}, layer interface{})

SetTileIndexCallback1O Sets a global collision callback for the given tile index within the layer. This will affect all tiles on this layer that have the same index. If a callback is already set for the tile index it will be replaced. Set the callback to null to remove it. If you want to set a callback for a tile at a specific location on the map then see setTileLocationCallback.

func (*Tilemap) SetTileIndexCallbackI

func (self *Tilemap) SetTileIndexCallbackI(args ...interface{})

SetTileIndexCallbackI Sets a global collision callback for the given tile index within the layer. This will affect all tiles on this layer that have the same index. If a callback is already set for the tile index it will be replaced. Set the callback to null to remove it. If you want to set a callback for a tile at a specific location on the map then see setTileLocationCallback.

func (*Tilemap) SetTileLocationCallback

func (self *Tilemap) SetTileLocationCallback(x int, y int, width int, height int, callback interface{}, callbackContext interface{})

SetTileLocationCallback Sets a global collision callback for the given map location within the layer. This will affect all tiles on this layer found in the given area. If a callback is already set for the tile index it will be replaced. Set the callback to null to remove it. If you want to set a callback for a tile at a specific location on the map then see setTileLocationCallback.

func (*Tilemap) SetTileLocationCallback1O

func (self *Tilemap) SetTileLocationCallback1O(x int, y int, width int, height int, callback interface{}, callbackContext interface{}, layer interface{})

SetTileLocationCallback1O Sets a global collision callback for the given map location within the layer. This will affect all tiles on this layer found in the given area. If a callback is already set for the tile index it will be replaced. Set the callback to null to remove it. If you want to set a callback for a tile at a specific location on the map then see setTileLocationCallback.

func (*Tilemap) SetTileLocationCallbackI

func (self *Tilemap) SetTileLocationCallbackI(args ...interface{})

SetTileLocationCallbackI Sets a global collision callback for the given map location within the layer. This will affect all tiles on this layer found in the given area. If a callback is already set for the tile index it will be replaced. Set the callback to null to remove it. If you want to set a callback for a tile at a specific location on the map then see setTileLocationCallback.

func (*Tilemap) SetTileSize

func (self *Tilemap) SetTileSize(tileWidth int, tileHeight int)

SetTileSize Sets the base tile size for the map.

func (*Tilemap) SetTileSizeI

func (self *Tilemap) SetTileSizeI(args ...interface{})

SetTileSizeI Sets the base tile size for the map.

func (*Tilemap) SetTileWidthA

func (self *Tilemap) SetTileWidthA(member int)

SetTileWidthA The base width of the tiles in the map (in pixels).

func (*Tilemap) SetTilesA

func (self *Tilemap) SetTilesA(member []interface{})

SetTilesA The super array of Tiles.

func (*Tilemap) SetTilesetsA

func (self *Tilemap) SetTilesetsA(member []interface{})

SetTilesetsA An array of Tilesets.

func (*Tilemap) SetVersionA

func (self *Tilemap) SetVersionA(member int)

SetVersionA The version of the map data (as specified in Tiled, usually 1).

func (*Tilemap) SetWESTA

func (self *Tilemap) SetWESTA(member int)

SetWESTA empty description

func (*Tilemap) SetWidthA

func (self *Tilemap) SetWidthA(member int)

SetWidthA The width of the map (in tiles).

func (*Tilemap) SetWidthInPixelsA

func (self *Tilemap) SetWidthInPixelsA(member int)

SetWidthInPixelsA The width of the map in pixels based on width * tileWidth.

func (*Tilemap) Shuffle

func (self *Tilemap) Shuffle(x int, y int, width int, height int)

Shuffle Shuffles a set of tiles in a given area. It will only randomise the tiles in that area, so if they're all the same nothing will appear to have changed!

func (*Tilemap) Shuffle1O

func (self *Tilemap) Shuffle1O(x int, y int, width int, height int, layer interface{})

Shuffle1O Shuffles a set of tiles in a given area. It will only randomise the tiles in that area, so if they're all the same nothing will appear to have changed!

func (*Tilemap) ShuffleI

func (self *Tilemap) ShuffleI(args ...interface{})

ShuffleI Shuffles a set of tiles in a given area. It will only randomise the tiles in that area, so if they're all the same nothing will appear to have changed!

func (*Tilemap) Swap

func (self *Tilemap) Swap(tileA int, tileB int, x int, y int, width int, height int)

Swap Scans the given area for tiles with an index matching tileA and swaps them with tileB.

func (*Tilemap) Swap1O

func (self *Tilemap) Swap1O(tileA int, tileB int, x int, y int, width int, height int, layer interface{})

Swap1O Scans the given area for tiles with an index matching tileA and swaps them with tileB.

func (*Tilemap) SwapHandler

func (self *Tilemap) SwapHandler(value int)

SwapHandler Internal function that handles the swapping of tiles.

func (*Tilemap) SwapHandlerI

func (self *Tilemap) SwapHandlerI(args ...interface{})

SwapHandlerI Internal function that handles the swapping of tiles.

func (*Tilemap) SwapI

func (self *Tilemap) SwapI(args ...interface{})

SwapI Scans the given area for tiles with an index matching tileA and swaps them with tileB.

func (*Tilemap) TILED_JSON

func (self *Tilemap) TILED_JSON() int

TILED_JSON empty description

func (*Tilemap) TileHeight

func (self *Tilemap) TileHeight() int

TileHeight The base height of the tiles in the map (in pixels).

func (*Tilemap) TileWidth

func (self *Tilemap) TileWidth() int

TileWidth The base width of the tiles in the map (in pixels).

func (*Tilemap) Tiles

func (self *Tilemap) Tiles() []interface{}

Tiles The super array of Tiles.

func (*Tilemap) Tilesets

func (self *Tilemap) Tilesets() []interface{}

Tilesets An array of Tilesets.

func (*Tilemap) Version

func (self *Tilemap) Version() int

Version The version of the map data (as specified in Tiled, usually 1).

func (*Tilemap) WEST

func (self *Tilemap) WEST() int

WEST empty description

func (*Tilemap) Width

func (self *Tilemap) Width() int

Width The width of the map (in tiles).

func (*Tilemap) WidthInPixels

func (self *Tilemap) WidthInPixels() int

WidthInPixels The width of the map in pixels based on width * tileWidth.

type TilemapLayer

type TilemapLayer struct {
	*js.Object
}

TilemapLayer A TilemapLayer is a Phaser.Image/Sprite that renders a specific TileLayer of a Tilemap.

Since a TilemapLayer is a Sprite it can be moved around the display, added to other groups or display objects, etc.

By default TilemapLayers have fixedToCamera set to `true`. Changing this will break Camera follow and scrolling behavior.

func NewTilemapLayer

func NewTilemapLayer(game *Game, tilemap *Tilemap, index int, width int, height int) *TilemapLayer

NewTilemapLayer A TilemapLayer is a Phaser.Image/Sprite that renders a specific TileLayer of a Tilemap.

Since a TilemapLayer is a Sprite it can be moved around the display, added to other groups or display objects, etc.

By default TilemapLayers have fixedToCamera set to `true`. Changing this will break Camera follow and scrolling behavior.

func NewTilemapLayerI

func NewTilemapLayerI(args ...interface{}) *TilemapLayer

NewTilemapLayerI A TilemapLayer is a Phaser.Image/Sprite that renders a specific TileLayer of a Tilemap.

Since a TilemapLayer is a Sprite it can be moved around the display, added to other groups or display objects, etc.

By default TilemapLayers have fixedToCamera set to `true`. Changing this will break Camera follow and scrolling behavior.

func ToTilemapLayer

func ToTilemapLayer(jsStruct interface{}) *TilemapLayer

TilemapLayer Binding conversion method to TilemapLayer point

func (*TilemapLayer) AddChild

func (self *TilemapLayer) AddChild(child *DisplayObject) *DisplayObject

AddChild Adds a child to the container.

func (*TilemapLayer) AddChildAt

func (self *TilemapLayer) AddChildAt(child *DisplayObject, index int) *DisplayObject

AddChildAt Adds a child to the container at a specified index. If the index is out of bounds an error will be thrown

func (*TilemapLayer) AddChildAtI

func (self *TilemapLayer) AddChildAtI(args ...interface{}) *DisplayObject

AddChildAtI Adds a child to the container at a specified index. If the index is out of bounds an error will be thrown

func (*TilemapLayer) AddChildI

func (self *TilemapLayer) AddChildI(args ...interface{}) *DisplayObject

AddChildI Adds a child to the container.

func (*TilemapLayer) AlignIn

func (self *TilemapLayer) AlignIn(container interface{}) interface{}

AlignIn Aligns this Game Object within another Game Object, or Rectangle, known as the 'container', to one of 9 possible positions.

The container must be a Game Object, or Phaser.Rectangle object. This can include properties such as `World.bounds` or `Camera.view`, for aligning Game Objects within the world and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText, TileSprites or Buttons.

Please note that aligning a Sprite to another Game Object does **not** make it a child of the container. It simply modifies its position coordinates so it aligns with it.

The position constants you can use are:

`Phaser.TOP_LEFT`, `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

The Game Objects are placed in such a way that their _bounds_ align with the container, taking into consideration rotation, scale and the anchor property. This allows you to neatly align Game Objects, irrespective of their position value.

The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final aligned position of the Game Object. For example:

`sprite.alignIn(background, Phaser.BOTTOM_RIGHT, -20, -20)`

Would align the `sprite` to the bottom-right, but moved 20 pixels in from the corner. Think of the offsets as applying an adjustment to the containers bounds before the alignment takes place. So providing a negative offset will 'shrink' the container bounds by that amount, and providing a positive one expands it.

func (*TilemapLayer) AlignIn1O

func (self *TilemapLayer) AlignIn1O(container interface{}, position int) interface{}

AlignIn1O Aligns this Game Object within another Game Object, or Rectangle, known as the 'container', to one of 9 possible positions.

The container must be a Game Object, or Phaser.Rectangle object. This can include properties such as `World.bounds` or `Camera.view`, for aligning Game Objects within the world and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText, TileSprites or Buttons.

Please note that aligning a Sprite to another Game Object does **not** make it a child of the container. It simply modifies its position coordinates so it aligns with it.

The position constants you can use are:

`Phaser.TOP_LEFT`, `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

The Game Objects are placed in such a way that their _bounds_ align with the container, taking into consideration rotation, scale and the anchor property. This allows you to neatly align Game Objects, irrespective of their position value.

The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final aligned position of the Game Object. For example:

`sprite.alignIn(background, Phaser.BOTTOM_RIGHT, -20, -20)`

Would align the `sprite` to the bottom-right, but moved 20 pixels in from the corner. Think of the offsets as applying an adjustment to the containers bounds before the alignment takes place. So providing a negative offset will 'shrink' the container bounds by that amount, and providing a positive one expands it.

func (*TilemapLayer) AlignIn2O

func (self *TilemapLayer) AlignIn2O(container interface{}, position int, offsetX int) interface{}

AlignIn2O Aligns this Game Object within another Game Object, or Rectangle, known as the 'container', to one of 9 possible positions.

The container must be a Game Object, or Phaser.Rectangle object. This can include properties such as `World.bounds` or `Camera.view`, for aligning Game Objects within the world and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText, TileSprites or Buttons.

Please note that aligning a Sprite to another Game Object does **not** make it a child of the container. It simply modifies its position coordinates so it aligns with it.

The position constants you can use are:

`Phaser.TOP_LEFT`, `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

The Game Objects are placed in such a way that their _bounds_ align with the container, taking into consideration rotation, scale and the anchor property. This allows you to neatly align Game Objects, irrespective of their position value.

The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final aligned position of the Game Object. For example:

`sprite.alignIn(background, Phaser.BOTTOM_RIGHT, -20, -20)`

Would align the `sprite` to the bottom-right, but moved 20 pixels in from the corner. Think of the offsets as applying an adjustment to the containers bounds before the alignment takes place. So providing a negative offset will 'shrink' the container bounds by that amount, and providing a positive one expands it.

func (*TilemapLayer) AlignIn3O

func (self *TilemapLayer) AlignIn3O(container interface{}, position int, offsetX int, offsetY int) interface{}

AlignIn3O Aligns this Game Object within another Game Object, or Rectangle, known as the 'container', to one of 9 possible positions.

The container must be a Game Object, or Phaser.Rectangle object. This can include properties such as `World.bounds` or `Camera.view`, for aligning Game Objects within the world and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText, TileSprites or Buttons.

Please note that aligning a Sprite to another Game Object does **not** make it a child of the container. It simply modifies its position coordinates so it aligns with it.

The position constants you can use are:

`Phaser.TOP_LEFT`, `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

The Game Objects are placed in such a way that their _bounds_ align with the container, taking into consideration rotation, scale and the anchor property. This allows you to neatly align Game Objects, irrespective of their position value.

The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final aligned position of the Game Object. For example:

`sprite.alignIn(background, Phaser.BOTTOM_RIGHT, -20, -20)`

Would align the `sprite` to the bottom-right, but moved 20 pixels in from the corner. Think of the offsets as applying an adjustment to the containers bounds before the alignment takes place. So providing a negative offset will 'shrink' the container bounds by that amount, and providing a positive one expands it.

func (*TilemapLayer) AlignInI

func (self *TilemapLayer) AlignInI(args ...interface{}) interface{}

AlignInI Aligns this Game Object within another Game Object, or Rectangle, known as the 'container', to one of 9 possible positions.

The container must be a Game Object, or Phaser.Rectangle object. This can include properties such as `World.bounds` or `Camera.view`, for aligning Game Objects within the world and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText, TileSprites or Buttons.

Please note that aligning a Sprite to another Game Object does **not** make it a child of the container. It simply modifies its position coordinates so it aligns with it.

The position constants you can use are:

`Phaser.TOP_LEFT`, `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

The Game Objects are placed in such a way that their _bounds_ align with the container, taking into consideration rotation, scale and the anchor property. This allows you to neatly align Game Objects, irrespective of their position value.

The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final aligned position of the Game Object. For example:

`sprite.alignIn(background, Phaser.BOTTOM_RIGHT, -20, -20)`

Would align the `sprite` to the bottom-right, but moved 20 pixels in from the corner. Think of the offsets as applying an adjustment to the containers bounds before the alignment takes place. So providing a negative offset will 'shrink' the container bounds by that amount, and providing a positive one expands it.

func (*TilemapLayer) AlignTo

func (self *TilemapLayer) AlignTo(parent interface{}) interface{}

AlignTo Aligns this Game Object to the side of another Game Object, or Rectangle, known as the 'parent', in one of 11 possible positions.

The parent must be a Game Object, or Phaser.Rectangle object. This can include properties such as `World.bounds` or `Camera.view`, for aligning Game Objects within the world and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText, TileSprites or Buttons.

Please note that aligning a Sprite to another Game Object does **not** make it a child of the parent. It simply modifies its position coordinates so it aligns with it.

The position constants you can use are:

`Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_TOP`, `Phaser.LEFT_CENTER`, `Phaser.LEFT_BOTTOM`, `Phaser.RIGHT_TOP`, `Phaser.RIGHT_CENTER`, `Phaser.RIGHT_BOTTOM`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

The Game Objects are placed in such a way that their _bounds_ align with the parent, taking into consideration rotation, scale and the anchor property. This allows you to neatly align Game Objects, irrespective of their position value.

The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final aligned position of the Game Object. For example:

`sprite.alignTo(background, Phaser.BOTTOM_RIGHT, -20, -20)`

Would align the `sprite` to the bottom-right, but moved 20 pixels in from the corner. Think of the offsets as applying an adjustment to the parents bounds before the alignment takes place. So providing a negative offset will 'shrink' the parent bounds by that amount, and providing a positive one expands it.

func (*TilemapLayer) AlignTo1O

func (self *TilemapLayer) AlignTo1O(parent interface{}, position int) interface{}

AlignTo1O Aligns this Game Object to the side of another Game Object, or Rectangle, known as the 'parent', in one of 11 possible positions.

The parent must be a Game Object, or Phaser.Rectangle object. This can include properties such as `World.bounds` or `Camera.view`, for aligning Game Objects within the world and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText, TileSprites or Buttons.

Please note that aligning a Sprite to another Game Object does **not** make it a child of the parent. It simply modifies its position coordinates so it aligns with it.

The position constants you can use are:

`Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_TOP`, `Phaser.LEFT_CENTER`, `Phaser.LEFT_BOTTOM`, `Phaser.RIGHT_TOP`, `Phaser.RIGHT_CENTER`, `Phaser.RIGHT_BOTTOM`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

The Game Objects are placed in such a way that their _bounds_ align with the parent, taking into consideration rotation, scale and the anchor property. This allows you to neatly align Game Objects, irrespective of their position value.

The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final aligned position of the Game Object. For example:

`sprite.alignTo(background, Phaser.BOTTOM_RIGHT, -20, -20)`

Would align the `sprite` to the bottom-right, but moved 20 pixels in from the corner. Think of the offsets as applying an adjustment to the parents bounds before the alignment takes place. So providing a negative offset will 'shrink' the parent bounds by that amount, and providing a positive one expands it.

func (*TilemapLayer) AlignTo2O

func (self *TilemapLayer) AlignTo2O(parent interface{}, position int, offsetX int) interface{}

AlignTo2O Aligns this Game Object to the side of another Game Object, or Rectangle, known as the 'parent', in one of 11 possible positions.

The parent must be a Game Object, or Phaser.Rectangle object. This can include properties such as `World.bounds` or `Camera.view`, for aligning Game Objects within the world and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText, TileSprites or Buttons.

Please note that aligning a Sprite to another Game Object does **not** make it a child of the parent. It simply modifies its position coordinates so it aligns with it.

The position constants you can use are:

`Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_TOP`, `Phaser.LEFT_CENTER`, `Phaser.LEFT_BOTTOM`, `Phaser.RIGHT_TOP`, `Phaser.RIGHT_CENTER`, `Phaser.RIGHT_BOTTOM`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

The Game Objects are placed in such a way that their _bounds_ align with the parent, taking into consideration rotation, scale and the anchor property. This allows you to neatly align Game Objects, irrespective of their position value.

The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final aligned position of the Game Object. For example:

`sprite.alignTo(background, Phaser.BOTTOM_RIGHT, -20, -20)`

Would align the `sprite` to the bottom-right, but moved 20 pixels in from the corner. Think of the offsets as applying an adjustment to the parents bounds before the alignment takes place. So providing a negative offset will 'shrink' the parent bounds by that amount, and providing a positive one expands it.

func (*TilemapLayer) AlignTo3O

func (self *TilemapLayer) AlignTo3O(parent interface{}, position int, offsetX int, offsetY int) interface{}

AlignTo3O Aligns this Game Object to the side of another Game Object, or Rectangle, known as the 'parent', in one of 11 possible positions.

The parent must be a Game Object, or Phaser.Rectangle object. This can include properties such as `World.bounds` or `Camera.view`, for aligning Game Objects within the world and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText, TileSprites or Buttons.

Please note that aligning a Sprite to another Game Object does **not** make it a child of the parent. It simply modifies its position coordinates so it aligns with it.

The position constants you can use are:

`Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_TOP`, `Phaser.LEFT_CENTER`, `Phaser.LEFT_BOTTOM`, `Phaser.RIGHT_TOP`, `Phaser.RIGHT_CENTER`, `Phaser.RIGHT_BOTTOM`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

The Game Objects are placed in such a way that their _bounds_ align with the parent, taking into consideration rotation, scale and the anchor property. This allows you to neatly align Game Objects, irrespective of their position value.

The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final aligned position of the Game Object. For example:

`sprite.alignTo(background, Phaser.BOTTOM_RIGHT, -20, -20)`

Would align the `sprite` to the bottom-right, but moved 20 pixels in from the corner. Think of the offsets as applying an adjustment to the parents bounds before the alignment takes place. So providing a negative offset will 'shrink' the parent bounds by that amount, and providing a positive one expands it.

func (*TilemapLayer) AlignToI

func (self *TilemapLayer) AlignToI(args ...interface{}) interface{}

AlignToI Aligns this Game Object to the side of another Game Object, or Rectangle, known as the 'parent', in one of 11 possible positions.

The parent must be a Game Object, or Phaser.Rectangle object. This can include properties such as `World.bounds` or `Camera.view`, for aligning Game Objects within the world and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText, TileSprites or Buttons.

Please note that aligning a Sprite to another Game Object does **not** make it a child of the parent. It simply modifies its position coordinates so it aligns with it.

The position constants you can use are:

`Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_TOP`, `Phaser.LEFT_CENTER`, `Phaser.LEFT_BOTTOM`, `Phaser.RIGHT_TOP`, `Phaser.RIGHT_CENTER`, `Phaser.RIGHT_BOTTOM`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

The Game Objects are placed in such a way that their _bounds_ align with the parent, taking into consideration rotation, scale and the anchor property. This allows you to neatly align Game Objects, irrespective of their position value.

The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final aligned position of the Game Object. For example:

`sprite.alignTo(background, Phaser.BOTTOM_RIGHT, -20, -20)`

Would align the `sprite` to the bottom-right, but moved 20 pixels in from the corner. Think of the offsets as applying an adjustment to the parents bounds before the alignment takes place. So providing a negative offset will 'shrink' the parent bounds by that amount, and providing a positive one expands it.

func (*TilemapLayer) Alive

func (self *TilemapLayer) Alive() bool

Alive A useful flag to control if the Game Object is alive or dead.

This is set automatically by the Health components `damage` method should the object run out of health. Or you can toggle it via your game code.

This property is mostly just provided to be used by your game - it doesn't effect rendering or logic updates. However you can use `Group.getFirstAlive` in conjunction with this property for fast object pooling and recycling.

func (*TilemapLayer) Anchor

func (self *TilemapLayer) Anchor() *Point

Anchor The anchor sets the origin point of the texture.

The default is 0,0 this means the texture's origin is the top left

Setting than anchor to 0.5,0.5 means the textures origin is centered

Setting the anchor to 1,1 would mean the textures origin points will be the bottom right corner

func (*TilemapLayer) Angle

func (self *TilemapLayer) Angle() int

Angle The angle property is the rotation of the Game Object in *degrees* from its original orientation.

Values from 0 to 180 represent clockwise rotation; values from 0 to -180 represent counterclockwise rotation.

Values outside this range are added to or subtracted from 360 to obtain a value within the range. For example, the statement player.angle = 450 is the same as player.angle = 90.

If you wish to work in radians instead of degrees you can use the property `rotation` instead. Working in radians is slightly faster as it doesn't have to perform any calculations.

func (*TilemapLayer) Animations

func (self *TilemapLayer) Animations() *AnimationManager

Animations If the Game Object is enabled for animation (such as a Phaser.Sprite) this is a reference to its AnimationManager instance. Through it you can create, play, pause and stop animations.

func (*TilemapLayer) AutoCull

func (self *TilemapLayer) AutoCull() bool

AutoCull A Game Object with `autoCull` set to true will check its bounds against the World Camera every frame. If it is not intersecting the Camera bounds at any point then it has its `renderable` property set to `false`. This keeps the Game Object alive and still processing updates, but forces it to skip the render step entirely.

This is a relatively expensive operation, especially if enabled on hundreds of Game Objects. So enable it only if you know it's required, or you have tested performance and find it acceptable.

func (*TilemapLayer) BlendMode

func (self *TilemapLayer) BlendMode() int

BlendMode The blend mode to be applied to the sprite. Set to PIXI.blendModes.NORMAL to remove any blend mode.

Warning: You cannot have a blend mode and a filter active on the same Sprite. Doing so will render the sprite invisible.

func (*TilemapLayer) Body

func (self *TilemapLayer) Body() interface{}

Body `body` is the Game Objects physics body. Once a Game Object is enabled for physics you access all associated properties and methods via it.

By default Game Objects won't add themselves to any physics system and their `body` property will be `null`.

To enable this Game Object for physics you need to call `game.physics.enable(object, system)` where `object` is this object and `system` is the Physics system you are using. If none is given it defaults to `Phaser.Physics.Arcade`.

You can alternatively call `game.physics.arcade.enable(object)`, or add this Game Object to a physics enabled Group.

Important: Enabling a Game Object for P2 or Ninja physics will automatically set its `anchor` property to 0.5, so the physics body is centered on the Game Object.

If you need a different result then adjust or re-create the Body shape offsets manually or reset the anchor after enabling physics.

func (*TilemapLayer) Bottom

func (self *TilemapLayer) Bottom() int

Bottom The sum of the y and height properties. This is the same as `y + height - offsetY`.

func (*TilemapLayer) BringToTop

func (self *TilemapLayer) BringToTop() *DisplayObject

BringToTop Brings this Game Object to the top of its parents display list. Visually this means it will render over the top of any old child in the same Group.

If this Game Object hasn't been added to a custom Group then this method will bring it to the top of the Game World, because the World is the root Group from which all Game Objects descend.

func (*TilemapLayer) BringToTopI

func (self *TilemapLayer) BringToTopI(args ...interface{}) *DisplayObject

BringToTopI Brings this Game Object to the top of its parents display list. Visually this means it will render over the top of any old child in the same Group.

If this Game Object hasn't been added to a custom Group then this method will bring it to the top of the Game World, because the World is the root Group from which all Game Objects descend.

func (*TilemapLayer) CameraOffset

func (self *TilemapLayer) CameraOffset() *Point

CameraOffset The x/y coordinate offset applied to the top-left of the camera that this Game Object will be drawn at if `fixedToCamera` is true.

The values are relative to the top-left of the camera view and in addition to any parent of the Game Object on the display list.

func (*TilemapLayer) Canvas

func (self *TilemapLayer) Canvas() dom.HTMLCanvasElement

Canvas The canvas to which this TilemapLayer draws.

func (*TilemapLayer) CenterX

func (self *TilemapLayer) CenterX() int

CenterX The center x coordinate of the Game Object. This is the same as `(x - offsetX) + (width / 2)`.

func (*TilemapLayer) CenterY

func (self *TilemapLayer) CenterY() int

CenterY The center y coordinate of the Game Object. This is the same as `(y - offsetY) + (height / 2)`.

func (*TilemapLayer) CheckTransform

func (self *TilemapLayer) CheckTransform(wt *Matrix)

CheckTransform Adjust scaling limits, if set, to this Game Object.

func (*TilemapLayer) CheckTransformI

func (self *TilemapLayer) CheckTransformI(args ...interface{})

CheckTransformI Adjust scaling limits, if set, to this Game Object.

func (*TilemapLayer) CheckWorldBounds

func (self *TilemapLayer) CheckWorldBounds() bool

CheckWorldBounds If this is set to `true` the Game Object checks if it is within the World bounds each frame.

When it is no longer intersecting the world bounds it dispatches the `onOutOfBounds` event.

If it was *previously* out of bounds but is now intersecting the world bounds again it dispatches the `onEnterBounds` event.

It also optionally kills the Game Object if `outOfBoundsKill` is `true`.

When `checkWorldBounds` is enabled it forces the Game Object to calculate its full bounds every frame.

This is a relatively expensive operation, especially if enabled on hundreds of Game Objects. So enable it only if you know it's required, or you have tested performance and find it acceptable.

func (*TilemapLayer) Children

func (self *TilemapLayer) Children() []DisplayObject

Children [read-only] The array of children of this container.

func (*TilemapLayer) Components

func (self *TilemapLayer) Components() interface{}

Components The components this Game Object has installed.

func (*TilemapLayer) Contains

func (self *TilemapLayer) Contains(child *DisplayObject) bool

Contains Determines whether the specified display object is a child of the DisplayObjectContainer instance or the instance itself.

func (*TilemapLayer) ContainsI

func (self *TilemapLayer) ContainsI(args ...interface{}) bool

ContainsI Determines whether the specified display object is a child of the DisplayObjectContainer instance or the instance itself.

func (*TilemapLayer) Crop

func (self *TilemapLayer) Crop(rect *Rectangle)

Crop Crop allows you to crop the texture being used to display this Game Object. Setting a crop rectangle modifies the core texture frame. The Game Object width and height properties will be adjusted accordingly.

Cropping takes place from the top-left and can be modified in real-time either by providing an updated rectangle object to this method, or by modifying `cropRect` property directly and then calling `updateCrop`.

The rectangle object given to this method can be either a `Phaser.Rectangle` or any other object so long as it has public `x`, `y`, `width`, `height`, `right` and `bottom` properties.

A reference to the rectangle is stored in `cropRect` unless the `copy` parameter is `true`, in which case the values are duplicated to a local object.

func (*TilemapLayer) Crop1O

func (self *TilemapLayer) Crop1O(rect *Rectangle, copy bool)

Crop1O Crop allows you to crop the texture being used to display this Game Object. Setting a crop rectangle modifies the core texture frame. The Game Object width and height properties will be adjusted accordingly.

Cropping takes place from the top-left and can be modified in real-time either by providing an updated rectangle object to this method, or by modifying `cropRect` property directly and then calling `updateCrop`.

The rectangle object given to this method can be either a `Phaser.Rectangle` or any other object so long as it has public `x`, `y`, `width`, `height`, `right` and `bottom` properties.

A reference to the rectangle is stored in `cropRect` unless the `copy` parameter is `true`, in which case the values are duplicated to a local object.

func (*TilemapLayer) CropI

func (self *TilemapLayer) CropI(args ...interface{})

CropI Crop allows you to crop the texture being used to display this Game Object. Setting a crop rectangle modifies the core texture frame. The Game Object width and height properties will be adjusted accordingly.

Cropping takes place from the top-left and can be modified in real-time either by providing an updated rectangle object to this method, or by modifying `cropRect` property directly and then calling `updateCrop`.

The rectangle object given to this method can be either a `Phaser.Rectangle` or any other object so long as it has public `x`, `y`, `width`, `height`, `right` and `bottom` properties.

A reference to the rectangle is stored in `cropRect` unless the `copy` parameter is `true`, in which case the values are duplicated to a local object.

func (*TilemapLayer) CropRect

func (self *TilemapLayer) CropRect() *Rectangle

CropRect The Rectangle used to crop the texture this Game Object uses. Set this property via `crop`. If you modify this property directly you must call `updateCrop` in order to have the change take effect.

func (*TilemapLayer) Damage

func (self *TilemapLayer) Damage() interface{}

Damage Damages the Game Object. This removes the given amount of health from the `health` property.

If health is taken below or is equal to zero then the `kill` method is called.

func (*TilemapLayer) Data

func (self *TilemapLayer) Data() interface{}

Data An empty Object that belongs to this Game Object. This value isn't ever used internally by Phaser, but may be used by your own code, or by Phaser Plugins, to store data that needs to be associated with the Game Object, without polluting the Game Object directly.

func (*TilemapLayer) Debug

func (self *TilemapLayer) Debug() bool

Debug Enable an additional "debug rendering" pass to display collision information.

func (*TilemapLayer) DebugSettings

func (self *TilemapLayer) DebugSettings() interface{}

DebugSettings Settings used for debugging and diagnostics.

func (*TilemapLayer) DeltaX

func (self *TilemapLayer) DeltaX() int

DeltaX Returns the delta x value. The difference between world.x now and in the previous frame.

The value will be positive if the Game Object has moved to the right or negative if to the left.

func (*TilemapLayer) DeltaY

func (self *TilemapLayer) DeltaY() int

DeltaY Returns the delta y value. The difference between world.y now and in the previous frame.

The value will be positive if the Game Object has moved down or negative if up.

func (*TilemapLayer) DeltaZ

func (self *TilemapLayer) DeltaZ() int

DeltaZ Returns the delta z value. The difference between rotation now and in the previous frame. The delta value.

func (*TilemapLayer) Destroy

func (self *TilemapLayer) Destroy()

Destroy Destroys this TilemapLayer.

func (*TilemapLayer) DestroyI

func (self *TilemapLayer) DestroyI(args ...interface{})

DestroyI Destroys this TilemapLayer.

func (*TilemapLayer) DestroyPhase

func (self *TilemapLayer) DestroyPhase() bool

DestroyPhase As a Game Object runs through its destroy method this flag is set to true, and can be checked in any sub-systems or plugins it is being destroyed from.

func (*TilemapLayer) Dirty

func (self *TilemapLayer) Dirty() bool

Dirty If true tiles will be force rendered, even if such is not believed to be required.

func (*TilemapLayer) EnsureSharedCopyCanvas

func (self *TilemapLayer) EnsureSharedCopyCanvas()

EnsureSharedCopyCanvas Create if needed (and return) a shared copy canvas that is shared across all TilemapLayers.

Code that uses the canvas is responsible to ensure the dimensions and save/restore state as appropriate.

func (*TilemapLayer) EnsureSharedCopyCanvasI

func (self *TilemapLayer) EnsureSharedCopyCanvasI(args ...interface{})

EnsureSharedCopyCanvasI Create if needed (and return) a shared copy canvas that is shared across all TilemapLayers.

Code that uses the canvas is responsible to ensure the dimensions and save/restore state as appropriate.

func (*TilemapLayer) Events

func (self *TilemapLayer) Events() *Events

Events All Phaser Game Objects have an Events class which contains all of the events that are dispatched when certain things happen to this Game Object, or any of its components.

func (*TilemapLayer) Exists

func (self *TilemapLayer) Exists() bool

Exists Controls if the core game loop and physics update this game object or not.

func (*TilemapLayer) FixedToCamera

func (self *TilemapLayer) FixedToCamera() bool

FixedToCamera A Game Object that is "fixed" to the camera uses its x/y coordinates as offsets from the top left of the camera during rendering.

The values are adjusted at the rendering stage, overriding the Game Objects actual world position.

The end result is that the Game Object will appear to be 'fixed' to the camera, regardless of where in the game world the camera is viewing. This is useful if for example this Game Object is a UI item that you wish to be visible at all times regardless where in the world the camera is.

The offsets are stored in the `cameraOffset` property.

Note that the `cameraOffset` values are in addition to any parent of this Game Object on the display list.

Be careful not to set `fixedToCamera` on Game Objects which are in Groups that already have `fixedToCamera` enabled on them.

func (*TilemapLayer) Frame

func (self *TilemapLayer) Frame() int

Frame Gets or sets the current frame index of the texture being used to render this Game Object.

To change the frame set `frame` to the index of the new frame in the sprite sheet you wish this Game Object to use, for example: `player.frame = 4`.

If the frame index given doesn't exist it will revert to the first frame found in the texture.

If you are using a texture atlas then you should use the `frameName` property instead.

If you wish to fully replace the texture being used see `loadTexture`.

func (*TilemapLayer) FrameName

func (self *TilemapLayer) FrameName() string

FrameName Gets or sets the current frame name of the texture being used to render this Game Object.

To change the frame set `frameName` to the name of the new frame in the texture atlas you wish this Game Object to use, for example: `player.frameName = "idle"`.

If the frame name given doesn't exist it will revert to the first frame found in the texture and throw a console warning.

If you are using a sprite sheet then you should use the `frame` property instead.

If you wish to fully replace the texture being used see `loadTexture`.

func (*TilemapLayer) Fresh

func (self *TilemapLayer) Fresh() bool

Fresh A Game Object is considered `fresh` if it has just been created or reset and is yet to receive a renderer transform update. This property is mostly used internally by the physics systems, but is exposed for the use of plugins.

func (*TilemapLayer) Game

func (self *TilemapLayer) Game() *Game

Game A reference to the currently running Game.

func (*TilemapLayer) GetBounds

func (self *TilemapLayer) GetBounds(matrix *Matrix) *Rectangle

GetBounds Returns the bounds of the Sprite as a rectangle.

The bounds calculation takes the worldTransform into account.

It is important to note that the transform is not updated when you call this method.

So if this Sprite is the child of a Display Object which has had its transform

updated since the last render pass, those changes will not yet have been applied

to this Sprites worldTransform. If you need to ensure that all parent transforms

are factored into this getBounds operation then you should call `updateTransform`

on the root most object in this Sprites display list first.

func (*TilemapLayer) GetBoundsI

func (self *TilemapLayer) GetBoundsI(args ...interface{}) *Rectangle

GetBoundsI Returns the bounds of the Sprite as a rectangle.

The bounds calculation takes the worldTransform into account.

It is important to note that the transform is not updated when you call this method.

So if this Sprite is the child of a Display Object which has had its transform

updated since the last render pass, those changes will not yet have been applied

to this Sprites worldTransform. If you need to ensure that all parent transforms

are factored into this getBounds operation then you should call `updateTransform`

on the root most object in this Sprites display list first.

func (*TilemapLayer) GetChildAt

func (self *TilemapLayer) GetChildAt(index int) *DisplayObject

GetChildAt Returns the child at the specified index

func (*TilemapLayer) GetChildAtI

func (self *TilemapLayer) GetChildAtI(args ...interface{}) *DisplayObject

GetChildAtI Returns the child at the specified index

func (*TilemapLayer) GetChildIndex

func (self *TilemapLayer) GetChildIndex(child *DisplayObject) int

GetChildIndex Returns the index position of a child DisplayObject instance

func (*TilemapLayer) GetChildIndexI

func (self *TilemapLayer) GetChildIndexI(args ...interface{}) int

GetChildIndexI Returns the index position of a child DisplayObject instance

func (*TilemapLayer) GetLocalBounds

func (self *TilemapLayer) GetLocalBounds() *Rectangle

GetLocalBounds Retrieves the non-global local bounds of the Sprite as a rectangle. The calculation takes all visible children into consideration.

func (*TilemapLayer) GetLocalBoundsI

func (self *TilemapLayer) GetLocalBoundsI(args ...interface{}) *Rectangle

GetLocalBoundsI Retrieves the non-global local bounds of the Sprite as a rectangle. The calculation takes all visible children into consideration.

func (*TilemapLayer) GetRayCastTiles

func (self *TilemapLayer) GetRayCastTiles(line *Line) []Tile

GetRayCastTiles Gets all tiles that intersect with the given line.

func (*TilemapLayer) GetRayCastTiles1O

func (self *TilemapLayer) GetRayCastTiles1O(line *Line, stepRate int) []Tile

GetRayCastTiles1O Gets all tiles that intersect with the given line.

func (*TilemapLayer) GetRayCastTiles2O

func (self *TilemapLayer) GetRayCastTiles2O(line *Line, stepRate int, collides bool) []Tile

GetRayCastTiles2O Gets all tiles that intersect with the given line.

func (*TilemapLayer) GetRayCastTiles3O

func (self *TilemapLayer) GetRayCastTiles3O(line *Line, stepRate int, collides bool, interestingFace bool) []Tile

GetRayCastTiles3O Gets all tiles that intersect with the given line.

func (*TilemapLayer) GetRayCastTilesI

func (self *TilemapLayer) GetRayCastTilesI(args ...interface{}) []Tile

GetRayCastTilesI Gets all tiles that intersect with the given line.

func (*TilemapLayer) GetTileX

func (self *TilemapLayer) GetTileX(x int) int

GetTileX Convert a pixel value to a tile coordinate.

func (*TilemapLayer) GetTileXI

func (self *TilemapLayer) GetTileXI(args ...interface{}) int

GetTileXI Convert a pixel value to a tile coordinate.

func (*TilemapLayer) GetTileXY

func (self *TilemapLayer) GetTileXY(x int, y int, point interface{}) interface{}

GetTileXY Convert a pixel coordinate to a tile coordinate.

func (*TilemapLayer) GetTileXYI

func (self *TilemapLayer) GetTileXYI(args ...interface{}) interface{}

GetTileXYI Convert a pixel coordinate to a tile coordinate.

func (*TilemapLayer) GetTileY

func (self *TilemapLayer) GetTileY(y int) int

GetTileY Convert a pixel value to a tile coordinate.

func (*TilemapLayer) GetTileYI

func (self *TilemapLayer) GetTileYI(args ...interface{}) int

GetTileYI Convert a pixel value to a tile coordinate.

func (*TilemapLayer) GetTiles

func (self *TilemapLayer) GetTiles(x int, y int, width int, height int) []Tile

GetTiles Get all tiles that exist within the given area, defined by the top-left corner, width and height. Values given are in pixels, not tiles.

func (*TilemapLayer) GetTiles1O

func (self *TilemapLayer) GetTiles1O(x int, y int, width int, height int, collides bool) []Tile

GetTiles1O Get all tiles that exist within the given area, defined by the top-left corner, width and height. Values given are in pixels, not tiles.

func (*TilemapLayer) GetTiles2O

func (self *TilemapLayer) GetTiles2O(x int, y int, width int, height int, collides bool, interestingFace bool) []Tile

GetTiles2O Get all tiles that exist within the given area, defined by the top-left corner, width and height. Values given are in pixels, not tiles.

func (*TilemapLayer) GetTilesI

func (self *TilemapLayer) GetTilesI(args ...interface{}) []Tile

GetTilesI Get all tiles that exist within the given area, defined by the top-left corner, width and height. Values given are in pixels, not tiles.

func (*TilemapLayer) Heal

func (self *TilemapLayer) Heal() interface{}

Heal Heal the Game Object. This adds the given amount of health to the `health` property.

func (*TilemapLayer) Health

func (self *TilemapLayer) Health() int

Health The Game Objects health value. This is a handy property for setting and manipulating health on a Game Object.

It can be used in combination with the `damage` method or modified directly.

func (*TilemapLayer) Height

func (self *TilemapLayer) Height() int

Height The height of the sprite, setting this will actually modify the scale to achieve the value set

func (*TilemapLayer) IgnoreChildInput

func (self *TilemapLayer) IgnoreChildInput() bool

IgnoreChildInput If `ignoreChildInput` is `false` it will allow this objects _children_ to be considered as valid for Input events.

If this property is `true` then the children will _not_ be considered as valid for Input events.

Note that this property isn't recursive: only immediate children are influenced, it doesn't scan further down.

func (*TilemapLayer) InCamera

func (self *TilemapLayer) InCamera() bool

InCamera Checks if the Game Objects bounds intersect with the Game Camera bounds. Returns `true` if they do, otherwise `false` if fully outside of the Cameras bounds.

func (*TilemapLayer) InWorld

func (self *TilemapLayer) InWorld() bool

InWorld Checks if the Game Objects bounds are within, or intersect at any point with the Game World bounds.

func (*TilemapLayer) Index

func (self *TilemapLayer) Index() int

Index The index of this layer within the Tilemap.

func (*TilemapLayer) Input

func (self *TilemapLayer) Input() interface{}

Input The Input Handler for this Game Object.

By default it is disabled. If you wish this Game Object to process input events you should enable it with: `inputEnabled = true`.

After you have done this, this property will be a reference to the Phaser InputHandler.

func (*TilemapLayer) InputEnabled

func (self *TilemapLayer) InputEnabled() bool

InputEnabled By default a Game Object won't process any input events. By setting `inputEnabled` to true a Phaser.InputHandler is created for this Game Object and it will then start to process click / touch events and more.

You can then access the Input Handler via `this.input`.

Note that Input related events are dispatched from `this.events`, i.e.: `events.onInputDown`.

If you set this property to false it will stop the Input Handler from processing any more input events.

If you want to _temporarily_ disable input for a Game Object, then it's better to set `input.enabled = false`, as it won't reset any of the Input Handlers internal properties. You can then toggle this back on as needed.

func (*TilemapLayer) Key

func (self *TilemapLayer) Key() interface{}

Key The key of the image or texture used by this Game Object during rendering. If it is a string it's the string used to retrieve the texture from the Phaser Image Cache. It can also be an instance of a RenderTexture, BitmapData, Video or PIXI.Texture. If a Game Object is created without a key it is automatically assigned the key `__default` which is a 32x32 transparent PNG stored within the Cache. If a Game Object is given a key which doesn't exist in the Image Cache it is re-assigned the key `__missing` which is a 32x32 PNG of a green box with a line through it.

func (*TilemapLayer) Kill

func (self *TilemapLayer) Kill() *DisplayObject

Kill Kills a Game Object. A killed Game Object has its `alive`, `exists` and `visible` properties all set to false.

It will dispatch the `onKilled` event. You can listen to `events.onKilled` for the signal.

Note that killing a Game Object is a way for you to quickly recycle it in an object pool, it doesn't destroy the object or free it up from memory.

If you don't need this Game Object any more you should call `destroy` instead.

func (*TilemapLayer) KillI

func (self *TilemapLayer) KillI(args ...interface{}) *DisplayObject

KillI Kills a Game Object. A killed Game Object has its `alive`, `exists` and `visible` properties all set to false.

It will dispatch the `onKilled` event. You can listen to `events.onKilled` for the signal.

Note that killing a Game Object is a way for you to quickly recycle it in an object pool, it doesn't destroy the object or free it up from memory.

If you don't need this Game Object any more you should call `destroy` instead.

func (*TilemapLayer) Layer

func (self *TilemapLayer) Layer() interface{}

Layer The layer object within the Tilemap that this layer represents.

func (*TilemapLayer) Left

func (self *TilemapLayer) Left() int

Left The left coordinate of the Game Object. This is the same as `x - offsetX`.

func (*TilemapLayer) Lifespan

func (self *TilemapLayer) Lifespan() int

Lifespan The lifespan allows you to give a Game Object a lifespan in milliseconds.

Once the Game Object is 'born' you can set this to a positive value.

It is automatically decremented by the millisecond equivalent of `game.time.physicsElapsed` each frame. When it reaches zero it will call the `kill` method.

Very handy for particles, bullets, collectibles, or any other short-lived entity.

func (*TilemapLayer) LoadTexture

func (self *TilemapLayer) LoadTexture(key interface{})

LoadTexture Changes the base texture the Game Object is using. The old texture is removed and the new one is referenced or fetched from the Cache.

If your Game Object is using a frame from a texture atlas and you just wish to change to another frame, then see the `frame` or `frameName` properties instead.

You should only use `loadTexture` if you want to replace the base texture entirely.

Calling this method causes a WebGL texture update, so use sparingly or in low-intensity portions of your game, or if you know the new texture is already on the GPU.

You can use the new const `Phaser.PENDING_ATLAS` as the texture key for any sprite. Doing this then sets the key to be the `frame` argument (the frame is set to zero).

This allows you to create sprites using `load.image` during development, and then change them to use a Texture Atlas later in development by simply searching your code for 'PENDING_ATLAS' and swapping it to be the key of the atlas data.

Note: You cannot use a RenderTexture as a texture for a TileSprite.

func (*TilemapLayer) LoadTexture1O

func (self *TilemapLayer) LoadTexture1O(key interface{}, frame interface{})

LoadTexture1O Changes the base texture the Game Object is using. The old texture is removed and the new one is referenced or fetched from the Cache.

If your Game Object is using a frame from a texture atlas and you just wish to change to another frame, then see the `frame` or `frameName` properties instead.

You should only use `loadTexture` if you want to replace the base texture entirely.

Calling this method causes a WebGL texture update, so use sparingly or in low-intensity portions of your game, or if you know the new texture is already on the GPU.

You can use the new const `Phaser.PENDING_ATLAS` as the texture key for any sprite. Doing this then sets the key to be the `frame` argument (the frame is set to zero).

This allows you to create sprites using `load.image` during development, and then change them to use a Texture Atlas later in development by simply searching your code for 'PENDING_ATLAS' and swapping it to be the key of the atlas data.

Note: You cannot use a RenderTexture as a texture for a TileSprite.

func (*TilemapLayer) LoadTexture2O

func (self *TilemapLayer) LoadTexture2O(key interface{}, frame interface{}, stopAnimation bool)

LoadTexture2O Changes the base texture the Game Object is using. The old texture is removed and the new one is referenced or fetched from the Cache.

If your Game Object is using a frame from a texture atlas and you just wish to change to another frame, then see the `frame` or `frameName` properties instead.

You should only use `loadTexture` if you want to replace the base texture entirely.

Calling this method causes a WebGL texture update, so use sparingly or in low-intensity portions of your game, or if you know the new texture is already on the GPU.

You can use the new const `Phaser.PENDING_ATLAS` as the texture key for any sprite. Doing this then sets the key to be the `frame` argument (the frame is set to zero).

This allows you to create sprites using `load.image` during development, and then change them to use a Texture Atlas later in development by simply searching your code for 'PENDING_ATLAS' and swapping it to be the key of the atlas data.

Note: You cannot use a RenderTexture as a texture for a TileSprite.

func (*TilemapLayer) LoadTextureI

func (self *TilemapLayer) LoadTextureI(args ...interface{})

LoadTextureI Changes the base texture the Game Object is using. The old texture is removed and the new one is referenced or fetched from the Cache.

If your Game Object is using a frame from a texture atlas and you just wish to change to another frame, then see the `frame` or `frameName` properties instead.

You should only use `loadTexture` if you want to replace the base texture entirely.

Calling this method causes a WebGL texture update, so use sparingly or in low-intensity portions of your game, or if you know the new texture is already on the GPU.

You can use the new const `Phaser.PENDING_ATLAS` as the texture key for any sprite. Doing this then sets the key to be the `frame` argument (the frame is set to zero).

This allows you to create sprites using `load.image` during development, and then change them to use a Texture Atlas later in development by simply searching your code for 'PENDING_ATLAS' and swapping it to be the key of the atlas data.

Note: You cannot use a RenderTexture as a texture for a TileSprite.

func (*TilemapLayer) Map

func (self *TilemapLayer) Map() *Tilemap

Map The Tilemap to which this layer is bound.

func (*TilemapLayer) MaxHealth

func (self *TilemapLayer) MaxHealth() int

MaxHealth The Game Objects maximum health value. This works in combination with the `heal` method to ensure the health value never exceeds the maximum.

func (*TilemapLayer) MoveDown

func (self *TilemapLayer) MoveDown() *DisplayObject

MoveDown Moves this Game Object down one place in its parents display list. This call has no effect if the Game Object is already at the bottom of the display list.

If this Game Object hasn't been added to a custom Group then this method will move it one object down within the Game World, because the World is the root Group from which all Game Objects descend.

func (*TilemapLayer) MoveDownI

func (self *TilemapLayer) MoveDownI(args ...interface{}) *DisplayObject

MoveDownI Moves this Game Object down one place in its parents display list. This call has no effect if the Game Object is already at the bottom of the display list.

If this Game Object hasn't been added to a custom Group then this method will move it one object down within the Game World, because the World is the root Group from which all Game Objects descend.

func (*TilemapLayer) MoveUp

func (self *TilemapLayer) MoveUp() *DisplayObject

MoveUp Moves this Game Object up one place in its parents display list. This call has no effect if the Game Object is already at the top of the display list.

If this Game Object hasn't been added to a custom Group then this method will move it one object up within the Game World, because the World is the root Group from which all Game Objects descend.

func (*TilemapLayer) MoveUpI

func (self *TilemapLayer) MoveUpI(args ...interface{}) *DisplayObject

MoveUpI Moves this Game Object up one place in its parents display list. This call has no effect if the Game Object is already at the top of the display list.

If this Game Object hasn't been added to a custom Group then this method will move it one object up within the Game World, because the World is the root Group from which all Game Objects descend.

func (*TilemapLayer) Name

func (self *TilemapLayer) Name() string

Name A user defined name given to this Game Object. This value isn't ever used internally by Phaser, it is meant as a game level property.

func (*TilemapLayer) OffsetX

func (self *TilemapLayer) OffsetX() int

OffsetX The amount the Game Object is visually offset from its x coordinate. This is the same as `width * anchor.x`. It will only be > 0 if anchor.x is not equal to zero.

func (*TilemapLayer) OffsetY

func (self *TilemapLayer) OffsetY() int

OffsetY The amount the Game Object is visually offset from its y coordinate. This is the same as `height * anchor.y`. It will only be > 0 if anchor.y is not equal to zero.

func (*TilemapLayer) OnTextureUpdate

func (self *TilemapLayer) OnTextureUpdate(event interface{})

OnTextureUpdate When the texture is updated, this event will fire to update the scale and frame

func (*TilemapLayer) OnTextureUpdateI

func (self *TilemapLayer) OnTextureUpdateI(args ...interface{})

OnTextureUpdateI When the texture is updated, this event will fire to update the scale and frame

func (*TilemapLayer) OutOfBoundsKill

func (self *TilemapLayer) OutOfBoundsKill() bool

OutOfBoundsKill If this and the `checkWorldBounds` property are both set to `true` then the `kill` method is called as soon as `inWorld` returns false.

func (*TilemapLayer) OutOfCameraBoundsKill

func (self *TilemapLayer) OutOfCameraBoundsKill() bool

OutOfCameraBoundsKill If this and the `autoCull` property are both set to `true`, then the `kill` method is called as soon as the Game Object leaves the camera bounds.

func (*TilemapLayer) Overlap

func (self *TilemapLayer) Overlap(displayObject interface{}) bool

Overlap Checks to see if the bounds of this Game Object overlaps with the bounds of the given Display Object, which can be a Sprite, Image, TileSprite or anything that extends those such as Button or provides a `getBounds` method and result.

This check ignores the `hitArea` property if set and runs a `getBounds` comparison on both objects to determine the result.

Therefore it's relatively expensive to use in large quantities, i.e. with lots of Sprites at a high frequency. It should be fine for low-volume testing where physics isn't required.

func (*TilemapLayer) OverlapI

func (self *TilemapLayer) OverlapI(args ...interface{}) bool

OverlapI Checks to see if the bounds of this Game Object overlaps with the bounds of the given Display Object, which can be a Sprite, Image, TileSprite or anything that extends those such as Button or provides a `getBounds` method and result.

This check ignores the `hitArea` property if set and runs a `getBounds` comparison on both objects to determine the result.

Therefore it's relatively expensive to use in large quantities, i.e. with lots of Sprites at a high frequency. It should be fine for low-volume testing where physics isn't required.

func (*TilemapLayer) PendingDestroy

func (self *TilemapLayer) PendingDestroy() bool

PendingDestroy A Game Object is that is pendingDestroy is flagged to have its destroy method called on the next logic update. You can set it directly to allow you to flag an object to be destroyed on its next update.

This is extremely useful if you wish to destroy an object from within one of its own callbacks such as with Buttons or other Input events.

func (*TilemapLayer) PhysicsType

func (self *TilemapLayer) PhysicsType() int

PhysicsType The const physics body type of this object.

func (*TilemapLayer) Play

func (self *TilemapLayer) Play(name string) *Animation

Play Plays an Animation.

The animation should have previously been created via `animations.add`.

If the animation is already playing calling this again won't do anything. If you need to reset an already running animation do so directly on the Animation object itself or via `AnimationManager.stop`.

func (*TilemapLayer) Play1O

func (self *TilemapLayer) Play1O(name string, frameRate int) *Animation

Play1O Plays an Animation.

The animation should have previously been created via `animations.add`.

If the animation is already playing calling this again won't do anything. If you need to reset an already running animation do so directly on the Animation object itself or via `AnimationManager.stop`.

func (*TilemapLayer) Play2O

func (self *TilemapLayer) Play2O(name string, frameRate int, loop bool) *Animation

Play2O Plays an Animation.

The animation should have previously been created via `animations.add`.

If the animation is already playing calling this again won't do anything. If you need to reset an already running animation do so directly on the Animation object itself or via `AnimationManager.stop`.

func (*TilemapLayer) Play3O

func (self *TilemapLayer) Play3O(name string, frameRate int, loop bool, killOnComplete bool) *Animation

Play3O Plays an Animation.

The animation should have previously been created via `animations.add`.

If the animation is already playing calling this again won't do anything. If you need to reset an already running animation do so directly on the Animation object itself or via `AnimationManager.stop`.

func (*TilemapLayer) PlayI

func (self *TilemapLayer) PlayI(args ...interface{}) *Animation

PlayI Plays an Animation.

The animation should have previously been created via `animations.add`.

If the animation is already playing calling this again won't do anything. If you need to reset an already running animation do so directly on the Animation object itself or via `AnimationManager.stop`.

func (*TilemapLayer) PostUpdate

func (self *TilemapLayer) PostUpdate()

PostUpdate Automatically called by World.postUpdate. Handles cache updates.

func (*TilemapLayer) PostUpdateI

func (self *TilemapLayer) PostUpdateI(args ...interface{})

PostUpdateI Automatically called by World.postUpdate. Handles cache updates.

func (*TilemapLayer) PreUpdate

func (self *TilemapLayer) PreUpdate()

PreUpdate Automatically called by World.preUpdate.

func (*TilemapLayer) PreUpdateI

func (self *TilemapLayer) PreUpdateI(args ...interface{})

PreUpdateI Automatically called by World.preUpdate.

func (*TilemapLayer) PreviousPosition

func (self *TilemapLayer) PreviousPosition() *Point

PreviousPosition The position the Game Object was located in the previous frame.

func (*TilemapLayer) PreviousRotation

func (self *TilemapLayer) PreviousRotation() int

PreviousRotation The rotation the Game Object was in set to in the previous frame. Value is in radians.

func (*TilemapLayer) RayStepRate

func (self *TilemapLayer) RayStepRate() int

RayStepRate When ray-casting against tiles this is the number of steps it will jump. For larger tile sizes you can increase this to improve performance.

func (*TilemapLayer) RemoveChild

func (self *TilemapLayer) RemoveChild(child *DisplayObject) *DisplayObject

RemoveChild Removes a child from the container.

func (*TilemapLayer) RemoveChildAt

func (self *TilemapLayer) RemoveChildAt(index int) *DisplayObject

RemoveChildAt Removes a child from the specified index position.

func (*TilemapLayer) RemoveChildAtI

func (self *TilemapLayer) RemoveChildAtI(args ...interface{}) *DisplayObject

RemoveChildAtI Removes a child from the specified index position.

func (*TilemapLayer) RemoveChildI

func (self *TilemapLayer) RemoveChildI(args ...interface{}) *DisplayObject

RemoveChildI Removes a child from the container.

func (*TilemapLayer) RemoveChildren

func (self *TilemapLayer) RemoveChildren(beginIndex int, endIndex int)

RemoveChildren Removes all children from this container that are within the begin and end indexes.

func (*TilemapLayer) RemoveChildrenI

func (self *TilemapLayer) RemoveChildrenI(args ...interface{})

RemoveChildrenI Removes all children from this container that are within the begin and end indexes.

func (*TilemapLayer) Render

func (self *TilemapLayer) Render()

Render Renders the tiles to the layer canvas and pushes to the display.

func (*TilemapLayer) RenderDebug

func (self *TilemapLayer) RenderDebug()

RenderDebug Renders a debug overlay on-top of the canvas. Called automatically by render when `debug` is true.

See `debugSettings` for assorted configuration options.

func (*TilemapLayer) RenderDebugI

func (self *TilemapLayer) RenderDebugI(args ...interface{})

RenderDebugI Renders a debug overlay on-top of the canvas. Called automatically by render when `debug` is true.

See `debugSettings` for assorted configuration options.

func (*TilemapLayer) RenderDeltaScroll

func (self *TilemapLayer) RenderDeltaScroll()

RenderDeltaScroll Shifts the canvas and render damaged edge tiles.

func (*TilemapLayer) RenderDeltaScrollI

func (self *TilemapLayer) RenderDeltaScrollI(args ...interface{})

RenderDeltaScrollI Shifts the canvas and render damaged edge tiles.

func (*TilemapLayer) RenderFull

func (self *TilemapLayer) RenderFull()

RenderFull Clear and render the entire canvas.

func (*TilemapLayer) RenderFullI

func (self *TilemapLayer) RenderFullI(args ...interface{})

RenderFullI Clear and render the entire canvas.

func (*TilemapLayer) RenderI

func (self *TilemapLayer) RenderI(args ...interface{})

RenderI Renders the tiles to the layer canvas and pushes to the display.

func (*TilemapLayer) RenderOrderID

func (self *TilemapLayer) RenderOrderID() int

RenderOrderID The render order ID is used internally by the renderer and Input Manager and should not be modified. This property is mostly used internally by the renderers, but is exposed for the use of plugins.

func (*TilemapLayer) RenderRegion

func (self *TilemapLayer) RenderRegion(scrollX int, scrollY int, left int, top int, right int, bottom int)

RenderRegion Render tiles in the given area given by the virtual tile coordinates biased by the given scroll factor. This will constrain the tile coordinates based on wrapping but not physical coordinates.

func (*TilemapLayer) RenderRegionI

func (self *TilemapLayer) RenderRegionI(args ...interface{})

RenderRegionI Render tiles in the given area given by the virtual tile coordinates biased by the given scroll factor. This will constrain the tile coordinates based on wrapping but not physical coordinates.

func (*TilemapLayer) RenderSettings

func (self *TilemapLayer) RenderSettings() interface{}

RenderSettings Settings that control standard (non-diagnostic) rendering.

func (*TilemapLayer) Reset

func (self *TilemapLayer) Reset(x int, y int) *DisplayObject

Reset Resets the Game Object.

This moves the Game Object to the given x/y world coordinates and sets `fresh`, `exists`, `visible` and `renderable` to true.

If this Game Object has the LifeSpan component it will also set `alive` to true and `health` to the given value.

If this Game Object has a Physics Body it will reset the Body.

func (*TilemapLayer) Reset1O

func (self *TilemapLayer) Reset1O(x int, y int, health int) *DisplayObject

Reset1O Resets the Game Object.

This moves the Game Object to the given x/y world coordinates and sets `fresh`, `exists`, `visible` and `renderable` to true.

If this Game Object has the LifeSpan component it will also set `alive` to true and `health` to the given value.

If this Game Object has a Physics Body it will reset the Body.

func (*TilemapLayer) ResetFrame

func (self *TilemapLayer) ResetFrame()

ResetFrame Resets the texture frame dimensions that the Game Object uses for rendering.

func (*TilemapLayer) ResetFrameI

func (self *TilemapLayer) ResetFrameI(args ...interface{})

ResetFrameI Resets the texture frame dimensions that the Game Object uses for rendering.

func (*TilemapLayer) ResetI

func (self *TilemapLayer) ResetI(args ...interface{}) *DisplayObject

ResetI Resets the Game Object.

This moves the Game Object to the given x/y world coordinates and sets `fresh`, `exists`, `visible` and `renderable` to true.

If this Game Object has the LifeSpan component it will also set `alive` to true and `health` to the given value.

If this Game Object has a Physics Body it will reset the Body.

func (*TilemapLayer) ResetTilesetCache

func (self *TilemapLayer) ResetTilesetCache()

ResetTilesetCache The TilemapLayer caches tileset look-ups.

Call this method of clear the cache if tilesets have been added or updated after the layer has been rendered.

func (*TilemapLayer) ResetTilesetCacheI

func (self *TilemapLayer) ResetTilesetCacheI(args ...interface{})

ResetTilesetCacheI The TilemapLayer caches tileset look-ups.

Call this method of clear the cache if tilesets have been added or updated after the layer has been rendered.

func (*TilemapLayer) Resize

func (self *TilemapLayer) Resize(width int, height int)

Resize Resizes the internal canvas and texture frame used by this TilemapLayer.

This is an expensive call, so don't bind it to a window resize event! But instead call it at carefully selected times.

Be aware that no validation of the new sizes takes place and the current map scroll coordinates are not modified either. You will have to handle both of these things from your game code if required.

func (*TilemapLayer) ResizeFrame

func (self *TilemapLayer) ResizeFrame(parent interface{}, width int, height int)

ResizeFrame Resizes the Frame dimensions that the Game Object uses for rendering.

You shouldn't normally need to ever call this, but in the case of special texture types such as Video or BitmapData it can be useful to adjust the dimensions directly in this way.

func (*TilemapLayer) ResizeFrameI

func (self *TilemapLayer) ResizeFrameI(args ...interface{})

ResizeFrameI Resizes the Frame dimensions that the Game Object uses for rendering.

You shouldn't normally need to ever call this, but in the case of special texture types such as Video or BitmapData it can be useful to adjust the dimensions directly in this way.

func (*TilemapLayer) ResizeI

func (self *TilemapLayer) ResizeI(args ...interface{})

ResizeI Resizes the internal canvas and texture frame used by this TilemapLayer.

This is an expensive call, so don't bind it to a window resize event! But instead call it at carefully selected times.

Be aware that no validation of the new sizes takes place and the current map scroll coordinates are not modified either. You will have to handle both of these things from your game code if required.

func (*TilemapLayer) ResizeWorld

func (self *TilemapLayer) ResizeWorld()

ResizeWorld Sets the world size to match the size of this layer.

func (*TilemapLayer) ResizeWorldI

func (self *TilemapLayer) ResizeWorldI(args ...interface{})

ResizeWorldI Sets the world size to match the size of this layer.

func (*TilemapLayer) ResolveTileset

func (self *TilemapLayer) ResolveTileset(Tile int) interface{}

ResolveTileset Returns the appropriate tileset for the index, updating the internal cache as required. This should only be called if `tilesets[index]` evaluates to undefined.

func (*TilemapLayer) ResolveTilesetI

func (self *TilemapLayer) ResolveTilesetI(args ...interface{}) interface{}

ResolveTilesetI Returns the appropriate tileset for the index, updating the internal cache as required. This should only be called if `tilesets[index]` evaluates to undefined.

func (*TilemapLayer) Revive

func (self *TilemapLayer) Revive() *DisplayObject

Revive Brings a 'dead' Game Object back to life, optionally resetting its health value in the process.

A resurrected Game Object has its `alive`, `exists` and `visible` properties all set to true.

It will dispatch the `onRevived` event. Listen to `events.onRevived` for the signal.

func (*TilemapLayer) Revive1O

func (self *TilemapLayer) Revive1O(health int) *DisplayObject

Revive1O Brings a 'dead' Game Object back to life, optionally resetting its health value in the process.

A resurrected Game Object has its `alive`, `exists` and `visible` properties all set to true.

It will dispatch the `onRevived` event. Listen to `events.onRevived` for the signal.

func (*TilemapLayer) ReviveI

func (self *TilemapLayer) ReviveI(args ...interface{}) *DisplayObject

ReviveI Brings a 'dead' Game Object back to life, optionally resetting its health value in the process.

A resurrected Game Object has its `alive`, `exists` and `visible` properties all set to true.

It will dispatch the `onRevived` event. Listen to `events.onRevived` for the signal.

func (*TilemapLayer) Right

func (self *TilemapLayer) Right() int

Right The right coordinate of the Game Object. This is the same as `x + width - offsetX`.

func (*TilemapLayer) ScaleMax

func (self *TilemapLayer) ScaleMax() *Point

ScaleMax The maximum scale this Game Object will scale up to.

It allows you to prevent a parent from scaling this Game Object higher than the given value.

Set it to `null` to remove the limit.

func (*TilemapLayer) ScaleMin

func (self *TilemapLayer) ScaleMin() *Point

ScaleMin The minimum scale this Game Object will scale down to.

It allows you to prevent a parent from scaling this Game Object lower than the given value.

Set it to `null` to remove the limit.

func (*TilemapLayer) ScrollFactorX

func (self *TilemapLayer) ScrollFactorX() int

ScrollFactorX Speed at which this layer scrolls horizontally, relative to the camera (e.g. scrollFactorX of 0.5 scrolls half as quickly as the 'normal' camera-locked layers do).

func (*TilemapLayer) ScrollFactorY

func (self *TilemapLayer) ScrollFactorY() int

ScrollFactorY Speed at which this layer scrolls vertically, relative to the camera (e.g. scrollFactorY of 0.5 scrolls half as quickly as the 'normal' camera-locked layers do)

func (*TilemapLayer) SendToBack

func (self *TilemapLayer) SendToBack() *DisplayObject

SendToBack Sends this Game Object to the bottom of its parents display list. Visually this means it will render below all other children in the same Group.

If this Game Object hasn't been added to a custom Group then this method will send it to the bottom of the Game World, because the World is the root Group from which all Game Objects descend.

func (*TilemapLayer) SendToBackI

func (self *TilemapLayer) SendToBackI(args ...interface{}) *DisplayObject

SendToBackI Sends this Game Object to the bottom of its parents display list. Visually this means it will render below all other children in the same Group.

If this Game Object hasn't been added to a custom Group then this method will send it to the bottom of the Game World, because the World is the root Group from which all Game Objects descend.

func (*TilemapLayer) SetAliveA

func (self *TilemapLayer) SetAliveA(member bool)

SetAliveA A useful flag to control if the Game Object is alive or dead.

This is set automatically by the Health components `damage` method should the object run out of health. Or you can toggle it via your game code.

This property is mostly just provided to be used by your game - it doesn't effect rendering or logic updates. However you can use `Group.getFirstAlive` in conjunction with this property for fast object pooling and recycling.

func (*TilemapLayer) SetAnchorA

func (self *TilemapLayer) SetAnchorA(member *Point)

SetAnchorA The anchor sets the origin point of the texture.

The default is 0,0 this means the texture's origin is the top left

Setting than anchor to 0.5,0.5 means the textures origin is centered

Setting the anchor to 1,1 would mean the textures origin points will be the bottom right corner

func (*TilemapLayer) SetAngleA

func (self *TilemapLayer) SetAngleA(member int)

SetAngleA The angle property is the rotation of the Game Object in *degrees* from its original orientation.

Values from 0 to 180 represent clockwise rotation; values from 0 to -180 represent counterclockwise rotation.

Values outside this range are added to or subtracted from 360 to obtain a value within the range. For example, the statement player.angle = 450 is the same as player.angle = 90.

If you wish to work in radians instead of degrees you can use the property `rotation` instead. Working in radians is slightly faster as it doesn't have to perform any calculations.

func (*TilemapLayer) SetAnimationsA

func (self *TilemapLayer) SetAnimationsA(member *AnimationManager)

SetAnimationsA If the Game Object is enabled for animation (such as a Phaser.Sprite) this is a reference to its AnimationManager instance. Through it you can create, play, pause and stop animations.

func (*TilemapLayer) SetAutoCullA

func (self *TilemapLayer) SetAutoCullA(member bool)

SetAutoCullA A Game Object with `autoCull` set to true will check its bounds against the World Camera every frame. If it is not intersecting the Camera bounds at any point then it has its `renderable` property set to `false`. This keeps the Game Object alive and still processing updates, but forces it to skip the render step entirely.

This is a relatively expensive operation, especially if enabled on hundreds of Game Objects. So enable it only if you know it's required, or you have tested performance and find it acceptable.

func (*TilemapLayer) SetBlendModeA

func (self *TilemapLayer) SetBlendModeA(member int)

SetBlendModeA The blend mode to be applied to the sprite. Set to PIXI.blendModes.NORMAL to remove any blend mode.

Warning: You cannot have a blend mode and a filter active on the same Sprite. Doing so will render the sprite invisible.

func (*TilemapLayer) SetBodyA

func (self *TilemapLayer) SetBodyA(member interface{})

SetBodyA `body` is the Game Objects physics body. Once a Game Object is enabled for physics you access all associated properties and methods via it.

By default Game Objects won't add themselves to any physics system and their `body` property will be `null`.

To enable this Game Object for physics you need to call `game.physics.enable(object, system)` where `object` is this object and `system` is the Physics system you are using. If none is given it defaults to `Phaser.Physics.Arcade`.

You can alternatively call `game.physics.arcade.enable(object)`, or add this Game Object to a physics enabled Group.

Important: Enabling a Game Object for P2 or Ninja physics will automatically set its `anchor` property to 0.5, so the physics body is centered on the Game Object.

If you need a different result then adjust or re-create the Body shape offsets manually or reset the anchor after enabling physics.

func (*TilemapLayer) SetBottomA

func (self *TilemapLayer) SetBottomA(member int)

SetBottomA The sum of the y and height properties. This is the same as `y + height - offsetY`.

func (*TilemapLayer) SetCameraOffsetA

func (self *TilemapLayer) SetCameraOffsetA(member *Point)

SetCameraOffsetA The x/y coordinate offset applied to the top-left of the camera that this Game Object will be drawn at if `fixedToCamera` is true.

The values are relative to the top-left of the camera view and in addition to any parent of the Game Object on the display list.

func (*TilemapLayer) SetCanvasA

func (self *TilemapLayer) SetCanvasA(member dom.HTMLCanvasElement)

SetCanvasA The canvas to which this TilemapLayer draws.

func (*TilemapLayer) SetCenterXA

func (self *TilemapLayer) SetCenterXA(member int)

SetCenterXA The center x coordinate of the Game Object. This is the same as `(x - offsetX) + (width / 2)`.

func (*TilemapLayer) SetCenterYA

func (self *TilemapLayer) SetCenterYA(member int)

SetCenterYA The center y coordinate of the Game Object. This is the same as `(y - offsetY) + (height / 2)`.

func (*TilemapLayer) SetCheckWorldBoundsA

func (self *TilemapLayer) SetCheckWorldBoundsA(member bool)

SetCheckWorldBoundsA If this is set to `true` the Game Object checks if it is within the World bounds each frame.

When it is no longer intersecting the world bounds it dispatches the `onOutOfBounds` event.

If it was *previously* out of bounds but is now intersecting the world bounds again it dispatches the `onEnterBounds` event.

It also optionally kills the Game Object if `outOfBoundsKill` is `true`.

When `checkWorldBounds` is enabled it forces the Game Object to calculate its full bounds every frame.

This is a relatively expensive operation, especially if enabled on hundreds of Game Objects. So enable it only if you know it's required, or you have tested performance and find it acceptable.

func (*TilemapLayer) SetChildIndex

func (self *TilemapLayer) SetChildIndex(child *DisplayObject, index int)

SetChildIndex Changes the position of an existing child in the display object container

func (*TilemapLayer) SetChildIndexI

func (self *TilemapLayer) SetChildIndexI(args ...interface{})

SetChildIndexI Changes the position of an existing child in the display object container

func (*TilemapLayer) SetChildrenA

func (self *TilemapLayer) SetChildrenA(member []DisplayObject)

SetChildrenA [read-only] The array of children of this container.

func (*TilemapLayer) SetComponentsA

func (self *TilemapLayer) SetComponentsA(member interface{})

SetComponentsA The components this Game Object has installed.

func (*TilemapLayer) SetCropRectA

func (self *TilemapLayer) SetCropRectA(member *Rectangle)

SetCropRectA The Rectangle used to crop the texture this Game Object uses. Set this property via `crop`. If you modify this property directly you must call `updateCrop` in order to have the change take effect.

func (*TilemapLayer) SetDamageA

func (self *TilemapLayer) SetDamageA(member interface{})

SetDamageA Damages the Game Object. This removes the given amount of health from the `health` property.

If health is taken below or is equal to zero then the `kill` method is called.

func (*TilemapLayer) SetDataA

func (self *TilemapLayer) SetDataA(member interface{})

SetDataA An empty Object that belongs to this Game Object. This value isn't ever used internally by Phaser, but may be used by your own code, or by Phaser Plugins, to store data that needs to be associated with the Game Object, without polluting the Game Object directly.

func (*TilemapLayer) SetDebugA

func (self *TilemapLayer) SetDebugA(member bool)

SetDebugA Enable an additional "debug rendering" pass to display collision information.

func (*TilemapLayer) SetDebugSettingsA

func (self *TilemapLayer) SetDebugSettingsA(member interface{})

SetDebugSettingsA Settings used for debugging and diagnostics.

func (*TilemapLayer) SetDeltaXA

func (self *TilemapLayer) SetDeltaXA(member int)

SetDeltaXA Returns the delta x value. The difference between world.x now and in the previous frame.

The value will be positive if the Game Object has moved to the right or negative if to the left.

func (*TilemapLayer) SetDeltaYA

func (self *TilemapLayer) SetDeltaYA(member int)

SetDeltaYA Returns the delta y value. The difference between world.y now and in the previous frame.

The value will be positive if the Game Object has moved down or negative if up.

func (*TilemapLayer) SetDeltaZA

func (self *TilemapLayer) SetDeltaZA(member int)

SetDeltaZA Returns the delta z value. The difference between rotation now and in the previous frame. The delta value.

func (*TilemapLayer) SetDestroyPhaseA

func (self *TilemapLayer) SetDestroyPhaseA(member bool)

SetDestroyPhaseA As a Game Object runs through its destroy method this flag is set to true, and can be checked in any sub-systems or plugins it is being destroyed from.

func (*TilemapLayer) SetDirtyA

func (self *TilemapLayer) SetDirtyA(member bool)

SetDirtyA If true tiles will be force rendered, even if such is not believed to be required.

func (*TilemapLayer) SetEventsA

func (self *TilemapLayer) SetEventsA(member *Events)

SetEventsA All Phaser Game Objects have an Events class which contains all of the events that are dispatched when certain things happen to this Game Object, or any of its components.

func (*TilemapLayer) SetExistsA

func (self *TilemapLayer) SetExistsA(member bool)

SetExistsA Controls if the core game loop and physics update this game object or not.

func (*TilemapLayer) SetFixedToCameraA

func (self *TilemapLayer) SetFixedToCameraA(member bool)

SetFixedToCameraA A Game Object that is "fixed" to the camera uses its x/y coordinates as offsets from the top left of the camera during rendering.

The values are adjusted at the rendering stage, overriding the Game Objects actual world position.

The end result is that the Game Object will appear to be 'fixed' to the camera, regardless of where in the game world the camera is viewing. This is useful if for example this Game Object is a UI item that you wish to be visible at all times regardless where in the world the camera is.

The offsets are stored in the `cameraOffset` property.

Note that the `cameraOffset` values are in addition to any parent of this Game Object on the display list.

Be careful not to set `fixedToCamera` on Game Objects which are in Groups that already have `fixedToCamera` enabled on them.

func (*TilemapLayer) SetFrame

func (self *TilemapLayer) SetFrame(frame *Frame)

SetFrame Sets the texture frame the Game Object uses for rendering.

This is primarily an internal method used by `loadTexture`, but is exposed for the use of plugins and custom classes.

func (*TilemapLayer) SetFrameA

func (self *TilemapLayer) SetFrameA(member int)

SetFrameA Gets or sets the current frame index of the texture being used to render this Game Object.

To change the frame set `frame` to the index of the new frame in the sprite sheet you wish this Game Object to use, for example: `player.frame = 4`.

If the frame index given doesn't exist it will revert to the first frame found in the texture.

If you are using a texture atlas then you should use the `frameName` property instead.

If you wish to fully replace the texture being used see `loadTexture`.

func (*TilemapLayer) SetFrameI

func (self *TilemapLayer) SetFrameI(args ...interface{})

SetFrameI Sets the texture frame the Game Object uses for rendering.

This is primarily an internal method used by `loadTexture`, but is exposed for the use of plugins and custom classes.

func (*TilemapLayer) SetFrameNameA

func (self *TilemapLayer) SetFrameNameA(member string)

SetFrameNameA Gets or sets the current frame name of the texture being used to render this Game Object.

To change the frame set `frameName` to the name of the new frame in the texture atlas you wish this Game Object to use, for example: `player.frameName = "idle"`.

If the frame name given doesn't exist it will revert to the first frame found in the texture and throw a console warning.

If you are using a sprite sheet then you should use the `frame` property instead.

If you wish to fully replace the texture being used see `loadTexture`.

func (*TilemapLayer) SetFreshA

func (self *TilemapLayer) SetFreshA(member bool)

SetFreshA A Game Object is considered `fresh` if it has just been created or reset and is yet to receive a renderer transform update. This property is mostly used internally by the physics systems, but is exposed for the use of plugins.

func (*TilemapLayer) SetGameA

func (self *TilemapLayer) SetGameA(member *Game)

SetGameA A reference to the currently running Game.

func (*TilemapLayer) SetHealA

func (self *TilemapLayer) SetHealA(member interface{})

SetHealA Heal the Game Object. This adds the given amount of health to the `health` property.

func (*TilemapLayer) SetHealth

func (self *TilemapLayer) SetHealth() interface{}

SetHealth Sets the health property of the Game Object to the given amount. Will never exceed the `maxHealth` value.

func (*TilemapLayer) SetHealthA

func (self *TilemapLayer) SetHealthA(member int)

SetHealthA The Game Objects health value. This is a handy property for setting and manipulating health on a Game Object.

It can be used in combination with the `damage` method or modified directly.

func (*TilemapLayer) SetHeightA

func (self *TilemapLayer) SetHeightA(member int)

SetHeightA The height of the sprite, setting this will actually modify the scale to achieve the value set

func (*TilemapLayer) SetIgnoreChildInputA

func (self *TilemapLayer) SetIgnoreChildInputA(member bool)

SetIgnoreChildInputA If `ignoreChildInput` is `false` it will allow this objects _children_ to be considered as valid for Input events.

If this property is `true` then the children will _not_ be considered as valid for Input events.

Note that this property isn't recursive: only immediate children are influenced, it doesn't scan further down.

func (*TilemapLayer) SetInCameraA

func (self *TilemapLayer) SetInCameraA(member bool)

SetInCameraA Checks if the Game Objects bounds intersect with the Game Camera bounds. Returns `true` if they do, otherwise `false` if fully outside of the Cameras bounds.

func (*TilemapLayer) SetInWorldA

func (self *TilemapLayer) SetInWorldA(member bool)

SetInWorldA Checks if the Game Objects bounds are within, or intersect at any point with the Game World bounds.

func (*TilemapLayer) SetIndexA

func (self *TilemapLayer) SetIndexA(member int)

SetIndexA The index of this layer within the Tilemap.

func (*TilemapLayer) SetInputA

func (self *TilemapLayer) SetInputA(member interface{})

SetInputA The Input Handler for this Game Object.

By default it is disabled. If you wish this Game Object to process input events you should enable it with: `inputEnabled = true`.

After you have done this, this property will be a reference to the Phaser InputHandler.

func (*TilemapLayer) SetInputEnabledA

func (self *TilemapLayer) SetInputEnabledA(member bool)

SetInputEnabledA By default a Game Object won't process any input events. By setting `inputEnabled` to true a Phaser.InputHandler is created for this Game Object and it will then start to process click / touch events and more.

You can then access the Input Handler via `this.input`.

Note that Input related events are dispatched from `this.events`, i.e.: `events.onInputDown`.

If you set this property to false it will stop the Input Handler from processing any more input events.

If you want to _temporarily_ disable input for a Game Object, then it's better to set `input.enabled = false`, as it won't reset any of the Input Handlers internal properties. You can then toggle this back on as needed.

func (*TilemapLayer) SetKeyA

func (self *TilemapLayer) SetKeyA(member interface{})

SetKeyA The key of the image or texture used by this Game Object during rendering. If it is a string it's the string used to retrieve the texture from the Phaser Image Cache. It can also be an instance of a RenderTexture, BitmapData, Video or PIXI.Texture. If a Game Object is created without a key it is automatically assigned the key `__default` which is a 32x32 transparent PNG stored within the Cache. If a Game Object is given a key which doesn't exist in the Image Cache it is re-assigned the key `__missing` which is a 32x32 PNG of a green box with a line through it.

func (*TilemapLayer) SetLayerA

func (self *TilemapLayer) SetLayerA(member interface{})

SetLayerA The layer object within the Tilemap that this layer represents.

func (*TilemapLayer) SetLeftA

func (self *TilemapLayer) SetLeftA(member int)

SetLeftA The left coordinate of the Game Object. This is the same as `x - offsetX`.

func (*TilemapLayer) SetLifespanA

func (self *TilemapLayer) SetLifespanA(member int)

SetLifespanA The lifespan allows you to give a Game Object a lifespan in milliseconds.

Once the Game Object is 'born' you can set this to a positive value.

It is automatically decremented by the millisecond equivalent of `game.time.physicsElapsed` each frame. When it reaches zero it will call the `kill` method.

Very handy for particles, bullets, collectibles, or any other short-lived entity.

func (*TilemapLayer) SetMapA

func (self *TilemapLayer) SetMapA(member *Tilemap)

SetMapA The Tilemap to which this layer is bound.

func (*TilemapLayer) SetMaxHealthA

func (self *TilemapLayer) SetMaxHealthA(member int)

SetMaxHealthA The Game Objects maximum health value. This works in combination with the `heal` method to ensure the health value never exceeds the maximum.

func (*TilemapLayer) SetNameA

func (self *TilemapLayer) SetNameA(member string)

SetNameA A user defined name given to this Game Object. This value isn't ever used internally by Phaser, it is meant as a game level property.

func (*TilemapLayer) SetOffsetXA

func (self *TilemapLayer) SetOffsetXA(member int)

SetOffsetXA The amount the Game Object is visually offset from its x coordinate. This is the same as `width * anchor.x`. It will only be > 0 if anchor.x is not equal to zero.

func (*TilemapLayer) SetOffsetYA

func (self *TilemapLayer) SetOffsetYA(member int)

SetOffsetYA The amount the Game Object is visually offset from its y coordinate. This is the same as `height * anchor.y`. It will only be > 0 if anchor.y is not equal to zero.

func (*TilemapLayer) SetOutOfBoundsKillA

func (self *TilemapLayer) SetOutOfBoundsKillA(member bool)

SetOutOfBoundsKillA If this and the `checkWorldBounds` property are both set to `true` then the `kill` method is called as soon as `inWorld` returns false.

func (*TilemapLayer) SetOutOfCameraBoundsKillA

func (self *TilemapLayer) SetOutOfCameraBoundsKillA(member bool)

SetOutOfCameraBoundsKillA If this and the `autoCull` property are both set to `true`, then the `kill` method is called as soon as the Game Object leaves the camera bounds.

func (*TilemapLayer) SetPendingDestroyA

func (self *TilemapLayer) SetPendingDestroyA(member bool)

SetPendingDestroyA A Game Object is that is pendingDestroy is flagged to have its destroy method called on the next logic update. You can set it directly to allow you to flag an object to be destroyed on its next update.

This is extremely useful if you wish to destroy an object from within one of its own callbacks such as with Buttons or other Input events.

func (*TilemapLayer) SetPhysicsTypeA

func (self *TilemapLayer) SetPhysicsTypeA(member int)

SetPhysicsTypeA The const physics body type of this object.

func (*TilemapLayer) SetPreviousPositionA

func (self *TilemapLayer) SetPreviousPositionA(member *Point)

SetPreviousPositionA The position the Game Object was located in the previous frame.

func (*TilemapLayer) SetPreviousRotationA

func (self *TilemapLayer) SetPreviousRotationA(member int)

SetPreviousRotationA The rotation the Game Object was in set to in the previous frame. Value is in radians.

func (*TilemapLayer) SetRayStepRateA

func (self *TilemapLayer) SetRayStepRateA(member int)

SetRayStepRateA When ray-casting against tiles this is the number of steps it will jump. For larger tile sizes you can increase this to improve performance.

func (*TilemapLayer) SetRenderOrderIDA

func (self *TilemapLayer) SetRenderOrderIDA(member int)

SetRenderOrderIDA The render order ID is used internally by the renderer and Input Manager and should not be modified. This property is mostly used internally by the renderers, but is exposed for the use of plugins.

func (*TilemapLayer) SetRenderSettingsA

func (self *TilemapLayer) SetRenderSettingsA(member interface{})

SetRenderSettingsA Settings that control standard (non-diagnostic) rendering.

func (*TilemapLayer) SetRightA

func (self *TilemapLayer) SetRightA(member int)

SetRightA The right coordinate of the Game Object. This is the same as `x + width - offsetX`.

func (*TilemapLayer) SetScale

func (self *TilemapLayer) SetScale()

SetScale This method will set the scale of the tilemap as well as update the underlying block data of this layer.

func (*TilemapLayer) SetScale1O

func (self *TilemapLayer) SetScale1O(xScale int)

SetScale1O This method will set the scale of the tilemap as well as update the underlying block data of this layer.

func (*TilemapLayer) SetScale2O

func (self *TilemapLayer) SetScale2O(xScale int, yScale int)

SetScale2O This method will set the scale of the tilemap as well as update the underlying block data of this layer.

func (*TilemapLayer) SetScaleI

func (self *TilemapLayer) SetScaleI(args ...interface{})

SetScaleI This method will set the scale of the tilemap as well as update the underlying block data of this layer.

func (*TilemapLayer) SetScaleMaxA

func (self *TilemapLayer) SetScaleMaxA(member *Point)

SetScaleMaxA The maximum scale this Game Object will scale up to.

It allows you to prevent a parent from scaling this Game Object higher than the given value.

Set it to `null` to remove the limit.

func (*TilemapLayer) SetScaleMinA

func (self *TilemapLayer) SetScaleMinA(member *Point)

SetScaleMinA The minimum scale this Game Object will scale down to.

It allows you to prevent a parent from scaling this Game Object lower than the given value.

Set it to `null` to remove the limit.

func (*TilemapLayer) SetScaleMinMax

func (self *TilemapLayer) SetScaleMinMax(minX interface{}, minY interface{}, maxX interface{}, maxY interface{})

SetScaleMinMax Sets the scaleMin and scaleMax values. These values are used to limit how far this Game Object will scale based on its parent.

For example if this Game Object has a `minScale` value of 1 and its parent has a `scale` value of 0.5, the 0.5 will be ignored and the scale value of 1 will be used, as the parents scale is lower than the minimum scale this Game Object should adhere to.

By setting these values you can carefully control how Game Objects deal with responsive scaling.

If only one parameter is given then that value will be used for both scaleMin and scaleMax: `setScaleMinMax(1)` = scaleMin.x, scaleMin.y, scaleMax.x and scaleMax.y all = 1

If only two parameters are given the first is set as scaleMin.x and y and the second as scaleMax.x and y: `setScaleMinMax(0.5, 2)` = scaleMin.x and y = 0.5 and scaleMax.x and y = 2

If you wish to set `scaleMin` with different values for x and y then either modify Game Object.scaleMin directly, or pass `null` for the `maxX` and `maxY` parameters.

Call `setScaleMinMax(null)` to clear all previously set values.

func (*TilemapLayer) SetScaleMinMaxI

func (self *TilemapLayer) SetScaleMinMaxI(args ...interface{})

SetScaleMinMaxI Sets the scaleMin and scaleMax values. These values are used to limit how far this Game Object will scale based on its parent.

For example if this Game Object has a `minScale` value of 1 and its parent has a `scale` value of 0.5, the 0.5 will be ignored and the scale value of 1 will be used, as the parents scale is lower than the minimum scale this Game Object should adhere to.

By setting these values you can carefully control how Game Objects deal with responsive scaling.

If only one parameter is given then that value will be used for both scaleMin and scaleMax: `setScaleMinMax(1)` = scaleMin.x, scaleMin.y, scaleMax.x and scaleMax.y all = 1

If only two parameters are given the first is set as scaleMin.x and y and the second as scaleMax.x and y: `setScaleMinMax(0.5, 2)` = scaleMin.x and y = 0.5 and scaleMax.x and y = 2

If you wish to set `scaleMin` with different values for x and y then either modify Game Object.scaleMin directly, or pass `null` for the `maxX` and `maxY` parameters.

Call `setScaleMinMax(null)` to clear all previously set values.

func (*TilemapLayer) SetScrollFactorXA

func (self *TilemapLayer) SetScrollFactorXA(member int)

SetScrollFactorXA Speed at which this layer scrolls horizontally, relative to the camera (e.g. scrollFactorX of 0.5 scrolls half as quickly as the 'normal' camera-locked layers do).

func (*TilemapLayer) SetScrollFactorYA

func (self *TilemapLayer) SetScrollFactorYA(member int)

SetScrollFactorYA Speed at which this layer scrolls vertically, relative to the camera (e.g. scrollFactorY of 0.5 scrolls half as quickly as the 'normal' camera-locked layers do)

func (*TilemapLayer) SetSetHealthA

func (self *TilemapLayer) SetSetHealthA(member interface{})

SetSetHealthA Sets the health property of the Game Object to the given amount. Will never exceed the `maxHealth` value.

func (*TilemapLayer) SetShaderA

func (self *TilemapLayer) SetShaderA(member *AbstractFilter)

SetShaderA The shader that will be used to render this Sprite.

Set to null to remove a current shader.

func (*TilemapLayer) SetSmoothedA

func (self *TilemapLayer) SetSmoothedA(member bool)

SetSmoothedA Enable or disable texture smoothing for this Game Object.

It only takes effect if the Game Object is using an image based texture.

Smoothing is enabled by default.

func (*TilemapLayer) SetTexture

func (self *TilemapLayer) SetTexture(texture *Texture)

SetTexture Sets the texture of the sprite. Be warned that this doesn't remove or destroy the previous

texture this Sprite was using.

func (*TilemapLayer) SetTexture1O

func (self *TilemapLayer) SetTexture1O(texture *Texture, destroy bool)

SetTexture1O Sets the texture of the sprite. Be warned that this doesn't remove or destroy the previous

texture this Sprite was using.

func (*TilemapLayer) SetTextureA

func (self *TilemapLayer) SetTextureA(member *Texture)

SetTextureA The texture that the sprite is using

func (*TilemapLayer) SetTextureI

func (self *TilemapLayer) SetTextureI(args ...interface{})

SetTextureI Sets the texture of the sprite. Be warned that this doesn't remove or destroy the previous

texture this Sprite was using.

func (*TilemapLayer) SetTintA

func (self *TilemapLayer) SetTintA(member int)

SetTintA The tint applied to the sprite. This is a hex value. A value of 0xFFFFFF will remove any tint effect.

func (*TilemapLayer) SetTintedTextureA

func (self *TilemapLayer) SetTintedTextureA(member *Canvas)

SetTintedTextureA A canvas that contains the tinted version of the Sprite (in Canvas mode, WebGL doesn't populate this)

func (*TilemapLayer) SetTopA

func (self *TilemapLayer) SetTopA(member int)

SetTopA The y coordinate of the Game Object. This is the same as `y - offsetY`.

func (*TilemapLayer) SetTransformCallbackA

func (self *TilemapLayer) SetTransformCallbackA(member interface{})

SetTransformCallbackA The callback that will apply any scale limiting to the worldTransform.

func (*TilemapLayer) SetTransformCallbackContextA

func (self *TilemapLayer) SetTransformCallbackContextA(member interface{})

SetTransformCallbackContextA The context under which `transformCallback` is called.

func (*TilemapLayer) SetTypeA

func (self *TilemapLayer) SetTypeA(member int)

SetTypeA The const type of this object.

func (*TilemapLayer) SetWidthA

func (self *TilemapLayer) SetWidthA(member int)

SetWidthA The width of the sprite, setting this will actually modify the scale to achieve the value set

func (*TilemapLayer) SetWorldA

func (self *TilemapLayer) SetWorldA(member *Point)

SetWorldA The world coordinates of this Game Object in pixels. Depending on where in the display list this Game Object is placed this value can differ from `position`, which contains the x/y coordinates relative to the Game Objects parent.

func (*TilemapLayer) SetXA

func (self *TilemapLayer) SetXA(member int)

SetXA The position of the Game Object on the x axis relative to the local coordinates of the parent.

func (*TilemapLayer) SetYA

func (self *TilemapLayer) SetYA(member int)

SetYA The position of the Game Object on the y axis relative to the local coordinates of the parent.

func (*TilemapLayer) SetZA

func (self *TilemapLayer) SetZA(member int)

SetZA The z depth of this Game Object within its parent Group. No two objects in a Group can have the same z value. This value is adjusted automatically whenever the Group hierarchy changes. If you wish to re-order the layering of a Game Object then see methods like Group.moveUp or Group.bringToTop.

func (*TilemapLayer) Shader

func (self *TilemapLayer) Shader() *AbstractFilter

Shader The shader that will be used to render this Sprite.

Set to null to remove a current shader.

func (*TilemapLayer) ShiftCanvas

func (self *TilemapLayer) ShiftCanvas(context *dom.CanvasRenderingContext2D, x int, y int)

ShiftCanvas Shifts the contents of the canvas - does extra math so that different browsers agree on the result.

The specified (x/y) will be shifted to (0,0) after the copy and the newly exposed canvas area will need to be filled in.

func (*TilemapLayer) ShiftCanvasI

func (self *TilemapLayer) ShiftCanvasI(args ...interface{})

ShiftCanvasI Shifts the contents of the canvas - does extra math so that different browsers agree on the result.

The specified (x/y) will be shifted to (0,0) after the copy and the newly exposed canvas area will need to be filled in.

func (*TilemapLayer) Smoothed

func (self *TilemapLayer) Smoothed() bool

Smoothed Enable or disable texture smoothing for this Game Object.

It only takes effect if the Game Object is using an image based texture.

Smoothing is enabled by default.

func (*TilemapLayer) SwapChildren

func (self *TilemapLayer) SwapChildren(child *DisplayObject, child2 *DisplayObject)

SwapChildren Swaps the position of 2 Display Objects within this container.

func (*TilemapLayer) SwapChildrenI

func (self *TilemapLayer) SwapChildrenI(args ...interface{})

SwapChildrenI Swaps the position of 2 Display Objects within this container.

func (*TilemapLayer) Texture

func (self *TilemapLayer) Texture() *Texture

Texture The texture that the sprite is using

func (*TilemapLayer) Tint

func (self *TilemapLayer) Tint() int

Tint The tint applied to the sprite. This is a hex value. A value of 0xFFFFFF will remove any tint effect.

func (*TilemapLayer) TintedTexture

func (self *TilemapLayer) TintedTexture() *Canvas

TintedTexture A canvas that contains the tinted version of the Sprite (in Canvas mode, WebGL doesn't populate this)

func (*TilemapLayer) Top

func (self *TilemapLayer) Top() int

Top The y coordinate of the Game Object. This is the same as `y - offsetY`.

func (*TilemapLayer) TransformCallback

func (self *TilemapLayer) TransformCallback() interface{}

TransformCallback The callback that will apply any scale limiting to the worldTransform.

func (*TilemapLayer) TransformCallbackContext

func (self *TilemapLayer) TransformCallbackContext() interface{}

TransformCallbackContext The context under which `transformCallback` is called.

func (*TilemapLayer) Type

func (self *TilemapLayer) Type() int

Type The const type of this object.

func (*TilemapLayer) Update

func (self *TilemapLayer) Update()

Update Override this method in your own custom objects to handle any update requirements. It is called immediately after `preUpdate` and before `postUpdate`. Remember if this Game Object has any children you should call update on those too.

func (*TilemapLayer) UpdateCrop

func (self *TilemapLayer) UpdateCrop()

UpdateCrop If you have set a crop rectangle on this Game Object via `crop` and since modified the `cropRect` property, or the rectangle it references, then you need to update the crop frame by calling this method.

func (*TilemapLayer) UpdateCropI

func (self *TilemapLayer) UpdateCropI(args ...interface{})

UpdateCropI If you have set a crop rectangle on this Game Object via `crop` and since modified the `cropRect` property, or the rectangle it references, then you need to update the crop frame by calling this method.

func (*TilemapLayer) UpdateI

func (self *TilemapLayer) UpdateI(args ...interface{})

UpdateI Override this method in your own custom objects to handle any update requirements. It is called immediately after `preUpdate` and before `postUpdate`. Remember if this Game Object has any children you should call update on those too.

func (*TilemapLayer) Width

func (self *TilemapLayer) Width() int

Width The width of the sprite, setting this will actually modify the scale to achieve the value set

func (*TilemapLayer) World

func (self *TilemapLayer) World() *Point

World The world coordinates of this Game Object in pixels. Depending on where in the display list this Game Object is placed this value can differ from `position`, which contains the x/y coordinates relative to the Game Objects parent.

func (*TilemapLayer) X

func (self *TilemapLayer) X() int

X The position of the Game Object on the x axis relative to the local coordinates of the parent.

func (*TilemapLayer) Y

func (self *TilemapLayer) Y() int

Y The position of the Game Object on the y axis relative to the local coordinates of the parent.

func (*TilemapLayer) Z

func (self *TilemapLayer) Z() int

Z The z depth of this Game Object within its parent Group. No two objects in a Group can have the same z value. This value is adjusted automatically whenever the Group hierarchy changes. If you wish to re-order the layering of a Game Object then see methods like Group.moveUp or Group.bringToTop.

type TilemapParser

type TilemapParser struct {
	*js.Object
}

TilemapParser Phaser.TilemapParser parses data objects from Phaser.Loader that need more preparation before they can be inserted into a Tilemap.

func NewTilemapParser

func NewTilemapParser() *TilemapParser

NewTilemapParser Phaser.TilemapParser parses data objects from Phaser.Loader that need more preparation before they can be inserted into a Tilemap.

func NewTilemapParserI

func NewTilemapParserI(args ...interface{}) *TilemapParser

NewTilemapParserI Phaser.TilemapParser parses data objects from Phaser.Loader that need more preparation before they can be inserted into a Tilemap.

func ToTilemapParser

func ToTilemapParser(jsStruct interface{}) *TilemapParser

TilemapParser Binding conversion method to TilemapParser point

func (*TilemapParser) GetEmptyData

func (self *TilemapParser) GetEmptyData() interface{}

GetEmptyData Returns an empty map data object.

func (*TilemapParser) GetEmptyDataI

func (self *TilemapParser) GetEmptyDataI(args ...interface{}) interface{}

GetEmptyDataI Returns an empty map data object.

func (*TilemapParser) INSERT_NULL

func (self *TilemapParser) INSERT_NULL() bool

INSERT_NULL When scanning the Tiled map data the TilemapParser can either insert a null value (true) or a Phaser.Tile instance with an index of -1 (false, the default). Depending on your game type depends how this should be configured. If you've a large sparsely populated map and the tile data doesn't need to change then setting this value to `true` will help with memory consumption. However if your map is small, or you need to update the tiles (perhaps the map dynamically changes during the game) then leave the default value set.

func (*TilemapParser) Parse

func (self *TilemapParser) Parse(game *Game, key string) interface{}

Parse Parse tilemap data from the cache and creates data for a Tilemap object.

func (*TilemapParser) Parse1O

func (self *TilemapParser) Parse1O(game *Game, key string, tileWidth int) interface{}

Parse1O Parse tilemap data from the cache and creates data for a Tilemap object.

func (*TilemapParser) Parse2O

func (self *TilemapParser) Parse2O(game *Game, key string, tileWidth int, tileHeight int) interface{}

Parse2O Parse tilemap data from the cache and creates data for a Tilemap object.

func (*TilemapParser) Parse3O

func (self *TilemapParser) Parse3O(game *Game, key string, tileWidth int, tileHeight int, width int) interface{}

Parse3O Parse tilemap data from the cache and creates data for a Tilemap object.

func (*TilemapParser) Parse4O

func (self *TilemapParser) Parse4O(game *Game, key string, tileWidth int, tileHeight int, width int, height int) interface{}

Parse4O Parse tilemap data from the cache and creates data for a Tilemap object.

func (*TilemapParser) ParseCSV

func (self *TilemapParser) ParseCSV(key string, data string) interface{}

ParseCSV Parses a CSV file into valid map data.

func (*TilemapParser) ParseCSV1O

func (self *TilemapParser) ParseCSV1O(key string, data string, tileWidth int) interface{}

ParseCSV1O Parses a CSV file into valid map data.

func (*TilemapParser) ParseCSV2O

func (self *TilemapParser) ParseCSV2O(key string, data string, tileWidth int, tileHeight int) interface{}

ParseCSV2O Parses a CSV file into valid map data.

func (*TilemapParser) ParseCSVI

func (self *TilemapParser) ParseCSVI(args ...interface{}) interface{}

ParseCSVI Parses a CSV file into valid map data.

func (*TilemapParser) ParseI

func (self *TilemapParser) ParseI(args ...interface{}) interface{}

ParseI Parse tilemap data from the cache and creates data for a Tilemap object.

func (*TilemapParser) ParseJSON

func (self *TilemapParser) ParseJSON(json interface{}) interface{}

ParseJSON Parses a Tiled JSON file into valid map data.

func (*TilemapParser) ParseJSONI

func (self *TilemapParser) ParseJSONI(args ...interface{}) interface{}

ParseJSONI Parses a Tiled JSON file into valid map data.

func (*TilemapParser) SetINSERT_NULLA

func (self *TilemapParser) SetINSERT_NULLA(member bool)

SetINSERT_NULLA When scanning the Tiled map data the TilemapParser can either insert a null value (true) or a Phaser.Tile instance with an index of -1 (false, the default). Depending on your game type depends how this should be configured. If you've a large sparsely populated map and the tile data doesn't need to change then setting this value to `true` will help with memory consumption. However if your map is small, or you need to update the tiles (perhaps the map dynamically changes during the game) then leave the default value set.

type Tileset

type Tileset struct {
	*js.Object
}

Tileset A Tile set is a combination of an image containing the tiles and collision data per tile.

Tilesets are normally created automatically when Tiled data is loaded.

func NewTileset

func NewTileset(name string, firstgid int) *Tileset

NewTileset A Tile set is a combination of an image containing the tiles and collision data per tile.

Tilesets are normally created automatically when Tiled data is loaded.

func NewTileset1O

func NewTileset1O(name string, firstgid int, width int) *Tileset

NewTileset1O A Tile set is a combination of an image containing the tiles and collision data per tile.

Tilesets are normally created automatically when Tiled data is loaded.

func NewTileset2O

func NewTileset2O(name string, firstgid int, width int, height int) *Tileset

NewTileset2O A Tile set is a combination of an image containing the tiles and collision data per tile.

Tilesets are normally created automatically when Tiled data is loaded.

func NewTileset3O

func NewTileset3O(name string, firstgid int, width int, height int, margin int) *Tileset

NewTileset3O A Tile set is a combination of an image containing the tiles and collision data per tile.

Tilesets are normally created automatically when Tiled data is loaded.

func NewTileset4O

func NewTileset4O(name string, firstgid int, width int, height int, margin int, spacing int) *Tileset

NewTileset4O A Tile set is a combination of an image containing the tiles and collision data per tile.

Tilesets are normally created automatically when Tiled data is loaded.

func NewTileset5O

func NewTileset5O(name string, firstgid int, width int, height int, margin int, spacing int, properties interface{}) *Tileset

NewTileset5O A Tile set is a combination of an image containing the tiles and collision data per tile.

Tilesets are normally created automatically when Tiled data is loaded.

func NewTilesetI

func NewTilesetI(args ...interface{}) *Tileset

NewTilesetI A Tile set is a combination of an image containing the tiles and collision data per tile.

Tilesets are normally created automatically when Tiled data is loaded.

func ToTileset

func ToTileset(jsStruct interface{}) *Tileset

Tileset Binding conversion method to Tileset point

func (*Tileset) Columns

func (self *Tileset) Columns() int

Columns The number of tile columns in the tileset.

func (*Tileset) ContainsTileIndex

func (self *Tileset) ContainsTileIndex() bool

ContainsTileIndex Returns true if and only if this tileset contains the given tile index.

func (*Tileset) ContainsTileIndexI

func (self *Tileset) ContainsTileIndexI(args ...interface{}) bool

ContainsTileIndexI Returns true if and only if this tileset contains the given tile index.

func (*Tileset) Draw

func (self *Tileset) Draw(context *dom.CanvasRenderingContext2D, x int, y int, index int)

Draw Draws a tile from this Tileset at the given coordinates on the context.

func (*Tileset) DrawI

func (self *Tileset) DrawI(args ...interface{})

DrawI Draws a tile from this Tileset at the given coordinates on the context.

func (*Tileset) Firstgid

func (self *Tileset) Firstgid() int

Firstgid The Tiled firstgid value. This is the starting index of the first tile index this Tileset contains.

func (*Tileset) Image

func (self *Tileset) Image() interface{}

Image The cached image that contains the individual tiles. Use {@link Phaser.Tileset.setImage setImage} to set.

func (*Tileset) Name

func (self *Tileset) Name() string

Name The name of the Tileset.

func (*Tileset) Properties

func (self *Tileset) Properties() interface{}

Properties Tileset-specific properties that are typically defined in the Tiled editor.

func (*Tileset) Rows

func (self *Tileset) Rows() interface{}

Rows The number of tile rows in the the tileset.

func (*Tileset) SetColumnsA

func (self *Tileset) SetColumnsA(member int)

SetColumnsA The number of tile columns in the tileset.

func (*Tileset) SetFirstgidA

func (self *Tileset) SetFirstgidA(member int)

SetFirstgidA The Tiled firstgid value. This is the starting index of the first tile index this Tileset contains.

func (*Tileset) SetImage

func (self *Tileset) SetImage(image *Image)

SetImage Set the image associated with this Tileset and update the tile data.

func (*Tileset) SetImageA

func (self *Tileset) SetImageA(member interface{})

SetImageA The cached image that contains the individual tiles. Use {@link Phaser.Tileset.setImage setImage} to set.

func (*Tileset) SetImageI

func (self *Tileset) SetImageI(args ...interface{})

SetImageI Set the image associated with this Tileset and update the tile data.

func (*Tileset) SetNameA

func (self *Tileset) SetNameA(member string)

SetNameA The name of the Tileset.

func (*Tileset) SetPropertiesA

func (self *Tileset) SetPropertiesA(member interface{})

SetPropertiesA Tileset-specific properties that are typically defined in the Tiled editor.

func (*Tileset) SetRowsA

func (self *Tileset) SetRowsA(member interface{})

SetRowsA The number of tile rows in the the tileset.

func (*Tileset) SetSpacing

func (self *Tileset) SetSpacing()

SetSpacing Sets tile spacing and margins.

func (*Tileset) SetSpacing1O

func (self *Tileset) SetSpacing1O(margin int)

SetSpacing1O Sets tile spacing and margins.

func (*Tileset) SetSpacing2O

func (self *Tileset) SetSpacing2O(margin int, spacing int)

SetSpacing2O Sets tile spacing and margins.

func (*Tileset) SetSpacingI

func (self *Tileset) SetSpacingI(args ...interface{})

SetSpacingI Sets tile spacing and margins.

func (*Tileset) SetTileHeightA

func (self *Tileset) SetTileHeightA(member int)

SetTileHeightA The height of each tile (in pixels).

func (*Tileset) SetTileMarginA

func (self *Tileset) SetTileMarginA(member interface{})

SetTileMarginA The margin around the tiles in the sheet (in pixels). Use `setSpacing` to change.

func (*Tileset) SetTileSpacingA

func (self *Tileset) SetTileSpacingA(member int)

SetTileSpacingA The spacing between each tile in the sheet (in pixels). Use `setSpacing` to change.

func (*Tileset) SetTileWidthA

func (self *Tileset) SetTileWidthA(member int)

SetTileWidthA The width of each tile (in pixels).

func (*Tileset) SetTotalA

func (self *Tileset) SetTotalA(member int)

SetTotalA The total number of tiles in the tileset.

func (*Tileset) TileHeight

func (self *Tileset) TileHeight() int

TileHeight The height of each tile (in pixels).

func (*Tileset) TileMargin

func (self *Tileset) TileMargin() interface{}

TileMargin The margin around the tiles in the sheet (in pixels). Use `setSpacing` to change.

func (*Tileset) TileSpacing

func (self *Tileset) TileSpacing() int

TileSpacing The spacing between each tile in the sheet (in pixels). Use `setSpacing` to change.

func (*Tileset) TileWidth

func (self *Tileset) TileWidth() int

TileWidth The width of each tile (in pixels).

func (*Tileset) Total

func (self *Tileset) Total() int

Total The total number of tiles in the tileset.

func (*Tileset) UpdateTileData

func (self *Tileset) UpdateTileData(imageWidth int, imageHeight int)

UpdateTileData Updates tile coordinates and tileset data.

func (*Tileset) UpdateTileDataI

func (self *Tileset) UpdateTileDataI(args ...interface{})

UpdateTileDataI Updates tile coordinates and tileset data.

type TilingSprite

type TilingSprite struct {
	*js.Object
}

TilingSprite A tiling sprite is a fast way of rendering a tiling image

func NewTilingSprite

func NewTilingSprite(texture *Texture, width int, height int) *TilingSprite

NewTilingSprite A tiling sprite is a fast way of rendering a tiling image

func NewTilingSpriteI

func NewTilingSpriteI(args ...interface{}) *TilingSprite

NewTilingSpriteI A tiling sprite is a fast way of rendering a tiling image

func ToTilingSprite

func ToTilingSprite(jsStruct interface{}) *TilingSprite

TilingSprite Binding conversion method to TilingSprite point

func (*TilingSprite) AddChild

func (self *TilingSprite) AddChild(child *DisplayObject) *DisplayObject

AddChild Adds a child to the container.

func (*TilingSprite) AddChildAt

func (self *TilingSprite) AddChildAt(child *DisplayObject, index int) *DisplayObject

AddChildAt Adds a child to the container at a specified index. If the index is out of bounds an error will be thrown

func (*TilingSprite) AddChildAtI

func (self *TilingSprite) AddChildAtI(args ...interface{}) *DisplayObject

AddChildAtI Adds a child to the container at a specified index. If the index is out of bounds an error will be thrown

func (*TilingSprite) AddChildI

func (self *TilingSprite) AddChildI(args ...interface{}) *DisplayObject

AddChildI Adds a child to the container.

func (*TilingSprite) Anchor

func (self *TilingSprite) Anchor() *Point

Anchor The anchor sets the origin point of the texture.

The default is 0,0 this means the texture's origin is the top left

Setting than anchor to 0.5,0.5 means the textures origin is centered

Setting the anchor to 1,1 would mean the textures origin points will be the bottom right corner

func (*TilingSprite) BlendMode

func (self *TilingSprite) BlendMode() int

BlendMode The blend mode to be applied to the sprite

func (*TilingSprite) CanvasBuffer

func (self *TilingSprite) CanvasBuffer() *PIXICanvasBuffer

CanvasBuffer The CanvasBuffer object that the tiled texture is drawn to.

func (*TilingSprite) Children

func (self *TilingSprite) Children() []DisplayObject

Children [read-only] The array of children of this container.

func (*TilingSprite) Contains

func (self *TilingSprite) Contains(child *DisplayObject) bool

Contains Determines whether the specified display object is a child of the DisplayObjectContainer instance or the instance itself.

func (*TilingSprite) ContainsI

func (self *TilingSprite) ContainsI(args ...interface{}) bool

ContainsI Determines whether the specified display object is a child of the DisplayObjectContainer instance or the instance itself.

func (*TilingSprite) Exists

func (self *TilingSprite) Exists() bool

Exists Controls if this Sprite is processed by the core Phaser game loops and Group loops.

func (*TilingSprite) GenerateTilingTexture

func (self *TilingSprite) GenerateTilingTexture(forcePowerOfTwo bool, renderSession *RenderSession)

GenerateTilingTexture empty description

func (*TilingSprite) GenerateTilingTextureI

func (self *TilingSprite) GenerateTilingTextureI(args ...interface{})

GenerateTilingTextureI empty description

func (*TilingSprite) GetBounds

func (self *TilingSprite) GetBounds() *Rectangle

GetBounds Returns the framing rectangle of the sprite as a PIXI.Rectangle object

func (*TilingSprite) GetBoundsI

func (self *TilingSprite) GetBoundsI(args ...interface{}) *Rectangle

GetBoundsI Returns the framing rectangle of the sprite as a PIXI.Rectangle object

func (*TilingSprite) GetChildAt

func (self *TilingSprite) GetChildAt(index int) *DisplayObject

GetChildAt Returns the child at the specified index

func (*TilingSprite) GetChildAtI

func (self *TilingSprite) GetChildAtI(args ...interface{}) *DisplayObject

GetChildAtI Returns the child at the specified index

func (*TilingSprite) GetChildIndex

func (self *TilingSprite) GetChildIndex(child *DisplayObject) int

GetChildIndex Returns the index position of a child DisplayObject instance

func (*TilingSprite) GetChildIndexI

func (self *TilingSprite) GetChildIndexI(args ...interface{}) int

GetChildIndexI Returns the index position of a child DisplayObject instance

func (*TilingSprite) GetLocalBounds

func (self *TilingSprite) GetLocalBounds() *Rectangle

GetLocalBounds Retrieves the non-global local bounds of the Sprite as a rectangle. The calculation takes all visible children into consideration.

func (*TilingSprite) GetLocalBoundsI

func (self *TilingSprite) GetLocalBoundsI(args ...interface{}) *Rectangle

GetLocalBoundsI Retrieves the non-global local bounds of the Sprite as a rectangle. The calculation takes all visible children into consideration.

func (*TilingSprite) Height

func (self *TilingSprite) Height() int

Height The height of the tiling sprite

func (*TilingSprite) IgnoreChildInput

func (self *TilingSprite) IgnoreChildInput() bool

IgnoreChildInput If `ignoreChildInput` is `false` it will allow this objects _children_ to be considered as valid for Input events.

If this property is `true` then the children will _not_ be considered as valid for Input events.

Note that this property isn't recursive: only immediate children are influenced, it doesn't scan further down.

func (*TilingSprite) OnTextureUpdate

func (self *TilingSprite) OnTextureUpdate(event interface{})

OnTextureUpdate When the texture is updated, this event will fire to update the scale and frame

func (*TilingSprite) OnTextureUpdateI

func (self *TilingSprite) OnTextureUpdateI(args ...interface{})

OnTextureUpdateI When the texture is updated, this event will fire to update the scale and frame

func (*TilingSprite) RefreshTexture

func (self *TilingSprite) RefreshTexture() bool

RefreshTexture If true the TilingSprite will run generateTexture on its **next** render pass.

This is set by the likes of Phaser.LoadTexture.setFrame.

func (*TilingSprite) RemoveChild

func (self *TilingSprite) RemoveChild(child *DisplayObject) *DisplayObject

RemoveChild Removes a child from the container.

func (*TilingSprite) RemoveChildAt

func (self *TilingSprite) RemoveChildAt(index int) *DisplayObject

RemoveChildAt Removes a child from the specified index position.

func (*TilingSprite) RemoveChildAtI

func (self *TilingSprite) RemoveChildAtI(args ...interface{}) *DisplayObject

RemoveChildAtI Removes a child from the specified index position.

func (*TilingSprite) RemoveChildI

func (self *TilingSprite) RemoveChildI(args ...interface{}) *DisplayObject

RemoveChildI Removes a child from the container.

func (*TilingSprite) RemoveChildren

func (self *TilingSprite) RemoveChildren(beginIndex int, endIndex int)

RemoveChildren Removes all children from this container that are within the begin and end indexes.

func (*TilingSprite) RemoveChildrenI

func (self *TilingSprite) RemoveChildrenI(args ...interface{})

RemoveChildrenI Removes all children from this container that are within the begin and end indexes.

func (*TilingSprite) Renderable

func (self *TilingSprite) Renderable() bool

Renderable Whether this sprite is renderable or not

func (*TilingSprite) SetAnchorA

func (self *TilingSprite) SetAnchorA(member *Point)

SetAnchorA The anchor sets the origin point of the texture.

The default is 0,0 this means the texture's origin is the top left

Setting than anchor to 0.5,0.5 means the textures origin is centered

Setting the anchor to 1,1 would mean the textures origin points will be the bottom right corner

func (*TilingSprite) SetBlendModeA

func (self *TilingSprite) SetBlendModeA(member int)

SetBlendModeA The blend mode to be applied to the sprite

func (*TilingSprite) SetCanvasBufferA

func (self *TilingSprite) SetCanvasBufferA(member *PIXICanvasBuffer)

SetCanvasBufferA The CanvasBuffer object that the tiled texture is drawn to.

func (*TilingSprite) SetChildIndex

func (self *TilingSprite) SetChildIndex(child *DisplayObject, index int)

SetChildIndex Changes the position of an existing child in the display object container

func (*TilingSprite) SetChildIndexI

func (self *TilingSprite) SetChildIndexI(args ...interface{})

SetChildIndexI Changes the position of an existing child in the display object container

func (*TilingSprite) SetChildrenA

func (self *TilingSprite) SetChildrenA(member []DisplayObject)

SetChildrenA [read-only] The array of children of this container.

func (*TilingSprite) SetExistsA

func (self *TilingSprite) SetExistsA(member bool)

SetExistsA Controls if this Sprite is processed by the core Phaser game loops and Group loops.

func (*TilingSprite) SetHeightA

func (self *TilingSprite) SetHeightA(member int)

SetHeightA The height of the tiling sprite

func (*TilingSprite) SetIgnoreChildInputA

func (self *TilingSprite) SetIgnoreChildInputA(member bool)

SetIgnoreChildInputA If `ignoreChildInput` is `false` it will allow this objects _children_ to be considered as valid for Input events.

If this property is `true` then the children will _not_ be considered as valid for Input events.

Note that this property isn't recursive: only immediate children are influenced, it doesn't scan further down.

func (*TilingSprite) SetRefreshTextureA

func (self *TilingSprite) SetRefreshTextureA(member bool)

SetRefreshTextureA If true the TilingSprite will run generateTexture on its **next** render pass.

This is set by the likes of Phaser.LoadTexture.setFrame.

func (*TilingSprite) SetRenderableA

func (self *TilingSprite) SetRenderableA(member bool)

SetRenderableA Whether this sprite is renderable or not

func (*TilingSprite) SetShaderA

func (self *TilingSprite) SetShaderA(member *AbstractFilter)

SetShaderA The shader that will be used to render this Sprite.

Set to null to remove a current shader.

func (*TilingSprite) SetTexture

func (self *TilingSprite) SetTexture(texture *Texture)

SetTexture Sets the texture of the sprite. Be warned that this doesn't remove or destroy the previous

texture this Sprite was using.

func (*TilingSprite) SetTexture1O

func (self *TilingSprite) SetTexture1O(texture *Texture, destroy bool)

SetTexture1O Sets the texture of the sprite. Be warned that this doesn't remove or destroy the previous

texture this Sprite was using.

func (*TilingSprite) SetTextureA

func (self *TilingSprite) SetTextureA(member *Texture)

SetTextureA The texture that the sprite is using

func (*TilingSprite) SetTextureDebugA

func (self *TilingSprite) SetTextureDebugA(member bool)

SetTextureDebugA If enabled a green rectangle will be drawn behind the generated tiling texture, allowing you to visually

debug the texture being used.

func (*TilingSprite) SetTextureI

func (self *TilingSprite) SetTextureI(args ...interface{})

SetTextureI Sets the texture of the sprite. Be warned that this doesn't remove or destroy the previous

texture this Sprite was using.

func (*TilingSprite) SetTilePatternA

func (self *TilingSprite) SetTilePatternA(member *PIXITexture)

SetTilePatternA The Context fill pattern that is used to draw the TilingSprite in Canvas mode only (will be null in WebGL).

func (*TilingSprite) SetTilePositionA

func (self *TilingSprite) SetTilePositionA(member *Point)

SetTilePositionA The offset position of the image that is being tiled

func (*TilingSprite) SetTileScaleA

func (self *TilingSprite) SetTileScaleA(member *Point)

SetTileScaleA The scaling of the image that is being tiled

func (*TilingSprite) SetTileScaleOffsetA

func (self *TilingSprite) SetTileScaleOffsetA(member *Point)

SetTileScaleOffsetA A point that represents the scale of the texture object

func (*TilingSprite) SetTilingTextureA

func (self *TilingSprite) SetTilingTextureA(member *PIXITexture)

SetTilingTextureA An internal Texture object that holds the tiling texture that was generated from TilingSprite.texture.

func (*TilingSprite) SetTintA

func (self *TilingSprite) SetTintA(member int)

SetTintA The tint applied to the sprite. This is a hex value

func (*TilingSprite) SetTintedTextureA

func (self *TilingSprite) SetTintedTextureA(member *Canvas)

SetTintedTextureA A canvas that contains the tinted version of the Sprite (in Canvas mode, WebGL doesn't populate this)

func (*TilingSprite) SetWidthA

func (self *TilingSprite) SetWidthA(member int)

SetWidthA The width of the tiling sprite

func (*TilingSprite) Shader

func (self *TilingSprite) Shader() *AbstractFilter

Shader The shader that will be used to render this Sprite.

Set to null to remove a current shader.

func (*TilingSprite) SwapChildren

func (self *TilingSprite) SwapChildren(child *DisplayObject, child2 *DisplayObject)

SwapChildren Swaps the position of 2 Display Objects within this container.

func (*TilingSprite) SwapChildrenI

func (self *TilingSprite) SwapChildrenI(args ...interface{})

SwapChildrenI Swaps the position of 2 Display Objects within this container.

func (*TilingSprite) Texture

func (self *TilingSprite) Texture() *Texture

Texture The texture that the sprite is using

func (*TilingSprite) TextureDebug

func (self *TilingSprite) TextureDebug() bool

TextureDebug If enabled a green rectangle will be drawn behind the generated tiling texture, allowing you to visually

debug the texture being used.

func (*TilingSprite) TilePattern

func (self *TilingSprite) TilePattern() *PIXITexture

TilePattern The Context fill pattern that is used to draw the TilingSprite in Canvas mode only (will be null in WebGL).

func (*TilingSprite) TilePosition

func (self *TilingSprite) TilePosition() *Point

TilePosition The offset position of the image that is being tiled

func (*TilingSprite) TileScale

func (self *TilingSprite) TileScale() *Point

TileScale The scaling of the image that is being tiled

func (*TilingSprite) TileScaleOffset

func (self *TilingSprite) TileScaleOffset() *Point

TileScaleOffset A point that represents the scale of the texture object

func (*TilingSprite) TilingTexture

func (self *TilingSprite) TilingTexture() *PIXITexture

TilingTexture An internal Texture object that holds the tiling texture that was generated from TilingSprite.texture.

func (*TilingSprite) Tint

func (self *TilingSprite) Tint() int

Tint The tint applied to the sprite. This is a hex value

func (*TilingSprite) TintedTexture

func (self *TilingSprite) TintedTexture() *Canvas

TintedTexture A canvas that contains the tinted version of the Sprite (in Canvas mode, WebGL doesn't populate this)

func (*TilingSprite) Width

func (self *TilingSprite) Width() int

Width The width of the tiling sprite

type Time

type Time struct {
	*js.Object
}

Time This is the core internal game clock.

It manages the elapsed time and calculation of elapsed values, used for game object motion and tweens, and also handles the standard Timer pool.

To create a general timed event, use the master {@link Phaser.Timer} accessible through {@link Phaser.Time.events events}.

There are different *types* of time in Phaser:

- ***Game time*** always runs at the speed of time in real life.

Unlike wall-clock time, *game time stops when Phaser is paused*.

Game time is used for {@link Phaser.Timer timer events}.

- ***Physics time*** represents the amount of time given to physics calculations.

*When {@link Phaser.Time#slowMotion slowMotion} is in effect physics time runs slower than game time.*
Like game time, physics time stops when Phaser is paused.

Physics time is used for physics calculations and {@link Phaser.Tween tweens}.

- {@link https://en.wikipedia.org/wiki/Wall-clock_time ***Wall-clock time***} represents the duration between two events in real life time.

This time is independent of Phaser and always progresses, regardless of if Phaser is paused.

func NewTime

func NewTime(game *Game) *Time

NewTime This is the core internal game clock.

It manages the elapsed time and calculation of elapsed values, used for game object motion and tweens, and also handles the standard Timer pool.

To create a general timed event, use the master {@link Phaser.Timer} accessible through {@link Phaser.Time.events events}.

There are different *types* of time in Phaser:

- ***Game time*** always runs at the speed of time in real life.

Unlike wall-clock time, *game time stops when Phaser is paused*.

Game time is used for {@link Phaser.Timer timer events}.

- ***Physics time*** represents the amount of time given to physics calculations.

*When {@link Phaser.Time#slowMotion slowMotion} is in effect physics time runs slower than game time.*
Like game time, physics time stops when Phaser is paused.

Physics time is used for physics calculations and {@link Phaser.Tween tweens}.

- {@link https://en.wikipedia.org/wiki/Wall-clock_time ***Wall-clock time***} represents the duration between two events in real life time.

This time is independent of Phaser and always progresses, regardless of if Phaser is paused.

func NewTimeI

func NewTimeI(args ...interface{}) *Time

NewTimeI This is the core internal game clock.

It manages the elapsed time and calculation of elapsed values, used for game object motion and tweens, and also handles the standard Timer pool.

To create a general timed event, use the master {@link Phaser.Timer} accessible through {@link Phaser.Time.events events}.

There are different *types* of time in Phaser:

- ***Game time*** always runs at the speed of time in real life.

Unlike wall-clock time, *game time stops when Phaser is paused*.

Game time is used for {@link Phaser.Timer timer events}.

- ***Physics time*** represents the amount of time given to physics calculations.

*When {@link Phaser.Time#slowMotion slowMotion} is in effect physics time runs slower than game time.*
Like game time, physics time stops when Phaser is paused.

Physics time is used for physics calculations and {@link Phaser.Tween tweens}.

- {@link https://en.wikipedia.org/wiki/Wall-clock_time ***Wall-clock time***} represents the duration between two events in real life time.

This time is independent of Phaser and always progresses, regardless of if Phaser is paused.

func ToTime

func ToTime(jsStruct interface{}) *Time

Time Binding conversion method to Time point

func (*Time) Add

func (self *Time) Add(timer *Timer) *Timer

Add Adds an existing Phaser.Timer object to the Timer pool.

func (*Time) AddI

func (self *Time) AddI(args ...interface{}) *Timer

AddI Adds an existing Phaser.Timer object to the Timer pool.

func (*Time) AdvancedTiming

func (self *Time) AdvancedTiming() bool

AdvancedTiming If true then advanced profiling, including the fps rate, fps min/max, suggestedFps and msMin/msMax are updated.

func (*Time) Boot

func (self *Time) Boot()

Boot Called automatically by Phaser.Game after boot. Should not be called directly.

func (*Time) BootI

func (self *Time) BootI(args ...interface{})

BootI Called automatically by Phaser.Game after boot. Should not be called directly.

func (*Time) Create

func (self *Time) Create() *Timer

Create Creates a new stand-alone Phaser.Timer object.

func (*Time) Create1O

func (self *Time) Create1O(autoDestroy bool) *Timer

Create1O Creates a new stand-alone Phaser.Timer object.

func (*Time) CreateI

func (self *Time) CreateI(args ...interface{}) *Timer

CreateI Creates a new stand-alone Phaser.Timer object.

func (*Time) DesiredFps

func (self *Time) DesiredFps() int

DesiredFps The desired frame rate of the game.

This is used is used to calculate the physic / logic multiplier and how to apply catch-up logic updates. The desired frame rate of the game. Defaults to 60.

func (*Time) DesiredFpsMult

func (self *Time) DesiredFpsMult() int

DesiredFpsMult The desiredFps multiplier as used by Game.update.

func (*Time) Elapsed

func (self *Time) Elapsed() int

Elapsed Elapsed time since the last time update, in milliseconds, based on `now`.

This value _may_ include time that the game is paused/inactive.

_Note:_ This is updated only once per game loop - even if multiple logic update steps are done. Use {@link Phaser.Timer#physicsTime physicsTime} as a basis of game/logic calculations instead.

func (*Time) ElapsedMS

func (self *Time) ElapsedMS() int

ElapsedMS The time in ms since the last time update, in milliseconds, based on `time`.

This value is corrected for game pauses and will be "about zero" after a game is resumed.

_Note:_ This is updated once per game loop - even if multiple logic update steps are done. Use {@link Phaser.Timer#physicsTime physicsTime} as a basis of game/logic calculations instead.

func (*Time) ElapsedSecondsSince

func (self *Time) ElapsedSecondsSince(since int) int

ElapsedSecondsSince How long has passed since the given time (in seconds).

func (*Time) ElapsedSecondsSinceI

func (self *Time) ElapsedSecondsSinceI(args ...interface{}) int

ElapsedSecondsSinceI How long has passed since the given time (in seconds).

func (*Time) ElapsedSince

func (self *Time) ElapsedSince(since int) int

ElapsedSince How long has passed since the given time.

func (*Time) ElapsedSinceI

func (self *Time) ElapsedSinceI(args ...interface{}) int

ElapsedSinceI How long has passed since the given time.

func (*Time) Events

func (self *Time) Events() *Timer

Events A {@link Phaser.Timer} object bound to the master clock (this Time object) which events can be added to.

func (*Time) Fps

func (self *Time) Fps() int

Fps Advanced timing result: Frames per second.

Only calculated if {@link Phaser.Time#advancedTiming advancedTiming} is enabled.

func (*Time) FpsMax

func (self *Time) FpsMax() int

FpsMax Advanced timing result: The highest rate the fps has reached (usually no higher than 60fps).

Only calculated if {@link Phaser.Time#advancedTiming advancedTiming} is enabled. This value can be manually reset.

func (*Time) FpsMin

func (self *Time) FpsMin() int

FpsMin Advanced timing result: The lowest rate the fps has dropped to.

Only calculated if {@link Phaser.Time#advancedTiming advancedTiming} is enabled. This value can be manually reset.

func (*Time) Frames

func (self *Time) Frames() int

Frames Advanced timing result: The number of render frames record in the last second.

Only calculated if {@link Phaser.Time#advancedTiming advancedTiming} is enabled.

func (*Time) Game

func (self *Time) Game() *Game

Game Local reference to game.

func (*Time) GamePaused

func (self *Time) GamePaused()

GamePaused Called when the game enters a paused state.

func (*Time) GamePausedI

func (self *Time) GamePausedI(args ...interface{})

GamePausedI Called when the game enters a paused state.

func (*Time) GameResumed

func (self *Time) GameResumed()

GameResumed Called when the game resumes from a paused state.

func (*Time) GameResumedI

func (self *Time) GameResumedI(args ...interface{})

GameResumedI Called when the game resumes from a paused state.

func (*Time) MsMax

func (self *Time) MsMax() int

MsMax Advanced timing result: The maximum amount of time the game has taken between consecutive frames.

Only calculated if {@link Phaser.Time#advancedTiming advancedTiming} is enabled. This value can be manually reset.

func (*Time) MsMin

func (self *Time) MsMin() int

MsMin Advanced timing result: The minimum amount of time the game has taken between consecutive frames.

Only calculated if {@link Phaser.Time#advancedTiming advancedTiming} is enabled. This value can be manually reset.

func (*Time) Now

func (self *Time) Now() int

Now An increasing value representing cumulative milliseconds since an undisclosed epoch.

While this value is in milliseconds and can be used to compute time deltas, it must must _not_ be used with `Date.now()` as it may not use the same epoch / starting reference.

The source may either be from a high-res source (eg. if RAF is available) or the standard Date.now; the value can only be relied upon within a particular game instance.

func (*Time) PauseDuration

func (self *Time) PauseDuration() int

PauseDuration Records how long the game was last paused, in milliseconds. (This is not updated until the game is resumed.)

func (*Time) PhysicsElapsed

func (self *Time) PhysicsElapsed() int

PhysicsElapsed The physics update delta, in fractional seconds.

This should be used as an applicable multiplier by all logic update steps (eg. `preUpdate/postUpdate/update`) to ensure consistent game timing. Game/logic timing can drift from real-world time if the system is unable to consistently maintain the desired FPS.

With fixed-step updates this is normally equivalent to `1.0 / desiredFps`.

func (*Time) PhysicsElapsedMS

func (self *Time) PhysicsElapsedMS() int

PhysicsElapsedMS The physics update delta, in milliseconds - equivalent to `physicsElapsed * 1000`.

func (*Time) PrevTime

func (self *Time) PrevTime() int

PrevTime The `now` when the previous update occurred.

func (*Time) Refresh

func (self *Time) Refresh()

Refresh Refreshes the Time.time and Time.elapsedMS properties from the system clock.

func (*Time) RefreshI

func (self *Time) RefreshI(args ...interface{})

RefreshI Refreshes the Time.time and Time.elapsedMS properties from the system clock.

func (*Time) RemoveAll

func (self *Time) RemoveAll()

RemoveAll Remove all Timer objects, regardless of their state and clears all Timers from the {@link Phaser.Time#events events} timer.

func (*Time) RemoveAllI

func (self *Time) RemoveAllI(args ...interface{})

RemoveAllI Remove all Timer objects, regardless of their state and clears all Timers from the {@link Phaser.Time#events events} timer.

func (*Time) Reset

func (self *Time) Reset()

Reset Resets the private _started value to now and removes all currently running Timers.

func (*Time) ResetI

func (self *Time) ResetI(args ...interface{})

ResetI Resets the private _started value to now and removes all currently running Timers.

func (*Time) SetAdvancedTimingA

func (self *Time) SetAdvancedTimingA(member bool)

SetAdvancedTimingA If true then advanced profiling, including the fps rate, fps min/max, suggestedFps and msMin/msMax are updated.

func (*Time) SetDesiredFpsA

func (self *Time) SetDesiredFpsA(member int)

SetDesiredFpsA The desired frame rate of the game.

This is used is used to calculate the physic / logic multiplier and how to apply catch-up logic updates. The desired frame rate of the game. Defaults to 60.

func (*Time) SetDesiredFpsMultA

func (self *Time) SetDesiredFpsMultA(member int)

SetDesiredFpsMultA The desiredFps multiplier as used by Game.update.

func (*Time) SetElapsedA

func (self *Time) SetElapsedA(member int)

SetElapsedA Elapsed time since the last time update, in milliseconds, based on `now`.

This value _may_ include time that the game is paused/inactive.

_Note:_ This is updated only once per game loop - even if multiple logic update steps are done. Use {@link Phaser.Timer#physicsTime physicsTime} as a basis of game/logic calculations instead.

func (*Time) SetElapsedMSA

func (self *Time) SetElapsedMSA(member int)

SetElapsedMSA The time in ms since the last time update, in milliseconds, based on `time`.

This value is corrected for game pauses and will be "about zero" after a game is resumed.

_Note:_ This is updated once per game loop - even if multiple logic update steps are done. Use {@link Phaser.Timer#physicsTime physicsTime} as a basis of game/logic calculations instead.

func (*Time) SetEventsA

func (self *Time) SetEventsA(member *Timer)

SetEventsA A {@link Phaser.Timer} object bound to the master clock (this Time object) which events can be added to.

func (*Time) SetFpsA

func (self *Time) SetFpsA(member int)

SetFpsA Advanced timing result: Frames per second.

Only calculated if {@link Phaser.Time#advancedTiming advancedTiming} is enabled.

func (*Time) SetFpsMaxA

func (self *Time) SetFpsMaxA(member int)

SetFpsMaxA Advanced timing result: The highest rate the fps has reached (usually no higher than 60fps).

Only calculated if {@link Phaser.Time#advancedTiming advancedTiming} is enabled. This value can be manually reset.

func (*Time) SetFpsMinA

func (self *Time) SetFpsMinA(member int)

SetFpsMinA Advanced timing result: The lowest rate the fps has dropped to.

Only calculated if {@link Phaser.Time#advancedTiming advancedTiming} is enabled. This value can be manually reset.

func (*Time) SetFramesA

func (self *Time) SetFramesA(member int)

SetFramesA Advanced timing result: The number of render frames record in the last second.

Only calculated if {@link Phaser.Time#advancedTiming advancedTiming} is enabled.

func (*Time) SetGameA

func (self *Time) SetGameA(member *Game)

SetGameA Local reference to game.

func (*Time) SetMsMaxA

func (self *Time) SetMsMaxA(member int)

SetMsMaxA Advanced timing result: The maximum amount of time the game has taken between consecutive frames.

Only calculated if {@link Phaser.Time#advancedTiming advancedTiming} is enabled. This value can be manually reset.

func (*Time) SetMsMinA

func (self *Time) SetMsMinA(member int)

SetMsMinA Advanced timing result: The minimum amount of time the game has taken between consecutive frames.

Only calculated if {@link Phaser.Time#advancedTiming advancedTiming} is enabled. This value can be manually reset.

func (*Time) SetNowA

func (self *Time) SetNowA(member int)

SetNowA An increasing value representing cumulative milliseconds since an undisclosed epoch.

While this value is in milliseconds and can be used to compute time deltas, it must must _not_ be used with `Date.now()` as it may not use the same epoch / starting reference.

The source may either be from a high-res source (eg. if RAF is available) or the standard Date.now; the value can only be relied upon within a particular game instance.

func (*Time) SetPauseDurationA

func (self *Time) SetPauseDurationA(member int)

SetPauseDurationA Records how long the game was last paused, in milliseconds. (This is not updated until the game is resumed.)

func (*Time) SetPhysicsElapsedA

func (self *Time) SetPhysicsElapsedA(member int)

SetPhysicsElapsedA The physics update delta, in fractional seconds.

This should be used as an applicable multiplier by all logic update steps (eg. `preUpdate/postUpdate/update`) to ensure consistent game timing. Game/logic timing can drift from real-world time if the system is unable to consistently maintain the desired FPS.

With fixed-step updates this is normally equivalent to `1.0 / desiredFps`.

func (*Time) SetPhysicsElapsedMSA

func (self *Time) SetPhysicsElapsedMSA(member int)

SetPhysicsElapsedMSA The physics update delta, in milliseconds - equivalent to `physicsElapsed * 1000`.

func (*Time) SetPrevTimeA

func (self *Time) SetPrevTimeA(member int)

SetPrevTimeA The `now` when the previous update occurred.

func (*Time) SetSlowMotionA

func (self *Time) SetSlowMotionA(member int)

SetSlowMotionA Scaling factor to make the game move smoothly in slow motion - 1.0 = normal speed - 2.0 = half speed

func (*Time) SetSuggestedFpsA

func (self *Time) SetSuggestedFpsA(member int)

SetSuggestedFpsA The suggested frame rate for your game, based on an averaged real frame rate. This value is only populated if `Time.advancedTiming` is enabled.

_Note:_ This is not available until after a few frames have passed; until then it's set to the same value as desiredFps.

func (*Time) SetTimeA

func (self *Time) SetTimeA(member int)

SetTimeA The `Date.now()` value when the time was last updated.

func (*Time) SetTimeExpectedA

func (self *Time) SetTimeExpectedA(member int)

SetTimeExpectedA The time when the next call is expected when using setTimer to control the update loop

func (*Time) SetTimeToCallA

func (self *Time) SetTimeToCallA(member int)

SetTimeToCallA The value that setTimeout needs to work out when to next update

func (*Time) SlowMotion

func (self *Time) SlowMotion() int

SlowMotion Scaling factor to make the game move smoothly in slow motion - 1.0 = normal speed - 2.0 = half speed

func (*Time) SuggestedFps

func (self *Time) SuggestedFps() int

SuggestedFps The suggested frame rate for your game, based on an averaged real frame rate. This value is only populated if `Time.advancedTiming` is enabled.

_Note:_ This is not available until after a few frames have passed; until then it's set to the same value as desiredFps.

func (*Time) Time

func (self *Time) Time() int

Time The `Date.now()` value when the time was last updated.

func (*Time) TimeExpected

func (self *Time) TimeExpected() int

TimeExpected The time when the next call is expected when using setTimer to control the update loop

func (*Time) TimeToCall

func (self *Time) TimeToCall() int

TimeToCall The value that setTimeout needs to work out when to next update

func (*Time) TotalElapsedSeconds

func (self *Time) TotalElapsedSeconds() int

TotalElapsedSeconds The number of seconds that have elapsed since the game was started.

func (*Time) TotalElapsedSecondsI

func (self *Time) TotalElapsedSecondsI(args ...interface{}) int

TotalElapsedSecondsI The number of seconds that have elapsed since the game was started.

func (*Time) Update

func (self *Time) Update(time int)

Update Updates the game clock and if enabled the advanced timing data. This is called automatically by Phaser.Game.

func (*Time) UpdateAdvancedTiming

func (self *Time) UpdateAdvancedTiming()

UpdateAdvancedTiming Handles the updating of the advanced timing values (if enabled) Called automatically by Time.update.

func (*Time) UpdateAdvancedTimingI

func (self *Time) UpdateAdvancedTimingI(args ...interface{})

UpdateAdvancedTimingI Handles the updating of the advanced timing values (if enabled) Called automatically by Time.update.

func (*Time) UpdateI

func (self *Time) UpdateI(args ...interface{})

UpdateI Updates the game clock and if enabled the advanced timing data. This is called automatically by Phaser.Game.

func (*Time) UpdateTimers

func (self *Time) UpdateTimers()

UpdateTimers Handles the updating of the Phaser.Timers (if any) Called automatically by Time.update.

func (*Time) UpdateTimersI

func (self *Time) UpdateTimersI(args ...interface{})

UpdateTimersI Handles the updating of the Phaser.Timers (if any) Called automatically by Time.update.

type Timer

type Timer struct {
	*js.Object
}

Timer A Timer is a way to create and manage {@link Phaser.TimerEvent timer events} that wait for a specific duration and then run a callback. Many different timer events, with individual delays, can be added to the same Timer.

All Timer delays are in milliseconds (there are 1000 ms in 1 second); so a delay value of 250 represents a quarter of a second.

Timers are based on real life time, adjusted for game pause durations. That is, *timer events are based on elapsed {@link Phaser.Time game time}* and do *not* take physics time or slow motion into account.

func NewTimer

func NewTimer(game *Game) *Timer

NewTimer A Timer is a way to create and manage {@link Phaser.TimerEvent timer events} that wait for a specific duration and then run a callback. Many different timer events, with individual delays, can be added to the same Timer.

All Timer delays are in milliseconds (there are 1000 ms in 1 second); so a delay value of 250 represents a quarter of a second.

Timers are based on real life time, adjusted for game pause durations. That is, *timer events are based on elapsed {@link Phaser.Time game time}* and do *not* take physics time or slow motion into account.

func NewTimer1O

func NewTimer1O(game *Game, autoDestroy bool) *Timer

NewTimer1O A Timer is a way to create and manage {@link Phaser.TimerEvent timer events} that wait for a specific duration and then run a callback. Many different timer events, with individual delays, can be added to the same Timer.

All Timer delays are in milliseconds (there are 1000 ms in 1 second); so a delay value of 250 represents a quarter of a second.

Timers are based on real life time, adjusted for game pause durations. That is, *timer events are based on elapsed {@link Phaser.Time game time}* and do *not* take physics time or slow motion into account.

func NewTimerI

func NewTimerI(args ...interface{}) *Timer

NewTimerI A Timer is a way to create and manage {@link Phaser.TimerEvent timer events} that wait for a specific duration and then run a callback. Many different timer events, with individual delays, can be added to the same Timer.

All Timer delays are in milliseconds (there are 1000 ms in 1 second); so a delay value of 250 represents a quarter of a second.

Timers are based on real life time, adjusted for game pause durations. That is, *timer events are based on elapsed {@link Phaser.Time game time}* and do *not* take physics time or slow motion into account.

func ToTimer

func ToTimer(jsStruct interface{}) *Timer

Timer Binding conversion method to Timer point

func (*Timer) Add

func (self *Timer) Add(delay int, callback interface{}, callbackContext interface{}, arguments interface{}) *TimerEvent

Add Adds a new Event to this Timer.

The event will fire after the given amount of `delay` in milliseconds has passed, once the Timer has started running. The delay is in relation to when the Timer starts, not the time it was added. If the Timer is already running the delay will be calculated based on the timers current time.

Make sure to call {@link Phaser.Timer#start start} after adding all of the Events you require for this Timer.

func (*Timer) AddI

func (self *Timer) AddI(args ...interface{}) *TimerEvent

AddI Adds a new Event to this Timer.

The event will fire after the given amount of `delay` in milliseconds has passed, once the Timer has started running. The delay is in relation to when the Timer starts, not the time it was added. If the Timer is already running the delay will be calculated based on the timers current time.

Make sure to call {@link Phaser.Timer#start start} after adding all of the Events you require for this Timer.

func (*Timer) AdjustEvents

func (self *Timer) AdjustEvents()

AdjustEvents Adjusts the time of all pending events and the nextTick by the given baseTime.

func (*Timer) AdjustEventsI

func (self *Timer) AdjustEventsI(args ...interface{})

AdjustEventsI Adjusts the time of all pending events and the nextTick by the given baseTime.

func (*Timer) AutoDestroy

func (self *Timer) AutoDestroy() bool

AutoDestroy If true, the timer will automatically destroy itself after all the events have been dispatched (assuming no looping events).

func (*Timer) ClearPendingEvents

func (self *Timer) ClearPendingEvents()

ClearPendingEvents Clears any events from the Timer which have pendingDelete set to true and then resets the private _len and _i values.

func (*Timer) ClearPendingEventsI

func (self *Timer) ClearPendingEventsI(args ...interface{})

ClearPendingEventsI Clears any events from the Timer which have pendingDelete set to true and then resets the private _len and _i values.

func (*Timer) Create

func (self *Timer) Create(delay int, loop bool, repeatCount int, callback interface{}, callbackContext interface{}, arguments []interface{}) *TimerEvent

Create Creates a new TimerEvent on this Timer.

Use {@link Phaser.Timer#add}, {@link Phaser.Timer#repeat}, or {@link Phaser.Timer#loop} methods to create a new event.

func (*Timer) CreateI

func (self *Timer) CreateI(args ...interface{}) *TimerEvent

CreateI Creates a new TimerEvent on this Timer.

Use {@link Phaser.Timer#add}, {@link Phaser.Timer#repeat}, or {@link Phaser.Timer#loop} methods to create a new event.

func (*Timer) Destroy

func (self *Timer) Destroy()

Destroy Destroys this Timer. Any pending Events are not dispatched. The onComplete callbacks won't be called.

func (*Timer) DestroyI

func (self *Timer) DestroyI(args ...interface{})

DestroyI Destroys this Timer. Any pending Events are not dispatched. The onComplete callbacks won't be called.

func (*Timer) Duration

func (self *Timer) Duration() int

Duration The duration in ms remaining until the next event will occur.

func (*Timer) Elapsed

func (self *Timer) Elapsed() int

Elapsed Elapsed time since the last frame (in ms).

func (*Timer) Events

func (self *Timer) Events() []TimerEvent

Events An array holding all of this timers Phaser.TimerEvent objects. Use the methods add, repeat and loop to populate it.

func (*Timer) Expired

func (self *Timer) Expired() bool

Expired An expired Timer is one in which all of its events have been dispatched and none are pending.

func (*Timer) Game

func (self *Timer) Game() *Game

Game Local reference to game.

func (*Timer) HALF

func (self *Timer) HALF() int

HALF Number of milliseconds in half a second.

func (*Timer) Length

func (self *Timer) Length() int

Length The number of pending events in the queue.

func (*Timer) Loop

func (self *Timer) Loop(delay int, callback interface{}, callbackContext interface{}, arguments interface{}) *TimerEvent

Loop Adds a new looped Event to this Timer that will repeat forever or until the Timer is stopped.

The event will fire after the given amount of `delay` in milliseconds has passed, once the Timer has started running. The delay is in relation to when the Timer starts, not the time it was added. If the Timer is already running the delay will be calculated based on the timers current time.

Make sure to call {@link Phaser.Timer#start start} after adding all of the Events you require for this Timer.

func (*Timer) LoopI

func (self *Timer) LoopI(args ...interface{}) *TimerEvent

LoopI Adds a new looped Event to this Timer that will repeat forever or until the Timer is stopped.

The event will fire after the given amount of `delay` in milliseconds has passed, once the Timer has started running. The delay is in relation to when the Timer starts, not the time it was added. If the Timer is already running the delay will be calculated based on the timers current time.

Make sure to call {@link Phaser.Timer#start start} after adding all of the Events you require for this Timer.

func (*Timer) MINUTE

func (self *Timer) MINUTE() int

MINUTE Number of milliseconds in a minute.

func (*Timer) Ms

func (self *Timer) Ms() int

Ms The duration in milliseconds that this Timer has been running for.

func (*Timer) Next

func (self *Timer) Next() int

Next The time at which the next event will occur.

func (*Timer) NextTick

func (self *Timer) NextTick() int

NextTick The time the next tick will occur.

func (*Timer) OnComplete

func (self *Timer) OnComplete() *Signal

OnComplete This signal will be dispatched when this Timer has completed which means that there are no more events in the queue.

The signal is supplied with one argument, `timer`, which is this Timer object.

func (*Timer) Order

func (self *Timer) Order()

Order Orders the events on this Timer so they are in tick order. This is called automatically when new events are created.

func (*Timer) OrderI

func (self *Timer) OrderI(args ...interface{})

OrderI Orders the events on this Timer so they are in tick order. This is called automatically when new events are created.

func (*Timer) Pause

func (self *Timer) Pause()

Pause Pauses the Timer and all events in the queue.

func (*Timer) PauseI

func (self *Timer) PauseI(args ...interface{})

PauseI Pauses the Timer and all events in the queue.

func (*Timer) Paused

func (self *Timer) Paused() bool

Paused The paused state of the Timer. You can pause the timer by calling Timer.pause() and Timer.resume() or by the game pausing.

func (*Timer) QUARTER

func (self *Timer) QUARTER() int

QUARTER Number of milliseconds in a quarter of a second.

func (*Timer) Remove

func (self *Timer) Remove(event *TimerEvent)

Remove Removes a pending TimerEvent from the queue.

func (*Timer) RemoveAll

func (self *Timer) RemoveAll()

RemoveAll Removes all Events from this Timer and all callbacks linked to onComplete, but leaves the Timer running. The onComplete callbacks won't be called.

func (*Timer) RemoveAllI

func (self *Timer) RemoveAllI(args ...interface{})

RemoveAllI Removes all Events from this Timer and all callbacks linked to onComplete, but leaves the Timer running. The onComplete callbacks won't be called.

func (*Timer) RemoveI

func (self *Timer) RemoveI(args ...interface{})

RemoveI Removes a pending TimerEvent from the queue.

func (*Timer) Repeat

func (self *Timer) Repeat(delay int, repeatCount int, callback interface{}, callbackContext interface{}, arguments interface{}) *TimerEvent

Repeat Adds a new TimerEvent that will always play through once and then repeat for the given number of iterations.

The event will fire after the given amount of `delay` in milliseconds has passed, once the Timer has started running. The delay is in relation to when the Timer starts, not the time it was added. If the Timer is already running the delay will be calculated based on the timers current time.

Make sure to call {@link Phaser.Timer#start start} after adding all of the Events you require for this Timer.

func (*Timer) RepeatI

func (self *Timer) RepeatI(args ...interface{}) *TimerEvent

RepeatI Adds a new TimerEvent that will always play through once and then repeat for the given number of iterations.

The event will fire after the given amount of `delay` in milliseconds has passed, once the Timer has started running. The delay is in relation to when the Timer starts, not the time it was added. If the Timer is already running the delay will be calculated based on the timers current time.

Make sure to call {@link Phaser.Timer#start start} after adding all of the Events you require for this Timer.

func (*Timer) Resume

func (self *Timer) Resume()

Resume Resumes the Timer and updates all pending events.

func (*Timer) ResumeI

func (self *Timer) ResumeI(args ...interface{})

ResumeI Resumes the Timer and updates all pending events.

func (*Timer) Running

func (self *Timer) Running() bool

Running True if the Timer is actively running.

Do not modify this boolean - use {@link Phaser.Timer#pause pause} (and {@link Phaser.Timer#resume resume}) to pause the timer.

func (*Timer) SECOND

func (self *Timer) SECOND() int

SECOND Number of milliseconds in a second.

func (*Timer) Seconds

func (self *Timer) Seconds() int

Seconds The duration in seconds that this Timer has been running for.

func (*Timer) SetAutoDestroyA

func (self *Timer) SetAutoDestroyA(member bool)

SetAutoDestroyA If true, the timer will automatically destroy itself after all the events have been dispatched (assuming no looping events).

func (*Timer) SetDurationA

func (self *Timer) SetDurationA(member int)

SetDurationA The duration in ms remaining until the next event will occur.

func (*Timer) SetElapsedA

func (self *Timer) SetElapsedA(member int)

SetElapsedA Elapsed time since the last frame (in ms).

func (*Timer) SetEventsA

func (self *Timer) SetEventsA(member []TimerEvent)

SetEventsA An array holding all of this timers Phaser.TimerEvent objects. Use the methods add, repeat and loop to populate it.

func (*Timer) SetExpiredA

func (self *Timer) SetExpiredA(member bool)

SetExpiredA An expired Timer is one in which all of its events have been dispatched and none are pending.

func (*Timer) SetGameA

func (self *Timer) SetGameA(member *Game)

SetGameA Local reference to game.

func (*Timer) SetHALFA

func (self *Timer) SetHALFA(member int)

SetHALFA Number of milliseconds in half a second.

func (*Timer) SetLengthA

func (self *Timer) SetLengthA(member int)

SetLengthA The number of pending events in the queue.

func (*Timer) SetMINUTEA

func (self *Timer) SetMINUTEA(member int)

SetMINUTEA Number of milliseconds in a minute.

func (*Timer) SetMsA

func (self *Timer) SetMsA(member int)

SetMsA The duration in milliseconds that this Timer has been running for.

func (*Timer) SetNextA

func (self *Timer) SetNextA(member int)

SetNextA The time at which the next event will occur.

func (*Timer) SetNextTickA

func (self *Timer) SetNextTickA(member int)

SetNextTickA The time the next tick will occur.

func (*Timer) SetOnCompleteA

func (self *Timer) SetOnCompleteA(member *Signal)

SetOnCompleteA This signal will be dispatched when this Timer has completed which means that there are no more events in the queue.

The signal is supplied with one argument, `timer`, which is this Timer object.

func (*Timer) SetPausedA

func (self *Timer) SetPausedA(member bool)

SetPausedA The paused state of the Timer. You can pause the timer by calling Timer.pause() and Timer.resume() or by the game pausing.

func (*Timer) SetQUARTERA

func (self *Timer) SetQUARTERA(member int)

SetQUARTERA Number of milliseconds in a quarter of a second.

func (*Timer) SetRunningA

func (self *Timer) SetRunningA(member bool)

SetRunningA True if the Timer is actively running.

Do not modify this boolean - use {@link Phaser.Timer#pause pause} (and {@link Phaser.Timer#resume resume}) to pause the timer.

func (*Timer) SetSECONDA

func (self *Timer) SetSECONDA(member int)

SetSECONDA Number of milliseconds in a second.

func (*Timer) SetSecondsA

func (self *Timer) SetSecondsA(member int)

SetSecondsA The duration in seconds that this Timer has been running for.

func (*Timer) SetTimeCapA

func (self *Timer) SetTimeCapA(member int)

SetTimeCapA If the difference in time between two frame updates exceeds this value, the event times are reset to avoid catch-up situations.

func (*Timer) SortHandler

func (self *Timer) SortHandler()

SortHandler Sort handler used by Phaser.Timer.order.

func (*Timer) SortHandlerI

func (self *Timer) SortHandlerI(args ...interface{})

SortHandlerI Sort handler used by Phaser.Timer.order.

func (*Timer) Start

func (self *Timer) Start()

Start Starts this Timer running.

func (*Timer) Start1O

func (self *Timer) Start1O(delay int)

Start1O Starts this Timer running.

func (*Timer) StartI

func (self *Timer) StartI(args ...interface{})

StartI Starts this Timer running.

func (*Timer) Stop

func (self *Timer) Stop()

Stop Stops this Timer from running. Does not cause it to be destroyed if autoDestroy is set to true.

func (*Timer) Stop1O

func (self *Timer) Stop1O(clearEvents bool)

Stop1O Stops this Timer from running. Does not cause it to be destroyed if autoDestroy is set to true.

func (*Timer) StopI

func (self *Timer) StopI(args ...interface{})

StopI Stops this Timer from running. Does not cause it to be destroyed if autoDestroy is set to true.

func (*Timer) TimeCap

func (self *Timer) TimeCap() int

TimeCap If the difference in time between two frame updates exceeds this value, the event times are reset to avoid catch-up situations.

func (*Timer) Update

func (self *Timer) Update(time int) bool

Update The main Timer update event, called automatically by Phaser.Time.update.

func (*Timer) UpdateI

func (self *Timer) UpdateI(args ...interface{}) bool

UpdateI The main Timer update event, called automatically by Phaser.Time.update.

type TimerEvent

type TimerEvent struct {
	*js.Object
}

TimerEvent A TimerEvent is a single event that is processed by a Phaser.Timer.

It consists of a delay, which is a value in milliseconds after which the event will fire. When the event fires it calls a specific callback with the specified arguments.

TimerEvents are removed by their parent timer once finished firing or repeating.

Use {@link Phaser.Timer#add}, {@link Phaser.Timer#repeat}, or {@link Phaser.Timer#loop} methods to create a new event.

func NewTimerEvent

func NewTimerEvent(timer *Timer, delay int, tick int, repeatCount int, loop bool, callback interface{}, callbackContext interface{}, arguments []interface{}) *TimerEvent

NewTimerEvent A TimerEvent is a single event that is processed by a Phaser.Timer.

It consists of a delay, which is a value in milliseconds after which the event will fire. When the event fires it calls a specific callback with the specified arguments.

TimerEvents are removed by their parent timer once finished firing or repeating.

Use {@link Phaser.Timer#add}, {@link Phaser.Timer#repeat}, or {@link Phaser.Timer#loop} methods to create a new event.

func NewTimerEventI

func NewTimerEventI(args ...interface{}) *TimerEvent

NewTimerEventI A TimerEvent is a single event that is processed by a Phaser.Timer.

It consists of a delay, which is a value in milliseconds after which the event will fire. When the event fires it calls a specific callback with the specified arguments.

TimerEvents are removed by their parent timer once finished firing or repeating.

Use {@link Phaser.Timer#add}, {@link Phaser.Timer#repeat}, or {@link Phaser.Timer#loop} methods to create a new event.

func ToTimerEvent

func ToTimerEvent(jsStruct interface{}) *TimerEvent

TimerEvent Binding conversion method to TimerEvent point

func (*TimerEvent) Args

func (self *TimerEvent) Args() interface{}

Args Additional arguments to be passed to the callback.

func (*TimerEvent) Callback

func (self *TimerEvent) Callback() interface{}

Callback The callback that will be called when the TimerEvent occurs.

func (*TimerEvent) CallbackContext

func (self *TimerEvent) CallbackContext() interface{}

CallbackContext The context in which the callback will be called.

func (*TimerEvent) Delay

func (self *TimerEvent) Delay() int

Delay The delay in ms at which this TimerEvent fires.

func (*TimerEvent) Loop

func (self *TimerEvent) Loop() bool

Loop True if this TimerEvent loops, otherwise false.

func (*TimerEvent) PendingDelete

func (self *TimerEvent) PendingDelete() bool

PendingDelete A flag that controls if the TimerEvent is pending deletion.

func (*TimerEvent) RepeatCount

func (self *TimerEvent) RepeatCount() int

RepeatCount If this TimerEvent repeats it will do so this many times.

func (*TimerEvent) SetArgsA

func (self *TimerEvent) SetArgsA(member interface{})

SetArgsA Additional arguments to be passed to the callback.

func (*TimerEvent) SetCallbackA

func (self *TimerEvent) SetCallbackA(member interface{})

SetCallbackA The callback that will be called when the TimerEvent occurs.

func (*TimerEvent) SetCallbackContextA

func (self *TimerEvent) SetCallbackContextA(member interface{})

SetCallbackContextA The context in which the callback will be called.

func (*TimerEvent) SetDelayA

func (self *TimerEvent) SetDelayA(member int)

SetDelayA The delay in ms at which this TimerEvent fires.

func (*TimerEvent) SetLoopA

func (self *TimerEvent) SetLoopA(member bool)

SetLoopA True if this TimerEvent loops, otherwise false.

func (*TimerEvent) SetPendingDeleteA

func (self *TimerEvent) SetPendingDeleteA(member bool)

SetPendingDeleteA A flag that controls if the TimerEvent is pending deletion.

func (*TimerEvent) SetRepeatCountA

func (self *TimerEvent) SetRepeatCountA(member int)

SetRepeatCountA If this TimerEvent repeats it will do so this many times.

func (*TimerEvent) SetTickA

func (self *TimerEvent) SetTickA(member int)

SetTickA The tick is the next game clock time that this event will fire at.

func (*TimerEvent) SetTimerA

func (self *TimerEvent) SetTimerA(member *Timer)

SetTimerA The Timer object that this TimerEvent belongs to.

func (*TimerEvent) Tick

func (self *TimerEvent) Tick() int

Tick The tick is the next game clock time that this event will fire at.

func (*TimerEvent) Timer

func (self *TimerEvent) Timer() *Timer

Timer The Timer object that this TimerEvent belongs to.

type Touch

type Touch struct {
	*js.Object
}

Touch Phaser.Touch handles touch events with your game. Note: Android 2.x only supports 1 touch event at once, no multi-touch.

You should not normally access this class directly, but instead use a Phaser.Pointer object which normalises all game input for you.

func NewTouch

func NewTouch(game *Game) *Touch

NewTouch Phaser.Touch handles touch events with your game. Note: Android 2.x only supports 1 touch event at once, no multi-touch.

You should not normally access this class directly, but instead use a Phaser.Pointer object which normalises all game input for you.

func NewTouchI

func NewTouchI(args ...interface{}) *Touch

NewTouchI Phaser.Touch handles touch events with your game. Note: Android 2.x only supports 1 touch event at once, no multi-touch.

You should not normally access this class directly, but instead use a Phaser.Pointer object which normalises all game input for you.

func ToTouch

func ToTouch(jsStruct interface{}) *Touch

Touch Binding conversion method to Touch point

func (*Touch) AddTouchLockCallback

func (self *Touch) AddTouchLockCallback(callback interface{}, context interface{})

AddTouchLockCallback Adds a callback that is fired when a browser touchstart or touchend event is received.

This is used internally to handle audio and video unlocking on mobile devices.

If the callback returns 'true' then the callback is automatically deleted once invoked.

The callback is added to the Phaser.Touch.touchLockCallbacks array and should be removed with Phaser.Touch.removeTouchLockCallback.

func (*Touch) AddTouchLockCallback1O

func (self *Touch) AddTouchLockCallback1O(callback interface{}, context interface{}, onEnd bool)

AddTouchLockCallback1O Adds a callback that is fired when a browser touchstart or touchend event is received.

This is used internally to handle audio and video unlocking on mobile devices.

If the callback returns 'true' then the callback is automatically deleted once invoked.

The callback is added to the Phaser.Touch.touchLockCallbacks array and should be removed with Phaser.Touch.removeTouchLockCallback.

func (*Touch) AddTouchLockCallbackI

func (self *Touch) AddTouchLockCallbackI(args ...interface{})

AddTouchLockCallbackI Adds a callback that is fired when a browser touchstart or touchend event is received.

This is used internally to handle audio and video unlocking on mobile devices.

If the callback returns 'true' then the callback is automatically deleted once invoked.

The callback is added to the Phaser.Touch.touchLockCallbacks array and should be removed with Phaser.Touch.removeTouchLockCallback.

func (*Touch) CallbackContext

func (self *Touch) CallbackContext() interface{}

CallbackContext The context under which callbacks are called.

func (*Touch) ConsumeTouchMove

func (self *Touch) ConsumeTouchMove()

ConsumeTouchMove Consumes all touchmove events on the document (only enable this if you know you need it!).

func (*Touch) ConsumeTouchMoveI

func (self *Touch) ConsumeTouchMoveI(args ...interface{})

ConsumeTouchMoveI Consumes all touchmove events on the document (only enable this if you know you need it!).

func (*Touch) Enabled

func (self *Touch) Enabled() bool

Enabled Touch events will only be processed if enabled.

func (*Touch) Event

func (self *Touch) Event() *TouchEvent

Event The browser touch DOM event. Will be set to null if no touch event has ever been received.

func (*Touch) Game

func (self *Touch) Game() *Game

Game A reference to the currently running game.

func (*Touch) OnTouchCancel

func (self *Touch) OnTouchCancel(event *TouchEvent)

OnTouchCancel Touch cancel - touches that were disrupted (perhaps by moving into a plugin or browser chrome). Occurs for example on iOS when you put down 4 fingers and the app selector UI appears.

func (*Touch) OnTouchCancelI

func (self *Touch) OnTouchCancelI(args ...interface{})

OnTouchCancelI Touch cancel - touches that were disrupted (perhaps by moving into a plugin or browser chrome). Occurs for example on iOS when you put down 4 fingers and the app selector UI appears.

func (*Touch) OnTouchEnd

func (self *Touch) OnTouchEnd(event *TouchEvent)

OnTouchEnd The handler for the touchend events.

func (*Touch) OnTouchEndI

func (self *Touch) OnTouchEndI(args ...interface{})

OnTouchEndI The handler for the touchend events.

func (*Touch) OnTouchEnter

func (self *Touch) OnTouchEnter(event *TouchEvent)

OnTouchEnter For touch enter and leave its a list of the touch points that have entered or left the target. Doesn't appear to be supported by most browsers on a canvas element yet.

func (*Touch) OnTouchEnterI

func (self *Touch) OnTouchEnterI(args ...interface{})

OnTouchEnterI For touch enter and leave its a list of the touch points that have entered or left the target. Doesn't appear to be supported by most browsers on a canvas element yet.

func (*Touch) OnTouchLeave

func (self *Touch) OnTouchLeave(event *TouchEvent)

OnTouchLeave For touch enter and leave its a list of the touch points that have entered or left the target. Doesn't appear to be supported by most browsers on a canvas element yet.

func (*Touch) OnTouchLeaveI

func (self *Touch) OnTouchLeaveI(args ...interface{})

OnTouchLeaveI For touch enter and leave its a list of the touch points that have entered or left the target. Doesn't appear to be supported by most browsers on a canvas element yet.

func (*Touch) OnTouchMove

func (self *Touch) OnTouchMove(event *TouchEvent)

OnTouchMove The handler for the touchmove events.

func (*Touch) OnTouchMoveI

func (self *Touch) OnTouchMoveI(args ...interface{})

OnTouchMoveI The handler for the touchmove events.

func (*Touch) OnTouchStart

func (self *Touch) OnTouchStart(event *TouchEvent)

OnTouchStart The internal method that handles the touchstart event from the browser.

func (*Touch) OnTouchStartI

func (self *Touch) OnTouchStartI(args ...interface{})

OnTouchStartI The internal method that handles the touchstart event from the browser.

func (*Touch) PreventDefault

func (self *Touch) PreventDefault() bool

PreventDefault If true the TouchEvent will have prevent.default called on it.

func (*Touch) RemoveTouchLockCallback

func (self *Touch) RemoveTouchLockCallback(callback interface{}, context interface{}) bool

RemoveTouchLockCallback Removes the callback at the defined index from the Phaser.Touch.touchLockCallbacks array

func (*Touch) RemoveTouchLockCallbackI

func (self *Touch) RemoveTouchLockCallbackI(args ...interface{}) bool

RemoveTouchLockCallbackI Removes the callback at the defined index from the Phaser.Touch.touchLockCallbacks array

func (*Touch) SetCallbackContextA

func (self *Touch) SetCallbackContextA(member interface{})

SetCallbackContextA The context under which callbacks are called.

func (*Touch) SetEnabledA

func (self *Touch) SetEnabledA(member bool)

SetEnabledA Touch events will only be processed if enabled.

func (*Touch) SetEventA

func (self *Touch) SetEventA(member *TouchEvent)

SetEventA The browser touch DOM event. Will be set to null if no touch event has ever been received.

func (*Touch) SetGameA

func (self *Touch) SetGameA(member *Game)

SetGameA A reference to the currently running game.

func (*Touch) SetPreventDefaultA

func (self *Touch) SetPreventDefaultA(member bool)

SetPreventDefaultA If true the TouchEvent will have prevent.default called on it.

func (*Touch) SetTouchCancelCallbackA

func (self *Touch) SetTouchCancelCallbackA(member interface{})

SetTouchCancelCallbackA A callback that can be fired on a touchCancel event.

func (*Touch) SetTouchEndCallbackA

func (self *Touch) SetTouchEndCallbackA(member interface{})

SetTouchEndCallbackA A callback that can be fired on a touchEnd event.

func (*Touch) SetTouchEnterCallbackA

func (self *Touch) SetTouchEnterCallbackA(member interface{})

SetTouchEnterCallbackA A callback that can be fired on a touchEnter event.

func (*Touch) SetTouchLeaveCallbackA

func (self *Touch) SetTouchLeaveCallbackA(member interface{})

SetTouchLeaveCallbackA A callback that can be fired on a touchLeave event.

func (*Touch) SetTouchLockCallbacksA

func (self *Touch) SetTouchLockCallbacksA(member []interface{})

SetTouchLockCallbacksA An array of callbacks that will be fired every time a native touch start or touch end event is received from the browser. This is used internally to handle audio and video unlocking on mobile devices. To add a callback to this array please use `Touch.addTouchLockCallback`.

func (*Touch) SetTouchMoveCallbackA

func (self *Touch) SetTouchMoveCallbackA(member interface{})

SetTouchMoveCallbackA A callback that can be fired on a touchMove event.

func (*Touch) SetTouchStartCallbackA

func (self *Touch) SetTouchStartCallbackA(member interface{})

SetTouchStartCallbackA A callback that can be fired on a touchStart event.

func (*Touch) Start

func (self *Touch) Start()

Start Starts the event listeners running.

func (*Touch) StartI

func (self *Touch) StartI(args ...interface{})

StartI Starts the event listeners running.

func (*Touch) Stop

func (self *Touch) Stop()

Stop Stop the event listeners.

func (*Touch) StopI

func (self *Touch) StopI(args ...interface{})

StopI Stop the event listeners.

func (*Touch) TouchCancelCallback

func (self *Touch) TouchCancelCallback() interface{}

TouchCancelCallback A callback that can be fired on a touchCancel event.

func (*Touch) TouchEndCallback

func (self *Touch) TouchEndCallback() interface{}

TouchEndCallback A callback that can be fired on a touchEnd event.

func (*Touch) TouchEnterCallback

func (self *Touch) TouchEnterCallback() interface{}

TouchEnterCallback A callback that can be fired on a touchEnter event.

func (*Touch) TouchLeaveCallback

func (self *Touch) TouchLeaveCallback() interface{}

TouchLeaveCallback A callback that can be fired on a touchLeave event.

func (*Touch) TouchLockCallbacks

func (self *Touch) TouchLockCallbacks() []interface{}

TouchLockCallbacks An array of callbacks that will be fired every time a native touch start or touch end event is received from the browser. This is used internally to handle audio and video unlocking on mobile devices. To add a callback to this array please use `Touch.addTouchLockCallback`.

func (*Touch) TouchMoveCallback

func (self *Touch) TouchMoveCallback() interface{}

TouchMoveCallback A callback that can be fired on a touchMove event.

func (*Touch) TouchStartCallback

func (self *Touch) TouchStartCallback() interface{}

TouchStartCallback A callback that can be fired on a touchStart event.

type TouchEvent

type TouchEvent struct{ *js.Object }

type Tween

type Tween struct {
	*js.Object
}

Tween A Tween allows you to alter one or more properties of a target object over a defined period of time. This can be used for things such as alpha fading Sprites, scaling them or motion. Use `Tween.to` or `Tween.from` to set-up the tween values. You can create multiple tweens on the same object by calling Tween.to multiple times on the same Tween. Additional tweens specified in this way become "child" tweens and are played through in sequence. You can use Tween.timeScale and Tween.reverse to control the playback of this Tween and all of its children.

func NewTween

func NewTween(target interface{}, game *Game, manager *TweenManager) *Tween

NewTween A Tween allows you to alter one or more properties of a target object over a defined period of time. This can be used for things such as alpha fading Sprites, scaling them or motion. Use `Tween.to` or `Tween.from` to set-up the tween values. You can create multiple tweens on the same object by calling Tween.to multiple times on the same Tween. Additional tweens specified in this way become "child" tweens and are played through in sequence. You can use Tween.timeScale and Tween.reverse to control the playback of this Tween and all of its children.

func NewTweenI

func NewTweenI(args ...interface{}) *Tween

NewTweenI A Tween allows you to alter one or more properties of a target object over a defined period of time. This can be used for things such as alpha fading Sprites, scaling them or motion. Use `Tween.to` or `Tween.from` to set-up the tween values. You can create multiple tweens on the same object by calling Tween.to multiple times on the same Tween. Additional tweens specified in this way become "child" tweens and are played through in sequence. You can use Tween.timeScale and Tween.reverse to control the playback of this Tween and all of its children.

func ToTween

func ToTween(jsStruct interface{}) *Tween

Tween Binding conversion method to Tween point

func (*Tween) Chain

func (self *Tween) Chain(tweens *Tween) *Tween

Chain This method allows you to chain tweens together. Any tween chained to this tween will have its `Tween.start` method called as soon as this tween completes. If this tween never completes (i.e. repeatAll or loop is set) then the chain will never progress. Note that `Tween.onComplete` will fire when *this* tween completes, not when the whole chain completes. For that you should listen to `onComplete` on the final tween in your chain.

If you pass multiple tweens to this method they will be joined into a single long chain. For example if this is Tween A and you pass in B, C and D then B will be chained to A, C will be chained to B and D will be chained to C. Any previously chained tweens that may have been set will be overwritten.

func (*Tween) ChainI

func (self *Tween) ChainI(args ...interface{}) *Tween

ChainI This method allows you to chain tweens together. Any tween chained to this tween will have its `Tween.start` method called as soon as this tween completes. If this tween never completes (i.e. repeatAll or loop is set) then the chain will never progress. Note that `Tween.onComplete` will fire when *this* tween completes, not when the whole chain completes. For that you should listen to `onComplete` on the final tween in your chain.

If you pass multiple tweens to this method they will be joined into a single long chain. For example if this is Tween A and you pass in B, C and D then B will be chained to A, C will be chained to B and D will be chained to C. Any previously chained tweens that may have been set will be overwritten.

func (*Tween) ChainedTween

func (self *Tween) ChainedTween() *Tween

ChainedTween If this Tween is chained to another this holds a reference to it.

func (*Tween) Current

func (self *Tween) Current() int

Current The current Tween child being run.

func (*Tween) Delay

func (self *Tween) Delay(duration int) *Tween

Delay Sets the delay in milliseconds before this tween will start. If there are child tweens it sets the delay before the first child starts. The delay is invoked as soon as you call `Tween.start`. If the tween is already running this method doesn't do anything for the current active tween. If you have not yet called `Tween.to` or `Tween.from` at least once then this method will do nothing, as there are no tweens to delay. If you have child tweens and pass -1 as the index value it sets the delay across all of them.

func (*Tween) Delay1O

func (self *Tween) Delay1O(duration int, index int) *Tween

Delay1O Sets the delay in milliseconds before this tween will start. If there are child tweens it sets the delay before the first child starts. The delay is invoked as soon as you call `Tween.start`. If the tween is already running this method doesn't do anything for the current active tween. If you have not yet called `Tween.to` or `Tween.from` at least once then this method will do nothing, as there are no tweens to delay. If you have child tweens and pass -1 as the index value it sets the delay across all of them.

func (*Tween) DelayI

func (self *Tween) DelayI(args ...interface{}) *Tween

DelayI Sets the delay in milliseconds before this tween will start. If there are child tweens it sets the delay before the first child starts. The delay is invoked as soon as you call `Tween.start`. If the tween is already running this method doesn't do anything for the current active tween. If you have not yet called `Tween.to` or `Tween.from` at least once then this method will do nothing, as there are no tweens to delay. If you have child tweens and pass -1 as the index value it sets the delay across all of them.

func (*Tween) Easing

func (self *Tween) Easing(ease interface{}) *Tween

Easing Set easing function this tween will use, i.e. Phaser.Easing.Linear.None. The ease function allows you define the rate of change. You can pass either a function such as Phaser.Easing.Circular.Out or a string such as "Circ". ".easeIn", ".easeOut" and "easeInOut" variants are all supported for all ease types. If you have child tweens and pass -1 as the index value it sets the easing function defined here across all of them.

func (*Tween) Easing1O

func (self *Tween) Easing1O(ease interface{}, index int) *Tween

Easing1O Set easing function this tween will use, i.e. Phaser.Easing.Linear.None. The ease function allows you define the rate of change. You can pass either a function such as Phaser.Easing.Circular.Out or a string such as "Circ". ".easeIn", ".easeOut" and "easeInOut" variants are all supported for all ease types. If you have child tweens and pass -1 as the index value it sets the easing function defined here across all of them.

func (*Tween) EasingI

func (self *Tween) EasingI(args ...interface{}) *Tween

EasingI Set easing function this tween will use, i.e. Phaser.Easing.Linear.None. The ease function allows you define the rate of change. You can pass either a function such as Phaser.Easing.Circular.Out or a string such as "Circ". ".easeIn", ".easeOut" and "easeInOut" variants are all supported for all ease types. If you have child tweens and pass -1 as the index value it sets the easing function defined here across all of them.

func (*Tween) FrameBased

func (self *Tween) FrameBased() bool

FrameBased Is this Tween frame or time based? A frame based tween will use the physics elapsed timer when updating. This means it will retain the same consistent frame rate, regardless of the speed of the device. The duration value given should be given in frames.

If the Tween uses a time based update (which is the default) then the duration is given in milliseconds. In this situation a 2000ms tween will last exactly 2 seconds, regardless of the device and how many visual updates the tween has actually been through. For very short tweens you may wish to experiment with a frame based update instead.

The default value is whatever you've set in TweenManager.frameBased.

func (*Tween) From

func (self *Tween) From(properties interface{}) *Tween

From Sets this tween to be a `from` tween on the properties given. A `from` tween sets the target to the destination value and tweens to its current value. For example a Sprite with an `x` coordinate of 100 tweened from `x` 500 would be set to `x` 500 and then tweened to `x` 100 by giving a properties object of `{ x: 500 }`. The ease function allows you define the rate of change. You can pass either a function such as Phaser.Easing.Circular.Out or a string such as "Circ". ".easeIn", ".easeOut" and "easeInOut" variants are all supported for all ease types.

func (*Tween) From1O

func (self *Tween) From1O(properties interface{}, duration int) *Tween

From1O Sets this tween to be a `from` tween on the properties given. A `from` tween sets the target to the destination value and tweens to its current value. For example a Sprite with an `x` coordinate of 100 tweened from `x` 500 would be set to `x` 500 and then tweened to `x` 100 by giving a properties object of `{ x: 500 }`. The ease function allows you define the rate of change. You can pass either a function such as Phaser.Easing.Circular.Out or a string such as "Circ". ".easeIn", ".easeOut" and "easeInOut" variants are all supported for all ease types.

func (*Tween) From2O

func (self *Tween) From2O(properties interface{}, duration int, ease interface{}) *Tween

From2O Sets this tween to be a `from` tween on the properties given. A `from` tween sets the target to the destination value and tweens to its current value. For example a Sprite with an `x` coordinate of 100 tweened from `x` 500 would be set to `x` 500 and then tweened to `x` 100 by giving a properties object of `{ x: 500 }`. The ease function allows you define the rate of change. You can pass either a function such as Phaser.Easing.Circular.Out or a string such as "Circ". ".easeIn", ".easeOut" and "easeInOut" variants are all supported for all ease types.

func (*Tween) From3O

func (self *Tween) From3O(properties interface{}, duration int, ease interface{}, autoStart bool) *Tween

From3O Sets this tween to be a `from` tween on the properties given. A `from` tween sets the target to the destination value and tweens to its current value. For example a Sprite with an `x` coordinate of 100 tweened from `x` 500 would be set to `x` 500 and then tweened to `x` 100 by giving a properties object of `{ x: 500 }`. The ease function allows you define the rate of change. You can pass either a function such as Phaser.Easing.Circular.Out or a string such as "Circ". ".easeIn", ".easeOut" and "easeInOut" variants are all supported for all ease types.

func (*Tween) From4O

func (self *Tween) From4O(properties interface{}, duration int, ease interface{}, autoStart bool, delay int) *Tween

From4O Sets this tween to be a `from` tween on the properties given. A `from` tween sets the target to the destination value and tweens to its current value. For example a Sprite with an `x` coordinate of 100 tweened from `x` 500 would be set to `x` 500 and then tweened to `x` 100 by giving a properties object of `{ x: 500 }`. The ease function allows you define the rate of change. You can pass either a function such as Phaser.Easing.Circular.Out or a string such as "Circ". ".easeIn", ".easeOut" and "easeInOut" variants are all supported for all ease types.

func (*Tween) From5O

func (self *Tween) From5O(properties interface{}, duration int, ease interface{}, autoStart bool, delay int, repeat int) *Tween

From5O Sets this tween to be a `from` tween on the properties given. A `from` tween sets the target to the destination value and tweens to its current value. For example a Sprite with an `x` coordinate of 100 tweened from `x` 500 would be set to `x` 500 and then tweened to `x` 100 by giving a properties object of `{ x: 500 }`. The ease function allows you define the rate of change. You can pass either a function such as Phaser.Easing.Circular.Out or a string such as "Circ". ".easeIn", ".easeOut" and "easeInOut" variants are all supported for all ease types.

func (*Tween) From6O

func (self *Tween) From6O(properties interface{}, duration int, ease interface{}, autoStart bool, delay int, repeat int, yoyo bool) *Tween

From6O Sets this tween to be a `from` tween on the properties given. A `from` tween sets the target to the destination value and tweens to its current value. For example a Sprite with an `x` coordinate of 100 tweened from `x` 500 would be set to `x` 500 and then tweened to `x` 100 by giving a properties object of `{ x: 500 }`. The ease function allows you define the rate of change. You can pass either a function such as Phaser.Easing.Circular.Out or a string such as "Circ". ".easeIn", ".easeOut" and "easeInOut" variants are all supported for all ease types.

func (*Tween) FromI

func (self *Tween) FromI(args ...interface{}) *Tween

FromI Sets this tween to be a `from` tween on the properties given. A `from` tween sets the target to the destination value and tweens to its current value. For example a Sprite with an `x` coordinate of 100 tweened from `x` 500 would be set to `x` 500 and then tweened to `x` 100 by giving a properties object of `{ x: 500 }`. The ease function allows you define the rate of change. You can pass either a function such as Phaser.Easing.Circular.Out or a string such as "Circ". ".easeIn", ".easeOut" and "easeInOut" variants are all supported for all ease types.

func (*Tween) Game

func (self *Tween) Game() *Game

Game A reference to the currently running Game.

func (*Tween) GenerateData

func (self *Tween) GenerateData() []interface{}

GenerateData This will generate an array populated with the tweened object values from start to end. It works by running the tween simulation at the given frame rate based on the values set-up in Tween.to and Tween.from. It ignores delay and repeat counts and any chained tweens, but does include child tweens. Just one play through of the tween data is returned, including yoyo if set.

func (*Tween) GenerateData1O

func (self *Tween) GenerateData1O(frameRate int) []interface{}

GenerateData1O This will generate an array populated with the tweened object values from start to end. It works by running the tween simulation at the given frame rate based on the values set-up in Tween.to and Tween.from. It ignores delay and repeat counts and any chained tweens, but does include child tweens. Just one play through of the tween data is returned, including yoyo if set.

func (*Tween) GenerateData2O

func (self *Tween) GenerateData2O(frameRate int, data []interface{}) []interface{}

GenerateData2O This will generate an array populated with the tweened object values from start to end. It works by running the tween simulation at the given frame rate based on the values set-up in Tween.to and Tween.from. It ignores delay and repeat counts and any chained tweens, but does include child tweens. Just one play through of the tween data is returned, including yoyo if set.

func (*Tween) GenerateDataI

func (self *Tween) GenerateDataI(args ...interface{}) []interface{}

GenerateDataI This will generate an array populated with the tweened object values from start to end. It works by running the tween simulation at the given frame rate based on the values set-up in Tween.to and Tween.from. It ignores delay and repeat counts and any chained tweens, but does include child tweens. Just one play through of the tween data is returned, including yoyo if set.

func (*Tween) Interpolation

func (self *Tween) Interpolation(interpolation interface{}) *Tween

Interpolation Sets the interpolation function the tween will use. By default it uses Phaser.Math.linearInterpolation. Also available: Phaser.Math.bezierInterpolation and Phaser.Math.catmullRomInterpolation. The interpolation function is only used if the target properties is an array. If you have child tweens and pass -1 as the index value and it will set the interpolation function across all of them.

func (*Tween) Interpolation1O

func (self *Tween) Interpolation1O(interpolation interface{}, context interface{}) *Tween

Interpolation1O Sets the interpolation function the tween will use. By default it uses Phaser.Math.linearInterpolation. Also available: Phaser.Math.bezierInterpolation and Phaser.Math.catmullRomInterpolation. The interpolation function is only used if the target properties is an array. If you have child tweens and pass -1 as the index value and it will set the interpolation function across all of them.

func (*Tween) Interpolation2O

func (self *Tween) Interpolation2O(interpolation interface{}, context interface{}, index int) *Tween

Interpolation2O Sets the interpolation function the tween will use. By default it uses Phaser.Math.linearInterpolation. Also available: Phaser.Math.bezierInterpolation and Phaser.Math.catmullRomInterpolation. The interpolation function is only used if the target properties is an array. If you have child tweens and pass -1 as the index value and it will set the interpolation function across all of them.

func (*Tween) InterpolationI

func (self *Tween) InterpolationI(args ...interface{}) *Tween

InterpolationI Sets the interpolation function the tween will use. By default it uses Phaser.Math.linearInterpolation. Also available: Phaser.Math.bezierInterpolation and Phaser.Math.catmullRomInterpolation. The interpolation function is only used if the target properties is an array. If you have child tweens and pass -1 as the index value and it will set the interpolation function across all of them.

func (*Tween) IsPaused

func (self *Tween) IsPaused() bool

IsPaused Is this Tween paused or not?

func (*Tween) IsRunning

func (self *Tween) IsRunning() bool

IsRunning If the tween is running this is set to true, otherwise false. Tweens that are in a delayed state or waiting to start are considered as being running.

func (*Tween) Loop

func (self *Tween) Loop() *Tween

Loop Enables the looping of this tween. The tween will loop forever, and onComplete will never fire.

If `value` is `true` then this is the same as setting `Tween.repeatAll(-1)`. If `value` is `false` it is the same as setting `Tween.repeatAll(0)` and will reset the `repeatCounter` to zero.

Usage: game.add.tween(p).to({ x: 700 }, 1000, Phaser.Easing.Linear.None, true) .to({ y: 300 }, 1000, Phaser.Easing.Linear.None) .to({ x: 0 }, 1000, Phaser.Easing.Linear.None) .to({ y: 0 }, 1000, Phaser.Easing.Linear.None) .loop();

func (*Tween) Loop1O

func (self *Tween) Loop1O(value bool) *Tween

Loop1O Enables the looping of this tween. The tween will loop forever, and onComplete will never fire.

If `value` is `true` then this is the same as setting `Tween.repeatAll(-1)`. If `value` is `false` it is the same as setting `Tween.repeatAll(0)` and will reset the `repeatCounter` to zero.

Usage: game.add.tween(p).to({ x: 700 }, 1000, Phaser.Easing.Linear.None, true) .to({ y: 300 }, 1000, Phaser.Easing.Linear.None) .to({ x: 0 }, 1000, Phaser.Easing.Linear.None) .to({ y: 0 }, 1000, Phaser.Easing.Linear.None) .loop();

func (*Tween) LoopI

func (self *Tween) LoopI(args ...interface{}) *Tween

LoopI Enables the looping of this tween. The tween will loop forever, and onComplete will never fire.

If `value` is `true` then this is the same as setting `Tween.repeatAll(-1)`. If `value` is `false` it is the same as setting `Tween.repeatAll(0)` and will reset the `repeatCounter` to zero.

Usage: game.add.tween(p).to({ x: 700 }, 1000, Phaser.Easing.Linear.None, true) .to({ y: 300 }, 1000, Phaser.Easing.Linear.None) .to({ x: 0 }, 1000, Phaser.Easing.Linear.None) .to({ y: 0 }, 1000, Phaser.Easing.Linear.None) .loop();

func (*Tween) Manager

func (self *Tween) Manager() *TweenManager

Manager Reference to the TweenManager responsible for updating this Tween.

func (*Tween) OnChildComplete

func (self *Tween) OnChildComplete() *Signal

OnChildComplete The onChildComplete event is fired when the Tween or any of its children completes. Fires every time a child completes unless a child is set to repeat forever. It will be sent 2 parameters: the target object and this tween.

func (*Tween) OnComplete

func (self *Tween) OnComplete() *Signal

OnComplete The onComplete event is fired when the Tween and all of its children completes. Does not fire if the Tween is set to loop or repeatAll(-1). It will be sent 2 parameters: the target object and this tween.

func (*Tween) OnLoop

func (self *Tween) OnLoop() *Signal

OnLoop The onLoop event is fired if the Tween, or any child tweens loop. It will be sent 2 parameters: the target object and this tween.

func (*Tween) OnRepeat

func (self *Tween) OnRepeat() *Signal

OnRepeat The onRepeat event is fired if the Tween and all of its children repeats. If this tween has no children this will never be fired. It will be sent 2 parameters: the target object and this tween.

func (*Tween) OnStart

func (self *Tween) OnStart() *Signal

OnStart The onStart event is fired when the Tween begins. If there is a delay before the tween starts then onStart fires after the delay is finished. It will be sent 2 parameters: the target object and this tween.

func (*Tween) OnUpdateCallback

func (self *Tween) OnUpdateCallback(callback interface{}, callbackContext interface{}) *Tween

OnUpdateCallback Sets a callback to be fired each time this tween updates.

func (*Tween) OnUpdateCallbackI

func (self *Tween) OnUpdateCallbackI(args ...interface{}) *Tween

OnUpdateCallbackI Sets a callback to be fired each time this tween updates.

func (*Tween) Pause

func (self *Tween) Pause()

Pause Pauses the tween. Resume playback with Tween.resume.

func (*Tween) PauseI

func (self *Tween) PauseI(args ...interface{})

PauseI Pauses the tween. Resume playback with Tween.resume.

func (*Tween) PendingDelete

func (self *Tween) PendingDelete() bool

PendingDelete True if this Tween is ready to be deleted by the TweenManager.

func (*Tween) Properties

func (self *Tween) Properties() interface{}

Properties Target property cache used when building the child data values.

func (*Tween) Repeat

func (self *Tween) Repeat(total int) *Tween

Repeat Sets the number of times this tween will repeat. If you have not yet called `Tween.to` or `Tween.from` at least once then this method will do nothing, as there are no tweens to repeat. If you have child tweens and pass -1 as the index value it sets the number of times they'll repeat across all of them. If you wish to define how many times this Tween and all children will repeat see Tween.repeatAll.

func (*Tween) Repeat1O

func (self *Tween) Repeat1O(total int, repeat int) *Tween

Repeat1O Sets the number of times this tween will repeat. If you have not yet called `Tween.to` or `Tween.from` at least once then this method will do nothing, as there are no tweens to repeat. If you have child tweens and pass -1 as the index value it sets the number of times they'll repeat across all of them. If you wish to define how many times this Tween and all children will repeat see Tween.repeatAll.

func (*Tween) Repeat2O

func (self *Tween) Repeat2O(total int, repeat int, index int) *Tween

Repeat2O Sets the number of times this tween will repeat. If you have not yet called `Tween.to` or `Tween.from` at least once then this method will do nothing, as there are no tweens to repeat. If you have child tweens and pass -1 as the index value it sets the number of times they'll repeat across all of them. If you wish to define how many times this Tween and all children will repeat see Tween.repeatAll.

func (*Tween) RepeatAll

func (self *Tween) RepeatAll() *Tween

RepeatAll Set how many times this tween and all of its children will repeat. A tween (A) with 3 children (B,C,D) with a `repeatAll` value of 2 would play as: ABCDABCD before completing.

func (*Tween) RepeatAll1O

func (self *Tween) RepeatAll1O(total int) *Tween

RepeatAll1O Set how many times this tween and all of its children will repeat. A tween (A) with 3 children (B,C,D) with a `repeatAll` value of 2 would play as: ABCDABCD before completing.

func (*Tween) RepeatAllI

func (self *Tween) RepeatAllI(args ...interface{}) *Tween

RepeatAllI Set how many times this tween and all of its children will repeat. A tween (A) with 3 children (B,C,D) with a `repeatAll` value of 2 would play as: ABCDABCD before completing.

func (*Tween) RepeatCounter

func (self *Tween) RepeatCounter() int

RepeatCounter If the Tween and any child tweens are set to repeat this contains the current repeat count.

func (*Tween) RepeatDelay

func (self *Tween) RepeatDelay(duration int) *Tween

RepeatDelay Sets the delay in milliseconds before this tween will repeat itself. The repeatDelay is invoked as soon as you call `Tween.start`. If the tween is already running this method doesn't do anything for the current active tween. If you have not yet called `Tween.to` or `Tween.from` at least once then this method will do nothing, as there are no tweens to set repeatDelay on. If you have child tweens and pass -1 as the index value it sets the repeatDelay across all of them.

func (*Tween) RepeatDelay1O

func (self *Tween) RepeatDelay1O(duration int, index int) *Tween

RepeatDelay1O Sets the delay in milliseconds before this tween will repeat itself. The repeatDelay is invoked as soon as you call `Tween.start`. If the tween is already running this method doesn't do anything for the current active tween. If you have not yet called `Tween.to` or `Tween.from` at least once then this method will do nothing, as there are no tweens to set repeatDelay on. If you have child tweens and pass -1 as the index value it sets the repeatDelay across all of them.

func (*Tween) RepeatDelayI

func (self *Tween) RepeatDelayI(args ...interface{}) *Tween

RepeatDelayI Sets the delay in milliseconds before this tween will repeat itself. The repeatDelay is invoked as soon as you call `Tween.start`. If the tween is already running this method doesn't do anything for the current active tween. If you have not yet called `Tween.to` or `Tween.from` at least once then this method will do nothing, as there are no tweens to set repeatDelay on. If you have child tweens and pass -1 as the index value it sets the repeatDelay across all of them.

func (*Tween) RepeatI

func (self *Tween) RepeatI(args ...interface{}) *Tween

RepeatI Sets the number of times this tween will repeat. If you have not yet called `Tween.to` or `Tween.from` at least once then this method will do nothing, as there are no tweens to repeat. If you have child tweens and pass -1 as the index value it sets the number of times they'll repeat across all of them. If you wish to define how many times this Tween and all children will repeat see Tween.repeatAll.

func (*Tween) Resume

func (self *Tween) Resume()

Resume Resumes a paused tween.

func (*Tween) ResumeI

func (self *Tween) ResumeI(args ...interface{})

ResumeI Resumes a paused tween.

func (*Tween) Reverse

func (self *Tween) Reverse() bool

Reverse If set to `true` the current tween will play in reverse. If the tween hasn't yet started this has no effect. If there are child tweens then all child tweens will play in reverse from the current point.

func (*Tween) SetChainedTweenA

func (self *Tween) SetChainedTweenA(member *Tween)

SetChainedTweenA If this Tween is chained to another this holds a reference to it.

func (*Tween) SetCurrentA

func (self *Tween) SetCurrentA(member int)

SetCurrentA The current Tween child being run.

func (*Tween) SetFrameBasedA

func (self *Tween) SetFrameBasedA(member bool)

SetFrameBasedA Is this Tween frame or time based? A frame based tween will use the physics elapsed timer when updating. This means it will retain the same consistent frame rate, regardless of the speed of the device. The duration value given should be given in frames.

If the Tween uses a time based update (which is the default) then the duration is given in milliseconds. In this situation a 2000ms tween will last exactly 2 seconds, regardless of the device and how many visual updates the tween has actually been through. For very short tweens you may wish to experiment with a frame based update instead.

The default value is whatever you've set in TweenManager.frameBased.

func (*Tween) SetGameA

func (self *Tween) SetGameA(member *Game)

SetGameA A reference to the currently running Game.

func (*Tween) SetIsPausedA

func (self *Tween) SetIsPausedA(member bool)

SetIsPausedA Is this Tween paused or not?

func (*Tween) SetIsRunningA

func (self *Tween) SetIsRunningA(member bool)

SetIsRunningA If the tween is running this is set to true, otherwise false. Tweens that are in a delayed state or waiting to start are considered as being running.

func (*Tween) SetManagerA

func (self *Tween) SetManagerA(member *TweenManager)

SetManagerA Reference to the TweenManager responsible for updating this Tween.

func (*Tween) SetOnChildCompleteA

func (self *Tween) SetOnChildCompleteA(member *Signal)

SetOnChildCompleteA The onChildComplete event is fired when the Tween or any of its children completes. Fires every time a child completes unless a child is set to repeat forever. It will be sent 2 parameters: the target object and this tween.

func (*Tween) SetOnCompleteA

func (self *Tween) SetOnCompleteA(member *Signal)

SetOnCompleteA The onComplete event is fired when the Tween and all of its children completes. Does not fire if the Tween is set to loop or repeatAll(-1). It will be sent 2 parameters: the target object and this tween.

func (*Tween) SetOnLoopA

func (self *Tween) SetOnLoopA(member *Signal)

SetOnLoopA The onLoop event is fired if the Tween, or any child tweens loop. It will be sent 2 parameters: the target object and this tween.

func (*Tween) SetOnRepeatA

func (self *Tween) SetOnRepeatA(member *Signal)

SetOnRepeatA The onRepeat event is fired if the Tween and all of its children repeats. If this tween has no children this will never be fired. It will be sent 2 parameters: the target object and this tween.

func (*Tween) SetOnStartA

func (self *Tween) SetOnStartA(member *Signal)

SetOnStartA The onStart event is fired when the Tween begins. If there is a delay before the tween starts then onStart fires after the delay is finished. It will be sent 2 parameters: the target object and this tween.

func (*Tween) SetPendingDeleteA

func (self *Tween) SetPendingDeleteA(member bool)

SetPendingDeleteA True if this Tween is ready to be deleted by the TweenManager.

func (*Tween) SetPropertiesA

func (self *Tween) SetPropertiesA(member interface{})

SetPropertiesA Target property cache used when building the child data values.

func (*Tween) SetRepeatCounterA

func (self *Tween) SetRepeatCounterA(member int)

SetRepeatCounterA If the Tween and any child tweens are set to repeat this contains the current repeat count.

func (*Tween) SetReverseA

func (self *Tween) SetReverseA(member bool)

SetReverseA If set to `true` the current tween will play in reverse. If the tween hasn't yet started this has no effect. If there are child tweens then all child tweens will play in reverse from the current point.

func (*Tween) SetTargetA

func (self *Tween) SetTargetA(member interface{})

SetTargetA The target object, such as a Phaser.Sprite or property like Phaser.Sprite.scale.

func (*Tween) SetTimeScaleA

func (self *Tween) SetTimeScaleA(member int)

SetTimeScaleA The speed at which the tweens will run. A value of 1 means it will match the game frame rate. 0.5 will run at half the frame rate. 2 at double the frame rate, etc. If a tweens duration is 1 second but timeScale is 0.5 then it will take 2 seconds to complete.

func (*Tween) SetTimelineA

func (self *Tween) SetTimelineA(member []interface{})

SetTimelineA An Array of TweenData objects that comprise the different parts of this Tween.

func (*Tween) SetTotalDurationA

func (self *Tween) SetTotalDurationA(member *TweenData)

SetTotalDurationA Gets the total duration of this Tween, including all child tweens, in milliseconds.

func (*Tween) Start

func (self *Tween) Start() *Tween

Start Starts the tween running. Can also be called by the autoStart parameter of `Tween.to` or `Tween.from`. This sets the `Tween.isRunning` property to `true` and dispatches a `Tween.onStart` signal. If the Tween has a delay set then nothing will start tweening until the delay has expired.

func (*Tween) Start1O

func (self *Tween) Start1O(index int) *Tween

Start1O Starts the tween running. Can also be called by the autoStart parameter of `Tween.to` or `Tween.from`. This sets the `Tween.isRunning` property to `true` and dispatches a `Tween.onStart` signal. If the Tween has a delay set then nothing will start tweening until the delay has expired.

func (*Tween) StartI

func (self *Tween) StartI(args ...interface{}) *Tween

StartI Starts the tween running. Can also be called by the autoStart parameter of `Tween.to` or `Tween.from`. This sets the `Tween.isRunning` property to `true` and dispatches a `Tween.onStart` signal. If the Tween has a delay set then nothing will start tweening until the delay has expired.

func (*Tween) Stop

func (self *Tween) Stop() *Tween

Stop Stops the tween if running and flags it for deletion from the TweenManager. If called directly the `Tween.onComplete` signal is not dispatched and no chained tweens are started unless the complete parameter is set to `true`. If you just wish to pause a tween then use Tween.pause instead.

func (*Tween) Stop1O

func (self *Tween) Stop1O(complete bool) *Tween

Stop1O Stops the tween if running and flags it for deletion from the TweenManager. If called directly the `Tween.onComplete` signal is not dispatched and no chained tweens are started unless the complete parameter is set to `true`. If you just wish to pause a tween then use Tween.pause instead.

func (*Tween) StopI

func (self *Tween) StopI(args ...interface{}) *Tween

StopI Stops the tween if running and flags it for deletion from the TweenManager. If called directly the `Tween.onComplete` signal is not dispatched and no chained tweens are started unless the complete parameter is set to `true`. If you just wish to pause a tween then use Tween.pause instead.

func (*Tween) Target

func (self *Tween) Target() interface{}

Target The target object, such as a Phaser.Sprite or property like Phaser.Sprite.scale.

func (*Tween) TimeScale

func (self *Tween) TimeScale() int

TimeScale The speed at which the tweens will run. A value of 1 means it will match the game frame rate. 0.5 will run at half the frame rate. 2 at double the frame rate, etc. If a tweens duration is 1 second but timeScale is 0.5 then it will take 2 seconds to complete.

func (*Tween) Timeline

func (self *Tween) Timeline() []interface{}

Timeline An Array of TweenData objects that comprise the different parts of this Tween.

func (*Tween) To

func (self *Tween) To(properties interface{}) *Tween

To Sets this tween to be a `to` tween on the properties given. A `to` tween starts at the current value and tweens to the destination value given. For example a Sprite with an `x` coordinate of 100 could be tweened to `x` 200 by giving a properties object of `{ x: 200 }`. The ease function allows you define the rate of change. You can pass either a function such as Phaser.Easing.Circular.Out or a string such as "Circ". ".easeIn", ".easeOut" and "easeInOut" variants are all supported for all ease types.

func (*Tween) To1O

func (self *Tween) To1O(properties interface{}, duration int) *Tween

To1O Sets this tween to be a `to` tween on the properties given. A `to` tween starts at the current value and tweens to the destination value given. For example a Sprite with an `x` coordinate of 100 could be tweened to `x` 200 by giving a properties object of `{ x: 200 }`. The ease function allows you define the rate of change. You can pass either a function such as Phaser.Easing.Circular.Out or a string such as "Circ". ".easeIn", ".easeOut" and "easeInOut" variants are all supported for all ease types.

func (*Tween) To2O

func (self *Tween) To2O(properties interface{}, duration int, ease interface{}) *Tween

To2O Sets this tween to be a `to` tween on the properties given. A `to` tween starts at the current value and tweens to the destination value given. For example a Sprite with an `x` coordinate of 100 could be tweened to `x` 200 by giving a properties object of `{ x: 200 }`. The ease function allows you define the rate of change. You can pass either a function such as Phaser.Easing.Circular.Out or a string such as "Circ". ".easeIn", ".easeOut" and "easeInOut" variants are all supported for all ease types.

func (*Tween) To3O

func (self *Tween) To3O(properties interface{}, duration int, ease interface{}, autoStart bool) *Tween

To3O Sets this tween to be a `to` tween on the properties given. A `to` tween starts at the current value and tweens to the destination value given. For example a Sprite with an `x` coordinate of 100 could be tweened to `x` 200 by giving a properties object of `{ x: 200 }`. The ease function allows you define the rate of change. You can pass either a function such as Phaser.Easing.Circular.Out or a string such as "Circ". ".easeIn", ".easeOut" and "easeInOut" variants are all supported for all ease types.

func (*Tween) To4O

func (self *Tween) To4O(properties interface{}, duration int, ease interface{}, autoStart bool, delay int) *Tween

To4O Sets this tween to be a `to` tween on the properties given. A `to` tween starts at the current value and tweens to the destination value given. For example a Sprite with an `x` coordinate of 100 could be tweened to `x` 200 by giving a properties object of `{ x: 200 }`. The ease function allows you define the rate of change. You can pass either a function such as Phaser.Easing.Circular.Out or a string such as "Circ". ".easeIn", ".easeOut" and "easeInOut" variants are all supported for all ease types.

func (*Tween) To5O

func (self *Tween) To5O(properties interface{}, duration int, ease interface{}, autoStart bool, delay int, repeat int) *Tween

To5O Sets this tween to be a `to` tween on the properties given. A `to` tween starts at the current value and tweens to the destination value given. For example a Sprite with an `x` coordinate of 100 could be tweened to `x` 200 by giving a properties object of `{ x: 200 }`. The ease function allows you define the rate of change. You can pass either a function such as Phaser.Easing.Circular.Out or a string such as "Circ". ".easeIn", ".easeOut" and "easeInOut" variants are all supported for all ease types.

func (*Tween) To6O

func (self *Tween) To6O(properties interface{}, duration int, ease interface{}, autoStart bool, delay int, repeat int, yoyo bool) *Tween

To6O Sets this tween to be a `to` tween on the properties given. A `to` tween starts at the current value and tweens to the destination value given. For example a Sprite with an `x` coordinate of 100 could be tweened to `x` 200 by giving a properties object of `{ x: 200 }`. The ease function allows you define the rate of change. You can pass either a function such as Phaser.Easing.Circular.Out or a string such as "Circ". ".easeIn", ".easeOut" and "easeInOut" variants are all supported for all ease types.

func (*Tween) ToI

func (self *Tween) ToI(args ...interface{}) *Tween

ToI Sets this tween to be a `to` tween on the properties given. A `to` tween starts at the current value and tweens to the destination value given. For example a Sprite with an `x` coordinate of 100 could be tweened to `x` 200 by giving a properties object of `{ x: 200 }`. The ease function allows you define the rate of change. You can pass either a function such as Phaser.Easing.Circular.Out or a string such as "Circ". ".easeIn", ".easeOut" and "easeInOut" variants are all supported for all ease types.

func (*Tween) TotalDuration

func (self *Tween) TotalDuration() *TweenData

TotalDuration Gets the total duration of this Tween, including all child tweens, in milliseconds.

func (*Tween) Update

func (self *Tween) Update(time int) bool

Update Core tween update function called by the TweenManager. Does not need to be invoked directly.

func (*Tween) UpdateI

func (self *Tween) UpdateI(args ...interface{}) bool

UpdateI Core tween update function called by the TweenManager. Does not need to be invoked directly.

func (*Tween) UpdateTweenData

func (self *Tween) UpdateTweenData(property string, value interface{}) *Tween

UpdateTweenData Updates either a single TweenData or all TweenData objects properties to the given value. Used internally by methods like Tween.delay, Tween.yoyo, etc. but can also be called directly if you know which property you want to tweak. The property is not checked, so if you pass an invalid one you'll generate a run-time error.

func (*Tween) UpdateTweenData1O

func (self *Tween) UpdateTweenData1O(property string, value interface{}, index int) *Tween

UpdateTweenData1O Updates either a single TweenData or all TweenData objects properties to the given value. Used internally by methods like Tween.delay, Tween.yoyo, etc. but can also be called directly if you know which property you want to tweak. The property is not checked, so if you pass an invalid one you'll generate a run-time error.

func (*Tween) UpdateTweenDataI

func (self *Tween) UpdateTweenDataI(args ...interface{}) *Tween

UpdateTweenDataI Updates either a single TweenData or all TweenData objects properties to the given value. Used internally by methods like Tween.delay, Tween.yoyo, etc. but can also be called directly if you know which property you want to tweak. The property is not checked, so if you pass an invalid one you'll generate a run-time error.

func (*Tween) Yoyo

func (self *Tween) Yoyo(enable bool) *Tween

Yoyo A Tween that has yoyo set to true will run through from its starting values to its end values and then play back in reverse from end to start. Used in combination with repeat you can create endless loops. If you have not yet called `Tween.to` or `Tween.from` at least once then this method will do nothing, as there are no tweens to yoyo. If you have child tweens and pass -1 as the index value it sets the yoyo property across all of them. If you wish to yoyo this Tween and all of its children then see Tween.yoyoAll.

func (*Tween) Yoyo1O

func (self *Tween) Yoyo1O(enable bool, yoyoDelay int) *Tween

Yoyo1O A Tween that has yoyo set to true will run through from its starting values to its end values and then play back in reverse from end to start. Used in combination with repeat you can create endless loops. If you have not yet called `Tween.to` or `Tween.from` at least once then this method will do nothing, as there are no tweens to yoyo. If you have child tweens and pass -1 as the index value it sets the yoyo property across all of them. If you wish to yoyo this Tween and all of its children then see Tween.yoyoAll.

func (*Tween) Yoyo2O

func (self *Tween) Yoyo2O(enable bool, yoyoDelay int, index int) *Tween

Yoyo2O A Tween that has yoyo set to true will run through from its starting values to its end values and then play back in reverse from end to start. Used in combination with repeat you can create endless loops. If you have not yet called `Tween.to` or `Tween.from` at least once then this method will do nothing, as there are no tweens to yoyo. If you have child tweens and pass -1 as the index value it sets the yoyo property across all of them. If you wish to yoyo this Tween and all of its children then see Tween.yoyoAll.

func (*Tween) YoyoDelay

func (self *Tween) YoyoDelay(duration int) *Tween

YoyoDelay Sets the delay in milliseconds before this tween will run a yoyo (only applies if yoyo is enabled). The repeatDelay is invoked as soon as you call `Tween.start`. If the tween is already running this method doesn't do anything for the current active tween. If you have not yet called `Tween.to` or `Tween.from` at least once then this method will do nothing, as there are no tweens to set repeatDelay on. If you have child tweens and pass -1 as the index value it sets the repeatDelay across all of them.

func (*Tween) YoyoDelay1O

func (self *Tween) YoyoDelay1O(duration int, index int) *Tween

YoyoDelay1O Sets the delay in milliseconds before this tween will run a yoyo (only applies if yoyo is enabled). The repeatDelay is invoked as soon as you call `Tween.start`. If the tween is already running this method doesn't do anything for the current active tween. If you have not yet called `Tween.to` or `Tween.from` at least once then this method will do nothing, as there are no tweens to set repeatDelay on. If you have child tweens and pass -1 as the index value it sets the repeatDelay across all of them.

func (*Tween) YoyoDelayI

func (self *Tween) YoyoDelayI(args ...interface{}) *Tween

YoyoDelayI Sets the delay in milliseconds before this tween will run a yoyo (only applies if yoyo is enabled). The repeatDelay is invoked as soon as you call `Tween.start`. If the tween is already running this method doesn't do anything for the current active tween. If you have not yet called `Tween.to` or `Tween.from` at least once then this method will do nothing, as there are no tweens to set repeatDelay on. If you have child tweens and pass -1 as the index value it sets the repeatDelay across all of them.

func (*Tween) YoyoI

func (self *Tween) YoyoI(args ...interface{}) *Tween

YoyoI A Tween that has yoyo set to true will run through from its starting values to its end values and then play back in reverse from end to start. Used in combination with repeat you can create endless loops. If you have not yet called `Tween.to` or `Tween.from` at least once then this method will do nothing, as there are no tweens to yoyo. If you have child tweens and pass -1 as the index value it sets the yoyo property across all of them. If you wish to yoyo this Tween and all of its children then see Tween.yoyoAll.

type TweenData

type TweenData struct {
	*js.Object
}

TweenData A Phaser.Tween contains at least one TweenData object. It contains all of the tween data values, such as the starting and ending values, the ease function, interpolation and duration. The Tween acts as a timeline manager for TweenData objects and can contain multiple TweenData objects.

func NewTweenData

func NewTweenData(parent *Tween) *TweenData

NewTweenData A Phaser.Tween contains at least one TweenData object. It contains all of the tween data values, such as the starting and ending values, the ease function, interpolation and duration. The Tween acts as a timeline manager for TweenData objects and can contain multiple TweenData objects.

func NewTweenDataI

func NewTweenDataI(args ...interface{}) *TweenData

NewTweenDataI A Phaser.Tween contains at least one TweenData object. It contains all of the tween data values, such as the starting and ending values, the ease function, interpolation and duration. The Tween acts as a timeline manager for TweenData objects and can contain multiple TweenData objects.

func ToTweenData

func ToTweenData(jsStruct interface{}) *TweenData

TweenData Binding conversion method to TweenData point

func (*TweenData) COMPLETE

func (self *TweenData) COMPLETE() int

COMPLETE empty description

func (*TweenData) Delay

func (self *TweenData) Delay() int

Delay The amount to delay by until the Tween starts (in ms). Only applies to the start, use repeatDelay to handle repeats.

func (*TweenData) Dt

func (self *TweenData) Dt() int

Dt Current time value.

func (*TweenData) Duration

func (self *TweenData) Duration() int

Duration The duration of the tween in ms.

func (*TweenData) EasingFunction

func (self *TweenData) EasingFunction() interface{}

EasingFunction The easing function used for the Tween.

func (*TweenData) From

func (self *TweenData) From(properties interface{}) *TweenData

From Sets this tween to be a `from` tween on the properties given. A `from` tween sets the target to the destination value and tweens to its current value. For example a Sprite with an `x` coordinate of 100 tweened from `x` 500 would be set to `x` 500 and then tweened to `x` 100 by giving a properties object of `{ x: 500 }`.

func (*TweenData) From1O

func (self *TweenData) From1O(properties interface{}, duration int) *TweenData

From1O Sets this tween to be a `from` tween on the properties given. A `from` tween sets the target to the destination value and tweens to its current value. For example a Sprite with an `x` coordinate of 100 tweened from `x` 500 would be set to `x` 500 and then tweened to `x` 100 by giving a properties object of `{ x: 500 }`.

func (*TweenData) From2O

func (self *TweenData) From2O(properties interface{}, duration int, ease interface{}) *TweenData

From2O Sets this tween to be a `from` tween on the properties given. A `from` tween sets the target to the destination value and tweens to its current value. For example a Sprite with an `x` coordinate of 100 tweened from `x` 500 would be set to `x` 500 and then tweened to `x` 100 by giving a properties object of `{ x: 500 }`.

func (*TweenData) From3O

func (self *TweenData) From3O(properties interface{}, duration int, ease interface{}, delay int) *TweenData

From3O Sets this tween to be a `from` tween on the properties given. A `from` tween sets the target to the destination value and tweens to its current value. For example a Sprite with an `x` coordinate of 100 tweened from `x` 500 would be set to `x` 500 and then tweened to `x` 100 by giving a properties object of `{ x: 500 }`.

func (*TweenData) From4O

func (self *TweenData) From4O(properties interface{}, duration int, ease interface{}, delay int, repeat int) *TweenData

From4O Sets this tween to be a `from` tween on the properties given. A `from` tween sets the target to the destination value and tweens to its current value. For example a Sprite with an `x` coordinate of 100 tweened from `x` 500 would be set to `x` 500 and then tweened to `x` 100 by giving a properties object of `{ x: 500 }`.

func (*TweenData) From5O

func (self *TweenData) From5O(properties interface{}, duration int, ease interface{}, delay int, repeat int, yoyo bool) *TweenData

From5O Sets this tween to be a `from` tween on the properties given. A `from` tween sets the target to the destination value and tweens to its current value. For example a Sprite with an `x` coordinate of 100 tweened from `x` 500 would be set to `x` 500 and then tweened to `x` 100 by giving a properties object of `{ x: 500 }`.

func (*TweenData) FromI

func (self *TweenData) FromI(args ...interface{}) *TweenData

FromI Sets this tween to be a `from` tween on the properties given. A `from` tween sets the target to the destination value and tweens to its current value. For example a Sprite with an `x` coordinate of 100 tweened from `x` 500 would be set to `x` 500 and then tweened to `x` 100 by giving a properties object of `{ x: 500 }`.

func (*TweenData) Game

func (self *TweenData) Game() *Game

Game A reference to the currently running Game.

func (*TweenData) GenerateData

func (self *TweenData) GenerateData() []interface{}

GenerateData This will generate an array populated with the tweened object values from start to end. It works by running the tween simulation at the given frame rate based on the values set-up in Tween.to and Tween.from. Just one play through of the tween data is returned, including yoyo if set.

func (*TweenData) GenerateData1O

func (self *TweenData) GenerateData1O(frameRate int) []interface{}

GenerateData1O This will generate an array populated with the tweened object values from start to end. It works by running the tween simulation at the given frame rate based on the values set-up in Tween.to and Tween.from. Just one play through of the tween data is returned, including yoyo if set.

func (*TweenData) GenerateDataI

func (self *TweenData) GenerateDataI(args ...interface{}) []interface{}

GenerateDataI This will generate an array populated with the tweened object values from start to end. It works by running the tween simulation at the given frame rate based on the values set-up in Tween.to and Tween.from. Just one play through of the tween data is returned, including yoyo if set.

func (*TweenData) InReverse

func (self *TweenData) InReverse() bool

InReverse When a Tween is yoyoing this value holds if it's currently playing forwards (false) or in reverse (true).

func (*TweenData) Interpolate

func (self *TweenData) Interpolate() bool

Interpolate True if the Tween will use interpolation (i.e. is an Array to Array tween)

func (*TweenData) InterpolationContext

func (self *TweenData) InterpolationContext() interface{}

InterpolationContext The interpolation function context used for the Tween.

func (*TweenData) InterpolationFunction

func (self *TweenData) InterpolationFunction() interface{}

InterpolationFunction The interpolation function used for the Tween.

func (*TweenData) IsFrom

func (self *TweenData) IsFrom() bool

IsFrom Is this a from tween or a to tween?

func (*TweenData) IsRunning

func (self *TweenData) IsRunning() bool

IsRunning If the tween is running this is set to `true`. Unless Phaser.Tween a TweenData that is waiting for a delay to expire is *not* considered as running.

func (*TweenData) LOOPED

func (self *TweenData) LOOPED() int

LOOPED empty description

func (*TweenData) LoadValues

func (self *TweenData) LoadValues() *TweenData

LoadValues Loads the values from the target object into this Tween.

func (*TweenData) LoadValuesI

func (self *TweenData) LoadValuesI(args ...interface{}) *TweenData

LoadValuesI Loads the values from the target object into this Tween.

func (*TweenData) PENDING

func (self *TweenData) PENDING() int

PENDING empty description

func (*TweenData) Parent

func (self *TweenData) Parent() *Tween

Parent The Tween which owns this TweenData.

func (*TweenData) Percent

func (self *TweenData) Percent() int

Percent A value between 0 and 1 that represents how far through the duration this tween is.

func (*TweenData) RUNNING

func (self *TweenData) RUNNING() int

RUNNING empty description

func (*TweenData) Repeat

func (self *TweenData) Repeat() int

Repeat Checks if this Tween is meant to repeat or yoyo and handles doing so.

func (*TweenData) RepeatCounter

func (self *TweenData) RepeatCounter() int

RepeatCounter If the Tween is set to repeat this contains the current repeat count.

func (*TweenData) RepeatDelay

func (self *TweenData) RepeatDelay() int

RepeatDelay The amount of time in ms between repeats of this tween.

func (*TweenData) RepeatI

func (self *TweenData) RepeatI(args ...interface{}) int

RepeatI Checks if this Tween is meant to repeat or yoyo and handles doing so.

func (*TweenData) RepeatTotal

func (self *TweenData) RepeatTotal() int

RepeatTotal The total number of times this Tween will repeat.

func (*TweenData) SetCOMPLETEA

func (self *TweenData) SetCOMPLETEA(member int)

SetCOMPLETEA empty description

func (*TweenData) SetDelayA

func (self *TweenData) SetDelayA(member int)

SetDelayA The amount to delay by until the Tween starts (in ms). Only applies to the start, use repeatDelay to handle repeats.

func (*TweenData) SetDtA

func (self *TweenData) SetDtA(member int)

SetDtA Current time value.

func (*TweenData) SetDurationA

func (self *TweenData) SetDurationA(member int)

SetDurationA The duration of the tween in ms.

func (*TweenData) SetEasingFunctionA

func (self *TweenData) SetEasingFunctionA(member interface{})

SetEasingFunctionA The easing function used for the Tween.

func (*TweenData) SetGameA

func (self *TweenData) SetGameA(member *Game)

SetGameA A reference to the currently running Game.

func (*TweenData) SetInReverseA

func (self *TweenData) SetInReverseA(member bool)

SetInReverseA When a Tween is yoyoing this value holds if it's currently playing forwards (false) or in reverse (true).

func (*TweenData) SetInterpolateA

func (self *TweenData) SetInterpolateA(member bool)

SetInterpolateA True if the Tween will use interpolation (i.e. is an Array to Array tween)

func (*TweenData) SetInterpolationContextA

func (self *TweenData) SetInterpolationContextA(member interface{})

SetInterpolationContextA The interpolation function context used for the Tween.

func (*TweenData) SetInterpolationFunctionA

func (self *TweenData) SetInterpolationFunctionA(member interface{})

SetInterpolationFunctionA The interpolation function used for the Tween.

func (*TweenData) SetIsFromA

func (self *TweenData) SetIsFromA(member bool)

SetIsFromA Is this a from tween or a to tween?

func (*TweenData) SetIsRunningA

func (self *TweenData) SetIsRunningA(member bool)

SetIsRunningA If the tween is running this is set to `true`. Unless Phaser.Tween a TweenData that is waiting for a delay to expire is *not* considered as running.

func (*TweenData) SetLOOPEDA

func (self *TweenData) SetLOOPEDA(member int)

SetLOOPEDA empty description

func (*TweenData) SetPENDINGA

func (self *TweenData) SetPENDINGA(member int)

SetPENDINGA empty description

func (*TweenData) SetParentA

func (self *TweenData) SetParentA(member *Tween)

SetParentA The Tween which owns this TweenData.

func (*TweenData) SetPercentA

func (self *TweenData) SetPercentA(member int)

SetPercentA A value between 0 and 1 that represents how far through the duration this tween is.

func (*TweenData) SetRUNNINGA

func (self *TweenData) SetRUNNINGA(member int)

SetRUNNINGA empty description

func (*TweenData) SetRepeatCounterA

func (self *TweenData) SetRepeatCounterA(member int)

SetRepeatCounterA If the Tween is set to repeat this contains the current repeat count.

func (*TweenData) SetRepeatDelayA

func (self *TweenData) SetRepeatDelayA(member int)

SetRepeatDelayA The amount of time in ms between repeats of this tween.

func (*TweenData) SetRepeatTotalA

func (self *TweenData) SetRepeatTotalA(member int)

SetRepeatTotalA The total number of times this Tween will repeat.

func (*TweenData) SetStartTimeA

func (self *TweenData) SetStartTimeA(member int)

SetStartTimeA The time the Tween started or null if it hasn't yet started.

func (*TweenData) SetValueA

func (self *TweenData) SetValueA(member int)

SetValueA The current calculated value.

func (*TweenData) SetYoyoA

func (self *TweenData) SetYoyoA(member bool)

SetYoyoA True if the Tween is set to yoyo, otherwise false.

func (*TweenData) SetYoyoDelayA

func (self *TweenData) SetYoyoDelayA(member int)

SetYoyoDelayA The amount of time in ms between yoyos of this tween.

func (*TweenData) Start

func (self *TweenData) Start() *TweenData

Start Starts the Tween running.

func (*TweenData) StartI

func (self *TweenData) StartI(args ...interface{}) *TweenData

StartI Starts the Tween running.

func (*TweenData) StartTime

func (self *TweenData) StartTime() int

StartTime The time the Tween started or null if it hasn't yet started.

func (*TweenData) To

func (self *TweenData) To(properties interface{}) *TweenData

To Sets this tween to be a `to` tween on the properties given. A `to` tween starts at the current value and tweens to the destination value given. For example a Sprite with an `x` coordinate of 100 could be tweened to `x` 200 by giving a properties object of `{ x: 200 }`.

func (*TweenData) To1O

func (self *TweenData) To1O(properties interface{}, duration int) *TweenData

To1O Sets this tween to be a `to` tween on the properties given. A `to` tween starts at the current value and tweens to the destination value given. For example a Sprite with an `x` coordinate of 100 could be tweened to `x` 200 by giving a properties object of `{ x: 200 }`.

func (*TweenData) To2O

func (self *TweenData) To2O(properties interface{}, duration int, ease interface{}) *TweenData

To2O Sets this tween to be a `to` tween on the properties given. A `to` tween starts at the current value and tweens to the destination value given. For example a Sprite with an `x` coordinate of 100 could be tweened to `x` 200 by giving a properties object of `{ x: 200 }`.

func (*TweenData) To3O

func (self *TweenData) To3O(properties interface{}, duration int, ease interface{}, delay int) *TweenData

To3O Sets this tween to be a `to` tween on the properties given. A `to` tween starts at the current value and tweens to the destination value given. For example a Sprite with an `x` coordinate of 100 could be tweened to `x` 200 by giving a properties object of `{ x: 200 }`.

func (*TweenData) To4O

func (self *TweenData) To4O(properties interface{}, duration int, ease interface{}, delay int, repeat int) *TweenData

To4O Sets this tween to be a `to` tween on the properties given. A `to` tween starts at the current value and tweens to the destination value given. For example a Sprite with an `x` coordinate of 100 could be tweened to `x` 200 by giving a properties object of `{ x: 200 }`.

func (*TweenData) To5O

func (self *TweenData) To5O(properties interface{}, duration int, ease interface{}, delay int, repeat int, yoyo bool) *TweenData

To5O Sets this tween to be a `to` tween on the properties given. A `to` tween starts at the current value and tweens to the destination value given. For example a Sprite with an `x` coordinate of 100 could be tweened to `x` 200 by giving a properties object of `{ x: 200 }`.

func (*TweenData) ToI

func (self *TweenData) ToI(args ...interface{}) *TweenData

ToI Sets this tween to be a `to` tween on the properties given. A `to` tween starts at the current value and tweens to the destination value given. For example a Sprite with an `x` coordinate of 100 could be tweened to `x` 200 by giving a properties object of `{ x: 200 }`.

func (*TweenData) Update

func (self *TweenData) Update(time int) int

Update Updates this Tween. This is called automatically by Phaser.Tween.

func (*TweenData) UpdateI

func (self *TweenData) UpdateI(args ...interface{}) int

UpdateI Updates this Tween. This is called automatically by Phaser.Tween.

func (*TweenData) Value

func (self *TweenData) Value() int

Value The current calculated value.

func (*TweenData) Yoyo

func (self *TweenData) Yoyo() bool

Yoyo True if the Tween is set to yoyo, otherwise false.

func (*TweenData) YoyoDelay

func (self *TweenData) YoyoDelay() int

YoyoDelay The amount of time in ms between yoyos of this tween.

type TweenManager

type TweenManager struct {
	*js.Object
}

TweenManager Phaser.Game has a single instance of the TweenManager through which all Tween objects are created and updated. Tweens are hooked into the game clock and pause system, adjusting based on the game state.

TweenManager is based heavily on tween.js by http://soledadpenades.com. The difference being that tweens belong to a games instance of TweenManager, rather than to a global TWEEN object. It also has callbacks swapped for Signals and a few issues patched with regard to properties and completion errors. Please see https://github.com/sole/tween.js for a full list of contributors.

func NewTweenManager

func NewTweenManager(game *Game) *TweenManager

NewTweenManager Phaser.Game has a single instance of the TweenManager through which all Tween objects are created and updated. Tweens are hooked into the game clock and pause system, adjusting based on the game state.

TweenManager is based heavily on tween.js by http://soledadpenades.com. The difference being that tweens belong to a games instance of TweenManager, rather than to a global TWEEN object. It also has callbacks swapped for Signals and a few issues patched with regard to properties and completion errors. Please see https://github.com/sole/tween.js for a full list of contributors.

func NewTweenManagerI

func NewTweenManagerI(args ...interface{}) *TweenManager

NewTweenManagerI Phaser.Game has a single instance of the TweenManager through which all Tween objects are created and updated. Tweens are hooked into the game clock and pause system, adjusting based on the game state.

TweenManager is based heavily on tween.js by http://soledadpenades.com. The difference being that tweens belong to a games instance of TweenManager, rather than to a global TWEEN object. It also has callbacks swapped for Signals and a few issues patched with regard to properties and completion errors. Please see https://github.com/sole/tween.js for a full list of contributors.

func ToTweenManager

func ToTweenManager(jsStruct interface{}) *TweenManager

TweenManager Binding conversion method to TweenManager point

func (*TweenManager) Add

func (self *TweenManager) Add(tween *Tween) *Tween

Add Add a new tween into the TweenManager.

func (*TweenManager) AddI

func (self *TweenManager) AddI(args ...interface{}) *Tween

AddI Add a new tween into the TweenManager.

func (*TweenManager) Create

func (self *TweenManager) Create(object interface{}) *Tween

Create Create a tween object for a specific object. The object can be any JavaScript object or Phaser object such as Sprite.

func (*TweenManager) CreateI

func (self *TweenManager) CreateI(args ...interface{}) *Tween

CreateI Create a tween object for a specific object. The object can be any JavaScript object or Phaser object such as Sprite.

func (*TweenManager) FrameBased

func (self *TweenManager) FrameBased() bool

FrameBased Are all newly created Tweens frame or time based? A frame based tween will use the physics elapsed timer when updating. This means it will retain the same consistent frame rate, regardless of the speed of the device. The duration value given should be given in frames.

If the Tween uses a time based update (which is the default) then the duration is given in milliseconds. In this situation a 2000ms tween will last exactly 2 seconds, regardless of the device and how many visual updates the tween has actually been through. For very short tweens you may wish to experiment with a frame based update instead.

func (*TweenManager) Game

func (self *TweenManager) Game() *Game

Game Local reference to game.

func (*TweenManager) GetAll

func (self *TweenManager) GetAll() []Tween

GetAll Get all the tween objects in an array.

func (*TweenManager) GetAllI

func (self *TweenManager) GetAllI(args ...interface{}) []Tween

GetAllI Get all the tween objects in an array.

func (*TweenManager) IsTweening

func (self *TweenManager) IsTweening(object interface{}) bool

IsTweening Checks to see if a particular Sprite is currently being tweened.

func (*TweenManager) IsTweeningI

func (self *TweenManager) IsTweeningI(args ...interface{}) bool

IsTweeningI Checks to see if a particular Sprite is currently being tweened.

func (*TweenManager) PauseAll

func (self *TweenManager) PauseAll()

PauseAll Pauses all currently running tweens.

func (*TweenManager) PauseAllI

func (self *TweenManager) PauseAllI(args ...interface{})

PauseAllI Pauses all currently running tweens.

func (*TweenManager) Remove

func (self *TweenManager) Remove(tween *Tween)

Remove Remove a tween from this manager.

func (*TweenManager) RemoveAll

func (self *TweenManager) RemoveAll()

RemoveAll Remove all tweens running and in the queue. Doesn't call any of the tween onComplete events.

func (*TweenManager) RemoveAllI

func (self *TweenManager) RemoveAllI(args ...interface{})

RemoveAllI Remove all tweens running and in the queue. Doesn't call any of the tween onComplete events.

func (*TweenManager) RemoveFrom

func (self *TweenManager) RemoveFrom(obj interface{})

RemoveFrom Remove all tweens from a specific object, array of objects or Group.

func (*TweenManager) RemoveFrom1O

func (self *TweenManager) RemoveFrom1O(obj interface{}, children bool)

RemoveFrom1O Remove all tweens from a specific object, array of objects or Group.

func (*TweenManager) RemoveFromI

func (self *TweenManager) RemoveFromI(args ...interface{})

RemoveFromI Remove all tweens from a specific object, array of objects or Group.

func (*TweenManager) RemoveI

func (self *TweenManager) RemoveI(args ...interface{})

RemoveI Remove a tween from this manager.

func (*TweenManager) ResumeAll

func (self *TweenManager) ResumeAll()

ResumeAll Resumes all currently paused tweens.

func (*TweenManager) ResumeAllI

func (self *TweenManager) ResumeAllI(args ...interface{})

ResumeAllI Resumes all currently paused tweens.

func (*TweenManager) SetFrameBasedA

func (self *TweenManager) SetFrameBasedA(member bool)

SetFrameBasedA Are all newly created Tweens frame or time based? A frame based tween will use the physics elapsed timer when updating. This means it will retain the same consistent frame rate, regardless of the speed of the device. The duration value given should be given in frames.

If the Tween uses a time based update (which is the default) then the duration is given in milliseconds. In this situation a 2000ms tween will last exactly 2 seconds, regardless of the device and how many visual updates the tween has actually been through. For very short tweens you may wish to experiment with a frame based update instead.

func (*TweenManager) SetGameA

func (self *TweenManager) SetGameA(member *Game)

SetGameA Local reference to game.

func (*TweenManager) Update

func (self *TweenManager) Update() bool

Update Update all the tween objects you added to this manager.

func (*TweenManager) UpdateI

func (self *TweenManager) UpdateI(args ...interface{}) bool

UpdateI Update all the tween objects you added to this manager.

type Uint16Array

type Uint16Array struct{ *js.Object }

type Uint32Array

type Uint32Array struct{ *js.Object }

type Uint8ClampedArray

type Uint8ClampedArray struct{ *js.Object }

type Utils

type Utils struct {
	*js.Object
}

Utils empty description

func NewUtils

func NewUtils() *Utils

NewUtils empty description

func NewUtilsI

func NewUtilsI(args ...interface{}) *Utils

NewUtilsI empty description

func ToUtils

func ToUtils(jsStruct interface{}) *Utils

Utils Binding conversion method to Utils point

func (*Utils) ChanceRoll

func (self *Utils) ChanceRoll(chance int) bool

ChanceRoll Generate a random bool result based on the chance value.

Returns true or false based on the chance value (default 50%). For example if you wanted a player to have a 30% chance of getting a bonus, call chanceRoll(30) - true means the chance passed, false means it failed.

func (*Utils) ChanceRollI

func (self *Utils) ChanceRollI(args ...interface{}) bool

ChanceRollI Generate a random bool result based on the chance value.

Returns true or false based on the chance value (default 50%). For example if you wanted a player to have a 30% chance of getting a bonus, call chanceRoll(30) - true means the chance passed, false means it failed.

func (*Utils) Extend

func (self *Utils) Extend(deep bool, target interface{}) interface{}

Extend This is a slightly modified version of http://api.jquery.com/jQuery.extend/

func (*Utils) ExtendI

func (self *Utils) ExtendI(args ...interface{}) interface{}

ExtendI This is a slightly modified version of http://api.jquery.com/jQuery.extend/

func (*Utils) GetProperty

func (self *Utils) GetProperty(obj interface{}, prop string) interface{}

GetProperty Gets an objects property by string.

func (*Utils) GetPropertyI

func (self *Utils) GetPropertyI(args ...interface{}) interface{}

GetPropertyI Gets an objects property by string.

func (*Utils) IsPlainObject

func (self *Utils) IsPlainObject(obj interface{}) bool

IsPlainObject This is a slightly modified version of jQuery.isPlainObject. A plain object is an object whose internal class property is [object Object].

func (*Utils) IsPlainObjectI

func (self *Utils) IsPlainObjectI(args ...interface{}) bool

IsPlainObjectI This is a slightly modified version of jQuery.isPlainObject. A plain object is an object whose internal class property is [object Object].

func (*Utils) Mixin

func (self *Utils) Mixin(from interface{}, to interface{}) interface{}

Mixin Mixes the source object into the destination object, returning the newly modified destination object. Based on original code by @mudcube

func (*Utils) MixinI

func (self *Utils) MixinI(args ...interface{}) interface{}

MixinI Mixes the source object into the destination object, returning the newly modified destination object. Based on original code by @mudcube

func (*Utils) MixinPrototype

func (self *Utils) MixinPrototype(target interface{}, mixin interface{})

MixinPrototype Mixes in an existing mixin object with the target.

Values in the mixin that have either `get` or `set` functions are created as properties via `defineProperty` _except_ if they also define a `clone` method - if a clone method is defined that is called instead and the result is assigned directly.

func (*Utils) MixinPrototype1O

func (self *Utils) MixinPrototype1O(target interface{}, mixin interface{}, replace bool)

MixinPrototype1O Mixes in an existing mixin object with the target.

Values in the mixin that have either `get` or `set` functions are created as properties via `defineProperty` _except_ if they also define a `clone` method - if a clone method is defined that is called instead and the result is assigned directly.

func (*Utils) MixinPrototypeI

func (self *Utils) MixinPrototypeI(args ...interface{})

MixinPrototypeI Mixes in an existing mixin object with the target.

Values in the mixin that have either `get` or `set` functions are created as properties via `defineProperty` _except_ if they also define a `clone` method - if a clone method is defined that is called instead and the result is assigned directly.

func (*Utils) Pad

func (self *Utils) Pad(str string) string

Pad Takes the given string and pads it out, to the length required, using the character specified. For example if you need a string to be 6 characters long, you can call:

`pad('bob', 6, '-', 2)`

This would return: `bob---` as it has padded it out to 6 characters, using the `-` on the right.

You can also use it to pad numbers (they are always returned as strings):

`pad(512, 6, '0', 1)`

Would return: `000512` with the string padded to the left.

If you don't specify a direction it'll pad to both sides:

`pad('c64', 7, '*')`

Would return: `**c64**`

func (*Utils) Pad1O

func (self *Utils) Pad1O(str string, len int) string

Pad1O Takes the given string and pads it out, to the length required, using the character specified. For example if you need a string to be 6 characters long, you can call:

`pad('bob', 6, '-', 2)`

This would return: `bob---` as it has padded it out to 6 characters, using the `-` on the right.

You can also use it to pad numbers (they are always returned as strings):

`pad(512, 6, '0', 1)`

Would return: `000512` with the string padded to the left.

If you don't specify a direction it'll pad to both sides:

`pad('c64', 7, '*')`

Would return: `**c64**`

func (*Utils) Pad2O

func (self *Utils) Pad2O(str string, len int, pad string) string

Pad2O Takes the given string and pads it out, to the length required, using the character specified. For example if you need a string to be 6 characters long, you can call:

`pad('bob', 6, '-', 2)`

This would return: `bob---` as it has padded it out to 6 characters, using the `-` on the right.

You can also use it to pad numbers (they are always returned as strings):

`pad(512, 6, '0', 1)`

Would return: `000512` with the string padded to the left.

If you don't specify a direction it'll pad to both sides:

`pad('c64', 7, '*')`

Would return: `**c64**`

func (*Utils) Pad3O

func (self *Utils) Pad3O(str string, len int, pad string, dir int) string

Pad3O Takes the given string and pads it out, to the length required, using the character specified. For example if you need a string to be 6 characters long, you can call:

`pad('bob', 6, '-', 2)`

This would return: `bob---` as it has padded it out to 6 characters, using the `-` on the right.

You can also use it to pad numbers (they are always returned as strings):

`pad(512, 6, '0', 1)`

Would return: `000512` with the string padded to the left.

If you don't specify a direction it'll pad to both sides:

`pad('c64', 7, '*')`

Would return: `**c64**`

func (*Utils) PadI

func (self *Utils) PadI(args ...interface{}) string

PadI Takes the given string and pads it out, to the length required, using the character specified. For example if you need a string to be 6 characters long, you can call:

`pad('bob', 6, '-', 2)`

This would return: `bob---` as it has padded it out to 6 characters, using the `-` on the right.

You can also use it to pad numbers (they are always returned as strings):

`pad(512, 6, '0', 1)`

Would return: `000512` with the string padded to the left.

If you don't specify a direction it'll pad to both sides:

`pad('c64', 7, '*')`

Would return: `**c64**`

func (*Utils) ParseDimension

func (self *Utils) ParseDimension(size interface{}, dimension int) int

ParseDimension Get a unit dimension from a string.

func (*Utils) ParseDimensionI

func (self *Utils) ParseDimensionI(args ...interface{}) int

ParseDimensionI Get a unit dimension from a string.

func (*Utils) RandomChoice

func (self *Utils) RandomChoice(choice1 interface{}, choice2 interface{}) interface{}

RandomChoice Choose between one of two values randomly.

func (*Utils) RandomChoiceI

func (self *Utils) RandomChoiceI(args ...interface{}) interface{}

RandomChoiceI Choose between one of two values randomly.

func (*Utils) ReverseString

func (self *Utils) ReverseString(string string) string

ReverseString Takes the given string and reverses it, returning the reversed string. For example if given the string `Atari 520ST` it would return `TS025 iratA`.

func (*Utils) ReverseStringI

func (self *Utils) ReverseStringI(args ...interface{}) string

ReverseStringI Takes the given string and reverses it, returning the reversed string. For example if given the string `Atari 520ST` it would return `TS025 iratA`.

func (*Utils) SetProperty

func (self *Utils) SetProperty(obj interface{}, prop string) interface{}

SetProperty Sets an objects property by string.

func (*Utils) SetPropertyI

func (self *Utils) SetPropertyI(args ...interface{}) interface{}

SetPropertyI Sets an objects property by string.

type UtilsDebug

type UtilsDebug struct {
	*js.Object
}

UtilsDebug A collection of methods for displaying debug information about game objects.

If your game is running in Canvas mode, then you should invoke all of the Debug methods from your games `render` function. This is because they are drawn directly onto the game canvas itself, so if you call any debug methods outside of `render` they are likely to be overwritten by the game itself.

If your game is running in WebGL then Debug will create a Sprite that is placed at the top of the Stage display list and bind a canvas texture to it, which must be uploaded every frame. Be advised: this is very expensive, especially in browsers like Firefox. So please only enable Debug in WebGL mode if you really need it (or your desktop can cope with it well) and disable it for production!

func NewUtilsDebug

func NewUtilsDebug(game *Game) *UtilsDebug

NewUtilsDebug A collection of methods for displaying debug information about game objects.

If your game is running in Canvas mode, then you should invoke all of the Debug methods from your games `render` function. This is because they are drawn directly onto the game canvas itself, so if you call any debug methods outside of `render` they are likely to be overwritten by the game itself.

If your game is running in WebGL then Debug will create a Sprite that is placed at the top of the Stage display list and bind a canvas texture to it, which must be uploaded every frame. Be advised: this is very expensive, especially in browsers like Firefox. So please only enable Debug in WebGL mode if you really need it (or your desktop can cope with it well) and disable it for production!

func NewUtilsDebugI

func NewUtilsDebugI(args ...interface{}) *UtilsDebug

NewUtilsDebugI A collection of methods for displaying debug information about game objects.

If your game is running in Canvas mode, then you should invoke all of the Debug methods from your games `render` function. This is because they are drawn directly onto the game canvas itself, so if you call any debug methods outside of `render` they are likely to be overwritten by the game itself.

If your game is running in WebGL then Debug will create a Sprite that is placed at the top of the Stage display list and bind a canvas texture to it, which must be uploaded every frame. Be advised: this is very expensive, especially in browsers like Firefox. So please only enable Debug in WebGL mode if you really need it (or your desktop can cope with it well) and disable it for production!

func ToUtilsDebug

func ToUtilsDebug(jsStruct interface{}) *UtilsDebug

UtilsDebug Binding conversion method to UtilsDebug point

func (*UtilsDebug) Bmd

func (self *UtilsDebug) Bmd() *BitmapData

Bmd In WebGL mode this BitmapData contains a copy of the debug canvas.

func (*UtilsDebug) Body

func (self *UtilsDebug) Body(sprite *Sprite)

Body Render a Sprites Physics body if it has one set. The body is rendered as a filled or stroked rectangle. This only works for Arcade Physics, Ninja Physics (AABB and Circle only) and Box2D Physics bodies. To display a P2 Physics body you should enable debug mode on the body when creating it.

func (*UtilsDebug) Body1O

func (self *UtilsDebug) Body1O(sprite *Sprite, color string)

Body1O Render a Sprites Physics body if it has one set. The body is rendered as a filled or stroked rectangle. This only works for Arcade Physics, Ninja Physics (AABB and Circle only) and Box2D Physics bodies. To display a P2 Physics body you should enable debug mode on the body when creating it.

func (*UtilsDebug) Body2O

func (self *UtilsDebug) Body2O(sprite *Sprite, color string, filled bool)

Body2O Render a Sprites Physics body if it has one set. The body is rendered as a filled or stroked rectangle. This only works for Arcade Physics, Ninja Physics (AABB and Circle only) and Box2D Physics bodies. To display a P2 Physics body you should enable debug mode on the body when creating it.

func (*UtilsDebug) BodyI

func (self *UtilsDebug) BodyI(args ...interface{})

BodyI Render a Sprites Physics body if it has one set. The body is rendered as a filled or stroked rectangle. This only works for Arcade Physics, Ninja Physics (AABB and Circle only) and Box2D Physics bodies. To display a P2 Physics body you should enable debug mode on the body when creating it.

func (*UtilsDebug) BodyInfo

func (self *UtilsDebug) BodyInfo(sprite *Sprite, x int, y int)

BodyInfo Render a Sprites Physic Body information.

func (*UtilsDebug) BodyInfo1O

func (self *UtilsDebug) BodyInfo1O(sprite *Sprite, x int, y int, color string)

BodyInfo1O Render a Sprites Physic Body information.

func (*UtilsDebug) BodyInfoI

func (self *UtilsDebug) BodyInfoI(args ...interface{})

BodyInfoI Render a Sprites Physic Body information.

func (*UtilsDebug) Boot

func (self *UtilsDebug) Boot()

Boot Internal method that boots the debug displayer.

func (*UtilsDebug) BootI

func (self *UtilsDebug) BootI(args ...interface{})

BootI Internal method that boots the debug displayer.

func (*UtilsDebug) Box2dBody

func (self *UtilsDebug) Box2dBody(sprite *Sprite)

Box2dBody Renders 'debug draw' data for the given Box2D body. This uses the standard debug drawing feature of Box2D, so colors will be decided by the Box2D engine.

func (*UtilsDebug) Box2dBody1O

func (self *UtilsDebug) Box2dBody1O(sprite *Sprite, color string)

Box2dBody1O Renders 'debug draw' data for the given Box2D body. This uses the standard debug drawing feature of Box2D, so colors will be decided by the Box2D engine.

func (*UtilsDebug) Box2dBodyI

func (self *UtilsDebug) Box2dBodyI(args ...interface{})

Box2dBodyI Renders 'debug draw' data for the given Box2D body. This uses the standard debug drawing feature of Box2D, so colors will be decided by the Box2D engine.

func (*UtilsDebug) Box2dWorld

func (self *UtilsDebug) Box2dWorld()

Box2dWorld Renders 'debug draw' data for the Box2D world if it exists. This uses the standard debug drawing feature of Box2D, so colors will be decided by the Box2D engine.

func (*UtilsDebug) Box2dWorldI

func (self *UtilsDebug) Box2dWorldI(args ...interface{})

Box2dWorldI Renders 'debug draw' data for the Box2D world if it exists. This uses the standard debug drawing feature of Box2D, so colors will be decided by the Box2D engine.

func (*UtilsDebug) CameraInfo

func (self *UtilsDebug) CameraInfo(camera *Camera, x int, y int)

CameraInfo Render camera information including dimensions and location.

func (*UtilsDebug) CameraInfo1O

func (self *UtilsDebug) CameraInfo1O(camera *Camera, x int, y int, color string)

CameraInfo1O Render camera information including dimensions and location.

func (*UtilsDebug) CameraInfoI

func (self *UtilsDebug) CameraInfoI(args ...interface{})

CameraInfoI Render camera information including dimensions and location.

func (*UtilsDebug) Canvas

func (self *UtilsDebug) Canvas() dom.HTMLCanvasElement

Canvas The canvas to which Debug calls draws.

func (*UtilsDebug) ColumnWidth

func (self *UtilsDebug) ColumnWidth() int

ColumnWidth The spacing between columns.

func (*UtilsDebug) Context

func (self *UtilsDebug) Context() dom.CanvasRenderingContext2D

Context The 2d context of the canvas.

func (*UtilsDebug) CurrentAlpha

func (self *UtilsDebug) CurrentAlpha() int

CurrentAlpha The alpha of the Debug context, set before all debug information is rendered to it.

func (*UtilsDebug) CurrentX

func (self *UtilsDebug) CurrentX() int

CurrentX The current X position the debug information will be rendered at.

func (*UtilsDebug) CurrentY

func (self *UtilsDebug) CurrentY() int

CurrentY The current Y position the debug information will be rendered at.

func (*UtilsDebug) Destroy

func (self *UtilsDebug) Destroy()

Destroy Destroy this object.

func (*UtilsDebug) DestroyI

func (self *UtilsDebug) DestroyI(args ...interface{})

DestroyI Destroy this object.

func (*UtilsDebug) Dirty

func (self *UtilsDebug) Dirty() bool

Dirty Does the canvas need re-rendering?

func (*UtilsDebug) Font

func (self *UtilsDebug) Font() string

Font The font that the debug information is rendered in.

func (*UtilsDebug) Game

func (self *UtilsDebug) Game() *Game

Game A reference to the currently running Game.

func (*UtilsDebug) Geom

func (self *UtilsDebug) Geom(object interface{})

Geom Renders a Phaser geometry object including Rectangle, Circle, Point or Line.

func (*UtilsDebug) Geom1O

func (self *UtilsDebug) Geom1O(object interface{}, color string)

Geom1O Renders a Phaser geometry object including Rectangle, Circle, Point or Line.

func (*UtilsDebug) Geom2O

func (self *UtilsDebug) Geom2O(object interface{}, color string, filled bool)

Geom2O Renders a Phaser geometry object including Rectangle, Circle, Point or Line.

func (*UtilsDebug) Geom3O

func (self *UtilsDebug) Geom3O(object interface{}, color string, filled bool, forceType int)

Geom3O Renders a Phaser geometry object including Rectangle, Circle, Point or Line.

func (*UtilsDebug) GeomI

func (self *UtilsDebug) GeomI(args ...interface{})

GeomI Renders a Phaser geometry object including Rectangle, Circle, Point or Line.

func (*UtilsDebug) InputInfo

func (self *UtilsDebug) InputInfo(x int, y int)

InputInfo Render debug information about the Input object.

func (*UtilsDebug) InputInfo1O

func (self *UtilsDebug) InputInfo1O(x int, y int, color string)

InputInfo1O Render debug information about the Input object.

func (*UtilsDebug) InputInfoI

func (self *UtilsDebug) InputInfoI(args ...interface{})

InputInfoI Render debug information about the Input object.

func (*UtilsDebug) Key

func (self *UtilsDebug) Key(key *Key, x int, y int)

Key Renders Phaser.Key object information.

func (*UtilsDebug) Key1O

func (self *UtilsDebug) Key1O(key *Key, x int, y int, color string)

Key1O Renders Phaser.Key object information.

func (*UtilsDebug) KeyI

func (self *UtilsDebug) KeyI(args ...interface{})

KeyI Renders Phaser.Key object information.

func (*UtilsDebug) Line

func (self *UtilsDebug) Line()

Line Internal method that outputs a single line of text split over as many columns as needed, one per parameter.

func (*UtilsDebug) LineHeight

func (self *UtilsDebug) LineHeight() int

LineHeight The line height between the debug text.

func (*UtilsDebug) LineI

func (self *UtilsDebug) LineI(args ...interface{})

LineI Internal method that outputs a single line of text split over as many columns as needed, one per parameter.

func (*UtilsDebug) LineInfo

func (self *UtilsDebug) LineInfo(line *Line, x int, y int)

LineInfo Renders Line information in the given color.

func (*UtilsDebug) LineInfo1O

func (self *UtilsDebug) LineInfo1O(line *Line, x int, y int, color string)

LineInfo1O Renders Line information in the given color.

func (*UtilsDebug) LineInfoI

func (self *UtilsDebug) LineInfoI(args ...interface{})

LineInfoI Renders Line information in the given color.

func (*UtilsDebug) Pixel

func (self *UtilsDebug) Pixel(x int, y int)

Pixel Renders a single pixel at the given size.

func (*UtilsDebug) Pixel1O

func (self *UtilsDebug) Pixel1O(x int, y int, color string)

Pixel1O Renders a single pixel at the given size.

func (*UtilsDebug) Pixel2O

func (self *UtilsDebug) Pixel2O(x int, y int, color string, size int)

Pixel2O Renders a single pixel at the given size.

func (*UtilsDebug) PixelI

func (self *UtilsDebug) PixelI(args ...interface{})

PixelI Renders a single pixel at the given size.

func (*UtilsDebug) Pointer

func (self *UtilsDebug) Pointer(pointer *Pointer)

Pointer Renders the Pointer.circle object onto the stage in green if down or red if up along with debug text.

func (*UtilsDebug) Pointer1O

func (self *UtilsDebug) Pointer1O(pointer *Pointer, hideIfUp bool)

Pointer1O Renders the Pointer.circle object onto the stage in green if down or red if up along with debug text.

func (*UtilsDebug) Pointer2O

func (self *UtilsDebug) Pointer2O(pointer *Pointer, hideIfUp bool, downColor string)

Pointer2O Renders the Pointer.circle object onto the stage in green if down or red if up along with debug text.

func (*UtilsDebug) Pointer3O

func (self *UtilsDebug) Pointer3O(pointer *Pointer, hideIfUp bool, downColor string, upColor string)

Pointer3O Renders the Pointer.circle object onto the stage in green if down or red if up along with debug text.

func (*UtilsDebug) Pointer4O

func (self *UtilsDebug) Pointer4O(pointer *Pointer, hideIfUp bool, downColor string, upColor string, color string)

Pointer4O Renders the Pointer.circle object onto the stage in green if down or red if up along with debug text.

func (*UtilsDebug) PointerI

func (self *UtilsDebug) PointerI(args ...interface{})

PointerI Renders the Pointer.circle object onto the stage in green if down or red if up along with debug text.

func (*UtilsDebug) PreUpdate

func (self *UtilsDebug) PreUpdate()

PreUpdate Internal method that clears the canvas (if a Sprite) ready for a new debug session.

func (*UtilsDebug) PreUpdateI

func (self *UtilsDebug) PreUpdateI(args ...interface{})

PreUpdateI Internal method that clears the canvas (if a Sprite) ready for a new debug session.

func (*UtilsDebug) QuadTree

func (self *UtilsDebug) QuadTree(quadtree *QuadTree, color string)

QuadTree Visually renders a QuadTree to the display.

func (*UtilsDebug) QuadTreeI

func (self *UtilsDebug) QuadTreeI(args ...interface{})

QuadTreeI Visually renders a QuadTree to the display.

func (*UtilsDebug) RenderShadow

func (self *UtilsDebug) RenderShadow() bool

RenderShadow Should the text be rendered with a slight shadow? Makes it easier to read on different types of background.

func (*UtilsDebug) Reset

func (self *UtilsDebug) Reset()

Reset Clears the Debug canvas.

func (*UtilsDebug) ResetI

func (self *UtilsDebug) ResetI(args ...interface{})

ResetI Clears the Debug canvas.

func (*UtilsDebug) Resize

func (self *UtilsDebug) Resize(scaleManager *ScaleManager, width int, height int)

Resize Internal method that resizes the BitmapData and Canvas. Called by ScaleManager.onSizeChange only in WebGL mode.

func (*UtilsDebug) ResizeI

func (self *UtilsDebug) ResizeI(args ...interface{})

ResizeI Internal method that resizes the BitmapData and Canvas. Called by ScaleManager.onSizeChange only in WebGL mode.

func (*UtilsDebug) RopeSegments

func (self *UtilsDebug) RopeSegments(rope *Rope)

RopeSegments Renders the Rope's segments. Note: This is really expensive as it has to calculate new segments every time you call it

func (*UtilsDebug) RopeSegments1O

func (self *UtilsDebug) RopeSegments1O(rope *Rope, color string)

RopeSegments1O Renders the Rope's segments. Note: This is really expensive as it has to calculate new segments every time you call it

func (*UtilsDebug) RopeSegments2O

func (self *UtilsDebug) RopeSegments2O(rope *Rope, color string, filled bool)

RopeSegments2O Renders the Rope's segments. Note: This is really expensive as it has to calculate new segments every time you call it

func (*UtilsDebug) RopeSegmentsI

func (self *UtilsDebug) RopeSegmentsI(args ...interface{})

RopeSegmentsI Renders the Rope's segments. Note: This is really expensive as it has to calculate new segments every time you call it

func (*UtilsDebug) SetBmdA

func (self *UtilsDebug) SetBmdA(member *BitmapData)

SetBmdA In WebGL mode this BitmapData contains a copy of the debug canvas.

func (*UtilsDebug) SetCanvasA

func (self *UtilsDebug) SetCanvasA(member dom.HTMLCanvasElement)

SetCanvasA The canvas to which Debug calls draws.

func (*UtilsDebug) SetColumnWidthA

func (self *UtilsDebug) SetColumnWidthA(member int)

SetColumnWidthA The spacing between columns.

func (*UtilsDebug) SetContextA

func (self *UtilsDebug) SetContextA(member dom.CanvasRenderingContext2D)

SetContextA The 2d context of the canvas.

func (*UtilsDebug) SetCurrentAlphaA

func (self *UtilsDebug) SetCurrentAlphaA(member int)

SetCurrentAlphaA The alpha of the Debug context, set before all debug information is rendered to it.

func (*UtilsDebug) SetCurrentXA

func (self *UtilsDebug) SetCurrentXA(member int)

SetCurrentXA The current X position the debug information will be rendered at.

func (*UtilsDebug) SetCurrentYA

func (self *UtilsDebug) SetCurrentYA(member int)

SetCurrentYA The current Y position the debug information will be rendered at.

func (*UtilsDebug) SetDirtyA

func (self *UtilsDebug) SetDirtyA(member bool)

SetDirtyA Does the canvas need re-rendering?

func (*UtilsDebug) SetFontA

func (self *UtilsDebug) SetFontA(member string)

SetFontA The font that the debug information is rendered in.

func (*UtilsDebug) SetGameA

func (self *UtilsDebug) SetGameA(member *Game)

SetGameA A reference to the currently running Game.

func (*UtilsDebug) SetLineHeightA

func (self *UtilsDebug) SetLineHeightA(member int)

SetLineHeightA The line height between the debug text.

func (*UtilsDebug) SetRenderShadowA

func (self *UtilsDebug) SetRenderShadowA(member bool)

SetRenderShadowA Should the text be rendered with a slight shadow? Makes it easier to read on different types of background.

func (*UtilsDebug) SetSpriteA

func (self *UtilsDebug) SetSpriteA(member *Image)

SetSpriteA If debugging in WebGL mode we need this.

func (*UtilsDebug) SoundInfo

func (self *UtilsDebug) SoundInfo(sound *Sound, x int, y int)

SoundInfo Render Sound information, including decoded state, duration, volume and more.

func (*UtilsDebug) SoundInfo1O

func (self *UtilsDebug) SoundInfo1O(sound *Sound, x int, y int, color string)

SoundInfo1O Render Sound information, including decoded state, duration, volume and more.

func (*UtilsDebug) SoundInfoI

func (self *UtilsDebug) SoundInfoI(args ...interface{})

SoundInfoI Render Sound information, including decoded state, duration, volume and more.

func (*UtilsDebug) Sprite

func (self *UtilsDebug) Sprite() *Image

Sprite If debugging in WebGL mode we need this.

func (*UtilsDebug) SpriteBounds

func (self *UtilsDebug) SpriteBounds(sprite interface{})

SpriteBounds Renders the Sprites bounds. Note: This is really expensive as it has to calculate the bounds every time you call it!

func (*UtilsDebug) SpriteBounds1O

func (self *UtilsDebug) SpriteBounds1O(sprite interface{}, color string)

SpriteBounds1O Renders the Sprites bounds. Note: This is really expensive as it has to calculate the bounds every time you call it!

func (*UtilsDebug) SpriteBounds2O

func (self *UtilsDebug) SpriteBounds2O(sprite interface{}, color string, filled bool)

SpriteBounds2O Renders the Sprites bounds. Note: This is really expensive as it has to calculate the bounds every time you call it!

func (*UtilsDebug) SpriteBoundsI

func (self *UtilsDebug) SpriteBoundsI(args ...interface{})

SpriteBoundsI Renders the Sprites bounds. Note: This is really expensive as it has to calculate the bounds every time you call it!

func (*UtilsDebug) SpriteCoords

func (self *UtilsDebug) SpriteCoords(sprite interface{}, x int, y int)

SpriteCoords Renders the sprite coordinates in local, positional and world space.

func (*UtilsDebug) SpriteCoords1O

func (self *UtilsDebug) SpriteCoords1O(sprite interface{}, x int, y int, color string)

SpriteCoords1O Renders the sprite coordinates in local, positional and world space.

func (*UtilsDebug) SpriteCoordsI

func (self *UtilsDebug) SpriteCoordsI(args ...interface{})

SpriteCoordsI Renders the sprite coordinates in local, positional and world space.

func (*UtilsDebug) SpriteInfo

func (self *UtilsDebug) SpriteInfo(sprite *Sprite, x int, y int)

SpriteInfo Render debug infos (including name, bounds info, position and some other properties) about the Sprite.

func (*UtilsDebug) SpriteInfo1O

func (self *UtilsDebug) SpriteInfo1O(sprite *Sprite, x int, y int, color string)

SpriteInfo1O Render debug infos (including name, bounds info, position and some other properties) about the Sprite.

func (*UtilsDebug) SpriteInfoI

func (self *UtilsDebug) SpriteInfoI(args ...interface{})

SpriteInfoI Render debug infos (including name, bounds info, position and some other properties) about the Sprite.

func (*UtilsDebug) SpriteInputInfo

func (self *UtilsDebug) SpriteInputInfo(sprite interface{}, x int, y int)

SpriteInputInfo Render Sprite Input Debug information.

func (*UtilsDebug) SpriteInputInfo1O

func (self *UtilsDebug) SpriteInputInfo1O(sprite interface{}, x int, y int, color string)

SpriteInputInfo1O Render Sprite Input Debug information.

func (*UtilsDebug) SpriteInputInfoI

func (self *UtilsDebug) SpriteInputInfoI(args ...interface{})

SpriteInputInfoI Render Sprite Input Debug information.

func (*UtilsDebug) Start

func (self *UtilsDebug) Start()

Start Internal method that resets and starts the debug output values.

func (*UtilsDebug) Start1O

func (self *UtilsDebug) Start1O(x int)

Start1O Internal method that resets and starts the debug output values.

func (*UtilsDebug) Start2O

func (self *UtilsDebug) Start2O(x int, y int)

Start2O Internal method that resets and starts the debug output values.

func (*UtilsDebug) Start3O

func (self *UtilsDebug) Start3O(x int, y int, color string)

Start3O Internal method that resets and starts the debug output values.

func (*UtilsDebug) Start4O

func (self *UtilsDebug) Start4O(x int, y int, color string, columnWidth int)

Start4O Internal method that resets and starts the debug output values.

func (*UtilsDebug) StartI

func (self *UtilsDebug) StartI(args ...interface{})

StartI Internal method that resets and starts the debug output values.

func (*UtilsDebug) Stop

func (self *UtilsDebug) Stop()

Stop Internal method that stops the debug output.

func (*UtilsDebug) StopI

func (self *UtilsDebug) StopI(args ...interface{})

StopI Internal method that stops the debug output.

func (*UtilsDebug) Text

func (self *UtilsDebug) Text(text string, x int, y int)

Text Render a string of text.

func (*UtilsDebug) Text1O

func (self *UtilsDebug) Text1O(text string, x int, y int, color string)

Text1O Render a string of text.

func (*UtilsDebug) Text2O

func (self *UtilsDebug) Text2O(text string, x int, y int, color string, font string)

Text2O Render a string of text.

func (*UtilsDebug) TextI

func (self *UtilsDebug) TextI(args ...interface{})

TextI Render a string of text.

func (*UtilsDebug) Timer

func (self *UtilsDebug) Timer(timer *Timer, x int, y int)

Timer Render Timer information.

func (*UtilsDebug) Timer1O

func (self *UtilsDebug) Timer1O(timer *Timer, x int, y int, color string)

Timer1O Render Timer information.

func (*UtilsDebug) TimerI

func (self *UtilsDebug) TimerI(args ...interface{})

TimerI Render Timer information.

type Vec2

type Vec2 struct {
	*js.Object
}

Vec2 empty description

func NewVec2

func NewVec2() *Vec2

NewVec2 empty description

func NewVec2I

func NewVec2I(args ...interface{}) *Vec2

NewVec2I empty description

func ToVec2

func ToVec2(jsStruct interface{}) *Vec2

Vec2 Binding conversion method to Vec2 point

type Vec3

type Vec3 struct {
	*js.Object
}

Vec3 empty description

func NewVec3

func NewVec3() *Vec3

NewVec3 empty description

func NewVec3I

func NewVec3I(args ...interface{}) *Vec3

NewVec3I empty description

func ToVec3

func ToVec3(jsStruct interface{}) *Vec3

Vec3 Binding conversion method to Vec3 point

type Vec4

type Vec4 struct {
	*js.Object
}

Vec4 empty description

func NewVec4

func NewVec4() *Vec4

NewVec4 empty description

func NewVec4I

func NewVec4I(args ...interface{}) *Vec4

NewVec4I empty description

func ToVec4

func ToVec4(jsStruct interface{}) *Vec4

Vec4 Binding conversion method to Vec4 point

type Video

type Video struct {
	*js.Object
}

Video A Video object that takes a previously loaded Video from the Phaser Cache and handles playback of it.

Alternatively it takes a getUserMedia feed from an active webcam and streams the contents of that to the Video instead (see `startMediaStream` method)

The video can then be applied to a Sprite as a texture. If multiple Sprites share the same Video texture and playback changes (i.e. you pause the video, or seek to a new time) then this change will be seen across all Sprites simultaneously.

Due to a bug in IE11 you cannot play a video texture to a Sprite in WebGL. For IE11 force Canvas mode.

If you need each Sprite to be able to play a video fully independently then you will need one Video object per Sprite. Please understand the obvious performance implications of doing this, and the memory required to hold videos in RAM.

On some mobile browsers such as iOS Safari, you cannot play a video until the user has explicitly touched the screen. This works in the same way as audio unlocking. Phaser will handle the touch unlocking for you, however unlike with audio it's worth noting that every single Video needs to be touch unlocked, not just the first one. You can use the `changeSource` method to try and work around this limitation, but see the method help for details.

Small screen devices, especially iPod and iPhone will launch the video in its own native video player, outside of the Safari browser. There is no way to avoid this, it's a device imposed limitation.

Note: On iOS if you need to detect when the user presses the 'Done' button (before the video ends) then you need to add your own event listener

func NewVideo

func NewVideo(game *Game) *Video

NewVideo A Video object that takes a previously loaded Video from the Phaser Cache and handles playback of it.

Alternatively it takes a getUserMedia feed from an active webcam and streams the contents of that to the Video instead (see `startMediaStream` method)

The video can then be applied to a Sprite as a texture. If multiple Sprites share the same Video texture and playback changes (i.e. you pause the video, or seek to a new time) then this change will be seen across all Sprites simultaneously.

Due to a bug in IE11 you cannot play a video texture to a Sprite in WebGL. For IE11 force Canvas mode.

If you need each Sprite to be able to play a video fully independently then you will need one Video object per Sprite. Please understand the obvious performance implications of doing this, and the memory required to hold videos in RAM.

On some mobile browsers such as iOS Safari, you cannot play a video until the user has explicitly touched the screen. This works in the same way as audio unlocking. Phaser will handle the touch unlocking for you, however unlike with audio it's worth noting that every single Video needs to be touch unlocked, not just the first one. You can use the `changeSource` method to try and work around this limitation, but see the method help for details.

Small screen devices, especially iPod and iPhone will launch the video in its own native video player, outside of the Safari browser. There is no way to avoid this, it's a device imposed limitation.

Note: On iOS if you need to detect when the user presses the 'Done' button (before the video ends) then you need to add your own event listener

func NewVideo1O

func NewVideo1O(game *Game, key interface{}) *Video

NewVideo1O A Video object that takes a previously loaded Video from the Phaser Cache and handles playback of it.

Alternatively it takes a getUserMedia feed from an active webcam and streams the contents of that to the Video instead (see `startMediaStream` method)

The video can then be applied to a Sprite as a texture. If multiple Sprites share the same Video texture and playback changes (i.e. you pause the video, or seek to a new time) then this change will be seen across all Sprites simultaneously.

Due to a bug in IE11 you cannot play a video texture to a Sprite in WebGL. For IE11 force Canvas mode.

If you need each Sprite to be able to play a video fully independently then you will need one Video object per Sprite. Please understand the obvious performance implications of doing this, and the memory required to hold videos in RAM.

On some mobile browsers such as iOS Safari, you cannot play a video until the user has explicitly touched the screen. This works in the same way as audio unlocking. Phaser will handle the touch unlocking for you, however unlike with audio it's worth noting that every single Video needs to be touch unlocked, not just the first one. You can use the `changeSource` method to try and work around this limitation, but see the method help for details.

Small screen devices, especially iPod and iPhone will launch the video in its own native video player, outside of the Safari browser. There is no way to avoid this, it's a device imposed limitation.

Note: On iOS if you need to detect when the user presses the 'Done' button (before the video ends) then you need to add your own event listener

func NewVideo2O

func NewVideo2O(game *Game, key interface{}, url interface{}) *Video

NewVideo2O A Video object that takes a previously loaded Video from the Phaser Cache and handles playback of it.

Alternatively it takes a getUserMedia feed from an active webcam and streams the contents of that to the Video instead (see `startMediaStream` method)

The video can then be applied to a Sprite as a texture. If multiple Sprites share the same Video texture and playback changes (i.e. you pause the video, or seek to a new time) then this change will be seen across all Sprites simultaneously.

Due to a bug in IE11 you cannot play a video texture to a Sprite in WebGL. For IE11 force Canvas mode.

If you need each Sprite to be able to play a video fully independently then you will need one Video object per Sprite. Please understand the obvious performance implications of doing this, and the memory required to hold videos in RAM.

On some mobile browsers such as iOS Safari, you cannot play a video until the user has explicitly touched the screen. This works in the same way as audio unlocking. Phaser will handle the touch unlocking for you, however unlike with audio it's worth noting that every single Video needs to be touch unlocked, not just the first one. You can use the `changeSource` method to try and work around this limitation, but see the method help for details.

Small screen devices, especially iPod and iPhone will launch the video in its own native video player, outside of the Safari browser. There is no way to avoid this, it's a device imposed limitation.

Note: On iOS if you need to detect when the user presses the 'Done' button (before the video ends) then you need to add your own event listener

func NewVideoI

func NewVideoI(args ...interface{}) *Video

NewVideoI A Video object that takes a previously loaded Video from the Phaser Cache and handles playback of it.

Alternatively it takes a getUserMedia feed from an active webcam and streams the contents of that to the Video instead (see `startMediaStream` method)

The video can then be applied to a Sprite as a texture. If multiple Sprites share the same Video texture and playback changes (i.e. you pause the video, or seek to a new time) then this change will be seen across all Sprites simultaneously.

Due to a bug in IE11 you cannot play a video texture to a Sprite in WebGL. For IE11 force Canvas mode.

If you need each Sprite to be able to play a video fully independently then you will need one Video object per Sprite. Please understand the obvious performance implications of doing this, and the memory required to hold videos in RAM.

On some mobile browsers such as iOS Safari, you cannot play a video until the user has explicitly touched the screen. This works in the same way as audio unlocking. Phaser will handle the touch unlocking for you, however unlike with audio it's worth noting that every single Video needs to be touch unlocked, not just the first one. You can use the `changeSource` method to try and work around this limitation, but see the method help for details.

Small screen devices, especially iPod and iPhone will launch the video in its own native video player, outside of the Safari browser. There is no way to avoid this, it's a device imposed limitation.

Note: On iOS if you need to detect when the user presses the 'Done' button (before the video ends) then you need to add your own event listener

func ToVideo

func ToVideo(jsStruct interface{}) *Video

Video Binding conversion method to Video point

func (*Video) Add

func (self *Video) Add(object interface{}) *Video

Add Updates the given Display Objects so they use this Video as their texture. This will replace any texture they will currently have set.

func (*Video) AddI

func (self *Video) AddI(args ...interface{}) *Video

AddI Updates the given Display Objects so they use this Video as their texture. This will replace any texture they will currently have set.

func (*Video) AddToWorld

func (self *Video) AddToWorld() *Image

AddToWorld Creates a new Phaser.Image object, assigns this Video to be its texture, adds it to the world then returns it.

func (*Video) AddToWorld1O

func (self *Video) AddToWorld1O(x int) *Image

AddToWorld1O Creates a new Phaser.Image object, assigns this Video to be its texture, adds it to the world then returns it.

func (*Video) AddToWorld2O

func (self *Video) AddToWorld2O(x int, y int) *Image

AddToWorld2O Creates a new Phaser.Image object, assigns this Video to be its texture, adds it to the world then returns it.

func (*Video) AddToWorld3O

func (self *Video) AddToWorld3O(x int, y int, anchorX int) *Image

AddToWorld3O Creates a new Phaser.Image object, assigns this Video to be its texture, adds it to the world then returns it.

func (*Video) AddToWorld4O

func (self *Video) AddToWorld4O(x int, y int, anchorX int, anchorY int) *Image

AddToWorld4O Creates a new Phaser.Image object, assigns this Video to be its texture, adds it to the world then returns it.

func (*Video) AddToWorld5O

func (self *Video) AddToWorld5O(x int, y int, anchorX int, anchorY int, scaleX int) *Image

AddToWorld5O Creates a new Phaser.Image object, assigns this Video to be its texture, adds it to the world then returns it.

func (*Video) AddToWorld6O

func (self *Video) AddToWorld6O(x int, y int, anchorX int, anchorY int, scaleX int, scaleY int) *Image

AddToWorld6O Creates a new Phaser.Image object, assigns this Video to be its texture, adds it to the world then returns it.

func (*Video) AddToWorldI

func (self *Video) AddToWorldI(args ...interface{}) *Image

AddToWorldI Creates a new Phaser.Image object, assigns this Video to be its texture, adds it to the world then returns it.

func (*Video) ChangeSource

func (self *Video) ChangeSource(src string) *Video

ChangeSource On some mobile browsers you cannot play a video until the user has explicitly touched the video to allow it. Phaser handles this via the `setTouchLock` method. However if you have 3 different videos, maybe an "Intro", "Start" and "Game Over" split into three different Video objects, then you will need the user to touch-unlock every single one of them.

You can avoid this by using just one Video object and simply changing the video source. Once a Video element is unlocked it remains unlocked, even if the source changes. So you can use this to your benefit to avoid forcing the user to 'touch' the video yet again.

As you'd expect there are limitations. So far we've found that the videos need to be in the same encoding format and bitrate. This method will automatically handle a change in video dimensions, but if you try swapping to a different bitrate we've found it cannot render the new video on iOS (desktop browsers cope better).

When the video source is changed the video file is requested over the network. Listen for the `onChangeSource` signal to know when the new video has downloaded enough content to be able to be played. Previous settings such as the volume and loop state are adopted automatically by the new video.

func (*Video) ChangeSource1O

func (self *Video) ChangeSource1O(src string, autoplay bool) *Video

ChangeSource1O On some mobile browsers you cannot play a video until the user has explicitly touched the video to allow it. Phaser handles this via the `setTouchLock` method. However if you have 3 different videos, maybe an "Intro", "Start" and "Game Over" split into three different Video objects, then you will need the user to touch-unlock every single one of them.

You can avoid this by using just one Video object and simply changing the video source. Once a Video element is unlocked it remains unlocked, even if the source changes. So you can use this to your benefit to avoid forcing the user to 'touch' the video yet again.

As you'd expect there are limitations. So far we've found that the videos need to be in the same encoding format and bitrate. This method will automatically handle a change in video dimensions, but if you try swapping to a different bitrate we've found it cannot render the new video on iOS (desktop browsers cope better).

When the video source is changed the video file is requested over the network. Listen for the `onChangeSource` signal to know when the new video has downloaded enough content to be able to be played. Previous settings such as the volume and loop state are adopted automatically by the new video.

func (*Video) ChangeSourceI

func (self *Video) ChangeSourceI(args ...interface{}) *Video

ChangeSourceI On some mobile browsers you cannot play a video until the user has explicitly touched the video to allow it. Phaser handles this via the `setTouchLock` method. However if you have 3 different videos, maybe an "Intro", "Start" and "Game Over" split into three different Video objects, then you will need the user to touch-unlock every single one of them.

You can avoid this by using just one Video object and simply changing the video source. Once a Video element is unlocked it remains unlocked, even if the source changes. So you can use this to your benefit to avoid forcing the user to 'touch' the video yet again.

As you'd expect there are limitations. So far we've found that the videos need to be in the same encoding format and bitrate. This method will automatically handle a change in video dimensions, but if you try swapping to a different bitrate we've found it cannot render the new video on iOS (desktop browsers cope better).

When the video source is changed the video file is requested over the network. Listen for the `onChangeSource` signal to know when the new video has downloaded enough content to be able to be played. Previous settings such as the volume and loop state are adopted automatically by the new video.

func (*Video) CheckVideoProgress

func (self *Video) CheckVideoProgress()

CheckVideoProgress Internal callback that monitors the download progress of a video after changing its source.

func (*Video) CheckVideoProgressI

func (self *Video) CheckVideoProgressI(args ...interface{})

CheckVideoProgressI Internal callback that monitors the download progress of a video after changing its source.

func (*Video) Complete

func (self *Video) Complete()

Complete Called when the video completes playback (reaches and ended state). Dispatches the Video.onComplete signal.

func (*Video) CompleteI

func (self *Video) CompleteI(args ...interface{})

CompleteI Called when the video completes playback (reaches and ended state). Dispatches the Video.onComplete signal.

func (*Video) ConnectToMediaStream

func (self *Video) ConnectToMediaStream(video *dom.HTMLVideoElement, stream *MediaStream) *Video

ConnectToMediaStream Connects to an external media stream for the webcam, rather than using a local one.

func (*Video) ConnectToMediaStreamI

func (self *Video) ConnectToMediaStreamI(args ...interface{}) *Video

ConnectToMediaStreamI Connects to an external media stream for the webcam, rather than using a local one.

func (*Video) CreateVideoFromBlob

func (self *Video) CreateVideoFromBlob(blob *Blob) *Video

CreateVideoFromBlob Creates a new Video element from the given Blob. The Blob must contain the video data in the correct encoded format. This method is typically called by the Phaser.Loader and Phaser.Cache for you, but is exposed publicly for convenience.

func (*Video) CreateVideoFromBlobI

func (self *Video) CreateVideoFromBlobI(args ...interface{}) *Video

CreateVideoFromBlobI Creates a new Video element from the given Blob. The Blob must contain the video data in the correct encoded format. This method is typically called by the Phaser.Loader and Phaser.Cache for you, but is exposed publicly for convenience.

func (*Video) CreateVideoFromURL

func (self *Video) CreateVideoFromURL(url string) *Video

CreateVideoFromURL Creates a new Video element from the given URL.

func (*Video) CreateVideoFromURL1O

func (self *Video) CreateVideoFromURL1O(url string, autoplay bool) *Video

CreateVideoFromURL1O Creates a new Video element from the given URL.

func (*Video) CreateVideoFromURLI

func (self *Video) CreateVideoFromURLI(args ...interface{}) *Video

CreateVideoFromURLI Creates a new Video element from the given URL.

func (*Video) CurrentTime

func (self *Video) CurrentTime() int

CurrentTime The current time of the video in seconds. If set the video will attempt to seek to that point in time.

func (*Video) Destroy

func (self *Video) Destroy()

Destroy Destroys the Video object. This calls `Video.stop` and then `Video.removeVideoElement`. If any Sprites are using this Video as their texture it is up to you to manage those.

func (*Video) DestroyI

func (self *Video) DestroyI(args ...interface{})

DestroyI Destroys the Video object. This calls `Video.stop` and then `Video.removeVideoElement`. If any Sprites are using this Video as their texture it is up to you to manage those.

func (*Video) DisableTextureUpload

func (self *Video) DisableTextureUpload() bool

DisableTextureUpload If true this video will never send its image data to the GPU when its dirty flag is true. This only applies in WebGL.

func (*Video) Duration

func (self *Video) Duration() int

Duration The duration of the video in seconds.

func (*Video) Game

func (self *Video) Game() *Game

Game A reference to the currently running game.

func (*Video) GetUserMediaError

func (self *Video) GetUserMediaError()

GetUserMediaError empty description

func (*Video) GetUserMediaErrorI

func (self *Video) GetUserMediaErrorI(args ...interface{})

GetUserMediaErrorI empty description

func (*Video) GetUserMediaSuccess

func (self *Video) GetUserMediaSuccess()

GetUserMediaSuccess empty description

func (*Video) GetUserMediaSuccessI

func (self *Video) GetUserMediaSuccessI(args ...interface{})

GetUserMediaSuccessI empty description

func (*Video) GetUserMediaTimeout

func (self *Video) GetUserMediaTimeout()

GetUserMediaTimeout empty description

func (*Video) GetUserMediaTimeoutI

func (self *Video) GetUserMediaTimeoutI(args ...interface{})

GetUserMediaTimeoutI empty description

func (*Video) Grab

func (self *Video) Grab() *BitmapData

Grab Grabs the current frame from the Video or Video Stream and renders it to the Video.snapshot BitmapData.

You can optionally set if the BitmapData should be cleared or not, the alpha and the blend mode of the draw.

If you need more advanced control over the grabbing them call `Video.snapshot.copy` directly with the same parameters as BitmapData.copy.

func (*Video) Grab1O

func (self *Video) Grab1O(clear bool) *BitmapData

Grab1O Grabs the current frame from the Video or Video Stream and renders it to the Video.snapshot BitmapData.

You can optionally set if the BitmapData should be cleared or not, the alpha and the blend mode of the draw.

If you need more advanced control over the grabbing them call `Video.snapshot.copy` directly with the same parameters as BitmapData.copy.

func (*Video) Grab2O

func (self *Video) Grab2O(clear bool, alpha int) *BitmapData

Grab2O Grabs the current frame from the Video or Video Stream and renders it to the Video.snapshot BitmapData.

You can optionally set if the BitmapData should be cleared or not, the alpha and the blend mode of the draw.

If you need more advanced control over the grabbing them call `Video.snapshot.copy` directly with the same parameters as BitmapData.copy.

func (*Video) Grab3O

func (self *Video) Grab3O(clear bool, alpha int, blendMode string) *BitmapData

Grab3O Grabs the current frame from the Video or Video Stream and renders it to the Video.snapshot BitmapData.

You can optionally set if the BitmapData should be cleared or not, the alpha and the blend mode of the draw.

If you need more advanced control over the grabbing them call `Video.snapshot.copy` directly with the same parameters as BitmapData.copy.

func (*Video) GrabI

func (self *Video) GrabI(args ...interface{}) *BitmapData

GrabI Grabs the current frame from the Video or Video Stream and renders it to the Video.snapshot BitmapData.

You can optionally set if the BitmapData should be cleared or not, the alpha and the blend mode of the draw.

If you need more advanced control over the grabbing them call `Video.snapshot.copy` directly with the same parameters as BitmapData.copy.

func (*Video) Height

func (self *Video) Height() int

Height The height of the video in pixels.

func (*Video) IsStreaming

func (self *Video) IsStreaming() bool

IsStreaming Is there a streaming video source? I.e. from a webcam.

func (*Video) Key

func (self *Video) Key() string

Key The key of the Video in the Cache, if stored there. Will be `null` if this Video is using the webcam instead.

func (*Video) Loop

func (self *Video) Loop() bool

Loop Gets or sets if the Video is set to loop. Please note that at present some browsers (i.e. Chrome) do not support *seamless* video looping. If the video isn't yet set this will always return false.

func (*Video) Mute

func (self *Video) Mute() bool

Mute Gets or sets the muted state of the Video.

func (*Video) OnAccess

func (self *Video) OnAccess() *Signal

OnAccess This signal is dispatched if the user allows access to their webcam.

func (*Video) OnChangeSource

func (self *Video) OnChangeSource() *Signal

OnChangeSource This signal is dispatched if the Video source is changed. It sends 3 parameters: a reference to the Video object and the new width and height of the new video source.

func (*Video) OnComplete

func (self *Video) OnComplete() *Signal

OnComplete This signal is dispatched when the Video completes playback, i.e. enters an 'ended' state. On iOS specifically it also fires if the user hits the 'Done' button at any point during playback. Videos set to loop will never dispatch this signal.

func (*Video) OnError

func (self *Video) OnError() *Signal

OnError This signal is dispatched if an error occurs either getting permission to use the webcam (for a Video Stream) or when trying to play back a video file.

func (*Video) OnPlay

func (self *Video) OnPlay() *Signal

OnPlay This signal is dispatched when the Video starts to play. It sends 3 parameters: a reference to the Video object, if the video is set to loop or not and the playback rate.

func (*Video) OnTimeout

func (self *Video) OnTimeout() *Signal

OnTimeout This signal is dispatched if when asking for permission to use the webcam no response is given within a the Video.timeout limit. This may be because the user has picked `Not now` in the permissions window, or there is a delay in establishing the LocalMediaStream.

func (*Video) Paused

func (self *Video) Paused() bool

Paused Gets or sets the paused state of the Video. If the video is still touch locked (such as on iOS devices) this call has no effect.

func (*Video) Play

func (self *Video) Play() *Video

Play Starts this video playing if it's not already doing so.

func (*Video) Play1O

func (self *Video) Play1O(loop bool) *Video

Play1O Starts this video playing if it's not already doing so.

func (*Video) Play2O

func (self *Video) Play2O(loop bool, playbackRate int) *Video

Play2O Starts this video playing if it's not already doing so.

func (*Video) PlayHandler

func (self *Video) PlayHandler()

PlayHandler Called when the video starts to play. Updates the texture.

func (*Video) PlayHandlerI

func (self *Video) PlayHandlerI(args ...interface{})

PlayHandlerI Called when the video starts to play. Updates the texture.

func (*Video) PlayI

func (self *Video) PlayI(args ...interface{}) *Video

PlayI Starts this video playing if it's not already doing so.

func (*Video) PlaybackRate

func (self *Video) PlaybackRate() int

PlaybackRate Gets or sets the playback rate of the Video. This is the speed at which the video is playing.

func (*Video) Playing

func (self *Video) Playing() bool

Playing True if the video is currently playing (and not paused or ended), otherwise false.

func (*Video) Progress

func (self *Video) Progress() int

Progress The progress of this video. This is a value between 0 and 1, where 0 is the start and 1 is the end of the video.

func (*Video) RemoveVideoElement

func (self *Video) RemoveVideoElement()

RemoveVideoElement Removes the Video element from the DOM by calling parentNode.removeChild on itself. Also removes the autoplay and src attributes and nulls the reference.

func (*Video) RemoveVideoElementI

func (self *Video) RemoveVideoElementI(args ...interface{})

RemoveVideoElementI Removes the Video element from the DOM by calling parentNode.removeChild on itself. Also removes the autoplay and src attributes and nulls the reference.

func (*Video) Render

func (self *Video) Render()

Render If the game is running in WebGL this will push the texture up to the GPU if it's dirty. This is called automatically if the Video is being used by a Sprite, otherwise you need to remember to call it in your render function. If you wish to suppress this functionality set Video.disableTextureUpload to `true`.

func (*Video) RenderI

func (self *Video) RenderI(args ...interface{})

RenderI If the game is running in WebGL this will push the texture up to the GPU if it's dirty. This is called automatically if the Video is being used by a Sprite, otherwise you need to remember to call it in your render function. If you wish to suppress this functionality set Video.disableTextureUpload to `true`.

func (*Video) Retry

func (self *Video) Retry() int

Retry The current retry attempt.

func (*Video) RetryInterval

func (self *Video) RetryInterval() int

RetryInterval The number of ms between each retry at monitoring the status of a downloading video.

func (*Video) RetryLimit

func (self *Video) RetryLimit() int

RetryLimit When starting playback of a video Phaser will monitor its readyState using a setTimeout call. The setTimeout happens once every `Video.retryInterval` ms. It will carry on monitoring the video state in this manner until the `retryLimit` is reached and then abort.

func (*Video) SetCurrentTimeA

func (self *Video) SetCurrentTimeA(member int)

SetCurrentTimeA The current time of the video in seconds. If set the video will attempt to seek to that point in time.

func (*Video) SetDisableTextureUploadA

func (self *Video) SetDisableTextureUploadA(member bool)

SetDisableTextureUploadA If true this video will never send its image data to the GPU when its dirty flag is true. This only applies in WebGL.

func (*Video) SetDurationA

func (self *Video) SetDurationA(member int)

SetDurationA The duration of the video in seconds.

func (*Video) SetGameA

func (self *Video) SetGameA(member *Game)

SetGameA A reference to the currently running game.

func (*Video) SetHeightA

func (self *Video) SetHeightA(member int)

SetHeightA The height of the video in pixels.

func (*Video) SetIsStreamingA

func (self *Video) SetIsStreamingA(member bool)

SetIsStreamingA Is there a streaming video source? I.e. from a webcam.

func (*Video) SetKeyA

func (self *Video) SetKeyA(member string)

SetKeyA The key of the Video in the Cache, if stored there. Will be `null` if this Video is using the webcam instead.

func (*Video) SetLoopA

func (self *Video) SetLoopA(member bool)

SetLoopA Gets or sets if the Video is set to loop. Please note that at present some browsers (i.e. Chrome) do not support *seamless* video looping. If the video isn't yet set this will always return false.

func (*Video) SetMute

func (self *Video) SetMute()

SetMute Internal handler called automatically by the Video.mute setter.

func (*Video) SetMuteA

func (self *Video) SetMuteA(member bool)

SetMuteA Gets or sets the muted state of the Video.

func (*Video) SetMuteI

func (self *Video) SetMuteI(args ...interface{})

SetMuteI Internal handler called automatically by the Video.mute setter.

func (*Video) SetOnAccessA

func (self *Video) SetOnAccessA(member *Signal)

SetOnAccessA This signal is dispatched if the user allows access to their webcam.

func (*Video) SetOnChangeSourceA

func (self *Video) SetOnChangeSourceA(member *Signal)

SetOnChangeSourceA This signal is dispatched if the Video source is changed. It sends 3 parameters: a reference to the Video object and the new width and height of the new video source.

func (*Video) SetOnCompleteA

func (self *Video) SetOnCompleteA(member *Signal)

SetOnCompleteA This signal is dispatched when the Video completes playback, i.e. enters an 'ended' state. On iOS specifically it also fires if the user hits the 'Done' button at any point during playback. Videos set to loop will never dispatch this signal.

func (*Video) SetOnErrorA

func (self *Video) SetOnErrorA(member *Signal)

SetOnErrorA This signal is dispatched if an error occurs either getting permission to use the webcam (for a Video Stream) or when trying to play back a video file.

func (*Video) SetOnPlayA

func (self *Video) SetOnPlayA(member *Signal)

SetOnPlayA This signal is dispatched when the Video starts to play. It sends 3 parameters: a reference to the Video object, if the video is set to loop or not and the playback rate.

func (*Video) SetOnTimeoutA

func (self *Video) SetOnTimeoutA(member *Signal)

SetOnTimeoutA This signal is dispatched if when asking for permission to use the webcam no response is given within a the Video.timeout limit. This may be because the user has picked `Not now` in the permissions window, or there is a delay in establishing the LocalMediaStream.

func (*Video) SetPause

func (self *Video) SetPause()

SetPause Internal handler called automatically by the Video.paused setter.

func (*Video) SetPauseI

func (self *Video) SetPauseI(args ...interface{})

SetPauseI Internal handler called automatically by the Video.paused setter.

func (*Video) SetPausedA

func (self *Video) SetPausedA(member bool)

SetPausedA Gets or sets the paused state of the Video. If the video is still touch locked (such as on iOS devices) this call has no effect.

func (*Video) SetPlaybackRateA

func (self *Video) SetPlaybackRateA(member int)

SetPlaybackRateA Gets or sets the playback rate of the Video. This is the speed at which the video is playing.

func (*Video) SetPlayingA

func (self *Video) SetPlayingA(member bool)

SetPlayingA True if the video is currently playing (and not paused or ended), otherwise false.

func (*Video) SetProgressA

func (self *Video) SetProgressA(member int)

SetProgressA The progress of this video. This is a value between 0 and 1, where 0 is the start and 1 is the end of the video.

func (*Video) SetResume

func (self *Video) SetResume()

SetResume Internal handler called automatically by the Video.paused setter.

func (*Video) SetResumeI

func (self *Video) SetResumeI(args ...interface{})

SetResumeI Internal handler called automatically by the Video.paused setter.

func (*Video) SetRetryA

func (self *Video) SetRetryA(member int)

SetRetryA The current retry attempt.

func (*Video) SetRetryIntervalA

func (self *Video) SetRetryIntervalA(member int)

SetRetryIntervalA The number of ms between each retry at monitoring the status of a downloading video.

func (*Video) SetRetryLimitA

func (self *Video) SetRetryLimitA(member int)

SetRetryLimitA When starting playback of a video Phaser will monitor its readyState using a setTimeout call. The setTimeout happens once every `Video.retryInterval` ms. It will carry on monitoring the video state in this manner until the `retryLimit` is reached and then abort.

func (*Video) SetSnapshotA

func (self *Video) SetSnapshotA(member *BitmapData)

SetSnapshotA A snapshot grabbed from the video. This is initially black. Populate it by calling Video.grab(). When called the BitmapData is updated with a grab taken from the current video playing or active video stream. If Phaser has been compiled without BitmapData support this property will always be `null`.

func (*Video) SetTextureA

func (self *Video) SetTextureA(member *Texture)

SetTextureA The PIXI.Texture.

func (*Video) SetTextureFrameA

func (self *Video) SetTextureFrameA(member *Frame)

SetTextureFrameA The Frame this video uses for rendering.

func (*Video) SetTimeoutA

func (self *Video) SetTimeoutA(member int)

SetTimeoutA The amount of ms allowed to elapsed before the Video.onTimeout signal is dispatched while waiting for webcam access.

func (*Video) SetTouchLock

func (self *Video) SetTouchLock()

SetTouchLock Sets the Input Manager touch callback to be Video.unlock. Required for mobile video unlocking. Mostly just used internally.

func (*Video) SetTouchLockI

func (self *Video) SetTouchLockI(args ...interface{})

SetTouchLockI Sets the Input Manager touch callback to be Video.unlock. Required for mobile video unlocking. Mostly just used internally.

func (*Video) SetTouchLockedA

func (self *Video) SetTouchLockedA(member bool)

SetTouchLockedA true if this video is currently locked awaiting a touch event. This happens on some mobile devices, such as iOS.

func (*Video) SetTypeA

func (self *Video) SetTypeA(member int)

SetTypeA The const type of this object.

func (*Video) SetVideoA

func (self *Video) SetVideoA(member dom.HTMLVideoElement)

SetVideoA The HTML Video Element that is added to the document.

func (*Video) SetVideoStreamA

func (self *Video) SetVideoStreamA(member *MediaStream)

SetVideoStreamA The Video Stream data. Only set if this Video is streaming from the webcam via `startMediaStream`.

func (*Video) SetVolumeA

func (self *Video) SetVolumeA(member int)

SetVolumeA Gets or sets the volume of the Video, a value between 0 and 1. The value given is clamped to the range 0 to 1.

func (*Video) SetWidthA

func (self *Video) SetWidthA(member int)

SetWidthA The width of the video in pixels.

func (*Video) Snapshot

func (self *Video) Snapshot() *BitmapData

Snapshot A snapshot grabbed from the video. This is initially black. Populate it by calling Video.grab(). When called the BitmapData is updated with a grab taken from the current video playing or active video stream. If Phaser has been compiled without BitmapData support this property will always be `null`.

func (*Video) StartMediaStream

func (self *Video) StartMediaStream() *Video

StartMediaStream Instead of playing a video file this method allows you to stream video data from an attached webcam.

As soon as this method is called the user will be prompted by their browser to "Allow" access to the webcam. If they allow it the webcam feed is directed to this Video. Call `Video.play` to start the stream.

If they block the webcam the onError signal will be dispatched containing the NavigatorUserMediaError or MediaStreamError event.

You can optionally set a width and height for the stream. If set the input will be cropped to these dimensions. If not given then as soon as the stream has enough data the video dimensions will be changed to match the webcam device. You can listen for this with the onChangeSource signal.

func (*Video) StartMediaStream1O

func (self *Video) StartMediaStream1O(captureAudio bool) *Video

StartMediaStream1O Instead of playing a video file this method allows you to stream video data from an attached webcam.

As soon as this method is called the user will be prompted by their browser to "Allow" access to the webcam. If they allow it the webcam feed is directed to this Video. Call `Video.play` to start the stream.

If they block the webcam the onError signal will be dispatched containing the NavigatorUserMediaError or MediaStreamError event.

You can optionally set a width and height for the stream. If set the input will be cropped to these dimensions. If not given then as soon as the stream has enough data the video dimensions will be changed to match the webcam device. You can listen for this with the onChangeSource signal.

func (*Video) StartMediaStream2O

func (self *Video) StartMediaStream2O(captureAudio bool, width int) *Video

StartMediaStream2O Instead of playing a video file this method allows you to stream video data from an attached webcam.

As soon as this method is called the user will be prompted by their browser to "Allow" access to the webcam. If they allow it the webcam feed is directed to this Video. Call `Video.play` to start the stream.

If they block the webcam the onError signal will be dispatched containing the NavigatorUserMediaError or MediaStreamError event.

You can optionally set a width and height for the stream. If set the input will be cropped to these dimensions. If not given then as soon as the stream has enough data the video dimensions will be changed to match the webcam device. You can listen for this with the onChangeSource signal.

func (*Video) StartMediaStream3O

func (self *Video) StartMediaStream3O(captureAudio bool, width int, height int) *Video

StartMediaStream3O Instead of playing a video file this method allows you to stream video data from an attached webcam.

As soon as this method is called the user will be prompted by their browser to "Allow" access to the webcam. If they allow it the webcam feed is directed to this Video. Call `Video.play` to start the stream.

If they block the webcam the onError signal will be dispatched containing the NavigatorUserMediaError or MediaStreamError event.

You can optionally set a width and height for the stream. If set the input will be cropped to these dimensions. If not given then as soon as the stream has enough data the video dimensions will be changed to match the webcam device. You can listen for this with the onChangeSource signal.

func (*Video) StartMediaStreamI

func (self *Video) StartMediaStreamI(args ...interface{}) *Video

StartMediaStreamI Instead of playing a video file this method allows you to stream video data from an attached webcam.

As soon as this method is called the user will be prompted by their browser to "Allow" access to the webcam. If they allow it the webcam feed is directed to this Video. Call `Video.play` to start the stream.

If they block the webcam the onError signal will be dispatched containing the NavigatorUserMediaError or MediaStreamError event.

You can optionally set a width and height for the stream. If set the input will be cropped to these dimensions. If not given then as soon as the stream has enough data the video dimensions will be changed to match the webcam device. You can listen for this with the onChangeSource signal.

func (*Video) Stop

func (self *Video) Stop() *Video

Stop Stops the video playing.

This removes all locally set signals.

If you only wish to pause playback of the video, to resume at a later time, use `Video.paused = true` instead. If the video hasn't finished downloading calling `Video.stop` will not abort the download. To do that you need to call `Video.destroy` instead.

If you are using a video stream from a webcam then calling Stop will disconnect the MediaStream session and disable the webcam.

func (*Video) StopI

func (self *Video) StopI(args ...interface{}) *Video

StopI Stops the video playing.

This removes all locally set signals.

If you only wish to pause playback of the video, to resume at a later time, use `Video.paused = true` instead. If the video hasn't finished downloading calling `Video.stop` will not abort the download. To do that you need to call `Video.destroy` instead.

If you are using a video stream from a webcam then calling Stop will disconnect the MediaStream session and disable the webcam.

func (*Video) Texture

func (self *Video) Texture() *Texture

Texture The PIXI.Texture.

func (*Video) TextureFrame

func (self *Video) TextureFrame() *Frame

TextureFrame The Frame this video uses for rendering.

func (*Video) Timeout

func (self *Video) Timeout() int

Timeout The amount of ms allowed to elapsed before the Video.onTimeout signal is dispatched while waiting for webcam access.

func (*Video) TouchLocked

func (self *Video) TouchLocked() bool

TouchLocked true if this video is currently locked awaiting a touch event. This happens on some mobile devices, such as iOS.

func (*Video) Type

func (self *Video) Type() int

Type The const type of this object.

func (*Video) Unlock

func (self *Video) Unlock()

Unlock Enables the video on mobile devices, usually after the first touch. If the SoundManager hasn't been unlocked then this will automatically unlock that as well. Only one video can be pending unlock at any one time.

func (*Video) UnlockI

func (self *Video) UnlockI(args ...interface{})

UnlockI Enables the video on mobile devices, usually after the first touch. If the SoundManager hasn't been unlocked then this will automatically unlock that as well. Only one video can be pending unlock at any one time.

func (*Video) UnsetMute

func (self *Video) UnsetMute()

UnsetMute Internal handler called automatically by the Video.mute setter.

func (*Video) UnsetMuteI

func (self *Video) UnsetMuteI(args ...interface{})

UnsetMuteI Internal handler called automatically by the Video.mute setter.

func (*Video) UpdateTexture

func (self *Video) UpdateTexture()

UpdateTexture Called automatically if the video source changes and updates the internal texture dimensions. Then dispatches the onChangeSource signal.

func (*Video) UpdateTexture1O

func (self *Video) UpdateTexture1O(event interface{})

UpdateTexture1O Called automatically if the video source changes and updates the internal texture dimensions. Then dispatches the onChangeSource signal.

func (*Video) UpdateTexture2O

func (self *Video) UpdateTexture2O(event interface{}, width int)

UpdateTexture2O Called automatically if the video source changes and updates the internal texture dimensions. Then dispatches the onChangeSource signal.

func (*Video) UpdateTexture3O

func (self *Video) UpdateTexture3O(event interface{}, width int, height int)

UpdateTexture3O Called automatically if the video source changes and updates the internal texture dimensions. Then dispatches the onChangeSource signal.

func (*Video) UpdateTextureI

func (self *Video) UpdateTextureI(args ...interface{})

UpdateTextureI Called automatically if the video source changes and updates the internal texture dimensions. Then dispatches the onChangeSource signal.

func (*Video) Video

func (self *Video) Video() dom.HTMLVideoElement

Video The HTML Video Element that is added to the document.

func (*Video) VideoStream

func (self *Video) VideoStream() *MediaStream

VideoStream The Video Stream data. Only set if this Video is streaming from the webcam via `startMediaStream`.

func (*Video) Volume

func (self *Video) Volume() int

Volume Gets or sets the volume of the Video, a value between 0 and 1. The value given is clamped to the range 0 to 1.

func (*Video) Width

func (self *Video) Width() int

Width The width of the video in pixels.

type Weapon

type Weapon struct{ *js.Object }

type WebGLBlendModeManager

type WebGLBlendModeManager struct {
	*js.Object
}

WebGLBlendModeManager empty description

func NewWebGLBlendModeManager

func NewWebGLBlendModeManager(gl *WebGLContext) *WebGLBlendModeManager

NewWebGLBlendModeManager empty description

func NewWebGLBlendModeManagerI

func NewWebGLBlendModeManagerI(args ...interface{}) *WebGLBlendModeManager

NewWebGLBlendModeManagerI empty description

func ToWebGLBlendModeManager

func ToWebGLBlendModeManager(jsStruct interface{}) *WebGLBlendModeManager

WebGLBlendModeManager Binding conversion method to WebGLBlendModeManager point

func (*WebGLBlendModeManager) CurrentBlendMode

func (self *WebGLBlendModeManager) CurrentBlendMode() int

CurrentBlendMode empty description

func (*WebGLBlendModeManager) Destroy

func (self *WebGLBlendModeManager) Destroy()

Destroy Destroys this object.

func (*WebGLBlendModeManager) DestroyI

func (self *WebGLBlendModeManager) DestroyI(args ...interface{})

DestroyI Destroys this object.

func (*WebGLBlendModeManager) SetBlendMode

func (self *WebGLBlendModeManager) SetBlendMode(blendMode int)

SetBlendMode Sets-up the given blendMode from WebGL's point of view.

func (*WebGLBlendModeManager) SetBlendModeI

func (self *WebGLBlendModeManager) SetBlendModeI(args ...interface{})

SetBlendModeI Sets-up the given blendMode from WebGL's point of view.

func (*WebGLBlendModeManager) SetContext

func (self *WebGLBlendModeManager) SetContext(gl *WebGLContext)

SetContext Sets the WebGL Context.

func (*WebGLBlendModeManager) SetContextI

func (self *WebGLBlendModeManager) SetContextI(args ...interface{})

SetContextI Sets the WebGL Context.

func (*WebGLBlendModeManager) SetCurrentBlendModeA

func (self *WebGLBlendModeManager) SetCurrentBlendModeA(member int)

SetCurrentBlendModeA empty description

type WebGLContext

type WebGLContext webgl.Context

func WrapWebGLContext

func WrapWebGLContext(o *js.Object) WebGLContext

type WebGLFastSpriteBatch

type WebGLFastSpriteBatch struct {
	*js.Object
}

WebGLFastSpriteBatch empty description

func NewWebGLFastSpriteBatch

func NewWebGLFastSpriteBatch() *WebGLFastSpriteBatch

NewWebGLFastSpriteBatch empty description

func NewWebGLFastSpriteBatchI

func NewWebGLFastSpriteBatchI(args ...interface{}) *WebGLFastSpriteBatch

NewWebGLFastSpriteBatchI empty description

func ToWebGLFastSpriteBatch

func ToWebGLFastSpriteBatch(jsStruct interface{}) *WebGLFastSpriteBatch

WebGLFastSpriteBatch Binding conversion method to WebGLFastSpriteBatch point

func (*WebGLFastSpriteBatch) Begin

func (self *WebGLFastSpriteBatch) Begin(spriteBatch *WebGLSpriteBatch, renderSession interface{})

Begin empty description

func (*WebGLFastSpriteBatch) BeginI

func (self *WebGLFastSpriteBatch) BeginI(args ...interface{})

BeginI empty description

func (*WebGLFastSpriteBatch) CurrentBaseTexture

func (self *WebGLFastSpriteBatch) CurrentBaseTexture() *BaseTexture

CurrentBaseTexture empty description

func (*WebGLFastSpriteBatch) CurrentBatchSize

func (self *WebGLFastSpriteBatch) CurrentBatchSize() int

CurrentBatchSize empty description

func (*WebGLFastSpriteBatch) CurrentBlendMode

func (self *WebGLFastSpriteBatch) CurrentBlendMode() int

CurrentBlendMode empty description

func (*WebGLFastSpriteBatch) Drawing

func (self *WebGLFastSpriteBatch) Drawing() bool

Drawing empty description

func (*WebGLFastSpriteBatch) End

func (self *WebGLFastSpriteBatch) End()

End empty description

func (*WebGLFastSpriteBatch) EndI

func (self *WebGLFastSpriteBatch) EndI(args ...interface{})

EndI empty description

func (*WebGLFastSpriteBatch) Flush

func (self *WebGLFastSpriteBatch) Flush()

Flush empty description

func (*WebGLFastSpriteBatch) FlushI

func (self *WebGLFastSpriteBatch) FlushI(args ...interface{})

FlushI empty description

func (*WebGLFastSpriteBatch) IndexBuffer

func (self *WebGLFastSpriteBatch) IndexBuffer() interface{}

IndexBuffer empty description

func (*WebGLFastSpriteBatch) Indices

func (self *WebGLFastSpriteBatch) Indices() *Uint16Array

Indices Index data

func (*WebGLFastSpriteBatch) LastIndexCount

func (self *WebGLFastSpriteBatch) LastIndexCount() int

LastIndexCount empty description

func (*WebGLFastSpriteBatch) Matrix

func (self *WebGLFastSpriteBatch) Matrix() *Matrix

Matrix empty description

func (*WebGLFastSpriteBatch) MaxSize

func (self *WebGLFastSpriteBatch) MaxSize() int

MaxSize empty description

func (*WebGLFastSpriteBatch) Render

func (self *WebGLFastSpriteBatch) Render(spriteBatch *WebGLSpriteBatch)

Render empty description

func (*WebGLFastSpriteBatch) RenderI

func (self *WebGLFastSpriteBatch) RenderI(args ...interface{})

RenderI empty description

func (*WebGLFastSpriteBatch) RenderSession

func (self *WebGLFastSpriteBatch) RenderSession() interface{}

RenderSession empty description

func (*WebGLFastSpriteBatch) RenderSprite

func (self *WebGLFastSpriteBatch) RenderSprite(sprite *Sprite)

RenderSprite empty description

func (*WebGLFastSpriteBatch) RenderSpriteI

func (self *WebGLFastSpriteBatch) RenderSpriteI(args ...interface{})

RenderSpriteI empty description

func (*WebGLFastSpriteBatch) SetContext

func (self *WebGLFastSpriteBatch) SetContext(gl *WebGLContext)

SetContext Sets the WebGL Context.

func (*WebGLFastSpriteBatch) SetContextI

func (self *WebGLFastSpriteBatch) SetContextI(args ...interface{})

SetContextI Sets the WebGL Context.

func (*WebGLFastSpriteBatch) SetCurrentBaseTextureA

func (self *WebGLFastSpriteBatch) SetCurrentBaseTextureA(member *BaseTexture)

SetCurrentBaseTextureA empty description

func (*WebGLFastSpriteBatch) SetCurrentBatchSizeA

func (self *WebGLFastSpriteBatch) SetCurrentBatchSizeA(member int)

SetCurrentBatchSizeA empty description

func (*WebGLFastSpriteBatch) SetCurrentBlendModeA

func (self *WebGLFastSpriteBatch) SetCurrentBlendModeA(member int)

SetCurrentBlendModeA empty description

func (*WebGLFastSpriteBatch) SetDrawingA

func (self *WebGLFastSpriteBatch) SetDrawingA(member bool)

SetDrawingA empty description

func (*WebGLFastSpriteBatch) SetIndexBufferA

func (self *WebGLFastSpriteBatch) SetIndexBufferA(member interface{})

SetIndexBufferA empty description

func (*WebGLFastSpriteBatch) SetIndicesA

func (self *WebGLFastSpriteBatch) SetIndicesA(member *Uint16Array)

SetIndicesA Index data

func (*WebGLFastSpriteBatch) SetLastIndexCountA

func (self *WebGLFastSpriteBatch) SetLastIndexCountA(member int)

SetLastIndexCountA empty description

func (*WebGLFastSpriteBatch) SetMatrixA

func (self *WebGLFastSpriteBatch) SetMatrixA(member *Matrix)

SetMatrixA empty description

func (*WebGLFastSpriteBatch) SetMaxSizeA

func (self *WebGLFastSpriteBatch) SetMaxSizeA(member int)

SetMaxSizeA empty description

func (*WebGLFastSpriteBatch) SetRenderSessionA

func (self *WebGLFastSpriteBatch) SetRenderSessionA(member interface{})

SetRenderSessionA empty description

func (*WebGLFastSpriteBatch) SetShaderA

func (self *WebGLFastSpriteBatch) SetShaderA(member interface{})

SetShaderA empty description

func (*WebGLFastSpriteBatch) SetSizeA

func (self *WebGLFastSpriteBatch) SetSizeA(member int)

SetSizeA empty description

func (*WebGLFastSpriteBatch) SetVertSizeA

func (self *WebGLFastSpriteBatch) SetVertSizeA(member int)

SetVertSizeA empty description

func (*WebGLFastSpriteBatch) SetVertexBufferA

func (self *WebGLFastSpriteBatch) SetVertexBufferA(member interface{})

SetVertexBufferA empty description

func (*WebGLFastSpriteBatch) SetVerticesA

func (self *WebGLFastSpriteBatch) SetVerticesA(member *Float32Array)

SetVerticesA Vertex data

func (*WebGLFastSpriteBatch) Shader

func (self *WebGLFastSpriteBatch) Shader() interface{}

Shader empty description

func (*WebGLFastSpriteBatch) Size

func (self *WebGLFastSpriteBatch) Size() int

Size empty description

func (*WebGLFastSpriteBatch) Start

func (self *WebGLFastSpriteBatch) Start()

Start empty description

func (*WebGLFastSpriteBatch) StartI

func (self *WebGLFastSpriteBatch) StartI(args ...interface{})

StartI empty description

func (*WebGLFastSpriteBatch) Stop

func (self *WebGLFastSpriteBatch) Stop()

Stop empty description

func (*WebGLFastSpriteBatch) StopI

func (self *WebGLFastSpriteBatch) StopI(args ...interface{})

StopI empty description

func (*WebGLFastSpriteBatch) VertSize

func (self *WebGLFastSpriteBatch) VertSize() int

VertSize empty description

func (*WebGLFastSpriteBatch) VertexBuffer

func (self *WebGLFastSpriteBatch) VertexBuffer() interface{}

VertexBuffer empty description

func (*WebGLFastSpriteBatch) Vertices

func (self *WebGLFastSpriteBatch) Vertices() *Float32Array

Vertices Vertex data

type WebGLFilterManager

type WebGLFilterManager struct {
	*js.Object
}

WebGLFilterManager empty description

func NewWebGLFilterManager

func NewWebGLFilterManager() *WebGLFilterManager

NewWebGLFilterManager empty description

func NewWebGLFilterManagerI

func NewWebGLFilterManagerI(args ...interface{}) *WebGLFilterManager

NewWebGLFilterManagerI empty description

func ToWebGLFilterManager

func ToWebGLFilterManager(jsStruct interface{}) *WebGLFilterManager

WebGLFilterManager Binding conversion method to WebGLFilterManager point

func (*WebGLFilterManager) ApplyFilterPass

func (self *WebGLFilterManager) ApplyFilterPass(filter *AbstractFilter, filterArea *Texture, width int, height int)

ApplyFilterPass Applies the filter to the specified area.

func (*WebGLFilterManager) ApplyFilterPassI

func (self *WebGLFilterManager) ApplyFilterPassI(args ...interface{})

ApplyFilterPassI Applies the filter to the specified area.

func (*WebGLFilterManager) Begin

func (self *WebGLFilterManager) Begin(renderSession *RenderSession, buffer *ArrayBuffer)

Begin empty description

func (*WebGLFilterManager) BeginI

func (self *WebGLFilterManager) BeginI(args ...interface{})

BeginI empty description

func (*WebGLFilterManager) Destroy

func (self *WebGLFilterManager) Destroy()

Destroy Destroys the filter and removes it from the filter stack.

func (*WebGLFilterManager) DestroyI

func (self *WebGLFilterManager) DestroyI(args ...interface{})

DestroyI Destroys the filter and removes it from the filter stack.

func (*WebGLFilterManager) FilterStack

func (self *WebGLFilterManager) FilterStack() []interface{}

FilterStack empty description

func (*WebGLFilterManager) InitShaderBuffers

func (self *WebGLFilterManager) InitShaderBuffers()

InitShaderBuffers Initialises the shader buffers.

func (*WebGLFilterManager) InitShaderBuffersI

func (self *WebGLFilterManager) InitShaderBuffersI(args ...interface{})

InitShaderBuffersI Initialises the shader buffers.

func (*WebGLFilterManager) OffsetX

func (self *WebGLFilterManager) OffsetX() int

OffsetX empty description

func (*WebGLFilterManager) OffsetY

func (self *WebGLFilterManager) OffsetY() int

OffsetY empty description

func (*WebGLFilterManager) PopFilter

func (self *WebGLFilterManager) PopFilter()

PopFilter Removes the last filter from the filter stack and doesn't return it.

func (*WebGLFilterManager) PopFilterI

func (self *WebGLFilterManager) PopFilterI(args ...interface{})

PopFilterI Removes the last filter from the filter stack and doesn't return it.

func (*WebGLFilterManager) PushFilter

func (self *WebGLFilterManager) PushFilter(filterBlock interface{})

PushFilter Applies the filter and adds it to the current filter stack.

func (*WebGLFilterManager) PushFilterI

func (self *WebGLFilterManager) PushFilterI(args ...interface{})

PushFilterI Applies the filter and adds it to the current filter stack.

func (*WebGLFilterManager) SetContext

func (self *WebGLFilterManager) SetContext(gl *WebGLContext)

SetContext Initialises the context and the properties.

func (*WebGLFilterManager) SetContextI

func (self *WebGLFilterManager) SetContextI(args ...interface{})

SetContextI Initialises the context and the properties.

func (*WebGLFilterManager) SetFilterStackA

func (self *WebGLFilterManager) SetFilterStackA(member []interface{})

SetFilterStackA empty description

func (*WebGLFilterManager) SetOffsetXA

func (self *WebGLFilterManager) SetOffsetXA(member int)

SetOffsetXA empty description

func (*WebGLFilterManager) SetOffsetYA

func (self *WebGLFilterManager) SetOffsetYA(member int)

SetOffsetYA empty description

type WebGLGraphics

type WebGLGraphics struct {
	*js.Object
}

WebGLGraphics A set of functions used by the webGL renderer to draw the primitive graphics data

func NewWebGLGraphics

func NewWebGLGraphics() *WebGLGraphics

NewWebGLGraphics A set of functions used by the webGL renderer to draw the primitive graphics data

func NewWebGLGraphicsI

func NewWebGLGraphicsI(args ...interface{}) *WebGLGraphics

NewWebGLGraphicsI A set of functions used by the webGL renderer to draw the primitive graphics data

func ToWebGLGraphics

func ToWebGLGraphics(jsStruct interface{}) *WebGLGraphics

WebGLGraphics Binding conversion method to WebGLGraphics point

func (*WebGLGraphics) BuildCircle

func (self *WebGLGraphics) BuildCircle(graphicsData *Graphics, webGLData interface{})

BuildCircle Builds a circle to draw

func (*WebGLGraphics) BuildCircleI

func (self *WebGLGraphics) BuildCircleI(args ...interface{})

BuildCircleI Builds a circle to draw

func (*WebGLGraphics) BuildComplexPoly

func (self *WebGLGraphics) BuildComplexPoly(graphicsData *Graphics, webGLData interface{})

BuildComplexPoly Builds a complex polygon to draw

func (*WebGLGraphics) BuildComplexPolyI

func (self *WebGLGraphics) BuildComplexPolyI(args ...interface{})

BuildComplexPolyI Builds a complex polygon to draw

func (*WebGLGraphics) BuildLine

func (self *WebGLGraphics) BuildLine(graphicsData *Graphics, webGLData interface{})

BuildLine Builds a line to draw

func (*WebGLGraphics) BuildLineI

func (self *WebGLGraphics) BuildLineI(args ...interface{})

BuildLineI Builds a line to draw

func (*WebGLGraphics) BuildPoly

func (self *WebGLGraphics) BuildPoly(graphicsData *Graphics, webGLData interface{})

BuildPoly Builds a polygon to draw

func (*WebGLGraphics) BuildPolyI

func (self *WebGLGraphics) BuildPolyI(args ...interface{})

BuildPolyI Builds a polygon to draw

func (*WebGLGraphics) BuildRectangle

func (self *WebGLGraphics) BuildRectangle(graphicsData *Graphics, webGLData interface{})

BuildRectangle Builds a rectangle to draw

func (*WebGLGraphics) BuildRectangleI

func (self *WebGLGraphics) BuildRectangleI(args ...interface{})

BuildRectangleI Builds a rectangle to draw

func (*WebGLGraphics) BuildRoundedRectangle

func (self *WebGLGraphics) BuildRoundedRectangle(graphicsData *Graphics, webGLData interface{})

BuildRoundedRectangle Builds a rounded rectangle to draw

func (*WebGLGraphics) BuildRoundedRectangleI

func (self *WebGLGraphics) BuildRoundedRectangleI(args ...interface{})

BuildRoundedRectangleI Builds a rounded rectangle to draw

func (*WebGLGraphics) QuadraticBezierCurve

func (self *WebGLGraphics) QuadraticBezierCurve(fromX int, fromY int, cpX int, cpY int, toX int, toY int) []int

QuadraticBezierCurve Calculate the points for a quadratic bezier curve. (helper function..)

Based on: https://stackoverflow.com/questions/785097/how-do-i-implement-a-bezier-curve-in-c

func (*WebGLGraphics) QuadraticBezierCurveI

func (self *WebGLGraphics) QuadraticBezierCurveI(args ...interface{}) []int

QuadraticBezierCurveI Calculate the points for a quadratic bezier curve. (helper function..)

Based on: https://stackoverflow.com/questions/785097/how-do-i-implement-a-bezier-curve-in-c

func (*WebGLGraphics) RenderGraphics

func (self *WebGLGraphics) RenderGraphics(graphics *Graphics, renderSession interface{})

RenderGraphics Renders the graphics object

func (*WebGLGraphics) RenderGraphicsI

func (self *WebGLGraphics) RenderGraphicsI(args ...interface{})

RenderGraphicsI Renders the graphics object

func (*WebGLGraphics) SwitchMode

func (self *WebGLGraphics) SwitchMode(webGL *WebGLContext, type_ int)

SwitchMode empty description

func (*WebGLGraphics) SwitchModeI

func (self *WebGLGraphics) SwitchModeI(args ...interface{})

SwitchModeI empty description

func (*WebGLGraphics) UpdateGraphics

func (self *WebGLGraphics) UpdateGraphics(graphicsData *Graphics, gl *WebGLContext)

UpdateGraphics Updates the graphics object

func (*WebGLGraphics) UpdateGraphicsI

func (self *WebGLGraphics) UpdateGraphicsI(args ...interface{})

UpdateGraphicsI Updates the graphics object

type WebGLGraphicsData

type WebGLGraphicsData struct {
	*js.Object
}

WebGLGraphicsData empty description

func NewWebGLGraphicsData

func NewWebGLGraphicsData() *WebGLGraphicsData

NewWebGLGraphicsData empty description

func NewWebGLGraphicsDataI

func NewWebGLGraphicsDataI(args ...interface{}) *WebGLGraphicsData

NewWebGLGraphicsDataI empty description

func ToWebGLGraphicsData

func ToWebGLGraphicsData(jsStruct interface{}) *WebGLGraphicsData

WebGLGraphicsData Binding conversion method to WebGLGraphicsData point

func (*WebGLGraphicsData) Reset

func (self *WebGLGraphicsData) Reset()

Reset empty description

func (*WebGLGraphicsData) ResetI

func (self *WebGLGraphicsData) ResetI(args ...interface{})

ResetI empty description

func (*WebGLGraphicsData) Upload

func (self *WebGLGraphicsData) Upload()

Upload empty description

func (*WebGLGraphicsData) UploadI

func (self *WebGLGraphicsData) UploadI(args ...interface{})

UploadI empty description

type WebGLMaskManager

type WebGLMaskManager struct {
	*js.Object
}

WebGLMaskManager empty description

func NewWebGLMaskManager

func NewWebGLMaskManager() *WebGLMaskManager

NewWebGLMaskManager empty description

func NewWebGLMaskManagerI

func NewWebGLMaskManagerI(args ...interface{}) *WebGLMaskManager

NewWebGLMaskManagerI empty description

func ToWebGLMaskManager

func ToWebGLMaskManager(jsStruct interface{}) *WebGLMaskManager

WebGLMaskManager Binding conversion method to WebGLMaskManager point

func (*WebGLMaskManager) Destroy

func (self *WebGLMaskManager) Destroy()

Destroy Destroys the mask stack.

func (*WebGLMaskManager) DestroyI

func (self *WebGLMaskManager) DestroyI(args ...interface{})

DestroyI Destroys the mask stack.

func (*WebGLMaskManager) PopMask

func (self *WebGLMaskManager) PopMask(maskData []interface{}, renderSession interface{})

PopMask Removes the last filter from the filter stack and doesn't return it.

func (*WebGLMaskManager) PopMaskI

func (self *WebGLMaskManager) PopMaskI(args ...interface{})

PopMaskI Removes the last filter from the filter stack and doesn't return it.

func (*WebGLMaskManager) PushMask

func (self *WebGLMaskManager) PushMask(maskData []interface{}, renderSession interface{})

PushMask Applies the Mask and adds it to the current filter stack.

func (*WebGLMaskManager) PushMaskI

func (self *WebGLMaskManager) PushMaskI(args ...interface{})

PushMaskI Applies the Mask and adds it to the current filter stack.

func (*WebGLMaskManager) SetContext

func (self *WebGLMaskManager) SetContext(gl *WebGLContext)

SetContext Sets the drawing context to the one given in parameter.

func (*WebGLMaskManager) SetContextI

func (self *WebGLMaskManager) SetContextI(args ...interface{})

SetContextI Sets the drawing context to the one given in parameter.

type WebGLRenderer

type WebGLRenderer struct {
	*js.Object
}

WebGLRenderer The WebGLRenderer draws the stage and all its content onto a webGL enabled canvas. This renderer

should be used for browsers that support webGL. This Render works by automatically managing webGLBatchs.

So no need for Sprite Batches or Sprite Clouds.

Don't forget to add the view to your DOM or you will not see anything :)

func NewWebGLRenderer

func NewWebGLRenderer(game *PhaserGame) *WebGLRenderer

NewWebGLRenderer The WebGLRenderer draws the stage and all its content onto a webGL enabled canvas. This renderer

should be used for browsers that support webGL. This Render works by automatically managing webGLBatchs.

So no need for Sprite Batches or Sprite Clouds.

Don't forget to add the view to your DOM or you will not see anything :)

func NewWebGLRendererI

func NewWebGLRendererI(args ...interface{}) *WebGLRenderer

NewWebGLRendererI The WebGLRenderer draws the stage and all its content onto a webGL enabled canvas. This renderer

should be used for browsers that support webGL. This Render works by automatically managing webGLBatchs.

So no need for Sprite Batches or Sprite Clouds.

Don't forget to add the view to your DOM or you will not see anything :)

func ToWebGLRenderer

func ToWebGLRenderer(jsStruct interface{}) *WebGLRenderer

WebGLRenderer Binding conversion method to WebGLRenderer point

func (*WebGLRenderer) AutoResize

func (self *WebGLRenderer) AutoResize() bool

AutoResize Whether the render view should be resized automatically

func (*WebGLRenderer) BlendModeManager

func (self *WebGLRenderer) BlendModeManager() *WebGLBlendModeManager

BlendModeManager Manages the blendModes

func (*WebGLRenderer) ClearBeforeRender

func (self *WebGLRenderer) ClearBeforeRender() bool

ClearBeforeRender This sets if the WebGLRenderer will clear the context texture or not before the new render pass. If true:

If the Stage is NOT transparent, Pixi will clear to alpha (0, 0, 0, 0).

If the Stage is transparent, Pixi will clear to the target Stage's background color.

Disable this by setting this to false. For example: if your game has a canvas filling background image, you often don't need this set.

func (*WebGLRenderer) Destroy

func (self *WebGLRenderer) Destroy()

Destroy Removes everything from the renderer (event listeners, spritebatch, etc...)

func (*WebGLRenderer) DestroyI

func (self *WebGLRenderer) DestroyI(args ...interface{})

DestroyI Removes everything from the renderer (event listeners, spritebatch, etc...)

func (*WebGLRenderer) FilterManager

func (self *WebGLRenderer) FilterManager() *WebGLFilterManager

FilterManager Manages the filters

func (*WebGLRenderer) Game

func (self *WebGLRenderer) Game() *PhaserGame

Game empty description

func (*WebGLRenderer) Height

func (self *WebGLRenderer) Height() int

Height The height of the canvas view

func (*WebGLRenderer) InitContext

func (self *WebGLRenderer) InitContext()

InitContext empty description

func (*WebGLRenderer) InitContextI

func (self *WebGLRenderer) InitContextI(args ...interface{})

InitContextI empty description

func (*WebGLRenderer) MapBlendModes

func (self *WebGLRenderer) MapBlendModes()

MapBlendModes Maps Pixi blend modes to WebGL blend modes.

func (*WebGLRenderer) MapBlendModesI

func (self *WebGLRenderer) MapBlendModesI(args ...interface{})

MapBlendModesI Maps Pixi blend modes to WebGL blend modes.

func (*WebGLRenderer) MaskManager

func (self *WebGLRenderer) MaskManager() *WebGLMaskManager

MaskManager Manages the masks using the stencil buffer

func (*WebGLRenderer) Offset

func (self *WebGLRenderer) Offset() *Point

Offset empty description

func (*WebGLRenderer) PreserveDrawingBuffer

func (self *WebGLRenderer) PreserveDrawingBuffer() bool

PreserveDrawingBuffer The value of the preserveDrawingBuffer flag affects whether or not the contents of the stencil buffer is retained after rendering.

func (*WebGLRenderer) Projection

func (self *WebGLRenderer) Projection() *Point

Projection empty description

func (*WebGLRenderer) Render

func (self *WebGLRenderer) Render(stage *Stage)

Render Renders the stage to its webGL view

func (*WebGLRenderer) RenderDisplayObject

func (self *WebGLRenderer) RenderDisplayObject(displayObject *DisplayObject, projection *Point, buffer []interface{})

RenderDisplayObject Renders a Display Object.

func (*WebGLRenderer) RenderDisplayObjectI

func (self *WebGLRenderer) RenderDisplayObjectI(args ...interface{})

RenderDisplayObjectI Renders a Display Object.

func (*WebGLRenderer) RenderI

func (self *WebGLRenderer) RenderI(args ...interface{})

RenderI Renders the stage to its webGL view

func (*WebGLRenderer) RenderSession

func (self *WebGLRenderer) RenderSession() interface{}

RenderSession empty description

func (*WebGLRenderer) Resize

func (self *WebGLRenderer) Resize(width int, height int)

Resize Resizes the webGL view to the specified width and height.

func (*WebGLRenderer) ResizeI

func (self *WebGLRenderer) ResizeI(args ...interface{})

ResizeI Resizes the webGL view to the specified width and height.

func (*WebGLRenderer) Resolution

func (self *WebGLRenderer) Resolution() int

Resolution The resolution of the renderer

func (*WebGLRenderer) SetAutoResizeA

func (self *WebGLRenderer) SetAutoResizeA(member bool)

SetAutoResizeA Whether the render view should be resized automatically

func (*WebGLRenderer) SetBlendModeManagerA

func (self *WebGLRenderer) SetBlendModeManagerA(member *WebGLBlendModeManager)

SetBlendModeManagerA Manages the blendModes

func (*WebGLRenderer) SetClearBeforeRenderA

func (self *WebGLRenderer) SetClearBeforeRenderA(member bool)

SetClearBeforeRenderA This sets if the WebGLRenderer will clear the context texture or not before the new render pass. If true:

If the Stage is NOT transparent, Pixi will clear to alpha (0, 0, 0, 0).

If the Stage is transparent, Pixi will clear to the target Stage's background color.

Disable this by setting this to false. For example: if your game has a canvas filling background image, you often don't need this set.

func (*WebGLRenderer) SetFilterManagerA

func (self *WebGLRenderer) SetFilterManagerA(member *WebGLFilterManager)

SetFilterManagerA Manages the filters

func (*WebGLRenderer) SetGameA

func (self *WebGLRenderer) SetGameA(member *PhaserGame)

SetGameA empty description

func (*WebGLRenderer) SetHeightA

func (self *WebGLRenderer) SetHeightA(member int)

SetHeightA The height of the canvas view

func (*WebGLRenderer) SetMaskManagerA

func (self *WebGLRenderer) SetMaskManagerA(member *WebGLMaskManager)

SetMaskManagerA Manages the masks using the stencil buffer

func (*WebGLRenderer) SetOffsetA

func (self *WebGLRenderer) SetOffsetA(member *Point)

SetOffsetA empty description

func (*WebGLRenderer) SetPreserveDrawingBufferA

func (self *WebGLRenderer) SetPreserveDrawingBufferA(member bool)

SetPreserveDrawingBufferA The value of the preserveDrawingBuffer flag affects whether or not the contents of the stencil buffer is retained after rendering.

func (*WebGLRenderer) SetProjectionA

func (self *WebGLRenderer) SetProjectionA(member *Point)

SetProjectionA empty description

func (*WebGLRenderer) SetRenderSessionA

func (self *WebGLRenderer) SetRenderSessionA(member interface{})

SetRenderSessionA empty description

func (*WebGLRenderer) SetResolutionA

func (self *WebGLRenderer) SetResolutionA(member int)

SetResolutionA The resolution of the renderer

func (*WebGLRenderer) SetShaderManagerA

func (self *WebGLRenderer) SetShaderManagerA(member *WebGLShaderManager)

SetShaderManagerA Deals with managing the shader programs and their attribs

func (*WebGLRenderer) SetSpriteBatchA

func (self *WebGLRenderer) SetSpriteBatchA(member *WebGLSpriteBatch)

SetSpriteBatchA Manages the rendering of sprites

func (*WebGLRenderer) SetStencilManagerA

func (self *WebGLRenderer) SetStencilManagerA(member *WebGLStencilManager)

SetStencilManagerA Manages the stencil buffer

func (*WebGLRenderer) SetTransparentA

func (self *WebGLRenderer) SetTransparentA(member bool)

SetTransparentA Whether the render view is transparent

func (*WebGLRenderer) SetTypeA

func (self *WebGLRenderer) SetTypeA(member int)

SetTypeA empty description

func (*WebGLRenderer) SetViewA

func (self *WebGLRenderer) SetViewA(member dom.HTMLCanvasElement)

SetViewA The canvas element that everything is drawn to

func (*WebGLRenderer) SetWidthA

func (self *WebGLRenderer) SetWidthA(member int)

SetWidthA The width of the canvas view

func (*WebGLRenderer) ShaderManager

func (self *WebGLRenderer) ShaderManager() *WebGLShaderManager

ShaderManager Deals with managing the shader programs and their attribs

func (*WebGLRenderer) SpriteBatch

func (self *WebGLRenderer) SpriteBatch() *WebGLSpriteBatch

SpriteBatch Manages the rendering of sprites

func (*WebGLRenderer) StencilManager

func (self *WebGLRenderer) StencilManager() *WebGLStencilManager

StencilManager Manages the stencil buffer

func (*WebGLRenderer) Transparent

func (self *WebGLRenderer) Transparent() bool

Transparent Whether the render view is transparent

func (*WebGLRenderer) Type

func (self *WebGLRenderer) Type() int

Type empty description

func (*WebGLRenderer) UpdateTexture

func (self *WebGLRenderer) UpdateTexture(texture *Texture) bool

UpdateTexture Updates and Creates a WebGL texture for the renderers context.

func (*WebGLRenderer) UpdateTextureI

func (self *WebGLRenderer) UpdateTextureI(args ...interface{}) bool

UpdateTextureI Updates and Creates a WebGL texture for the renderers context.

func (*WebGLRenderer) View

func (self *WebGLRenderer) View() dom.HTMLCanvasElement

View The canvas element that everything is drawn to

func (*WebGLRenderer) Width

func (self *WebGLRenderer) Width() int

Width The width of the canvas view

type WebGLShaderManager

type WebGLShaderManager struct {
	*js.Object
}

WebGLShaderManager empty description

func NewWebGLShaderManager

func NewWebGLShaderManager() *WebGLShaderManager

NewWebGLShaderManager empty description

func NewWebGLShaderManagerI

func NewWebGLShaderManagerI(args ...interface{}) *WebGLShaderManager

NewWebGLShaderManagerI empty description

func ToWebGLShaderManager

func ToWebGLShaderManager(jsStruct interface{}) *WebGLShaderManager

WebGLShaderManager Binding conversion method to WebGLShaderManager point

func (*WebGLShaderManager) AttribState

func (self *WebGLShaderManager) AttribState() []interface{}

AttribState empty description

func (*WebGLShaderManager) Destroy

func (self *WebGLShaderManager) Destroy()

Destroy Destroys this object.

func (*WebGLShaderManager) DestroyI

func (self *WebGLShaderManager) DestroyI(args ...interface{})

DestroyI Destroys this object.

func (*WebGLShaderManager) MaxAttibs

func (self *WebGLShaderManager) MaxAttibs() int

MaxAttibs empty description

func (*WebGLShaderManager) SetAttribStateA

func (self *WebGLShaderManager) SetAttribStateA(member []interface{})

SetAttribStateA empty description

func (*WebGLShaderManager) SetAttribs

func (self *WebGLShaderManager) SetAttribs(attribs []interface{})

SetAttribs Takes the attributes given in parameters.

func (*WebGLShaderManager) SetAttribsI

func (self *WebGLShaderManager) SetAttribsI(args ...interface{})

SetAttribsI Takes the attributes given in parameters.

func (*WebGLShaderManager) SetContext

func (self *WebGLShaderManager) SetContext(gl *WebGLContext)

SetContext Initialises the context and the properties.

func (*WebGLShaderManager) SetContextI

func (self *WebGLShaderManager) SetContextI(args ...interface{})

SetContextI Initialises the context and the properties.

func (*WebGLShaderManager) SetMaxAttibsA

func (self *WebGLShaderManager) SetMaxAttibsA(member int)

SetMaxAttibsA empty description

func (*WebGLShaderManager) SetShader

func (self *WebGLShaderManager) SetShader(shader interface{})

SetShader Sets the current shader.

func (*WebGLShaderManager) SetShaderI

func (self *WebGLShaderManager) SetShaderI(args ...interface{})

SetShaderI Sets the current shader.

func (*WebGLShaderManager) SetStackA

func (self *WebGLShaderManager) SetStackA(member []interface{})

SetStackA empty description

func (*WebGLShaderManager) SetTempAttribStateA

func (self *WebGLShaderManager) SetTempAttribStateA(member []interface{})

SetTempAttribStateA empty description

func (*WebGLShaderManager) Stack

func (self *WebGLShaderManager) Stack() []interface{}

Stack empty description

func (*WebGLShaderManager) TempAttribState

func (self *WebGLShaderManager) TempAttribState() []interface{}

TempAttribState empty description

type WebGLSpriteBatch

type WebGLSpriteBatch struct {
	*js.Object
}

WebGLSpriteBatch empty description

func NewWebGLSpriteBatch

func NewWebGLSpriteBatch() *WebGLSpriteBatch

NewWebGLSpriteBatch empty description

func NewWebGLSpriteBatchI

func NewWebGLSpriteBatchI(args ...interface{}) *WebGLSpriteBatch

NewWebGLSpriteBatchI empty description

func ToWebGLSpriteBatch

func ToWebGLSpriteBatch(jsStruct interface{}) *WebGLSpriteBatch

WebGLSpriteBatch Binding conversion method to WebGLSpriteBatch point

func (*WebGLSpriteBatch) Begin

func (self *WebGLSpriteBatch) Begin(renderSession interface{})

Begin empty description

func (*WebGLSpriteBatch) BeginI

func (self *WebGLSpriteBatch) BeginI(args ...interface{})

BeginI empty description

func (*WebGLSpriteBatch) BlendModes

func (self *WebGLSpriteBatch) BlendModes() []interface{}

BlendModes empty description

func (*WebGLSpriteBatch) Colors

func (self *WebGLSpriteBatch) Colors() *Uint32Array

Colors View on the vertices as a Uint32Array

func (*WebGLSpriteBatch) CompileFragmentShader

func (self *WebGLSpriteBatch) CompileFragmentShader(gl *WebGLContext, shaderSrc []interface{})

CompileFragmentShader empty description

func (*WebGLSpriteBatch) CompileFragmentShaderI

func (self *WebGLSpriteBatch) CompileFragmentShaderI(args ...interface{})

CompileFragmentShaderI empty description

func (*WebGLSpriteBatch) CompileProgram

func (self *WebGLSpriteBatch) CompileProgram(gl *WebGLContext, vertexSrc []interface{}, fragmentSrc []interface{})

CompileProgram empty description

func (*WebGLSpriteBatch) CompileProgramI

func (self *WebGLSpriteBatch) CompileProgramI(args ...interface{})

CompileProgramI empty description

func (*WebGLSpriteBatch) CompileVertexShader

func (self *WebGLSpriteBatch) CompileVertexShader(gl *WebGLContext, shaderSrc []interface{})

CompileVertexShader empty description

func (*WebGLSpriteBatch) CompileVertexShaderI

func (self *WebGLSpriteBatch) CompileVertexShaderI(args ...interface{})

CompileVertexShaderI empty description

func (*WebGLSpriteBatch) CurrentBaseTexture

func (self *WebGLSpriteBatch) CurrentBaseTexture() *BaseTexture

CurrentBaseTexture empty description

func (*WebGLSpriteBatch) CurrentBatchSize

func (self *WebGLSpriteBatch) CurrentBatchSize() int

CurrentBatchSize empty description

func (*WebGLSpriteBatch) DefaultShader

func (self *WebGLSpriteBatch) DefaultShader() *AbstractFilter

DefaultShader empty description

func (*WebGLSpriteBatch) Destroy

func (self *WebGLSpriteBatch) Destroy()

Destroy Destroys the SpriteBatch.

func (*WebGLSpriteBatch) DestroyI

func (self *WebGLSpriteBatch) DestroyI(args ...interface{})

DestroyI Destroys the SpriteBatch.

func (*WebGLSpriteBatch) Dirty

func (self *WebGLSpriteBatch) Dirty() bool

Dirty empty description

func (*WebGLSpriteBatch) Drawing

func (self *WebGLSpriteBatch) Drawing() bool

Drawing empty description

func (*WebGLSpriteBatch) End

func (self *WebGLSpriteBatch) End()

End empty description

func (*WebGLSpriteBatch) EndI

func (self *WebGLSpriteBatch) EndI(args ...interface{})

EndI empty description

func (*WebGLSpriteBatch) Flush

func (self *WebGLSpriteBatch) Flush()

Flush Renders the content and empties the current batch.

func (*WebGLSpriteBatch) FlushI

func (self *WebGLSpriteBatch) FlushI(args ...interface{})

FlushI Renders the content and empties the current batch.

func (*WebGLSpriteBatch) Indices

func (self *WebGLSpriteBatch) Indices() *Uint16Array

Indices Holds the indices

func (*WebGLSpriteBatch) InitDefaultShaders

func (self *WebGLSpriteBatch) InitDefaultShaders()

InitDefaultShaders empty description

func (*WebGLSpriteBatch) InitDefaultShadersI

func (self *WebGLSpriteBatch) InitDefaultShadersI(args ...interface{})

InitDefaultShadersI empty description

func (*WebGLSpriteBatch) LastIndexCount

func (self *WebGLSpriteBatch) LastIndexCount() int

LastIndexCount empty description

func (*WebGLSpriteBatch) Positions

func (self *WebGLSpriteBatch) Positions() *Float32Array

Positions View on the vertices as a Float32Array

func (*WebGLSpriteBatch) Render

func (self *WebGLSpriteBatch) Render(sprite *Sprite)

Render empty description

func (*WebGLSpriteBatch) Render1O

func (self *WebGLSpriteBatch) Render1O(sprite *Sprite, matrix *Matrix)

Render1O empty description

func (*WebGLSpriteBatch) RenderBatch

func (self *WebGLSpriteBatch) RenderBatch(texture *Texture, size int, startIndex int)

RenderBatch empty description

func (*WebGLSpriteBatch) RenderBatchI

func (self *WebGLSpriteBatch) RenderBatchI(args ...interface{})

RenderBatchI empty description

func (*WebGLSpriteBatch) RenderI

func (self *WebGLSpriteBatch) RenderI(args ...interface{})

RenderI empty description

func (*WebGLSpriteBatch) RenderTilingSprite

func (self *WebGLSpriteBatch) RenderTilingSprite(sprite *TilingSprite)

RenderTilingSprite Renders a TilingSprite using the spriteBatch.

func (*WebGLSpriteBatch) RenderTilingSpriteI

func (self *WebGLSpriteBatch) RenderTilingSpriteI(args ...interface{})

RenderTilingSpriteI Renders a TilingSprite using the spriteBatch.

func (*WebGLSpriteBatch) SetBlendModesA

func (self *WebGLSpriteBatch) SetBlendModesA(member []interface{})

SetBlendModesA empty description

func (*WebGLSpriteBatch) SetColorsA

func (self *WebGLSpriteBatch) SetColorsA(member *Uint32Array)

SetColorsA View on the vertices as a Uint32Array

func (*WebGLSpriteBatch) SetContext

func (self *WebGLSpriteBatch) SetContext(gl *WebGLContext)

SetContext empty description

func (*WebGLSpriteBatch) SetContextI

func (self *WebGLSpriteBatch) SetContextI(args ...interface{})

SetContextI empty description

func (*WebGLSpriteBatch) SetCurrentBaseTextureA

func (self *WebGLSpriteBatch) SetCurrentBaseTextureA(member *BaseTexture)

SetCurrentBaseTextureA empty description

func (*WebGLSpriteBatch) SetCurrentBatchSizeA

func (self *WebGLSpriteBatch) SetCurrentBatchSizeA(member int)

SetCurrentBatchSizeA empty description

func (*WebGLSpriteBatch) SetDefaultShaderA

func (self *WebGLSpriteBatch) SetDefaultShaderA(member *AbstractFilter)

SetDefaultShaderA empty description

func (*WebGLSpriteBatch) SetDirtyA

func (self *WebGLSpriteBatch) SetDirtyA(member bool)

SetDirtyA empty description

func (*WebGLSpriteBatch) SetDrawingA

func (self *WebGLSpriteBatch) SetDrawingA(member bool)

SetDrawingA empty description

func (*WebGLSpriteBatch) SetIndicesA

func (self *WebGLSpriteBatch) SetIndicesA(member *Uint16Array)

SetIndicesA Holds the indices

func (*WebGLSpriteBatch) SetLastIndexCountA

func (self *WebGLSpriteBatch) SetLastIndexCountA(member int)

SetLastIndexCountA empty description

func (*WebGLSpriteBatch) SetPositionsA

func (self *WebGLSpriteBatch) SetPositionsA(member *Float32Array)

SetPositionsA View on the vertices as a Float32Array

func (*WebGLSpriteBatch) SetShadersA

func (self *WebGLSpriteBatch) SetShadersA(member []interface{})

SetShadersA empty description

func (*WebGLSpriteBatch) SetSizeA

func (self *WebGLSpriteBatch) SetSizeA(member int)

SetSizeA The number of images in the SpriteBatch before it flushes

func (*WebGLSpriteBatch) SetSpritesA

func (self *WebGLSpriteBatch) SetSpritesA(member []interface{})

SetSpritesA empty description

func (*WebGLSpriteBatch) SetTexturesA

func (self *WebGLSpriteBatch) SetTexturesA(member []interface{})

SetTexturesA empty description

func (*WebGLSpriteBatch) SetVertSizeA

func (self *WebGLSpriteBatch) SetVertSizeA(member int)

SetVertSizeA empty description

func (*WebGLSpriteBatch) SetVerticesA

func (self *WebGLSpriteBatch) SetVerticesA(member *ArrayBuffer)

SetVerticesA Holds the vertices

func (*WebGLSpriteBatch) Shaders

func (self *WebGLSpriteBatch) Shaders() []interface{}

Shaders empty description

func (*WebGLSpriteBatch) Size

func (self *WebGLSpriteBatch) Size() int

Size The number of images in the SpriteBatch before it flushes

func (*WebGLSpriteBatch) Sprites

func (self *WebGLSpriteBatch) Sprites() []interface{}

Sprites empty description

func (*WebGLSpriteBatch) Start

func (self *WebGLSpriteBatch) Start()

Start empty description

func (*WebGLSpriteBatch) StartI

func (self *WebGLSpriteBatch) StartI(args ...interface{})

StartI empty description

func (*WebGLSpriteBatch) Stop

func (self *WebGLSpriteBatch) Stop()

Stop empty description

func (*WebGLSpriteBatch) StopI

func (self *WebGLSpriteBatch) StopI(args ...interface{})

StopI empty description

func (*WebGLSpriteBatch) Textures

func (self *WebGLSpriteBatch) Textures() []interface{}

Textures empty description

func (*WebGLSpriteBatch) VertSize

func (self *WebGLSpriteBatch) VertSize() int

VertSize empty description

func (*WebGLSpriteBatch) Vertices

func (self *WebGLSpriteBatch) Vertices() *ArrayBuffer

Vertices Holds the vertices

type WebGLStencilManager

type WebGLStencilManager struct {
	*js.Object
}

WebGLStencilManager empty description

func NewWebGLStencilManager

func NewWebGLStencilManager() *WebGLStencilManager

NewWebGLStencilManager empty description

func NewWebGLStencilManagerI

func NewWebGLStencilManagerI(args ...interface{}) *WebGLStencilManager

NewWebGLStencilManagerI empty description

func ToWebGLStencilManager

func ToWebGLStencilManager(jsStruct interface{}) *WebGLStencilManager

WebGLStencilManager Binding conversion method to WebGLStencilManager point

func (*WebGLStencilManager) BindGraphics

func (self *WebGLStencilManager) BindGraphics(graphics *Graphics, webGLData []interface{}, renderSession interface{})

BindGraphics TODO this does not belong here!

func (*WebGLStencilManager) BindGraphicsI

func (self *WebGLStencilManager) BindGraphicsI(args ...interface{})

BindGraphicsI TODO this does not belong here!

func (*WebGLStencilManager) Destroy

func (self *WebGLStencilManager) Destroy()

Destroy Destroys the mask stack.

func (*WebGLStencilManager) DestroyI

func (self *WebGLStencilManager) DestroyI(args ...interface{})

DestroyI Destroys the mask stack.

func (*WebGLStencilManager) PopStencil

func (self *WebGLStencilManager) PopStencil(graphics *Graphics, webGLData []interface{}, renderSession interface{})

PopStencil empty description

func (*WebGLStencilManager) PopStencilI

func (self *WebGLStencilManager) PopStencilI(args ...interface{})

PopStencilI empty description

func (*WebGLStencilManager) PushMask

func (self *WebGLStencilManager) PushMask(graphics *Graphics, webGLData []interface{}, renderSession interface{})

PushMask Applies the Mask and adds it to the current filter stack.

func (*WebGLStencilManager) PushMaskI

func (self *WebGLStencilManager) PushMaskI(args ...interface{})

PushMaskI Applies the Mask and adds it to the current filter stack.

func (*WebGLStencilManager) SetContext

func (self *WebGLStencilManager) SetContext(gl *WebGLContext)

SetContext Sets the drawing context to the one given in parameter.

func (*WebGLStencilManager) SetContextI

func (self *WebGLStencilManager) SetContextI(args ...interface{})

SetContextI Sets the drawing context to the one given in parameter.

type World

type World struct {
	*js.Object
}

World "This world is but a canvas to our imagination." - Henry David Thoreau

A game has only one world. The world is an abstract place in which all game objects live. It is not bound by stage limits and can be any size. You look into the world via cameras. All game objects live within the world at world-based coordinates. By default a world is created the same size as your Stage.

func NewWorld

func NewWorld(game *Game) *World

NewWorld "This world is but a canvas to our imagination." - Henry David Thoreau

A game has only one world. The world is an abstract place in which all game objects live. It is not bound by stage limits and can be any size. You look into the world via cameras. All game objects live within the world at world-based coordinates. By default a world is created the same size as your Stage.

func NewWorldI

func NewWorldI(args ...interface{}) *World

NewWorldI "This world is but a canvas to our imagination." - Henry David Thoreau

A game has only one world. The world is an abstract place in which all game objects live. It is not bound by stage limits and can be any size. You look into the world via cameras. All game objects live within the world at world-based coordinates. By default a world is created the same size as your Stage.

func ToWorld

func ToWorld(jsStruct interface{}) *World

World Binding conversion method to World point

func (*World) Add

func (self *World) Add(child *DisplayObject) *DisplayObject

Add Adds an existing object as the top child in this group.

The child is automatically added to the top of the group, and is displayed above every previous child.

Or if the _optional_ index is specified, the child is added at the location specified by the index value, this allows you to control child ordering.

If the child was already in this Group, it is simply returned, and nothing else happens to it.

If `Group.enableBody` is set, then a physics body will be created on the object, so long as one does not already exist.

If `Group.inputEnableChildren` is set, then an Input Handler will be created on the object, so long as one does not already exist.

Use {@link Phaser.Group#addAt addAt} to control where a child is added. Use {@link Phaser.Group#create create} to create and add a new child.

func (*World) Add1O

func (self *World) Add1O(child *DisplayObject, silent bool) *DisplayObject

Add1O Adds an existing object as the top child in this group.

The child is automatically added to the top of the group, and is displayed above every previous child.

Or if the _optional_ index is specified, the child is added at the location specified by the index value, this allows you to control child ordering.

If the child was already in this Group, it is simply returned, and nothing else happens to it.

If `Group.enableBody` is set, then a physics body will be created on the object, so long as one does not already exist.

If `Group.inputEnableChildren` is set, then an Input Handler will be created on the object, so long as one does not already exist.

Use {@link Phaser.Group#addAt addAt} to control where a child is added. Use {@link Phaser.Group#create create} to create and add a new child.

func (*World) Add2O

func (self *World) Add2O(child *DisplayObject, silent bool, index int) *DisplayObject

Add2O Adds an existing object as the top child in this group.

The child is automatically added to the top of the group, and is displayed above every previous child.

Or if the _optional_ index is specified, the child is added at the location specified by the index value, this allows you to control child ordering.

If the child was already in this Group, it is simply returned, and nothing else happens to it.

If `Group.enableBody` is set, then a physics body will be created on the object, so long as one does not already exist.

If `Group.inputEnableChildren` is set, then an Input Handler will be created on the object, so long as one does not already exist.

Use {@link Phaser.Group#addAt addAt} to control where a child is added. Use {@link Phaser.Group#create create} to create and add a new child.

func (*World) AddAll

func (self *World) AddAll(property string, amount int, checkAlive bool, checkVisible bool)

AddAll Adds the amount to the given property on all children in this group.

`Group.addAll('x', 10)` will add 10 to the child.x value for each child.

func (*World) AddAllI

func (self *World) AddAllI(args ...interface{})

AddAllI Adds the amount to the given property on all children in this group.

`Group.addAll('x', 10)` will add 10 to the child.x value for each child.

func (*World) AddAt

func (self *World) AddAt(child *DisplayObject) *DisplayObject

AddAt Adds an existing object to this group.

The child is added to the group at the location specified by the index value, this allows you to control child ordering.

If `Group.enableBody` is set, then a physics body will be created on the object, so long as one does not already exist.

If `Group.inputEnableChildren` is set, then an Input Handler will be created on the object, so long as one does not already exist.

func (*World) AddAt1O

func (self *World) AddAt1O(child *DisplayObject, index int) *DisplayObject

AddAt1O Adds an existing object to this group.

The child is added to the group at the location specified by the index value, this allows you to control child ordering.

If `Group.enableBody` is set, then a physics body will be created on the object, so long as one does not already exist.

If `Group.inputEnableChildren` is set, then an Input Handler will be created on the object, so long as one does not already exist.

func (*World) AddAt2O

func (self *World) AddAt2O(child *DisplayObject, index int, silent bool) *DisplayObject

AddAt2O Adds an existing object to this group.

The child is added to the group at the location specified by the index value, this allows you to control child ordering.

If `Group.enableBody` is set, then a physics body will be created on the object, so long as one does not already exist.

If `Group.inputEnableChildren` is set, then an Input Handler will be created on the object, so long as one does not already exist.

func (*World) AddAtI

func (self *World) AddAtI(args ...interface{}) *DisplayObject

AddAtI Adds an existing object to this group.

The child is added to the group at the location specified by the index value, this allows you to control child ordering.

If `Group.enableBody` is set, then a physics body will be created on the object, so long as one does not already exist.

If `Group.inputEnableChildren` is set, then an Input Handler will be created on the object, so long as one does not already exist.

func (*World) AddChild

func (self *World) AddChild(child *DisplayObject) *DisplayObject

AddChild Adds a child to the container.

func (*World) AddChildAt

func (self *World) AddChildAt(child *DisplayObject, index int) *DisplayObject

AddChildAt Adds a child to the container at a specified index. If the index is out of bounds an error will be thrown

func (*World) AddChildAtI

func (self *World) AddChildAtI(args ...interface{}) *DisplayObject

AddChildAtI Adds a child to the container at a specified index. If the index is out of bounds an error will be thrown

func (*World) AddChildI

func (self *World) AddChildI(args ...interface{}) *DisplayObject

AddChildI Adds a child to the container.

func (*World) AddI

func (self *World) AddI(args ...interface{}) *DisplayObject

AddI Adds an existing object as the top child in this group.

The child is automatically added to the top of the group, and is displayed above every previous child.

Or if the _optional_ index is specified, the child is added at the location specified by the index value, this allows you to control child ordering.

If the child was already in this Group, it is simply returned, and nothing else happens to it.

If `Group.enableBody` is set, then a physics body will be created on the object, so long as one does not already exist.

If `Group.inputEnableChildren` is set, then an Input Handler will be created on the object, so long as one does not already exist.

Use {@link Phaser.Group#addAt addAt} to control where a child is added. Use {@link Phaser.Group#create create} to create and add a new child.

func (*World) AddMultiple

func (self *World) AddMultiple(children interface{}) interface{}

AddMultiple Adds an array of existing Display Objects to this Group.

The Display Objects are automatically added to the top of this Group, and will render on-top of everything already in this Group.

As well as an array you can also pass another Group as the first argument. In this case all of the children from that Group will be removed from it and added into this Group.

If `Group.enableBody` is set, then a physics body will be created on the objects, so long as one does not already exist.

If `Group.inputEnableChildren` is set, then an Input Handler will be created on the objects, so long as one does not already exist.

func (*World) AddMultiple1O

func (self *World) AddMultiple1O(children interface{}, silent bool) interface{}

AddMultiple1O Adds an array of existing Display Objects to this Group.

The Display Objects are automatically added to the top of this Group, and will render on-top of everything already in this Group.

As well as an array you can also pass another Group as the first argument. In this case all of the children from that Group will be removed from it and added into this Group.

If `Group.enableBody` is set, then a physics body will be created on the objects, so long as one does not already exist.

If `Group.inputEnableChildren` is set, then an Input Handler will be created on the objects, so long as one does not already exist.

func (*World) AddMultipleI

func (self *World) AddMultipleI(args ...interface{}) interface{}

AddMultipleI Adds an array of existing Display Objects to this Group.

The Display Objects are automatically added to the top of this Group, and will render on-top of everything already in this Group.

As well as an array you can also pass another Group as the first argument. In this case all of the children from that Group will be removed from it and added into this Group.

If `Group.enableBody` is set, then a physics body will be created on the objects, so long as one does not already exist.

If `Group.inputEnableChildren` is set, then an Input Handler will be created on the objects, so long as one does not already exist.

func (*World) AddToHash

func (self *World) AddToHash(child *DisplayObject) bool

AddToHash Adds a child of this Group into the hash array. This call will return false if the child is not a child of this Group, or is already in the hash.

func (*World) AddToHashI

func (self *World) AddToHashI(args ...interface{}) bool

AddToHashI Adds a child of this Group into the hash array. This call will return false if the child is not a child of this Group, or is already in the hash.

func (*World) Align

func (self *World) Align(width int, height int, cellWidth int, cellHeight int) bool

Align This method iterates through all children in the Group (regardless if they are visible or exist) and then changes their position so they are arranged in a Grid formation. Children must have the `alignTo` method in order to be positioned by this call. All default Phaser Game Objects have this.

The grid dimensions are determined by the first four arguments. The `width` and `height` arguments relate to the width and height of the grid respectively.

For example if the Group had 100 children in it:

`Group.align(10, 10, 32, 32)`

This will align all of the children into a grid formation of 10x10, using 32 pixels per grid cell. If you want a wider grid, you could do:

`Group.align(25, 4, 32, 32)`

This will align the children into a grid of 25x4, again using 32 pixels per grid cell.

You can choose to set _either_ the `width` or `height` value to -1. Doing so tells the method to keep on aligning children until there are no children left. For example if this Group had 48 children in it, the following:

`Group.align(-1, 8, 32, 32)`

... will align the children so that there are 8 children vertically (the second argument), and each row will contain 6 sprites, except the last one, which will contain 5 (totaling 48)

You can also do:

`Group.align(10, -1, 32, 32)`

In this case it will create a grid 10 wide, and as tall as it needs to be in order to fit all of the children in.

The `position` property allows you to control where in each grid cell the child is positioned. This is a constant and can be one of `Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` or `Phaser.BOTTOM_RIGHT`.

The final argument; `offset` lets you start the alignment from a specific child index.

func (*World) Align1O

func (self *World) Align1O(width int, height int, cellWidth int, cellHeight int, position int) bool

Align1O This method iterates through all children in the Group (regardless if they are visible or exist) and then changes their position so they are arranged in a Grid formation. Children must have the `alignTo` method in order to be positioned by this call. All default Phaser Game Objects have this.

The grid dimensions are determined by the first four arguments. The `width` and `height` arguments relate to the width and height of the grid respectively.

For example if the Group had 100 children in it:

`Group.align(10, 10, 32, 32)`

This will align all of the children into a grid formation of 10x10, using 32 pixels per grid cell. If you want a wider grid, you could do:

`Group.align(25, 4, 32, 32)`

This will align the children into a grid of 25x4, again using 32 pixels per grid cell.

You can choose to set _either_ the `width` or `height` value to -1. Doing so tells the method to keep on aligning children until there are no children left. For example if this Group had 48 children in it, the following:

`Group.align(-1, 8, 32, 32)`

... will align the children so that there are 8 children vertically (the second argument), and each row will contain 6 sprites, except the last one, which will contain 5 (totaling 48)

You can also do:

`Group.align(10, -1, 32, 32)`

In this case it will create a grid 10 wide, and as tall as it needs to be in order to fit all of the children in.

The `position` property allows you to control where in each grid cell the child is positioned. This is a constant and can be one of `Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` or `Phaser.BOTTOM_RIGHT`.

The final argument; `offset` lets you start the alignment from a specific child index.

func (*World) Align2O

func (self *World) Align2O(width int, height int, cellWidth int, cellHeight int, position int, offset int) bool

Align2O This method iterates through all children in the Group (regardless if they are visible or exist) and then changes their position so they are arranged in a Grid formation. Children must have the `alignTo` method in order to be positioned by this call. All default Phaser Game Objects have this.

The grid dimensions are determined by the first four arguments. The `width` and `height` arguments relate to the width and height of the grid respectively.

For example if the Group had 100 children in it:

`Group.align(10, 10, 32, 32)`

This will align all of the children into a grid formation of 10x10, using 32 pixels per grid cell. If you want a wider grid, you could do:

`Group.align(25, 4, 32, 32)`

This will align the children into a grid of 25x4, again using 32 pixels per grid cell.

You can choose to set _either_ the `width` or `height` value to -1. Doing so tells the method to keep on aligning children until there are no children left. For example if this Group had 48 children in it, the following:

`Group.align(-1, 8, 32, 32)`

... will align the children so that there are 8 children vertically (the second argument), and each row will contain 6 sprites, except the last one, which will contain 5 (totaling 48)

You can also do:

`Group.align(10, -1, 32, 32)`

In this case it will create a grid 10 wide, and as tall as it needs to be in order to fit all of the children in.

The `position` property allows you to control where in each grid cell the child is positioned. This is a constant and can be one of `Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` or `Phaser.BOTTOM_RIGHT`.

The final argument; `offset` lets you start the alignment from a specific child index.

func (*World) AlignI

func (self *World) AlignI(args ...interface{}) bool

AlignI This method iterates through all children in the Group (regardless if they are visible or exist) and then changes their position so they are arranged in a Grid formation. Children must have the `alignTo` method in order to be positioned by this call. All default Phaser Game Objects have this.

The grid dimensions are determined by the first four arguments. The `width` and `height` arguments relate to the width and height of the grid respectively.

For example if the Group had 100 children in it:

`Group.align(10, 10, 32, 32)`

This will align all of the children into a grid formation of 10x10, using 32 pixels per grid cell. If you want a wider grid, you could do:

`Group.align(25, 4, 32, 32)`

This will align the children into a grid of 25x4, again using 32 pixels per grid cell.

You can choose to set _either_ the `width` or `height` value to -1. Doing so tells the method to keep on aligning children until there are no children left. For example if this Group had 48 children in it, the following:

`Group.align(-1, 8, 32, 32)`

... will align the children so that there are 8 children vertically (the second argument), and each row will contain 6 sprites, except the last one, which will contain 5 (totaling 48)

You can also do:

`Group.align(10, -1, 32, 32)`

In this case it will create a grid 10 wide, and as tall as it needs to be in order to fit all of the children in.

The `position` property allows you to control where in each grid cell the child is positioned. This is a constant and can be one of `Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` or `Phaser.BOTTOM_RIGHT`.

The final argument; `offset` lets you start the alignment from a specific child index.

func (*World) AlignIn

func (self *World) AlignIn(container interface{}) *Group

AlignIn Aligns this Group within another Game Object, or Rectangle, known as the 'container', to one of 9 possible positions.

The container must be a Game Object, or Phaser.Rectangle object. This can include properties such as `World.bounds` or `Camera.view`, for aligning Groups within the world and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText, TileSprites or Buttons.

Please note that aligning a Group to another Game Object does **not** make it a child of the container. It simply modifies its position coordinates so it aligns with it.

The position constants you can use are:

`Phaser.TOP_LEFT`, `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

Groups are placed in such a way that their _bounds_ align with the container, taking into consideration rotation and scale of its children. This allows you to neatly align Groups, irrespective of their position value.

The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final aligned position of the Group. For example:

`group.alignIn(background, Phaser.BOTTOM_RIGHT, -20, -20)`

Would align the `group` to the bottom-right, but moved 20 pixels in from the corner. Think of the offsets as applying an adjustment to the containers bounds before the alignment takes place. So providing a negative offset will 'shrink' the container bounds by that amount, and providing a positive one expands it.

func (*World) AlignIn1O

func (self *World) AlignIn1O(container interface{}, position int) *Group

AlignIn1O Aligns this Group within another Game Object, or Rectangle, known as the 'container', to one of 9 possible positions.

The container must be a Game Object, or Phaser.Rectangle object. This can include properties such as `World.bounds` or `Camera.view`, for aligning Groups within the world and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText, TileSprites or Buttons.

Please note that aligning a Group to another Game Object does **not** make it a child of the container. It simply modifies its position coordinates so it aligns with it.

The position constants you can use are:

`Phaser.TOP_LEFT`, `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

Groups are placed in such a way that their _bounds_ align with the container, taking into consideration rotation and scale of its children. This allows you to neatly align Groups, irrespective of their position value.

The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final aligned position of the Group. For example:

`group.alignIn(background, Phaser.BOTTOM_RIGHT, -20, -20)`

Would align the `group` to the bottom-right, but moved 20 pixels in from the corner. Think of the offsets as applying an adjustment to the containers bounds before the alignment takes place. So providing a negative offset will 'shrink' the container bounds by that amount, and providing a positive one expands it.

func (*World) AlignIn2O

func (self *World) AlignIn2O(container interface{}, position int, offsetX int) *Group

AlignIn2O Aligns this Group within another Game Object, or Rectangle, known as the 'container', to one of 9 possible positions.

The container must be a Game Object, or Phaser.Rectangle object. This can include properties such as `World.bounds` or `Camera.view`, for aligning Groups within the world and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText, TileSprites or Buttons.

Please note that aligning a Group to another Game Object does **not** make it a child of the container. It simply modifies its position coordinates so it aligns with it.

The position constants you can use are:

`Phaser.TOP_LEFT`, `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

Groups are placed in such a way that their _bounds_ align with the container, taking into consideration rotation and scale of its children. This allows you to neatly align Groups, irrespective of their position value.

The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final aligned position of the Group. For example:

`group.alignIn(background, Phaser.BOTTOM_RIGHT, -20, -20)`

Would align the `group` to the bottom-right, but moved 20 pixels in from the corner. Think of the offsets as applying an adjustment to the containers bounds before the alignment takes place. So providing a negative offset will 'shrink' the container bounds by that amount, and providing a positive one expands it.

func (*World) AlignIn3O

func (self *World) AlignIn3O(container interface{}, position int, offsetX int, offsetY int) *Group

AlignIn3O Aligns this Group within another Game Object, or Rectangle, known as the 'container', to one of 9 possible positions.

The container must be a Game Object, or Phaser.Rectangle object. This can include properties such as `World.bounds` or `Camera.view`, for aligning Groups within the world and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText, TileSprites or Buttons.

Please note that aligning a Group to another Game Object does **not** make it a child of the container. It simply modifies its position coordinates so it aligns with it.

The position constants you can use are:

`Phaser.TOP_LEFT`, `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

Groups are placed in such a way that their _bounds_ align with the container, taking into consideration rotation and scale of its children. This allows you to neatly align Groups, irrespective of their position value.

The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final aligned position of the Group. For example:

`group.alignIn(background, Phaser.BOTTOM_RIGHT, -20, -20)`

Would align the `group` to the bottom-right, but moved 20 pixels in from the corner. Think of the offsets as applying an adjustment to the containers bounds before the alignment takes place. So providing a negative offset will 'shrink' the container bounds by that amount, and providing a positive one expands it.

func (*World) AlignInI

func (self *World) AlignInI(args ...interface{}) *Group

AlignInI Aligns this Group within another Game Object, or Rectangle, known as the 'container', to one of 9 possible positions.

The container must be a Game Object, or Phaser.Rectangle object. This can include properties such as `World.bounds` or `Camera.view`, for aligning Groups within the world and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText, TileSprites or Buttons.

Please note that aligning a Group to another Game Object does **not** make it a child of the container. It simply modifies its position coordinates so it aligns with it.

The position constants you can use are:

`Phaser.TOP_LEFT`, `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

Groups are placed in such a way that their _bounds_ align with the container, taking into consideration rotation and scale of its children. This allows you to neatly align Groups, irrespective of their position value.

The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final aligned position of the Group. For example:

`group.alignIn(background, Phaser.BOTTOM_RIGHT, -20, -20)`

Would align the `group` to the bottom-right, but moved 20 pixels in from the corner. Think of the offsets as applying an adjustment to the containers bounds before the alignment takes place. So providing a negative offset will 'shrink' the container bounds by that amount, and providing a positive one expands it.

func (*World) AlignTo

func (self *World) AlignTo(parent interface{}) *Group

AlignTo Aligns this Group to the side of another Game Object, or Rectangle, known as the 'parent', in one of 11 possible positions.

The parent must be a Game Object, or Phaser.Rectangle object. This can include properties such as `World.bounds` or `Camera.view`, for aligning Groups within the world and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText, TileSprites or Buttons.

Please note that aligning a Group to another Game Object does **not** make it a child of the parent. It simply modifies its position coordinates so it aligns with it.

The position constants you can use are:

`Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_TOP`, `Phaser.LEFT_CENTER`, `Phaser.LEFT_BOTTOM`, `Phaser.RIGHT_TOP`, `Phaser.RIGHT_CENTER`, `Phaser.RIGHT_BOTTOM`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

Groups are placed in such a way that their _bounds_ align with the parent, taking into consideration rotation and scale of the children. This allows you to neatly align Groups, irrespective of their position value.

The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final aligned position of the Group. For example:

`group.alignTo(background, Phaser.BOTTOM_RIGHT, -20, -20)`

Would align the `group` to the bottom-right, but moved 20 pixels in from the corner. Think of the offsets as applying an adjustment to the parents bounds before the alignment takes place. So providing a negative offset will 'shrink' the parent bounds by that amount, and providing a positive one expands it.

func (*World) AlignTo1O

func (self *World) AlignTo1O(parent interface{}, position int) *Group

AlignTo1O Aligns this Group to the side of another Game Object, or Rectangle, known as the 'parent', in one of 11 possible positions.

The parent must be a Game Object, or Phaser.Rectangle object. This can include properties such as `World.bounds` or `Camera.view`, for aligning Groups within the world and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText, TileSprites or Buttons.

Please note that aligning a Group to another Game Object does **not** make it a child of the parent. It simply modifies its position coordinates so it aligns with it.

The position constants you can use are:

`Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_TOP`, `Phaser.LEFT_CENTER`, `Phaser.LEFT_BOTTOM`, `Phaser.RIGHT_TOP`, `Phaser.RIGHT_CENTER`, `Phaser.RIGHT_BOTTOM`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

Groups are placed in such a way that their _bounds_ align with the parent, taking into consideration rotation and scale of the children. This allows you to neatly align Groups, irrespective of their position value.

The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final aligned position of the Group. For example:

`group.alignTo(background, Phaser.BOTTOM_RIGHT, -20, -20)`

Would align the `group` to the bottom-right, but moved 20 pixels in from the corner. Think of the offsets as applying an adjustment to the parents bounds before the alignment takes place. So providing a negative offset will 'shrink' the parent bounds by that amount, and providing a positive one expands it.

func (*World) AlignTo2O

func (self *World) AlignTo2O(parent interface{}, position int, offsetX int) *Group

AlignTo2O Aligns this Group to the side of another Game Object, or Rectangle, known as the 'parent', in one of 11 possible positions.

The parent must be a Game Object, or Phaser.Rectangle object. This can include properties such as `World.bounds` or `Camera.view`, for aligning Groups within the world and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText, TileSprites or Buttons.

Please note that aligning a Group to another Game Object does **not** make it a child of the parent. It simply modifies its position coordinates so it aligns with it.

The position constants you can use are:

`Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_TOP`, `Phaser.LEFT_CENTER`, `Phaser.LEFT_BOTTOM`, `Phaser.RIGHT_TOP`, `Phaser.RIGHT_CENTER`, `Phaser.RIGHT_BOTTOM`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

Groups are placed in such a way that their _bounds_ align with the parent, taking into consideration rotation and scale of the children. This allows you to neatly align Groups, irrespective of their position value.

The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final aligned position of the Group. For example:

`group.alignTo(background, Phaser.BOTTOM_RIGHT, -20, -20)`

Would align the `group` to the bottom-right, but moved 20 pixels in from the corner. Think of the offsets as applying an adjustment to the parents bounds before the alignment takes place. So providing a negative offset will 'shrink' the parent bounds by that amount, and providing a positive one expands it.

func (*World) AlignTo3O

func (self *World) AlignTo3O(parent interface{}, position int, offsetX int, offsetY int) *Group

AlignTo3O Aligns this Group to the side of another Game Object, or Rectangle, known as the 'parent', in one of 11 possible positions.

The parent must be a Game Object, or Phaser.Rectangle object. This can include properties such as `World.bounds` or `Camera.view`, for aligning Groups within the world and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText, TileSprites or Buttons.

Please note that aligning a Group to another Game Object does **not** make it a child of the parent. It simply modifies its position coordinates so it aligns with it.

The position constants you can use are:

`Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_TOP`, `Phaser.LEFT_CENTER`, `Phaser.LEFT_BOTTOM`, `Phaser.RIGHT_TOP`, `Phaser.RIGHT_CENTER`, `Phaser.RIGHT_BOTTOM`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

Groups are placed in such a way that their _bounds_ align with the parent, taking into consideration rotation and scale of the children. This allows you to neatly align Groups, irrespective of their position value.

The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final aligned position of the Group. For example:

`group.alignTo(background, Phaser.BOTTOM_RIGHT, -20, -20)`

Would align the `group` to the bottom-right, but moved 20 pixels in from the corner. Think of the offsets as applying an adjustment to the parents bounds before the alignment takes place. So providing a negative offset will 'shrink' the parent bounds by that amount, and providing a positive one expands it.

func (*World) AlignToI

func (self *World) AlignToI(args ...interface{}) *Group

AlignToI Aligns this Group to the side of another Game Object, or Rectangle, known as the 'parent', in one of 11 possible positions.

The parent must be a Game Object, or Phaser.Rectangle object. This can include properties such as `World.bounds` or `Camera.view`, for aligning Groups within the world and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText, TileSprites or Buttons.

Please note that aligning a Group to another Game Object does **not** make it a child of the parent. It simply modifies its position coordinates so it aligns with it.

The position constants you can use are:

`Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_TOP`, `Phaser.LEFT_CENTER`, `Phaser.LEFT_BOTTOM`, `Phaser.RIGHT_TOP`, `Phaser.RIGHT_CENTER`, `Phaser.RIGHT_BOTTOM`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

Groups are placed in such a way that their _bounds_ align with the parent, taking into consideration rotation and scale of the children. This allows you to neatly align Groups, irrespective of their position value.

The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final aligned position of the Group. For example:

`group.alignTo(background, Phaser.BOTTOM_RIGHT, -20, -20)`

Would align the `group` to the bottom-right, but moved 20 pixels in from the corner. Think of the offsets as applying an adjustment to the parents bounds before the alignment takes place. So providing a negative offset will 'shrink' the parent bounds by that amount, and providing a positive one expands it.

func (*World) Alive

func (self *World) Alive() bool

Alive The alive property is useful for Groups that are children of other Groups and need to be included/excluded in checks like forEachAlive.

func (*World) Alpha

func (self *World) Alpha() int

Alpha The alpha value of the group container.

func (*World) Angle

func (self *World) Angle() int

Angle The angle of rotation of the group container, in degrees.

This adjusts the group itself by modifying its local rotation transform.

This has no impact on the rotation/angle properties of the children, but it will update their worldTransform and on-screen orientation and position.

func (*World) AscendingSortHandler

func (self *World) AscendingSortHandler(a interface{}, b interface{})

AscendingSortHandler An internal helper function for the sort process.

func (*World) AscendingSortHandlerI

func (self *World) AscendingSortHandlerI(args ...interface{})

AscendingSortHandlerI An internal helper function for the sort process.

func (*World) Boot

func (self *World) Boot()

Boot Initialises the game world.

func (*World) BootI

func (self *World) BootI(args ...interface{})

BootI Initialises the game world.

func (*World) Bottom

func (self *World) Bottom() int

Bottom The bottom coordinate of this Group.

It is derived by calling `getBounds`, calculating the Groups dimensions based on its visible children.

func (*World) Bounds

func (self *World) Bounds() *Rectangle

Bounds The World has no fixed size, but it does have a bounds outside of which objects are no longer considered as being "in world" and you should use this to clean-up the display list and purge dead objects. By default we set the Bounds to be from 0,0 to Game.width,Game.height. I.e. it will match the size given to the game constructor with 0,0 representing the top-left of the display. However 0,0 is actually the center of the world, and if you rotate or scale the world all of that will happen from 0,0. So if you want to make a game in which the world itself will rotate you should adjust the bounds so that 0,0 is the center point, i.e. set them to -1000,-1000,2000,2000 for a 2000x2000 sized world centered around 0,0. Bound of this world that objects can not escape from.

func (*World) BringToTop

func (self *World) BringToTop(child interface{}) interface{}

BringToTop Brings the given child to the top of this group so it renders above all other children.

func (*World) BringToTopI

func (self *World) BringToTopI(args ...interface{}) interface{}

BringToTopI Brings the given child to the top of this group so it renders above all other children.

func (*World) CallAll

func (self *World) CallAll(method string, context string, args interface{})

CallAll Calls a function, specified by name, on all on children.

The function is called for all children regardless if they are dead or alive (see callAllExists for different options). After the method parameter and context you can add as many extra parameters as you like, which will all be passed to the child.

func (*World) CallAllExists

func (self *World) CallAllExists(callback string, existsValue bool, parameter interface{})

CallAllExists Calls a function, specified by name, on all children in the group who exist (or do not exist).

After the existsValue parameter you can add as many parameters as you like, which will all be passed to the child callback.

func (*World) CallAllExistsI

func (self *World) CallAllExistsI(args ...interface{})

CallAllExistsI Calls a function, specified by name, on all children in the group who exist (or do not exist).

After the existsValue parameter you can add as many parameters as you like, which will all be passed to the child callback.

func (*World) CallAllI

func (self *World) CallAllI(args ...interface{})

CallAllI Calls a function, specified by name, on all on children.

The function is called for all children regardless if they are dead or alive (see callAllExists for different options). After the method parameter and context you can add as many extra parameters as you like, which will all be passed to the child.

func (*World) CallbackFromArray

func (self *World) CallbackFromArray(child interface{}, callback []interface{}, length int)

CallbackFromArray Returns a reference to a function that exists on a child of the group based on the given callback array.

func (*World) CallbackFromArrayI

func (self *World) CallbackFromArrayI(args ...interface{})

CallbackFromArrayI Returns a reference to a function that exists on a child of the group based on the given callback array.

func (*World) Camera

func (self *World) Camera() *Camera

Camera Camera instance.

func (*World) CameraOffset

func (self *World) CameraOffset() *Point

CameraOffset If this object is {@link Phaser.Group#fixedToCamera fixedToCamera} then this stores the x/y position offset relative to the top-left of the camera view. If the parent of this Group is also `fixedToCamera` then the offset here is in addition to that and should typically be disabled.

func (*World) CenterX

func (self *World) CenterX() int

CenterX Gets the X position corresponding to the center point of the world.

func (*World) CenterY

func (self *World) CenterY() int

CenterY Gets the Y position corresponding to the center point of the world.

func (*World) CheckAll

func (self *World) CheckAll(key string, value interface{})

CheckAll Quickly check that the same property across all children of this group is equal to the given value.

This call doesn't descend down children, so if you have a Group inside of this group, the property will be checked on the group but not its children.

func (*World) CheckAll1O

func (self *World) CheckAll1O(key string, value interface{}, checkAlive bool)

CheckAll1O Quickly check that the same property across all children of this group is equal to the given value.

This call doesn't descend down children, so if you have a Group inside of this group, the property will be checked on the group but not its children.

func (*World) CheckAll2O

func (self *World) CheckAll2O(key string, value interface{}, checkAlive bool, checkVisible bool)

CheckAll2O Quickly check that the same property across all children of this group is equal to the given value.

This call doesn't descend down children, so if you have a Group inside of this group, the property will be checked on the group but not its children.

func (*World) CheckAll3O

func (self *World) CheckAll3O(key string, value interface{}, checkAlive bool, checkVisible bool, force bool)

CheckAll3O Quickly check that the same property across all children of this group is equal to the given value.

This call doesn't descend down children, so if you have a Group inside of this group, the property will be checked on the group but not its children.

func (*World) CheckAllI

func (self *World) CheckAllI(args ...interface{})

CheckAllI Quickly check that the same property across all children of this group is equal to the given value.

This call doesn't descend down children, so if you have a Group inside of this group, the property will be checked on the group but not its children.

func (*World) CheckProperty

func (self *World) CheckProperty(child interface{}, key []interface{}, value interface{}) bool

CheckProperty Checks a property for the given value on the child.

func (*World) CheckProperty1O

func (self *World) CheckProperty1O(child interface{}, key []interface{}, value interface{}, force bool) bool

CheckProperty1O Checks a property for the given value on the child.

func (*World) CheckPropertyI

func (self *World) CheckPropertyI(args ...interface{}) bool

CheckPropertyI Checks a property for the given value on the child.

func (*World) Children

func (self *World) Children() []DisplayObject

Children [read-only] The array of children of this container.

func (*World) ClassType

func (self *World) ClassType() interface{}

ClassType The type of objects that will be created when using {@link Phaser.Group#create create} or {@link Phaser.Group#createMultiple createMultiple}.

Any object may be used but it should extend either Sprite or Image and accept the same constructor arguments: when a new object is created it is passed the following parameters to its constructor: `(game, x, y, key, frame)`.

func (*World) Contains

func (self *World) Contains(child *DisplayObject) bool

Contains Determines whether the specified display object is a child of the DisplayObjectContainer instance or the instance itself.

func (*World) ContainsI

func (self *World) ContainsI(args ...interface{}) bool

ContainsI Determines whether the specified display object is a child of the DisplayObjectContainer instance or the instance itself.

func (*World) CountDead

func (self *World) CountDead() int

CountDead Get the number of dead children in this group.

func (*World) CountDeadI

func (self *World) CountDeadI(args ...interface{}) int

CountDeadI Get the number of dead children in this group.

func (*World) CountLiving

func (self *World) CountLiving() int

CountLiving Get the number of living children in this group.

func (*World) CountLivingI

func (self *World) CountLivingI(args ...interface{}) int

CountLivingI Get the number of living children in this group.

func (*World) Create

func (self *World) Create(x int, y int) *DisplayObject

Create Creates a new Phaser.Sprite object and adds it to the top of this group.

Use {@link Phaser.Group#classType classType} to change the type of object created.

The child is automatically added to the top of the group, and is displayed above every previous child.

Or if the _optional_ index is specified, the child is added at the location specified by the index value, this allows you to control child ordering.

If `Group.enableBody` is set, then a physics body will be created on the object, so long as one does not already exist.

If `Group.inputEnableChildren` is set, then an Input Handler will be created on the object, so long as one does not already exist.

func (*World) Create1O

func (self *World) Create1O(x int, y int, key interface{}) *DisplayObject

Create1O Creates a new Phaser.Sprite object and adds it to the top of this group.

Use {@link Phaser.Group#classType classType} to change the type of object created.

The child is automatically added to the top of the group, and is displayed above every previous child.

Or if the _optional_ index is specified, the child is added at the location specified by the index value, this allows you to control child ordering.

If `Group.enableBody` is set, then a physics body will be created on the object, so long as one does not already exist.

If `Group.inputEnableChildren` is set, then an Input Handler will be created on the object, so long as one does not already exist.

func (*World) Create2O

func (self *World) Create2O(x int, y int, key interface{}, frame interface{}) *DisplayObject

Create2O Creates a new Phaser.Sprite object and adds it to the top of this group.

Use {@link Phaser.Group#classType classType} to change the type of object created.

The child is automatically added to the top of the group, and is displayed above every previous child.

Or if the _optional_ index is specified, the child is added at the location specified by the index value, this allows you to control child ordering.

If `Group.enableBody` is set, then a physics body will be created on the object, so long as one does not already exist.

If `Group.inputEnableChildren` is set, then an Input Handler will be created on the object, so long as one does not already exist.

func (*World) Create3O

func (self *World) Create3O(x int, y int, key interface{}, frame interface{}, exists bool) *DisplayObject

Create3O Creates a new Phaser.Sprite object and adds it to the top of this group.

Use {@link Phaser.Group#classType classType} to change the type of object created.

The child is automatically added to the top of the group, and is displayed above every previous child.

Or if the _optional_ index is specified, the child is added at the location specified by the index value, this allows you to control child ordering.

If `Group.enableBody` is set, then a physics body will be created on the object, so long as one does not already exist.

If `Group.inputEnableChildren` is set, then an Input Handler will be created on the object, so long as one does not already exist.

func (*World) Create4O

func (self *World) Create4O(x int, y int, key interface{}, frame interface{}, exists bool, index int) *DisplayObject

Create4O Creates a new Phaser.Sprite object and adds it to the top of this group.

Use {@link Phaser.Group#classType classType} to change the type of object created.

The child is automatically added to the top of the group, and is displayed above every previous child.

Or if the _optional_ index is specified, the child is added at the location specified by the index value, this allows you to control child ordering.

If `Group.enableBody` is set, then a physics body will be created on the object, so long as one does not already exist.

If `Group.inputEnableChildren` is set, then an Input Handler will be created on the object, so long as one does not already exist.

func (*World) CreateI

func (self *World) CreateI(args ...interface{}) *DisplayObject

CreateI Creates a new Phaser.Sprite object and adds it to the top of this group.

Use {@link Phaser.Group#classType classType} to change the type of object created.

The child is automatically added to the top of the group, and is displayed above every previous child.

Or if the _optional_ index is specified, the child is added at the location specified by the index value, this allows you to control child ordering.

If `Group.enableBody` is set, then a physics body will be created on the object, so long as one does not already exist.

If `Group.inputEnableChildren` is set, then an Input Handler will be created on the object, so long as one does not already exist.

func (*World) CreateMultiple

func (self *World) CreateMultiple(quantity int, key interface{}) []interface{}

CreateMultiple Creates multiple Phaser.Sprite objects and adds them to the top of this Group.

This method is useful if you need to quickly generate a pool of sprites, such as bullets.

Use {@link Phaser.Group#classType classType} to change the type of object created.

You can provide an array as the `key` and / or `frame` arguments. When you do this it will create `quantity` Sprites for every key (and frame) in the arrays.

For example:

`createMultiple(25, ['ball', 'carrot'])`

In the above code there are 2 keys (ball and carrot) which means that 50 sprites will be created in total, 25 of each. You can also have the `frame` as an array:

`createMultiple(5, 'bricks', [0, 1, 2, 3])`

In the above there is one key (bricks), which is a sprite sheet. The frames array tells this method to use frames 0, 1, 2 and 3. So in total it will create 20 sprites, because the quantity was set to 5, so that is 5 brick sprites of frame 0, 5 brick sprites with frame 1, and so on.

If you set both the key and frame arguments to be arrays then understand it will create a total quantity of sprites equal to the size of both arrays times each other. I.e.:

`createMultiple(20, ['diamonds', 'balls'], [0, 1, 2])`

The above will create 20 'diamonds' of frame 0, 20 with frame 1 and 20 with frame 2. It will then create 20 'balls' of frame 0, 20 with frame 1 and 20 with frame 2. In total it will have created 120 sprites.

By default the Sprites will have their `exists` property set to `false`, and they will be positioned at 0x0, relative to the `Group.x / y` values.

If `Group.enableBody` is set, then a physics body will be created on the objects, so long as one does not already exist.

If `Group.inputEnableChildren` is set, then an Input Handler will be created on the objects, so long as one does not already exist.

func (*World) CreateMultiple1O

func (self *World) CreateMultiple1O(quantity int, key interface{}, frame interface{}) []interface{}

CreateMultiple1O Creates multiple Phaser.Sprite objects and adds them to the top of this Group.

This method is useful if you need to quickly generate a pool of sprites, such as bullets.

Use {@link Phaser.Group#classType classType} to change the type of object created.

You can provide an array as the `key` and / or `frame` arguments. When you do this it will create `quantity` Sprites for every key (and frame) in the arrays.

For example:

`createMultiple(25, ['ball', 'carrot'])`

In the above code there are 2 keys (ball and carrot) which means that 50 sprites will be created in total, 25 of each. You can also have the `frame` as an array:

`createMultiple(5, 'bricks', [0, 1, 2, 3])`

In the above there is one key (bricks), which is a sprite sheet. The frames array tells this method to use frames 0, 1, 2 and 3. So in total it will create 20 sprites, because the quantity was set to 5, so that is 5 brick sprites of frame 0, 5 brick sprites with frame 1, and so on.

If you set both the key and frame arguments to be arrays then understand it will create a total quantity of sprites equal to the size of both arrays times each other. I.e.:

`createMultiple(20, ['diamonds', 'balls'], [0, 1, 2])`

The above will create 20 'diamonds' of frame 0, 20 with frame 1 and 20 with frame 2. It will then create 20 'balls' of frame 0, 20 with frame 1 and 20 with frame 2. In total it will have created 120 sprites.

By default the Sprites will have their `exists` property set to `false`, and they will be positioned at 0x0, relative to the `Group.x / y` values.

If `Group.enableBody` is set, then a physics body will be created on the objects, so long as one does not already exist.

If `Group.inputEnableChildren` is set, then an Input Handler will be created on the objects, so long as one does not already exist.

func (*World) CreateMultiple2O

func (self *World) CreateMultiple2O(quantity int, key interface{}, frame interface{}, exists bool) []interface{}

CreateMultiple2O Creates multiple Phaser.Sprite objects and adds them to the top of this Group.

This method is useful if you need to quickly generate a pool of sprites, such as bullets.

Use {@link Phaser.Group#classType classType} to change the type of object created.

You can provide an array as the `key` and / or `frame` arguments. When you do this it will create `quantity` Sprites for every key (and frame) in the arrays.

For example:

`createMultiple(25, ['ball', 'carrot'])`

In the above code there are 2 keys (ball and carrot) which means that 50 sprites will be created in total, 25 of each. You can also have the `frame` as an array:

`createMultiple(5, 'bricks', [0, 1, 2, 3])`

In the above there is one key (bricks), which is a sprite sheet. The frames array tells this method to use frames 0, 1, 2 and 3. So in total it will create 20 sprites, because the quantity was set to 5, so that is 5 brick sprites of frame 0, 5 brick sprites with frame 1, and so on.

If you set both the key and frame arguments to be arrays then understand it will create a total quantity of sprites equal to the size of both arrays times each other. I.e.:

`createMultiple(20, ['diamonds', 'balls'], [0, 1, 2])`

The above will create 20 'diamonds' of frame 0, 20 with frame 1 and 20 with frame 2. It will then create 20 'balls' of frame 0, 20 with frame 1 and 20 with frame 2. In total it will have created 120 sprites.

By default the Sprites will have their `exists` property set to `false`, and they will be positioned at 0x0, relative to the `Group.x / y` values.

If `Group.enableBody` is set, then a physics body will be created on the objects, so long as one does not already exist.

If `Group.inputEnableChildren` is set, then an Input Handler will be created on the objects, so long as one does not already exist.

func (*World) CreateMultipleI

func (self *World) CreateMultipleI(args ...interface{}) []interface{}

CreateMultipleI Creates multiple Phaser.Sprite objects and adds them to the top of this Group.

This method is useful if you need to quickly generate a pool of sprites, such as bullets.

Use {@link Phaser.Group#classType classType} to change the type of object created.

You can provide an array as the `key` and / or `frame` arguments. When you do this it will create `quantity` Sprites for every key (and frame) in the arrays.

For example:

`createMultiple(25, ['ball', 'carrot'])`

In the above code there are 2 keys (ball and carrot) which means that 50 sprites will be created in total, 25 of each. You can also have the `frame` as an array:

`createMultiple(5, 'bricks', [0, 1, 2, 3])`

In the above there is one key (bricks), which is a sprite sheet. The frames array tells this method to use frames 0, 1, 2 and 3. So in total it will create 20 sprites, because the quantity was set to 5, so that is 5 brick sprites of frame 0, 5 brick sprites with frame 1, and so on.

If you set both the key and frame arguments to be arrays then understand it will create a total quantity of sprites equal to the size of both arrays times each other. I.e.:

`createMultiple(20, ['diamonds', 'balls'], [0, 1, 2])`

The above will create 20 'diamonds' of frame 0, 20 with frame 1 and 20 with frame 2. It will then create 20 'balls' of frame 0, 20 with frame 1 and 20 with frame 2. In total it will have created 120 sprites.

By default the Sprites will have their `exists` property set to `false`, and they will be positioned at 0x0, relative to the `Group.x / y` values.

If `Group.enableBody` is set, then a physics body will be created on the objects, so long as one does not already exist.

If `Group.inputEnableChildren` is set, then an Input Handler will be created on the objects, so long as one does not already exist.

func (*World) Cursor

func (self *World) Cursor() *DisplayObject

Cursor The current display object that the group cursor is pointing to, if any. (Can be set manually.)

The cursor is a way to iterate through the children in a Group using {@link Phaser.Group#next next} and {@link Phaser.Group#previous previous}.

func (*World) CursorIndex

func (self *World) CursorIndex() int

CursorIndex The current index of the Group cursor. Advance it with Group.next.

func (*World) CustomSort

func (self *World) CustomSort(sortHandler interface{})

CustomSort Sort the children in the group according to custom sort function.

The `sortHandler` is provided the two parameters: the two children involved in the comparison (a and b). It should return -1 if `a > b`, 1 if `a < b` or 0 if `a === b`.

func (*World) CustomSort1O

func (self *World) CustomSort1O(sortHandler interface{}, context interface{})

CustomSort1O Sort the children in the group according to custom sort function.

The `sortHandler` is provided the two parameters: the two children involved in the comparison (a and b). It should return -1 if `a > b`, 1 if `a < b` or 0 if `a === b`.

func (*World) CustomSortI

func (self *World) CustomSortI(args ...interface{})

CustomSortI Sort the children in the group according to custom sort function.

The `sortHandler` is provided the two parameters: the two children involved in the comparison (a and b). It should return -1 if `a > b`, 1 if `a < b` or 0 if `a === b`.

func (*World) DescendingSortHandler

func (self *World) DescendingSortHandler(a interface{}, b interface{})

DescendingSortHandler An internal helper function for the sort process.

func (*World) DescendingSortHandlerI

func (self *World) DescendingSortHandlerI(args ...interface{})

DescendingSortHandlerI An internal helper function for the sort process.

func (*World) Destroy

func (self *World) Destroy()

Destroy Destroys this group.

Removes all children, then removes this group from its parent and nulls references.

func (*World) Destroy1O

func (self *World) Destroy1O(destroyChildren bool)

Destroy1O Destroys this group.

Removes all children, then removes this group from its parent and nulls references.

func (*World) Destroy2O

func (self *World) Destroy2O(destroyChildren bool, soft bool)

Destroy2O Destroys this group.

Removes all children, then removes this group from its parent and nulls references.

func (*World) DestroyI

func (self *World) DestroyI(args ...interface{})

DestroyI Destroys this group.

Removes all children, then removes this group from its parent and nulls references.

func (*World) DivideAll

func (self *World) DivideAll(property string, amount int, checkAlive bool, checkVisible bool)

DivideAll Divides the given property by the amount on all children in this group.

`Group.divideAll('x', 2)` will half the child.x value for each child.

func (*World) DivideAllI

func (self *World) DivideAllI(args ...interface{})

DivideAllI Divides the given property by the amount on all children in this group.

`Group.divideAll('x', 2)` will half the child.x value for each child.

func (*World) EnableBody

func (self *World) EnableBody() bool

EnableBody If true all Sprites created by, or added to this group, will have a physics body enabled on them.

If there are children already in the Group at the time you set this property, they are not changed.

The default body type is controlled with {@link Phaser.Group#physicsBodyType physicsBodyType}.

func (*World) EnableBodyDebug

func (self *World) EnableBodyDebug() bool

EnableBodyDebug If true when a physics body is created (via {@link Phaser.Group#enableBody enableBody}) it will create a physics debug object as well.

This only works for P2 bodies.

func (*World) Exists

func (self *World) Exists() bool

Exists If exists is true the group is updated, otherwise it is skipped.

func (*World) Filter

func (self *World) Filter(predicate interface{}) *ArraySet

Filter Find children matching a certain predicate.

For example:

var healthyList = Group.filter(function(child, index, children) {
    return child.health > 10 ? true : false;
}, true);
healthyList.callAll('attack');

Note: Currently this will skip any children which are Groups themselves.

func (*World) Filter1O

func (self *World) Filter1O(predicate interface{}, checkExists bool) *ArraySet

Filter1O Find children matching a certain predicate.

For example:

var healthyList = Group.filter(function(child, index, children) {
    return child.health > 10 ? true : false;
}, true);
healthyList.callAll('attack');

Note: Currently this will skip any children which are Groups themselves.

func (*World) FilterI

func (self *World) FilterI(args ...interface{}) *ArraySet

FilterI Find children matching a certain predicate.

For example:

var healthyList = Group.filter(function(child, index, children) {
    return child.health > 10 ? true : false;
}, true);
healthyList.callAll('attack');

Note: Currently this will skip any children which are Groups themselves.

func (*World) FixedToCamera

func (self *World) FixedToCamera() bool

FixedToCamera A Group that is fixed to the camera uses its x/y coordinates as offsets from the top left of the camera. These are stored in Group.cameraOffset.

Note that the cameraOffset values are in addition to any parent in the display list. So if this Group was in a Group that has x: 200, then this will be added to the cameraOffset.x

func (*World) ForEach

func (self *World) ForEach(callback interface{}, callbackContext interface{})

ForEach Call a function on each child in this group.

Additional arguments for the callback can be specified after the `checkExists` parameter. For example,

Group.forEach(awardBonusGold, this, true, 100, 500)

would invoke `awardBonusGold` function with the parameters `(child, 100, 500)`.

Note: This check will skip any children which are Groups themselves.

func (*World) ForEach1O

func (self *World) ForEach1O(callback interface{}, callbackContext interface{}, checkExists bool)

ForEach1O Call a function on each child in this group.

Additional arguments for the callback can be specified after the `checkExists` parameter. For example,

Group.forEach(awardBonusGold, this, true, 100, 500)

would invoke `awardBonusGold` function with the parameters `(child, 100, 500)`.

Note: This check will skip any children which are Groups themselves.

func (*World) ForEach2O

func (self *World) ForEach2O(callback interface{}, callbackContext interface{}, checkExists bool, args interface{})

ForEach2O Call a function on each child in this group.

Additional arguments for the callback can be specified after the `checkExists` parameter. For example,

Group.forEach(awardBonusGold, this, true, 100, 500)

would invoke `awardBonusGold` function with the parameters `(child, 100, 500)`.

Note: This check will skip any children which are Groups themselves.

func (*World) ForEachAlive

func (self *World) ForEachAlive(callback interface{}, callbackContext interface{})

ForEachAlive Call a function on each alive child in this group.

See {@link Phaser.Group#forEach forEach} for details.

func (*World) ForEachAlive1O

func (self *World) ForEachAlive1O(callback interface{}, callbackContext interface{}, args interface{})

ForEachAlive1O Call a function on each alive child in this group.

See {@link Phaser.Group#forEach forEach} for details.

func (*World) ForEachAliveI

func (self *World) ForEachAliveI(args ...interface{})

ForEachAliveI Call a function on each alive child in this group.

See {@link Phaser.Group#forEach forEach} for details.

func (*World) ForEachDead

func (self *World) ForEachDead(callback interface{}, callbackContext interface{})

ForEachDead Call a function on each dead child in this group.

See {@link Phaser.Group#forEach forEach} for details.

func (*World) ForEachDead1O

func (self *World) ForEachDead1O(callback interface{}, callbackContext interface{}, args interface{})

ForEachDead1O Call a function on each dead child in this group.

See {@link Phaser.Group#forEach forEach} for details.

func (*World) ForEachDeadI

func (self *World) ForEachDeadI(args ...interface{})

ForEachDeadI Call a function on each dead child in this group.

See {@link Phaser.Group#forEach forEach} for details.

func (*World) ForEachExists

func (self *World) ForEachExists(callback interface{}, callbackContext interface{})

ForEachExists Call a function on each existing child in this group.

See {@link Phaser.Group#forEach forEach} for details.

func (*World) ForEachExists1O

func (self *World) ForEachExists1O(callback interface{}, callbackContext interface{}, args interface{})

ForEachExists1O Call a function on each existing child in this group.

See {@link Phaser.Group#forEach forEach} for details.

func (*World) ForEachExistsI

func (self *World) ForEachExistsI(args ...interface{})

ForEachExistsI Call a function on each existing child in this group.

See {@link Phaser.Group#forEach forEach} for details.

func (*World) ForEachI

func (self *World) ForEachI(args ...interface{})

ForEachI Call a function on each child in this group.

Additional arguments for the callback can be specified after the `checkExists` parameter. For example,

Group.forEach(awardBonusGold, this, true, 100, 500)

would invoke `awardBonusGold` function with the parameters `(child, 100, 500)`.

Note: This check will skip any children which are Groups themselves.

func (*World) Game

func (self *World) Game() *Game

Game A reference to the currently running Game.

func (*World) GetAll

func (self *World) GetAll() interface{}

GetAll Returns all children in this Group.

You can optionally specify a matching criteria using the `property` and `value` arguments.

For example: `getAll('exists', true)` would return only children that have their exists property set.

Optionally you can specify a start and end index. For example if this Group had 100 children, and you set `startIndex` to 0 and `endIndex` to 50, it would return a random child from only the first 50 children in the Group.

func (*World) GetAll1O

func (self *World) GetAll1O(property string) interface{}

GetAll1O Returns all children in this Group.

You can optionally specify a matching criteria using the `property` and `value` arguments.

For example: `getAll('exists', true)` would return only children that have their exists property set.

Optionally you can specify a start and end index. For example if this Group had 100 children, and you set `startIndex` to 0 and `endIndex` to 50, it would return a random child from only the first 50 children in the Group.

func (*World) GetAll2O

func (self *World) GetAll2O(property string, value interface{}) interface{}

GetAll2O Returns all children in this Group.

You can optionally specify a matching criteria using the `property` and `value` arguments.

For example: `getAll('exists', true)` would return only children that have their exists property set.

Optionally you can specify a start and end index. For example if this Group had 100 children, and you set `startIndex` to 0 and `endIndex` to 50, it would return a random child from only the first 50 children in the Group.

func (*World) GetAll3O

func (self *World) GetAll3O(property string, value interface{}, startIndex int) interface{}

GetAll3O Returns all children in this Group.

You can optionally specify a matching criteria using the `property` and `value` arguments.

For example: `getAll('exists', true)` would return only children that have their exists property set.

Optionally you can specify a start and end index. For example if this Group had 100 children, and you set `startIndex` to 0 and `endIndex` to 50, it would return a random child from only the first 50 children in the Group.

func (*World) GetAll4O

func (self *World) GetAll4O(property string, value interface{}, startIndex int, endIndex int) interface{}

GetAll4O Returns all children in this Group.

You can optionally specify a matching criteria using the `property` and `value` arguments.

For example: `getAll('exists', true)` would return only children that have their exists property set.

Optionally you can specify a start and end index. For example if this Group had 100 children, and you set `startIndex` to 0 and `endIndex` to 50, it would return a random child from only the first 50 children in the Group.

func (*World) GetAllI

func (self *World) GetAllI(args ...interface{}) interface{}

GetAllI Returns all children in this Group.

You can optionally specify a matching criteria using the `property` and `value` arguments.

For example: `getAll('exists', true)` would return only children that have their exists property set.

Optionally you can specify a start and end index. For example if this Group had 100 children, and you set `startIndex` to 0 and `endIndex` to 50, it would return a random child from only the first 50 children in the Group.

func (*World) GetAt

func (self *World) GetAt(index int) interface{}

GetAt Returns the child found at the given index within this group.

func (*World) GetAtI

func (self *World) GetAtI(args ...interface{}) interface{}

GetAtI Returns the child found at the given index within this group.

func (*World) GetBottom

func (self *World) GetBottom() interface{}

GetBottom Returns the child at the bottom of this group.

The bottom child the child being displayed (rendered) below every other child.

func (*World) GetBottomI

func (self *World) GetBottomI(args ...interface{}) interface{}

GetBottomI Returns the child at the bottom of this group.

The bottom child the child being displayed (rendered) below every other child.

func (*World) GetBounds

func (self *World) GetBounds() *Rectangle

GetBounds Retrieves the global bounds of the displayObjectContainer as a rectangle. The bounds calculation takes all visible children into consideration.

func (*World) GetBounds1O

func (self *World) GetBounds1O(targetCoordinateSpace interface{}) *Rectangle

GetBounds1O Retrieves the global bounds of the displayObjectContainer as a rectangle. The bounds calculation takes all visible children into consideration.

func (*World) GetBoundsI

func (self *World) GetBoundsI(args ...interface{}) *Rectangle

GetBoundsI Retrieves the global bounds of the displayObjectContainer as a rectangle. The bounds calculation takes all visible children into consideration.

func (*World) GetByName

func (self *World) GetByName(name string) interface{}

GetByName Searches the Group for the first instance of a child with the `name` property matching the given argument. Should more than one child have the same name only the first instance is returned.

func (*World) GetByNameI

func (self *World) GetByNameI(args ...interface{}) interface{}

GetByNameI Searches the Group for the first instance of a child with the `name` property matching the given argument. Should more than one child have the same name only the first instance is returned.

func (*World) GetChildAt

func (self *World) GetChildAt(index int) *DisplayObject

GetChildAt Returns the child at the specified index

func (*World) GetChildAtI

func (self *World) GetChildAtI(args ...interface{}) *DisplayObject

GetChildAtI Returns the child at the specified index

func (*World) GetChildIndex

func (self *World) GetChildIndex(child *DisplayObject) int

GetChildIndex Returns the index position of a child DisplayObject instance

func (*World) GetChildIndexI

func (self *World) GetChildIndexI(args ...interface{}) int

GetChildIndexI Returns the index position of a child DisplayObject instance

func (*World) GetClosestTo

func (self *World) GetClosestTo(object interface{}) interface{}

GetClosestTo Get the closest child to given Object, with optional callback to filter children.

This can be a Sprite, Group, Image or any object with public x and y properties.

'close' is determined by the distance from the objects `x` and `y` properties compared to the childs `x` and `y` properties.

You can use the optional `callback` argument to apply your own filter to the distance checks. If the child is closer then the previous child, it will be sent to `callback` as the first argument, with the distance as the second. The callback should return `true` if it passes your filtering criteria, otherwise it should return `false`.

func (*World) GetClosestTo1O

func (self *World) GetClosestTo1O(object interface{}, callback interface{}) interface{}

GetClosestTo1O Get the closest child to given Object, with optional callback to filter children.

This can be a Sprite, Group, Image or any object with public x and y properties.

'close' is determined by the distance from the objects `x` and `y` properties compared to the childs `x` and `y` properties.

You can use the optional `callback` argument to apply your own filter to the distance checks. If the child is closer then the previous child, it will be sent to `callback` as the first argument, with the distance as the second. The callback should return `true` if it passes your filtering criteria, otherwise it should return `false`.

func (*World) GetClosestTo2O

func (self *World) GetClosestTo2O(object interface{}, callback interface{}, callbackContext interface{}) interface{}

GetClosestTo2O Get the closest child to given Object, with optional callback to filter children.

This can be a Sprite, Group, Image or any object with public x and y properties.

'close' is determined by the distance from the objects `x` and `y` properties compared to the childs `x` and `y` properties.

You can use the optional `callback` argument to apply your own filter to the distance checks. If the child is closer then the previous child, it will be sent to `callback` as the first argument, with the distance as the second. The callback should return `true` if it passes your filtering criteria, otherwise it should return `false`.

func (*World) GetClosestToI

func (self *World) GetClosestToI(args ...interface{}) interface{}

GetClosestToI Get the closest child to given Object, with optional callback to filter children.

This can be a Sprite, Group, Image or any object with public x and y properties.

'close' is determined by the distance from the objects `x` and `y` properties compared to the childs `x` and `y` properties.

You can use the optional `callback` argument to apply your own filter to the distance checks. If the child is closer then the previous child, it will be sent to `callback` as the first argument, with the distance as the second. The callback should return `true` if it passes your filtering criteria, otherwise it should return `false`.

func (*World) GetFirstAlive

func (self *World) GetFirstAlive() *DisplayObject

GetFirstAlive Get the first child that is alive (`child.alive === true`).

This is handy for choosing a squad leader, etc.

You can use the optional argument `createIfNull` to create a new Game Object if no alive ones were found in this Group.

It works by calling `Group.create` passing it the parameters given to this method, and returning the new child.

If a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child will be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.

func (*World) GetFirstAlive1O

func (self *World) GetFirstAlive1O(createIfNull bool) *DisplayObject

GetFirstAlive1O Get the first child that is alive (`child.alive === true`).

This is handy for choosing a squad leader, etc.

You can use the optional argument `createIfNull` to create a new Game Object if no alive ones were found in this Group.

It works by calling `Group.create` passing it the parameters given to this method, and returning the new child.

If a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child will be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.

func (*World) GetFirstAlive2O

func (self *World) GetFirstAlive2O(createIfNull bool, x int) *DisplayObject

GetFirstAlive2O Get the first child that is alive (`child.alive === true`).

This is handy for choosing a squad leader, etc.

You can use the optional argument `createIfNull` to create a new Game Object if no alive ones were found in this Group.

It works by calling `Group.create` passing it the parameters given to this method, and returning the new child.

If a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child will be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.

func (*World) GetFirstAlive3O

func (self *World) GetFirstAlive3O(createIfNull bool, x int, y int) *DisplayObject

GetFirstAlive3O Get the first child that is alive (`child.alive === true`).

This is handy for choosing a squad leader, etc.

You can use the optional argument `createIfNull` to create a new Game Object if no alive ones were found in this Group.

It works by calling `Group.create` passing it the parameters given to this method, and returning the new child.

If a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child will be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.

func (*World) GetFirstAlive4O

func (self *World) GetFirstAlive4O(createIfNull bool, x int, y int, key interface{}) *DisplayObject

GetFirstAlive4O Get the first child that is alive (`child.alive === true`).

This is handy for choosing a squad leader, etc.

You can use the optional argument `createIfNull` to create a new Game Object if no alive ones were found in this Group.

It works by calling `Group.create` passing it the parameters given to this method, and returning the new child.

If a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child will be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.

func (*World) GetFirstAlive5O

func (self *World) GetFirstAlive5O(createIfNull bool, x int, y int, key interface{}, frame interface{}) *DisplayObject

GetFirstAlive5O Get the first child that is alive (`child.alive === true`).

This is handy for choosing a squad leader, etc.

You can use the optional argument `createIfNull` to create a new Game Object if no alive ones were found in this Group.

It works by calling `Group.create` passing it the parameters given to this method, and returning the new child.

If a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child will be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.

func (*World) GetFirstAliveI

func (self *World) GetFirstAliveI(args ...interface{}) *DisplayObject

GetFirstAliveI Get the first child that is alive (`child.alive === true`).

This is handy for choosing a squad leader, etc.

You can use the optional argument `createIfNull` to create a new Game Object if no alive ones were found in this Group.

It works by calling `Group.create` passing it the parameters given to this method, and returning the new child.

If a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child will be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.

func (*World) GetFirstDead

func (self *World) GetFirstDead() *DisplayObject

GetFirstDead Get the first child that is dead (`child.alive === false`).

This is handy for checking if everything has been wiped out and adding to the pool as needed.

You can use the optional argument `createIfNull` to create a new Game Object if no dead ones were found in this Group.

It works by calling `Group.create` passing it the parameters given to this method, and returning the new child.

If a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child will be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.

func (*World) GetFirstDead1O

func (self *World) GetFirstDead1O(createIfNull bool) *DisplayObject

GetFirstDead1O Get the first child that is dead (`child.alive === false`).

This is handy for checking if everything has been wiped out and adding to the pool as needed.

You can use the optional argument `createIfNull` to create a new Game Object if no dead ones were found in this Group.

It works by calling `Group.create` passing it the parameters given to this method, and returning the new child.

If a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child will be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.

func (*World) GetFirstDead2O

func (self *World) GetFirstDead2O(createIfNull bool, x int) *DisplayObject

GetFirstDead2O Get the first child that is dead (`child.alive === false`).

This is handy for checking if everything has been wiped out and adding to the pool as needed.

You can use the optional argument `createIfNull` to create a new Game Object if no dead ones were found in this Group.

It works by calling `Group.create` passing it the parameters given to this method, and returning the new child.

If a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child will be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.

func (*World) GetFirstDead3O

func (self *World) GetFirstDead3O(createIfNull bool, x int, y int) *DisplayObject

GetFirstDead3O Get the first child that is dead (`child.alive === false`).

This is handy for checking if everything has been wiped out and adding to the pool as needed.

You can use the optional argument `createIfNull` to create a new Game Object if no dead ones were found in this Group.

It works by calling `Group.create` passing it the parameters given to this method, and returning the new child.

If a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child will be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.

func (*World) GetFirstDead4O

func (self *World) GetFirstDead4O(createIfNull bool, x int, y int, key interface{}) *DisplayObject

GetFirstDead4O Get the first child that is dead (`child.alive === false`).

This is handy for checking if everything has been wiped out and adding to the pool as needed.

You can use the optional argument `createIfNull` to create a new Game Object if no dead ones were found in this Group.

It works by calling `Group.create` passing it the parameters given to this method, and returning the new child.

If a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child will be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.

func (*World) GetFirstDead5O

func (self *World) GetFirstDead5O(createIfNull bool, x int, y int, key interface{}, frame interface{}) *DisplayObject

GetFirstDead5O Get the first child that is dead (`child.alive === false`).

This is handy for checking if everything has been wiped out and adding to the pool as needed.

You can use the optional argument `createIfNull` to create a new Game Object if no dead ones were found in this Group.

It works by calling `Group.create` passing it the parameters given to this method, and returning the new child.

If a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child will be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.

func (*World) GetFirstDeadI

func (self *World) GetFirstDeadI(args ...interface{}) *DisplayObject

GetFirstDeadI Get the first child that is dead (`child.alive === false`).

This is handy for checking if everything has been wiped out and adding to the pool as needed.

You can use the optional argument `createIfNull` to create a new Game Object if no dead ones were found in this Group.

It works by calling `Group.create` passing it the parameters given to this method, and returning the new child.

If a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child will be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.

func (*World) GetFirstExists

func (self *World) GetFirstExists() *DisplayObject

GetFirstExists Get the first display object that exists, or doesn't exist.

You can use the optional argument `createIfNull` to create a new Game Object if none matching your exists argument were found in this Group.

It works by calling `Group.create` passing it the parameters given to this method, and returning the new child.

If a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child will be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.

func (*World) GetFirstExists1O

func (self *World) GetFirstExists1O(exists bool) *DisplayObject

GetFirstExists1O Get the first display object that exists, or doesn't exist.

You can use the optional argument `createIfNull` to create a new Game Object if none matching your exists argument were found in this Group.

It works by calling `Group.create` passing it the parameters given to this method, and returning the new child.

If a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child will be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.

func (*World) GetFirstExists2O

func (self *World) GetFirstExists2O(exists bool, createIfNull bool) *DisplayObject

GetFirstExists2O Get the first display object that exists, or doesn't exist.

You can use the optional argument `createIfNull` to create a new Game Object if none matching your exists argument were found in this Group.

It works by calling `Group.create` passing it the parameters given to this method, and returning the new child.

If a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child will be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.

func (*World) GetFirstExists3O

func (self *World) GetFirstExists3O(exists bool, createIfNull bool, x int) *DisplayObject

GetFirstExists3O Get the first display object that exists, or doesn't exist.

You can use the optional argument `createIfNull` to create a new Game Object if none matching your exists argument were found in this Group.

It works by calling `Group.create` passing it the parameters given to this method, and returning the new child.

If a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child will be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.

func (*World) GetFirstExists4O

func (self *World) GetFirstExists4O(exists bool, createIfNull bool, x int, y int) *DisplayObject

GetFirstExists4O Get the first display object that exists, or doesn't exist.

You can use the optional argument `createIfNull` to create a new Game Object if none matching your exists argument were found in this Group.

It works by calling `Group.create` passing it the parameters given to this method, and returning the new child.

If a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child will be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.

func (*World) GetFirstExists5O

func (self *World) GetFirstExists5O(exists bool, createIfNull bool, x int, y int, key interface{}) *DisplayObject

GetFirstExists5O Get the first display object that exists, or doesn't exist.

You can use the optional argument `createIfNull` to create a new Game Object if none matching your exists argument were found in this Group.

It works by calling `Group.create` passing it the parameters given to this method, and returning the new child.

If a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child will be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.

func (*World) GetFirstExists6O

func (self *World) GetFirstExists6O(exists bool, createIfNull bool, x int, y int, key interface{}, frame interface{}) *DisplayObject

GetFirstExists6O Get the first display object that exists, or doesn't exist.

You can use the optional argument `createIfNull` to create a new Game Object if none matching your exists argument were found in this Group.

It works by calling `Group.create` passing it the parameters given to this method, and returning the new child.

If a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child will be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.

func (*World) GetFirstExistsI

func (self *World) GetFirstExistsI(args ...interface{}) *DisplayObject

GetFirstExistsI Get the first display object that exists, or doesn't exist.

You can use the optional argument `createIfNull` to create a new Game Object if none matching your exists argument were found in this Group.

It works by calling `Group.create` passing it the parameters given to this method, and returning the new child.

If a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child will be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.

func (*World) GetFurthestFrom

func (self *World) GetFurthestFrom(object interface{}) interface{}

GetFurthestFrom Get the child furthest away from the given Object, with optional callback to filter children.

This can be a Sprite, Group, Image or any object with public x and y properties.

'furthest away' is determined by the distance from the objects `x` and `y` properties compared to the childs `x` and `y` properties.

You can use the optional `callback` argument to apply your own filter to the distance checks. If the child is closer then the previous child, it will be sent to `callback` as the first argument, with the distance as the second. The callback should return `true` if it passes your filtering criteria, otherwise it should return `false`.

func (*World) GetFurthestFrom1O

func (self *World) GetFurthestFrom1O(object interface{}, callback interface{}) interface{}

GetFurthestFrom1O Get the child furthest away from the given Object, with optional callback to filter children.

This can be a Sprite, Group, Image or any object with public x and y properties.

'furthest away' is determined by the distance from the objects `x` and `y` properties compared to the childs `x` and `y` properties.

You can use the optional `callback` argument to apply your own filter to the distance checks. If the child is closer then the previous child, it will be sent to `callback` as the first argument, with the distance as the second. The callback should return `true` if it passes your filtering criteria, otherwise it should return `false`.

func (*World) GetFurthestFrom2O

func (self *World) GetFurthestFrom2O(object interface{}, callback interface{}, callbackContext interface{}) interface{}

GetFurthestFrom2O Get the child furthest away from the given Object, with optional callback to filter children.

This can be a Sprite, Group, Image or any object with public x and y properties.

'furthest away' is determined by the distance from the objects `x` and `y` properties compared to the childs `x` and `y` properties.

You can use the optional `callback` argument to apply your own filter to the distance checks. If the child is closer then the previous child, it will be sent to `callback` as the first argument, with the distance as the second. The callback should return `true` if it passes your filtering criteria, otherwise it should return `false`.

func (*World) GetFurthestFromI

func (self *World) GetFurthestFromI(args ...interface{}) interface{}

GetFurthestFromI Get the child furthest away from the given Object, with optional callback to filter children.

This can be a Sprite, Group, Image or any object with public x and y properties.

'furthest away' is determined by the distance from the objects `x` and `y` properties compared to the childs `x` and `y` properties.

You can use the optional `callback` argument to apply your own filter to the distance checks. If the child is closer then the previous child, it will be sent to `callback` as the first argument, with the distance as the second. The callback should return `true` if it passes your filtering criteria, otherwise it should return `false`.

func (*World) GetIndex

func (self *World) GetIndex(child interface{}) int

GetIndex Get the index position of the given child in this group, which should match the child's `z` property.

func (*World) GetIndexI

func (self *World) GetIndexI(args ...interface{}) int

GetIndexI Get the index position of the given child in this group, which should match the child's `z` property.

func (*World) GetLocalBounds

func (self *World) GetLocalBounds() *Rectangle

GetLocalBounds Retrieves the non-global local bounds of the displayObjectContainer as a rectangle without any transformations. The calculation takes all visible children into consideration.

func (*World) GetLocalBoundsI

func (self *World) GetLocalBoundsI(args ...interface{}) *Rectangle

GetLocalBoundsI Retrieves the non-global local bounds of the displayObjectContainer as a rectangle without any transformations. The calculation takes all visible children into consideration.

func (*World) GetRandom

func (self *World) GetRandom() interface{}

GetRandom Returns a random child from the group.

func (*World) GetRandom1O

func (self *World) GetRandom1O(startIndex int) interface{}

GetRandom1O Returns a random child from the group.

func (*World) GetRandom2O

func (self *World) GetRandom2O(startIndex int, length int) interface{}

GetRandom2O Returns a random child from the group.

func (*World) GetRandomExists

func (self *World) GetRandomExists() interface{}

GetRandomExists Returns a random child from the Group that has `exists` set to `true`.

Optionally you can specify a start and end index. For example if this Group had 100 children, and you set `startIndex` to 0 and `endIndex` to 50, it would return a random child from only the first 50 children in the Group.

func (*World) GetRandomExists1O

func (self *World) GetRandomExists1O(startIndex int) interface{}

GetRandomExists1O Returns a random child from the Group that has `exists` set to `true`.

Optionally you can specify a start and end index. For example if this Group had 100 children, and you set `startIndex` to 0 and `endIndex` to 50, it would return a random child from only the first 50 children in the Group.

func (*World) GetRandomExists2O

func (self *World) GetRandomExists2O(startIndex int, endIndex int) interface{}

GetRandomExists2O Returns a random child from the Group that has `exists` set to `true`.

Optionally you can specify a start and end index. For example if this Group had 100 children, and you set `startIndex` to 0 and `endIndex` to 50, it would return a random child from only the first 50 children in the Group.

func (*World) GetRandomExistsI

func (self *World) GetRandomExistsI(args ...interface{}) interface{}

GetRandomExistsI Returns a random child from the Group that has `exists` set to `true`.

Optionally you can specify a start and end index. For example if this Group had 100 children, and you set `startIndex` to 0 and `endIndex` to 50, it would return a random child from only the first 50 children in the Group.

func (*World) GetRandomI

func (self *World) GetRandomI(args ...interface{}) interface{}

GetRandomI Returns a random child from the group.

func (*World) GetTop

func (self *World) GetTop() interface{}

GetTop Return the child at the top of this group.

The top child is the child displayed (rendered) above every other child.

func (*World) GetTopI

func (self *World) GetTopI(args ...interface{}) interface{}

GetTopI Return the child at the top of this group.

The top child is the child displayed (rendered) above every other child.

func (*World) HasProperty

func (self *World) HasProperty(child interface{}, key []string) bool

HasProperty Checks if the child has the given property.

Will scan up to 4 levels deep only.

func (*World) HasPropertyI

func (self *World) HasPropertyI(args ...interface{}) bool

HasPropertyI Checks if the child has the given property.

Will scan up to 4 levels deep only.

func (*World) Hash

func (self *World) Hash() []interface{}

Hash The hash array is an array belonging to this Group into which you can add any of its children via Group.addToHash and Group.removeFromHash.

Only children of this Group can be added to and removed from the hash.

This hash is used automatically by Phaser Arcade Physics in order to perform non z-index based destructive sorting. However if you don't use Arcade Physics, or this isn't a physics enabled Group, then you can use the hash to perform your own sorting and filtering of Group children without touching their z-index (and therefore display draw order)

func (*World) Height

func (self *World) Height() int

Height Gets or sets the current height of the game world. The world can never be smaller than the game (canvas) dimensions.

func (*World) IgnoreChildInput

func (self *World) IgnoreChildInput() bool

IgnoreChildInput If `ignoreChildInput` is `false` it will allow this objects _children_ to be considered as valid for Input events.

If this property is `true` then the children will _not_ be considered as valid for Input events.

Note that this property isn't recursive: only immediate children are influenced, it doesn't scan further down.

func (*World) IgnoreDestroy

func (self *World) IgnoreDestroy() bool

IgnoreDestroy A group with `ignoreDestroy` set to `true` ignores all calls to its `destroy` method.

func (*World) InputEnableChildren

func (self *World) InputEnableChildren() bool

InputEnableChildren A Group with `inputEnableChildren` set to `true` will automatically call `inputEnabled = true` on any children _added_ to, or _created by_, this Group.

If there are children already in the Group at the time you set this property, they are not changed.

func (*World) Iterate

func (self *World) Iterate(key string, value interface{}, returnType int) interface{}

Iterate Iterates over the children of the group performing one of several actions for matched children.

A child is considered a match when it has a property, named `key`, whose value is equal to `value` according to a strict equality comparison.

The result depends on the `returnType`:

  • {@link Phaser.Group.RETURN_TOTAL RETURN_TOTAL}: The callback, if any, is applied to all matching children. The number of matched children is returned.
  • {@link Phaser.Group.RETURN_NONE RETURN_NONE}: The callback, if any, is applied to all matching children. No value is returned.
  • {@link Phaser.Group.RETURN_CHILD RETURN_CHILD}: The callback, if any, is applied to the *first* matching child and the *first* matched child is returned. If there is no matching child then null is returned.

If `args` is specified it must be an array. The matched child will be assigned to the first element and the entire array will be applied to the callback function.

func (*World) Iterate1O

func (self *World) Iterate1O(key string, value interface{}, returnType int, callback interface{}) interface{}

Iterate1O Iterates over the children of the group performing one of several actions for matched children.

A child is considered a match when it has a property, named `key`, whose value is equal to `value` according to a strict equality comparison.

The result depends on the `returnType`:

  • {@link Phaser.Group.RETURN_TOTAL RETURN_TOTAL}: The callback, if any, is applied to all matching children. The number of matched children is returned.
  • {@link Phaser.Group.RETURN_NONE RETURN_NONE}: The callback, if any, is applied to all matching children. No value is returned.
  • {@link Phaser.Group.RETURN_CHILD RETURN_CHILD}: The callback, if any, is applied to the *first* matching child and the *first* matched child is returned. If there is no matching child then null is returned.

If `args` is specified it must be an array. The matched child will be assigned to the first element and the entire array will be applied to the callback function.

func (*World) Iterate2O

func (self *World) Iterate2O(key string, value interface{}, returnType int, callback interface{}, callbackContext interface{}) interface{}

Iterate2O Iterates over the children of the group performing one of several actions for matched children.

A child is considered a match when it has a property, named `key`, whose value is equal to `value` according to a strict equality comparison.

The result depends on the `returnType`:

  • {@link Phaser.Group.RETURN_TOTAL RETURN_TOTAL}: The callback, if any, is applied to all matching children. The number of matched children is returned.
  • {@link Phaser.Group.RETURN_NONE RETURN_NONE}: The callback, if any, is applied to all matching children. No value is returned.
  • {@link Phaser.Group.RETURN_CHILD RETURN_CHILD}: The callback, if any, is applied to the *first* matching child and the *first* matched child is returned. If there is no matching child then null is returned.

If `args` is specified it must be an array. The matched child will be assigned to the first element and the entire array will be applied to the callback function.

func (*World) Iterate3O

func (self *World) Iterate3O(key string, value interface{}, returnType int, callback interface{}, callbackContext interface{}, args []interface{}) interface{}

Iterate3O Iterates over the children of the group performing one of several actions for matched children.

A child is considered a match when it has a property, named `key`, whose value is equal to `value` according to a strict equality comparison.

The result depends on the `returnType`:

  • {@link Phaser.Group.RETURN_TOTAL RETURN_TOTAL}: The callback, if any, is applied to all matching children. The number of matched children is returned.
  • {@link Phaser.Group.RETURN_NONE RETURN_NONE}: The callback, if any, is applied to all matching children. No value is returned.
  • {@link Phaser.Group.RETURN_CHILD RETURN_CHILD}: The callback, if any, is applied to the *first* matching child and the *first* matched child is returned. If there is no matching child then null is returned.

If `args` is specified it must be an array. The matched child will be assigned to the first element and the entire array will be applied to the callback function.

func (*World) IterateI

func (self *World) IterateI(args ...interface{}) interface{}

IterateI Iterates over the children of the group performing one of several actions for matched children.

A child is considered a match when it has a property, named `key`, whose value is equal to `value` according to a strict equality comparison.

The result depends on the `returnType`:

  • {@link Phaser.Group.RETURN_TOTAL RETURN_TOTAL}: The callback, if any, is applied to all matching children. The number of matched children is returned.
  • {@link Phaser.Group.RETURN_NONE RETURN_NONE}: The callback, if any, is applied to all matching children. No value is returned.
  • {@link Phaser.Group.RETURN_CHILD RETURN_CHILD}: The callback, if any, is applied to the *first* matching child and the *first* matched child is returned. If there is no matching child then null is returned.

If `args` is specified it must be an array. The matched child will be assigned to the first element and the entire array will be applied to the callback function.

func (*World) Left

func (self *World) Left() int

Left The left coordinate of this Group.

It is derived by calling `getBounds`, calculating the Groups dimensions based on its visible children.

func (*World) Length

func (self *World) Length() int

Length Total number of children in this group, regardless of exists/alive status.

func (*World) MoveAll

func (self *World) MoveAll(group *Group) *Group

MoveAll Moves all children from this Group to the Group given.

func (*World) MoveAll1O

func (self *World) MoveAll1O(group *Group, silent bool) *Group

MoveAll1O Moves all children from this Group to the Group given.

func (*World) MoveAllI

func (self *World) MoveAllI(args ...interface{}) *Group

MoveAllI Moves all children from this Group to the Group given.

func (*World) MoveDown

func (self *World) MoveDown(child interface{}) interface{}

MoveDown Moves the given child down one place in this group unless it's already at the bottom.

func (*World) MoveDownI

func (self *World) MoveDownI(args ...interface{}) interface{}

MoveDownI Moves the given child down one place in this group unless it's already at the bottom.

func (*World) MoveUp

func (self *World) MoveUp(child interface{}) interface{}

MoveUp Moves the given child up one place in this group unless it's already at the top.

func (*World) MoveUpI

func (self *World) MoveUpI(args ...interface{}) interface{}

MoveUpI Moves the given child up one place in this group unless it's already at the top.

func (*World) MultiplyAll

func (self *World) MultiplyAll(property string, amount int, checkAlive bool, checkVisible bool)

MultiplyAll Multiplies the given property by the amount on all children in this group.

`Group.multiplyAll('x', 2)` will x2 the child.x value for each child.

func (*World) MultiplyAllI

func (self *World) MultiplyAllI(args ...interface{})

MultiplyAllI Multiplies the given property by the amount on all children in this group.

`Group.multiplyAll('x', 2)` will x2 the child.x value for each child.

func (*World) Name

func (self *World) Name() string

Name A name for this group. Not used internally but useful for debugging.

func (*World) Next

func (self *World) Next() interface{}

Next Advances the group cursor to the next (higher) object in the group.

If the cursor is at the end of the group (top child) it is moved the start of the group (bottom child).

func (*World) NextI

func (self *World) NextI(args ...interface{}) interface{}

NextI Advances the group cursor to the next (higher) object in the group.

If the cursor is at the end of the group (top child) it is moved the start of the group (bottom child).

func (*World) OnChildInputDown

func (self *World) OnChildInputDown() *Signal

OnChildInputDown This Signal is dispatched whenever a child of this Group emits an onInputDown signal as a result of having been interacted with by a Pointer. You can bind functions to this Signal instead of to every child Sprite.

This Signal is sent 2 arguments: A reference to the Sprite that triggered the signal, and a reference to the Pointer that caused it.

func (*World) OnChildInputOut

func (self *World) OnChildInputOut() *Signal

OnChildInputOut This Signal is dispatched whenever a child of this Group emits an onInputOut signal as a result of having been interacted with by a Pointer. You can bind functions to this Signal instead of to every child Sprite.

This Signal is sent 2 arguments: A reference to the Sprite that triggered the signal, and a reference to the Pointer that caused it.

func (*World) OnChildInputOver

func (self *World) OnChildInputOver() *Signal

OnChildInputOver This Signal is dispatched whenever a child of this Group emits an onInputOver signal as a result of having been interacted with by a Pointer. You can bind functions to this Signal instead of to every child Sprite.

This Signal is sent 2 arguments: A reference to the Sprite that triggered the signal, and a reference to the Pointer that caused it.

func (*World) OnChildInputUp

func (self *World) OnChildInputUp() *Signal

OnChildInputUp This Signal is dispatched whenever a child of this Group emits an onInputUp signal as a result of having been interacted with by a Pointer. You can bind functions to this Signal instead of to every child Sprite.

This Signal is sent 3 arguments: A reference to the Sprite that triggered the signal, a reference to the Pointer that caused it, and a boolean value `isOver` that tells you if the Pointer is still over the Sprite or not.

func (*World) OnDestroy

func (self *World) OnDestroy() *Signal

OnDestroy This signal is dispatched when the group is destroyed.

func (*World) PendingDestroy

func (self *World) PendingDestroy() bool

PendingDestroy A Group is that has `pendingDestroy` set to `true` is flagged to have its destroy method called on the next logic update. You can set it directly to flag the Group to be destroyed on its next update.

This is extremely useful if you wish to destroy a Group from within one of its own callbacks or a callback of one of its children.

func (*World) PhysicsBodyType

func (self *World) PhysicsBodyType() int

PhysicsBodyType If {@link Phaser.Group#enableBody enableBody} is true this is the type of physics body that is created on new Sprites.

The valid values are {@link Phaser.Physics.ARCADE}, {@link Phaser.Physics.P2JS}, {@link Phaser.Physics.NINJA}, etc.

func (*World) PhysicsSortDirection

func (self *World) PhysicsSortDirection() int

PhysicsSortDirection If this Group contains Arcade Physics Sprites you can set a custom sort direction via this property.

It should be set to one of the Phaser.Physics.Arcade sort direction constants:

Phaser.Physics.Arcade.SORT_NONE Phaser.Physics.Arcade.LEFT_RIGHT Phaser.Physics.Arcade.RIGHT_LEFT Phaser.Physics.Arcade.TOP_BOTTOM Phaser.Physics.Arcade.BOTTOM_TOP

If set to `null` the Group will use whatever Phaser.Physics.Arcade.sortDirection is set to. This is the default behavior.

func (*World) PhysicsType

func (self *World) PhysicsType() int

PhysicsType The const physics body type of this object.

func (*World) PostUpdate

func (self *World) PostUpdate()

PostUpdate The core postUpdate - as called by World.

func (*World) PostUpdateI

func (self *World) PostUpdateI(args ...interface{})

PostUpdateI The core postUpdate - as called by World.

func (*World) PreUpdate

func (self *World) PreUpdate()

PreUpdate The core preUpdate - as called by World.

func (*World) PreUpdateI

func (self *World) PreUpdateI(args ...interface{})

PreUpdateI The core preUpdate - as called by World.

func (*World) Previous

func (self *World) Previous() interface{}

Previous Moves the group cursor to the previous (lower) child in the group.

If the cursor is at the start of the group (bottom child) it is moved to the end (top child).

func (*World) PreviousI

func (self *World) PreviousI(args ...interface{}) interface{}

PreviousI Moves the group cursor to the previous (lower) child in the group.

If the cursor is at the start of the group (bottom child) it is moved to the end (top child).

func (*World) RandomX

func (self *World) RandomX() int

RandomX Gets a random integer which is lesser than or equal to the current width of the game world.

func (*World) RandomY

func (self *World) RandomY() int

RandomY Gets a random integer which is lesser than or equal to the current height of the game world.

func (*World) Remove

func (self *World) Remove(child interface{}) bool

Remove Removes the given child from this group.

This will dispatch an `onRemovedFromGroup` event from the child (if it has one), and optionally destroy the child.

If the group cursor was referring to the removed child it is updated to refer to the next child.

func (*World) Remove1O

func (self *World) Remove1O(child interface{}, destroy bool) bool

Remove1O Removes the given child from this group.

This will dispatch an `onRemovedFromGroup` event from the child (if it has one), and optionally destroy the child.

If the group cursor was referring to the removed child it is updated to refer to the next child.

func (*World) Remove2O

func (self *World) Remove2O(child interface{}, destroy bool, silent bool) bool

Remove2O Removes the given child from this group.

This will dispatch an `onRemovedFromGroup` event from the child (if it has one), and optionally destroy the child.

If the group cursor was referring to the removed child it is updated to refer to the next child.

func (*World) RemoveAll

func (self *World) RemoveAll()

RemoveAll Removes all children from this Group, but does not remove the group from its parent.

The children can be optionally destroyed as they are removed.

You can also optionally also destroy the BaseTexture the Child is using. Be careful if you've more than one Game Object sharing the same BaseTexture.

func (*World) RemoveAll1O

func (self *World) RemoveAll1O(destroy bool)

RemoveAll1O Removes all children from this Group, but does not remove the group from its parent.

The children can be optionally destroyed as they are removed.

You can also optionally also destroy the BaseTexture the Child is using. Be careful if you've more than one Game Object sharing the same BaseTexture.

func (*World) RemoveAll2O

func (self *World) RemoveAll2O(destroy bool, silent bool)

RemoveAll2O Removes all children from this Group, but does not remove the group from its parent.

The children can be optionally destroyed as they are removed.

You can also optionally also destroy the BaseTexture the Child is using. Be careful if you've more than one Game Object sharing the same BaseTexture.

func (*World) RemoveAll3O

func (self *World) RemoveAll3O(destroy bool, silent bool, destroyTexture bool)

RemoveAll3O Removes all children from this Group, but does not remove the group from its parent.

The children can be optionally destroyed as they are removed.

You can also optionally also destroy the BaseTexture the Child is using. Be careful if you've more than one Game Object sharing the same BaseTexture.

func (*World) RemoveAllI

func (self *World) RemoveAllI(args ...interface{})

RemoveAllI Removes all children from this Group, but does not remove the group from its parent.

The children can be optionally destroyed as they are removed.

You can also optionally also destroy the BaseTexture the Child is using. Be careful if you've more than one Game Object sharing the same BaseTexture.

func (*World) RemoveBetween

func (self *World) RemoveBetween(startIndex int)

RemoveBetween Removes all children from this group whose index falls beteen the given startIndex and endIndex values.

func (*World) RemoveBetween1O

func (self *World) RemoveBetween1O(startIndex int, endIndex int)

RemoveBetween1O Removes all children from this group whose index falls beteen the given startIndex and endIndex values.

func (*World) RemoveBetween2O

func (self *World) RemoveBetween2O(startIndex int, endIndex int, destroy bool)

RemoveBetween2O Removes all children from this group whose index falls beteen the given startIndex and endIndex values.

func (*World) RemoveBetween3O

func (self *World) RemoveBetween3O(startIndex int, endIndex int, destroy bool, silent bool)

RemoveBetween3O Removes all children from this group whose index falls beteen the given startIndex and endIndex values.

func (*World) RemoveBetweenI

func (self *World) RemoveBetweenI(args ...interface{})

RemoveBetweenI Removes all children from this group whose index falls beteen the given startIndex and endIndex values.

func (*World) RemoveChild

func (self *World) RemoveChild(child *DisplayObject) *DisplayObject

RemoveChild Removes a child from the container.

func (*World) RemoveChildAt

func (self *World) RemoveChildAt(index int) *DisplayObject

RemoveChildAt Removes a child from the specified index position.

func (*World) RemoveChildAtI

func (self *World) RemoveChildAtI(args ...interface{}) *DisplayObject

RemoveChildAtI Removes a child from the specified index position.

func (*World) RemoveChildI

func (self *World) RemoveChildI(args ...interface{}) *DisplayObject

RemoveChildI Removes a child from the container.

func (*World) RemoveChildren

func (self *World) RemoveChildren(beginIndex int, endIndex int)

RemoveChildren Removes all children from this container that are within the begin and end indexes.

func (*World) RemoveChildrenI

func (self *World) RemoveChildrenI(args ...interface{})

RemoveChildrenI Removes all children from this container that are within the begin and end indexes.

func (*World) RemoveFromHash

func (self *World) RemoveFromHash(child *DisplayObject) bool

RemoveFromHash Removes a child of this Group from the hash array. This call will return false if the child is not in the hash.

func (*World) RemoveFromHashI

func (self *World) RemoveFromHashI(args ...interface{}) bool

RemoveFromHashI Removes a child of this Group from the hash array. This call will return false if the child is not in the hash.

func (*World) RemoveI

func (self *World) RemoveI(args ...interface{}) bool

RemoveI Removes the given child from this group.

This will dispatch an `onRemovedFromGroup` event from the child (if it has one), and optionally destroy the child.

If the group cursor was referring to the removed child it is updated to refer to the next child.

func (*World) Replace

func (self *World) Replace(oldChild interface{}, newChild interface{}) interface{}

Replace Replaces a child of this Group with the given newChild. The newChild cannot be a member of this Group.

If `Group.enableBody` is set, then a physics body will be created on the object, so long as one does not already exist.

If `Group.inputEnableChildren` is set, then an Input Handler will be created on the object, so long as one does not already exist.

func (*World) ReplaceI

func (self *World) ReplaceI(args ...interface{}) interface{}

ReplaceI Replaces a child of this Group with the given newChild. The newChild cannot be a member of this Group.

If `Group.enableBody` is set, then a physics body will be created on the object, so long as one does not already exist.

If `Group.inputEnableChildren` is set, then an Input Handler will be created on the object, so long as one does not already exist.

func (*World) ResetChild

func (self *World) ResetChild(child *DisplayObject) *DisplayObject

ResetChild Takes a child and if the `x` and `y` arguments are given it calls `child.reset(x, y)` on it.

If the `key` and optionally the `frame` arguments are given, it calls `child.loadTexture(key, frame)` on it.

The two operations are separate. For example if you just wish to load a new texture then pass `null` as the x and y values.

func (*World) ResetChild1O

func (self *World) ResetChild1O(child *DisplayObject, x int) *DisplayObject

ResetChild1O Takes a child and if the `x` and `y` arguments are given it calls `child.reset(x, y)` on it.

If the `key` and optionally the `frame` arguments are given, it calls `child.loadTexture(key, frame)` on it.

The two operations are separate. For example if you just wish to load a new texture then pass `null` as the x and y values.

func (*World) ResetChild2O

func (self *World) ResetChild2O(child *DisplayObject, x int, y int) *DisplayObject

ResetChild2O Takes a child and if the `x` and `y` arguments are given it calls `child.reset(x, y)` on it.

If the `key` and optionally the `frame` arguments are given, it calls `child.loadTexture(key, frame)` on it.

The two operations are separate. For example if you just wish to load a new texture then pass `null` as the x and y values.

func (*World) ResetChild3O

func (self *World) ResetChild3O(child *DisplayObject, x int, y int, key interface{}) *DisplayObject

ResetChild3O Takes a child and if the `x` and `y` arguments are given it calls `child.reset(x, y)` on it.

If the `key` and optionally the `frame` arguments are given, it calls `child.loadTexture(key, frame)` on it.

The two operations are separate. For example if you just wish to load a new texture then pass `null` as the x and y values.

func (*World) ResetChild4O

func (self *World) ResetChild4O(child *DisplayObject, x int, y int, key interface{}, frame interface{}) *DisplayObject

ResetChild4O Takes a child and if the `x` and `y` arguments are given it calls `child.reset(x, y)` on it.

If the `key` and optionally the `frame` arguments are given, it calls `child.loadTexture(key, frame)` on it.

The two operations are separate. For example if you just wish to load a new texture then pass `null` as the x and y values.

func (*World) ResetChildI

func (self *World) ResetChildI(args ...interface{}) *DisplayObject

ResetChildI Takes a child and if the `x` and `y` arguments are given it calls `child.reset(x, y)` on it.

If the `key` and optionally the `frame` arguments are given, it calls `child.loadTexture(key, frame)` on it.

The two operations are separate. For example if you just wish to load a new texture then pass `null` as the x and y values.

func (*World) ResetCursor

func (self *World) ResetCursor() interface{}

ResetCursor Sets the group cursor to the first child in the group.

If the optional index parameter is given it sets the cursor to the object at that index instead.

func (*World) ResetCursor1O

func (self *World) ResetCursor1O(index int) interface{}

ResetCursor1O Sets the group cursor to the first child in the group.

If the optional index parameter is given it sets the cursor to the object at that index instead.

func (*World) ResetCursorI

func (self *World) ResetCursorI(args ...interface{}) interface{}

ResetCursorI Sets the group cursor to the first child in the group.

If the optional index parameter is given it sets the cursor to the object at that index instead.

func (*World) Resize

func (self *World) Resize(width int, height int)

Resize Updates the size of this world. Note that this doesn't modify the world x/y coordinates, just the width and height.

func (*World) ResizeI

func (self *World) ResizeI(args ...interface{})

ResizeI Updates the size of this world. Note that this doesn't modify the world x/y coordinates, just the width and height.

func (*World) Reverse

func (self *World) Reverse()

Reverse Reverses all children in this group.

This operation applies only to immediate children and does not propagate to subgroups.

func (*World) ReverseI

func (self *World) ReverseI(args ...interface{})

ReverseI Reverses all children in this group.

This operation applies only to immediate children and does not propagate to subgroups.

func (*World) Right

func (self *World) Right() int

Right The right coordinate of this Group.

It is derived by calling `getBounds`, calculating the Groups dimensions based on its visible children.

func (*World) Rotation

func (self *World) Rotation() int

Rotation The angle of rotation of the group container, in radians.

This will adjust the group container itself by modifying its rotation. This will have no impact on the rotation value of its children, but it will update their worldTransform and on-screen position.

func (*World) SendToBack

func (self *World) SendToBack(child interface{}) interface{}

SendToBack Sends the given child to the bottom of this group so it renders below all other children.

func (*World) SendToBackI

func (self *World) SendToBackI(args ...interface{}) interface{}

SendToBackI Sends the given child to the bottom of this group so it renders below all other children.

func (*World) Set

func (self *World) Set(child *Sprite, key string, value interface{}) bool

Set Quickly set a property on a single child of this group to a new value.

The operation parameter controls how the new value is assigned to the property, from simple replacement to addition and multiplication.

func (*World) Set1O

func (self *World) Set1O(child *Sprite, key string, value interface{}, checkAlive bool) bool

Set1O Quickly set a property on a single child of this group to a new value.

The operation parameter controls how the new value is assigned to the property, from simple replacement to addition and multiplication.

func (*World) Set2O

func (self *World) Set2O(child *Sprite, key string, value interface{}, checkAlive bool, checkVisible bool) bool

Set2O Quickly set a property on a single child of this group to a new value.

The operation parameter controls how the new value is assigned to the property, from simple replacement to addition and multiplication.

func (*World) Set3O

func (self *World) Set3O(child *Sprite, key string, value interface{}, checkAlive bool, checkVisible bool, operation int) bool

Set3O Quickly set a property on a single child of this group to a new value.

The operation parameter controls how the new value is assigned to the property, from simple replacement to addition and multiplication.

func (*World) Set4O

func (self *World) Set4O(child *Sprite, key string, value interface{}, checkAlive bool, checkVisible bool, operation int, force bool) bool

Set4O Quickly set a property on a single child of this group to a new value.

The operation parameter controls how the new value is assigned to the property, from simple replacement to addition and multiplication.

func (*World) SetAliveA

func (self *World) SetAliveA(member bool)

SetAliveA The alive property is useful for Groups that are children of other Groups and need to be included/excluded in checks like forEachAlive.

func (*World) SetAll

func (self *World) SetAll(key string, value interface{})

SetAll Quickly set the same property across all children of this group to a new value.

This call doesn't descend down children, so if you have a Group inside of this group, the property will be set on the group but not its children. If you need that ability please see `Group.setAllChildren`.

The operation parameter controls how the new value is assigned to the property, from simple replacement to addition and multiplication.

func (*World) SetAll1O

func (self *World) SetAll1O(key string, value interface{}, checkAlive bool)

SetAll1O Quickly set the same property across all children of this group to a new value.

This call doesn't descend down children, so if you have a Group inside of this group, the property will be set on the group but not its children. If you need that ability please see `Group.setAllChildren`.

The operation parameter controls how the new value is assigned to the property, from simple replacement to addition and multiplication.

func (*World) SetAll2O

func (self *World) SetAll2O(key string, value interface{}, checkAlive bool, checkVisible bool)

SetAll2O Quickly set the same property across all children of this group to a new value.

This call doesn't descend down children, so if you have a Group inside of this group, the property will be set on the group but not its children. If you need that ability please see `Group.setAllChildren`.

The operation parameter controls how the new value is assigned to the property, from simple replacement to addition and multiplication.

func (*World) SetAll3O

func (self *World) SetAll3O(key string, value interface{}, checkAlive bool, checkVisible bool, operation int)

SetAll3O Quickly set the same property across all children of this group to a new value.

This call doesn't descend down children, so if you have a Group inside of this group, the property will be set on the group but not its children. If you need that ability please see `Group.setAllChildren`.

The operation parameter controls how the new value is assigned to the property, from simple replacement to addition and multiplication.

func (*World) SetAll4O

func (self *World) SetAll4O(key string, value interface{}, checkAlive bool, checkVisible bool, operation int, force bool)

SetAll4O Quickly set the same property across all children of this group to a new value.

This call doesn't descend down children, so if you have a Group inside of this group, the property will be set on the group but not its children. If you need that ability please see `Group.setAllChildren`.

The operation parameter controls how the new value is assigned to the property, from simple replacement to addition and multiplication.

func (*World) SetAllChildren

func (self *World) SetAllChildren(key string, value interface{})

SetAllChildren Quickly set the same property across all children of this group, and any child Groups, to a new value.

If this group contains other Groups then the same property is set across their children as well, iterating down until it reaches the bottom. Unlike with `setAll` the property is NOT set on child Groups itself.

The operation parameter controls how the new value is assigned to the property, from simple replacement to addition and multiplication.

func (*World) SetAllChildren1O

func (self *World) SetAllChildren1O(key string, value interface{}, checkAlive bool)

SetAllChildren1O Quickly set the same property across all children of this group, and any child Groups, to a new value.

If this group contains other Groups then the same property is set across their children as well, iterating down until it reaches the bottom. Unlike with `setAll` the property is NOT set on child Groups itself.

The operation parameter controls how the new value is assigned to the property, from simple replacement to addition and multiplication.

func (*World) SetAllChildren2O

func (self *World) SetAllChildren2O(key string, value interface{}, checkAlive bool, checkVisible bool)

SetAllChildren2O Quickly set the same property across all children of this group, and any child Groups, to a new value.

If this group contains other Groups then the same property is set across their children as well, iterating down until it reaches the bottom. Unlike with `setAll` the property is NOT set on child Groups itself.

The operation parameter controls how the new value is assigned to the property, from simple replacement to addition and multiplication.

func (*World) SetAllChildren3O

func (self *World) SetAllChildren3O(key string, value interface{}, checkAlive bool, checkVisible bool, operation int)

SetAllChildren3O Quickly set the same property across all children of this group, and any child Groups, to a new value.

If this group contains other Groups then the same property is set across their children as well, iterating down until it reaches the bottom. Unlike with `setAll` the property is NOT set on child Groups itself.

The operation parameter controls how the new value is assigned to the property, from simple replacement to addition and multiplication.

func (*World) SetAllChildren4O

func (self *World) SetAllChildren4O(key string, value interface{}, checkAlive bool, checkVisible bool, operation int, force bool)

SetAllChildren4O Quickly set the same property across all children of this group, and any child Groups, to a new value.

If this group contains other Groups then the same property is set across their children as well, iterating down until it reaches the bottom. Unlike with `setAll` the property is NOT set on child Groups itself.

The operation parameter controls how the new value is assigned to the property, from simple replacement to addition and multiplication.

func (*World) SetAllChildrenI

func (self *World) SetAllChildrenI(args ...interface{})

SetAllChildrenI Quickly set the same property across all children of this group, and any child Groups, to a new value.

If this group contains other Groups then the same property is set across their children as well, iterating down until it reaches the bottom. Unlike with `setAll` the property is NOT set on child Groups itself.

The operation parameter controls how the new value is assigned to the property, from simple replacement to addition and multiplication.

func (*World) SetAllI

func (self *World) SetAllI(args ...interface{})

SetAllI Quickly set the same property across all children of this group to a new value.

This call doesn't descend down children, so if you have a Group inside of this group, the property will be set on the group but not its children. If you need that ability please see `Group.setAllChildren`.

The operation parameter controls how the new value is assigned to the property, from simple replacement to addition and multiplication.

func (*World) SetAlphaA

func (self *World) SetAlphaA(member int)

SetAlphaA The alpha value of the group container.

func (*World) SetAngleA

func (self *World) SetAngleA(member int)

SetAngleA The angle of rotation of the group container, in degrees.

This adjusts the group itself by modifying its local rotation transform.

This has no impact on the rotation/angle properties of the children, but it will update their worldTransform and on-screen orientation and position.

func (*World) SetBottomA

func (self *World) SetBottomA(member int)

SetBottomA The bottom coordinate of this Group.

It is derived by calling `getBounds`, calculating the Groups dimensions based on its visible children.

func (*World) SetBounds

func (self *World) SetBounds(x int, y int, width int, height int)

SetBounds Updates the size of this world and sets World.x/y to the given values The Camera bounds and Physics bounds (if set) are also updated to match the new World bounds.

func (*World) SetBoundsA

func (self *World) SetBoundsA(member *Rectangle)

SetBoundsA The World has no fixed size, but it does have a bounds outside of which objects are no longer considered as being "in world" and you should use this to clean-up the display list and purge dead objects. By default we set the Bounds to be from 0,0 to Game.width,Game.height. I.e. it will match the size given to the game constructor with 0,0 representing the top-left of the display. However 0,0 is actually the center of the world, and if you rotate or scale the world all of that will happen from 0,0. So if you want to make a game in which the world itself will rotate you should adjust the bounds so that 0,0 is the center point, i.e. set them to -1000,-1000,2000,2000 for a 2000x2000 sized world centered around 0,0. Bound of this world that objects can not escape from.

func (*World) SetBoundsI

func (self *World) SetBoundsI(args ...interface{})

SetBoundsI Updates the size of this world and sets World.x/y to the given values The Camera bounds and Physics bounds (if set) are also updated to match the new World bounds.

func (*World) SetCameraA

func (self *World) SetCameraA(member *Camera)

SetCameraA Camera instance.

func (*World) SetCameraOffsetA

func (self *World) SetCameraOffsetA(member *Point)

SetCameraOffsetA If this object is {@link Phaser.Group#fixedToCamera fixedToCamera} then this stores the x/y position offset relative to the top-left of the camera view. If the parent of this Group is also `fixedToCamera` then the offset here is in addition to that and should typically be disabled.

func (*World) SetCenterXA

func (self *World) SetCenterXA(member int)

SetCenterXA Gets the X position corresponding to the center point of the world.

func (*World) SetCenterYA

func (self *World) SetCenterYA(member int)

SetCenterYA Gets the Y position corresponding to the center point of the world.

func (*World) SetChildIndex

func (self *World) SetChildIndex(child *DisplayObject, index int)

SetChildIndex Changes the position of an existing child in the display object container

func (*World) SetChildIndexI

func (self *World) SetChildIndexI(args ...interface{})

SetChildIndexI Changes the position of an existing child in the display object container

func (*World) SetChildrenA

func (self *World) SetChildrenA(member []DisplayObject)

SetChildrenA [read-only] The array of children of this container.

func (*World) SetClassTypeA

func (self *World) SetClassTypeA(member interface{})

SetClassTypeA The type of objects that will be created when using {@link Phaser.Group#create create} or {@link Phaser.Group#createMultiple createMultiple}.

Any object may be used but it should extend either Sprite or Image and accept the same constructor arguments: when a new object is created it is passed the following parameters to its constructor: `(game, x, y, key, frame)`.

func (*World) SetCursorA

func (self *World) SetCursorA(member *DisplayObject)

SetCursorA The current display object that the group cursor is pointing to, if any. (Can be set manually.)

The cursor is a way to iterate through the children in a Group using {@link Phaser.Group#next next} and {@link Phaser.Group#previous previous}.

func (*World) SetCursorIndexA

func (self *World) SetCursorIndexA(member int)

SetCursorIndexA The current index of the Group cursor. Advance it with Group.next.

func (*World) SetEnableBodyA

func (self *World) SetEnableBodyA(member bool)

SetEnableBodyA If true all Sprites created by, or added to this group, will have a physics body enabled on them.

If there are children already in the Group at the time you set this property, they are not changed.

The default body type is controlled with {@link Phaser.Group#physicsBodyType physicsBodyType}.

func (*World) SetEnableBodyDebugA

func (self *World) SetEnableBodyDebugA(member bool)

SetEnableBodyDebugA If true when a physics body is created (via {@link Phaser.Group#enableBody enableBody}) it will create a physics debug object as well.

This only works for P2 bodies.

func (*World) SetExistsA

func (self *World) SetExistsA(member bool)

SetExistsA If exists is true the group is updated, otherwise it is skipped.

func (*World) SetFixedToCameraA

func (self *World) SetFixedToCameraA(member bool)

SetFixedToCameraA A Group that is fixed to the camera uses its x/y coordinates as offsets from the top left of the camera. These are stored in Group.cameraOffset.

Note that the cameraOffset values are in addition to any parent in the display list. So if this Group was in a Group that has x: 200, then this will be added to the cameraOffset.x

func (*World) SetGameA

func (self *World) SetGameA(member *Game)

SetGameA A reference to the currently running Game.

func (*World) SetHashA

func (self *World) SetHashA(member []interface{})

SetHashA The hash array is an array belonging to this Group into which you can add any of its children via Group.addToHash and Group.removeFromHash.

Only children of this Group can be added to and removed from the hash.

This hash is used automatically by Phaser Arcade Physics in order to perform non z-index based destructive sorting. However if you don't use Arcade Physics, or this isn't a physics enabled Group, then you can use the hash to perform your own sorting and filtering of Group children without touching their z-index (and therefore display draw order)

func (*World) SetHeightA

func (self *World) SetHeightA(member int)

SetHeightA Gets or sets the current height of the game world. The world can never be smaller than the game (canvas) dimensions.

func (*World) SetI

func (self *World) SetI(args ...interface{}) bool

SetI Quickly set a property on a single child of this group to a new value.

The operation parameter controls how the new value is assigned to the property, from simple replacement to addition and multiplication.

func (*World) SetIgnoreChildInputA

func (self *World) SetIgnoreChildInputA(member bool)

SetIgnoreChildInputA If `ignoreChildInput` is `false` it will allow this objects _children_ to be considered as valid for Input events.

If this property is `true` then the children will _not_ be considered as valid for Input events.

Note that this property isn't recursive: only immediate children are influenced, it doesn't scan further down.

func (*World) SetIgnoreDestroyA

func (self *World) SetIgnoreDestroyA(member bool)

SetIgnoreDestroyA A group with `ignoreDestroy` set to `true` ignores all calls to its `destroy` method.

func (*World) SetInputEnableChildrenA

func (self *World) SetInputEnableChildrenA(member bool)

SetInputEnableChildrenA A Group with `inputEnableChildren` set to `true` will automatically call `inputEnabled = true` on any children _added_ to, or _created by_, this Group.

If there are children already in the Group at the time you set this property, they are not changed.

func (*World) SetLeftA

func (self *World) SetLeftA(member int)

SetLeftA The left coordinate of this Group.

It is derived by calling `getBounds`, calculating the Groups dimensions based on its visible children.

func (*World) SetLengthA

func (self *World) SetLengthA(member int)

SetLengthA Total number of children in this group, regardless of exists/alive status.

func (*World) SetNameA

func (self *World) SetNameA(member string)

SetNameA A name for this group. Not used internally but useful for debugging.

func (*World) SetOnChildInputDownA

func (self *World) SetOnChildInputDownA(member *Signal)

SetOnChildInputDownA This Signal is dispatched whenever a child of this Group emits an onInputDown signal as a result of having been interacted with by a Pointer. You can bind functions to this Signal instead of to every child Sprite.

This Signal is sent 2 arguments: A reference to the Sprite that triggered the signal, and a reference to the Pointer that caused it.

func (*World) SetOnChildInputOutA

func (self *World) SetOnChildInputOutA(member *Signal)

SetOnChildInputOutA This Signal is dispatched whenever a child of this Group emits an onInputOut signal as a result of having been interacted with by a Pointer. You can bind functions to this Signal instead of to every child Sprite.

This Signal is sent 2 arguments: A reference to the Sprite that triggered the signal, and a reference to the Pointer that caused it.

func (*World) SetOnChildInputOverA

func (self *World) SetOnChildInputOverA(member *Signal)

SetOnChildInputOverA This Signal is dispatched whenever a child of this Group emits an onInputOver signal as a result of having been interacted with by a Pointer. You can bind functions to this Signal instead of to every child Sprite.

This Signal is sent 2 arguments: A reference to the Sprite that triggered the signal, and a reference to the Pointer that caused it.

func (*World) SetOnChildInputUpA

func (self *World) SetOnChildInputUpA(member *Signal)

SetOnChildInputUpA This Signal is dispatched whenever a child of this Group emits an onInputUp signal as a result of having been interacted with by a Pointer. You can bind functions to this Signal instead of to every child Sprite.

This Signal is sent 3 arguments: A reference to the Sprite that triggered the signal, a reference to the Pointer that caused it, and a boolean value `isOver` that tells you if the Pointer is still over the Sprite or not.

func (*World) SetOnDestroyA

func (self *World) SetOnDestroyA(member *Signal)

SetOnDestroyA This signal is dispatched when the group is destroyed.

func (*World) SetPendingDestroyA

func (self *World) SetPendingDestroyA(member bool)

SetPendingDestroyA A Group is that has `pendingDestroy` set to `true` is flagged to have its destroy method called on the next logic update. You can set it directly to flag the Group to be destroyed on its next update.

This is extremely useful if you wish to destroy a Group from within one of its own callbacks or a callback of one of its children.

func (*World) SetPhysicsBodyTypeA

func (self *World) SetPhysicsBodyTypeA(member int)

SetPhysicsBodyTypeA If {@link Phaser.Group#enableBody enableBody} is true this is the type of physics body that is created on new Sprites.

The valid values are {@link Phaser.Physics.ARCADE}, {@link Phaser.Physics.P2JS}, {@link Phaser.Physics.NINJA}, etc.

func (*World) SetPhysicsSortDirectionA

func (self *World) SetPhysicsSortDirectionA(member int)

SetPhysicsSortDirectionA If this Group contains Arcade Physics Sprites you can set a custom sort direction via this property.

It should be set to one of the Phaser.Physics.Arcade sort direction constants:

Phaser.Physics.Arcade.SORT_NONE Phaser.Physics.Arcade.LEFT_RIGHT Phaser.Physics.Arcade.RIGHT_LEFT Phaser.Physics.Arcade.TOP_BOTTOM Phaser.Physics.Arcade.BOTTOM_TOP

If set to `null` the Group will use whatever Phaser.Physics.Arcade.sortDirection is set to. This is the default behavior.

func (*World) SetPhysicsTypeA

func (self *World) SetPhysicsTypeA(member int)

SetPhysicsTypeA The const physics body type of this object.

func (*World) SetProperty

func (self *World) SetProperty(child interface{}, key []interface{}, value interface{}) bool

SetProperty Sets a property to the given value on the child. The operation parameter controls how the value is set.

The operations are: - 0: set the existing value to the given value; if force is `true` a new property will be created if needed - 1: will add the given value to the value already present. - 2: will subtract the given value from the value already present. - 3: will multiply the value already present by the given value. - 4: will divide the value already present by the given value.

func (*World) SetProperty1O

func (self *World) SetProperty1O(child interface{}, key []interface{}, value interface{}, operation int) bool

SetProperty1O Sets a property to the given value on the child. The operation parameter controls how the value is set.

The operations are: - 0: set the existing value to the given value; if force is `true` a new property will be created if needed - 1: will add the given value to the value already present. - 2: will subtract the given value from the value already present. - 3: will multiply the value already present by the given value. - 4: will divide the value already present by the given value.

func (*World) SetProperty2O

func (self *World) SetProperty2O(child interface{}, key []interface{}, value interface{}, operation int, force bool) bool

SetProperty2O Sets a property to the given value on the child. The operation parameter controls how the value is set.

The operations are: - 0: set the existing value to the given value; if force is `true` a new property will be created if needed - 1: will add the given value to the value already present. - 2: will subtract the given value from the value already present. - 3: will multiply the value already present by the given value. - 4: will divide the value already present by the given value.

func (*World) SetPropertyI

func (self *World) SetPropertyI(args ...interface{}) bool

SetPropertyI Sets a property to the given value on the child. The operation parameter controls how the value is set.

The operations are: - 0: set the existing value to the given value; if force is `true` a new property will be created if needed - 1: will add the given value to the value already present. - 2: will subtract the given value from the value already present. - 3: will multiply the value already present by the given value. - 4: will divide the value already present by the given value.

func (*World) SetRandomXA

func (self *World) SetRandomXA(member int)

SetRandomXA Gets a random integer which is lesser than or equal to the current width of the game world.

func (*World) SetRandomYA

func (self *World) SetRandomYA(member int)

SetRandomYA Gets a random integer which is lesser than or equal to the current height of the game world.

func (*World) SetRightA

func (self *World) SetRightA(member int)

SetRightA The right coordinate of this Group.

It is derived by calling `getBounds`, calculating the Groups dimensions based on its visible children.

func (*World) SetRotationA

func (self *World) SetRotationA(member int)

SetRotationA The angle of rotation of the group container, in radians.

This will adjust the group container itself by modifying its rotation. This will have no impact on the rotation value of its children, but it will update their worldTransform and on-screen position.

func (*World) SetTopA

func (self *World) SetTopA(member int)

SetTopA The top coordinate of this Group.

It is derived by calling `getBounds`, calculating the Groups dimensions based on its visible children.

func (*World) SetTotalA

func (self *World) SetTotalA(member int)

SetTotalA Total number of existing children in the group.

func (*World) SetTypeA

func (self *World) SetTypeA(member int)

SetTypeA Internal Phaser Type value.

func (*World) SetVisibleA

func (self *World) SetVisibleA(member bool)

SetVisibleA The visible state of the group. Non-visible Groups and all of their children are not rendered.

func (*World) SetWidthA

func (self *World) SetWidthA(member int)

SetWidthA Gets or sets the current width of the game world. The world can never be smaller than the game (canvas) dimensions.

func (*World) SetXA

func (self *World) SetXA(member int)

SetXA The x coordinate of the group container.

You can adjust the group container itself by modifying its coordinates. This will have no impact on the x/y coordinates of its children, but it will update their worldTransform and on-screen position.

func (*World) SetYA

func (self *World) SetYA(member int)

SetYA The y coordinate of the group container.

You can adjust the group container itself by modifying its coordinates. This will have no impact on the x/y coordinates of its children, but it will update their worldTransform and on-screen position.

func (*World) SetZA

func (self *World) SetZA(member int)

SetZA The z-depth value of this object within its parent container/Group - the World is a Group as well. This value must be unique for each child in a Group.

func (*World) Set_definedSizeA

func (self *World) Set_definedSizeA(member bool)

Set_definedSizeA True if the World has been given a specifically defined size (i.e. from a Tilemap or direct in code) or false if it's just matched to the Game dimensions.

func (*World) Set_heightA

func (self *World) Set_heightA(member interface{})

Set_heightA The defined height of the World. Sometimes the bounds needs to grow larger than this (if you resize the game) but this retains the original requested dimension.

func (*World) Set_widthA

func (self *World) Set_widthA(member interface{})

Set_widthA The defined width of the World. Sometimes the bounds needs to grow larger than this (if you resize the game) but this retains the original requested dimension.

func (*World) Shutdown

func (self *World) Shutdown()

Shutdown Destroyer of worlds.

func (*World) ShutdownI

func (self *World) ShutdownI(args ...interface{})

ShutdownI Destroyer of worlds.

func (*World) Sort

func (self *World) Sort()

Sort Sort the children in the group according to a particular key and ordering.

Call this function to sort the group according to a particular key value and order.

For example to depth sort Sprites for Zelda-style game you might call `group.sort('y', Phaser.Group.SORT_ASCENDING)` at the bottom of your `State.update()`.

Internally this uses a standard JavaScript Array sort, so everything that applies there also applies here, including alphabetical sorting, mixing strings and numbers, and Unicode sorting. See MDN for more details.

func (*World) Sort1O

func (self *World) Sort1O(key string)

Sort1O Sort the children in the group according to a particular key and ordering.

Call this function to sort the group according to a particular key value and order.

For example to depth sort Sprites for Zelda-style game you might call `group.sort('y', Phaser.Group.SORT_ASCENDING)` at the bottom of your `State.update()`.

Internally this uses a standard JavaScript Array sort, so everything that applies there also applies here, including alphabetical sorting, mixing strings and numbers, and Unicode sorting. See MDN for more details.

func (*World) Sort2O

func (self *World) Sort2O(key string, order int)

Sort2O Sort the children in the group according to a particular key and ordering.

Call this function to sort the group according to a particular key value and order.

For example to depth sort Sprites for Zelda-style game you might call `group.sort('y', Phaser.Group.SORT_ASCENDING)` at the bottom of your `State.update()`.

Internally this uses a standard JavaScript Array sort, so everything that applies there also applies here, including alphabetical sorting, mixing strings and numbers, and Unicode sorting. See MDN for more details.

func (*World) SortI

func (self *World) SortI(args ...interface{})

SortI Sort the children in the group according to a particular key and ordering.

Call this function to sort the group according to a particular key value and order.

For example to depth sort Sprites for Zelda-style game you might call `group.sort('y', Phaser.Group.SORT_ASCENDING)` at the bottom of your `State.update()`.

Internally this uses a standard JavaScript Array sort, so everything that applies there also applies here, including alphabetical sorting, mixing strings and numbers, and Unicode sorting. See MDN for more details.

func (*World) StateChange

func (self *World) StateChange()

StateChange Called whenever the State changes or resets.

It resets the world.x and world.y coordinates back to zero, then resets the Camera.

func (*World) StateChangeI

func (self *World) StateChangeI(args ...interface{})

StateChangeI Called whenever the State changes or resets.

It resets the world.x and world.y coordinates back to zero, then resets the Camera.

func (*World) SubAll

func (self *World) SubAll(property string, amount int, checkAlive bool, checkVisible bool)

SubAll Subtracts the amount from the given property on all children in this group.

`Group.subAll('x', 10)` will minus 10 from the child.x value for each child.

func (*World) SubAllI

func (self *World) SubAllI(args ...interface{})

SubAllI Subtracts the amount from the given property on all children in this group.

`Group.subAll('x', 10)` will minus 10 from the child.x value for each child.

func (*World) Swap

func (self *World) Swap(child1 interface{}, child2 interface{})

Swap Swaps the position of two children in this group.

Both children must be in this group, a child cannot be swapped with itself, and unparented children cannot be swapped.

func (*World) SwapChildren

func (self *World) SwapChildren(child *DisplayObject, child2 *DisplayObject)

SwapChildren Swaps the position of 2 Display Objects within this container.

func (*World) SwapChildrenI

func (self *World) SwapChildrenI(args ...interface{})

SwapChildrenI Swaps the position of 2 Display Objects within this container.

func (*World) SwapI

func (self *World) SwapI(args ...interface{})

SwapI Swaps the position of two children in this group.

Both children must be in this group, a child cannot be swapped with itself, and unparented children cannot be swapped.

func (*World) Top

func (self *World) Top() int

Top The top coordinate of this Group.

It is derived by calling `getBounds`, calculating the Groups dimensions based on its visible children.

func (*World) Total

func (self *World) Total() int

Total Total number of existing children in the group.

func (*World) Type

func (self *World) Type() int

Type Internal Phaser Type value.

func (*World) Update

func (self *World) Update()

Update The core update - as called by World.

func (*World) UpdateI

func (self *World) UpdateI(args ...interface{})

UpdateI The core update - as called by World.

func (*World) UpdateZ

func (self *World) UpdateZ()

UpdateZ Internal method that re-applies all of the children's Z values.

This must be called whenever children ordering is altered so that their `z` indices are correctly updated.

func (*World) UpdateZI

func (self *World) UpdateZI(args ...interface{})

UpdateZI Internal method that re-applies all of the children's Z values.

This must be called whenever children ordering is altered so that their `z` indices are correctly updated.

func (*World) Visible

func (self *World) Visible() bool

Visible The visible state of the group. Non-visible Groups and all of their children are not rendered.

func (*World) Width

func (self *World) Width() int

Width Gets or sets the current width of the game world. The world can never be smaller than the game (canvas) dimensions.

func (*World) Wrap

func (self *World) Wrap(sprite interface{})

Wrap This will take the given game object and check if its x/y coordinates fall outside of the world bounds. If they do it will reposition the object to the opposite side of the world, creating a wrap-around effect. If sprite has a P2 body then the body (sprite.body) should be passed as first parameter to the function.

Please understand there are limitations to this method. For example if you have scaled the World then objects won't always be re-positioned correctly, and you'll need to employ your own wrapping function.

func (*World) Wrap1O

func (self *World) Wrap1O(sprite interface{}, padding int)

Wrap1O This will take the given game object and check if its x/y coordinates fall outside of the world bounds. If they do it will reposition the object to the opposite side of the world, creating a wrap-around effect. If sprite has a P2 body then the body (sprite.body) should be passed as first parameter to the function.

Please understand there are limitations to this method. For example if you have scaled the World then objects won't always be re-positioned correctly, and you'll need to employ your own wrapping function.

func (*World) Wrap2O

func (self *World) Wrap2O(sprite interface{}, padding int, useBounds bool)

Wrap2O This will take the given game object and check if its x/y coordinates fall outside of the world bounds. If they do it will reposition the object to the opposite side of the world, creating a wrap-around effect. If sprite has a P2 body then the body (sprite.body) should be passed as first parameter to the function.

Please understand there are limitations to this method. For example if you have scaled the World then objects won't always be re-positioned correctly, and you'll need to employ your own wrapping function.

func (*World) Wrap3O

func (self *World) Wrap3O(sprite interface{}, padding int, useBounds bool, horizontal bool)

Wrap3O This will take the given game object and check if its x/y coordinates fall outside of the world bounds. If they do it will reposition the object to the opposite side of the world, creating a wrap-around effect. If sprite has a P2 body then the body (sprite.body) should be passed as first parameter to the function.

Please understand there are limitations to this method. For example if you have scaled the World then objects won't always be re-positioned correctly, and you'll need to employ your own wrapping function.

func (*World) Wrap4O

func (self *World) Wrap4O(sprite interface{}, padding int, useBounds bool, horizontal bool, vertical bool)

Wrap4O This will take the given game object and check if its x/y coordinates fall outside of the world bounds. If they do it will reposition the object to the opposite side of the world, creating a wrap-around effect. If sprite has a P2 body then the body (sprite.body) should be passed as first parameter to the function.

Please understand there are limitations to this method. For example if you have scaled the World then objects won't always be re-positioned correctly, and you'll need to employ your own wrapping function.

func (*World) WrapI

func (self *World) WrapI(args ...interface{})

WrapI This will take the given game object and check if its x/y coordinates fall outside of the world bounds. If they do it will reposition the object to the opposite side of the world, creating a wrap-around effect. If sprite has a P2 body then the body (sprite.body) should be passed as first parameter to the function.

Please understand there are limitations to this method. For example if you have scaled the World then objects won't always be re-positioned correctly, and you'll need to employ your own wrapping function.

func (*World) X

func (self *World) X() int

X The x coordinate of the group container.

You can adjust the group container itself by modifying its coordinates. This will have no impact on the x/y coordinates of its children, but it will update their worldTransform and on-screen position.

func (*World) Xy

func (self *World) Xy(index int, x int, y int)

Xy Positions the child found at the given index within this group to the given x and y coordinates.

func (*World) XyI

func (self *World) XyI(args ...interface{})

XyI Positions the child found at the given index within this group to the given x and y coordinates.

func (*World) Y

func (self *World) Y() int

Y The y coordinate of the group container.

You can adjust the group container itself by modifying its coordinates. This will have no impact on the x/y coordinates of its children, but it will update their worldTransform and on-screen position.

func (*World) Z

func (self *World) Z() int

Z The z-depth value of this object within its parent container/Group - the World is a Group as well. This value must be unique for each child in a Group.

type XMLDocument

type XMLDocument struct{ *js.Object }

type XMLHttpRequest

type XMLHttpRequest struct{ *js.Object }

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL