Files
dusk/tools/editortool/map/map.py
Dominic Masters c874e6c197
All checks were successful
Build Dusk / build-linux (push) Successful in 47s
Build Dusk / build-psp (push) Successful in 1m6s
Fixed some stuff, procrastinating the real problem
2025-11-16 16:18:01 -06:00

19 lines
484 B
Python

from dusk.event import Event
from editortool.map.mapdata import MAP_WIDTH, MAP_HEIGHT, MAP_DEPTH
class Map:
def __init__(self, parent):
self.parent = parent
self.position = [0, 0, 0] # x, y, z
self.positionEvent = Event()
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
)