protected void init(Hi5_Glove_Interaction_Hand hand) { mJudgeMent = new Hi5_Object_JudgeMent(); mDecision = new Hi5_Glove_Decision(mJudgeMent, hand, this); Hi5_Glove_State_Pinch pinchState = new Hi5_Glove_State_Pinch(); pinchState.Init(hand, this, mDecision); Hi5_Glove_State_Release releaseState = new Hi5_Glove_State_Release(); releaseState.Init(hand, this, mDecision); Hi5_Glove_State_Pinch2 pinch2 = new Hi5_Glove_State_Pinch2(); pinch2.Init(hand, this, mDecision); Hi5_Glove_State_Clap clap = new Hi5_Glove_State_Clap(); clap.Init(hand, this, mDecision); Hi5_Glove_State_Lift Lift = new Hi5_Glove_State_Lift(); Lift.Init(hand, this, mDecision); mDicState.Add(E_Hand_State.EClap, clap); mDicState.Add(E_Hand_State.ELift, Lift); mDicState.Add(E_Hand_State.EPinch, pinchState); mDicState.Add(E_Hand_State.ERelease, releaseState); mDicState.Add(E_Hand_State.EPinch2, pinch2); mCurrentState = releaseState; mJudgeMent.mStateManager = this; mJudgeMent.Hand = hand; }
internal Hi5_Glove_State_Pinch GetPinch() { if (mDicState.ContainsKey(E_Hand_State.EPinch)) { Hi5_Glove_State_Pinch temp = mDicState[E_Hand_State.EPinch] as Hi5_Glove_State_Pinch; return(temp); } else { return(null); } }