Game Erstellen In UPBGE #01 Startknopf Programmieren




Startscreen Script:

import bge
from bge import render

render.showMouse(1)

scene = bge.logic.getCurrentScene()
cont = bge.logic.getCurrentController()
own = cont.owner

mouse_over = own.sensors[‘MouseOver’]
mouse_click = own.sensors[‘MouseClick’]
start_button = scene.objects[‘StartButton’]

if mouse_over.hitObject == start_button and mouse_click.positive:
scene.replace(‘Level’)

Voir sur youtube

KA2Studio
Logo
Compare items
  • Total (0)
Compare
0