Mam tutaj dwie postacie i tło wszystko działa, tylko jak zrobić żeby obrazki zasłaniały tło, a nie żeby tło zasłaniało postacie kod to:
from ursina import*
def update():
if held_keys['left arrow']:
gladiator.x -= 1 * 0.1
if held_keys['right arrow']:
gladiator.x += 1 * 0.1
if held_keys['down arrow']:
gladiator.y -= 1 * 0.1
if held_keys['up arrow']:
gladiator.y += 1 * 0.1
if held_keys['a']:
sans.x -= 1 * 0.1
if held_keys['d']:
sans.x += 1 * 0.1
if held_keys['s']:
sans.y -= 1 * 0.1
if held_keys['w']:
sans.y += 1 * 0.1
app = Ursina()
window.borderless = False
window.title = 'Sans'
window.fullscreen = True
gladiator_texture = load_texture(r'assets\gladiator-left.gif')
sans_texture = load_texture(r'assets\gladiator - right.gif')
arena_texture = load_texture(r'assets\Download.jpg')
sans = Entity(model='quad', texture=sans_texture, scale=(4, 4), position=(-3, 0))
gladiator = Entity(model='quad', texture=gladiator_texture, scale=(4, 4), position=(3, 0))
arena = Entity(model='quad', texture=arena_texture, scale=(15, 10))
app.run()