mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-09 03:15:55 +00:00
Moved events inside the player
This commit is contained in:
parent
11a22684d4
commit
7d9db8cfb6
7 changed files with 57 additions and 75 deletions
|
|
@ -163,6 +163,8 @@ public partial class PlayerMovement : CharacterBody2D, IDestructible
|
|||
_selector.Visible = false;
|
||||
}
|
||||
|
||||
_inventoryManager.ItemUsed += this.UseItem;
|
||||
|
||||
_lastCheckPointPosition = GlobalPosition;
|
||||
|
||||
_ = UnTeleport();
|
||||
|
|
@ -260,16 +262,6 @@ public partial class PlayerMovement : CharacterBody2D, IDestructible
|
|||
_weaponProvider.EquipWeapon(weapon);
|
||||
}
|
||||
|
||||
public void NextWeapon()
|
||||
{
|
||||
_weaponProvider.NextWeapon();
|
||||
}
|
||||
|
||||
public void PreviousWeapon()
|
||||
{
|
||||
_weaponProvider.PreviousWeapon();
|
||||
}
|
||||
|
||||
private void FindInteractable()
|
||||
{
|
||||
var selected = _selector.SelectedInteractable;
|
||||
|
|
@ -394,12 +386,12 @@ public partial class PlayerMovement : CharacterBody2D, IDestructible
|
|||
|
||||
if (Input.IsActionJustPressed(_nextWeaponActionName))
|
||||
{
|
||||
NextWeapon();
|
||||
_weaponProvider.NextWeapon();
|
||||
}
|
||||
|
||||
if (Input.IsActionJustPressed(_previousWeaponActionName))
|
||||
{
|
||||
PreviousWeapon();
|
||||
_weaponProvider.PreviousWeapon();
|
||||
}
|
||||
|
||||
_crosshair.Position = CalculateCrosshairPosition();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue