game

package
v0.0.0-...-b8d9494 Latest Latest
Warning

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

Go to latest
Published: May 13, 2021 License: BSD-3-Clause Imports: 6 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type State

type State struct {
	// Config
	WaitBeforePickupable float32
	FallSpeedUp          float32

	Player   entity.IPlayer
	Enemies  []entity.IEnemy
	Items    []entity.IItem
	Attrezzo []entity.IEntity
	Attacks  []entity.IAttack
	World    *world.World
	// contains filtered or unexported fields
}

func NewState

func NewState(waitBeforePickupable float32, fallSpeedUp float32, player entity.IPlayer, world *world.World) *State

func (*State) Characters

func (s *State) Characters() []entity.ICharacter

func (*State) Entities

func (s *State) Entities() []entity.IEntity

func (*State) Node

func (s *State) Node() model.INode

func (*State) Over

func (s *State) Over() bool

func (*State) PhysicsEntities

func (s *State) PhysicsEntities() []entity.IEntity

func (*State) Update

func (s *State) Update(delta float32, inputCallback func(float32)) (pickedUp []entity.IItem, enemiesKilled []entity.IEnemy)

Jump to

Keyboard shortcuts

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