public FPPoseType MapPropActionToPoseType(FPPropAction tempAction) { FPPoseType mappedPoseType = FPPoseType.None; switch (tempAction) { case FPPropAction.Eat: { mappedPoseType = FPPoseType.Eat; break; } case FPPropAction.Throw: { mappedPoseType = FPPoseType.Throw; break; } case FPPropAction.Articulate: { mappedPoseType = FPPoseType.AdjustHold; break; } } return(mappedPoseType); }
public void SetPose(FPPoseType tempPose) { switch (tempPose) { case FPPoseType.None: { m_FPAnimator.SetBool("HoldingObject", false); m_FPAnimator.SetBool("HoldingAxe", false); m_FPAnimator.SetTrigger("KillProp"); break; } case FPPoseType.Grab: { m_FPAnimator.SetTrigger("Grab"); m_Drifter.SwitchControlTypes(WalkControlLimits.NoWalk, LookControlLimits.FullControl); break; } case FPPoseType.HoldingProp: { m_Drifter.SwitchControlTypes(WalkControlLimits.FullControl, LookControlLimits.FullControl); m_FPAnimator.SetBool("HoldingObject", true); m_FPAnimator.SetBool("Examine", false); bool axe = m_currentProp.tag == "axe"; m_FPAnimator.SetBool("HoldingAxe", axe); break; } case FPPoseType.ExaminingProp: { m_FPAnimator.SetBool("Examine", true); break; } case FPPoseType.Eat: { m_FPAnimator.SetTrigger("Eat"); m_propAwaitingAction = false; break; } case FPPoseType.Throw: { m_FPAnimator.SetTrigger("Throw"); m_propAwaitingAction = false; break; } case FPPoseType.AdjustHold: { m_FPAnimator.SetTrigger("AdjustHold"); m_propAwaitingAction = true; break; } } }