Skip to content
Snippets Groups Projects

Gardaf

Merged Gard Aleksander Furre requested to merge gardaf into main
5 files
+ 138
71
Compare changes
  • Side-by-side
  • Inline
Files
5
@@ -47,25 +47,25 @@ namespace BigSock {
/*
Minimum time the slime should idle before it can charge.
*/
protected static readonly TimeSpan IDLE_WAIT_TIME = new TimeSpan(0, 0, 0, 1, 0);
protected static readonly TimeSpan IDLE_WAIT_TIME = new TimeSpan(0, 0, 0, 0, 5);
/*
Minimum time the slime should charge before it can leap.
*/
protected static readonly TimeSpan CHARGE_WAIT_TIME = new TimeSpan(0, 0, 0, 2, 0);
protected static readonly TimeSpan CHARGE_WAIT_TIME = new TimeSpan(0, 0, 0, 1, 0);
/*
Maximum time the slime should leap before it can idle.
*/
protected static readonly TimeSpan LEAP_WAIT_TIME = new TimeSpan(0, 0, 0, 4, 0);
protected static readonly TimeSpan LEAP_WAIT_TIME = new TimeSpan(0, 0, 0, 2, 0);
/*
The force the slime leaps at.
*/
public double LeapForce => MovementSpeed * 4;
public double LeapForce => MovementSpeed * 10;
//void Start() {
// rb = GetComponent<Rigidbody2D>();
// m_Animator = gameObject.GetComponent<Animator>();
// m_Animator = gameObject.GetComponent<Animator>();
// followCollider = transform.Find("followCollider").GetComponent<EmptyCollider>();
// followCollider.OnColliderEnter2D_Action += Move_OnColliderEnter2D;
// followCollider.OnColliderStay2D_Action += Move_OnColliderStay2D;
@@ -90,7 +90,7 @@ namespace BigSock {
// Update the state.
State = SlimeState.Charging;
NextTimeStateCanChange = DateTime.Now + CHARGE_WAIT_TIME;
m_Animator.SetTrigger("walk");
m_Animator.SetTrigger("idle");
}
}
@@ -117,7 +117,7 @@ namespace BigSock {
// Update the state.
State = SlimeState.Idle;
NextTimeStateCanChange = DateTime.Now + IDLE_WAIT_TIME;
m_Animator.SetTrigger("idle");
m_Animator.SetTrigger("walk");
}
}
Loading