2020-10-14 15:24:07 +02:00
|
|
|
|
using Content.Shared.GameObjects.Components.Movement;
|
2020-09-13 14:23:52 +02:00
|
|
|
|
using Robust.Shared.GameObjects;
|
2020-08-19 18:13:22 -04:00
|
|
|
|
|
|
|
|
|
|
namespace Content.Client.GameObjects.Components.Movement
|
|
|
|
|
|
{
|
|
|
|
|
|
[RegisterComponent]
|
2020-10-14 15:24:07 +02:00
|
|
|
|
public class ClimbingComponent : SharedClimbingComponent
|
2020-08-19 18:13:22 -04:00
|
|
|
|
{
|
|
|
|
|
|
public override void HandleComponentState(ComponentState curState, ComponentState nextState)
|
|
|
|
|
|
{
|
|
|
|
|
|
if (!(curState is ClimbModeComponentState climbModeState) || Body == null)
|
|
|
|
|
|
{
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2020-10-14 15:24:07 +02:00
|
|
|
|
IsClimbing = climbModeState.Climbing;
|
2020-08-19 18:13:22 -04:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public override bool IsClimbing { get; set; }
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|