player

package
v0.0.0-...-8333e70 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2018 License: Apache-2.0 Imports: 11 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 {
	// constant.Basic contains the essential
	// parts of a Xaro game object such as
	// the scale, spritesheet, and aseprite.
	constant.Basic
	// constant.Playable contains the variables
	// needed to have a gameobject that contains
	// user control such as velocity and movespeed.
	constant.Playable

	// ecs.BasicEntity is used for indentifying
	// this specific entity in the game. This
	// is used for deletion as well.
	ecs.BasicEntity

	// common.RenderComponent is the component
	// that allows this struct to render into the game.
	common.RenderComponent
	// common.SpaceComponent contains essential spacial
	// variables such as position, size, and rotation.
	common.SpaceComponent
	// common.MouseComponent allows this game object
	// to read from the mouse input using engo's systems.
	common.MouseComponent
}

Player is the main game object that represents a Xaro client. This is a playable struct...

func New

func New(w *ecs.World) *Player

New is used to create a new player

func (*Player) Remove

func (p *Player) Remove(ecs.BasicEntity)

Remove deletes the player and player systems

func (*Player) Update

func (p *Player) Update(dt float32)

Update gets called every frame

Jump to

Keyboard shortcuts

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