Functional 3D User Interface

This commit is contained in:
Arthur
2022-12-11 10:11:14 +01:00
parent dabe1db9d4
commit 27106eeab6
7 changed files with 45 additions and 23 deletions

View File

@@ -1,8 +1,13 @@
extends Node3D
func _on_area_3d_input_event(camera, event, position, normal, shape_idx):
self.scale = Vector3(1.5,1.5,1.5)
if event is InputEventMouseButton:
if event.button_index == MOUSE_BUTTON_LEFT and event.pressed == true:
print("Start Game")
get_tree().change_scene_to_file("res://Nodes/game.tscn")
func _on_area_3d_mouse_exited():
self.scale = Vector3(1,1,1)

View File

@@ -2,9 +2,14 @@ extends Node3D
func _on_area_3d_input_event(camera, event, position, normal, shape_idx):
self.scale = Vector3(1.5,1.5,1.5)
if event is InputEventMouseButton:
if event.button_index == MOUSE_BUTTON_LEFT and event.pressed == true:
print("Credits/Spielbeschreibung")
#TODO: Richtige Szene Einfügen
get_tree().change_scene_to_file("res://Nodes/game.tscn")
func _on_area_3d_mouse_exited():
self.scale = Vector3(1,1,1)

View File

@@ -2,9 +2,15 @@ extends Node3D
func _on_area_3d_input_event(camera, event, position, normal, shape_idx):
print("scale")
self.scale = Vector3(1.2,1.2,1.2)
if event is InputEventMouseButton:
if event.button_index == MOUSE_BUTTON_LEFT and event.pressed == true:
print("Settings")
#TODO: Settings:
get_tree().change_scene_to_file("res://Nodes/game.tscn")
func _on_area_3d_mouse_exited():
self.scale = Vector3(1,1,1)