Added game over screen
This commit is contained in:
@@ -21,6 +21,7 @@ texture = ExtResource("3_uf2n1")
|
||||
polygon = PackedVector2Array(-23, -10, -17, -14, -3, -15, 21, -13, 22, -12, 22, 12, 21, 13, -3, 15, -17, 14, -23, 10)
|
||||
|
||||
[node name="Health" parent="." index="2"]
|
||||
max_shield = 250
|
||||
max_hull = 1000
|
||||
|
||||
[node name="HeathBar" parent="." index="3"]
|
||||
|
||||
@@ -23,6 +23,7 @@ func _ready() -> void:
|
||||
func _physics_process(delta: float) -> void:
|
||||
_apply_homing_guidance(delta)
|
||||
super._physics_process(delta)
|
||||
_update_sprite(_velocity)
|
||||
|
||||
|
||||
func _acquire_target() -> void:
|
||||
@@ -40,8 +41,6 @@ func _apply_homing_guidance(delta: float) -> void:
|
||||
var angle_diff := wrapf(target_angle - current_angle, -PI, PI)
|
||||
var angle_change := clampf(angle_diff, -max_angle_change, max_angle_change)
|
||||
_velocity = _velocity.rotated(angle_change)
|
||||
|
||||
_update_sprite(_velocity)
|
||||
|
||||
|
||||
func _update_sprite(velocity: Vector2) -> void:
|
||||
|
||||
@@ -77,7 +77,7 @@ turbulence_noise_speed = Vector3(0.1, 0.1, 0.1)
|
||||
collision_layer = 0
|
||||
collision_mask = 0
|
||||
script = ExtResource("2_6hdsf")
|
||||
rotation_speed = 90
|
||||
rotation_speed = 5
|
||||
speed = 300
|
||||
|
||||
[node name="GPUParticles2D" type="GPUParticles2D" parent="." index="0"]
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
[sub_resource type="Resource" id="Resource_1121u"]
|
||||
resource_local_to_scene = true
|
||||
script = ExtResource("3_l65ib")
|
||||
value = 45
|
||||
value = 30
|
||||
metadata/_custom_type_script = "uid://c27v705giygv4"
|
||||
|
||||
[sub_resource type="CircleShape2D" id="CircleShape2D_l65ib"]
|
||||
|
||||
Reference in New Issue
Block a user