gomap

package
v0.0.0-...-e7326f8 Latest Latest
Warning

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

Go to latest
Published: May 18, 2024 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GOMap

type GOMap struct {
	// contains filtered or unexported fields
}

GOMap stands for GameObject Map. GameObject map defines map with the game objects. Also, defines all the GameObjectBase functional, functions like Start(), Update(), Draw(), etc.

func New

func New() *GOMap

Creates new empty GOMap.

func (*GOMap) Draw

func (m *GOMap) Draw(screen *ebiten.Image) error

Calls Draw(), DrawUI() functions, previously sorts it by priority.

func (*GOMap) Get

func (m *GOMap) Get(name string) (i any, ok bool)

Tries to get the game object by given name.

func (*GOMap) Register

func (m *GOMap) Register(name string, gameObject any) error

Registers a new game object. If Awake() function implemented, it will be called. This will be applied to all the components of the game object.

func (*GOMap) SetupGame

func (m *GOMap) SetupGame(gameBase interfaces.IGameBase)

Must be called before all the operations.

func (*GOMap) StartQueuedStartables

func (m *GOMap) StartQueuedStartables() error

One-time function, that must be called from Scene.Enter() only once. Starts all the queued startables, that implements StartableQueued interface.

func (*GOMap) Unregister

func (m *GOMap) Unregister(name string) error

Unregisters the game object. If Destroy() function implemented, it will be called. This will be applied to all the components of the game object.

func (*GOMap) UnregisterAll

func (m *GOMap) UnregisterAll() error

Unregisters all the game objects.

func (*GOMap) Update

func (m *GOMap) Update() error

Calls Update(), PhysUpdate() functions.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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