-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathroot.gd
More file actions
36 lines (28 loc) · 1.07 KB
/
Copy pathroot.gd
File metadata and controls
36 lines (28 loc) · 1.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
extends Node3D
var camera_mode = 0
func _init():
pass
func _ready():
Input.mouse_mode = Input.MOUSE_MODE_VISIBLE
func _process(_delta):
# Manage creative mode state
if Input.is_action_just_pressed("ui_text_clear_carets_and_selection"):
get_tree().quit()
if Input.is_action_just_pressed("change_cam"):
print("camera change")
camera_mode = (camera_mode + 1) % 2
match camera_mode:
0:
Input.mouse_mode = Input.MOUSE_MODE_VISIBLE
find_child("FixedCamera").current = true
1:
Input.mouse_mode = Input.MOUSE_MODE_CAPTURED
find_child("CreativeMode").find_child("Camera3D").current = true
if $HUD/VBoxContainer/bee_count.value != $Hive.BEES_MAX:
print("RECONCILING bees:", $HUD/VBoxContainer/bee_count.value)
$Hive.BEES_MAX = $HUD/VBoxContainer/bee_count.value
if $HUD/VBoxContainer/flower_count.value != $Garden.patch_count:
print("RECONCILING flowers:", $HUD/VBoxContainer/flower_count.value)
$Garden.patch_count = $HUD/VBoxContainer/flower_count.value
if Input.is_action_just_pressed("music_enable"):
$BGM.stream_paused = !$BGM.stream_paused