MCPcopy Create free account

hub / github.com/JoelOtter/termloop / functions

Functions152 in github.com/JoelOtter/termloop

FunctionNewGame
NewGame creates a new Game, along with a Screen and input handler. Returns a pointer to the new Game.
game.go:19
MethodOffset
Offset returns the level's drawing offset.
level.go:98
MethodPosition
Position returns the (x, y) coordinates of the Text.
text.go:44
MethodPosition
Position returns the x and y coordinates of the Rectangle.
rectangle.go:37
MethodPosition
()
termloop.go:87
MethodPosition
Position returns the (x, y) coordinates of the Entity.
entity.go:51
MethodRemoveEntity
RemoveEntity removes Drawable d from the screen's entities.
screen.go:107
MethodRemoveEntity
(Drawable)
level.go:8
MethodRemoveEntity
RemoveEntity removes Drawable d from the level's entities.
level.go:88
MethodSetCanvas
SetCanvas takes a pointer to a Canvas and replaces the Entity's canvas with the pointer's. It also updates the Entity's dimensions.
entity.go:95
MethodSetColor
SetColor sets the color of the Rectangle.
rectangle.go:59
MethodSetEndKey
SetEndKey sets the Key used to end the game. Default is KeyCtrlC. If you don't want an end key, set it to KeyEsc, as this key isn't supported and will
game.go:73
MethodSetLooping
SetLooping sets whether or not a Track should loop.
extra/audio.go:150
MethodSetPosition
SetPosition sets the coordinates of the Rectangle to be x and y.
rectangle.go:42
MethodSetPosition
SetPosition sets the x and y coordinates of the Entity.
entity.go:61
MethodSetScreen
SetScreen sets the current Screen of a Game.
game.go:34
MethodSetSize
SetSize sets the width and height of the Rectangle to be w and h.
rectangle.go:48
MethodSetVolume
SetVolume sets the Track's volume to v.
extra/audio.go:140
MethodSize
Size returns the width and height of the Screen in characters.
screen.go:87
MethodSize
Size returns the width and height in characters of the Rectangle.
rectangle.go:32
MethodSize
Return position, x and y
termloop.go:88
MethodSize
Size returns the width and height of the entity, in characters.
entity.go:56
MethodStop
Stop stops a Track playing, and resets it to the beginning.
extra/audio.go:118
MethodText
Text returns the text of the Text.
text.go:60
MethodTick
Tick is used to process events such as input. It is called on every frame by the Game.
screen.go:32
MethodTick
(ev Event)
text.go:33
MethodTick
(ev Event)
rectangle.go:29
MethodTick
Tick handles any collisions between Physicals in the level's entities, and processes any input.
level.go:31
MethodTick
(Event)
termloop.go:72
MethodTick
Tick needs to be implemented to satisfy the Drawable interface. It updates the Entity based on the Screen's FPS
entity.go:48
MethodTick
(ev tl.Event)
_examples/collision.go:19
MethodTick
(ev tl.Event)
_examples/pyramid.go:139
MethodTick
(ev tl.Event)
_examples/image.go:23
MethodTick
(ev tl.Event)
_examples/click.go:16
MethodTick
(ev tl.Event)
_examples/click.go:48
MethodTick
(ev tl.Event)
_examples/movingtext.go:13
MethodTick
(ev tl.Event)
_examples/audio.go:46
MethodTick
(event tl.Event)
_examples/tutorial.go:19
MethodTick
(ev tl.Event)
_examples/levelmap.go:12
MethodVolume
Volume returns the current volume of the Track. Default is 1.0.
extra/audio.go:135
Methodequals
(oldCanvas *Canvas)
termloop.go:23
Functionmain
()
_examples/collision.go:44
Functionmain
()
_examples/pyramid.go:194
Functionmain
()
_examples/image.go:41
Functionmain
()
_examples/click.go:59
Functionmain
()
_examples/movingtext.go:31
Functionmain
()
_examples/audio.go:61
Functionmain
()
_examples/tutorial.go:42
Functionmain
()
_examples/levelmap.go:50
Functionmain
()
_examples/entityfromfile.go:14
FunctionparsePlayer
Here we define a parse function for reading a Player out of JSON.
_examples/levelmap.go:31
MethodplayCallback
(out []float32)
extra/audio.go:58
← previous101–152 of 152, ranked by callers