game

package
v0.0.0-...-6dfeff5 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2024 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DrawFSR

func DrawFSR(sourceImg *ebiten.Image, scale float64) *ebiten.Image

Courtesy of Zyko! - https://gist.github.com/Zyko0/0b9244d6780eeb2337162c6dbdf9b787

func NewUIResources

func NewUIResources(m *DemoMenu) (*uiResources, error)

Types

type DemoMenu

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

type EntityCollision

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

type Game

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

Game - This is the main type for your game.

func NewGame

func NewGame() *Game

NewGame - Allows the game to perform any initialization it needs to before starting to run. This is where it can query for any required services and load any non-graphic related content. Calling base.Initialize will enumerate through any components and initialize them as well.

func (*Game) Crouch

func (g *Game) Crouch()

func (*Game) Draw

func (g *Game) Draw(screen *ebiten.Image)

Draw draws the game screen. Draw is called every frame (typically 1/60[s] for 60Hz display).

func (*Game) IsStanding

func (g *Game) IsStanding() bool

func (*Game) Jump

func (g *Game) Jump()

func (*Game) Layout

func (g *Game) Layout(outsideWidth, outsideHeight int) (int, int)

Layout takes the outside size (e.g., the window size) and returns the (logical) screen size. If you don't have to adjust the screen size with the outside size, just return a fixed size.

func (*Game) Move

func (g *Game) Move(mSpeed float64)

Move player by move speed in the forward/backward direction

func (*Game) Pitch

func (g *Game) Pitch(pSpeed float64)

Update player pitch angle by pitch speed

func (*Game) Prone

func (g *Game) Prone()

func (*Game) Rotate

func (g *Game) Rotate(rSpeed float64)

Rotate player heading angle by rotation speed

func (*Game) Run

func (g *Game) Run()

Run is the Ebiten Run loop caller

func (*Game) SaveConfig

func (g *Game) SaveConfig() error

func (*Game) Stand

func (g *Game) Stand()

func (*Game) Strafe

func (g *Game) Strafe(sSpeed float64)

Move player by strafe speed in the left/right direction

func (*Game) Update

func (g *Game) Update() error

Update - Allows the game to run logic such as updating the world, gathering input, and playing audio. Update is called every tick (1/60 [s] by default).

type MenuAspectRatio struct {
	// contains filtered or unexported fields
}
type MenuResolution struct {
	// contains filtered or unexported fields
}
func (r MenuResolution) String() string

type MouseMode

type MouseMode int
const (
	MouseModeLook MouseMode = iota
	MouseModeMove
	MouseModeCursor
)

type TextureHandler

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

func NewTextureHandler

func NewTextureHandler(mapObj *model.Map, textureCapacity int) *TextureHandler

func (*TextureHandler) FloorTextureAt

func (t *TextureHandler) FloorTextureAt(x, y int) *image.RGBA

func (*TextureHandler) TextureAt

func (t *TextureHandler) TextureAt(x, y, levelNum, side int) *ebiten.Image

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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