godot-shooter / commit
Simplified the smoke a bit, increased player health.
Smoke.tscn | 4 ++-- World.gd | 4 +++- World.tscn | 18 +++++------------- 3 files changed, 10 insertions(+), 16 deletions(-) diff --git a/Smoke.tscn b/Smoke.tscn index 4383f0a..a0eb28b 100644 --- a/Smoke.tscn +++ b/Smoke.tscn @@ -13,12 +13,12 @@ colors = PoolColorArray( 1, 0.305882, 0, 1, 0.364706, 0.364706, 0.364706, 0.4196 [node name="Smoke" type="Node2D"] [node name="Particles2D" type="CPUParticles2D" parent="."] -amount = 40 +amount = 10 explosiveness = 0.2 lifetime_randomness = 0.5 texture = ExtResource( 1 ) emission_shape = 1 -emission_sphere_radius = 10.0 +emission_sphere_radius = 5.0 direction = Vector2( -10, 0 ) spread = 180.0 gravity = Vector2( 0, -98 ) diff --git a/World.gd b/World.gd index 39d2be9..6e5696c 100644 --- a/World.gd +++ b/World.gd @@ -48,7 +48,9 @@ func _ready() -> void: func get_new_item_pos(dist_ratio: float = 1.0) -> Vector2: var pos_angle = randi() % 360 var unit_vector = Vector2.UP.rotated(pos_angle) - var screen_radius = get_viewport().get_visible_rect().size.length() / 2 + 10 + var size = get_viewport().get_visible_rect().size + var max_side = max(size.x, size.y) + var screen_radius = max_side / 2 + 10 var enemy_spawn_dist = screen_radius * dist_ratio var pos = unit_vector * enemy_spawn_dist + $Player.global_position return pos diff --git a/World.tscn b/World.tscn index ed400be..728da29 100644 --- a/World.tscn +++ b/World.tscn @@ -14,8 +14,7 @@ radius = 29.0172 script = ExtResource( 4 ) [node name="Player" parent="." groups=["player"] instance=ExtResource( 2 )] -position = Vector2( 513, 302 ) -health = 5 +position = Vector2( 248, 410 ) [node name="Destination" type="Area2D" parent="."] @@ -68,18 +67,11 @@ margin_right = 40.0 margin_bottom = 40.0 mouse_filter = 2 -[node name="CenterContainer" type="CenterContainer" parent="CanvasLayer/PauseMenu"] -visible = false -anchor_right = 1.0 -anchor_bottom = 1.0 -margin_right = 40.0 -margin_bottom = 40.0 - [node name="Panel" type="Panel" parent="CanvasLayer/PauseMenu"] -margin_left = 407.0 -margin_top = 218.0 -margin_right = 657.0 -margin_bottom = 468.0 +margin_left = 120.0 +margin_top = 233.0 +margin_right = 370.0 +margin_bottom = 483.0 [node name="VBoxContainer" type="VBoxContainer" parent="CanvasLayer/PauseMenu/Panel"] margin_left = 68.0