mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-07 04:55:55 +00:00
Chests and strafing speed
This commit is contained in:
parent
0ccc272ada
commit
b645e1724e
17 changed files with 286 additions and 21 deletions
|
|
@ -7,6 +7,11 @@ public partial class PlayerMovement : CharacterBody2D, IDestructible
|
|||
{
|
||||
[Export]
|
||||
public int Speed { get; set; } = 400;
|
||||
|
||||
[Export]
|
||||
public int StrafeSpeed { get; set; } = 200;
|
||||
|
||||
public int MovementSpeed => _isStrafing ? StrafeSpeed : Speed;
|
||||
|
||||
[Export]
|
||||
public float CrosshairDistance { get; set; } = 10f;
|
||||
|
|
@ -237,7 +242,7 @@ public partial class PlayerMovement : CharacterBody2D, IDestructible
|
|||
// {
|
||||
// _facingDirection = _movementDirection;
|
||||
// }
|
||||
Velocity = _movementDirection * (float)(Speed * delta);
|
||||
Velocity = _movementDirection * (float)( MovementSpeed * delta);
|
||||
|
||||
MoveAndSlide();
|
||||
|
||||
|
|
@ -246,7 +251,7 @@ public partial class PlayerMovement : CharacterBody2D, IDestructible
|
|||
//FindInteractable();
|
||||
|
||||
}
|
||||
|
||||
|
||||
private void _on_interaction_controller_area_entered(Area2D area)
|
||||
{
|
||||
// Replace with function body.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue