diff --git a/Entagon.gd b/Entagon.gd index c916b00..b4e729a 100644 --- a/Entagon.gd +++ b/Entagon.gd @@ -21,4 +21,4 @@ func spawn_explosion(): # Called every frame. 'delta' is the elapsed time since the previous frame. func _physics_process(delta): - apply_central_force((global_position - player.global_position).normalized() * -1400) + apply_central_force((global_position - (player.global_position + player.linear_velocity * 3)).normalized() * -1200) diff --git a/Shield.gd b/Shield.gd new file mode 100644 index 0000000..3ad1fe5 --- /dev/null +++ b/Shield.gd @@ -0,0 +1,18 @@ +extends StaticBody2D + +@export var health = 10 +var max_health = 10.0 + +func destroy(): + health -= 1 + + if health == 1: + $PowerDownFX.play() + + if health <= 0: + if not is_queued_for_deletion(): + $"..".queue_free() + $"../../Player".aquire_exagon() + + modulate = Color(Color.CYAN, 0.7 - lerp(0.7, 0.1, health / max_health)) + diff --git a/bullet.tscn b/bullet.tscn index 2398538..45568ea 100644 --- a/bullet.tscn +++ b/bullet.tscn @@ -55,8 +55,8 @@ radius = 30.0 collision_layer = 2 physics_material_override = SubResource("PhysicsMaterial_xnhwp") gravity_scale = 1.66533e-16 -contact_monitor = true max_contacts_reported = 1 +contact_monitor = true linear_velocity = Vector2(2.08165e-12, 2.08165e-12) script = ExtResource("1_3q13i") diff --git a/entagon.tscn b/entagon.tscn index 8690ab3..8106dd9 100644 --- a/entagon.tscn +++ b/entagon.tscn @@ -65,9 +65,9 @@ radius = 30.0 collision_mask = 0 physics_material_override = SubResource("PhysicsMaterial_odemo") gravity_scale = 1.66533e-16 -contact_monitor = true max_contacts_reported = 2 -linear_damp = 2.0 +contact_monitor = true +linear_damp = 3.0 angular_velocity = 0.174533 script = ExtResource("1_726g8") diff --git a/main.tscn b/main.tscn index d39d166..01639cd 100644 --- a/main.tscn +++ b/main.tscn @@ -12,11 +12,11 @@ [ext_resource type="Texture2D" uid="uid://yvrhlh04k8w1" path="res://background space.png" id="6_yg4g1"] [ext_resource type="Script" path="res://wave_enemy.gd" id="7_54h7d"] [ext_resource type="Texture2D" uid="uid://cwquv3mq5kk1d" path="res://countdown-spritesheet.png" id="8_e1eub"] -[ext_resource type="Resource" uid="uid://ba01r62bwm6av" path="res://eptagon_enemy.tres" id="9_q67ak"] +[ext_resource type="Resource" uid="uid://dd8me0deake37" path="res://eptagon_enemy.tres" id="9_q67ak"] [ext_resource type="AudioStream" uid="uid://dn65uapn0wsok" path="res://impactMetal_002.ogg" id="11_acuni"] [ext_resource type="Script" path="res://CollisionCheck.gd" id="11_ryeyk"] [ext_resource type="FontFile" uid="uid://bnguin7bsyx6e" path="res://Kenney Future.ttf" id="11_s4q6p"] -[ext_resource type="Texture2D" uid="uid://cso5ufbf7u7oj" path="res://Circle.png" id="13_318fy"] +[ext_resource type="Texture2D" uid="uid://bvpoajwx0yw3y" path="res://Circle.png" id="13_318fy"] [ext_resource type="Script" path="res://Notification.gd" id="13_lkv81"] [ext_resource type="Script" path="res://Stopwatch.gd" id="13_xhnp2"] [ext_resource type="Script" path="res://Leaderboard.gd" id="14_v1elq"] @@ -669,7 +669,6 @@ script = ExtResource("1_3dydx") script = ExtResource("1_ifu8g") waves = Array[ExtResource("4_um0x7")]([SubResource("Resource_ur7l5"), SubResource("Resource_kupyp"), SubResource("Resource_o8cet"), SubResource("Resource_0cevq"), SubResource("Resource_eppj0"), SubResource("Resource_rpu1y"), SubResource("Resource_4b1vo"), SubResource("Resource_gg7kj"), SubResource("Resource_fjkob"), SubResource("Resource_5sdy5"), SubResource("Resource_61v84"), SubResource("Resource_82qld"), SubResource("Resource_2j32b")]) wave_label = NodePath("../UI/Wave Count") -start_wave = 3 [node name="Timer" type="Timer" parent="Spawner"] wait_time = 0.1 diff --git a/main_menu.tscn b/main_menu.tscn index 578b891..37e837c 100644 --- a/main_menu.tscn +++ b/main_menu.tscn @@ -325,8 +325,8 @@ bus = &"Music" [connection signal="pressed" from="Layout/Play" to="." method="play"] [connection signal="pressed" from="Layout/Settings" to="Settings Panel" method="show"] [connection signal="pressed" from="Layout/Tutorial" to="Tutorial Text" method="show"] -[connection signal="pressed" from="Settings Panel/Close" to="Settings Panel" method="hide"] [connection signal="pressed" from="Settings Panel/Close" to="Settings Panel" method="save"] +[connection signal="pressed" from="Settings Panel/Close" to="Settings Panel" method="hide"] [connection signal="text_changed" from="Settings Panel/Menu/Username" to="Settings Panel" method="check_valid"] [connection signal="text_changed" from="Settings Panel/Menu/Username" to="Settings Panel/Menu/Username" method="check"] [connection signal="value_changed" from="Settings Panel/Menu/MusicVolume" to="Settings Panel/Menu/MusicVolume" method="_on_value_changed"] diff --git a/player-ite.gd b/player-ite.gd index 3ff3d2a..75aa6a5 100644 --- a/player-ite.gd +++ b/player-ite.gd @@ -46,7 +46,7 @@ func fire_laser(): tween.set_parallel(false) tween.tween_callback(set_laser_texture.bind(active_texture)) tween.tween_property(self, "can_damage", true, 0) - tween.tween_interval(0.25) + tween.tween_interval(0.5) tween.tween_property(self, "can_damage", false, 0) tween.tween_callback(set_laser_texture.bind(aiming_texture)) tween.set_parallel(true) diff --git a/riangle.tscn b/riangle.tscn index 9c24a59..057f708 100644 --- a/riangle.tscn +++ b/riangle.tscn @@ -66,7 +66,7 @@ animations = [{ }], "loop": true, "name": &"default", -"speed": 5.0 +"speed": 10.0 }] [node name="Riangle" type="StaticBody2D" groups=["destructible", "enemy"]] @@ -80,8 +80,6 @@ rotation = 1.5708 scale = Vector2(5.50033, 5.50033) sprite_frames = SubResource("SpriteFrames_p5dvv") autoplay = "default" -frame = 6 -frame_progress = 0.850246 [node name="Gun2" type="Marker2D" parent="."] position = Vector2(-224, 284) @@ -101,7 +99,7 @@ script = ExtResource("3_kffl0") bullet = ExtResource("4_tfncc") [node name="Timer" type="Timer" parent="."] -wait_time = 1.5 +wait_time = 3.0 autostart = true [node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="."]