override public void Update(float deltaTime) { //if (Hi5_Interaction_Const.TestPlaneMoveUsePhysic) { //ObjectItem.transform.localRotation = localQua; //if(Hi5_Interaction_Const.TestModifyConstraints) ObjectItem.SetIsKinematic(true); //ObjectItem.SetAllLock (); } }
override public void End() { //Debug.Log("pinch end"); if (ObjectItem != null) { // if (Hi5_Interaction_Const.TestModifyConstraints) ObjectItem.SetIsKinematic(false); //mObjectItem.ChangeColor (mObjectItem.orgColor); //ObjectItem.CacullateThrowMove(); //mQueuePositionRecord.Clear(); } }
public override void Start() { //Debug.Log("Hi5_Object_State_Clap start"); cd = Hi5_Interaction_Const.Clapcd; //ObjectItem.ChangeColor (Color.green); //if (Hi5_Interaction_Const.TestModifyConstraints) { ObjectItem.SetIsKinematic(true); ObjectItem.SetUseGravity(true); } }
override public void Start() { localQua = ObjectItem.transform.localRotation; // mPinchType = Hi5_Object_Pinch_Type.ELeft; ObjectItem.CleanRecord(); if (mObjectItem.gameObject.GetComponent <Rigidbody>() != null) { mObjectItem.gameObject.GetComponent <Rigidbody>().Sleep(); #if UNITY_2017_2_OR_NEWER #else mObjectItem.transform.gameObject.GetComponent <Rigidbody>().WakeUp(); #endif } //mObjectItem.ChangeColor (Color.cyan); //if (Hi5_Interaction_Const.TestModifyConstraints) ObjectItem.SetIsKinematic(true); }
override public void Update(float deltaTime) { if (Hi5_Interaction_Const.TestChangeState1) { if (ObjectItem.transform.parent != Hi5_Interaction_Object_Manager.GetObjectManager().transform) { ///Debug.Log ("static palm parent"); ObjectItem.transform.parent = Hi5_Interaction_Object_Manager.GetObjectManager().transform; } } { if (ObjectItem.mObjectType == EObject_Type.ECommon) { if (((!ObjectItem.IsTouchPlane()) && (!ObjectItem.IsTouchStaticObject()))) { //Debug.Log ("Move From"); ObjectItem.SetIsKinematic(false); ObjectItem.SetUseGravity(true); ObjectItem.SetIsLockYPosition(false); if (Hi5_Interaction_Const.TestPlaneStatic) { if (!StartY) { StartY = true; Y = ObjectItem.transform.position.y; } else { if (StartY) { if (Mathf.Abs(Y - ObjectItem.transform.position.y) > 0.2f) { ObjectItem.mstatemanager.GetMoveState().SetFreeMove(null); ObjectItem.ChangeState(E_Object_State.EMove); { Hi5_Glove_Interaction_Object_Event_Data data = Hi5_Glove_Interaction_Object_Event_Data.Instance(ObjectItem.idObject, ObjectItem.mObjectType, EHandType.ENone, EEventObjectType.EMove); Hi5InteractionManager.Instance.GetMessage().DispenseMessage(Hi5_Glove_Interaction_Message.Hi5_MessageMessageKey.messageObjectEvent, (object)data, null); } } } } } else { ObjectItem.mstatemanager.GetMoveState().SetFreeMove(null); ObjectItem.ChangeState(E_Object_State.EMove); { Hi5_Glove_Interaction_Object_Event_Data data = Hi5_Glove_Interaction_Object_Event_Data.Instance(ObjectItem.idObject, ObjectItem.mObjectType, EHandType.ENone, EEventObjectType.EMove); Hi5InteractionManager.Instance.GetMessage().DispenseMessage(Hi5_Glove_Interaction_Message.Hi5_MessageMessageKey.messageObjectEvent, (object)data, null); } } } else { ObjectItem.SetIsKinematic(false); ObjectItem.SetIsLockYPosition(false); ObjectItem.SetUseGravity(true); } } else { ObjectItem.SetIsKinematic(true); ObjectItem.SetIsLockYPosition(true); ObjectItem.SetUseGravity(false); //ObjectItem.transform.position = new Vector3 (ObjectItem.transform.position.x,ObjectItem.Y,ObjectItem.transform.position.z); } } if (ObjectItem.mObjectType == EObject_Type.EButton) { ObjectItem.SetIsKinematic(true); ObjectItem.SetIsLockYPosition(true); } }