This commit is contained in:
Victor Turgeon 2022-10-12 21:52:39 -04:00
parent d255a67e5c
commit 8e9d5ca274
4 changed files with 27 additions and 1 deletions

View File

@ -207,6 +207,13 @@ script = ExtResource( 12 )
[node name="Timer" type="Timer" parent="InfoScreen/Sparks"]
autostart = true
[node name="OmniLight" type="OmniLight" parent="InfoScreen/Sparks"]
transform = Transform( 0.411761, -0.108686, 0.261993, -0.193036, 0.0868354, 0.339407, -0.0596391, -0.190328, 0.0147751, 0.799004, 0.574107, -0.171512 )
light_color = Color( 0.847059, 0.627451, 0.372549, 1 )
light_energy = 5.0
shadow_enabled = true
shadow_color = Color( 0.431373, 0.384314, 0.384314, 1 )
[connection signal="timeout" from="End" to="." method="_on_Win_timeout"]
[connection signal="dying" from="Enemy" to="." method="_on_Enemy_dying"]
[connection signal="dying" from="Enemy2" to="." method="_on_Enemy_dying"]

View File

@ -173,6 +173,13 @@ script = ExtResource( 10 )
[node name="Timer" type="Timer" parent="InfoScreen/Sparks"]
autostart = true
[node name="OmniLight" type="OmniLight" parent="InfoScreen/Sparks"]
transform = Transform( 0.411761, -0.108686, 0.261993, -0.193036, 0.0868354, 0.339407, -0.0596391, -0.190328, 0.0147751, 0.799004, 0.574107, -0.171512 )
light_color = Color( 0.847059, 0.627451, 0.372549, 1 )
light_energy = 5.0
shadow_enabled = true
shadow_color = Color( 0.431373, 0.384314, 0.384314, 1 )
[connection signal="timeout" from="Timer" to="." method="_on_Enemy_dying"]
[connection signal="timeout" from="End" to="." method="_on_Win_timeout"]
[connection signal="timeout" from="InfoScreen/Sparks/Timer" to="InfoScreen/Sparks" method="_on_Timer_timeout"]

View File

@ -9,12 +9,17 @@ onready var NEXTSCENE = "res://Scenes/End.tscn"
onready var WinMess = $Messages/Win
onready var EndTimer = $End
onready var Eye = $RayCast
onready var player = $Player
onready var balls = $"Player/HUD/PlayerLayer/ActualHUD/Balls"
func _ready():
balls.text = String(enemycount)
func _process(delta):
Eye.look_at(player.transform.origin, Vector3.UP)
func _on_Enemy_dying():
enemycount -= 1

View File

@ -1,4 +1,4 @@
[gd_scene load_steps=20 format=2]
[gd_scene load_steps=21 format=2]
[ext_resource path="res://Levels/Level09.gd" type="Script" id=1]
[ext_resource path="res://Audio/mood.ogg" type="AudioStream" id=2]
@ -12,6 +12,7 @@
[ext_resource path="res://Materials/Brick01_Mat.tres" type="Material" id=10]
[ext_resource path="res://Materials/SquareGrill_Mat.tres" type="Material" id=11]
[ext_resource path="res://Levels/Sparks.gd" type="Script" id=12]
[ext_resource path="res://Scenes/Eye.tscn" type="PackedScene" id=13]
[sub_resource type="DynamicFont" id=8]
size = 64
@ -459,6 +460,12 @@ light_energy = 5.0
shadow_enabled = true
shadow_color = Color( 0.431373, 0.384314, 0.384314, 1 )
[node name="RayCast" type="RayCast" parent="."]
transform = Transform( 100, 0, 0, 0, 100, 0, 0, 0, 100, 0, 278.826, 0 )
[node name="Eye" parent="RayCast" instance=ExtResource( 13 )]
transform = Transform( -0.0243624, 0.00895076, 0.999663, 0.0452798, 0.998943, -0.00784082, -0.998677, 0.0450735, -0.0247419, 0, 0, 0 )
[connection signal="timeout" from="End" to="." method="_on_Win_timeout"]
[connection signal="dying" from="Enemy" to="." method="_on_Enemy_dying"]
[connection signal="dying" from="Enemy2" to="." method="_on_Enemy_dying"]