world

package
v0.0.0-...-aac1211 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2022 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 World

type World struct {
	ID uuid.UUID
	// contains filtered or unexported fields
}

func UseWorld

func UseWorld() *World

func (*World) AddAmmos

func (w *World) AddAmmos(am *objects.Ammo)

func (*World) AddElements

func (w *World) AddElements(el *objects.Element)

func (*World) AddPCs

func (w *World) AddPCs(pc *objects.PC)

func (*World) AddWeapons

func (w *World) AddWeapons(we *objects.Weapon)

func (*World) DebugInit

func (w *World) DebugInit()

Inits basic world for debug purpose

func (*World) DeleteAmmos

func (w *World) DeleteAmmos()

func (*World) DeleteElements

func (w *World) DeleteElements()

func (*World) DeletePCs

func (w *World) DeletePCs()

func (*World) DeleteWeapons

func (w *World) DeleteWeapons()

func (*World) FromAPIMessage

func (w *World) FromAPIMessage(m *server_external.World)

func (*World) GetAmmos

func (w *World) GetAmmos() []*objects.Ammo

func (*World) GetCamera

func (w *World) GetCamera() *objects.Camera

func (*World) GetGameSettings

func (w *World) GetGameSettings() *gamesettings.GameSettings

func (*World) GetPC

func (w *World) GetPC() *objects.PC

func (*World) GetPCs

func (w *World) GetPCs() []*objects.PC

func (*World) GetStatistics

func (w *World) GetStatistics() *statistics.Statistics

func (*World) GetWeapons

func (w *World) GetWeapons() []*objects.Weapon

func (*World) GetWorldMap

func (w *World) GetWorldMap() *objects.Map

func (*World) IsCollision

func (w *World) IsCollision(x, y float64) (bool, int)

Checks if x and y pos collide with objects in the world

func (*World) SetID

func (w *World) SetID(id uuid.UUID)

func (*World) String

func (w *World) String() string

//Formats users' username

func (*World) SwapPCsSpawns

func (w *World) SwapPCsSpawns()

func (*World) ToAPIMessage

func (w *World) ToAPIMessage() *server_external.World

func (*World) Update

func (*World) UpdateAmmos

func (w *World) UpdateAmmos(m []*server_external.Ammo)

func (*World) UpdateElements

func (w *World) UpdateElements(m []*server_external.Element)

func (*World) UpdatePCs

func (w *World) UpdatePCs(m []*server_external.PC)

func (*World) UpdateWeapons

func (w *World) UpdateWeapons(m []*server_external.Weapon)

func (*World) UpdateWorld

func (w *World) UpdateWorld(m *server_external.World)

func (*World) UpdateWorldMap

func (w *World) UpdateWorldMap(m *server_external.Map)

Jump to

Keyboard shortcuts

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