player

package
v0.0.0-...-11e9a73 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Player

type Player struct {
	*spectator.Spectator
	*entity.Entity
	PlayerId           int
	AvailableActions   []interfaces.Action
	PlayerLastTick     int
	PlayerLastTickTime time.Time
}

func New

func New(g interfaces.Game) *Player

func (*Player) AddAvailableAction

func (p *Player) AddAvailableAction(action interfaces.Action)

func (*Player) GetAvailableActions

func (p *Player) GetAvailableActions() []interfaces.Action

func (*Player) GetLastTick

func (p *Player) GetLastTick() int

func (*Player) GetLastTickTime

func (p *Player) GetLastTickTime() time.Time

func (*Player) GetPlayerId

func (p *Player) GetPlayerId() int

func (*Player) SetLastTick

func (p *Player) SetLastTick(tickNum int)

func (*Player) SetLastTickTime

func (p *Player) SetLastTickTime(t time.Time)

func (*Player) SetPlayerId

func (p *Player) SetPlayerId(id int)

Jump to

Keyboard shortcuts

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