operator

package
v0.0.0-...-5b766ea Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ServiceSetForOperator = wire.NewSet(NewWorldOperator)

ServiceSetForOperator providers

Functions

This section is empty.

Types

type WorldOperator

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

WorldOperator that handles world and units movements

func NewWorldOperator

func NewWorldOperator() *WorldOperator

NewWorldOperator instance

func (*WorldOperator) FindEntityByCoordinate

func (wo *WorldOperator) FindEntityByCoordinate(coordinate model.Coordinate, entityType model.ActorType) *model.GraphNode

FindEntityByCoordinate in the world

func (*WorldOperator) GetDeliveryUnit

func (wo *WorldOperator) GetDeliveryUnit() []*model.GraphNode

GetDeliveryUnit from the world

func (*WorldOperator) MoveDeliveryUnitToNearestWarehouse

func (wo *WorldOperator) MoveDeliveryUnitToNearestWarehouse(unitID uint) model.Coordinate

MoveDeliveryUnitToNearestWarehouse moves the given unit to the nearest connected warehouse based on their X and Y locations

func (*WorldOperator) Populate

func (wo *WorldOperator) Populate(maxWarehouses, maxCargoUnits uint32) error

Jump to

Keyboard shortcuts

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