From fae81e7d82ec1b1741d92be590c8539b9ad754b7 Mon Sep 17 00:00:00 2001 From: Just Dzhi Date: Sun, 1 Oct 2023 19:54:33 +0400 Subject: [PATCH] fix player bullet pos --- src/models/player/Player.tscn | 8 ++++---- src/models/player/player.gd | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/models/player/Player.tscn b/src/models/player/Player.tscn index c8e71a8..e085f77 100644 --- a/src/models/player/Player.tscn +++ b/src/models/player/Player.tscn @@ -5,10 +5,10 @@ [ext_resource path="res://res/shaders/colorize.tres" type="Material" id=3] [sub_resource type="RectangleShape2D" id=1] -extents = Vector2( 4, 4 ) +extents = Vector2( 3.5, 3.5 ) [sub_resource type="RectangleShape2D" id=2] -extents = Vector2( 7, 11 ) +extents = Vector2( 3.5, 9 ) [sub_resource type="Animation" id=4] resource_name = "RESET" @@ -48,7 +48,7 @@ tracks/0/loop_wrap = true tracks/0/imported = false tracks/0/enabled = true tracks/0/keys = { -"times": PoolRealArray( 0, 0.9 ), +"times": PoolRealArray( 0, 2 ), "transitions": PoolRealArray( 1, 1 ), "update": 1, "values": [ true, false ] @@ -83,7 +83,7 @@ shape = SubResource( 1 ) [node name="EnemyCollision" type="Area2D" parent="."] [node name="CollisionShape2D" type="CollisionShape2D" parent="EnemyCollision"] -position = Vector2( 12, 12 ) +position = Vector2( 11.5, 14 ) shape = SubResource( 2 ) [node name="DirtCollision" type="Area2D" parent="."] diff --git a/src/models/player/player.gd b/src/models/player/player.gd index 8d68373..f8afbbe 100644 --- a/src/models/player/player.gd +++ b/src/models/player/player.gd @@ -9,7 +9,7 @@ var recharge_timer = .0 var invincible = false var target: EnemyClass var slowed = false -var speed = 100 +var speed = 80 var draw_node var bullet @@ -68,8 +68,8 @@ func _shoot(): bullet = bullet_preload.instance() bullet.target = target get_parent().add_child(bullet) - bullet.global_position.x = self.global_position.x + 12 - bullet.global_position.y = self.global_position.y - 4 + bullet.global_position.x = self.global_position.x + 8 + bullet.global_position.y = self.global_position.y + 8 func _draw(): if target != null and is_instance_valid(target): @@ -107,7 +107,7 @@ func _physics_process(delta): invincible = false if slowed: - speed_multiplier = 0.18 + speed_multiplier = 0.22 else: speed_multiplier = 1.0