2020-07-29 21:04:50 +00:00
|
|
|
|
using UnityEngine;
|
|
|
|
|
|
2020-07-30 20:27:14 +00:00
|
|
|
|
namespace QSB.Tools
|
2020-07-29 21:04:50 +00:00
|
|
|
|
{
|
2020-12-02 21:23:01 +00:00
|
|
|
|
public class QSBTool : PlayerTool
|
|
|
|
|
{
|
|
|
|
|
public ToolType Type { get; set; }
|
|
|
|
|
public GameObject ToolGameObject { get; set; }
|
|
|
|
|
|
|
|
|
|
public DampedSpringQuat MoveSpring
|
|
|
|
|
{
|
|
|
|
|
get => _moveSpring;
|
|
|
|
|
set => _moveSpring = value;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public Transform StowTransform
|
|
|
|
|
{
|
|
|
|
|
get => _stowTransform;
|
|
|
|
|
set => _stowTransform = value;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public Transform HoldTransform
|
|
|
|
|
{
|
|
|
|
|
get => _holdTransform;
|
|
|
|
|
set => _holdTransform = value;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public float ArrivalDegrees
|
|
|
|
|
{
|
|
|
|
|
get => _arrivalDegrees;
|
|
|
|
|
set => _arrivalDegrees = value;
|
|
|
|
|
}
|
|
|
|
|
|
2020-12-14 20:41:56 +00:00
|
|
|
|
public void OnEnable() => ToolGameObject?.SetActive(true);
|
2020-12-14 21:20:53 +00:00
|
|
|
|
public void OnDisable() => ToolGameObject?.SetActive(false);
|
2020-12-02 21:23:01 +00:00
|
|
|
|
|
|
|
|
|
public void ChangeEquipState(bool equipState)
|
|
|
|
|
{
|
|
|
|
|
if (equipState)
|
|
|
|
|
{
|
|
|
|
|
EquipTool();
|
2020-12-11 23:13:13 +00:00
|
|
|
|
return;
|
2020-12-02 21:23:01 +00:00
|
|
|
|
}
|
2021-06-18 21:38:32 +00:00
|
|
|
|
|
2020-12-11 23:13:13 +00:00
|
|
|
|
UnequipTool();
|
2020-12-02 21:23:01 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
2020-07-29 21:04:50 +00:00
|
|
|
|
}
|