Documentation ¶
Overview ¶
Package player stores the playable character that can be used in all game scenes.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Player ¶
type Player struct { // general.Basic contains the essential // parts of a Xaro game object such as // the scale, spritesheet, and aseprite. *general.Basic // ShootSpeed controls the speed at which // the player can use their weapon. ShootSpeed float32 // MoveSpeed is the variable that affects // the movement speed the player can move at. MoveSpeed float32 // IsShooting is a current state booleon // to check if the player is actioning. IsShooting bool // Velocity stores the X, and Y variables // At which the player is moving towards. Velocity engo.Point // 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 // common.CollisionComponent is the collision box for the player. common.CollisionComponent }
Player is the main game object that represents a Xaro client. This is a playable struct...
func (*Player) Remove ¶
func (p *Player) Remove(ecs.BasicEntity)
Remove deletes the player and player systems
func (*Player) SetPosition ¶
SetPosition takes a reference to a point and sets the position to it.
Click to show internal directories.
Click to hide internal directories.