Selector position fix

This commit is contained in:
MaddoScientisto 2025-03-23 17:08:04 +01:00
commit a18dc11eb3
9 changed files with 10 additions and 8 deletions

View file

@ -45,7 +45,7 @@ EnemyName = &"Fairy"
EnemyKey = &"FAIRY_BASE" EnemyKey = &"FAIRY_BASE"
PrefabPath = &"res://Scenes/Actors/Fairy_New.tscn" PrefabPath = &"res://Scenes/Actors/Fairy_New.tscn"
MaxHealth = 2.0 MaxHealth = 2.0
MovementSpeed = 20.0 MovementSpeed = 30.0
Weapon = ExtResource("7_xkg5o") Weapon = ExtResource("7_xkg5o")
LootDrops = Array[ExtResource("2_sxbtw")]([SubResource("Resource_c8nix"), SubResource("Resource_gs2l3"), SubResource("Resource_sqnvg"), SubResource("Resource_5tyar"), SubResource("Resource_48xq6")]) LootDrops = Array[ExtResource("2_sxbtw")]([SubResource("Resource_c8nix"), SubResource("Resource_gs2l3"), SubResource("Resource_sqnvg"), SubResource("Resource_5tyar"), SubResource("Resource_48xq6")])
PlayerDetectionRange = 90.0 PlayerDetectionRange = 90.0

View file

@ -45,7 +45,7 @@ EnemyName = &"Fairy Guard"
EnemyKey = &"FAIRY_GUARD" EnemyKey = &"FAIRY_GUARD"
PrefabPath = &"res://Scenes/Actors/FairyGuard_New.tscn" PrefabPath = &"res://Scenes/Actors/FairyGuard_New.tscn"
MaxHealth = 4.0 MaxHealth = 4.0
MovementSpeed = 30.0 MovementSpeed = 40.0
Weapon = ExtResource("7_xlxdc") Weapon = ExtResource("7_xlxdc")
LootDrops = Array[ExtResource("2_ivudp")]([SubResource("Resource_c8nix"), SubResource("Resource_gs2l3"), SubResource("Resource_sqnvg"), SubResource("Resource_5tyar"), SubResource("Resource_48xq6")]) LootDrops = Array[ExtResource("2_ivudp")]([SubResource("Resource_c8nix"), SubResource("Resource_gs2l3"), SubResource("Resource_sqnvg"), SubResource("Resource_5tyar"), SubResource("Resource_48xq6")])
PlayerDetectionRange = 90.0 PlayerDetectionRange = 90.0

View file

@ -10,7 +10,7 @@ EnemyName = &"Robot 1"
EnemyKey = &"ROBOT_1" EnemyKey = &"ROBOT_1"
PrefabPath = &"res://Scenes/Actors/Thermathron.tscn" PrefabPath = &"res://Scenes/Actors/Thermathron.tscn"
MaxHealth = 8.0 MaxHealth = 8.0
MovementSpeed = 35.0 MovementSpeed = 38.0
Weapon = ExtResource("7_filx8") Weapon = ExtResource("7_filx8")
LootDrops = Array[ExtResource("1_f3huq")]([]) LootDrops = Array[ExtResource("1_f3huq")]([])
PlayerDetectionRange = 90.0 PlayerDetectionRange = 90.0

View file

@ -329,6 +329,7 @@ _storageModule = NodePath("../../Storage")
[node name="Active" type="Node2D" parent="StateMachine" node_paths=PackedStringArray("_weaponProvider", "_animationProvider", "_crosshairProvider", "_hitboxSpriteProvider", "_inputProvider", "_damageReceiver", "_activationProvider", "_interactionController", "_storageModule", "_moduleNodes")] [node name="Active" type="Node2D" parent="StateMachine" node_paths=PackedStringArray("_weaponProvider", "_animationProvider", "_crosshairProvider", "_hitboxSpriteProvider", "_inputProvider", "_damageReceiver", "_activationProvider", "_interactionController", "_storageModule", "_moduleNodes")]
script = ExtResource("3_3tuio") script = ExtResource("3_3tuio")
Speed = 55
_weaponProvider = NodePath("../../WeaponProvider") _weaponProvider = NodePath("../../WeaponProvider")
_animationProvider = NodePath("../../AnimationProvider") _animationProvider = NodePath("../../AnimationProvider")
_crosshairProvider = NodePath("../../CrosshairProvider") _crosshairProvider = NodePath("../../CrosshairProvider")

View file

@ -6,6 +6,8 @@
radius = 4.47214 radius = 4.47214
[node name="PhysicsDropWrapper" type="RigidBody2D"] [node name="PhysicsDropWrapper" type="RigidBody2D"]
collision_layer = 0
collision_mask = 33
gravity_scale = 0.0 gravity_scale = 0.0
lock_rotation = true lock_rotation = true
linear_damp = 2.5 linear_damp = 2.5

View file

@ -636,7 +636,6 @@ position = Vector2(664, 38)
[node name="PhysicsDropWrapper" parent="Tilemaps" instance=ExtResource("62_5glx6")] [node name="PhysicsDropWrapper" parent="Tilemaps" instance=ExtResource("62_5glx6")]
position = Vector2(616, 18) position = Vector2(616, 18)
collision_layer = 4 collision_layer = 4
collision_mask = 33
ItemToDrop = ExtResource("23_1ajuh") ItemToDrop = ExtResource("23_1ajuh")
[node name="CameraController" type="Camera2D" parent="."] [node name="CameraController" type="Camera2D" parent="."]
@ -662,7 +661,7 @@ position = Vector2(124, 338)
script = ExtResource("12_8to53") script = ExtResource("12_8to53")
[node name="PlayerStartPosition" type="Marker2D" parent="."] [node name="PlayerStartPosition" type="Marker2D" parent="."]
position = Vector2(238, 188) position = Vector2(635, 70)
[node name="AlarmManager" type="Node2D" parent="."] [node name="AlarmManager" type="Node2D" parent="."]
process_mode = 1 process_mode = 1

View file

@ -7,6 +7,6 @@ public interface IInteractable
public bool Activate(ActivationType activationType = ActivationType.Toggle); public bool Activate(ActivationType activationType = ActivationType.Toggle);
public bool CanActivate(); public bool CanActivate();
public Vector2 GetPosition(); public Vector2 GetGlobalPosition();
//protected bool MeetsRequirements(); //protected bool MeetsRequirements();
} }

View file

@ -118,7 +118,7 @@ public partial class Selector : Node2D
{ {
if (SelectedInteractable != null) if (SelectedInteractable != null)
{ {
this.Position = SelectedInteractable.GetPosition(); this.GlobalPosition = SelectedInteractable.GetGlobalPosition();
this.Visible = true; this.Visible = true;
} }
else else