@@ -26,8 +26,9 @@ protected void Awake()
2626
2727
2828
29- protected void Update ( )
29+ protected void LateUpdate ( )
3030 {
31+ //Debug.Log(gndCheck.AmGrounded);
3132 Grounded = gndCheck . Grounded ;
3233 ApplyGravity ( ) ;
3334 }
@@ -47,17 +48,24 @@ protected float JmpMoveSpd
4748 return ( DynamicMaxSpd * 4 + HorizontalVel ) * 8f ;
4849 }
4950 }
50- [ SerializeField ] protected float defaultMoveSpd = 2.5f , runMoveSpd = 4f ;
5151
52+ public float SneakMoveSpd { get { return sneakSpeed ; } protected set { sneakSpeed = value ; } }
53+ [ SerializeField ] private float sneakSpeed = 2f ;
5254
55+ public float WalkMoveSpd { get { return walkSpeed ; } protected set { walkSpeed = value ; } }
56+ [ SerializeField ] private float walkSpeed = 4f ;
5357
58+ public float RunMoveSpd { get { return runSpeed ; } protected set { runSpeed = value ; } }
59+ [ SerializeField ] private float runSpeed = 12f ;
60+
61+
5462
5563
5664 #region Health, Magica, Stamina
5765 /// <summary>
5866 /// Base health points. Calculated using minimum HP and stat points.
5967 /// </summary>
60- private int _baseMaxHp = 0 ;
68+ private int _baseMaxHp = 10 ;
6169 /// <summary>
6270 /// Maximum health. Calculated using base HP and 'effect modifiers' (e.g. armor).
6371 /// </summary>
@@ -114,9 +122,8 @@ protected float DynamicMaxSpd
114122 {
115123 float maxSpdBaseNMod = modifyableProperties . MaxSpdEffectMod + BaseMoveStateMaxSpd ;
116124
117- if ( BaseMoveStateMaxSpd == 0 ) return 0 ; // No dynamic movement if not moving legs.
118- if ( Blocking && BaseMoveStateMaxSpd != runMoveSpd ) return Mathf . Clamp ( maxSpdBaseNMod * .75f + terrainMaxSpdMod / 2 , 0 , 99 ) ;
119- return Mathf . Clamp ( maxSpdBaseNMod + terrainMaxSpdMod , 0 , 99 ) ;
125+ if ( BaseMoveStateMaxSpd == 0 ) return 0 ; // No dynamic movement if not moving legs.
126+ return Mathf . Clamp ( maxSpdBaseNMod + terrainMaxSpdMod , 0 , 99 ) * .75f ;
120127 }
121128 }
122129 #endregion
@@ -138,7 +145,7 @@ protected float DynamicMaxSpd
138145 public int RotationSpeed
139146 {
140147 get
141- {
148+ {
142149 return Mathf . Clamp ( BaseRotSpd + modifyableProperties . RotSpdEffectsMod , 0 , 99 ) ;
143150 }
144151 }
@@ -152,11 +159,7 @@ public int RotationSpeed
152159 /// <summary>
153160 /// If the humanoid is in a combat stance (i.e. weapon drawn).
154161 /// </summary>
155- public bool InCombat { get ; set ; } = false ;
156- /// <summary>
157- /// If the humanoid is currently blocking.
158- /// </summary>
159- public bool Blocking { get ; set ; } = false ;
162+ public bool InCombat { get ; set ; } = false ;
160163 /// <summary>
161164 /// Attacks can have combos in the animator. When Attack(), it increases to continue the combo.
162165 /// </summary>
0 commit comments