Skip to content

Update minecraft.py#2

Open
sparklehead015-a11y wants to merge 1 commit intobeaucarnes:masterfrom
sparklehead015-a11y:patch-1
Open

Update minecraft.py#2
sparklehead015-a11y wants to merge 1 commit intobeaucarnes:masterfrom
sparklehead015-a11y:patch-1

Conversation

@sparklehead015-a11y
Copy link
Copy Markdown

from ursina import *
from ursina.prefabs.first_person_controller import FirstPersonController
app = Ursina()
player = FirstPersonController()
Sky()

boxes = []
for i in range(20):
for j in range(20):
box = Button(color=color.white, model='cube', position=(j,0,i),
texture='grass.png', parent=scene, origin_y=0.5)
boxes.append(box)

def input(key):
for box in boxes:
if box.hovered:
if key == 'left mouse down':
new = Button(color=color.white, model='cube', position=box.position + mouse.normal,
texture='grass.png', parent=scene, origin_y=0.5)
boxes.append(new)
if key == 'right mouse down':
boxes.remove(box)
destroy(box)

app.run()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant