Tests examples for the miniworldmaker engine https://www.miniworldmaker.de
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
miniworldmaker_cookbook/snippets/2 Movement/205_follow_the_mouse_with_c...

25 lines
530 B

from miniworldmaker import *
class MyBoard(PixelBoard):
def on_setup(self):
self.add_background("images/stone.jpg")
Robot(position=(150, 150))
class Robot(Token):
def on_setup(self):
self.size = (60, 60)
# self.add_costume("images/robo_green.png")
self.costume.orientation = - 90
def act(self):
mouse = self.board.get_mouse_position()
if mouse:
self.point_towards_position(mouse)
self.move()
board = MyBoard(800, 600)
board.run()