This commit is contained in:
CortexCore
2023-11-15 23:54:54 +08:00
parent ee3ecec6cb
commit 3c837a4a33
356 changed files with 73756 additions and 26493 deletions

View File

@@ -12,6 +12,7 @@ namespace BITFALL.Props
{
[SerializeField] private SpringEulerAngle spring=new();
[SerializeField] private Optional<int> maxSpring;
[SerializeField] private Optional<LocationAdditive> locationAdditive;
public IUnityEntity UnityEntity => null;
public Rigidbody Rigidbody => null;
private Vector3 initialEulerAngles;
@@ -25,6 +26,10 @@ namespace BITFALL.Props
{
spring.Update(Time.fixedDeltaTime,initialEulerAngles);
transform.localEulerAngles = spring.value;
if (locationAdditive.Allow)
{
locationAdditive.Value.AddEuler(spring.value-initialEulerAngles);
}
}
public void GiveDamage(DamageMessage message)
{