Documentation ¶
Index ¶
- type Absorber
- type Breaker
- type BreaksInfo
- type JSDrawable
- type JSObjects
- type StickyInfo
- type WorldSettings
- type WorldState
- func (worldState *WorldState) Clear()
- func (worldState *WorldState) ClearAllJoints()
- func (worldState *WorldState) ClearJoints(body *box2d.B2Body)
- func (worldState *WorldState) CreateBouncyDebris()
- func (worldState *WorldState) CreateBreakableDebris()
- func (worldState *WorldState) CreateDebris()
- func (worldState *WorldState) CreateGoalBlock()
- func (worldState *WorldState) CreateLaunchBlock()
- func (worldState *WorldState) CreatePlayer()
- func (worldState *WorldState) CreateStaticBouncyDebris()
- func (worldState *WorldState) CreateStaticDebris()
- func (worldState *WorldState) CreateStickyDebris()
- func (worldState *WorldState) CreateWater()
- func (worldState WorldState) GetSmallestDimension() float64
- func (worldState *WorldState) HandleClick(this js.Value, args []js.Value) interface{}
- func (worldState *WorldState) HandleKeys(this js.Value, args []js.Value) interface{}
- func (worldState *WorldState) HandlePause(this js.Value, args []js.Value) interface{}
- func (worldState *WorldState) HandleUnpause(this js.Value, args []js.Value) interface{}
- func (worldState WorldState) IsPlayerOutOfBounds() bool
- func (worldState *WorldState) LaunchPlayer(mx float64, my float64)
- func (worldState *WorldState) Populate()
- func (worldState *WorldState) PushDebris(impulseVelocity box2d.B2Vec2)
- func (worldState *WorldState) RenderFrame(this js.Value, args []js.Value) interface{}
- func (worldState *WorldState) Reset()
- func (worldState *WorldState) Resize() bool
- func (worldState *WorldState) SetLaunches(launches int)
- func (worldState *WorldState) Size()
- func (worldState *WorldState) Slice(body *box2d.B2Body, impulse box2d.B2Vec2)
- func (worldState *WorldState) TriggerResetTimer()
- func (worldState *WorldState) TriggerUpdateLaunches()
- func (worldState *WorldState) WeldContact(contact box2d.B2ContactInterface)
- func (worldState *WorldState) WeldJoint()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type JSDrawable ¶
type StickyInfo ¶
type StickyInfo struct {
// contains filtered or unexported fields
}
StickyInfo stores the two objects to be welded together after worldState.World.Step()
type WorldSettings ¶
type WorldState ¶
type WorldState struct { *WorldSettings *JSObjects Launches int Player *box2d.B2Body WeldedDebris *box2d.B2Body GoalBlock *box2d.B2Body PlayerJoint box2d.B2JointInterface PlayerCollisionDetected bool PlayerWelded bool StickyArray []StickyInfo AbsorbCount int BreaksInfo World *box2d.B2World ResetWorld bool TMark float64 Paused bool }
func Initialize ¶
func Initialize() *WorldState
func (*WorldState) Clear ¶
func (worldState *WorldState) Clear()
func (*WorldState) ClearAllJoints ¶
func (worldState *WorldState) ClearAllJoints()
func (*WorldState) ClearJoints ¶
func (worldState *WorldState) ClearJoints(body *box2d.B2Body)
func (*WorldState) CreateBouncyDebris ¶
func (worldState *WorldState) CreateBouncyDebris()
func (*WorldState) CreateBreakableDebris ¶
func (worldState *WorldState) CreateBreakableDebris()
func (*WorldState) CreateDebris ¶
func (worldState *WorldState) CreateDebris()
func (*WorldState) CreateGoalBlock ¶
func (worldState *WorldState) CreateGoalBlock()
func (*WorldState) CreateLaunchBlock ¶
func (worldState *WorldState) CreateLaunchBlock()
func (*WorldState) CreatePlayer ¶
func (worldState *WorldState) CreatePlayer()
func (*WorldState) CreateStaticBouncyDebris ¶
func (worldState *WorldState) CreateStaticBouncyDebris()
func (*WorldState) CreateStaticDebris ¶
func (worldState *WorldState) CreateStaticDebris()
func (*WorldState) CreateStickyDebris ¶
func (worldState *WorldState) CreateStickyDebris()
func (*WorldState) CreateWater ¶
func (worldState *WorldState) CreateWater()
func (WorldState) GetSmallestDimension ¶
func (worldState WorldState) GetSmallestDimension() float64
func (*WorldState) HandleClick ¶
func (worldState *WorldState) HandleClick(this js.Value, args []js.Value) interface{}
func (*WorldState) HandleKeys ¶
func (worldState *WorldState) HandleKeys(this js.Value, args []js.Value) interface{}
func (*WorldState) HandlePause ¶
func (worldState *WorldState) HandlePause(this js.Value, args []js.Value) interface{}
func (*WorldState) HandleUnpause ¶
func (worldState *WorldState) HandleUnpause(this js.Value, args []js.Value) interface{}
func (WorldState) IsPlayerOutOfBounds ¶
func (worldState WorldState) IsPlayerOutOfBounds() bool
func (*WorldState) LaunchPlayer ¶
func (worldState *WorldState) LaunchPlayer(mx float64, my float64)
func (*WorldState) Populate ¶
func (worldState *WorldState) Populate()
func (*WorldState) PushDebris ¶
func (worldState *WorldState) PushDebris(impulseVelocity box2d.B2Vec2)
func (*WorldState) RenderFrame ¶
func (worldState *WorldState) RenderFrame(this js.Value, args []js.Value) interface{}
func (*WorldState) Reset ¶
func (worldState *WorldState) Reset()
func (*WorldState) Resize ¶
func (worldState *WorldState) Resize() bool
func (*WorldState) SetLaunches ¶
func (worldState *WorldState) SetLaunches(launches int)
func (*WorldState) Size ¶
func (worldState *WorldState) Size()
func (*WorldState) Slice ¶
func (worldState *WorldState) Slice(body *box2d.B2Body, impulse box2d.B2Vec2)
func (*WorldState) TriggerResetTimer ¶
func (worldState *WorldState) TriggerResetTimer()
func (*WorldState) TriggerUpdateLaunches ¶
func (worldState *WorldState) TriggerUpdateLaunches()
func (*WorldState) WeldContact ¶
func (worldState *WorldState) WeldContact(contact box2d.B2ContactInterface)
func (*WorldState) WeldJoint ¶
func (worldState *WorldState) WeldJoint()
Click to show internal directories.
Click to hide internal directories.