// Update is called once per frame void Update() { if (!_moduleActive) { return; } DirectionType direction = GetDirection(); if ((DirectionType.Stop != direction) && (DirectionType.North != direction) && (DirectionType.South != direction) && (DirectionType.None != direction)) { TransitionOutOfClimb(); return; } ClimbType climbType = GetClimbType(); if (DirectionType.Stop == direction) { climbType = ClimbType.Idle; } Speed = ClimbSpeed.GetSpeed(climbType); SetMove(direction, climbType); }
public LocationSection(Guid locID, ClimbType type, ClimbGradeType gradeType, string name) { DefaultClimbTypeID = (byte)type; DefaultGradeTypeID = (byte)gradeType; LocationID = locID; Name = name; }
private void UpdateAnimation(ClimbType climbType) { if (ClimbType.Climbing == climbType) { Climbing(); } else if (ClimbType.Idle == climbType) { Idle(); } }
public static float GetSpeed(ClimbType climbType) { if (ClimbType.Climbing == climbType) { return(ClimbSpeed.CLIMB_SPEED); } if (ClimbType.Idle == climbType) { return(ClimbSpeed.IDLE_SPEED); } return(0.0f); }
private void SetMove(DirectionType direction, ClimbType climbType) { if ((CurrentMove.Direction == direction) && (CurrentMove.Climb == climbType)) { return; } Vector3 tempVector = PreviousVector; PreviousVector = CurrentVector; CurrentVector = ConvertForClimbing(Direction.ConvertDirectionToVector(direction, tempVector)); PreviousMove = CurrentMove; CurrentMove = new ClimbMove(direction, climbType); UpdateAnimation(climbType); }
/// <summary> /// Change between braced and hang climb /// </summary> /// <param name="m_ClimbType"></param> /// <returns></returns> IEnumerator ChangeClimbType(ClimbType m_ClimbType) { if (!m_Engine.IsCoroutinePlaying && !m_SideAdjustment) { m_Engine.IsCoroutinePlaying = true; string state = (m_ClimbType == ClimbType.Braced) ? m_HangToBracedStateName : m_BracedToHangStateName; if (m_ClimbType == ClimbType.Braced) { if (m_ClimbIK != null) { m_ClimbIK.OnHang = false; } } SetState(state); while (m_CurrentStatePlaying != state) { yield return(null); } while (!m_AnimatorManager.HasFinishedAnimation(state)) { yield return(null); } state = (m_ClimbType == ClimbType.Braced) ? m_BracedHangStateName : m_HangStateName; if (m_ClimbType == ClimbType.Hang) { if (m_ClimbIK != null) { m_ClimbIK.OnHang = true; } } yield return(new WaitForSeconds(Time.fixedDeltaTime)); SetState(state, 0.05f); m_Engine.IsCoroutinePlaying = false; } }
public ActionResult getAreaByType(ClimbType type, String area) { if (type == ClimbType.Boulder) { var Boulders = _context.Boulders.ToList(); var List1 = Boulders.Where(c => c.Area == area).Select( c => new { id = c.BoulderID, name = c.Name }); foreach (var item in List1) { Debug.WriteLine(item); } return(Json(List1)); } else { var Sports = _context.Sports.ToList(); var List1 = Sports.Where(c => c.Area == area).Select( c => new { ID = c.SportID, name = c.Name }); return(Json(List1)); } }
public ClimbMove(DirectionType directionType, ClimbType climbType) { Direction = directionType; Climb = climbType; }