Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from ursina import *
- import random
- app = Ursina()
- shoot = False
- def update():
- global doctor, shoot
- if held_keys['right arrow']:
- doctor.x += 0.007
- if held_keys['left arrow']:
- doctor.x -= 0.007
- if shoot:
- vaccine.y += 0.015
- def input(key):
- global shoot
- if key == "space":
- shoot = True
- Entity(model="quad", scale=70, texture="back.jpg")
- back_size = 22
- back = Entity(model='quad', color=color.rgba(255,255,255,0), scale=(12,18),
- position=(back_size//2, back_size//2, -0.01))
- doctor = Entity(model="cube", parent=back, texture='doctor.png', scale=0.2,
- position=(0,-0.75,0))
- vaccine = Entity(model="quad", parent=back, texture='vaccine.png', scale=0.1,
- position=(0,-0.45))
- virus = Entity(model="quad", parent=back, texture='virus.png', scale=0.15,
- position=(0,0))
- camera.position = (back_size//2, -15, -11)
- camera.rotation_x = -60
- app.run()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement