Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/JoelOtter/termloop
/ functions
Functions
152 in github.com/JoelOtter/termloop
⨍
Functions
152
◇
Types & classes
33
Function
NewGame
NewGame creates a new Game, along with a Screen and input handler. Returns a pointer to the new Game.
game.go:19
Method
Offset
Offset returns the level's drawing offset.
level.go:98
Method
Position
Position returns the (x, y) coordinates of the Text.
text.go:44
Method
Position
Position returns the x and y coordinates of the Rectangle.
rectangle.go:37
Method
Position
()
termloop.go:87
Method
Position
Position returns the (x, y) coordinates of the Entity.
entity.go:51
Method
RemoveEntity
RemoveEntity removes Drawable d from the screen's entities.
screen.go:107
Method
RemoveEntity
(Drawable)
level.go:8
Method
RemoveEntity
RemoveEntity removes Drawable d from the level's entities.
level.go:88
Method
SetCanvas
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
Method
SetColor
SetColor sets the color of the Rectangle.
rectangle.go:59
Method
SetEndKey
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
Method
SetLooping
SetLooping sets whether or not a Track should loop.
extra/audio.go:150
Method
SetPosition
SetPosition sets the coordinates of the Rectangle to be x and y.
rectangle.go:42
Method
SetPosition
SetPosition sets the x and y coordinates of the Entity.
entity.go:61
Method
SetScreen
SetScreen sets the current Screen of a Game.
game.go:34
Method
SetSize
SetSize sets the width and height of the Rectangle to be w and h.
rectangle.go:48
Method
SetVolume
SetVolume sets the Track's volume to v.
extra/audio.go:140
Method
Size
Size returns the width and height of the Screen in characters.
screen.go:87
Method
Size
Size returns the width and height in characters of the Rectangle.
rectangle.go:32
Method
Size
Return position, x and y
termloop.go:88
Method
Size
Size returns the width and height of the entity, in characters.
entity.go:56
Method
Stop
Stop stops a Track playing, and resets it to the beginning.
extra/audio.go:118
Method
Text
Text returns the text of the Text.
text.go:60
Method
Tick
Tick is used to process events such as input. It is called on every frame by the Game.
screen.go:32
Method
Tick
(ev Event)
text.go:33
Method
Tick
(ev Event)
rectangle.go:29
Method
Tick
Tick handles any collisions between Physicals in the level's entities, and processes any input.
level.go:31
Method
Tick
(Event)
termloop.go:72
Method
Tick
Tick needs to be implemented to satisfy the Drawable interface. It updates the Entity based on the Screen's FPS
entity.go:48
Method
Tick
(ev tl.Event)
_examples/collision.go:19
Method
Tick
(ev tl.Event)
_examples/pyramid.go:139
Method
Tick
(ev tl.Event)
_examples/image.go:23
Method
Tick
(ev tl.Event)
_examples/click.go:16
Method
Tick
(ev tl.Event)
_examples/click.go:48
Method
Tick
(ev tl.Event)
_examples/movingtext.go:13
Method
Tick
(ev tl.Event)
_examples/audio.go:46
Method
Tick
(event tl.Event)
_examples/tutorial.go:19
Method
Tick
(ev tl.Event)
_examples/levelmap.go:12
Method
Volume
Volume returns the current volume of the Track. Default is 1.0.
extra/audio.go:135
Method
equals
(oldCanvas *Canvas)
termloop.go:23
Function
main
()
_examples/collision.go:44
Function
main
()
_examples/pyramid.go:194
Function
main
()
_examples/image.go:41
Function
main
()
_examples/click.go:59
Function
main
()
_examples/movingtext.go:31
Function
main
()
_examples/audio.go:61
Function
main
()
_examples/tutorial.go:42
Function
main
()
_examples/levelmap.go:50
Function
main
()
_examples/entityfromfile.go:14
Function
parsePlayer
Here we define a parse function for reading a Player out of JSON.
_examples/levelmap.go:31
Method
playCallback
(out []float32)
extra/audio.go:58
← previous
101–152 of 152, ranked by callers