sg

package module
v0.0.0-...-96e81b2 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2019 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	//ScreenWidth of the game
	ScreenWidth float64
	//ScreenHeight of the game
	ScreenHeight float64
)
View Source
var (
	GameStateMsgMain tentsuyu.GameStateMsg = "MainGame"
)

GameState Messages used for this game

Functions

func NewGame

func NewGame(w, h float64) (game *tentsuyu.Game, err error)

NewGame returns a new Game while setting the width and height of the screen

Types

type GameMain

type GameMain struct {
	// contains filtered or unexported fields
}

GameMain represents the main GameState of our game

func NewGameMain

func NewGameMain(game *tentsuyu.Game) *GameMain

NewGameMain returns our main gamestate

func (*GameMain) Draw

func (g *GameMain) Draw(game *tentsuyu.Game) error

Draw the gamestate scene

func (GameMain) Msg

func (g GameMain) Msg() tentsuyu.GameStateMsg

Msg returns the gamestatemsg and achieves the GameState interface

func (*GameMain) SetMsg

func (g *GameMain) SetMsg(gs tentsuyu.GameStateMsg)

SetMsg sets the gamestatemsg value

func (*GameMain) Update

func (g *GameMain) Update(game *tentsuyu.Game) error

Update the gamestate

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL