Files
dusk/tools/editortool/map/map.py
Dominic Masters 750e8840f0
All checks were successful
Build Dusk / build-linux (push) Successful in 39s
Build Dusk / build-psp (push) Successful in 1m6s
Prepping editor more...
2025-11-16 14:43:29 -06:00

25 lines
482 B
Python

from dusk.event import Event
MAP_WIDTH = 5
MAP_HEIGHT = 5
MAP_DEPTH = 3
class Map:
def __init__(self):
self.position = [0, 0, 0] # x, y, z
self.positionEvent = Event()
self.chunks = []
def moveTo(self, x, y, z):
self.position = [x, y, z]
self.positionEvent.invoke(self.position)
def moveRelative(self, x, y, z):
self.moveTo(
self.position[0] + x,
self.position[1] + y,
self.position[2] + z
)
# Singleton instance
map = Map()