예제 #1
0
 public void OnReset()
 {
     if (hingeJoint != null)
         Destroy(hingeJoint);
     m_vOrigPos = Game.Instance.CurrLevel.GetPlayerPlacement();
     m_fAddForceTimer = m_fApplyJumpTimer = 0.0f;
     m_fResetableTimer = 1.0f;
     rigidbody.constraints = RigidbodyConstraints.FreezeAll;
     rigidbody.isKinematic = true;
     //rigidbody.Sleep();
     //rigidbody.velocity = Vector3.zero;
     m_bHitSpikes = m_bHitWater = m_bDied = m_bBoostValid = m_bWallJumpStarted = false;
     m_DiedTxt.enabled = false;
     rigidbody.transform.rotation = m_vOrigRot;
     rigidbody.transform.position = m_vOrigPos;
     if (m_WallJump != null)
         m_WallJump.OnReset();
     m_HitTramp = null;
     m_WallJump = null;
 }
예제 #2
0
 public void OnTrampExit()
 {
     //Debug.Log("Exiting tramp");
     m_HitTramp = null;
     m_bBoostValid = false;
 }
예제 #3
0
 /// <summary>
 /// Trampoline
 /// </summary>
 /// <param name="_tramp"></param>
 public void OnTrampEnter(Trampoline_OneWay _tramp)
 {
     m_HitTramp = _tramp;
     m_bBoostValid = true;
 }
예제 #4
0
 public void OnReset()
 {
     if (hingeJoint != null)
         Destroy(hingeJoint);
     m_vOrigPos = Game.Instance.CurrLevel.GetPlayerPlacement();
     m_fAddForceTimer = m_fApplyJumpTimer = 0.0f;
     m_fResetableTimer = 1.0f;
     rigidbody.constraints = RigidbodyConstraints.FreezeAll;
     rigidbody.isKinematic = true;
     //rigidbody.Sleep();
     //rigidbody.velocity = Vector3.zero;
     m_bHitSpikes = m_bHitWater = m_bDied = m_bBoostValid = m_bWallJumpStarted = false;
     m_DiedTxt.enabled = false;
     rigidbody.transform.rotation = m_vOrigRot;
     rigidbody.transform.position = m_vOrigPos;
     if (m_WallJump != null)
         m_WallJump.OnReset();
     m_HitTramp = null;
     m_WallJump = null;
 }
예제 #5
0
 public void OnTrampExit()
 {
     //Debug.Log("Exiting tramp");
     m_HitTramp = null;
     m_bBoostValid = false;
 }
예제 #6
0
 /// <summary>
 /// Trampoline
 /// </summary>
 /// <param name="_tramp"></param>
 public void OnTrampEnter(Trampoline_OneWay _tramp)
 {
     m_HitTramp = _tramp;
     m_bBoostValid = true;
 }