Documentation ¶
Index ¶
- Constants
- Variables
- func DebugPrintStar(star Star)
- func DrawDebugGridOverlay(screen *ebiten.Image)
- type GimlarGame
- func (g *GimlarGame) Draw(screen *ebiten.Image)
- func (g *GimlarGame) DrawDebugGrid(screen *ebiten.Image)
- func (g *GimlarGame) DrawDebugInfo(screen *ebiten.Image)
- func (g *GimlarGame) GetRadius() float64
- func (g *GimlarGame) Layout(outsideWidth, outsideHeight int) (int, int)
- func (g *GimlarGame) Run() error
- func (g *GimlarGame) Update() error
- type InputHandler
- type InputHandlerInterface
- type MockHandler
- type MockImage
- type Player
- type PlayerInput
- type PlayerPath
- type PlayerPosition
- type PlayerSprite
- type Star
Constants ¶
Variables ¶
View Source
var (
Debug bool
)
Functions ¶
func DebugPrintStar ¶
func DebugPrintStar(star Star)
DebugPrintStar prints the debug information for a star.
func DrawDebugGridOverlay ¶
func DrawDebugGridOverlay(screen *ebiten.Image)
DrawDebugGridOverlay draws a grid overlay for debugging purposes.
Types ¶
type GimlarGame ¶
type GimlarGame struct {
// contains filtered or unexported fields
}
func NewGimlarGame ¶
func NewGimlarGame(speed float64) (*GimlarGame, error)
func (*GimlarGame) Draw ¶
func (g *GimlarGame) Draw(screen *ebiten.Image)
func (*GimlarGame) DrawDebugGrid ¶
func (g *GimlarGame) DrawDebugGrid(screen *ebiten.Image)
func (*GimlarGame) DrawDebugInfo ¶
func (g *GimlarGame) DrawDebugInfo(screen *ebiten.Image)
func (*GimlarGame) GetRadius ¶
func (g *GimlarGame) GetRadius() float64
func (*GimlarGame) Run ¶
func (g *GimlarGame) Run() error
func (*GimlarGame) Update ¶
func (g *GimlarGame) Update() error
type InputHandler ¶
type InputHandler struct{}
InputHandler implements HandlerInterface for the real game.
func (*InputHandler) IsKeyPressed ¶
func (rh *InputHandler) IsKeyPressed(key ebiten.Key) bool
type InputHandlerInterface ¶
type InputHandlerInterface interface {
IsKeyPressed(key ebiten.Key) bool
}
InputHandlerInterface defines the methods for handling input.
type MockHandler ¶
type MockHandler struct {
// contains filtered or unexported fields
}
MockHandler is a mock implementation of the input.Handler interface for use in unit tests.
func NewMockHandler ¶
func NewMockHandler() *MockHandler
func (*MockHandler) IsKeyPressed ¶
func (mh *MockHandler) IsKeyPressed(key ebiten.Key) bool
func (*MockHandler) PressKey ¶
func (mh *MockHandler) PressKey(key ebiten.Key)
func (*MockHandler) ReleaseKey ¶
func (mh *MockHandler) ReleaseKey(key ebiten.Key)
type Player ¶
type Player struct { PlayerInput PlayerPosition PlayerSprite PlayerPath // contains filtered or unexported fields }
type PlayerInput ¶
type PlayerInput struct {
// contains filtered or unexported fields
}
type PlayerPath ¶
type PlayerPath struct {
// contains filtered or unexported fields
}
type PlayerPosition ¶
type PlayerSprite ¶
type PlayerSprite struct {
Sprite *ebiten.Image
}
Click to show internal directories.
Click to hide internal directories.