Documentation ¶
Index ¶
Constants ¶
View Source
const ( ScreenWidth = 960 ScreenHeight = 540 )
View Source
const ( PlayerWidth = 15.0 PlayerHeight = 23.0 )
View Source
const ( MagnetizeDown = iota MagnetizeDownLeft MagnetizeLeft MagnetizeUpLeft MagnetizeUp MagnetizeUpRight MagnetizeRight MagnetizeDownRight )
View Source
const ( LayerDefault = 0 - iota LayerDecorationAbove LayerPlayer LayerDecorationBelow LayerPlatform )
View Source
const ( TriggerJump = iota + 1 TriggerMagnetize TriggerFire TriggerSwitch TriggerData )
View Source
const Gravity = 500.0
View Source
const TPS = 144
View Source
const (
TileScreenOff = 395
)
View Source
const TileSize = 16
Variables ¶
View Source
var ( Debug int // Give is a list of abilities the player is given at the start of the game. // This is only available to users as a commandline flag. Give string // DisableEsc is set to true when the escape key should not exit the game. // This is used on WASM builds, where users exit the game by closing the tab. DisableEsc bool Map *tiled.Map TileImages = make(map[uint32]*ebiten.Image) ObjectGroups []*tiled.ObjectGroup GameOver bool ResetGame bool ShownIntro bool Player gohan.Entity CamX, CamY float64 CamTargetX, CamTargetY float64 SpawnX, SpawnY float64 MetalRects []image.Rectangle PlayerGrounded bool MagnetActive bool MagnetDirection int // 0 down, 1 left, 2 up, 3 right PlayerDirection int Clinging bool LastWalkDirL, LastWalkDirU bool HazardRects []image.Rectangle Space *cp.Space PlayerShape *cp.Shape PlayerBody *cp.Body PlayerNormal cp.Vector PlayerIdleFrames []*ebiten.Image PlayerWalkFrames []*ebiten.Image CollisionShapes []*cp.Shape TriggerRects []image.Rectangle TriggerActions []TriggerAction TriggerEntities []gohan.Entity DataRect image.Rectangle CanJump bool CanMagnetize bool CanFire bool CanDoubleJump bool LastFire int MessageText string MessageUpdated bool RemoveTrigger = -1 Tick int StartMuted bool DestructibleRects []image.Rectangle DestructibleEntities []gohan.Entity DestructibleShapes [][]*cp.Shape BeamRects []image.Rectangle BeamShapes [][]*cp.Shape BeamEntities []gohan.Entity GameOverTicks int )
Functions ¶
func OpenSwitch ¶
func OpenSwitch()
func SetMessage ¶
func SetMessage(message string)
Types ¶
type TriggerAction ¶
type TriggerAction int
Click to show internal directories.
Click to hide internal directories.