objmanager

package
Version: v0.0.0-...-f1dee3b Latest Latest
Warning

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

Go to latest
Published: May 9, 2019 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IGame

type IGame interface {
	RemovePlayer(playerID int32, clientID int32)
}

type ObjectManager

type ObjectManager interface {
	RegisterPlayer(clientID int32, name string) playerpkg.Player
	RegisterShoot(player playerpkg.Player, x float32, y float32, dx float32, dy float32, startTime time.Time) shootpkg.Shoot
	RemovePlayer(id int32, clientID int32) int32

	GetPlayers() []playerpkg.Player
	GetMap() mappkg.Map
	GetPlayerByID(id int32) (playerpkg.Player, bool)
	MovePlayer(player playerpkg.Player, dx float32, dy float32, speed float32, timeElapsed float32)
	SetPlayerPosition(player playerpkg.Player, x float32, y float32)

	Update()
}

func NewObjectManager

func NewObjectManager(game IGame, eventStream chan common.DestroyPlayerEvent, gameMap mappkg.Map) ObjectManager

Jump to

Keyboard shortcuts

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