...
 
Commits (3)
......@@ -10,7 +10,7 @@ public class PlayerAnimation : MonoBehaviour
[Header("Scaling")] public AnimationCurve m_AirScale;
public bool m_ScalingActive = true;
public float m_Time = 10f;
public float m_SizePerCharge = 0.2f;
public float m_maxScale = 2.0f;
private Vector3 m_OriginScale;
private int m_PreviousAirCharges = 0;
private int m_CurrentAirCharges = 0;
......@@ -153,7 +153,7 @@ public class PlayerAnimation : MonoBehaviour
public void ScalePlayer()
{
m_CurrentAirCharges = r_State.GetCharges();
var scaleFactor = 1.0f + m_CurrentAirCharges * 0.2f;
var scaleFactor = 1.0f + m_CurrentAirCharges * (m_maxScale - 1.0f) / 5.0f;
var direction = Mathf.Sign(this.gameObject.transform.localScale.x);
var newScale = new Vector3(direction * scaleFactor * m_OriginScale.x, scaleFactor * m_OriginScale.x, 0.0f);
this.gameObject.transform.localScale = newScale;
......