Example #1
0
 /// <summary>
 /// Trampoline
 /// </summary>
 /// <param name="_tramp"></param>
 public void OnTrampEnter(Trampoline_OneWay _tramp)
 {
     m_HitTramp = _tramp;
     m_bBoostValid = true;
 }
Example #2
0
 public void OnTrampExit()
 {
     //Debug.Log("Exiting tramp");
     m_HitTramp = null;
     m_bBoostValid = false;
 }
Example #3
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;
 }