psystem

package
Version: v0.4.3 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2018 License: Zlib Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AiSystem

type AiSystem struct {
	EntityManager *entity.Manager
	Name          string
}

AiSystem is the struct responsible to add the observer and handler to the collision event

func (*AiSystem) Init

func (a *AiSystem) Init()

Init initialize this system

func (*AiSystem) Update

func (a *AiSystem) Update()

Update will make the computer Y vel follow the same Y vel of the ball

type ChangeSystem

type ChangeSystem struct {
	EntityManager   *entity.Manager
	Name            string
	CollisionSystem *system.CollisionSystem
}

ChangeSystem is the struct responsible to add the observer and handler to the collision event

func (*ChangeSystem) Init

func (c *ChangeSystem) Init()

Init adds the collision handler

func (*ChangeSystem) Update

func (c *ChangeSystem) Update()

Update is here just to comply with the system interface

type PlayerSystem

type PlayerSystem struct {
	EntityManager *entity.Manager
	Name          string
	InputManager  *input.Manager
}

PlayerSystem is the struct that contains the controllable stick

func (*PlayerSystem) Init

func (p *PlayerSystem) Init()

Init initialize this system

func (*PlayerSystem) Update

func (p *PlayerSystem) Update()

Update handle the input event

type ScoreSystem

type ScoreSystem struct {
	Entities        []entity.Entitier
	EntityManager   *entity.Manager
	Name            string
	CollisionSystem *system.CollisionSystem
}

ScoreSystem is the struct responsible to keep the score of the game

func (*ScoreSystem) Init

func (s *ScoreSystem) Init()

Init adds the collision handler

func (*ScoreSystem) Update

func (s *ScoreSystem) Update()

Update is here just to comply with the system interface

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto