Updated main menu
This commit is contained in:
parent
f25ff53327
commit
ebeb6d16e1
5 changed files with 71 additions and 2 deletions
|
@ -37,6 +37,12 @@ transform = Transform3D(-0.43792, 0, -0.0332195, 0, 0.439179, 0, 0.0332195, 0, -
|
||||||
[node name="teddy2" parent="." instance=ExtResource("2_mie3v")]
|
[node name="teddy2" parent="." instance=ExtResource("2_mie3v")]
|
||||||
transform = Transform3D(-0.43792, 0, -0.0332195, 0, 0.439179, 0, 0.0332195, 0, -0.43792, -14.1826, 1.52042, -40.4288)
|
transform = Transform3D(-0.43792, 0, -0.0332195, 0, 0.439179, 0, 0.0332195, 0, -0.43792, -14.1826, 1.52042, -40.4288)
|
||||||
|
|
||||||
|
[node name="teddy3" parent="." instance=ExtResource("2_mie3v")]
|
||||||
|
transform = Transform3D(-4.37114e-08, 0, -1, 0, 1, 0, 1, 0, -4.37114e-08, 1.82283, -0.389118, -40.7763)
|
||||||
|
|
||||||
|
[node name="teddy4" parent="." instance=ExtResource("2_mie3v")]
|
||||||
|
transform = Transform3D(-4.37114e-08, 0, 1, 0, 1, 0, -1, 0, -4.37114e-08, -25.8932, -0.389118, -40.7763)
|
||||||
|
|
||||||
[node name="mainmenu" parent="." instance=ExtResource("3_bj3gc")]
|
[node name="mainmenu" parent="." instance=ExtResource("3_bj3gc")]
|
||||||
|
|
||||||
[node name="Camera3D" type="Camera3D" parent="."]
|
[node name="Camera3D" type="Camera3D" parent="."]
|
||||||
|
|
|
@ -124,7 +124,7 @@ offset_left = 4.0
|
||||||
offset_top = 622.0
|
offset_top = 622.0
|
||||||
offset_right = 94.0
|
offset_right = 94.0
|
||||||
offset_bottom = 648.0
|
offset_bottom = 648.0
|
||||||
text = "Version: PLAYTEST 20230311"
|
text = "Version: ALPHA"
|
||||||
|
|
||||||
[node name="OurTimeIsNowSolo" type="Sprite2D" parent="."]
|
[node name="OurTimeIsNowSolo" type="Sprite2D" parent="."]
|
||||||
position = Vector2(123, 104)
|
position = Vector2(123, 104)
|
||||||
|
@ -134,6 +134,14 @@ texture = ExtResource("10_oafyi")
|
||||||
[node name="AudioStreamPlayer" type="AudioStreamPlayer" parent="."]
|
[node name="AudioStreamPlayer" type="AudioStreamPlayer" parent="."]
|
||||||
stream = ExtResource("11_6irkm")
|
stream = ExtResource("11_6irkm")
|
||||||
|
|
||||||
|
[node name="lightButton" type="Button" parent="."]
|
||||||
|
layout_mode = 0
|
||||||
|
offset_left = 438.0
|
||||||
|
offset_top = 165.0
|
||||||
|
offset_right = 450.0
|
||||||
|
offset_bottom = 186.0
|
||||||
|
flat = true
|
||||||
|
|
||||||
[node name="musicPanel" type="Panel" parent="."]
|
[node name="musicPanel" type="Panel" parent="."]
|
||||||
visible = false
|
visible = false
|
||||||
offset_left = 9.0
|
offset_left = 9.0
|
||||||
|
@ -169,3 +177,4 @@ horizontal_alignment = 1
|
||||||
[connection signal="mouse_entered" from="creditsButton" to="." method="_on_credits_button_mouse_entered"]
|
[connection signal="mouse_entered" from="creditsButton" to="." method="_on_credits_button_mouse_entered"]
|
||||||
[connection signal="mouse_exited" from="creditsButton" to="." method="_on_credits_button_mouse_exited"]
|
[connection signal="mouse_exited" from="creditsButton" to="." method="_on_credits_button_mouse_exited"]
|
||||||
[connection signal="pressed" from="creditsButton" to="." method="_on_button_5_pressed"]
|
[connection signal="pressed" from="creditsButton" to="." method="_on_button_5_pressed"]
|
||||||
|
[connection signal="pressed" from="lightButton" to="." method="_on_light_button_pressed"]
|
||||||
|
|
|
@ -28,6 +28,7 @@ var respawnTimeModifier = 1.0 # Affects how quickly the player respawns in death
|
||||||
var musicName = "" # Name of music for HUD.gd
|
var musicName = "" # Name of music for HUD.gd
|
||||||
var musicAuthor = "" # Name of music author for HUD.gd
|
var musicAuthor = "" # Name of music author for HUD.gd
|
||||||
var musicUpdated = false # Tells HUD.gd to update labels and change visibility
|
var musicUpdated = false # Tells HUD.gd to update labels and change visibility
|
||||||
|
var menuLightSwitch = false # No description provided
|
||||||
|
|
||||||
func _process(delta):
|
func _process(delta):
|
||||||
if godMode:
|
if godMode:
|
||||||
|
@ -37,7 +38,7 @@ func _process(delta):
|
||||||
fatigue = fatigue - 10 * delta
|
fatigue = fatigue - 10 * delta
|
||||||
elif not Input.is_action_pressed("sprint"):
|
elif not Input.is_action_pressed("sprint"):
|
||||||
if fatigue < 100:
|
if fatigue < 100:
|
||||||
fatigue = fatigue + 2 * delta
|
fatigue = fatigue + 5 * delta
|
||||||
if playerAlive:
|
if playerAlive:
|
||||||
deathShield = deathShield - 10 * delta # Make player not killable until the value falls below 0
|
deathShield = deathShield - 10 * delta # Make player not killable until the value falls below 0
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,57 @@
|
||||||
extends Node
|
extends Node
|
||||||
|
|
||||||
|
var ran1 = false
|
||||||
|
var ran2 = false
|
||||||
|
var idle1 = false
|
||||||
|
var idle2 = false
|
||||||
|
var switchOn = true
|
||||||
|
@onready var environment = get_node("WorldEnvironment").get_environment()
|
||||||
|
|
||||||
func _process(delta):
|
func _process(delta):
|
||||||
if $teddy/AnimationPlayer.is_playing() == false:
|
if $teddy/AnimationPlayer.is_playing() == false:
|
||||||
$teddy/AnimationPlayer.play("idle")
|
$teddy/AnimationPlayer.play("idle")
|
||||||
if $teddy2/AnimationPlayer.is_playing() == false:
|
if $teddy2/AnimationPlayer.is_playing() == false:
|
||||||
$teddy2/AnimationPlayer.play("idle")
|
$teddy2/AnimationPlayer.play("idle")
|
||||||
|
await get_tree().create_timer(4).timeout
|
||||||
|
if not ran1:
|
||||||
|
walk_right_teddy3(delta, 18)
|
||||||
|
if not ran2:
|
||||||
|
walk_left_teddy4(delta, 18)
|
||||||
|
if idle1:
|
||||||
|
if $teddy3/AnimationPlayer.is_playing() == false:
|
||||||
|
$teddy3/AnimationPlayer.play("idle")
|
||||||
|
if idle2:
|
||||||
|
if $teddy4/AnimationPlayer.is_playing() == false:
|
||||||
|
$teddy4/AnimationPlayer.play("idle")
|
||||||
|
if Global.menuLightSwitch:
|
||||||
|
Global.menuLightSwitch = false
|
||||||
|
if switchOn == false:
|
||||||
|
switchOn = true
|
||||||
|
environment.background_energy_multiplier = 1
|
||||||
|
environment.ambient_light_sky_contribution = 1
|
||||||
|
$DirectionalLight3D.light_energy = 1
|
||||||
|
elif switchOn == true:
|
||||||
|
switchOn = false
|
||||||
|
environment.background_energy_multiplier = 0
|
||||||
|
environment.ambient_light_sky_contribution = 0
|
||||||
|
$DirectionalLight3D.light_energy = 0.1
|
||||||
|
|
||||||
|
func walk_right_teddy3(delta, time):
|
||||||
|
ran1 = true
|
||||||
|
while time > 0:
|
||||||
|
if $teddy3/AnimationPlayer.is_playing() == false:
|
||||||
|
$teddy3/AnimationPlayer.play("walk")
|
||||||
|
await get_tree().create_timer(0.01).timeout
|
||||||
|
time = time - delta
|
||||||
|
$teddy3.position.x -= 0.5 * delta
|
||||||
|
idle1 = true
|
||||||
|
|
||||||
|
func walk_left_teddy4(delta, time):
|
||||||
|
ran2 = true
|
||||||
|
while time > 0:
|
||||||
|
if $teddy4/AnimationPlayer.is_playing() == false:
|
||||||
|
$teddy4/AnimationPlayer.play("walk")
|
||||||
|
await get_tree().create_timer(0.01).timeout
|
||||||
|
time = time - delta
|
||||||
|
$teddy4.position.x += 0.5 * delta
|
||||||
|
idle2 = true
|
||||||
|
|
|
@ -89,3 +89,7 @@ func _on_credits_button_mouse_entered():
|
||||||
func _on_credits_button_mouse_exited():
|
func _on_credits_button_mouse_exited():
|
||||||
$creditsButton/CreditUnselected.visible = true
|
$creditsButton/CreditUnselected.visible = true
|
||||||
$creditsButton/CreditSelected.visible = false
|
$creditsButton/CreditSelected.visible = false
|
||||||
|
|
||||||
|
|
||||||
|
func _on_light_button_pressed():
|
||||||
|
Global.menuLightSwitch = true
|
||||||
|
|
Loading…
Reference in a new issue