Initial commit
This commit is contained in:
8
Assets/Animation.meta
Normal file
8
Assets/Animation.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b943c81636fd81c42af52b763442ab4d
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
8
Assets/Animation/AMR-T800.meta
Normal file
8
Assets/Animation/AMR-T800.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: bfbb4d0c676ad284aa1a383d32556942
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
304
Assets/Animation/AMR-T800/AMR-T800.controller
Normal file
304
Assets/Animation/AMR-T800/AMR-T800.controller
Normal file
@@ -0,0 +1,304 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1102 &-7586294949274326913
|
||||
AnimatorState:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Up
|
||||
m_Speed: 1
|
||||
m_CycleOffset: 0
|
||||
m_Transitions:
|
||||
- {fileID: 8970520936030781725}
|
||||
- {fileID: -4153733434208989862}
|
||||
m_StateMachineBehaviours: []
|
||||
m_Position: {x: 50, y: 50, z: 0}
|
||||
m_IKOnFeet: 0
|
||||
m_WriteDefaultValues: 1
|
||||
m_Mirror: 0
|
||||
m_SpeedParameterActive: 0
|
||||
m_MirrorParameterActive: 0
|
||||
m_CycleOffsetParameterActive: 0
|
||||
m_TimeParameterActive: 0
|
||||
m_Motion: {fileID: 7400000, guid: 2dd61ca4ce5daac48a55c451dbb90472, type: 2}
|
||||
m_Tag:
|
||||
m_SpeedParameter:
|
||||
m_MirrorParameter:
|
||||
m_CycleOffsetParameter:
|
||||
m_TimeParameter:
|
||||
--- !u!1101 &-7345060650742523648
|
||||
AnimatorStateTransition:
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name:
|
||||
m_Conditions:
|
||||
- m_ConditionMode: 1
|
||||
m_ConditionEvent: U
|
||||
m_EventTreshold: 0
|
||||
m_DstStateMachine: {fileID: 0}
|
||||
m_DstState: {fileID: -7586294949274326913}
|
||||
m_Solo: 0
|
||||
m_Mute: 0
|
||||
m_IsExit: 0
|
||||
serializedVersion: 3
|
||||
m_TransitionDuration: 0.25
|
||||
m_TransitionOffset: 0
|
||||
m_ExitTime: 0.75
|
||||
m_HasExitTime: 1
|
||||
m_HasFixedDuration: 1
|
||||
m_InterruptionSource: 0
|
||||
m_OrderedInterruption: 1
|
||||
m_CanTransitionToSelf: 1
|
||||
--- !u!1101 &-4153733434208989862
|
||||
AnimatorStateTransition:
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name:
|
||||
m_Conditions:
|
||||
- m_ConditionMode: 1
|
||||
m_ConditionEvent: D
|
||||
m_EventTreshold: 0
|
||||
m_DstStateMachine: {fileID: 0}
|
||||
m_DstState: {fileID: -72893081393463388}
|
||||
m_Solo: 0
|
||||
m_Mute: 0
|
||||
m_IsExit: 0
|
||||
serializedVersion: 3
|
||||
m_TransitionDuration: 0.25
|
||||
m_TransitionOffset: 0
|
||||
m_ExitTime: 0.75
|
||||
m_HasExitTime: 1
|
||||
m_HasFixedDuration: 1
|
||||
m_InterruptionSource: 0
|
||||
m_OrderedInterruption: 1
|
||||
m_CanTransitionToSelf: 1
|
||||
--- !u!1102 &-3457964616526746165
|
||||
AnimatorState:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Idle
|
||||
m_Speed: 1
|
||||
m_CycleOffset: 0
|
||||
m_Transitions:
|
||||
- {fileID: 6654048359504916859}
|
||||
- {fileID: -7345060650742523648}
|
||||
m_StateMachineBehaviours: []
|
||||
m_Position: {x: 50, y: 50, z: 0}
|
||||
m_IKOnFeet: 0
|
||||
m_WriteDefaultValues: 1
|
||||
m_Mirror: 0
|
||||
m_SpeedParameterActive: 0
|
||||
m_MirrorParameterActive: 0
|
||||
m_CycleOffsetParameterActive: 0
|
||||
m_TimeParameterActive: 0
|
||||
m_Motion: {fileID: 7400000, guid: 449d9c80304e0d046a3d2d18af8a863a, type: 2}
|
||||
m_Tag:
|
||||
m_SpeedParameter:
|
||||
m_MirrorParameter:
|
||||
m_CycleOffsetParameter:
|
||||
m_TimeParameter:
|
||||
--- !u!1102 &-72893081393463388
|
||||
AnimatorState:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Down
|
||||
m_Speed: 1
|
||||
m_CycleOffset: 0
|
||||
m_Transitions:
|
||||
- {fileID: 3698631978699543384}
|
||||
- {fileID: 1329192366634365084}
|
||||
m_StateMachineBehaviours: []
|
||||
m_Position: {x: 50, y: 50, z: 0}
|
||||
m_IKOnFeet: 0
|
||||
m_WriteDefaultValues: 1
|
||||
m_Mirror: 0
|
||||
m_SpeedParameterActive: 0
|
||||
m_MirrorParameterActive: 0
|
||||
m_CycleOffsetParameterActive: 0
|
||||
m_TimeParameterActive: 0
|
||||
m_Motion: {fileID: 7400000, guid: 4890838bc5230ca43995f3967a3efca0, type: 2}
|
||||
m_Tag:
|
||||
m_SpeedParameter:
|
||||
m_MirrorParameter:
|
||||
m_CycleOffsetParameter:
|
||||
m_TimeParameter:
|
||||
--- !u!91 &9100000
|
||||
AnimatorController:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: AMR-T800
|
||||
serializedVersion: 5
|
||||
m_AnimatorParameters:
|
||||
- m_Name: U
|
||||
m_Type: 4
|
||||
m_DefaultFloat: 0
|
||||
m_DefaultInt: 0
|
||||
m_DefaultBool: 0
|
||||
m_Controller: {fileID: 9100000}
|
||||
- m_Name: D
|
||||
m_Type: 4
|
||||
m_DefaultFloat: 0
|
||||
m_DefaultInt: 0
|
||||
m_DefaultBool: 0
|
||||
m_Controller: {fileID: 9100000}
|
||||
m_AnimatorLayers:
|
||||
- serializedVersion: 5
|
||||
m_Name: Base Layer
|
||||
m_StateMachine: {fileID: 6798906103116167324}
|
||||
m_Mask: {fileID: 0}
|
||||
m_Motions: []
|
||||
m_Behaviours: []
|
||||
m_BlendingMode: 0
|
||||
m_SyncedLayerIndex: -1
|
||||
m_DefaultWeight: 0
|
||||
m_IKPass: 0
|
||||
m_SyncedLayerAffectsTiming: 0
|
||||
m_Controller: {fileID: 9100000}
|
||||
--- !u!1101 &1329192366634365084
|
||||
AnimatorStateTransition:
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name:
|
||||
m_Conditions:
|
||||
- m_ConditionMode: 2
|
||||
m_ConditionEvent: U
|
||||
m_EventTreshold: 0
|
||||
- m_ConditionMode: 2
|
||||
m_ConditionEvent: D
|
||||
m_EventTreshold: 0
|
||||
m_DstStateMachine: {fileID: 0}
|
||||
m_DstState: {fileID: -3457964616526746165}
|
||||
m_Solo: 0
|
||||
m_Mute: 0
|
||||
m_IsExit: 0
|
||||
serializedVersion: 3
|
||||
m_TransitionDuration: 0.25
|
||||
m_TransitionOffset: 0
|
||||
m_ExitTime: 0.75
|
||||
m_HasExitTime: 1
|
||||
m_HasFixedDuration: 1
|
||||
m_InterruptionSource: 0
|
||||
m_OrderedInterruption: 1
|
||||
m_CanTransitionToSelf: 1
|
||||
--- !u!1101 &3698631978699543384
|
||||
AnimatorStateTransition:
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name:
|
||||
m_Conditions:
|
||||
- m_ConditionMode: 1
|
||||
m_ConditionEvent: D
|
||||
m_EventTreshold: 0
|
||||
m_DstStateMachine: {fileID: 0}
|
||||
m_DstState: {fileID: -7586294949274326913}
|
||||
m_Solo: 0
|
||||
m_Mute: 0
|
||||
m_IsExit: 0
|
||||
serializedVersion: 3
|
||||
m_TransitionDuration: 0.25
|
||||
m_TransitionOffset: 0
|
||||
m_ExitTime: 0.75
|
||||
m_HasExitTime: 1
|
||||
m_HasFixedDuration: 1
|
||||
m_InterruptionSource: 0
|
||||
m_OrderedInterruption: 1
|
||||
m_CanTransitionToSelf: 1
|
||||
--- !u!1101 &6654048359504916859
|
||||
AnimatorStateTransition:
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name:
|
||||
m_Conditions:
|
||||
- m_ConditionMode: 1
|
||||
m_ConditionEvent: D
|
||||
m_EventTreshold: 0
|
||||
m_DstStateMachine: {fileID: 0}
|
||||
m_DstState: {fileID: -72893081393463388}
|
||||
m_Solo: 0
|
||||
m_Mute: 0
|
||||
m_IsExit: 0
|
||||
serializedVersion: 3
|
||||
m_TransitionDuration: 0.25
|
||||
m_TransitionOffset: 0
|
||||
m_ExitTime: 0.75
|
||||
m_HasExitTime: 1
|
||||
m_HasFixedDuration: 1
|
||||
m_InterruptionSource: 0
|
||||
m_OrderedInterruption: 1
|
||||
m_CanTransitionToSelf: 1
|
||||
--- !u!1107 &6798906103116167324
|
||||
AnimatorStateMachine:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Base Layer
|
||||
m_ChildStates:
|
||||
- serializedVersion: 1
|
||||
m_State: {fileID: -3457964616526746165}
|
||||
m_Position: {x: 270, y: 120, z: 0}
|
||||
- serializedVersion: 1
|
||||
m_State: {fileID: -7586294949274326913}
|
||||
m_Position: {x: 510, y: 80, z: 0}
|
||||
- serializedVersion: 1
|
||||
m_State: {fileID: -72893081393463388}
|
||||
m_Position: {x: 510, y: 220, z: 0}
|
||||
m_ChildStateMachines: []
|
||||
m_AnyStateTransitions: []
|
||||
m_EntryTransitions: []
|
||||
m_StateMachineTransitions: {}
|
||||
m_StateMachineBehaviours: []
|
||||
m_AnyStatePosition: {x: 50, y: 20, z: 0}
|
||||
m_EntryPosition: {x: 50, y: 120, z: 0}
|
||||
m_ExitPosition: {x: 800, y: 120, z: 0}
|
||||
m_ParentStateMachinePosition: {x: 800, y: 20, z: 0}
|
||||
m_DefaultState: {fileID: -3457964616526746165}
|
||||
--- !u!1101 &8970520936030781725
|
||||
AnimatorStateTransition:
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name:
|
||||
m_Conditions:
|
||||
- m_ConditionMode: 2
|
||||
m_ConditionEvent: U
|
||||
m_EventTreshold: 0
|
||||
- m_ConditionMode: 2
|
||||
m_ConditionEvent: D
|
||||
m_EventTreshold: 0
|
||||
m_DstStateMachine: {fileID: 0}
|
||||
m_DstState: {fileID: -3457964616526746165}
|
||||
m_Solo: 0
|
||||
m_Mute: 0
|
||||
m_IsExit: 0
|
||||
serializedVersion: 3
|
||||
m_TransitionDuration: 0.25
|
||||
m_TransitionOffset: 0
|
||||
m_ExitTime: 0.75
|
||||
m_HasExitTime: 1
|
||||
m_HasFixedDuration: 1
|
||||
m_InterruptionSource: 0
|
||||
m_OrderedInterruption: 1
|
||||
m_CanTransitionToSelf: 1
|
||||
8
Assets/Animation/AMR-T800/AMR-T800.controller.meta
Normal file
8
Assets/Animation/AMR-T800/AMR-T800.controller.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0a2113b91b364dc49b71d971ca36da66
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 9100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
177
Assets/Animation/AMR-T800/Down.anim
Normal file
177
Assets/Animation/AMR-T800/Down.anim
Normal file
@@ -0,0 +1,177 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!74 &7400000
|
||||
AnimationClip:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Down
|
||||
serializedVersion: 7
|
||||
m_Legacy: 0
|
||||
m_Compressed: 0
|
||||
m_UseHighQualityCurve: 1
|
||||
m_RotationCurves: []
|
||||
m_CompressedRotationCurves: []
|
||||
m_EulerCurves: []
|
||||
m_PositionCurves:
|
||||
- curve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 3
|
||||
time: 0
|
||||
value: {x: 0, y: 0.188, z: 0}
|
||||
inSlope: {x: 0, y: 0, z: 0}
|
||||
outSlope: {x: 0, y: 0, z: 0}
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334}
|
||||
outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334}
|
||||
- serializedVersion: 3
|
||||
time: 1
|
||||
value: {x: 0, y: 0.129, z: 0}
|
||||
inSlope: {x: 0, y: 0, z: 0}
|
||||
outSlope: {x: 0, y: 0, z: 0}
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334}
|
||||
outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334}
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
path: CUMNANG
|
||||
m_ScaleCurves: []
|
||||
m_FloatCurves: []
|
||||
m_PPtrCurves: []
|
||||
m_SampleRate: 60
|
||||
m_WrapMode: 0
|
||||
m_Bounds:
|
||||
m_Center: {x: 0, y: 0, z: 0}
|
||||
m_Extent: {x: 0, y: 0, z: 0}
|
||||
m_ClipBindingConstant:
|
||||
genericBindings:
|
||||
- serializedVersion: 2
|
||||
path: 2558446439
|
||||
attribute: 1
|
||||
script: {fileID: 0}
|
||||
typeID: 4
|
||||
customType: 0
|
||||
isPPtrCurve: 0
|
||||
isIntCurve: 0
|
||||
isSerializeReferenceCurve: 0
|
||||
pptrCurveMapping: []
|
||||
m_AnimationClipSettings:
|
||||
serializedVersion: 2
|
||||
m_AdditiveReferencePoseClip: {fileID: 0}
|
||||
m_AdditiveReferencePoseTime: 0
|
||||
m_StartTime: 0
|
||||
m_StopTime: 1
|
||||
m_OrientationOffsetY: 0
|
||||
m_Level: 0
|
||||
m_CycleOffset: 0
|
||||
m_HasAdditiveReferencePose: 0
|
||||
m_LoopTime: 0
|
||||
m_LoopBlend: 0
|
||||
m_LoopBlendOrientation: 0
|
||||
m_LoopBlendPositionY: 0
|
||||
m_LoopBlendPositionXZ: 0
|
||||
m_KeepOriginalOrientation: 0
|
||||
m_KeepOriginalPositionY: 1
|
||||
m_KeepOriginalPositionXZ: 0
|
||||
m_HeightFromFeet: 0
|
||||
m_Mirror: 0
|
||||
m_EditorCurves:
|
||||
- serializedVersion: 2
|
||||
curve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 3
|
||||
time: 0
|
||||
value: 0
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 136
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
- serializedVersion: 3
|
||||
time: 1
|
||||
value: 0
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 136
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
attribute: m_LocalPosition.x
|
||||
path: CUMNANG
|
||||
classID: 4
|
||||
script: {fileID: 0}
|
||||
flags: 0
|
||||
- serializedVersion: 2
|
||||
curve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 3
|
||||
time: 0
|
||||
value: 0.188
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 136
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
- serializedVersion: 3
|
||||
time: 1
|
||||
value: 0.129
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 136
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
attribute: m_LocalPosition.y
|
||||
path: CUMNANG
|
||||
classID: 4
|
||||
script: {fileID: 0}
|
||||
flags: 0
|
||||
- serializedVersion: 2
|
||||
curve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 3
|
||||
time: 0
|
||||
value: 0
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 136
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
- serializedVersion: 3
|
||||
time: 1
|
||||
value: 0
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 136
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
attribute: m_LocalPosition.z
|
||||
path: CUMNANG
|
||||
classID: 4
|
||||
script: {fileID: 0}
|
||||
flags: 0
|
||||
m_EulerEditorCurves: []
|
||||
m_HasGenericRootTransform: 0
|
||||
m_HasMotionFloatCurves: 0
|
||||
m_Events: []
|
||||
8
Assets/Animation/AMR-T800/Down.anim.meta
Normal file
8
Assets/Animation/AMR-T800/Down.anim.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4890838bc5230ca43995f3967a3efca0
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 7400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
53
Assets/Animation/AMR-T800/Idle.anim
Normal file
53
Assets/Animation/AMR-T800/Idle.anim
Normal file
@@ -0,0 +1,53 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!74 &7400000
|
||||
AnimationClip:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Idle
|
||||
serializedVersion: 7
|
||||
m_Legacy: 0
|
||||
m_Compressed: 0
|
||||
m_UseHighQualityCurve: 1
|
||||
m_RotationCurves: []
|
||||
m_CompressedRotationCurves: []
|
||||
m_EulerCurves: []
|
||||
m_PositionCurves: []
|
||||
m_ScaleCurves: []
|
||||
m_FloatCurves: []
|
||||
m_PPtrCurves: []
|
||||
m_SampleRate: 60
|
||||
m_WrapMode: 0
|
||||
m_Bounds:
|
||||
m_Center: {x: 0, y: 0, z: 0}
|
||||
m_Extent: {x: 0, y: 0, z: 0}
|
||||
m_ClipBindingConstant:
|
||||
genericBindings: []
|
||||
pptrCurveMapping: []
|
||||
m_AnimationClipSettings:
|
||||
serializedVersion: 2
|
||||
m_AdditiveReferencePoseClip: {fileID: 0}
|
||||
m_AdditiveReferencePoseTime: 0
|
||||
m_StartTime: 0
|
||||
m_StopTime: 1
|
||||
m_OrientationOffsetY: 0
|
||||
m_Level: 0
|
||||
m_CycleOffset: 0
|
||||
m_HasAdditiveReferencePose: 0
|
||||
m_LoopTime: 0
|
||||
m_LoopBlend: 0
|
||||
m_LoopBlendOrientation: 0
|
||||
m_LoopBlendPositionY: 0
|
||||
m_LoopBlendPositionXZ: 0
|
||||
m_KeepOriginalOrientation: 0
|
||||
m_KeepOriginalPositionY: 1
|
||||
m_KeepOriginalPositionXZ: 0
|
||||
m_HeightFromFeet: 0
|
||||
m_Mirror: 0
|
||||
m_EditorCurves: []
|
||||
m_EulerEditorCurves: []
|
||||
m_HasGenericRootTransform: 0
|
||||
m_HasMotionFloatCurves: 0
|
||||
m_Events: []
|
||||
8
Assets/Animation/AMR-T800/Idle.anim.meta
Normal file
8
Assets/Animation/AMR-T800/Idle.anim.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 449d9c80304e0d046a3d2d18af8a863a
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 7400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
177
Assets/Animation/AMR-T800/Up.anim
Normal file
177
Assets/Animation/AMR-T800/Up.anim
Normal file
@@ -0,0 +1,177 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!74 &7400000
|
||||
AnimationClip:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Up
|
||||
serializedVersion: 7
|
||||
m_Legacy: 0
|
||||
m_Compressed: 0
|
||||
m_UseHighQualityCurve: 1
|
||||
m_RotationCurves: []
|
||||
m_CompressedRotationCurves: []
|
||||
m_EulerCurves: []
|
||||
m_PositionCurves:
|
||||
- curve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 3
|
||||
time: 0
|
||||
value: {x: 0, y: 0.129, z: 0}
|
||||
inSlope: {x: 0, y: 0, z: 0}
|
||||
outSlope: {x: 0, y: 0, z: 0}
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334}
|
||||
outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334}
|
||||
- serializedVersion: 3
|
||||
time: 1
|
||||
value: {x: 0, y: 0.188, z: 0}
|
||||
inSlope: {x: 0, y: 0, z: 0}
|
||||
outSlope: {x: 0, y: 0, z: 0}
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334}
|
||||
outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334}
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
path: CUMNANG
|
||||
m_ScaleCurves: []
|
||||
m_FloatCurves: []
|
||||
m_PPtrCurves: []
|
||||
m_SampleRate: 60
|
||||
m_WrapMode: 0
|
||||
m_Bounds:
|
||||
m_Center: {x: 0, y: 0, z: 0}
|
||||
m_Extent: {x: 0, y: 0, z: 0}
|
||||
m_ClipBindingConstant:
|
||||
genericBindings:
|
||||
- serializedVersion: 2
|
||||
path: 2558446439
|
||||
attribute: 1
|
||||
script: {fileID: 0}
|
||||
typeID: 4
|
||||
customType: 0
|
||||
isPPtrCurve: 0
|
||||
isIntCurve: 0
|
||||
isSerializeReferenceCurve: 0
|
||||
pptrCurveMapping: []
|
||||
m_AnimationClipSettings:
|
||||
serializedVersion: 2
|
||||
m_AdditiveReferencePoseClip: {fileID: 0}
|
||||
m_AdditiveReferencePoseTime: 0
|
||||
m_StartTime: 0
|
||||
m_StopTime: 1
|
||||
m_OrientationOffsetY: 0
|
||||
m_Level: 0
|
||||
m_CycleOffset: 0
|
||||
m_HasAdditiveReferencePose: 0
|
||||
m_LoopTime: 0
|
||||
m_LoopBlend: 0
|
||||
m_LoopBlendOrientation: 0
|
||||
m_LoopBlendPositionY: 0
|
||||
m_LoopBlendPositionXZ: 0
|
||||
m_KeepOriginalOrientation: 0
|
||||
m_KeepOriginalPositionY: 1
|
||||
m_KeepOriginalPositionXZ: 0
|
||||
m_HeightFromFeet: 0
|
||||
m_Mirror: 0
|
||||
m_EditorCurves:
|
||||
- serializedVersion: 2
|
||||
curve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 3
|
||||
time: 0
|
||||
value: 0
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 136
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
- serializedVersion: 3
|
||||
time: 1
|
||||
value: 0
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 136
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
attribute: m_LocalPosition.x
|
||||
path: CUMNANG
|
||||
classID: 4
|
||||
script: {fileID: 0}
|
||||
flags: 0
|
||||
- serializedVersion: 2
|
||||
curve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 3
|
||||
time: 0
|
||||
value: 0.129
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 136
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
- serializedVersion: 3
|
||||
time: 1
|
||||
value: 0.188
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 136
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
attribute: m_LocalPosition.y
|
||||
path: CUMNANG
|
||||
classID: 4
|
||||
script: {fileID: 0}
|
||||
flags: 0
|
||||
- serializedVersion: 2
|
||||
curve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 3
|
||||
time: 0
|
||||
value: 0
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 136
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
- serializedVersion: 3
|
||||
time: 1
|
||||
value: 0
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 136
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
attribute: m_LocalPosition.z
|
||||
path: CUMNANG
|
||||
classID: 4
|
||||
script: {fileID: 0}
|
||||
flags: 0
|
||||
m_EulerEditorCurves: []
|
||||
m_HasGenericRootTransform: 0
|
||||
m_HasMotionFloatCurves: 0
|
||||
m_Events: []
|
||||
8
Assets/Animation/AMR-T800/Up.anim.meta
Normal file
8
Assets/Animation/AMR-T800/Up.anim.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2dd61ca4ce5daac48a55c451dbb90472
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 7400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
8
Assets/Animation/AS_Pallet Mover_REDER.meta
Normal file
8
Assets/Animation/AS_Pallet Mover_REDER.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a418a7e3c3cde5142b0f05c874c258ee
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
304
Assets/Animation/AS_Pallet Mover_REDER/APM-S 1.controller
Normal file
304
Assets/Animation/AS_Pallet Mover_REDER/APM-S 1.controller
Normal file
@@ -0,0 +1,304 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1107 &-6157277510851263512
|
||||
AnimatorStateMachine:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Base Layer
|
||||
m_ChildStates:
|
||||
- serializedVersion: 1
|
||||
m_State: {fileID: 3354225513457575993}
|
||||
m_Position: {x: 260, y: 110, z: 0}
|
||||
- serializedVersion: 1
|
||||
m_State: {fileID: 9137532618756157684}
|
||||
m_Position: {x: 540, y: 60, z: 0}
|
||||
- serializedVersion: 1
|
||||
m_State: {fileID: 4596449786265523353}
|
||||
m_Position: {x: 540, y: 230, z: 0}
|
||||
m_ChildStateMachines: []
|
||||
m_AnyStateTransitions: []
|
||||
m_EntryTransitions: []
|
||||
m_StateMachineTransitions: {}
|
||||
m_StateMachineBehaviours: []
|
||||
m_AnyStatePosition: {x: 50, y: 20, z: 0}
|
||||
m_EntryPosition: {x: 50, y: 120, z: 0}
|
||||
m_ExitPosition: {x: 800, y: 120, z: 0}
|
||||
m_ParentStateMachinePosition: {x: 800, y: 20, z: 0}
|
||||
m_DefaultState: {fileID: 3354225513457575993}
|
||||
--- !u!1101 &-2820337510646027195
|
||||
AnimatorStateTransition:
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name:
|
||||
m_Conditions:
|
||||
- m_ConditionMode: 2
|
||||
m_ConditionEvent: D
|
||||
m_EventTreshold: 0
|
||||
- m_ConditionMode: 2
|
||||
m_ConditionEvent: U
|
||||
m_EventTreshold: 0
|
||||
m_DstStateMachine: {fileID: 0}
|
||||
m_DstState: {fileID: 3354225513457575993}
|
||||
m_Solo: 0
|
||||
m_Mute: 0
|
||||
m_IsExit: 0
|
||||
serializedVersion: 3
|
||||
m_TransitionDuration: 0.25
|
||||
m_TransitionOffset: 0
|
||||
m_ExitTime: 0.75
|
||||
m_HasExitTime: 1
|
||||
m_HasFixedDuration: 1
|
||||
m_InterruptionSource: 0
|
||||
m_OrderedInterruption: 1
|
||||
m_CanTransitionToSelf: 1
|
||||
--- !u!1101 &-2206470795354071514
|
||||
AnimatorStateTransition:
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name:
|
||||
m_Conditions:
|
||||
- m_ConditionMode: 1
|
||||
m_ConditionEvent: D
|
||||
m_EventTreshold: 0
|
||||
m_DstStateMachine: {fileID: 0}
|
||||
m_DstState: {fileID: 4596449786265523353}
|
||||
m_Solo: 0
|
||||
m_Mute: 0
|
||||
m_IsExit: 0
|
||||
serializedVersion: 3
|
||||
m_TransitionDuration: 0.25
|
||||
m_TransitionOffset: 0
|
||||
m_ExitTime: 0.75
|
||||
m_HasExitTime: 1
|
||||
m_HasFixedDuration: 1
|
||||
m_InterruptionSource: 0
|
||||
m_OrderedInterruption: 1
|
||||
m_CanTransitionToSelf: 1
|
||||
--- !u!91 &9100000
|
||||
AnimatorController:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: APM-S 1
|
||||
serializedVersion: 5
|
||||
m_AnimatorParameters:
|
||||
- m_Name: U
|
||||
m_Type: 4
|
||||
m_DefaultFloat: 0
|
||||
m_DefaultInt: 0
|
||||
m_DefaultBool: 0
|
||||
m_Controller: {fileID: 9100000}
|
||||
- m_Name: D
|
||||
m_Type: 4
|
||||
m_DefaultFloat: 0
|
||||
m_DefaultInt: 0
|
||||
m_DefaultBool: 0
|
||||
m_Controller: {fileID: 9100000}
|
||||
m_AnimatorLayers:
|
||||
- serializedVersion: 5
|
||||
m_Name: Base Layer
|
||||
m_StateMachine: {fileID: -6157277510851263512}
|
||||
m_Mask: {fileID: 0}
|
||||
m_Motions: []
|
||||
m_Behaviours: []
|
||||
m_BlendingMode: 0
|
||||
m_SyncedLayerIndex: -1
|
||||
m_DefaultWeight: 0
|
||||
m_IKPass: 0
|
||||
m_SyncedLayerAffectsTiming: 0
|
||||
m_Controller: {fileID: 9100000}
|
||||
--- !u!1101 &323645387714056387
|
||||
AnimatorStateTransition:
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name:
|
||||
m_Conditions:
|
||||
- m_ConditionMode: 1
|
||||
m_ConditionEvent: D
|
||||
m_EventTreshold: 0
|
||||
m_DstStateMachine: {fileID: 0}
|
||||
m_DstState: {fileID: 4596449786265523353}
|
||||
m_Solo: 0
|
||||
m_Mute: 0
|
||||
m_IsExit: 0
|
||||
serializedVersion: 3
|
||||
m_TransitionDuration: 0.25
|
||||
m_TransitionOffset: 0
|
||||
m_ExitTime: 0.75
|
||||
m_HasExitTime: 1
|
||||
m_HasFixedDuration: 1
|
||||
m_InterruptionSource: 0
|
||||
m_OrderedInterruption: 1
|
||||
m_CanTransitionToSelf: 1
|
||||
--- !u!1101 &1252364248784210178
|
||||
AnimatorStateTransition:
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name:
|
||||
m_Conditions:
|
||||
- m_ConditionMode: 2
|
||||
m_ConditionEvent: U
|
||||
m_EventTreshold: 0
|
||||
- m_ConditionMode: 2
|
||||
m_ConditionEvent: D
|
||||
m_EventTreshold: 0
|
||||
m_DstStateMachine: {fileID: 0}
|
||||
m_DstState: {fileID: 3354225513457575993}
|
||||
m_Solo: 0
|
||||
m_Mute: 0
|
||||
m_IsExit: 0
|
||||
serializedVersion: 3
|
||||
m_TransitionDuration: 0.25
|
||||
m_TransitionOffset: 0
|
||||
m_ExitTime: 0.75
|
||||
m_HasExitTime: 1
|
||||
m_HasFixedDuration: 1
|
||||
m_InterruptionSource: 0
|
||||
m_OrderedInterruption: 1
|
||||
m_CanTransitionToSelf: 1
|
||||
--- !u!1102 &3354225513457575993
|
||||
AnimatorState:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Idle
|
||||
m_Speed: 1
|
||||
m_CycleOffset: 0
|
||||
m_Transitions:
|
||||
- {fileID: 3863454900977825937}
|
||||
- {fileID: 323645387714056387}
|
||||
m_StateMachineBehaviours: []
|
||||
m_Position: {x: 50, y: 50, z: 0}
|
||||
m_IKOnFeet: 0
|
||||
m_WriteDefaultValues: 1
|
||||
m_Mirror: 0
|
||||
m_SpeedParameterActive: 0
|
||||
m_MirrorParameterActive: 0
|
||||
m_CycleOffsetParameterActive: 0
|
||||
m_TimeParameterActive: 0
|
||||
m_Motion: {fileID: 7400000, guid: ba367d03abe33d64d86b7a799e109ac1, type: 2}
|
||||
m_Tag:
|
||||
m_SpeedParameter:
|
||||
m_MirrorParameter:
|
||||
m_CycleOffsetParameter:
|
||||
m_TimeParameter:
|
||||
--- !u!1101 &3863454900977825937
|
||||
AnimatorStateTransition:
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name:
|
||||
m_Conditions:
|
||||
- m_ConditionMode: 1
|
||||
m_ConditionEvent: U
|
||||
m_EventTreshold: 0
|
||||
m_DstStateMachine: {fileID: 0}
|
||||
m_DstState: {fileID: 9137532618756157684}
|
||||
m_Solo: 0
|
||||
m_Mute: 0
|
||||
m_IsExit: 0
|
||||
serializedVersion: 3
|
||||
m_TransitionDuration: 0.25
|
||||
m_TransitionOffset: 0
|
||||
m_ExitTime: 0.75
|
||||
m_HasExitTime: 1
|
||||
m_HasFixedDuration: 1
|
||||
m_InterruptionSource: 0
|
||||
m_OrderedInterruption: 1
|
||||
m_CanTransitionToSelf: 1
|
||||
--- !u!1102 &4596449786265523353
|
||||
AnimatorState:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Down
|
||||
m_Speed: 1
|
||||
m_CycleOffset: 0
|
||||
m_Transitions:
|
||||
- {fileID: -2820337510646027195}
|
||||
- {fileID: 6975808880594107766}
|
||||
m_StateMachineBehaviours: []
|
||||
m_Position: {x: 50, y: 50, z: 0}
|
||||
m_IKOnFeet: 0
|
||||
m_WriteDefaultValues: 1
|
||||
m_Mirror: 0
|
||||
m_SpeedParameterActive: 0
|
||||
m_MirrorParameterActive: 0
|
||||
m_CycleOffsetParameterActive: 0
|
||||
m_TimeParameterActive: 0
|
||||
m_Motion: {fileID: 7400000, guid: 921fb7555afa3404eb85240ef95cabd9, type: 2}
|
||||
m_Tag:
|
||||
m_SpeedParameter:
|
||||
m_MirrorParameter:
|
||||
m_CycleOffsetParameter:
|
||||
m_TimeParameter:
|
||||
--- !u!1101 &6975808880594107766
|
||||
AnimatorStateTransition:
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name:
|
||||
m_Conditions:
|
||||
- m_ConditionMode: 1
|
||||
m_ConditionEvent: U
|
||||
m_EventTreshold: 0
|
||||
m_DstStateMachine: {fileID: 0}
|
||||
m_DstState: {fileID: 9137532618756157684}
|
||||
m_Solo: 0
|
||||
m_Mute: 0
|
||||
m_IsExit: 0
|
||||
serializedVersion: 3
|
||||
m_TransitionDuration: 0.25
|
||||
m_TransitionOffset: 0
|
||||
m_ExitTime: 0.75
|
||||
m_HasExitTime: 1
|
||||
m_HasFixedDuration: 1
|
||||
m_InterruptionSource: 0
|
||||
m_OrderedInterruption: 1
|
||||
m_CanTransitionToSelf: 1
|
||||
--- !u!1102 &9137532618756157684
|
||||
AnimatorState:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Up
|
||||
m_Speed: 1
|
||||
m_CycleOffset: 0
|
||||
m_Transitions:
|
||||
- {fileID: -2206470795354071514}
|
||||
- {fileID: 1252364248784210178}
|
||||
m_StateMachineBehaviours: []
|
||||
m_Position: {x: 50, y: 50, z: 0}
|
||||
m_IKOnFeet: 0
|
||||
m_WriteDefaultValues: 1
|
||||
m_Mirror: 0
|
||||
m_SpeedParameterActive: 0
|
||||
m_MirrorParameterActive: 0
|
||||
m_CycleOffsetParameterActive: 0
|
||||
m_TimeParameterActive: 0
|
||||
m_Motion: {fileID: 7400000, guid: 5560aeabbd3e4234cafa865c49cfd380, type: 2}
|
||||
m_Tag:
|
||||
m_SpeedParameter:
|
||||
m_MirrorParameter:
|
||||
m_CycleOffsetParameter:
|
||||
m_TimeParameter:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 57a297caf6afbd3478cc45dd073f25aa
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 9100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
177
Assets/Animation/AS_Pallet Mover_REDER/Down.anim
Normal file
177
Assets/Animation/AS_Pallet Mover_REDER/Down.anim
Normal file
@@ -0,0 +1,177 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!74 &7400000
|
||||
AnimationClip:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Down
|
||||
serializedVersion: 7
|
||||
m_Legacy: 0
|
||||
m_Compressed: 0
|
||||
m_UseHighQualityCurve: 1
|
||||
m_RotationCurves: []
|
||||
m_CompressedRotationCurves: []
|
||||
m_EulerCurves: []
|
||||
m_PositionCurves:
|
||||
- curve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 3
|
||||
time: 0
|
||||
value: {x: 0.010002136, y: 0.07499695, z: 0.166}
|
||||
inSlope: {x: 0, y: 0, z: 0}
|
||||
outSlope: {x: 0, y: 0, z: 0}
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334}
|
||||
outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334}
|
||||
- serializedVersion: 3
|
||||
time: 1
|
||||
value: {x: 0.010002136, y: 0.07499695, z: 0.06600003}
|
||||
inSlope: {x: 0, y: 0, z: 0}
|
||||
outSlope: {x: 0, y: 0, z: 0}
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334}
|
||||
outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334}
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
path: apm/AS_Pallet Mover_REDER/Cang
|
||||
m_ScaleCurves: []
|
||||
m_FloatCurves: []
|
||||
m_PPtrCurves: []
|
||||
m_SampleRate: 60
|
||||
m_WrapMode: 0
|
||||
m_Bounds:
|
||||
m_Center: {x: 0, y: 0, z: 0}
|
||||
m_Extent: {x: 0, y: 0, z: 0}
|
||||
m_ClipBindingConstant:
|
||||
genericBindings:
|
||||
- serializedVersion: 2
|
||||
path: 2061375526
|
||||
attribute: 1
|
||||
script: {fileID: 0}
|
||||
typeID: 4
|
||||
customType: 0
|
||||
isPPtrCurve: 0
|
||||
isIntCurve: 0
|
||||
isSerializeReferenceCurve: 0
|
||||
pptrCurveMapping: []
|
||||
m_AnimationClipSettings:
|
||||
serializedVersion: 2
|
||||
m_AdditiveReferencePoseClip: {fileID: 0}
|
||||
m_AdditiveReferencePoseTime: 0
|
||||
m_StartTime: 0
|
||||
m_StopTime: 1
|
||||
m_OrientationOffsetY: 0
|
||||
m_Level: 0
|
||||
m_CycleOffset: 0
|
||||
m_HasAdditiveReferencePose: 0
|
||||
m_LoopTime: 0
|
||||
m_LoopBlend: 0
|
||||
m_LoopBlendOrientation: 0
|
||||
m_LoopBlendPositionY: 0
|
||||
m_LoopBlendPositionXZ: 0
|
||||
m_KeepOriginalOrientation: 0
|
||||
m_KeepOriginalPositionY: 1
|
||||
m_KeepOriginalPositionXZ: 0
|
||||
m_HeightFromFeet: 0
|
||||
m_Mirror: 0
|
||||
m_EditorCurves:
|
||||
- serializedVersion: 2
|
||||
curve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 3
|
||||
time: 0
|
||||
value: 0.010002136
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 136
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
- serializedVersion: 3
|
||||
time: 1
|
||||
value: 0.010002136
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 136
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
attribute: m_LocalPosition.x
|
||||
path: apm/AS_Pallet Mover_REDER/Cang
|
||||
classID: 4
|
||||
script: {fileID: 0}
|
||||
flags: 0
|
||||
- serializedVersion: 2
|
||||
curve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 3
|
||||
time: 0
|
||||
value: 0.07499695
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 136
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
- serializedVersion: 3
|
||||
time: 1
|
||||
value: 0.07499695
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 136
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
attribute: m_LocalPosition.y
|
||||
path: apm/AS_Pallet Mover_REDER/Cang
|
||||
classID: 4
|
||||
script: {fileID: 0}
|
||||
flags: 0
|
||||
- serializedVersion: 2
|
||||
curve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 3
|
||||
time: 0
|
||||
value: 0.166
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 136
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
- serializedVersion: 3
|
||||
time: 1
|
||||
value: 0.06600003
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 136
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
attribute: m_LocalPosition.z
|
||||
path: apm/AS_Pallet Mover_REDER/Cang
|
||||
classID: 4
|
||||
script: {fileID: 0}
|
||||
flags: 0
|
||||
m_EulerEditorCurves: []
|
||||
m_HasGenericRootTransform: 0
|
||||
m_HasMotionFloatCurves: 0
|
||||
m_Events: []
|
||||
8
Assets/Animation/AS_Pallet Mover_REDER/Down.anim.meta
Normal file
8
Assets/Animation/AS_Pallet Mover_REDER/Down.anim.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 921fb7555afa3404eb85240ef95cabd9
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 7400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
53
Assets/Animation/AS_Pallet Mover_REDER/Idle.anim
Normal file
53
Assets/Animation/AS_Pallet Mover_REDER/Idle.anim
Normal file
@@ -0,0 +1,53 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!74 &7400000
|
||||
AnimationClip:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Idle
|
||||
serializedVersion: 7
|
||||
m_Legacy: 0
|
||||
m_Compressed: 0
|
||||
m_UseHighQualityCurve: 1
|
||||
m_RotationCurves: []
|
||||
m_CompressedRotationCurves: []
|
||||
m_EulerCurves: []
|
||||
m_PositionCurves: []
|
||||
m_ScaleCurves: []
|
||||
m_FloatCurves: []
|
||||
m_PPtrCurves: []
|
||||
m_SampleRate: 60
|
||||
m_WrapMode: 0
|
||||
m_Bounds:
|
||||
m_Center: {x: 0, y: 0, z: 0}
|
||||
m_Extent: {x: 0, y: 0, z: 0}
|
||||
m_ClipBindingConstant:
|
||||
genericBindings: []
|
||||
pptrCurveMapping: []
|
||||
m_AnimationClipSettings:
|
||||
serializedVersion: 2
|
||||
m_AdditiveReferencePoseClip: {fileID: 0}
|
||||
m_AdditiveReferencePoseTime: 0
|
||||
m_StartTime: 0
|
||||
m_StopTime: 1
|
||||
m_OrientationOffsetY: 0
|
||||
m_Level: 0
|
||||
m_CycleOffset: 0
|
||||
m_HasAdditiveReferencePose: 0
|
||||
m_LoopTime: 0
|
||||
m_LoopBlend: 0
|
||||
m_LoopBlendOrientation: 0
|
||||
m_LoopBlendPositionY: 0
|
||||
m_LoopBlendPositionXZ: 0
|
||||
m_KeepOriginalOrientation: 0
|
||||
m_KeepOriginalPositionY: 1
|
||||
m_KeepOriginalPositionXZ: 0
|
||||
m_HeightFromFeet: 0
|
||||
m_Mirror: 0
|
||||
m_EditorCurves: []
|
||||
m_EulerEditorCurves: []
|
||||
m_HasGenericRootTransform: 0
|
||||
m_HasMotionFloatCurves: 0
|
||||
m_Events: []
|
||||
8
Assets/Animation/AS_Pallet Mover_REDER/Idle.anim.meta
Normal file
8
Assets/Animation/AS_Pallet Mover_REDER/Idle.anim.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ba367d03abe33d64d86b7a799e109ac1
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 7400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/Animation/AS_Pallet Mover_REDER/PALLET.fbx
Normal file
BIN
Assets/Animation/AS_Pallet Mover_REDER/PALLET.fbx
Normal file
Binary file not shown.
107
Assets/Animation/AS_Pallet Mover_REDER/PALLET.fbx.meta
Normal file
107
Assets/Animation/AS_Pallet Mover_REDER/PALLET.fbx.meta
Normal file
@@ -0,0 +1,107 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f073b7b2fb5237f438bc71f60da90d9a
|
||||
ModelImporter:
|
||||
serializedVersion: 22200
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
materials:
|
||||
materialImportMode: 2
|
||||
materialName: 0
|
||||
materialSearch: 1
|
||||
materialLocation: 1
|
||||
animations:
|
||||
legacyGenerateAnimations: 4
|
||||
bakeSimulation: 0
|
||||
resampleCurves: 1
|
||||
optimizeGameObjects: 0
|
||||
removeConstantScaleCurves: 0
|
||||
motionNodeName:
|
||||
animationImportErrors:
|
||||
animationImportWarnings:
|
||||
animationRetargetingWarnings:
|
||||
animationDoRetargetingWarnings: 0
|
||||
importAnimatedCustomProperties: 0
|
||||
importConstraints: 0
|
||||
animationCompression: 1
|
||||
animationRotationError: 0.5
|
||||
animationPositionError: 0.5
|
||||
animationScaleError: 0.5
|
||||
animationWrapMode: 0
|
||||
extraExposedTransformPaths: []
|
||||
extraUserProperties: []
|
||||
clipAnimations: []
|
||||
isReadable: 0
|
||||
meshes:
|
||||
lODScreenPercentages: []
|
||||
globalScale: 1
|
||||
meshCompression: 0
|
||||
addColliders: 0
|
||||
useSRGBMaterialColor: 1
|
||||
sortHierarchyByName: 1
|
||||
importPhysicalCameras: 1
|
||||
importVisibility: 1
|
||||
importBlendShapes: 1
|
||||
importCameras: 1
|
||||
importLights: 1
|
||||
nodeNameCollisionStrategy: 1
|
||||
fileIdsGeneration: 2
|
||||
swapUVChannels: 0
|
||||
generateSecondaryUV: 0
|
||||
useFileUnits: 1
|
||||
keepQuads: 0
|
||||
weldVertices: 1
|
||||
bakeAxisConversion: 0
|
||||
preserveHierarchy: 0
|
||||
skinWeightsMode: 0
|
||||
maxBonesPerVertex: 4
|
||||
minBoneWeight: 0.001
|
||||
optimizeBones: 1
|
||||
meshOptimizationFlags: -1
|
||||
indexFormat: 0
|
||||
secondaryUVAngleDistortion: 8
|
||||
secondaryUVAreaDistortion: 15.000001
|
||||
secondaryUVHardAngle: 88
|
||||
secondaryUVMarginMethod: 1
|
||||
secondaryUVMinLightmapResolution: 40
|
||||
secondaryUVMinObjectScale: 1
|
||||
secondaryUVPackMargin: 4
|
||||
useFileScale: 1
|
||||
strictVertexDataChecks: 0
|
||||
tangentSpace:
|
||||
normalSmoothAngle: 60
|
||||
normalImportMode: 0
|
||||
tangentImportMode: 3
|
||||
normalCalculationMode: 4
|
||||
legacyComputeAllNormalsFromSmoothingGroupsWhenMeshHasBlendShapes: 0
|
||||
blendShapeNormalImportMode: 1
|
||||
normalSmoothingSource: 0
|
||||
referencedClips: []
|
||||
importAnimation: 1
|
||||
humanDescription:
|
||||
serializedVersion: 3
|
||||
human: []
|
||||
skeleton: []
|
||||
armTwist: 0.5
|
||||
foreArmTwist: 0.5
|
||||
upperLegTwist: 0.5
|
||||
legTwist: 0.5
|
||||
armStretch: 0.05
|
||||
legStretch: 0.05
|
||||
feetSpacing: 0
|
||||
globalScale: 1
|
||||
rootMotionBoneName:
|
||||
hasTranslationDoF: 0
|
||||
hasExtraRoot: 0
|
||||
skeletonHasParents: 1
|
||||
lastHumanDescriptionAvatarSource: {instanceID: 0}
|
||||
autoGenerateAvatarMappingIfUnspecified: 1
|
||||
animationType: 2
|
||||
humanoidOversampling: 1
|
||||
avatarSetup: 0
|
||||
addHumanoidExtraRootOnlyWhenUsingAvatar: 1
|
||||
importBlendShapeDeformPercent: 1
|
||||
remapMaterialsIfMaterialImportModeIsNone: 0
|
||||
additionalBone: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
@@ -0,0 +1,107 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6a61fee325bb27540a987e5fcb532b57
|
||||
ModelImporter:
|
||||
serializedVersion: 22200
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
materials:
|
||||
materialImportMode: 2
|
||||
materialName: 0
|
||||
materialSearch: 1
|
||||
materialLocation: 1
|
||||
animations:
|
||||
legacyGenerateAnimations: 4
|
||||
bakeSimulation: 0
|
||||
resampleCurves: 1
|
||||
optimizeGameObjects: 0
|
||||
removeConstantScaleCurves: 0
|
||||
motionNodeName:
|
||||
animationImportErrors:
|
||||
animationImportWarnings:
|
||||
animationRetargetingWarnings:
|
||||
animationDoRetargetingWarnings: 0
|
||||
importAnimatedCustomProperties: 0
|
||||
importConstraints: 0
|
||||
animationCompression: 1
|
||||
animationRotationError: 0.5
|
||||
animationPositionError: 0.5
|
||||
animationScaleError: 0.5
|
||||
animationWrapMode: 0
|
||||
extraExposedTransformPaths: []
|
||||
extraUserProperties: []
|
||||
clipAnimations: []
|
||||
isReadable: 0
|
||||
meshes:
|
||||
lODScreenPercentages: []
|
||||
globalScale: 1
|
||||
meshCompression: 0
|
||||
addColliders: 0
|
||||
useSRGBMaterialColor: 1
|
||||
sortHierarchyByName: 1
|
||||
importPhysicalCameras: 1
|
||||
importVisibility: 1
|
||||
importBlendShapes: 1
|
||||
importCameras: 1
|
||||
importLights: 1
|
||||
nodeNameCollisionStrategy: 1
|
||||
fileIdsGeneration: 2
|
||||
swapUVChannels: 0
|
||||
generateSecondaryUV: 0
|
||||
useFileUnits: 1
|
||||
keepQuads: 0
|
||||
weldVertices: 1
|
||||
bakeAxisConversion: 0
|
||||
preserveHierarchy: 0
|
||||
skinWeightsMode: 0
|
||||
maxBonesPerVertex: 4
|
||||
minBoneWeight: 0.001
|
||||
optimizeBones: 1
|
||||
meshOptimizationFlags: -1
|
||||
indexFormat: 0
|
||||
secondaryUVAngleDistortion: 8
|
||||
secondaryUVAreaDistortion: 15.000001
|
||||
secondaryUVHardAngle: 88
|
||||
secondaryUVMarginMethod: 1
|
||||
secondaryUVMinLightmapResolution: 40
|
||||
secondaryUVMinObjectScale: 1
|
||||
secondaryUVPackMargin: 4
|
||||
useFileScale: 1
|
||||
strictVertexDataChecks: 0
|
||||
tangentSpace:
|
||||
normalSmoothAngle: 60
|
||||
normalImportMode: 0
|
||||
tangentImportMode: 3
|
||||
normalCalculationMode: 4
|
||||
legacyComputeAllNormalsFromSmoothingGroupsWhenMeshHasBlendShapes: 0
|
||||
blendShapeNormalImportMode: 1
|
||||
normalSmoothingSource: 0
|
||||
referencedClips: []
|
||||
importAnimation: 1
|
||||
humanDescription:
|
||||
serializedVersion: 3
|
||||
human: []
|
||||
skeleton: []
|
||||
armTwist: 0.5
|
||||
foreArmTwist: 0.5
|
||||
upperLegTwist: 0.5
|
||||
legTwist: 0.5
|
||||
armStretch: 0.05
|
||||
legStretch: 0.05
|
||||
feetSpacing: 0
|
||||
globalScale: 1
|
||||
rootMotionBoneName:
|
||||
hasTranslationDoF: 0
|
||||
hasExtraRoot: 0
|
||||
skeletonHasParents: 1
|
||||
lastHumanDescriptionAvatarSource: {instanceID: 0}
|
||||
autoGenerateAvatarMappingIfUnspecified: 1
|
||||
animationType: 2
|
||||
humanoidOversampling: 1
|
||||
avatarSetup: 0
|
||||
addHumanoidExtraRootOnlyWhenUsingAvatar: 1
|
||||
importBlendShapeDeformPercent: 1
|
||||
remapMaterialsIfMaterialImportModeIsNone: 0
|
||||
additionalBone: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
177
Assets/Animation/AS_Pallet Mover_REDER/Up.anim
Normal file
177
Assets/Animation/AS_Pallet Mover_REDER/Up.anim
Normal file
@@ -0,0 +1,177 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!74 &7400000
|
||||
AnimationClip:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Up
|
||||
serializedVersion: 7
|
||||
m_Legacy: 0
|
||||
m_Compressed: 0
|
||||
m_UseHighQualityCurve: 1
|
||||
m_RotationCurves: []
|
||||
m_CompressedRotationCurves: []
|
||||
m_EulerCurves: []
|
||||
m_PositionCurves:
|
||||
- curve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 3
|
||||
time: 0
|
||||
value: {x: 0.010002136, y: 0.07499695, z: 0.06600003}
|
||||
inSlope: {x: 0, y: 0, z: 0}
|
||||
outSlope: {x: 0, y: 0, z: 0}
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334}
|
||||
outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334}
|
||||
- serializedVersion: 3
|
||||
time: 1
|
||||
value: {x: 0.010002136, y: 0.07499695, z: 0.166}
|
||||
inSlope: {x: 0, y: 0, z: 0}
|
||||
outSlope: {x: 0, y: 0, z: 0}
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334}
|
||||
outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334}
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
path: apm/AS_Pallet Mover_REDER/Cang
|
||||
m_ScaleCurves: []
|
||||
m_FloatCurves: []
|
||||
m_PPtrCurves: []
|
||||
m_SampleRate: 60
|
||||
m_WrapMode: 0
|
||||
m_Bounds:
|
||||
m_Center: {x: 0, y: 0, z: 0}
|
||||
m_Extent: {x: 0, y: 0, z: 0}
|
||||
m_ClipBindingConstant:
|
||||
genericBindings:
|
||||
- serializedVersion: 2
|
||||
path: 2061375526
|
||||
attribute: 1
|
||||
script: {fileID: 0}
|
||||
typeID: 4
|
||||
customType: 0
|
||||
isPPtrCurve: 0
|
||||
isIntCurve: 0
|
||||
isSerializeReferenceCurve: 0
|
||||
pptrCurveMapping: []
|
||||
m_AnimationClipSettings:
|
||||
serializedVersion: 2
|
||||
m_AdditiveReferencePoseClip: {fileID: 0}
|
||||
m_AdditiveReferencePoseTime: 0
|
||||
m_StartTime: 0
|
||||
m_StopTime: 1
|
||||
m_OrientationOffsetY: 0
|
||||
m_Level: 0
|
||||
m_CycleOffset: 0
|
||||
m_HasAdditiveReferencePose: 0
|
||||
m_LoopTime: 0
|
||||
m_LoopBlend: 0
|
||||
m_LoopBlendOrientation: 0
|
||||
m_LoopBlendPositionY: 0
|
||||
m_LoopBlendPositionXZ: 0
|
||||
m_KeepOriginalOrientation: 0
|
||||
m_KeepOriginalPositionY: 1
|
||||
m_KeepOriginalPositionXZ: 0
|
||||
m_HeightFromFeet: 0
|
||||
m_Mirror: 0
|
||||
m_EditorCurves:
|
||||
- serializedVersion: 2
|
||||
curve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 3
|
||||
time: 0
|
||||
value: 0.010002136
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 136
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
- serializedVersion: 3
|
||||
time: 1
|
||||
value: 0.010002136
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 136
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
attribute: m_LocalPosition.x
|
||||
path: apm/AS_Pallet Mover_REDER/Cang
|
||||
classID: 4
|
||||
script: {fileID: 0}
|
||||
flags: 0
|
||||
- serializedVersion: 2
|
||||
curve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 3
|
||||
time: 0
|
||||
value: 0.07499695
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 136
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
- serializedVersion: 3
|
||||
time: 1
|
||||
value: 0.07499695
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 136
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
attribute: m_LocalPosition.y
|
||||
path: apm/AS_Pallet Mover_REDER/Cang
|
||||
classID: 4
|
||||
script: {fileID: 0}
|
||||
flags: 0
|
||||
- serializedVersion: 2
|
||||
curve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 3
|
||||
time: 0
|
||||
value: 0.06600003
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 136
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
- serializedVersion: 3
|
||||
time: 1
|
||||
value: 0.166
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 136
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
attribute: m_LocalPosition.z
|
||||
path: apm/AS_Pallet Mover_REDER/Cang
|
||||
classID: 4
|
||||
script: {fileID: 0}
|
||||
flags: 0
|
||||
m_EulerEditorCurves: []
|
||||
m_HasGenericRootTransform: 0
|
||||
m_HasMotionFloatCurves: 0
|
||||
m_Events: []
|
||||
8
Assets/Animation/AS_Pallet Mover_REDER/Up.anim.meta
Normal file
8
Assets/Animation/AS_Pallet Mover_REDER/Up.anim.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5560aeabbd3e4234cafa865c49cfd380
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 7400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/Animation/AS_Pallet Mover_REDER/apm.fbx
Normal file
BIN
Assets/Animation/AS_Pallet Mover_REDER/apm.fbx
Normal file
Binary file not shown.
107
Assets/Animation/AS_Pallet Mover_REDER/apm.fbx.meta
Normal file
107
Assets/Animation/AS_Pallet Mover_REDER/apm.fbx.meta
Normal file
@@ -0,0 +1,107 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 997c6c45ab63af7479af35f0f815858e
|
||||
ModelImporter:
|
||||
serializedVersion: 22200
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
materials:
|
||||
materialImportMode: 2
|
||||
materialName: 0
|
||||
materialSearch: 1
|
||||
materialLocation: 1
|
||||
animations:
|
||||
legacyGenerateAnimations: 4
|
||||
bakeSimulation: 0
|
||||
resampleCurves: 1
|
||||
optimizeGameObjects: 0
|
||||
removeConstantScaleCurves: 0
|
||||
motionNodeName:
|
||||
animationImportErrors:
|
||||
animationImportWarnings:
|
||||
animationRetargetingWarnings:
|
||||
animationDoRetargetingWarnings: 0
|
||||
importAnimatedCustomProperties: 0
|
||||
importConstraints: 0
|
||||
animationCompression: 1
|
||||
animationRotationError: 0.5
|
||||
animationPositionError: 0.5
|
||||
animationScaleError: 0.5
|
||||
animationWrapMode: 0
|
||||
extraExposedTransformPaths: []
|
||||
extraUserProperties: []
|
||||
clipAnimations: []
|
||||
isReadable: 0
|
||||
meshes:
|
||||
lODScreenPercentages: []
|
||||
globalScale: 1
|
||||
meshCompression: 0
|
||||
addColliders: 0
|
||||
useSRGBMaterialColor: 1
|
||||
sortHierarchyByName: 1
|
||||
importPhysicalCameras: 1
|
||||
importVisibility: 1
|
||||
importBlendShapes: 1
|
||||
importCameras: 1
|
||||
importLights: 1
|
||||
nodeNameCollisionStrategy: 1
|
||||
fileIdsGeneration: 2
|
||||
swapUVChannels: 0
|
||||
generateSecondaryUV: 0
|
||||
useFileUnits: 1
|
||||
keepQuads: 0
|
||||
weldVertices: 1
|
||||
bakeAxisConversion: 0
|
||||
preserveHierarchy: 0
|
||||
skinWeightsMode: 0
|
||||
maxBonesPerVertex: 4
|
||||
minBoneWeight: 0.001
|
||||
optimizeBones: 1
|
||||
meshOptimizationFlags: -1
|
||||
indexFormat: 0
|
||||
secondaryUVAngleDistortion: 8
|
||||
secondaryUVAreaDistortion: 15.000001
|
||||
secondaryUVHardAngle: 88
|
||||
secondaryUVMarginMethod: 1
|
||||
secondaryUVMinLightmapResolution: 40
|
||||
secondaryUVMinObjectScale: 1
|
||||
secondaryUVPackMargin: 4
|
||||
useFileScale: 1
|
||||
strictVertexDataChecks: 0
|
||||
tangentSpace:
|
||||
normalSmoothAngle: 60
|
||||
normalImportMode: 0
|
||||
tangentImportMode: 3
|
||||
normalCalculationMode: 4
|
||||
legacyComputeAllNormalsFromSmoothingGroupsWhenMeshHasBlendShapes: 0
|
||||
blendShapeNormalImportMode: 1
|
||||
normalSmoothingSource: 0
|
||||
referencedClips: []
|
||||
importAnimation: 1
|
||||
humanDescription:
|
||||
serializedVersion: 3
|
||||
human: []
|
||||
skeleton: []
|
||||
armTwist: 0.5
|
||||
foreArmTwist: 0.5
|
||||
upperLegTwist: 0.5
|
||||
legTwist: 0.5
|
||||
armStretch: 0.05
|
||||
legStretch: 0.05
|
||||
feetSpacing: 0
|
||||
globalScale: 1
|
||||
rootMotionBoneName:
|
||||
hasTranslationDoF: 0
|
||||
hasExtraRoot: 0
|
||||
skeletonHasParents: 1
|
||||
lastHumanDescriptionAvatarSource: {instanceID: 0}
|
||||
autoGenerateAvatarMappingIfUnspecified: 1
|
||||
animationType: 2
|
||||
humanoidOversampling: 1
|
||||
avatarSetup: 0
|
||||
addHumanoidExtraRootOnlyWhenUsingAvatar: 1
|
||||
importBlendShapeDeformPercent: 1
|
||||
remapMaterialsIfMaterialImportModeIsNone: 0
|
||||
additionalBone: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
8
Assets/Materials.meta
Normal file
8
Assets/Materials.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4e3268ad8fb10cf4a9d6f0f9c09150fe
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
84
Assets/Materials/New Material.mat
Normal file
84
Assets/Materials/New Material.mat
Normal file
@@ -0,0 +1,84 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: New Material
|
||||
m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_Parent: {fileID: 0}
|
||||
m_ModifiedSerializedProperties: 0
|
||||
m_ValidKeywords: []
|
||||
m_InvalidKeywords: []
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
disabledShaderPasses: []
|
||||
m_LockedProperties:
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _BumpMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailAlbedoMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailMask:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailNormalMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _EmissionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MetallicGlossMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _OcclusionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _ParallaxMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _BumpScale: 1
|
||||
- _Cutoff: 0.5
|
||||
- _DetailNormalMapScale: 1
|
||||
- _DstBlend: 0
|
||||
- _GlossMapScale: 1
|
||||
- _Glossiness: 0.5
|
||||
- _GlossyReflections: 1
|
||||
- _Metallic: 0
|
||||
- _Mode: 0
|
||||
- _OcclusionStrength: 1
|
||||
- _Parallax: 0.02
|
||||
- _SmoothnessTextureChannel: 0
|
||||
- _SpecularHighlights: 1
|
||||
- _SrcBlend: 1
|
||||
- _UVSec: 0
|
||||
- _ZWrite: 1
|
||||
m_Colors:
|
||||
- _Color: {r: 0.19406372, g: 0.2784314, b: 0.8396226, a: 1}
|
||||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
m_BuildTextureStacks: []
|
||||
m_AllowLocking: 1
|
||||
8
Assets/Materials/New Material.mat.meta
Normal file
8
Assets/Materials/New Material.mat.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 000d022961a6e2545bb4e9ab1c88ca78
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 2100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
8
Assets/Prefabs.meta
Normal file
8
Assets/Prefabs.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 929691dbc15f1d34bbd5d0303ec3f811
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/Prefabs/100625- AMR- T800.fbx
Normal file
BIN
Assets/Prefabs/100625- AMR- T800.fbx
Normal file
Binary file not shown.
107
Assets/Prefabs/100625- AMR- T800.fbx.meta
Normal file
107
Assets/Prefabs/100625- AMR- T800.fbx.meta
Normal file
@@ -0,0 +1,107 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1d3babf46a1b9ff44aa2d05560938fe4
|
||||
ModelImporter:
|
||||
serializedVersion: 22200
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
materials:
|
||||
materialImportMode: 2
|
||||
materialName: 0
|
||||
materialSearch: 1
|
||||
materialLocation: 1
|
||||
animations:
|
||||
legacyGenerateAnimations: 4
|
||||
bakeSimulation: 0
|
||||
resampleCurves: 1
|
||||
optimizeGameObjects: 0
|
||||
removeConstantScaleCurves: 0
|
||||
motionNodeName:
|
||||
animationImportErrors:
|
||||
animationImportWarnings:
|
||||
animationRetargetingWarnings:
|
||||
animationDoRetargetingWarnings: 0
|
||||
importAnimatedCustomProperties: 0
|
||||
importConstraints: 0
|
||||
animationCompression: 1
|
||||
animationRotationError: 0.5
|
||||
animationPositionError: 0.5
|
||||
animationScaleError: 0.5
|
||||
animationWrapMode: 0
|
||||
extraExposedTransformPaths: []
|
||||
extraUserProperties: []
|
||||
clipAnimations: []
|
||||
isReadable: 0
|
||||
meshes:
|
||||
lODScreenPercentages: []
|
||||
globalScale: 1
|
||||
meshCompression: 0
|
||||
addColliders: 0
|
||||
useSRGBMaterialColor: 1
|
||||
sortHierarchyByName: 1
|
||||
importPhysicalCameras: 1
|
||||
importVisibility: 1
|
||||
importBlendShapes: 1
|
||||
importCameras: 1
|
||||
importLights: 1
|
||||
nodeNameCollisionStrategy: 1
|
||||
fileIdsGeneration: 2
|
||||
swapUVChannels: 0
|
||||
generateSecondaryUV: 0
|
||||
useFileUnits: 1
|
||||
keepQuads: 0
|
||||
weldVertices: 1
|
||||
bakeAxisConversion: 0
|
||||
preserveHierarchy: 0
|
||||
skinWeightsMode: 0
|
||||
maxBonesPerVertex: 4
|
||||
minBoneWeight: 0.001
|
||||
optimizeBones: 1
|
||||
meshOptimizationFlags: -1
|
||||
indexFormat: 0
|
||||
secondaryUVAngleDistortion: 8
|
||||
secondaryUVAreaDistortion: 15.000001
|
||||
secondaryUVHardAngle: 88
|
||||
secondaryUVMarginMethod: 1
|
||||
secondaryUVMinLightmapResolution: 40
|
||||
secondaryUVMinObjectScale: 1
|
||||
secondaryUVPackMargin: 4
|
||||
useFileScale: 1
|
||||
strictVertexDataChecks: 0
|
||||
tangentSpace:
|
||||
normalSmoothAngle: 60
|
||||
normalImportMode: 0
|
||||
tangentImportMode: 3
|
||||
normalCalculationMode: 4
|
||||
legacyComputeAllNormalsFromSmoothingGroupsWhenMeshHasBlendShapes: 0
|
||||
blendShapeNormalImportMode: 1
|
||||
normalSmoothingSource: 0
|
||||
referencedClips: []
|
||||
importAnimation: 1
|
||||
humanDescription:
|
||||
serializedVersion: 3
|
||||
human: []
|
||||
skeleton: []
|
||||
armTwist: 0.5
|
||||
foreArmTwist: 0.5
|
||||
upperLegTwist: 0.5
|
||||
legTwist: 0.5
|
||||
armStretch: 0.05
|
||||
legStretch: 0.05
|
||||
feetSpacing: 0
|
||||
globalScale: 1
|
||||
rootMotionBoneName:
|
||||
hasTranslationDoF: 0
|
||||
hasExtraRoot: 0
|
||||
skeletonHasParents: 1
|
||||
lastHumanDescriptionAvatarSource: {instanceID: 0}
|
||||
autoGenerateAvatarMappingIfUnspecified: 1
|
||||
animationType: 2
|
||||
humanoidOversampling: 1
|
||||
avatarSetup: 0
|
||||
addHumanoidExtraRootOnlyWhenUsingAvatar: 1
|
||||
importBlendShapeDeformPercent: 1
|
||||
remapMaterialsIfMaterialImportModeIsNone: 0
|
||||
additionalBone: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/Prefabs/5-AS-Khung xe hang.fbx
Normal file
BIN
Assets/Prefabs/5-AS-Khung xe hang.fbx
Normal file
Binary file not shown.
107
Assets/Prefabs/5-AS-Khung xe hang.fbx.meta
Normal file
107
Assets/Prefabs/5-AS-Khung xe hang.fbx.meta
Normal file
@@ -0,0 +1,107 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 83828c2a61b28194c990f41b8a19538a
|
||||
ModelImporter:
|
||||
serializedVersion: 22200
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
materials:
|
||||
materialImportMode: 2
|
||||
materialName: 0
|
||||
materialSearch: 1
|
||||
materialLocation: 1
|
||||
animations:
|
||||
legacyGenerateAnimations: 4
|
||||
bakeSimulation: 0
|
||||
resampleCurves: 1
|
||||
optimizeGameObjects: 0
|
||||
removeConstantScaleCurves: 0
|
||||
motionNodeName:
|
||||
animationImportErrors:
|
||||
animationImportWarnings:
|
||||
animationRetargetingWarnings:
|
||||
animationDoRetargetingWarnings: 0
|
||||
importAnimatedCustomProperties: 0
|
||||
importConstraints: 0
|
||||
animationCompression: 1
|
||||
animationRotationError: 0.5
|
||||
animationPositionError: 0.5
|
||||
animationScaleError: 0.5
|
||||
animationWrapMode: 0
|
||||
extraExposedTransformPaths: []
|
||||
extraUserProperties: []
|
||||
clipAnimations: []
|
||||
isReadable: 0
|
||||
meshes:
|
||||
lODScreenPercentages: []
|
||||
globalScale: 1
|
||||
meshCompression: 0
|
||||
addColliders: 0
|
||||
useSRGBMaterialColor: 1
|
||||
sortHierarchyByName: 1
|
||||
importPhysicalCameras: 1
|
||||
importVisibility: 1
|
||||
importBlendShapes: 1
|
||||
importCameras: 1
|
||||
importLights: 1
|
||||
nodeNameCollisionStrategy: 1
|
||||
fileIdsGeneration: 2
|
||||
swapUVChannels: 0
|
||||
generateSecondaryUV: 0
|
||||
useFileUnits: 1
|
||||
keepQuads: 0
|
||||
weldVertices: 1
|
||||
bakeAxisConversion: 0
|
||||
preserveHierarchy: 0
|
||||
skinWeightsMode: 0
|
||||
maxBonesPerVertex: 4
|
||||
minBoneWeight: 0.001
|
||||
optimizeBones: 1
|
||||
meshOptimizationFlags: -1
|
||||
indexFormat: 0
|
||||
secondaryUVAngleDistortion: 8
|
||||
secondaryUVAreaDistortion: 15.000001
|
||||
secondaryUVHardAngle: 88
|
||||
secondaryUVMarginMethod: 1
|
||||
secondaryUVMinLightmapResolution: 40
|
||||
secondaryUVMinObjectScale: 1
|
||||
secondaryUVPackMargin: 4
|
||||
useFileScale: 1
|
||||
strictVertexDataChecks: 0
|
||||
tangentSpace:
|
||||
normalSmoothAngle: 60
|
||||
normalImportMode: 0
|
||||
tangentImportMode: 3
|
||||
normalCalculationMode: 4
|
||||
legacyComputeAllNormalsFromSmoothingGroupsWhenMeshHasBlendShapes: 0
|
||||
blendShapeNormalImportMode: 1
|
||||
normalSmoothingSource: 0
|
||||
referencedClips: []
|
||||
importAnimation: 1
|
||||
humanDescription:
|
||||
serializedVersion: 3
|
||||
human: []
|
||||
skeleton: []
|
||||
armTwist: 0.5
|
||||
foreArmTwist: 0.5
|
||||
upperLegTwist: 0.5
|
||||
legTwist: 0.5
|
||||
armStretch: 0.05
|
||||
legStretch: 0.05
|
||||
feetSpacing: 0
|
||||
globalScale: 1
|
||||
rootMotionBoneName:
|
||||
hasTranslationDoF: 0
|
||||
hasExtraRoot: 0
|
||||
skeletonHasParents: 1
|
||||
lastHumanDescriptionAvatarSource: {instanceID: 0}
|
||||
autoGenerateAvatarMappingIfUnspecified: 1
|
||||
animationType: 2
|
||||
humanoidOversampling: 1
|
||||
avatarSetup: 0
|
||||
addHumanoidExtraRootOnlyWhenUsingAvatar: 1
|
||||
importBlendShapeDeformPercent: 1
|
||||
remapMaterialsIfMaterialImportModeIsNone: 0
|
||||
additionalBone: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
8
Assets/Prefabs/A.meta
Normal file
8
Assets/Prefabs/A.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 594b07692d52d0c4f9b8a0c4ee2855a4
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
151897
Assets/Prefabs/A/APM-S A.prefab
Normal file
151897
Assets/Prefabs/A/APM-S A.prefab
Normal file
File diff suppressed because it is too large
Load Diff
7
Assets/Prefabs/A/APM-S A.prefab.meta
Normal file
7
Assets/Prefabs/A/APM-S A.prefab.meta
Normal file
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2d140ff061d6b3843b5464eb31866110
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
6716
Assets/Prefabs/A/Pallet cua.prefab
Normal file
6716
Assets/Prefabs/A/Pallet cua.prefab
Normal file
File diff suppressed because it is too large
Load Diff
7
Assets/Prefabs/A/Pallet cua.prefab.meta
Normal file
7
Assets/Prefabs/A/Pallet cua.prefab.meta
Normal file
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 009c863120840004fac04906da154a8c
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
6716
Assets/Prefabs/A/Pallet trong xuong.prefab
Normal file
6716
Assets/Prefabs/A/Pallet trong xuong.prefab
Normal file
File diff suppressed because it is too large
Load Diff
7
Assets/Prefabs/A/Pallet trong xuong.prefab.meta
Normal file
7
Assets/Prefabs/A/Pallet trong xuong.prefab.meta
Normal file
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: bb52e847e6e640648b9a2208d50845f9
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
399
Assets/Prefabs/AMR-T800.prefab
Normal file
399
Assets/Prefabs/AMR-T800.prefab
Normal file
@@ -0,0 +1,399 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &113424409668417520
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 794420046749949697}
|
||||
- component: {fileID: 5100650103626715744}
|
||||
- component: {fileID: 1676411897257597059}
|
||||
- component: {fileID: 2175296086260931639}
|
||||
- component: {fileID: 8058726928422323976}
|
||||
- component: {fileID: 6481068713836387909}
|
||||
m_Layer: 0
|
||||
m_Name: AMR-T800
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &794420046749949697
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 113424409668417520}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 23, y: 0, z: 20}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 1275169966560626932}
|
||||
- {fileID: 3490155187318793992}
|
||||
- {fileID: 3904258127586229082}
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &5100650103626715744
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 113424409668417520}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: b3ef713dec000114695d1df96efa8e36, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
defaultSpeed: 1
|
||||
trajectoryResolution: 50
|
||||
lineMaterial: {fileID: 0}
|
||||
nodeMaterial: {fileID: 0}
|
||||
mqttBroker: 10.70.21.5
|
||||
mqttPort: 1885
|
||||
mqttUsername: robotics
|
||||
mqttPassword: robotics
|
||||
agvId: APM-S
|
||||
mqttClientId: APM-S
|
||||
visualizationUpdateInterval: 0.1
|
||||
checkPalletRadius: 2
|
||||
checkPalletMaxDistance: -1.5
|
||||
checkPalletTargetMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
isDebuggingPalletCheck: 0
|
||||
--- !u!114 &1676411897257597059
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 113424409668417520}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 2a549a9912ffa1f4b9d7e5cade52a964, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!114 &2175296086260931639
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 113424409668417520}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 17549d08c68a63646b3568dd46f952a2, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
pallet: {fileID: 0}
|
||||
fork: {fileID: 794420046749949697}
|
||||
--- !u!114 &8058726928422323976
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 113424409668417520}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 73fb5f1bf8e3fd341baf281a45510492, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
positionText: {fileID: 0}
|
||||
--- !u!95 &6481068713836387909
|
||||
Animator:
|
||||
serializedVersion: 7
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 113424409668417520}
|
||||
m_Enabled: 1
|
||||
m_Avatar: {fileID: 0}
|
||||
m_Controller: {fileID: 9100000, guid: 0a2113b91b364dc49b71d971ca36da66, type: 2}
|
||||
m_CullingMode: 0
|
||||
m_UpdateMode: 0
|
||||
m_ApplyRootMotion: 0
|
||||
m_LinearVelocityBlending: 0
|
||||
m_StabilizeFeet: 0
|
||||
m_AnimatePhysics: 0
|
||||
m_WarningMessage:
|
||||
m_HasTransformHierarchy: 1
|
||||
m_AllowConstantClipSamplingOptimization: 1
|
||||
m_KeepAnimatorStateOnDisable: 0
|
||||
m_WriteDefaultValuesOnDisable: 0
|
||||
--- !u!1 &5135170904469664278
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 3904258127586229082}
|
||||
- component: {fileID: 1115323965773282183}
|
||||
m_Layer: 0
|
||||
m_Name: Default Camera 1
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &3904258127586229082
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5135170904469664278}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0.0805092, y: -0.74007905, z: 0.09006171, w: 0.66158164}
|
||||
m_LocalPosition: {x: 3, y: 1.08, z: 0.07999992}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 794420046749949697}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!20 &1115323965773282183
|
||||
Camera:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5135170904469664278}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 2
|
||||
m_ClearFlags: 1
|
||||
m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0}
|
||||
m_projectionMatrixMode: 1
|
||||
m_GateFitMode: 0
|
||||
m_FOVAxisMode: 0
|
||||
m_Iso: 200
|
||||
m_ShutterSpeed: 0.005
|
||||
m_Aperture: 16
|
||||
m_FocusDistance: 200
|
||||
m_FocalLength: 34.893276
|
||||
m_BladeCount: 5
|
||||
m_Curvature: {x: 2, y: 11}
|
||||
m_BarrelClipping: 0.25
|
||||
m_Anamorphism: 0
|
||||
m_SensorSize: {x: 20.726398, y: 15.5448}
|
||||
m_LensShift: {x: 0, y: 0}
|
||||
m_NormalizedViewPortRect:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 0
|
||||
width: 1
|
||||
height: 1
|
||||
near clip plane: 0.01
|
||||
far clip plane: 4000
|
||||
field of view: 30
|
||||
orthographic: 0
|
||||
orthographic size: 5
|
||||
m_Depth: 0
|
||||
m_CullingMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_RenderingPath: -1
|
||||
m_TargetTexture: {fileID: 0}
|
||||
m_TargetDisplay: 0
|
||||
m_TargetEye: 3
|
||||
m_HDR: 1
|
||||
m_AllowMSAA: 1
|
||||
m_AllowDynamicResolution: 0
|
||||
m_ForceIntoRT: 0
|
||||
m_OcclusionCulling: 1
|
||||
m_StereoConvergence: 10
|
||||
m_StereoSeparation: 0.022
|
||||
--- !u!1001 &1601286031639490335
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
serializedVersion: 3
|
||||
m_TransformParent: {fileID: 794420046749949697}
|
||||
m_Modifications:
|
||||
- target: {fileID: -8679921383154817045, guid: ef53186adc4b65e4fb117b1435d04624, type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -8679921383154817045, guid: ef53186adc4b65e4fb117b1435d04624, type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: 0.129
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -8679921383154817045, guid: ef53186adc4b65e4fb117b1435d04624, type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -8679921383154817045, guid: ef53186adc4b65e4fb117b1435d04624, type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 0.7071068
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -8679921383154817045, guid: ef53186adc4b65e4fb117b1435d04624, type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: -0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -8679921383154817045, guid: ef53186adc4b65e4fb117b1435d04624, type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: 0.7071068
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -8679921383154817045, guid: ef53186adc4b65e4fb117b1435d04624, type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: -0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -8679921383154817045, guid: ef53186adc4b65e4fb117b1435d04624, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -8679921383154817045, guid: ef53186adc4b65e4fb117b1435d04624, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.y
|
||||
value: 90
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -8679921383154817045, guid: ef53186adc4b65e4fb117b1435d04624, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 919132149155446097, guid: ef53186adc4b65e4fb117b1435d04624, type: 3}
|
||||
propertyPath: m_Name
|
||||
value: CUMNANG
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_RemovedGameObjects:
|
||||
- {fileID: -1816321389757114584, guid: ef53186adc4b65e4fb117b1435d04624, type: 3}
|
||||
m_AddedGameObjects: []
|
||||
m_AddedComponents:
|
||||
- targetCorrespondingSourceObject: {fileID: 919132149155446097, guid: ef53186adc4b65e4fb117b1435d04624, type: 3}
|
||||
insertIndex: -1
|
||||
addedObject: {fileID: 4745834940073507528}
|
||||
- targetCorrespondingSourceObject: {fileID: 919132149155446097, guid: ef53186adc4b65e4fb117b1435d04624, type: 3}
|
||||
insertIndex: -1
|
||||
addedObject: {fileID: 7345979145353912115}
|
||||
m_SourcePrefab: {fileID: 100100000, guid: ef53186adc4b65e4fb117b1435d04624, type: 3}
|
||||
--- !u!4 &1275169966560626932 stripped
|
||||
Transform:
|
||||
m_CorrespondingSourceObject: {fileID: -8679921383154817045, guid: ef53186adc4b65e4fb117b1435d04624, type: 3}
|
||||
m_PrefabInstance: {fileID: 1601286031639490335}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!1 &1943726519237448270 stripped
|
||||
GameObject:
|
||||
m_CorrespondingSourceObject: {fileID: 919132149155446097, guid: ef53186adc4b65e4fb117b1435d04624, type: 3}
|
||||
m_PrefabInstance: {fileID: 1601286031639490335}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!65 &4745834940073507528
|
||||
BoxCollider:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1943726519237448270}
|
||||
m_Material: {fileID: 0}
|
||||
m_IncludeLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 0
|
||||
m_ExcludeLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 0
|
||||
m_LayerOverridePriority: 0
|
||||
m_IsTrigger: 0
|
||||
m_ProvidesContacts: 0
|
||||
m_Enabled: 1
|
||||
serializedVersion: 3
|
||||
m_Size: {x: 0.95, y: 0.05, z: 1.15}
|
||||
m_Center: {x: 0, y: 0.12, z: 0}
|
||||
--- !u!54 &7345979145353912115
|
||||
Rigidbody:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1943726519237448270}
|
||||
serializedVersion: 4
|
||||
m_Mass: 1
|
||||
m_Drag: 0
|
||||
m_AngularDrag: 0.05
|
||||
m_CenterOfMass: {x: 0, y: 0, z: 0}
|
||||
m_InertiaTensor: {x: 1, y: 1, z: 1}
|
||||
m_InertiaRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_IncludeLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 0
|
||||
m_ExcludeLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 0
|
||||
m_ImplicitCom: 1
|
||||
m_ImplicitTensor: 1
|
||||
m_UseGravity: 0
|
||||
m_IsKinematic: 1
|
||||
m_Interpolate: 0
|
||||
m_Constraints: 0
|
||||
m_CollisionDetection: 0
|
||||
--- !u!1001 &4027692356431167715
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
serializedVersion: 3
|
||||
m_TransformParent: {fileID: 794420046749949697}
|
||||
m_Modifications:
|
||||
- target: {fileID: -8679921383154817045, guid: 5d00b4ae2e19cce44b8a1a61c1e54786, type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -8679921383154817045, guid: 5d00b4ae2e19cce44b8a1a61c1e54786, type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: 0.124
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -8679921383154817045, guid: 5d00b4ae2e19cce44b8a1a61c1e54786, type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -8679921383154817045, guid: 5d00b4ae2e19cce44b8a1a61c1e54786, type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 0.7071068
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -8679921383154817045, guid: 5d00b4ae2e19cce44b8a1a61c1e54786, type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: -0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -8679921383154817045, guid: 5d00b4ae2e19cce44b8a1a61c1e54786, type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: 0.7071068
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -8679921383154817045, guid: 5d00b4ae2e19cce44b8a1a61c1e54786, type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: -0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -8679921383154817045, guid: 5d00b4ae2e19cce44b8a1a61c1e54786, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -8679921383154817045, guid: 5d00b4ae2e19cce44b8a1a61c1e54786, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.y
|
||||
value: 90
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -8679921383154817045, guid: 5d00b4ae2e19cce44b8a1a61c1e54786, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 919132149155446097, guid: 5d00b4ae2e19cce44b8a1a61c1e54786, type: 3}
|
||||
propertyPath: m_Name
|
||||
value: AMR
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_RemovedGameObjects:
|
||||
- {fileID: -1816321389757114584, guid: 5d00b4ae2e19cce44b8a1a61c1e54786, type: 3}
|
||||
m_AddedGameObjects: []
|
||||
m_AddedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: 5d00b4ae2e19cce44b8a1a61c1e54786, type: 3}
|
||||
--- !u!4 &3490155187318793992 stripped
|
||||
Transform:
|
||||
m_CorrespondingSourceObject: {fileID: -8679921383154817045, guid: 5d00b4ae2e19cce44b8a1a61c1e54786, type: 3}
|
||||
m_PrefabInstance: {fileID: 4027692356431167715}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
7
Assets/Prefabs/AMR-T800.prefab.meta
Normal file
7
Assets/Prefabs/AMR-T800.prefab.meta
Normal file
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e3ca18cd83182b646b0f57f306194a51
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/Prefabs/AMR.fbx
Normal file
BIN
Assets/Prefabs/AMR.fbx
Normal file
Binary file not shown.
107
Assets/Prefabs/AMR.fbx.meta
Normal file
107
Assets/Prefabs/AMR.fbx.meta
Normal file
@@ -0,0 +1,107 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5d00b4ae2e19cce44b8a1a61c1e54786
|
||||
ModelImporter:
|
||||
serializedVersion: 22200
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
materials:
|
||||
materialImportMode: 2
|
||||
materialName: 0
|
||||
materialSearch: 1
|
||||
materialLocation: 1
|
||||
animations:
|
||||
legacyGenerateAnimations: 4
|
||||
bakeSimulation: 0
|
||||
resampleCurves: 1
|
||||
optimizeGameObjects: 0
|
||||
removeConstantScaleCurves: 0
|
||||
motionNodeName:
|
||||
animationImportErrors:
|
||||
animationImportWarnings:
|
||||
animationRetargetingWarnings:
|
||||
animationDoRetargetingWarnings: 0
|
||||
importAnimatedCustomProperties: 0
|
||||
importConstraints: 0
|
||||
animationCompression: 1
|
||||
animationRotationError: 0.5
|
||||
animationPositionError: 0.5
|
||||
animationScaleError: 0.5
|
||||
animationWrapMode: 0
|
||||
extraExposedTransformPaths: []
|
||||
extraUserProperties: []
|
||||
clipAnimations: []
|
||||
isReadable: 0
|
||||
meshes:
|
||||
lODScreenPercentages: []
|
||||
globalScale: 1
|
||||
meshCompression: 0
|
||||
addColliders: 0
|
||||
useSRGBMaterialColor: 1
|
||||
sortHierarchyByName: 1
|
||||
importPhysicalCameras: 1
|
||||
importVisibility: 1
|
||||
importBlendShapes: 1
|
||||
importCameras: 1
|
||||
importLights: 1
|
||||
nodeNameCollisionStrategy: 1
|
||||
fileIdsGeneration: 2
|
||||
swapUVChannels: 0
|
||||
generateSecondaryUV: 0
|
||||
useFileUnits: 1
|
||||
keepQuads: 0
|
||||
weldVertices: 1
|
||||
bakeAxisConversion: 0
|
||||
preserveHierarchy: 0
|
||||
skinWeightsMode: 0
|
||||
maxBonesPerVertex: 4
|
||||
minBoneWeight: 0.001
|
||||
optimizeBones: 1
|
||||
meshOptimizationFlags: -1
|
||||
indexFormat: 0
|
||||
secondaryUVAngleDistortion: 8
|
||||
secondaryUVAreaDistortion: 15.000001
|
||||
secondaryUVHardAngle: 88
|
||||
secondaryUVMarginMethod: 1
|
||||
secondaryUVMinLightmapResolution: 40
|
||||
secondaryUVMinObjectScale: 1
|
||||
secondaryUVPackMargin: 4
|
||||
useFileScale: 1
|
||||
strictVertexDataChecks: 0
|
||||
tangentSpace:
|
||||
normalSmoothAngle: 60
|
||||
normalImportMode: 0
|
||||
tangentImportMode: 3
|
||||
normalCalculationMode: 4
|
||||
legacyComputeAllNormalsFromSmoothingGroupsWhenMeshHasBlendShapes: 0
|
||||
blendShapeNormalImportMode: 1
|
||||
normalSmoothingSource: 0
|
||||
referencedClips: []
|
||||
importAnimation: 1
|
||||
humanDescription:
|
||||
serializedVersion: 3
|
||||
human: []
|
||||
skeleton: []
|
||||
armTwist: 0.5
|
||||
foreArmTwist: 0.5
|
||||
upperLegTwist: 0.5
|
||||
legTwist: 0.5
|
||||
armStretch: 0.05
|
||||
legStretch: 0.05
|
||||
feetSpacing: 0
|
||||
globalScale: 1
|
||||
rootMotionBoneName:
|
||||
hasTranslationDoF: 0
|
||||
hasExtraRoot: 0
|
||||
skeletonHasParents: 1
|
||||
lastHumanDescriptionAvatarSource: {instanceID: 0}
|
||||
autoGenerateAvatarMappingIfUnspecified: 1
|
||||
animationType: 2
|
||||
humanoidOversampling: 1
|
||||
avatarSetup: 0
|
||||
addHumanoidExtraRootOnlyWhenUsingAvatar: 1
|
||||
importBlendShapeDeformPercent: 1
|
||||
remapMaterialsIfMaterialImportModeIsNone: 0
|
||||
additionalBone: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
151812
Assets/Prefabs/APM-S 1.prefab
Normal file
151812
Assets/Prefabs/APM-S 1.prefab
Normal file
File diff suppressed because it is too large
Load Diff
7
Assets/Prefabs/APM-S 1.prefab.meta
Normal file
7
Assets/Prefabs/APM-S 1.prefab.meta
Normal file
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3fc5829b250bce64984fcf1ccfaf6597
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
8
Assets/Prefabs/B.meta
Normal file
8
Assets/Prefabs/B.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d743d995b67110b409bd439795ee232a
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
59
Assets/Prefabs/B/APM-S 1 B.prefab
Normal file
59
Assets/Prefabs/B/APM-S 1 B.prefab
Normal file
@@ -0,0 +1,59 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1001 &1265100708768892472
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
serializedVersion: 3
|
||||
m_TransformParent: {fileID: 0}
|
||||
m_Modifications:
|
||||
- target: {fileID: 612378198358450151, guid: 2d140ff061d6b3843b5464eb31866110, type: 3}
|
||||
propertyPath: m_Name
|
||||
value: APM-S 1 Variant
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3568986914059865697, guid: 2d140ff061d6b3843b5464eb31866110, type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 44.5
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3568986914059865697, guid: 2d140ff061d6b3843b5464eb31866110, type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3568986914059865697, guid: 2d140ff061d6b3843b5464eb31866110, type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 18
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3568986914059865697, guid: 2d140ff061d6b3843b5464eb31866110, type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 0.7071068
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3568986914059865697, guid: 2d140ff061d6b3843b5464eb31866110, type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3568986914059865697, guid: 2d140ff061d6b3843b5464eb31866110, type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: -0.7071068
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3568986914059865697, guid: 2d140ff061d6b3843b5464eb31866110, type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3568986914059865697, guid: 2d140ff061d6b3843b5464eb31866110, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3568986914059865697, guid: 2d140ff061d6b3843b5464eb31866110, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.y
|
||||
value: -90
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3568986914059865697, guid: 2d140ff061d6b3843b5464eb31866110, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_RemovedGameObjects: []
|
||||
m_AddedGameObjects: []
|
||||
m_AddedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: 2d140ff061d6b3843b5464eb31866110, type: 3}
|
||||
7
Assets/Prefabs/B/APM-S 1 B.prefab.meta
Normal file
7
Assets/Prefabs/B/APM-S 1 B.prefab.meta
Normal file
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: de49e9ad8cc46fd4e810be1e9ac44144
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
59
Assets/Prefabs/B/Pallet canh cua.prefab
Normal file
59
Assets/Prefabs/B/Pallet canh cua.prefab
Normal file
@@ -0,0 +1,59 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1001 &7167592971038224673
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
serializedVersion: 3
|
||||
m_TransformParent: {fileID: 0}
|
||||
m_Modifications:
|
||||
- target: {fileID: 940957206751199324, guid: 009c863120840004fac04906da154a8c, type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 38.953
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 940957206751199324, guid: 009c863120840004fac04906da154a8c, type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: 0.1225
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 940957206751199324, guid: 009c863120840004fac04906da154a8c, type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 24.408
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 940957206751199324, guid: 009c863120840004fac04906da154a8c, type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 940957206751199324, guid: 009c863120840004fac04906da154a8c, type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 940957206751199324, guid: 009c863120840004fac04906da154a8c, type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 940957206751199324, guid: 009c863120840004fac04906da154a8c, type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 940957206751199324, guid: 009c863120840004fac04906da154a8c, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 940957206751199324, guid: 009c863120840004fac04906da154a8c, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.y
|
||||
value: 180
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 940957206751199324, guid: 009c863120840004fac04906da154a8c, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1363597021010242773, guid: 009c863120840004fac04906da154a8c, type: 3}
|
||||
propertyPath: m_Name
|
||||
value: Pallet Variant
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_RemovedGameObjects: []
|
||||
m_AddedGameObjects: []
|
||||
m_AddedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: 009c863120840004fac04906da154a8c, type: 3}
|
||||
7
Assets/Prefabs/B/Pallet canh cua.prefab.meta
Normal file
7
Assets/Prefabs/B/Pallet canh cua.prefab.meta
Normal file
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 83eda03a69db77446a91c661e9b1f556
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
59
Assets/Prefabs/B/Pallet trong xuong.prefab
Normal file
59
Assets/Prefabs/B/Pallet trong xuong.prefab
Normal file
@@ -0,0 +1,59 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1001 &7179849639761545391
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
serializedVersion: 3
|
||||
m_TransformParent: {fileID: 0}
|
||||
m_Modifications:
|
||||
- target: {fileID: 2560452362587215164, guid: bb52e847e6e640648b9a2208d50845f9, type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 23.011
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2560452362587215164, guid: bb52e847e6e640648b9a2208d50845f9, type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: 0.1225
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2560452362587215164, guid: bb52e847e6e640648b9a2208d50845f9, type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 21.765
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2560452362587215164, guid: bb52e847e6e640648b9a2208d50845f9, type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 0.7071068
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2560452362587215164, guid: bb52e847e6e640648b9a2208d50845f9, type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2560452362587215164, guid: bb52e847e6e640648b9a2208d50845f9, type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: 0.7071068
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2560452362587215164, guid: bb52e847e6e640648b9a2208d50845f9, type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2560452362587215164, guid: bb52e847e6e640648b9a2208d50845f9, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2560452362587215164, guid: bb52e847e6e640648b9a2208d50845f9, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.y
|
||||
value: 90
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2560452362587215164, guid: bb52e847e6e640648b9a2208d50845f9, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4353298619885255093, guid: bb52e847e6e640648b9a2208d50845f9, type: 3}
|
||||
propertyPath: m_Name
|
||||
value: Pallet 1 Variant
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_RemovedGameObjects: []
|
||||
m_AddedGameObjects: []
|
||||
m_AddedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: bb52e847e6e640648b9a2208d50845f9, type: 3}
|
||||
7
Assets/Prefabs/B/Pallet trong xuong.prefab.meta
Normal file
7
Assets/Prefabs/B/Pallet trong xuong.prefab.meta
Normal file
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 967e2a198e57bf14481484f6625b7e88
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/Prefabs/CUMNANG.fbx
Normal file
BIN
Assets/Prefabs/CUMNANG.fbx
Normal file
Binary file not shown.
107
Assets/Prefabs/CUMNANG.fbx.meta
Normal file
107
Assets/Prefabs/CUMNANG.fbx.meta
Normal file
@@ -0,0 +1,107 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ef53186adc4b65e4fb117b1435d04624
|
||||
ModelImporter:
|
||||
serializedVersion: 22200
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
materials:
|
||||
materialImportMode: 2
|
||||
materialName: 0
|
||||
materialSearch: 1
|
||||
materialLocation: 1
|
||||
animations:
|
||||
legacyGenerateAnimations: 4
|
||||
bakeSimulation: 0
|
||||
resampleCurves: 1
|
||||
optimizeGameObjects: 0
|
||||
removeConstantScaleCurves: 0
|
||||
motionNodeName:
|
||||
animationImportErrors:
|
||||
animationImportWarnings:
|
||||
animationRetargetingWarnings:
|
||||
animationDoRetargetingWarnings: 0
|
||||
importAnimatedCustomProperties: 0
|
||||
importConstraints: 0
|
||||
animationCompression: 1
|
||||
animationRotationError: 0.5
|
||||
animationPositionError: 0.5
|
||||
animationScaleError: 0.5
|
||||
animationWrapMode: 0
|
||||
extraExposedTransformPaths: []
|
||||
extraUserProperties: []
|
||||
clipAnimations: []
|
||||
isReadable: 0
|
||||
meshes:
|
||||
lODScreenPercentages: []
|
||||
globalScale: 1
|
||||
meshCompression: 0
|
||||
addColliders: 0
|
||||
useSRGBMaterialColor: 1
|
||||
sortHierarchyByName: 1
|
||||
importPhysicalCameras: 1
|
||||
importVisibility: 1
|
||||
importBlendShapes: 1
|
||||
importCameras: 1
|
||||
importLights: 1
|
||||
nodeNameCollisionStrategy: 1
|
||||
fileIdsGeneration: 2
|
||||
swapUVChannels: 0
|
||||
generateSecondaryUV: 0
|
||||
useFileUnits: 1
|
||||
keepQuads: 0
|
||||
weldVertices: 1
|
||||
bakeAxisConversion: 0
|
||||
preserveHierarchy: 0
|
||||
skinWeightsMode: 0
|
||||
maxBonesPerVertex: 4
|
||||
minBoneWeight: 0.001
|
||||
optimizeBones: 1
|
||||
meshOptimizationFlags: -1
|
||||
indexFormat: 0
|
||||
secondaryUVAngleDistortion: 8
|
||||
secondaryUVAreaDistortion: 15.000001
|
||||
secondaryUVHardAngle: 88
|
||||
secondaryUVMarginMethod: 1
|
||||
secondaryUVMinLightmapResolution: 40
|
||||
secondaryUVMinObjectScale: 1
|
||||
secondaryUVPackMargin: 4
|
||||
useFileScale: 1
|
||||
strictVertexDataChecks: 0
|
||||
tangentSpace:
|
||||
normalSmoothAngle: 60
|
||||
normalImportMode: 0
|
||||
tangentImportMode: 3
|
||||
normalCalculationMode: 4
|
||||
legacyComputeAllNormalsFromSmoothingGroupsWhenMeshHasBlendShapes: 0
|
||||
blendShapeNormalImportMode: 1
|
||||
normalSmoothingSource: 0
|
||||
referencedClips: []
|
||||
importAnimation: 1
|
||||
humanDescription:
|
||||
serializedVersion: 3
|
||||
human: []
|
||||
skeleton: []
|
||||
armTwist: 0.5
|
||||
foreArmTwist: 0.5
|
||||
upperLegTwist: 0.5
|
||||
legTwist: 0.5
|
||||
armStretch: 0.05
|
||||
legStretch: 0.05
|
||||
feetSpacing: 0
|
||||
globalScale: 1
|
||||
rootMotionBoneName:
|
||||
hasTranslationDoF: 0
|
||||
hasExtraRoot: 0
|
||||
skeletonHasParents: 1
|
||||
lastHumanDescriptionAvatarSource: {instanceID: 0}
|
||||
autoGenerateAvatarMappingIfUnspecified: 1
|
||||
animationType: 2
|
||||
humanoidOversampling: 1
|
||||
avatarSetup: 0
|
||||
addHumanoidExtraRootOnlyWhenUsingAvatar: 1
|
||||
importBlendShapeDeformPercent: 1
|
||||
remapMaterialsIfMaterialImportModeIsNone: 0
|
||||
additionalBone: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
20402
Assets/Prefabs/Pallet 2.prefab
Normal file
20402
Assets/Prefabs/Pallet 2.prefab
Normal file
File diff suppressed because it is too large
Load Diff
7
Assets/Prefabs/Pallet 2.prefab.meta
Normal file
7
Assets/Prefabs/Pallet 2.prefab.meta
Normal file
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6a967c2938ee8114c9b51c503c191b99
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
6716
Assets/Prefabs/Pallet.prefab
Normal file
6716
Assets/Prefabs/Pallet.prefab
Normal file
File diff suppressed because it is too large
Load Diff
7
Assets/Prefabs/Pallet.prefab.meta
Normal file
7
Assets/Prefabs/Pallet.prefab.meta
Normal file
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9e860c808ba845e41880f91fbe152977
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
111
Assets/Prefabs/Plane.prefab
Normal file
111
Assets/Prefabs/Plane.prefab
Normal file
@@ -0,0 +1,111 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &5325398004167025498
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 3268150602241309364}
|
||||
- component: {fileID: 3668967661542295122}
|
||||
- component: {fileID: 6184420460768292464}
|
||||
- component: {fileID: 7321510579358059683}
|
||||
m_Layer: 0
|
||||
m_Name: Plane
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &3268150602241309364
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5325398004167025498}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 1, z: 0, w: 0}
|
||||
m_LocalPosition: {x: 202, y: 0, z: 244}
|
||||
m_LocalScale: {x: 40.4, y: 1, z: 48.8}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 180, z: 0}
|
||||
--- !u!33 &3668967661542295122
|
||||
MeshFilter:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5325398004167025498}
|
||||
m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0}
|
||||
--- !u!23 &6184420460768292464
|
||||
MeshRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5325398004167025498}
|
||||
m_Enabled: 1
|
||||
m_CastShadows: 1
|
||||
m_ReceiveShadows: 1
|
||||
m_DynamicOccludee: 1
|
||||
m_StaticShadowCaster: 0
|
||||
m_MotionVectors: 1
|
||||
m_LightProbeUsage: 1
|
||||
m_ReflectionProbeUsage: 1
|
||||
m_RayTracingMode: 2
|
||||
m_RayTraceProcedural: 0
|
||||
m_RayTracingAccelStructBuildFlagsOverride: 0
|
||||
m_RayTracingAccelStructBuildFlags: 1
|
||||
m_SmallMeshCulling: 1
|
||||
m_RenderingLayerMask: 1
|
||||
m_RendererPriority: 0
|
||||
m_Materials:
|
||||
- {fileID: 2100000, guid: 154a7aa6ea4af374cb0943b11372aadc, type: 2}
|
||||
m_StaticBatchInfo:
|
||||
firstSubMesh: 0
|
||||
subMeshCount: 0
|
||||
m_StaticBatchRoot: {fileID: 0}
|
||||
m_ProbeAnchor: {fileID: 0}
|
||||
m_LightProbeVolumeOverride: {fileID: 0}
|
||||
m_ScaleInLightmap: 1
|
||||
m_ReceiveGI: 1
|
||||
m_PreserveUVs: 0
|
||||
m_IgnoreNormalsForChartDetection: 0
|
||||
m_ImportantGI: 0
|
||||
m_StitchLightmapSeams: 1
|
||||
m_SelectedEditorRenderState: 3
|
||||
m_MinimumChartSize: 4
|
||||
m_AutoUVMaxDistance: 0.5
|
||||
m_AutoUVMaxAngle: 89
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_SortingLayerID: 0
|
||||
m_SortingLayer: 0
|
||||
m_SortingOrder: 0
|
||||
m_AdditionalVertexStreams: {fileID: 0}
|
||||
--- !u!64 &7321510579358059683
|
||||
MeshCollider:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5325398004167025498}
|
||||
m_Material: {fileID: 0}
|
||||
m_IncludeLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 0
|
||||
m_ExcludeLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 0
|
||||
m_LayerOverridePriority: 0
|
||||
m_IsTrigger: 0
|
||||
m_ProvidesContacts: 0
|
||||
m_Enabled: 1
|
||||
serializedVersion: 5
|
||||
m_Convex: 0
|
||||
m_CookingOptions: 30
|
||||
m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0}
|
||||
7
Assets/Prefabs/Plane.prefab.meta
Normal file
7
Assets/Prefabs/Plane.prefab.meta
Normal file
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d250b496124827c4e96f5481187d9ada
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/Prefabs/ten.fbx
Normal file
BIN
Assets/Prefabs/ten.fbx
Normal file
Binary file not shown.
107
Assets/Prefabs/ten.fbx.meta
Normal file
107
Assets/Prefabs/ten.fbx.meta
Normal file
@@ -0,0 +1,107 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f98bbc0e3e4f8074fb1e5a79b6cb066c
|
||||
ModelImporter:
|
||||
serializedVersion: 22200
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
materials:
|
||||
materialImportMode: 2
|
||||
materialName: 0
|
||||
materialSearch: 1
|
||||
materialLocation: 1
|
||||
animations:
|
||||
legacyGenerateAnimations: 4
|
||||
bakeSimulation: 0
|
||||
resampleCurves: 1
|
||||
optimizeGameObjects: 0
|
||||
removeConstantScaleCurves: 0
|
||||
motionNodeName:
|
||||
animationImportErrors:
|
||||
animationImportWarnings:
|
||||
animationRetargetingWarnings:
|
||||
animationDoRetargetingWarnings: 0
|
||||
importAnimatedCustomProperties: 0
|
||||
importConstraints: 0
|
||||
animationCompression: 1
|
||||
animationRotationError: 0.5
|
||||
animationPositionError: 0.5
|
||||
animationScaleError: 0.5
|
||||
animationWrapMode: 0
|
||||
extraExposedTransformPaths: []
|
||||
extraUserProperties: []
|
||||
clipAnimations: []
|
||||
isReadable: 0
|
||||
meshes:
|
||||
lODScreenPercentages: []
|
||||
globalScale: 1
|
||||
meshCompression: 0
|
||||
addColliders: 0
|
||||
useSRGBMaterialColor: 1
|
||||
sortHierarchyByName: 1
|
||||
importPhysicalCameras: 1
|
||||
importVisibility: 1
|
||||
importBlendShapes: 1
|
||||
importCameras: 1
|
||||
importLights: 1
|
||||
nodeNameCollisionStrategy: 1
|
||||
fileIdsGeneration: 2
|
||||
swapUVChannels: 0
|
||||
generateSecondaryUV: 0
|
||||
useFileUnits: 1
|
||||
keepQuads: 0
|
||||
weldVertices: 1
|
||||
bakeAxisConversion: 0
|
||||
preserveHierarchy: 0
|
||||
skinWeightsMode: 0
|
||||
maxBonesPerVertex: 4
|
||||
minBoneWeight: 0.001
|
||||
optimizeBones: 1
|
||||
meshOptimizationFlags: -1
|
||||
indexFormat: 0
|
||||
secondaryUVAngleDistortion: 8
|
||||
secondaryUVAreaDistortion: 15.000001
|
||||
secondaryUVHardAngle: 88
|
||||
secondaryUVMarginMethod: 1
|
||||
secondaryUVMinLightmapResolution: 40
|
||||
secondaryUVMinObjectScale: 1
|
||||
secondaryUVPackMargin: 4
|
||||
useFileScale: 1
|
||||
strictVertexDataChecks: 0
|
||||
tangentSpace:
|
||||
normalSmoothAngle: 60
|
||||
normalImportMode: 0
|
||||
tangentImportMode: 3
|
||||
normalCalculationMode: 4
|
||||
legacyComputeAllNormalsFromSmoothingGroupsWhenMeshHasBlendShapes: 0
|
||||
blendShapeNormalImportMode: 1
|
||||
normalSmoothingSource: 0
|
||||
referencedClips: []
|
||||
importAnimation: 1
|
||||
humanDescription:
|
||||
serializedVersion: 3
|
||||
human: []
|
||||
skeleton: []
|
||||
armTwist: 0.5
|
||||
foreArmTwist: 0.5
|
||||
upperLegTwist: 0.5
|
||||
legTwist: 0.5
|
||||
armStretch: 0.05
|
||||
legStretch: 0.05
|
||||
feetSpacing: 0
|
||||
globalScale: 1
|
||||
rootMotionBoneName:
|
||||
hasTranslationDoF: 0
|
||||
hasExtraRoot: 0
|
||||
skeletonHasParents: 1
|
||||
lastHumanDescriptionAvatarSource: {instanceID: 0}
|
||||
autoGenerateAvatarMappingIfUnspecified: 1
|
||||
animationType: 2
|
||||
humanoidOversampling: 1
|
||||
avatarSetup: 0
|
||||
addHumanoidExtraRootOnlyWhenUsingAvatar: 1
|
||||
importBlendShapeDeformPercent: 1
|
||||
remapMaterialsIfMaterialImportModeIsNone: 0
|
||||
additionalBone: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
8
Assets/Scenes.meta
Normal file
8
Assets/Scenes.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9c53962885c2c4f449125a979d6ad240
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
1037
Assets/Scenes/SampleScene.unity
Normal file
1037
Assets/Scenes/SampleScene.unity
Normal file
File diff suppressed because it is too large
Load Diff
7
Assets/Scenes/SampleScene.unity.meta
Normal file
7
Assets/Scenes/SampleScene.unity.meta
Normal file
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9fc0d4010bbf28b4594072e72b8655ab
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
8
Assets/Scripting.meta
Normal file
8
Assets/Scripting.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ec5b2487892fc944aaac5a5ac9f4ba09
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
56
Assets/Scripting/ForkSensor.cs
Normal file
56
Assets/Scripting/ForkSensor.cs
Normal file
@@ -0,0 +1,56 @@
|
||||
using UnityEngine;
|
||||
|
||||
public class ForkSensor : MonoBehaviour
|
||||
{
|
||||
public Transform forkLift; // Vị trí animation nâng/hạ
|
||||
public Animator animator; // Bộ điều khiển animation
|
||||
public FixedJoint joint; // Joint dùng để gắn pallet
|
||||
public Rigidbody currentPallet; // Pallet đang tương tác
|
||||
|
||||
void Update()
|
||||
{
|
||||
if (Input.GetKeyDown(KeyCode.U)) // Up: nâng
|
||||
{
|
||||
animator.SetTrigger("Up");
|
||||
AttachPallet();
|
||||
}
|
||||
|
||||
if (Input.GetKeyDown(KeyCode.D)) // Down: hạ
|
||||
{
|
||||
animator.SetTrigger("Down");
|
||||
DetachPallet();
|
||||
}
|
||||
}
|
||||
|
||||
void AttachPallet()
|
||||
{
|
||||
if (currentPallet == null) return;
|
||||
|
||||
// Tạo Joint nếu chưa có
|
||||
if (joint == null)
|
||||
{
|
||||
joint = gameObject.AddComponent<FixedJoint>();
|
||||
joint.connectedBody = currentPallet;
|
||||
}
|
||||
}
|
||||
|
||||
void DetachPallet()
|
||||
{
|
||||
if (joint != null)
|
||||
{
|
||||
Destroy(joint); // Tháo pallet
|
||||
joint = null;
|
||||
}
|
||||
|
||||
currentPallet = null;
|
||||
}
|
||||
|
||||
// Tùy chọn: phát hiện pallet khi vào vùng sensor
|
||||
private void OnTriggerEnter(Collider other)
|
||||
{
|
||||
if (other.CompareTag("Pallet"))
|
||||
{
|
||||
currentPallet = other.attachedRigidbody;
|
||||
}
|
||||
}
|
||||
}
|
||||
2
Assets/Scripting/ForkSensor.cs.meta
Normal file
2
Assets/Scripting/ForkSensor.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c8f579fdb7328274dbd9317be46dba22
|
||||
8
Assets/Scripting/Khac.meta
Normal file
8
Assets/Scripting/Khac.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c9bc5eb8dbf2f4c498bd01769889e03d
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
140
Assets/Scripting/Khac/AnimationControllerAPM.cs
Normal file
140
Assets/Scripting/Khac/AnimationControllerAPM.cs
Normal file
@@ -0,0 +1,140 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.InputSystem;
|
||||
using System;
|
||||
|
||||
public class AnimationControllerAPM : MonoBehaviour
|
||||
{
|
||||
private Animator animator;
|
||||
private AnimationClip animationUClip;
|
||||
private AnimationClip animationDClip;
|
||||
|
||||
// Tham chiếu đến pallet và fork
|
||||
public Transform pallet; // Gán GameObject của pallet trong Inspector
|
||||
public Transform fork; // Gán GameObject của fork trong Inspector
|
||||
|
||||
public float AnimationUDuration => animationUClip != null ? animationUClip.length : 0f;
|
||||
public float AnimationDDuration => animationDClip != null ? animationDClip.length : 0f;
|
||||
|
||||
public Action<string, string> OnAnimationStateChanged { get; set; } // ActionType, State (RUNNING/FINISHED)
|
||||
|
||||
private string currentActionType; // Theo dõi ActionType hiện tại (pick/drop)
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
animator = GetComponent<Animator>();
|
||||
animator.SetBool("U", false);
|
||||
animator.SetBool("D", false);
|
||||
|
||||
InitializeAnimationClips();
|
||||
}
|
||||
|
||||
private void InitializeAnimationClips()
|
||||
{
|
||||
if (animator == null || animator.runtimeAnimatorController == null)
|
||||
{
|
||||
Debug.LogError("Animator hoặc AnimatorController không được gán!");
|
||||
return;
|
||||
}
|
||||
|
||||
var controller = animator.runtimeAnimatorController;
|
||||
var clips = controller.animationClips;
|
||||
|
||||
foreach (var clip in clips)
|
||||
{
|
||||
if (clip.name.Contains("Up")) // Thay bằng tên thực tế của clip U
|
||||
{
|
||||
animationUClip = clip;
|
||||
}
|
||||
else if (clip.name.Contains("Down")) // Thay bằng tên thực tế của clip D
|
||||
{
|
||||
animationDClip = clip;
|
||||
}
|
||||
}
|
||||
|
||||
if (animationUClip == null || animationDClip == null)
|
||||
{
|
||||
Debug.LogWarning("Không tìm thấy animation clip cho U hoặc D. Kiểm tra tên clip hoặc AnimatorController.");
|
||||
}
|
||||
}
|
||||
|
||||
// Kích hoạt animation "Down"
|
||||
public void OnKey1()
|
||||
{
|
||||
DetachPallet(); // Tách pallet khỏi fork
|
||||
animator.SetBool("U", false);
|
||||
animator.SetBool("D", true);
|
||||
currentActionType = "drop";
|
||||
}
|
||||
|
||||
// Kích hoạt animation "Up"
|
||||
public void OnKey2()
|
||||
{
|
||||
AttachPalletToFork(); // Gắn pallet vào fork
|
||||
animator.SetBool("U", true);
|
||||
animator.SetBool("D", false);
|
||||
currentActionType = "pick";
|
||||
}
|
||||
|
||||
// Phương thức gắn pallet vào fork
|
||||
public void AttachPalletToFork()
|
||||
{
|
||||
if (pallet != null && fork != null)
|
||||
{
|
||||
pallet.SetParent(fork);
|
||||
Debug.Log("Pallet đã được gắn vào fork.");
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.LogWarning("Pallet hoặc fork không được gán trong Inspector.");
|
||||
}
|
||||
}
|
||||
|
||||
// Phương thức tách pallet khỏi fork
|
||||
public void DetachPallet()
|
||||
{
|
||||
if (pallet != null)
|
||||
{
|
||||
pallet.SetParent(null);
|
||||
Debug.Log("Pallet đã được tách khỏi fork.");
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.LogWarning("Pallet không được gán trong Inspector.");
|
||||
}
|
||||
}
|
||||
|
||||
public float GetAnimationDuration(string actionType)
|
||||
{
|
||||
switch (actionType)
|
||||
{
|
||||
case "pick":
|
||||
return AnimationUDuration;
|
||||
case "drop":
|
||||
return AnimationDDuration;
|
||||
default:
|
||||
Debug.LogWarning($"ActionType {actionType} không được hỗ trợ.");
|
||||
return 0f;
|
||||
}
|
||||
}
|
||||
|
||||
// Gọi bởi Animation Event khi animation bắt đầu
|
||||
public void OnAnimationStart()
|
||||
{
|
||||
if (!string.IsNullOrEmpty(currentActionType))
|
||||
{
|
||||
Debug.Log($"Animation bắt đầu: {currentActionType}");
|
||||
OnAnimationStateChanged?.Invoke(currentActionType, "RUNNING");
|
||||
}
|
||||
}
|
||||
|
||||
// Gọi bởi Animation Event khi animation kết thúc
|
||||
public void OnAnimationEnd()
|
||||
{
|
||||
if (!string.IsNullOrEmpty(currentActionType))
|
||||
{
|
||||
Debug.Log($"Animation kết thúc: {currentActionType}");
|
||||
OnAnimationStateChanged?.Invoke(currentActionType, "FINISHED");
|
||||
currentActionType = null; // Reset sau khi hoàn tất
|
||||
}
|
||||
}
|
||||
}
|
||||
2
Assets/Scripting/Khac/AnimationControllerAPM.cs.meta
Normal file
2
Assets/Scripting/Khac/AnimationControllerAPM.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 17549d08c68a63646b3568dd46f952a2
|
||||
54
Assets/Scripting/Khac/CheckAnimation.cs
Normal file
54
Assets/Scripting/Khac/CheckAnimation.cs
Normal file
@@ -0,0 +1,54 @@
|
||||
using UnityEngine;
|
||||
|
||||
public class CheckAnimation : MonoBehaviour
|
||||
{
|
||||
// Hàm kiểm tra xem GameObject có animation hay không
|
||||
public bool HasAnimation(GameObject targetObject)
|
||||
{
|
||||
// Kiểm tra Animator Component (Mecanim)
|
||||
Animator animator = targetObject.GetComponent<Animator>();
|
||||
if (animator != null)
|
||||
{
|
||||
// Kiểm tra xem Animator có AnimatorController được gắn không
|
||||
if (animator.runtimeAnimatorController != null)
|
||||
{
|
||||
Debug.Log($"{targetObject.name} có Animator với AnimatorController.");
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Log($"{targetObject.name} có Animator nhưng không có AnimatorController.");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// Kiểm tra Animation Component (Legacy)
|
||||
Animation animation = targetObject.GetComponent<Animation>();
|
||||
if (animation != null)
|
||||
{
|
||||
// Kiểm tra xem Animation có AnimationClip được gắn không
|
||||
if (animation.clip != null || animation.GetClipCount() > 0)
|
||||
{
|
||||
Debug.Log($"{targetObject.name} có Animation với AnimationClip.");
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Log($"{targetObject.name} có Animation nhưng không có AnimationClip.");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// Nếu không có Animator hoặc Animation
|
||||
Debug.Log($"{targetObject.name} không có Animator hoặc Animation.");
|
||||
return false;
|
||||
}
|
||||
|
||||
// Ví dụ sử dụng
|
||||
void Start()
|
||||
{
|
||||
// Kiểm tra chính GameObject mà script này được gắn vào
|
||||
bool hasAnim = HasAnimation(gameObject);
|
||||
Debug.Log($"Kết quả kiểm tra: {hasAnim}");
|
||||
}
|
||||
}
|
||||
2
Assets/Scripting/Khac/CheckAnimation.cs.meta
Normal file
2
Assets/Scripting/Khac/CheckAnimation.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c236d6a427a698349af4be427f1bc259
|
||||
39
Assets/Scripting/Khac/DisplayPosition.cs
Normal file
39
Assets/Scripting/Khac/DisplayPosition.cs
Normal file
@@ -0,0 +1,39 @@
|
||||
using UnityEngine;
|
||||
using TMPro; // Sử dụng TextMeshPro
|
||||
|
||||
public class DisplayPosition : MonoBehaviour
|
||||
{
|
||||
// Gán TextMeshProUGUI trong Inspector
|
||||
public TextMeshProUGUI positionText;
|
||||
|
||||
void Update()
|
||||
{
|
||||
// Lấy vị trí của đối tượng
|
||||
Vector3 position = transform.position;
|
||||
float displayEulerY = NormalizeEulerAngle(-transform.eulerAngles.y); // Giữ nguyên hiển thị
|
||||
float theta = NormalizeAngle(2 * Mathf.PI - transform.eulerAngles.y * Mathf.Deg2Rad); // Công thức mới
|
||||
|
||||
// Hiển thị tọa độ x và z
|
||||
string positionInfo = $"X: {position.x:F2} \n" +
|
||||
$"Y: {position.z:F2} \n" +
|
||||
$"Theta: {displayEulerY:F2}" ;
|
||||
|
||||
// Cập nhật TextMeshProUGUI
|
||||
if (positionText != null)
|
||||
{
|
||||
positionText.text = positionInfo;
|
||||
}
|
||||
}
|
||||
public float NormalizeEulerAngle(float angleDeg)
|
||||
{
|
||||
while (angleDeg > 180f) angleDeg -= 360f;
|
||||
while (angleDeg < -180f) angleDeg += 360f;
|
||||
return angleDeg;
|
||||
}
|
||||
public float NormalizeAngle(float angleRad)
|
||||
{
|
||||
while (angleRad > Mathf.PI) angleRad -= 2 * Mathf.PI;
|
||||
while (angleRad < -Mathf.PI) angleRad += 2 * Mathf.PI;
|
||||
return angleRad;
|
||||
}
|
||||
}
|
||||
2
Assets/Scripting/Khac/DisplayPosition.cs.meta
Normal file
2
Assets/Scripting/Khac/DisplayPosition.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 73fb5f1bf8e3fd341baf281a45510492
|
||||
34
Assets/Scripting/Khac/SceneSetup.cs
Normal file
34
Assets/Scripting/Khac/SceneSetup.cs
Normal file
@@ -0,0 +1,34 @@
|
||||
using UnityEngine;
|
||||
|
||||
public class SceneSetup : MonoBehaviour
|
||||
{
|
||||
[SerializeField] private Transform groundPlanePrefab; // Transform của Prefab Plane
|
||||
[SerializeField] private Transform amrPrefab; // Transform của Prefab AMR
|
||||
|
||||
void Start()
|
||||
{
|
||||
// Khởi tạo Plane
|
||||
if (groundPlanePrefab != null)
|
||||
{
|
||||
GameObject plane = Instantiate(groundPlanePrefab.gameObject, groundPlanePrefab.position, groundPlanePrefab.rotation);
|
||||
plane.name = "GroundPlane";
|
||||
Debug.Log($"Đã khởi tạo GroundPlane Prefab tại position: {groundPlanePrefab.position}, rotation: {groundPlanePrefab.rotation.eulerAngles}");
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.LogError("GroundPlane Prefab (Transform) chưa được gán trong Inspector!");
|
||||
}
|
||||
|
||||
// Khởi tạo AMR
|
||||
if (amrPrefab != null)
|
||||
{
|
||||
GameObject amr = Instantiate(amrPrefab.gameObject, amrPrefab.position, amrPrefab.rotation);
|
||||
amr.name = "AMR";
|
||||
Debug.Log($"Đã khởi tạo AMR Prefab tại position: {amrPrefab.position}, rotation: {amrPrefab.rotation.eulerAngles}");
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.LogError("AMR Prefab (Transform) chưa được gán trong Inspector!");
|
||||
}
|
||||
}
|
||||
}
|
||||
2
Assets/Scripting/Khac/SceneSetup.cs.meta
Normal file
2
Assets/Scripting/Khac/SceneSetup.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c93a95dd176e6a644b2443303a886c89
|
||||
8
Assets/Scripting/MQTT.meta
Normal file
8
Assets/Scripting/MQTT.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1d25d7d8f591d604b8e47472d06de54b
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
82
Assets/Scripting/MQTT/MQTTBroker.cs
Normal file
82
Assets/Scripting/MQTT/MQTTBroker.cs
Normal file
@@ -0,0 +1,82 @@
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
using UnityEngine;
|
||||
using MQTTnet;
|
||||
using MQTTnet.Server;
|
||||
using MQTTnet.Protocol;
|
||||
|
||||
public class MQTTBroker : MonoBehaviour
|
||||
{
|
||||
public int port = 1883;
|
||||
public string username = "";
|
||||
public string password = "";
|
||||
public bool allowAnonymousConnections = true;
|
||||
|
||||
private MqttServer mqttServer;
|
||||
|
||||
private async void Start()
|
||||
{
|
||||
var optionsBuilder = new MqttServerOptionsBuilder()
|
||||
.WithDefaultEndpoint()
|
||||
.WithDefaultEndpointPort(port);
|
||||
|
||||
mqttServer = new MqttFactory().CreateMqttServer(optionsBuilder.Build());
|
||||
|
||||
mqttServer.ValidatingConnectionAsync += args =>
|
||||
{
|
||||
if (string.IsNullOrEmpty(args.Username))
|
||||
{
|
||||
if (allowAnonymousConnections)
|
||||
{
|
||||
args.ReasonCode = MqttConnectReasonCode.Success;
|
||||
//Debug.Log($"[MQTT] Anonymous client connected: {args.ClientId}");
|
||||
}
|
||||
else
|
||||
{
|
||||
args.ReasonCode = MqttConnectReasonCode.BadUserNameOrPassword;
|
||||
Debug.LogWarning($"[MQTT] Anonymous not allowed: {args.ClientId}");
|
||||
}
|
||||
}
|
||||
else if (args.Username == username && args.Password == password)
|
||||
{
|
||||
args.ReasonCode = MqttConnectReasonCode.Success;
|
||||
Debug.Log($"[MQTT] Authenticated client: {args.ClientId}");
|
||||
}
|
||||
else
|
||||
{
|
||||
args.ReasonCode = MqttConnectReasonCode.BadUserNameOrPassword;
|
||||
Debug.LogWarning($"[MQTT] Invalid credentials: {args.ClientId}");
|
||||
}
|
||||
|
||||
return Task.CompletedTask;
|
||||
};
|
||||
|
||||
mqttServer.ClientConnectedAsync += e =>
|
||||
{
|
||||
//Debug.Log($"[MQTT] Client connected: {e.ClientId}");
|
||||
return Task.CompletedTask;
|
||||
};
|
||||
|
||||
mqttServer.InterceptingPublishAsync += e =>
|
||||
{
|
||||
string payload = e.ApplicationMessage?.Payload == null
|
||||
? ""
|
||||
: System.Text.Encoding.UTF8.GetString(e.ApplicationMessage.Payload);
|
||||
|
||||
//Debug.Log($"[MQTT] Topic: {e.ApplicationMessage.Topic} - Payload: {payload}");
|
||||
return Task.CompletedTask;
|
||||
};
|
||||
|
||||
await mqttServer.StartAsync();
|
||||
//Debug.Log($"MQTT broker started on port {port}");
|
||||
}
|
||||
|
||||
private async void OnApplicationQuit()
|
||||
{
|
||||
if (mqttServer != null)
|
||||
{
|
||||
await mqttServer.StopAsync();
|
||||
Debug.Log("MQTT broker stopped.");
|
||||
}
|
||||
}
|
||||
}
|
||||
2
Assets/Scripting/MQTT/MQTTBroker.cs.meta
Normal file
2
Assets/Scripting/MQTT/MQTTBroker.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 29bbd3dbef6acad4d853bdb166d95684
|
||||
134
Assets/Scripting/MQTT/MqttClientManager.cs
Normal file
134
Assets/Scripting/MQTT/MqttClientManager.cs
Normal file
@@ -0,0 +1,134 @@
|
||||
using System;
|
||||
using System.Collections.Concurrent;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using MQTTnet;
|
||||
using MQTTnet.Client;
|
||||
using MQTTnet.Extensions.ManagedClient;
|
||||
using MQTTnet.Packets;
|
||||
using UnityEngine;
|
||||
|
||||
public class MqttClientManager
|
||||
{
|
||||
private readonly string mqttBroker;
|
||||
private readonly int mqttPort;
|
||||
private readonly string mqttUsername;
|
||||
private readonly string mqttPassword;
|
||||
private readonly string mqttClientId;
|
||||
private readonly string orderTopic;
|
||||
private readonly string instantActionsTopic;
|
||||
private readonly ConcurrentQueue<string> jsonQueue;
|
||||
private readonly ConcurrentQueue<string> instantActionQueue;
|
||||
private IManagedMqttClient mqttClient;
|
||||
|
||||
public MqttClientManager(string broker, int port, string username, string password, string clientId,
|
||||
string orderTopic, string instantActionsTopic, ConcurrentQueue<string> jsonQueue,
|
||||
ConcurrentQueue<string> instantActionQueue)
|
||||
{
|
||||
mqttBroker = broker;
|
||||
mqttPort = port;
|
||||
mqttUsername = username;
|
||||
mqttPassword = password;
|
||||
mqttClientId = clientId;
|
||||
this.orderTopic = orderTopic;
|
||||
this.instantActionsTopic = instantActionsTopic;
|
||||
this.jsonQueue = jsonQueue;
|
||||
this.instantActionQueue = instantActionQueue;
|
||||
}
|
||||
|
||||
public async Task InitializeAsync()
|
||||
{
|
||||
try
|
||||
{
|
||||
var mqttFactory = new MqttFactory();
|
||||
mqttClient = mqttFactory.CreateManagedMqttClient();
|
||||
|
||||
var optionsBuilder = new MqttClientOptionsBuilder()
|
||||
.WithTcpServer(mqttBroker, mqttPort)
|
||||
.WithClientId(mqttClientId);
|
||||
if (!string.IsNullOrEmpty(mqttUsername) && !string.IsNullOrEmpty(mqttPassword))
|
||||
{
|
||||
optionsBuilder.WithCredentials(mqttUsername, mqttPassword);
|
||||
}
|
||||
|
||||
var managedOptions = new ManagedMqttClientOptionsBuilder()
|
||||
.WithClientOptions(optionsBuilder.Build())
|
||||
.WithAutoReconnectDelay(TimeSpan.FromSeconds(5))
|
||||
.Build();
|
||||
|
||||
mqttClient.ApplicationMessageReceivedAsync += async e =>
|
||||
{
|
||||
await Task.Run(() =>
|
||||
{
|
||||
string topic = e.ApplicationMessage.Topic;
|
||||
string payload = Encoding.UTF8.GetString(e.ApplicationMessage.Payload ?? Array.Empty<byte>());
|
||||
if (topic == orderTopic)
|
||||
{
|
||||
Debug.Log($"{payload}");
|
||||
jsonQueue.Enqueue(payload);
|
||||
}
|
||||
else if (topic == instantActionsTopic)
|
||||
{
|
||||
Debug.Log($"Nhận được JSON từ chủ đề {instantActionsTopic}: {payload}");
|
||||
instantActionQueue.Enqueue(payload);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
mqttClient.ConnectedAsync += async e =>
|
||||
{
|
||||
try
|
||||
{
|
||||
await mqttClient.SubscribeAsync(new List<MqttTopicFilter>
|
||||
{
|
||||
new MqttTopicFilterBuilder().WithTopic(orderTopic).Build(),
|
||||
new MqttTopicFilterBuilder().WithTopic(instantActionsTopic).Build()
|
||||
});
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Debug.LogError($"Lỗi khi kết nối hoặc đăng ký chủ đề: {ex.Message}");
|
||||
}
|
||||
};
|
||||
|
||||
mqttClient.DisconnectedAsync += async e =>
|
||||
{
|
||||
await Task.CompletedTask;
|
||||
};
|
||||
|
||||
await mqttClient.StartAsync(managedOptions);
|
||||
//Debug.Log("Đã khởi động MQTT client");
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Debug.LogError($"Không thể khởi tạo MQTT client: {ex.Message}");
|
||||
}
|
||||
}
|
||||
|
||||
public async Task StopAsync()
|
||||
{
|
||||
if (mqttClient != null)
|
||||
{
|
||||
await mqttClient.StopAsync();
|
||||
mqttClient.Dispose();
|
||||
Debug.Log("Đã dừng và hủy MQTT client");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public async Task PublishAsync(string topic, string payload)
|
||||
{
|
||||
if (mqttClient == null || !mqttClient.IsConnected)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var message = new MqttApplicationMessageBuilder()
|
||||
.WithTopic(topic)
|
||||
.WithPayload(Encoding.UTF8.GetBytes(payload))
|
||||
.Build();
|
||||
|
||||
await mqttClient.EnqueueAsync(message);
|
||||
}
|
||||
}
|
||||
2
Assets/Scripting/MQTT/MqttClientManager.cs.meta
Normal file
2
Assets/Scripting/MQTT/MqttClientManager.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 94facf4719dd13944aa270b45bb689cf
|
||||
428
Assets/Scripting/PlayerInputActions.cs
Normal file
428
Assets/Scripting/PlayerInputActions.cs
Normal file
@@ -0,0 +1,428 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was auto-generated by com.unity.inputsystem:InputActionCodeGenerator
|
||||
// version 1.13.0
|
||||
// from Assets/Scripting/PlayerInputActions.inputactions
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine.InputSystem;
|
||||
using UnityEngine.InputSystem.Utilities;
|
||||
|
||||
/// <summary>
|
||||
/// Provides programmatic access to <see cref="InputActionAsset" />, <see cref="InputActionMap" />, <see cref="InputAction" /> and <see cref="InputControlScheme" /> instances defined in asset "Assets/Scripting/PlayerInputActions.inputactions".
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// This class is source generated and any manual edits will be discarded if the associated asset is reimported or modified.
|
||||
/// </remarks>
|
||||
/// <example>
|
||||
/// <code>
|
||||
/// using namespace UnityEngine;
|
||||
/// using UnityEngine.InputSystem;
|
||||
///
|
||||
/// // Example of using an InputActionMap named "Player" from a UnityEngine.MonoBehaviour implementing callback interface.
|
||||
/// public class Example : MonoBehaviour, MyActions.IPlayerActions
|
||||
/// {
|
||||
/// private MyActions_Actions m_Actions; // Source code representation of asset.
|
||||
/// private MyActions_Actions.PlayerActions m_Player; // Source code representation of action map.
|
||||
///
|
||||
/// void Awake()
|
||||
/// {
|
||||
/// m_Actions = new MyActions_Actions(); // Create asset object.
|
||||
/// m_Player = m_Actions.Player; // Extract action map object.
|
||||
/// m_Player.AddCallbacks(this); // Register callback interface IPlayerActions.
|
||||
/// }
|
||||
///
|
||||
/// void OnDestroy()
|
||||
/// {
|
||||
/// m_Actions.Dispose(); // Destroy asset object.
|
||||
/// }
|
||||
///
|
||||
/// void OnEnable()
|
||||
/// {
|
||||
/// m_Player.Enable(); // Enable all actions within map.
|
||||
/// }
|
||||
///
|
||||
/// void OnDisable()
|
||||
/// {
|
||||
/// m_Player.Disable(); // Disable all actions within map.
|
||||
/// }
|
||||
///
|
||||
/// #region Interface implementation of MyActions.IPlayerActions
|
||||
///
|
||||
/// // Invoked when "Move" action is either started, performed or canceled.
|
||||
/// public void OnMove(InputAction.CallbackContext context)
|
||||
/// {
|
||||
/// Debug.Log($"OnMove: {context.ReadValue<Vector2>()}");
|
||||
/// }
|
||||
///
|
||||
/// // Invoked when "Attack" action is either started, performed or canceled.
|
||||
/// public void OnAttack(InputAction.CallbackContext context)
|
||||
/// {
|
||||
/// Debug.Log($"OnAttack: {context.ReadValue<float>()}");
|
||||
/// }
|
||||
///
|
||||
/// #endregion
|
||||
/// }
|
||||
/// </code>
|
||||
/// </example>
|
||||
public partial class @PlayerInputActions: IInputActionCollection2, IDisposable
|
||||
{
|
||||
/// <summary>
|
||||
/// Provides access to the underlying asset instance.
|
||||
/// </summary>
|
||||
public InputActionAsset asset { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Constructs a new instance.
|
||||
/// </summary>
|
||||
public @PlayerInputActions()
|
||||
{
|
||||
asset = InputActionAsset.FromJson(@"{
|
||||
""name"": ""PlayerInputActions"",
|
||||
""maps"": [
|
||||
{
|
||||
""name"": ""Player"",
|
||||
""id"": ""82815556-132e-49d6-8fca-b06edd932024"",
|
||||
""actions"": [
|
||||
{
|
||||
""name"": ""R"",
|
||||
""type"": ""Button"",
|
||||
""id"": ""01ce2e4e-fc8e-4cc8-9b94-366a22e89c9f"",
|
||||
""expectedControlType"": """",
|
||||
""processors"": """",
|
||||
""interactions"": """",
|
||||
""initialStateCheck"": false
|
||||
},
|
||||
{
|
||||
""name"": ""P"",
|
||||
""type"": ""Button"",
|
||||
""id"": ""9a5aadb3-d54f-4808-a656-07f79f54a44c"",
|
||||
""expectedControlType"": """",
|
||||
""processors"": """",
|
||||
""interactions"": """",
|
||||
""initialStateCheck"": false
|
||||
},
|
||||
{
|
||||
""name"": ""U"",
|
||||
""type"": ""Button"",
|
||||
""id"": ""b7641136-088e-4c90-8036-88a6c96027cf"",
|
||||
""expectedControlType"": """",
|
||||
""processors"": """",
|
||||
""interactions"": """",
|
||||
""initialStateCheck"": false
|
||||
},
|
||||
{
|
||||
""name"": ""D"",
|
||||
""type"": ""Button"",
|
||||
""id"": ""2078562a-bcac-4034-8435-4d09d5662b90"",
|
||||
""expectedControlType"": """",
|
||||
""processors"": """",
|
||||
""interactions"": """",
|
||||
""initialStateCheck"": false
|
||||
}
|
||||
],
|
||||
""bindings"": [
|
||||
{
|
||||
""name"": """",
|
||||
""id"": ""cac63c8b-ac74-4c56-9ae5-304c4bd98115"",
|
||||
""path"": ""<Keyboard>/r"",
|
||||
""interactions"": """",
|
||||
""processors"": """",
|
||||
""groups"": """",
|
||||
""action"": ""R"",
|
||||
""isComposite"": false,
|
||||
""isPartOfComposite"": false
|
||||
},
|
||||
{
|
||||
""name"": """",
|
||||
""id"": ""8d628790-58fe-40a0-9794-cc1385ab0e46"",
|
||||
""path"": ""<Keyboard>/p"",
|
||||
""interactions"": """",
|
||||
""processors"": """",
|
||||
""groups"": """",
|
||||
""action"": ""P"",
|
||||
""isComposite"": false,
|
||||
""isPartOfComposite"": false
|
||||
},
|
||||
{
|
||||
""name"": """",
|
||||
""id"": ""6722f789-b46d-494b-b1f5-ac158cdf784c"",
|
||||
""path"": ""<Keyboard>/u"",
|
||||
""interactions"": """",
|
||||
""processors"": """",
|
||||
""groups"": """",
|
||||
""action"": ""U"",
|
||||
""isComposite"": false,
|
||||
""isPartOfComposite"": false
|
||||
},
|
||||
{
|
||||
""name"": """",
|
||||
""id"": ""c7afe6a4-4565-46d0-bfe5-e27c8a5b5ac0"",
|
||||
""path"": ""<Keyboard>/d"",
|
||||
""interactions"": """",
|
||||
""processors"": """",
|
||||
""groups"": """",
|
||||
""action"": ""D"",
|
||||
""isComposite"": false,
|
||||
""isPartOfComposite"": false
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
""controlSchemes"": []
|
||||
}");
|
||||
// Player
|
||||
m_Player = asset.FindActionMap("Player", throwIfNotFound: true);
|
||||
m_Player_R = m_Player.FindAction("R", throwIfNotFound: true);
|
||||
m_Player_P = m_Player.FindAction("P", throwIfNotFound: true);
|
||||
m_Player_U = m_Player.FindAction("U", throwIfNotFound: true);
|
||||
m_Player_D = m_Player.FindAction("D", throwIfNotFound: true);
|
||||
}
|
||||
|
||||
~@PlayerInputActions()
|
||||
{
|
||||
UnityEngine.Debug.Assert(!m_Player.enabled, "This will cause a leak and performance issues, PlayerInputActions.Player.Disable() has not been called.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Destroys this asset and all associated <see cref="InputAction"/> instances.
|
||||
/// </summary>
|
||||
public void Dispose()
|
||||
{
|
||||
UnityEngine.Object.Destroy(asset);
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="UnityEngine.InputSystem.InputActionAsset.bindingMask" />
|
||||
public InputBinding? bindingMask
|
||||
{
|
||||
get => asset.bindingMask;
|
||||
set => asset.bindingMask = value;
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="UnityEngine.InputSystem.InputActionAsset.devices" />
|
||||
public ReadOnlyArray<InputDevice>? devices
|
||||
{
|
||||
get => asset.devices;
|
||||
set => asset.devices = value;
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="UnityEngine.InputSystem.InputActionAsset.controlSchemes" />
|
||||
public ReadOnlyArray<InputControlScheme> controlSchemes => asset.controlSchemes;
|
||||
|
||||
/// <inheritdoc cref="UnityEngine.InputSystem.InputActionAsset.Contains(InputAction)" />
|
||||
public bool Contains(InputAction action)
|
||||
{
|
||||
return asset.Contains(action);
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="UnityEngine.InputSystem.InputActionAsset.GetEnumerator()" />
|
||||
public IEnumerator<InputAction> GetEnumerator()
|
||||
{
|
||||
return asset.GetEnumerator();
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="IEnumerable.GetEnumerator()" />
|
||||
IEnumerator IEnumerable.GetEnumerator()
|
||||
{
|
||||
return GetEnumerator();
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="UnityEngine.InputSystem.InputActionAsset.Enable()" />
|
||||
public void Enable()
|
||||
{
|
||||
asset.Enable();
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="UnityEngine.InputSystem.InputActionAsset.Disable()" />
|
||||
public void Disable()
|
||||
{
|
||||
asset.Disable();
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="UnityEngine.InputSystem.InputActionAsset.bindings" />
|
||||
public IEnumerable<InputBinding> bindings => asset.bindings;
|
||||
|
||||
/// <inheritdoc cref="UnityEngine.InputSystem.InputActionAsset.FindAction(string, bool)" />
|
||||
public InputAction FindAction(string actionNameOrId, bool throwIfNotFound = false)
|
||||
{
|
||||
return asset.FindAction(actionNameOrId, throwIfNotFound);
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="UnityEngine.InputSystem.InputActionAsset.FindBinding(InputBinding, out InputAction)" />
|
||||
public int FindBinding(InputBinding bindingMask, out InputAction action)
|
||||
{
|
||||
return asset.FindBinding(bindingMask, out action);
|
||||
}
|
||||
|
||||
// Player
|
||||
private readonly InputActionMap m_Player;
|
||||
private List<IPlayerActions> m_PlayerActionsCallbackInterfaces = new List<IPlayerActions>();
|
||||
private readonly InputAction m_Player_R;
|
||||
private readonly InputAction m_Player_P;
|
||||
private readonly InputAction m_Player_U;
|
||||
private readonly InputAction m_Player_D;
|
||||
/// <summary>
|
||||
/// Provides access to input actions defined in input action map "Player".
|
||||
/// </summary>
|
||||
public struct PlayerActions
|
||||
{
|
||||
private @PlayerInputActions m_Wrapper;
|
||||
|
||||
/// <summary>
|
||||
/// Construct a new instance of the input action map wrapper class.
|
||||
/// </summary>
|
||||
public PlayerActions(@PlayerInputActions wrapper) { m_Wrapper = wrapper; }
|
||||
/// <summary>
|
||||
/// Provides access to the underlying input action "Player/R".
|
||||
/// </summary>
|
||||
public InputAction @R => m_Wrapper.m_Player_R;
|
||||
/// <summary>
|
||||
/// Provides access to the underlying input action "Player/P".
|
||||
/// </summary>
|
||||
public InputAction @P => m_Wrapper.m_Player_P;
|
||||
/// <summary>
|
||||
/// Provides access to the underlying input action "Player/U".
|
||||
/// </summary>
|
||||
public InputAction @U => m_Wrapper.m_Player_U;
|
||||
/// <summary>
|
||||
/// Provides access to the underlying input action "Player/D".
|
||||
/// </summary>
|
||||
public InputAction @D => m_Wrapper.m_Player_D;
|
||||
/// <summary>
|
||||
/// Provides access to the underlying input action map instance.
|
||||
/// </summary>
|
||||
public InputActionMap Get() { return m_Wrapper.m_Player; }
|
||||
/// <inheritdoc cref="UnityEngine.InputSystem.InputActionMap.Enable()" />
|
||||
public void Enable() { Get().Enable(); }
|
||||
/// <inheritdoc cref="UnityEngine.InputSystem.InputActionMap.Disable()" />
|
||||
public void Disable() { Get().Disable(); }
|
||||
/// <inheritdoc cref="UnityEngine.InputSystem.InputActionMap.enabled" />
|
||||
public bool enabled => Get().enabled;
|
||||
/// <summary>
|
||||
/// Implicitly converts an <see ref="PlayerActions" /> to an <see ref="InputActionMap" /> instance.
|
||||
/// </summary>
|
||||
public static implicit operator InputActionMap(PlayerActions set) { return set.Get(); }
|
||||
/// <summary>
|
||||
/// Adds <see cref="InputAction.started"/>, <see cref="InputAction.performed"/> and <see cref="InputAction.canceled"/> callbacks provided via <param cref="instance" /> on all input actions contained in this map.
|
||||
/// </summary>
|
||||
/// <param name="instance">Callback instance.</param>
|
||||
/// <remarks>
|
||||
/// If <paramref name="instance" /> is <c>null</c> or <paramref name="instance"/> have already been added this method does nothing.
|
||||
/// </remarks>
|
||||
/// <seealso cref="PlayerActions" />
|
||||
public void AddCallbacks(IPlayerActions instance)
|
||||
{
|
||||
if (instance == null || m_Wrapper.m_PlayerActionsCallbackInterfaces.Contains(instance)) return;
|
||||
m_Wrapper.m_PlayerActionsCallbackInterfaces.Add(instance);
|
||||
@R.started += instance.OnR;
|
||||
@R.performed += instance.OnR;
|
||||
@R.canceled += instance.OnR;
|
||||
@P.started += instance.OnP;
|
||||
@P.performed += instance.OnP;
|
||||
@P.canceled += instance.OnP;
|
||||
@U.started += instance.OnU;
|
||||
@U.performed += instance.OnU;
|
||||
@U.canceled += instance.OnU;
|
||||
@D.started += instance.OnD;
|
||||
@D.performed += instance.OnD;
|
||||
@D.canceled += instance.OnD;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Removes <see cref="InputAction.started"/>, <see cref="InputAction.performed"/> and <see cref="InputAction.canceled"/> callbacks provided via <param cref="instance" /> on all input actions contained in this map.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Calling this method when <paramref name="instance" /> have not previously been registered has no side-effects.
|
||||
/// </remarks>
|
||||
/// <seealso cref="PlayerActions" />
|
||||
private void UnregisterCallbacks(IPlayerActions instance)
|
||||
{
|
||||
@R.started -= instance.OnR;
|
||||
@R.performed -= instance.OnR;
|
||||
@R.canceled -= instance.OnR;
|
||||
@P.started -= instance.OnP;
|
||||
@P.performed -= instance.OnP;
|
||||
@P.canceled -= instance.OnP;
|
||||
@U.started -= instance.OnU;
|
||||
@U.performed -= instance.OnU;
|
||||
@U.canceled -= instance.OnU;
|
||||
@D.started -= instance.OnD;
|
||||
@D.performed -= instance.OnD;
|
||||
@D.canceled -= instance.OnD;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Unregisters <param cref="instance" /> and unregisters all input action callbacks via <see cref="PlayerActions.UnregisterCallbacks(IPlayerActions)" />.
|
||||
/// </summary>
|
||||
/// <seealso cref="PlayerActions.UnregisterCallbacks(IPlayerActions)" />
|
||||
public void RemoveCallbacks(IPlayerActions instance)
|
||||
{
|
||||
if (m_Wrapper.m_PlayerActionsCallbackInterfaces.Remove(instance))
|
||||
UnregisterCallbacks(instance);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Replaces all existing callback instances and previously registered input action callbacks associated with them with callbacks provided via <param cref="instance" />.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// If <paramref name="instance" /> is <c>null</c>, calling this method will only unregister all existing callbacks but not register any new callbacks.
|
||||
/// </remarks>
|
||||
/// <seealso cref="PlayerActions.AddCallbacks(IPlayerActions)" />
|
||||
/// <seealso cref="PlayerActions.RemoveCallbacks(IPlayerActions)" />
|
||||
/// <seealso cref="PlayerActions.UnregisterCallbacks(IPlayerActions)" />
|
||||
public void SetCallbacks(IPlayerActions instance)
|
||||
{
|
||||
foreach (var item in m_Wrapper.m_PlayerActionsCallbackInterfaces)
|
||||
UnregisterCallbacks(item);
|
||||
m_Wrapper.m_PlayerActionsCallbackInterfaces.Clear();
|
||||
AddCallbacks(instance);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Provides a new <see cref="PlayerActions" /> instance referencing this action map.
|
||||
/// </summary>
|
||||
public PlayerActions @Player => new PlayerActions(this);
|
||||
/// <summary>
|
||||
/// Interface to implement callback methods for all input action callbacks associated with input actions defined by "Player" which allows adding and removing callbacks.
|
||||
/// </summary>
|
||||
/// <seealso cref="PlayerActions.AddCallbacks(IPlayerActions)" />
|
||||
/// <seealso cref="PlayerActions.RemoveCallbacks(IPlayerActions)" />
|
||||
public interface IPlayerActions
|
||||
{
|
||||
/// <summary>
|
||||
/// Method invoked when associated input action "R" is either <see cref="UnityEngine.InputSystem.InputAction.started" />, <see cref="UnityEngine.InputSystem.InputAction.performed" /> or <see cref="UnityEngine.InputSystem.InputAction.canceled" />.
|
||||
/// </summary>
|
||||
/// <seealso cref="UnityEngine.InputSystem.InputAction.started" />
|
||||
/// <seealso cref="UnityEngine.InputSystem.InputAction.performed" />
|
||||
/// <seealso cref="UnityEngine.InputSystem.InputAction.canceled" />
|
||||
void OnR(InputAction.CallbackContext context);
|
||||
/// <summary>
|
||||
/// Method invoked when associated input action "P" is either <see cref="UnityEngine.InputSystem.InputAction.started" />, <see cref="UnityEngine.InputSystem.InputAction.performed" /> or <see cref="UnityEngine.InputSystem.InputAction.canceled" />.
|
||||
/// </summary>
|
||||
/// <seealso cref="UnityEngine.InputSystem.InputAction.started" />
|
||||
/// <seealso cref="UnityEngine.InputSystem.InputAction.performed" />
|
||||
/// <seealso cref="UnityEngine.InputSystem.InputAction.canceled" />
|
||||
void OnP(InputAction.CallbackContext context);
|
||||
/// <summary>
|
||||
/// Method invoked when associated input action "U" is either <see cref="UnityEngine.InputSystem.InputAction.started" />, <see cref="UnityEngine.InputSystem.InputAction.performed" /> or <see cref="UnityEngine.InputSystem.InputAction.canceled" />.
|
||||
/// </summary>
|
||||
/// <seealso cref="UnityEngine.InputSystem.InputAction.started" />
|
||||
/// <seealso cref="UnityEngine.InputSystem.InputAction.performed" />
|
||||
/// <seealso cref="UnityEngine.InputSystem.InputAction.canceled" />
|
||||
void OnU(InputAction.CallbackContext context);
|
||||
/// <summary>
|
||||
/// Method invoked when associated input action "D" is either <see cref="UnityEngine.InputSystem.InputAction.started" />, <see cref="UnityEngine.InputSystem.InputAction.performed" /> or <see cref="UnityEngine.InputSystem.InputAction.canceled" />.
|
||||
/// </summary>
|
||||
/// <seealso cref="UnityEngine.InputSystem.InputAction.started" />
|
||||
/// <seealso cref="UnityEngine.InputSystem.InputAction.performed" />
|
||||
/// <seealso cref="UnityEngine.InputSystem.InputAction.canceled" />
|
||||
void OnD(InputAction.CallbackContext context);
|
||||
}
|
||||
}
|
||||
2
Assets/Scripting/PlayerInputActions.cs.meta
Normal file
2
Assets/Scripting/PlayerInputActions.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e4cf5f71e577fe64090e08b4caf7377f
|
||||
94
Assets/Scripting/PlayerInputActions.inputactions
Normal file
94
Assets/Scripting/PlayerInputActions.inputactions
Normal file
@@ -0,0 +1,94 @@
|
||||
{
|
||||
"name": "PlayerInputActions",
|
||||
"maps": [
|
||||
{
|
||||
"name": "Player",
|
||||
"id": "82815556-132e-49d6-8fca-b06edd932024",
|
||||
"actions": [
|
||||
{
|
||||
"name": "R",
|
||||
"type": "Button",
|
||||
"id": "01ce2e4e-fc8e-4cc8-9b94-366a22e89c9f",
|
||||
"expectedControlType": "",
|
||||
"processors": "",
|
||||
"interactions": "",
|
||||
"initialStateCheck": false
|
||||
},
|
||||
{
|
||||
"name": "P",
|
||||
"type": "Button",
|
||||
"id": "9a5aadb3-d54f-4808-a656-07f79f54a44c",
|
||||
"expectedControlType": "",
|
||||
"processors": "",
|
||||
"interactions": "",
|
||||
"initialStateCheck": false
|
||||
},
|
||||
{
|
||||
"name": "U",
|
||||
"type": "Button",
|
||||
"id": "b7641136-088e-4c90-8036-88a6c96027cf",
|
||||
"expectedControlType": "",
|
||||
"processors": "",
|
||||
"interactions": "",
|
||||
"initialStateCheck": false
|
||||
},
|
||||
{
|
||||
"name": "D",
|
||||
"type": "Button",
|
||||
"id": "2078562a-bcac-4034-8435-4d09d5662b90",
|
||||
"expectedControlType": "",
|
||||
"processors": "",
|
||||
"interactions": "",
|
||||
"initialStateCheck": false
|
||||
}
|
||||
],
|
||||
"bindings": [
|
||||
{
|
||||
"name": "",
|
||||
"id": "cac63c8b-ac74-4c56-9ae5-304c4bd98115",
|
||||
"path": "<Keyboard>/r",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "",
|
||||
"action": "R",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"id": "8d628790-58fe-40a0-9794-cc1385ab0e46",
|
||||
"path": "<Keyboard>/p",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "",
|
||||
"action": "P",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"id": "6722f789-b46d-494b-b1f5-ac158cdf784c",
|
||||
"path": "<Keyboard>/u",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "",
|
||||
"action": "U",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"id": "c7afe6a4-4565-46d0-bfe5-e27c8a5b5ac0",
|
||||
"path": "<Keyboard>/d",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "",
|
||||
"action": "D",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"controlSchemes": []
|
||||
}
|
||||
14
Assets/Scripting/PlayerInputActions.inputactions.meta
Normal file
14
Assets/Scripting/PlayerInputActions.inputactions.meta
Normal file
@@ -0,0 +1,14 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 46cf0cb27cb69524f8eae00dc3fe8eb0
|
||||
ScriptedImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
script: {fileID: 11500000, guid: 8404be70184654265930450def6a9037, type: 3}
|
||||
generateWrapperCode: 1
|
||||
wrapperCodePath:
|
||||
wrapperClassName:
|
||||
wrapperCodeNamespace:
|
||||
8
Assets/Scripting/Robot.meta
Normal file
8
Assets/Scripting/Robot.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 14f80c6c49fdaff41b0b04cea1c0f448
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
6114
Assets/Scripting/Robot/AMR.cs
Normal file
6114
Assets/Scripting/Robot/AMR.cs
Normal file
File diff suppressed because it is too large
Load Diff
2
Assets/Scripting/Robot/AMR.cs.meta
Normal file
2
Assets/Scripting/Robot/AMR.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b3ef713dec000114695d1df96efa8e36
|
||||
778
Assets/Scripting/Robot/ActionExecutor.cs
Normal file
778
Assets/Scripting/Robot/ActionExecutor.cs
Normal file
@@ -0,0 +1,778 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using UnityEngine;
|
||||
|
||||
public class ActionExecutor
|
||||
{
|
||||
private readonly MonoBehaviour monoBehaviour;
|
||||
private readonly AnimationControllerAPM animationController;
|
||||
private readonly ActionStateSender actionStateSender;
|
||||
private readonly Transform transform;
|
||||
private volatile bool isCancelled;
|
||||
private readonly float rotationSpeed = 180f; // Tốc độ xoay (độ/giây)
|
||||
private readonly float moveSpeed; // Tốc độ di chuyển từ AMR.defaultSpeed
|
||||
private readonly float checkPalletRadius; // Bán kính kiểm tra pallet
|
||||
private readonly float checkPalletMaxDistance; // Khoảng cách kiểm tra pallet
|
||||
private readonly LayerMask checkPalletTargetMask; // LayerMask kiểm tra pallet
|
||||
private readonly bool isDebuggingPalletCheck; // Bật/tắt debug vùng kiểm tra pallet
|
||||
|
||||
public ActionExecutor(
|
||||
MonoBehaviour monoBehaviour,
|
||||
AnimationControllerAPM animationController,
|
||||
ActionStateSender actionStateSender,
|
||||
Transform transform,
|
||||
float moveSpeed,
|
||||
float checkPalletRadius,
|
||||
float checkPalletMaxDistance,
|
||||
LayerMask checkPalletTargetMask,
|
||||
bool isDebuggingPalletCheck)
|
||||
{
|
||||
this.monoBehaviour = monoBehaviour;
|
||||
this.animationController = animationController;
|
||||
this.actionStateSender = actionStateSender;
|
||||
this.transform = transform;
|
||||
this.moveSpeed = moveSpeed;
|
||||
this.checkPalletRadius = checkPalletRadius;
|
||||
this.checkPalletMaxDistance = checkPalletMaxDistance;
|
||||
this.checkPalletTargetMask = checkPalletTargetMask;
|
||||
this.isDebuggingPalletCheck = isDebuggingPalletCheck;
|
||||
this.isCancelled = false;
|
||||
|
||||
if (animationController != null)
|
||||
{
|
||||
animationController.OnAnimationStateChanged += OnAnimationStateChanged;
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.LogError("AnimationControllerAPM is null in ActionExecutor constructor!");
|
||||
}
|
||||
}
|
||||
|
||||
public void CancelActions()
|
||||
{
|
||||
isCancelled = true;
|
||||
Debug.Log("Đã hủy thực thi actions.");
|
||||
}
|
||||
|
||||
public IEnumerator ExecuteNodeActions(Node node)
|
||||
{
|
||||
if (node == null || node.Actions == null || node.Actions.Length == 0)
|
||||
{
|
||||
yield break;
|
||||
}
|
||||
|
||||
foreach (var action in node.Actions)
|
||||
{
|
||||
if (isCancelled)
|
||||
{
|
||||
Debug.Log($"Hủy thực thi actions tại node {node.NodeDescription} do isCancelled=true.");
|
||||
yield break;
|
||||
}
|
||||
|
||||
// Gửi trạng thái WAITING
|
||||
yield return actionStateSender.SendActionStateAsync(
|
||||
action,
|
||||
node.NodeId,
|
||||
"NODE",
|
||||
"WAITING",
|
||||
"Action is waiting to start");
|
||||
|
||||
// Thực thi hành động
|
||||
ExecutionResult execResult = null;
|
||||
yield return monoBehaviour.StartCoroutine(ExecuteAction(action, node, result => execResult = result));
|
||||
|
||||
bool isActionSuccessful = execResult != null && execResult.IsActionSuccessful;
|
||||
string actionStatus = execResult != null ? execResult.ActionStatus : "FAILED";
|
||||
string resultDescription = execResult != null ? execResult.ResultDescription : "Unknown error";
|
||||
|
||||
// Gửi trạng thái cuối cùng
|
||||
yield return actionStateSender.SendActionStateAsync(
|
||||
action,
|
||||
node.NodeId,
|
||||
"NODE",
|
||||
actionStatus,
|
||||
resultDescription);
|
||||
|
||||
// Nếu hành động HARD thất bại, dừng lại
|
||||
if (action.BlockingType == "HARD" && actionStatus != "FINISHED")
|
||||
{
|
||||
Debug.LogError($"Action {action.ActionId} tại node {node.NodeDescription} có blockingType HARD nhưng không hoàn tất (status: {actionStatus}). Bỏ qua các hành động tiếp theo trong node này.");
|
||||
if (action.ActionType == "checkPallet")
|
||||
{
|
||||
isCancelled = true;
|
||||
yield return actionStateSender.SendCancelOrder(node, action);
|
||||
yield break;
|
||||
}
|
||||
yield break;
|
||||
}
|
||||
|
||||
// Đợi hành động HARD hoàn tất (pick, drop, rotation, moveBackward, startInPallet)
|
||||
if (isActionSuccessful && action.BlockingType == "HARD")
|
||||
{
|
||||
if (action.ActionType == "rotation")
|
||||
{
|
||||
float rotationAngle = GetRotationAngle(action);
|
||||
if (rotationAngle != 0f)
|
||||
{
|
||||
yield return monoBehaviour.StartCoroutine(RotateRobot(rotationAngle));
|
||||
}
|
||||
else
|
||||
{
|
||||
isActionSuccessful = false;
|
||||
actionStatus = "FAILED";
|
||||
resultDescription = "Invalid rotation angle";
|
||||
}
|
||||
}
|
||||
else if (action.ActionType == "moveBackward")
|
||||
{
|
||||
float distance = GetBackwardDistance(action);
|
||||
if (distance > 0f)
|
||||
{
|
||||
yield return monoBehaviour.StartCoroutine(MoveBackward(distance));
|
||||
}
|
||||
else
|
||||
{
|
||||
isActionSuccessful = false;
|
||||
actionStatus = "FAILED";
|
||||
resultDescription = "Invalid or non-positive backward distance";
|
||||
}
|
||||
}
|
||||
else if (action.ActionType == "startInPallet")
|
||||
{
|
||||
float x = 0f, y = 0f, theta = 0f, speed = moveSpeed;
|
||||
bool hasValidParams = ParseStartInPalletParams(action, out x, out y, out theta, out speed);
|
||||
if (hasValidParams)
|
||||
{
|
||||
yield return monoBehaviour.StartCoroutine(MoveToPalletPosition(x, y, theta, speed));
|
||||
}
|
||||
else
|
||||
{
|
||||
isActionSuccessful = false;
|
||||
actionStatus = "FAILED";
|
||||
resultDescription = "Invalid or missing parameters for startInPallet";
|
||||
}
|
||||
}
|
||||
|
||||
// Gửi lại trạng thái nếu có lỗi
|
||||
if (!isActionSuccessful)
|
||||
{
|
||||
yield return actionStateSender.SendActionStateAsync(
|
||||
action,
|
||||
node.NodeId,
|
||||
"NODE",
|
||||
actionStatus,
|
||||
resultDescription);
|
||||
}
|
||||
}
|
||||
|
||||
// Kiểm tra trạng thái sau khi thực thi
|
||||
if (action.BlockingType == "HARD" && actionStatus != "FINISHED")
|
||||
{
|
||||
Debug.LogError($"Action {action.ActionType} (ActionId: {action.ActionId}) failed with status {actionStatus}. Stopping further actions in node {node.NodeDescription}.");
|
||||
yield break;
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Log($"Action {action.ActionType} (ActionId: {action.ActionId}) completed with status {actionStatus}. Proceeding to next action.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Helper class for execution result
|
||||
private class ExecutionResult
|
||||
{
|
||||
public bool IsActionSuccessful { get; set; }
|
||||
public string ActionStatus { get; set; }
|
||||
public string ResultDescription { get; set; }
|
||||
}
|
||||
|
||||
public IEnumerator ExecuteEdgeAction(Edge edge, ActionData action)
|
||||
{
|
||||
if (isCancelled)
|
||||
{
|
||||
Debug.Log($"Hủy thực thi action {action.ActionType} tại edge {edge.EdgeDescription} do isCancelled=true.");
|
||||
yield break;
|
||||
}
|
||||
|
||||
// Gửi trạng thái WAITING
|
||||
yield return actionStateSender.SendActionStateAsync(
|
||||
action,
|
||||
edge.EdgeId,
|
||||
"EDGE",
|
||||
"WAITING",
|
||||
"Action is waiting to start");
|
||||
|
||||
// Gửi trạng thái RUNNING
|
||||
yield return actionStateSender.SendActionStateAsync(
|
||||
action,
|
||||
edge.EdgeId,
|
||||
"EDGE",
|
||||
"RUNNING",
|
||||
"Action is running");
|
||||
|
||||
string actionStatus = "FINISHED";
|
||||
string resultDescription = "Action executed successfully";
|
||||
bool needYield = false;
|
||||
float x = 0f, y = 0f, theta = 0f, speed = moveSpeed;
|
||||
|
||||
// Xử lý hành động trong một khối try-catch riêng
|
||||
try
|
||||
{
|
||||
switch (action.ActionType)
|
||||
{
|
||||
case "backwardNavigation":
|
||||
break;
|
||||
|
||||
case "pick":
|
||||
case "drop":
|
||||
if (animationController != null)
|
||||
{
|
||||
if (action.ActionType == "pick")
|
||||
animationController.OnKey2(); // Gắn pallet vào fork trong OnKey2
|
||||
else
|
||||
animationController.OnKey1(); // Tách pallet khỏi fork trong OnKey1
|
||||
}
|
||||
else
|
||||
{
|
||||
actionStatus = "FAILED";
|
||||
resultDescription = "AnimationControllerAPM not found";
|
||||
}
|
||||
break;
|
||||
|
||||
case "startInPallet":
|
||||
bool hasValidParams = ParseStartInPalletParams(action, out x, out y, out theta, out speed);
|
||||
if (hasValidParams)
|
||||
{
|
||||
needYield = true; // Đánh dấu cần yield coroutine
|
||||
}
|
||||
else
|
||||
{
|
||||
actionStatus = "FAILED";
|
||||
resultDescription = "Invalid or missing parameters for startInPallet";
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
actionStatus = "FAILED";
|
||||
resultDescription = $"Unsupported ActionType: {action.ActionType}";
|
||||
break;
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
actionStatus = "FAILED";
|
||||
resultDescription = $"Action failed: {ex.Message}";
|
||||
}
|
||||
|
||||
// Xử lý yield ngoài khối try-catch
|
||||
if (needYield && actionStatus == "FINISHED")
|
||||
{
|
||||
yield return monoBehaviour.StartCoroutine(MoveToPalletPosition(x, y, theta, speed));
|
||||
}
|
||||
|
||||
// Gửi trạng thái cuối cùng
|
||||
yield return actionStateSender.SendActionStateAsync(
|
||||
action,
|
||||
edge.EdgeId,
|
||||
"EDGE",
|
||||
actionStatus,
|
||||
resultDescription);
|
||||
|
||||
// Nếu hành động HARD thất bại, hủy di chuyển
|
||||
if (action.BlockingType == "HARD" && actionStatus != "FINISHED")
|
||||
{
|
||||
isCancelled = true;
|
||||
}
|
||||
}
|
||||
private IEnumerator WaitForAnimation(string actionType, float timeout, Action<bool> onComplete)
|
||||
{
|
||||
bool animationCompleted = false;
|
||||
float elapsed = 0f;
|
||||
|
||||
void OnAnimationState(string type, string state)
|
||||
{
|
||||
if (type == actionType && state == "FINISHED")
|
||||
{
|
||||
animationCompleted = true;
|
||||
Debug.Log($"Animation {actionType} hoàn tất qua callback.");
|
||||
}
|
||||
}
|
||||
|
||||
animationController.OnAnimationStateChanged += OnAnimationState;
|
||||
|
||||
// Fallback: Kiểm tra trạng thái Animator nếu Animation Events không hoạt động
|
||||
Animator animator = animationController?.GetComponent<Animator>();
|
||||
string expectedState = actionType == "pick" ? "Up" : "Down";
|
||||
|
||||
while (!animationCompleted && elapsed < timeout && !isCancelled)
|
||||
{
|
||||
if (animator != null)
|
||||
{
|
||||
AnimatorStateInfo stateInfo = animator.GetCurrentAnimatorStateInfo(0);
|
||||
if (stateInfo.IsName(expectedState) && stateInfo.normalizedTime >= 1f)
|
||||
{
|
||||
animationCompleted = true;
|
||||
Debug.Log($"Animation {actionType} hoàn tất qua polling.");
|
||||
}
|
||||
}
|
||||
elapsed += Time.deltaTime;
|
||||
yield return null;
|
||||
}
|
||||
|
||||
animationController.OnAnimationStateChanged -= OnAnimationState;
|
||||
|
||||
bool success = animationCompleted && !isCancelled;
|
||||
onComplete?.Invoke(success);
|
||||
|
||||
if (!success)
|
||||
{
|
||||
Debug.LogWarning($"Animation {actionType} không hoàn tất: completed={animationCompleted}, cancelled={isCancelled}, timeout={timeout}s");
|
||||
}
|
||||
}
|
||||
private IEnumerator ExecuteAction(ActionData action, Node node, Action<ExecutionResult> callback)
|
||||
{
|
||||
var result = new ExecutionResult
|
||||
{
|
||||
IsActionSuccessful = true,
|
||||
ActionStatus = "FINISHED",
|
||||
ResultDescription = "Action executed successfully"
|
||||
};
|
||||
|
||||
bool needToYieldCancelOrder = false;
|
||||
bool needToYieldMovement = false;
|
||||
bool needToYieldAnimation = false;
|
||||
float x = 0f, y = 0f, theta = 0f, speed = moveSpeed;
|
||||
|
||||
try
|
||||
{
|
||||
switch (action.ActionType)
|
||||
{
|
||||
case "pick":
|
||||
case "drop":
|
||||
if (animationController != null)
|
||||
{
|
||||
if (action.ActionType == "pick")
|
||||
animationController.OnKey2(); // Gắn pallet vào fork
|
||||
else
|
||||
animationController.OnKey1(); // Tách pallet khỏi fork
|
||||
needToYieldAnimation = true; // Đánh dấu cần đợi animation
|
||||
}
|
||||
else
|
||||
{
|
||||
result.IsActionSuccessful = false;
|
||||
result.ActionStatus = "FAILED";
|
||||
result.ResultDescription = "AnimationControllerAPM not found";
|
||||
}
|
||||
break;
|
||||
|
||||
case "rotation":
|
||||
float rotationAngle = GetRotationAngle(action);
|
||||
if (rotationAngle != 0f)
|
||||
{
|
||||
if (action.BlockingType != "HARD")
|
||||
{
|
||||
monoBehaviour.StartCoroutine(RotateRobot(rotationAngle));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
result.IsActionSuccessful = false;
|
||||
result.ActionStatus = "FAILED";
|
||||
result.ResultDescription = "Invalid or missing rotation angle in parameters";
|
||||
}
|
||||
break;
|
||||
|
||||
case "moveBackward":
|
||||
float distance = GetBackwardDistance(action);
|
||||
if (distance > 0f)
|
||||
{
|
||||
if (action.BlockingType != "HARD")
|
||||
{
|
||||
monoBehaviour.StartCoroutine(MoveBackward(distance));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
result.IsActionSuccessful = false;
|
||||
result.ActionStatus = "FAILED";
|
||||
result.ResultDescription = "Invalid or non-positive backward distance in parameters";
|
||||
}
|
||||
break;
|
||||
|
||||
case "checkPallet":
|
||||
bool palletDetected = CheckPallet(action);
|
||||
if (palletDetected)
|
||||
{
|
||||
result.ActionStatus = "FINISHED";
|
||||
result.ResultDescription = "Pallet detected successfully";
|
||||
}
|
||||
else
|
||||
{
|
||||
result.IsActionSuccessful = false;
|
||||
result.ActionStatus = "FAILED";
|
||||
result.ResultDescription = "Không có pallet";
|
||||
needToYieldCancelOrder = true;
|
||||
}
|
||||
break;
|
||||
|
||||
case "startInPallet":
|
||||
bool hasValidParams = ParseStartInPalletParams(action, out x, out y, out theta, out speed);
|
||||
if (hasValidParams)
|
||||
{
|
||||
needToYieldMovement = true; // Đánh dấu cần di chuyển
|
||||
}
|
||||
else
|
||||
{
|
||||
result.IsActionSuccessful = false;
|
||||
result.ActionStatus = "FAILED";
|
||||
result.ResultDescription = "Invalid or missing parameters for startInPallet";
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
result.IsActionSuccessful = false;
|
||||
result.ActionStatus = "FAILED";
|
||||
result.ResultDescription = $"Unsupported ActionType: {action.ActionType}";
|
||||
break;
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
result.IsActionSuccessful = false;
|
||||
result.ActionStatus = "FAILED";
|
||||
result.ResultDescription = $"Action failed: {ex.Message}";
|
||||
Debug.LogError($"Lỗi khi thực thi action {action.ActionType} tại node {node.NodeDescription}: {ex.Message}");
|
||||
}
|
||||
|
||||
// Xử lý các yield ngoài khối try-catch
|
||||
if (needToYieldAnimation && result.ActionStatus == "FINISHED")
|
||||
{
|
||||
float animationDuration = animationController.GetAnimationDuration(action.ActionType);
|
||||
if (animationDuration <= 0f)
|
||||
{
|
||||
result.IsActionSuccessful = false;
|
||||
result.ActionStatus = "FAILED";
|
||||
result.ResultDescription = "Invalid animation duration";
|
||||
Debug.LogError($"Invalid animation duration for {action.ActionType}. Check AnimationControllerAPM clip names.");
|
||||
}
|
||||
else
|
||||
{
|
||||
bool animationSuccess = false;
|
||||
yield return monoBehaviour.StartCoroutine(WaitForAnimation(action.ActionType, animationDuration + 1f, success => animationSuccess = success));
|
||||
if (!animationSuccess)
|
||||
{
|
||||
result.IsActionSuccessful = false;
|
||||
result.ActionStatus = "FAILED";
|
||||
result.ResultDescription = "Animation did not complete within timeout or was cancelled";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (needToYieldMovement && result.ActionStatus == "FINISHED")
|
||||
{
|
||||
yield return monoBehaviour.StartCoroutine(MoveToPalletPosition(x, y, theta, speed));
|
||||
}
|
||||
|
||||
// Gọi callback với kết quả
|
||||
callback?.Invoke(result);
|
||||
|
||||
// Xử lý hủy order nếu cần
|
||||
if (needToYieldCancelOrder)
|
||||
{
|
||||
yield return actionStateSender.SendCancelOrder(node, action);
|
||||
}
|
||||
}
|
||||
|
||||
private bool ParseStartInPalletParams(ActionData action, out float x, out float y, out float theta, out float speed)
|
||||
{
|
||||
x = 0f;
|
||||
y = 0f;
|
||||
theta = 0f;
|
||||
speed = moveSpeed; // Tốc độ mặc định nếu không được cung cấp
|
||||
|
||||
if (action.Parameters == null || action.Parameters.Length == 0)
|
||||
{
|
||||
Debug.LogWarning($"Action parameters are null or empty for startInPallet action (ActionId: {action.ActionId}).");
|
||||
return false;
|
||||
}
|
||||
|
||||
bool hasX = false, hasY = false, hasTheta = false;
|
||||
|
||||
foreach (var param in action.Parameters)
|
||||
{
|
||||
if (param.Key == "X" && float.TryParse(param.Value.ToString(), out float parsedX))
|
||||
{
|
||||
x = parsedX;
|
||||
hasX = true;
|
||||
}
|
||||
else if (param.Key == "Y" && float.TryParse(param.Value.ToString(), out float parsedY))
|
||||
{
|
||||
y = parsedY;
|
||||
hasY = true;
|
||||
}
|
||||
else if (param.Key == "Theta" && float.TryParse(param.Value.ToString(), out float parsedTheta))
|
||||
{
|
||||
theta = parsedTheta;
|
||||
hasTheta = true;
|
||||
}
|
||||
else if (param.Key == "speed" && float.TryParse(param.Value.ToString(), out float parsedSpeed) && parsedSpeed > 0f)
|
||||
{
|
||||
speed = parsedSpeed;
|
||||
Debug.Log($"Sử dụng tốc độ từ actionParameters: {speed} m/s");
|
||||
}
|
||||
}
|
||||
|
||||
if (!hasX || !hasY || !hasTheta)
|
||||
{
|
||||
Debug.LogWarning($"Missing parameters for startInPallet action (ActionId: {action.ActionId}). Required: X, Y, Theta. Found: X={hasX}, Y={hasY}, Theta={hasTheta}");
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
private IEnumerator MoveToPalletPosition(float x, float y, float theta, float speed)
|
||||
{
|
||||
if (isCancelled)
|
||||
{
|
||||
Debug.Log("Hủy di chuyển đến vị trí pallet do isCancelled=true.");
|
||||
yield break;
|
||||
}
|
||||
|
||||
// Kiểm tra pallet trước khi di chuyển
|
||||
if (!CheckPallet(null)) // Gọi CheckPallet với action null để sử dụng tham số mặc định
|
||||
{
|
||||
Debug.LogWarning("Không phát hiện pallet trước khi thực hiện startInPallet, nhưng vẫn tiếp tục di chuyển.");
|
||||
}
|
||||
|
||||
Vector3 targetPosition = new Vector3(x, transform.position.y, y);
|
||||
float distance = Vector3.Distance(transform.position, targetPosition);
|
||||
|
||||
if (distance <= 0.01f)
|
||||
{
|
||||
Debug.LogWarning("Distance to pallet position is too small, skipping movement.");
|
||||
yield break;
|
||||
}
|
||||
|
||||
// Di chuyển đến vị trí (x, y)
|
||||
Vector3 startPosition = transform.position;
|
||||
float elapsed = 0f;
|
||||
float duration = distance / speed;
|
||||
|
||||
while (elapsed < duration && !isCancelled)
|
||||
{
|
||||
float t = elapsed / duration;
|
||||
transform.position = Vector3.Lerp(startPosition, targetPosition, t);
|
||||
elapsed += Time.deltaTime;
|
||||
yield return null;
|
||||
}
|
||||
|
||||
if (!isCancelled)
|
||||
{
|
||||
transform.position = targetPosition;
|
||||
Debug.Log($"Hoàn thành di chuyển đến vị trí pallet ({x}, {y}) với tốc độ {speed} m/s.");
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Log("Hủy di chuyển đến vị trí pallet do isCancelled=true.");
|
||||
yield break;
|
||||
}
|
||||
|
||||
// Không xoay, giữ nguyên góc hiện tại
|
||||
Debug.Log($"Không xoay sau khi di chuyển đến vị trí pallet: giữ góc hiện tại, Unity eulerAngles.y={transform.eulerAngles.y:F2}°");
|
||||
}
|
||||
|
||||
private bool CheckPallet(ActionData action)
|
||||
{
|
||||
float radius = checkPalletRadius;
|
||||
float maxDistance = checkPalletMaxDistance;
|
||||
LayerMask targetMask = checkPalletTargetMask;
|
||||
|
||||
if (action?.Parameters != null)
|
||||
{
|
||||
foreach (var param in action.Parameters)
|
||||
{
|
||||
if (param.Key == "radius" && float.TryParse(param.Value.ToString(), out float parsedRadius))
|
||||
{
|
||||
radius = parsedRadius;
|
||||
Debug.Log($"Sử dụng radius từ actionParameters: {radius}");
|
||||
}
|
||||
else if (param.Key == "distance" && float.TryParse(param.Value.ToString(), out float parsedDistance))
|
||||
{
|
||||
maxDistance = parsedDistance;
|
||||
Debug.Log($"Sử dụng maxDistance từ actionParameters: {maxDistance}");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Vector3 origin = transform.position;
|
||||
Vector3 direction = transform.right; // Thay đổi từ transform.forward sang transform.right để kiểm tra theo trục X
|
||||
Vector3 endPoint = origin + direction * maxDistance;
|
||||
|
||||
// Hiển thị vùng kiểm tra pallet khi bật debug
|
||||
if (isDebuggingPalletCheck)
|
||||
{
|
||||
// Vẽ đường từ vị trí robot đến điểm kiểm tra (sử dụng Debug.DrawRay để tương thích với runtime)
|
||||
Debug.DrawRay(origin, direction * maxDistance, Color.green, 0.1f);
|
||||
}
|
||||
|
||||
Collider[] hits = Physics.OverlapSphere(endPoint, radius, targetMask);
|
||||
foreach (var hit in hits)
|
||||
{
|
||||
if (hit.CompareTag("Pallet") || hit.name.Contains("Pallet"))
|
||||
{
|
||||
Debug.Log($"Phát hiện pallet tại node: {hit.name} (vị trí: {endPoint})");
|
||||
|
||||
if (animationController != null)
|
||||
{
|
||||
animationController.pallet = hit.transform;
|
||||
Debug.Log($"Đã gán pallet {hit.name} vào AnimationControllerAPM.pallet.");
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.LogWarning("AnimationControllerAPM là null, không thể gán pallet.");
|
||||
}
|
||||
|
||||
return true; // Phát hiện pallet
|
||||
}
|
||||
}
|
||||
|
||||
Debug.Log($"Không phát hiện pallet tại điểm kiểm tra (vị trí: {endPoint})");
|
||||
|
||||
if (animationController != null)
|
||||
{
|
||||
animationController.pallet = null;
|
||||
Debug.Log("Không tìm thấy pallet, đặt AnimationControllerAPM.pallet thành null.");
|
||||
}
|
||||
|
||||
return false; // Không phát hiện pallet
|
||||
}
|
||||
private float GetRotationAngle(ActionData action)
|
||||
{
|
||||
if (action.Parameters == null || action.Parameters.Length == 0)
|
||||
{
|
||||
Debug.LogWarning($"Action parameters are null or empty for rotation action (ActionId: {action.ActionId}).");
|
||||
return 0f;
|
||||
}
|
||||
|
||||
foreach (var param in action.Parameters)
|
||||
{
|
||||
if (param.Key == "ro")
|
||||
{
|
||||
Debug.Log($"Found rotation parameter 'ro' with value: {param.Value} for ActionId: {action.ActionId}");
|
||||
if (float.TryParse(param.Value.ToString(), out float angle))
|
||||
{
|
||||
return angle;
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.LogWarning($"Invalid rotation parameter value: {param.Value} for ActionId: {action.ActionId}");
|
||||
return 0f;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Debug.LogWarning($"Rotation parameter 'ro' not found in action parameters for ActionId: {action.ActionId}.");
|
||||
return 0f;
|
||||
}
|
||||
|
||||
private float GetBackwardDistance(ActionData action)
|
||||
{
|
||||
if (action.Parameters == null || action.Parameters.Length == 0)
|
||||
{
|
||||
Debug.LogWarning($"Action parameters are null or empty for moveBackward action (ActionId: {action.ActionId}).");
|
||||
return 0f;
|
||||
}
|
||||
|
||||
foreach (var param in action.Parameters)
|
||||
{
|
||||
if (param.Key == "distance")
|
||||
{
|
||||
if (float.TryParse(param.Value.ToString(), out float distance) && distance > 0f)
|
||||
{
|
||||
Debug.Log($"Found backward distance parameter 'distance' with value: {distance} for ActionId: {action.ActionId}");
|
||||
return distance;
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.LogWarning($"Invalid backward distance value: {param.Value} (must be positive) for ActionId: {action.ActionId}");
|
||||
return 0f;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Debug.LogWarning($"Backward distance parameter 'distance' not found in action parameters for ActionId: {action.ActionId}.");
|
||||
return 0f;
|
||||
}
|
||||
|
||||
private IEnumerator RotateRobot(float angleRad)
|
||||
{
|
||||
if (Mathf.Approximately(angleRad, 0f))
|
||||
{
|
||||
Debug.LogWarning("Rotation angle is zero, skipping rotation.");
|
||||
yield break;
|
||||
}
|
||||
|
||||
float angleDeg = angleRad * Mathf.Rad2Deg;
|
||||
Quaternion startRotation = transform.rotation;
|
||||
Quaternion targetRotation = startRotation * Quaternion.Euler(0f, angleDeg, 0f);
|
||||
float elapsed = 0f;
|
||||
float duration = Mathf.Abs(angleDeg) / rotationSpeed;
|
||||
|
||||
while (elapsed < duration && !isCancelled)
|
||||
{
|
||||
float t = elapsed / duration;
|
||||
transform.rotation = Quaternion.Slerp(startRotation, targetRotation, t);
|
||||
elapsed += Time.deltaTime;
|
||||
yield return null;
|
||||
}
|
||||
|
||||
if (!isCancelled)
|
||||
{
|
||||
transform.rotation = targetRotation;
|
||||
Debug.Log($"Hoàn thành xoay {angleRad} rad ({angleDeg} độ).");
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Log("Hủy xoay do isCancelled=true.");
|
||||
}
|
||||
}
|
||||
|
||||
private IEnumerator MoveBackward(float distance)
|
||||
{
|
||||
if (distance <= 0f)
|
||||
{
|
||||
Debug.LogWarning("Backward distance is zero or negative, skipping moveBackward.");
|
||||
yield break;
|
||||
}
|
||||
|
||||
Vector3 startPosition = transform.position;
|
||||
Vector3 direction = -transform.forward; // Hướng ngược lại
|
||||
Vector3 targetPosition = startPosition + direction * distance;
|
||||
float elapsed = 0f;
|
||||
float duration = distance / moveSpeed;
|
||||
|
||||
while (elapsed < duration && !isCancelled)
|
||||
{
|
||||
float t = elapsed / duration;
|
||||
transform.position = Vector3.Lerp(startPosition, targetPosition, t);
|
||||
elapsed += Time.deltaTime;
|
||||
yield return null;
|
||||
}
|
||||
|
||||
if (!isCancelled)
|
||||
{
|
||||
transform.position = targetPosition;
|
||||
Debug.Log($"Hoàn thành đi lùi {distance} mét.");
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Log("Hủy đi lùi do isCancelled=true.");
|
||||
}
|
||||
}
|
||||
|
||||
private void OnAnimationStateChanged(string actionType, string state)
|
||||
{
|
||||
Debug.Log($"Animation state changed: {actionType} -> {state}");
|
||||
}
|
||||
}
|
||||
2
Assets/Scripting/Robot/ActionExecutor.cs.meta
Normal file
2
Assets/Scripting/Robot/ActionExecutor.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4aa787d0618948746860649f325e4055
|
||||
393
Assets/Scripting/Robot/ActionStateSender.cs
Normal file
393
Assets/Scripting/Robot/ActionStateSender.cs
Normal file
@@ -0,0 +1,393 @@
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using UnityEngine;
|
||||
|
||||
public class ActionStateSender
|
||||
{
|
||||
private readonly MqttClientManager mqttClientManager;
|
||||
private readonly OrderProcessor orderProcessor;
|
||||
private readonly AnimationControllerAPM animationController;
|
||||
private readonly string stateTopic;
|
||||
private readonly string instantActionsTopic;
|
||||
private readonly string serialNumber;
|
||||
private readonly string currentMapId;
|
||||
private readonly PathMover pathMover;
|
||||
private uint headerIdCounter;
|
||||
|
||||
public ActionStateSender(
|
||||
MqttClientManager mqttClientManager,
|
||||
OrderProcessor orderProcessor,
|
||||
AnimationControllerAPM animationController,
|
||||
string stateTopic,
|
||||
string instantActionsTopic,
|
||||
string serialNumber,
|
||||
string currentMapId,
|
||||
PathMover pathMover)
|
||||
{
|
||||
this.mqttClientManager = mqttClientManager;
|
||||
this.orderProcessor = orderProcessor;
|
||||
this.animationController = animationController;
|
||||
this.stateTopic = stateTopic;
|
||||
this.instantActionsTopic = instantActionsTopic;
|
||||
this.serialNumber = serialNumber;
|
||||
this.currentMapId = currentMapId;
|
||||
this.pathMover = pathMover;
|
||||
this.headerIdCounter = 0;
|
||||
}
|
||||
|
||||
public async void ProcessInstantActionJson(string json)
|
||||
{
|
||||
try
|
||||
{
|
||||
InstantActionData instantAction = await Task.Run(() => JsonConvert.DeserializeObject<InstantActionData>(json));
|
||||
if (instantAction.Actions != null)
|
||||
{
|
||||
foreach (var action in instantAction.Actions)
|
||||
{
|
||||
if (action == null) continue;
|
||||
|
||||
Debug.Log($"Nhận được instant action: ActionType={action.ActionType}, ActionId={action.ActionId ?? "null"}, SerialNumber={serialNumber}");
|
||||
|
||||
if (instantAction.SerialNumber != serialNumber)
|
||||
{
|
||||
Debug.LogWarning($"Action có serialNumber ({instantAction.SerialNumber}) không khớp với serialNumber của robot ({serialNumber}). Bỏ qua.");
|
||||
continue;
|
||||
}
|
||||
|
||||
switch (action.ActionType)
|
||||
{
|
||||
case "cancelOrder":
|
||||
Debug.Log($"Nhận được lệnh cancelOrder, ActionId: {(action.ActionId ?? "null")}, SerialNumber: {serialNumber}, HeaderId: {instantAction.HeaderId}");
|
||||
//await SendActionConfirmation(instantAction, action, "FINISHED", "Hủy nhiệm vụ thành công");
|
||||
UnityMainThreadDispatcher.Enqueue(() => orderProcessor.CancelOrder());
|
||||
break;
|
||||
|
||||
case "pick":
|
||||
if (animationController != null)
|
||||
{
|
||||
UnityMainThreadDispatcher.Enqueue(() =>
|
||||
{
|
||||
animationController.OnKey2();
|
||||
Debug.Log($"Đã kích hoạt animation U cho instant action: {action.ActionType}");
|
||||
});
|
||||
//await SendActionConfirmation(instantAction, action, "FINISHED", "Animation U triggered successfully");
|
||||
}
|
||||
else
|
||||
{
|
||||
//await SendActionConfirmation(instantAction, action, "FAILED", "AnimationControllerAPM not found");
|
||||
}
|
||||
break;
|
||||
|
||||
case "drop":
|
||||
if (animationController != null)
|
||||
{
|
||||
UnityMainThreadDispatcher.Enqueue(() =>
|
||||
{
|
||||
animationController.OnKey1();
|
||||
Debug.Log($"Đã kích hoạt animation D cho instant action: {action.ActionType}");
|
||||
});
|
||||
//await SendActionConfirmation(instantAction, action, "FINISHED", "Animation D triggered successfully");
|
||||
}
|
||||
else
|
||||
{
|
||||
//await SendActionConfirmation(instantAction, action, "FAILED", "AnimationControllerAPM not found");
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
Debug.LogWarning($"Instant ActionType không được hỗ trợ: {action.ActionType}, SerialNumber: {serialNumber}");
|
||||
//await SendActionConfirmation(instantAction, action, "FAILED", $"Unsupported ActionType: {action.ActionType}");
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Debug.LogError($"Lỗi khi phân tích JSON instant action cho robot với serialNumber {serialNumber}: {ex.Message}");
|
||||
}
|
||||
}
|
||||
|
||||
public async Task SendActionStateAsync(
|
||||
ActionData action,
|
||||
string referenceId,
|
||||
string referenceType,
|
||||
string actionStatus,
|
||||
string resultDescription)
|
||||
{
|
||||
try
|
||||
{
|
||||
// Cập nhật trạng thái hành động trong ActionData
|
||||
action.ActionStatus = actionStatus;
|
||||
action.ActionDescription = resultDescription;
|
||||
|
||||
var actionState = new ActionState
|
||||
{
|
||||
ActionId = string.IsNullOrEmpty(action.ActionId) ? Guid.NewGuid().ToString() : action.ActionId,
|
||||
ActionType = action.ActionType,
|
||||
ActionDescription = action.ActionDescription ?? "",
|
||||
ActionStatus = actionStatus,
|
||||
};
|
||||
|
||||
var stateData = new SendState
|
||||
{
|
||||
HeaderId = headerIdCounter++,
|
||||
Timestamp = DateTime.UtcNow.ToString("yyyy-MM-ddTHH:mm:ss.fffZ"),
|
||||
Version = "1.0.0",
|
||||
Manufacturer = "phenikaaX",
|
||||
SerialNumber = serialNumber,
|
||||
Maps = new Map[]
|
||||
{
|
||||
new Map
|
||||
{
|
||||
MapId = currentMapId,
|
||||
MapVersion = "1.0",
|
||||
MapDescription = "Default map",
|
||||
MapStatus = "ENABLED"
|
||||
}
|
||||
},
|
||||
OrderId = orderProcessor?.OrderId ?? "",
|
||||
OrderUpdateId = orderProcessor?.OrderId != null ? 1 : 0,
|
||||
ZoneSetId = "",
|
||||
LastNodeId = orderProcessor?.LastNodeId ?? "",
|
||||
LastNodeSequenceId = orderProcessor?.LastNodeSequenceId ?? 0,
|
||||
NodeStates = orderProcessor?.CurrentOrder?.Nodes?.Select(n => new NodeState
|
||||
{
|
||||
NodeId = n.NodeId,
|
||||
SequenceId = n.SequenceId,
|
||||
NodeDescription = n.NodeDescription ?? "",
|
||||
Released = n.Released,
|
||||
NodePosition = new NodePosition
|
||||
{
|
||||
X = n.NodePosition.X,
|
||||
Y = n.NodePosition.Y,
|
||||
Theta = n.NodePosition.Theta,
|
||||
AllowedDeviationXY = n.NodePosition.AllowedDeviationXY,
|
||||
AllowedDeviationTheta = n.NodePosition.AllowedDeviationTheta,
|
||||
MapId = n.NodePosition.MapId,
|
||||
MapDescription = n.NodePosition.MapDescription ?? ""
|
||||
}
|
||||
}).ToArray() ?? new NodeState[0],
|
||||
EdgeStates = orderProcessor?.CurrentOrder?.Edges?.Select(e => new EdgeState
|
||||
{
|
||||
EdgeId = e.EdgeId,
|
||||
SequenceId = e.SequenceId,
|
||||
EdgeDescription = e.EdgeDescription ?? "",
|
||||
Released = e.Released,
|
||||
Trajectory = e.Trajectory != null ? new Trajectory
|
||||
{
|
||||
Degree = e.Trajectory.Degree,
|
||||
KnotVector = e.Trajectory.KnotVector,
|
||||
ControlPoints = e.Trajectory.ControlPoints?.Select(cp => new ControlPoint
|
||||
{
|
||||
X = cp.X,
|
||||
Y = cp.Y,
|
||||
Weight = cp.Weight
|
||||
}).ToArray()
|
||||
} : null
|
||||
}).ToArray() ?? new EdgeState[0],
|
||||
Driving = pathMover?.IsMoving ?? false,
|
||||
Paused = !(pathMover?.IsMoving ?? false),
|
||||
NewBaseRequest = !(pathMover?.IsMoving ?? false),
|
||||
DistanceSinceLastNode = 1.531483174223427f,
|
||||
AgvPosition = new AgvPosition
|
||||
{
|
||||
X = 0f, // Will be updated by VisualizationSender
|
||||
Y = 0f,
|
||||
Theta = 0f,
|
||||
MapId = currentMapId,
|
||||
MapDescription = "",
|
||||
PositionInitialized = true,
|
||||
LocalizationScore = 0.7f,
|
||||
DeviationRange = 0.1f
|
||||
},
|
||||
Velocity = new Velocity
|
||||
{
|
||||
Vx = 0f,
|
||||
Vy = 0f,
|
||||
Omega = 0f
|
||||
},
|
||||
Loads = new Load[0],
|
||||
ActionStates = new[] { actionState },
|
||||
BatteryState = new BatteryState
|
||||
{
|
||||
BatteryCharge = 80f,
|
||||
BatteryVoltage = 48f,
|
||||
BatteryHealth = 100f,
|
||||
Charging = false,
|
||||
Reach = 1000f
|
||||
},
|
||||
OperatingMode = "AUTOMATIC",
|
||||
Errors = new Error[0],
|
||||
Information = new Information[0],
|
||||
SafetyState = new SafetyState
|
||||
{
|
||||
EStop = "NONE",
|
||||
FieldViolation = false
|
||||
}
|
||||
};
|
||||
|
||||
string json = JsonConvert.SerializeObject(stateData, Formatting.None);
|
||||
await mqttClientManager.PublishAsync(stateTopic, json);
|
||||
Debug.Log($"Đã gửi trạng thái action {action.ActionType} ({referenceType} {referenceId}): {actionStatus} - {resultDescription}");
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
private async Task SendActionConfirmation(InstantActionData instantAction, ActionData action, string actionStatus, string resultDescription)
|
||||
{
|
||||
try
|
||||
{
|
||||
var confirmation = new CancelConfirmationData
|
||||
{
|
||||
HeaderId = instantAction.HeaderId,
|
||||
Timestamp = DateTime.UtcNow.ToString("yyyy-MM-ddTHH:mm:ss.fffZ"),
|
||||
Version = instantAction.Version ?? "0.0.1",
|
||||
Manufacturer = instantAction.Manufacturer ?? "phenikaaX",
|
||||
SerialNumber = instantAction.SerialNumber ?? serialNumber,
|
||||
ActionStates = new[]
|
||||
{
|
||||
new ActionState
|
||||
{
|
||||
ActionId = string.IsNullOrEmpty(action.ActionId) ? Guid.NewGuid().ToString() : action.ActionId,
|
||||
ActionType = action.ActionType,
|
||||
ActionStatus = actionStatus,
|
||||
ResultDescription = resultDescription
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
string confirmationJson = JsonConvert.SerializeObject(confirmation, Formatting.None);
|
||||
await mqttClientManager.PublishAsync(stateTopic, confirmationJson);
|
||||
Debug.Log($"Đã gửi xác nhận action {action.ActionType} lên topic {stateTopic}: {confirmationJson}");
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Debug.LogError($"Lỗi khi gửi xác nhận action {action.ActionType}: {ex.Message}");
|
||||
}
|
||||
}
|
||||
|
||||
public IEnumerator SendCancelOrder(Node node, ActionData action)
|
||||
{
|
||||
if (node is null)
|
||||
{
|
||||
yield break;
|
||||
}
|
||||
|
||||
if (action is null)
|
||||
{
|
||||
yield break;
|
||||
}
|
||||
|
||||
// Kiểm tra orderProcessor
|
||||
if (orderProcessor == null)
|
||||
{
|
||||
// Gửi thông báo hủy qua MQTT mà không cần orderProcessor
|
||||
var cancelOrderDataWithoutProcessor = new
|
||||
{
|
||||
HeaderId = headerIdCounter++,
|
||||
Timestamp = DateTime.UtcNow.ToString("yyyy-MM-ddTHH:mm:ss.fffZ"),
|
||||
Version = "0.0.1",
|
||||
Manufacturer = "phenikaaX",
|
||||
SerialNumber = serialNumber ?? "unknown",
|
||||
Actions = new[]
|
||||
{
|
||||
new
|
||||
{
|
||||
ActionType = "cancelOrder",
|
||||
ActionId = Guid.NewGuid().ToString(),
|
||||
ActionDescription = $"Không có pallet tại node {node.NodeDescription}",
|
||||
BlockingType = "NONE",
|
||||
ActionParameters = new[]
|
||||
{
|
||||
new { Key = "ORDER_ID", Value = "unknown" },
|
||||
new { Key = "REASON", Value = "Không có pallet" }
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
string cancelJson = JsonConvert.SerializeObject(cancelOrderDataWithoutProcessor, Formatting.None);
|
||||
|
||||
if (mqttClientManager != null)
|
||||
{
|
||||
Task publishTask = mqttClientManager.PublishAsync(instantActionsTopic, cancelJson);
|
||||
while (!publishTask.IsCompleted)
|
||||
{
|
||||
yield return null;
|
||||
}
|
||||
if (publishTask.IsFaulted)
|
||||
{
|
||||
Debug.LogError($"Lỗi khi gửi JSON cancelOrder: {publishTask.Exception?.Message}");
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Log($"Đã gửi JSON cancelOrder lên topic instantActions: {cancelJson}");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.LogError("MqttClientManager is null. Cannot send cancel order message.");
|
||||
}
|
||||
yield break;
|
||||
}
|
||||
|
||||
// Hủy order ngay lập tức
|
||||
UnityMainThreadDispatcher.Enqueue(() => orderProcessor.CancelOrder());
|
||||
Debug.Log($"Đã hủy order với OrderId: {orderProcessor.OrderId ?? "N/A"} do không có pallet tại node {node.NodeDescription}");
|
||||
|
||||
// Tạo JSON hủy order
|
||||
var cancelOrderDataWithProcessor = new
|
||||
{
|
||||
HeaderId = headerIdCounter++,
|
||||
Timestamp = DateTime.UtcNow.ToString("yyyy-MM-ddTHH:mm:ss.fffZ"),
|
||||
Version = "0.0.1",
|
||||
Manufacturer = "phenikaaX",
|
||||
SerialNumber = orderProcessor.SerialNumber ?? "unknown",
|
||||
Actions = new[]
|
||||
{
|
||||
new
|
||||
{
|
||||
ActionType = "cancelOrder",
|
||||
ActionId = Guid.NewGuid().ToString(),
|
||||
ActionDescription = $"Không có pallet tại node {node.NodeDescription}",
|
||||
BlockingType = "NONE",
|
||||
ActionParameters = new[]
|
||||
{
|
||||
new { Key = "ORDER_ID", Value = orderProcessor.OrderId ?? "" },
|
||||
new { Key = "REASON", Value = "Không có pallet" }
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
// Gửi JSON qua MQTT
|
||||
if (mqttClientManager != null)
|
||||
{
|
||||
string cancelJson = JsonConvert.SerializeObject(cancelOrderDataWithProcessor, Formatting.None);
|
||||
|
||||
Task publishTask = mqttClientManager.PublishAsync(instantActionsTopic, cancelJson);
|
||||
while (!publishTask.IsCompleted)
|
||||
{
|
||||
yield return null;
|
||||
}
|
||||
if (publishTask.IsFaulted)
|
||||
{
|
||||
Debug.LogError($"Lỗi khi gửi JSON cancelOrder: {publishTask.Exception?.Message}");
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Log($"Đã gửi JSON cancelOrder lên topic instantActions: {cancelJson}");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.LogError("MqttClientManager is null. Cannot send cancel order message.");
|
||||
}
|
||||
}
|
||||
}
|
||||
2
Assets/Scripting/Robot/ActionStateSender.cs.meta
Normal file
2
Assets/Scripting/Robot/ActionStateSender.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c2b26dc08b2cc7249a81b521ea27a641
|
||||
381
Assets/Scripting/Robot/GameObjectTimeline.playable
Normal file
381
Assets/Scripting/Robot/GameObjectTimeline.playable
Normal file
@@ -0,0 +1,381 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &-8995895463826435607
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 05acc715f855ced458d76ee6f8ac6c61, type: 3}
|
||||
m_Name: Cinemachine Track
|
||||
m_EditorClassIdentifier:
|
||||
m_Version: 3
|
||||
m_AnimClip: {fileID: 0}
|
||||
m_Locked: 0
|
||||
m_Muted: 0
|
||||
m_CustomPlayableFullTypename:
|
||||
m_Curves: {fileID: 0}
|
||||
m_Parent: {fileID: 11400000}
|
||||
m_Children: []
|
||||
m_Clips:
|
||||
- m_Version: 1
|
||||
m_Start: 0
|
||||
m_ClipIn: 0
|
||||
m_Asset: {fileID: 2769284456360264383}
|
||||
m_Duration: 200
|
||||
m_TimeScale: 1
|
||||
m_ParentTrack: {fileID: -8995895463826435607}
|
||||
m_EaseInDuration: 0
|
||||
m_EaseOutDuration: 0
|
||||
m_BlendInDuration: -1
|
||||
m_BlendOutDuration: -1
|
||||
m_MixInCurve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 3
|
||||
time: 0
|
||||
value: 0
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0
|
||||
outWeight: 0
|
||||
- serializedVersion: 3
|
||||
time: 1
|
||||
value: 1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0
|
||||
outWeight: 0
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
m_MixOutCurve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 3
|
||||
time: 0
|
||||
value: 1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0
|
||||
outWeight: 0
|
||||
- serializedVersion: 3
|
||||
time: 1
|
||||
value: 0
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0
|
||||
outWeight: 0
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
m_BlendInCurveMode: 0
|
||||
m_BlendOutCurveMode: 0
|
||||
m_ExposedParameterNames: []
|
||||
m_AnimationCurves: {fileID: 0}
|
||||
m_Recordable: 0
|
||||
m_PostExtrapolationMode: 0
|
||||
m_PreExtrapolationMode: 0
|
||||
m_PostExtrapolationTime: 0
|
||||
m_PreExtrapolationTime: 0
|
||||
m_DisplayName: CinemachineShot
|
||||
m_Markers:
|
||||
m_Objects: []
|
||||
TrackPriority: 0
|
||||
--- !u!114 &-4820503243207489472
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: f1e95aa6d658d694785bfde37c857fff, type: 3}
|
||||
m_Name: RecorderClip
|
||||
m_EditorClassIdentifier:
|
||||
settings: {fileID: 8427519837969805819}
|
||||
--- !u!114 &-4667555978659030408
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 0e6cf5671577b7344ba25c25b4346ce4, type: 3}
|
||||
m_Name: Recorder Track
|
||||
m_EditorClassIdentifier:
|
||||
m_Version: 3
|
||||
m_AnimClip: {fileID: 0}
|
||||
m_Locked: 0
|
||||
m_Muted: 0
|
||||
m_CustomPlayableFullTypename:
|
||||
m_Curves: {fileID: 0}
|
||||
m_Parent: {fileID: 11400000}
|
||||
m_Children: []
|
||||
m_Clips:
|
||||
- m_Version: 1
|
||||
m_Start: 0
|
||||
m_ClipIn: 0
|
||||
m_Asset: {fileID: -4820503243207489472}
|
||||
m_Duration: 200
|
||||
m_TimeScale: 1
|
||||
m_ParentTrack: {fileID: -4667555978659030408}
|
||||
m_EaseInDuration: 0
|
||||
m_EaseOutDuration: 0
|
||||
m_BlendInDuration: 0
|
||||
m_BlendOutDuration: 0
|
||||
m_MixInCurve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 3
|
||||
time: 0
|
||||
value: 0
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0
|
||||
outWeight: 0
|
||||
- serializedVersion: 3
|
||||
time: 1
|
||||
value: 1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0
|
||||
outWeight: 0
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
m_MixOutCurve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 3
|
||||
time: 0
|
||||
value: 1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0
|
||||
outWeight: 0
|
||||
- serializedVersion: 3
|
||||
time: 1
|
||||
value: 0
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0
|
||||
outWeight: 0
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
m_BlendInCurveMode: 0
|
||||
m_BlendOutCurveMode: 0
|
||||
m_ExposedParameterNames: []
|
||||
m_AnimationCurves: {fileID: 0}
|
||||
m_Recordable: 0
|
||||
m_PostExtrapolationMode: 0
|
||||
m_PreExtrapolationMode: 0
|
||||
m_PostExtrapolationTime: 0
|
||||
m_PreExtrapolationTime: 0
|
||||
m_DisplayName: RecorderClip
|
||||
m_Markers:
|
||||
m_Objects: []
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: bfda56da833e2384a9677cd3c976a436, type: 3}
|
||||
m_Name: GameObjectTimeline
|
||||
m_EditorClassIdentifier:
|
||||
m_Version: 0
|
||||
m_Tracks:
|
||||
- {fileID: -8995895463826435607}
|
||||
- {fileID: -4667555978659030408}
|
||||
m_FixedDuration: 0
|
||||
m_EditorSettings:
|
||||
m_Framerate: 60
|
||||
m_ScenePreview: 1
|
||||
m_DurationMode: 0
|
||||
m_MarkerTrack: {fileID: 0}
|
||||
--- !u!114 &2769284456360264383
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 90fb794a295e73545af71bcdb7375791, type: 3}
|
||||
m_Name: CinemachineShot
|
||||
m_EditorClassIdentifier:
|
||||
DisplayName:
|
||||
VirtualCamera:
|
||||
exposedName:
|
||||
defaultValue: {fileID: 0}
|
||||
--- !u!114 &8427519837969805819
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 6fde0a8ac3e6b482c95fa602e65ab045, type: 3}
|
||||
m_Name: RecorderClip
|
||||
m_EditorClassIdentifier:
|
||||
enabled: 1
|
||||
take: 7
|
||||
captureEveryNthFrame: 1
|
||||
fileNameGenerator:
|
||||
m_Path:
|
||||
m_Root: 0
|
||||
m_Leaf: Recordings
|
||||
m_ForceAssetFolder: 0
|
||||
m_AbsolutePath:
|
||||
m_FileName: <Recorder>_<Take>
|
||||
encoderSettings:
|
||||
rid: 5465612107755290723
|
||||
captureAlpha: 0
|
||||
captureAudio: 1
|
||||
m_ImageInputSelector:
|
||||
m_Selected: gameViewInputSettings
|
||||
gameViewInputSettings:
|
||||
m_OutputResolution:
|
||||
m_CustomWidth: 1024
|
||||
m_CustomHeight: 1024
|
||||
imageHeight: 0
|
||||
maxSupportedHeight: 2160
|
||||
m_AspectRatio:
|
||||
m_CustomAspectX: 1
|
||||
m_CustomAspectY: 1
|
||||
m_ImageAspect: 1
|
||||
flipFinalOutput: 0
|
||||
cameraInputSettings:
|
||||
m_OutputResolution:
|
||||
m_CustomWidth: 1024
|
||||
m_CustomHeight: 1024
|
||||
imageHeight: 0
|
||||
maxSupportedHeight: 4320
|
||||
m_AspectRatio:
|
||||
m_CustomAspectX: 1
|
||||
m_CustomAspectY: 1
|
||||
m_ImageAspect: 1
|
||||
source: 2
|
||||
cameraTag:
|
||||
flipFinalOutput: 0
|
||||
captureUI: 0
|
||||
camera360InputSettings:
|
||||
source: 2
|
||||
cameraTag:
|
||||
flipFinalOutput: 0
|
||||
renderStereo: 1
|
||||
stereoSeparation: 0.065
|
||||
mapSize: 1024
|
||||
m_OutputWidth: 1024
|
||||
m_OutputHeight: 2048
|
||||
renderTextureInputSettings:
|
||||
renderTexture: {fileID: 0}
|
||||
flipFinalOutput: 0
|
||||
renderTextureSamplerSettings:
|
||||
source: 1
|
||||
m_RenderWidth: 1280
|
||||
m_RenderHeight: 720
|
||||
m_OutputWidth: 1280
|
||||
m_OutputHeight: 720
|
||||
outputAspectRatio:
|
||||
m_CustomAspectX: 1
|
||||
m_CustomAspectY: 1
|
||||
m_ImageAspect: 1
|
||||
superSampling: 1
|
||||
superKernelPower: 16
|
||||
superKernelScale: 1
|
||||
cameraTag:
|
||||
colorSpace: 0
|
||||
flipFinalOutput: 0
|
||||
m_AudioInputSettings:
|
||||
preserveAudio: 1
|
||||
_accumulationSettings:
|
||||
rid: 5465612107755290724
|
||||
outputFormat: 0
|
||||
encodingQuality: 2
|
||||
containerFormatSelected: 0
|
||||
encoderSelected: 0
|
||||
encoderPresetSelected: 0
|
||||
encoderPresetSelectedName:
|
||||
encoderPresetSelectedOptions:
|
||||
encoderPresetSelectedSuffixes:
|
||||
encoderColorDefinitionSelected: 0
|
||||
encoderCustomOptions:
|
||||
m_MovieRecorderVersion: 1
|
||||
references:
|
||||
version: 2
|
||||
RefIds:
|
||||
- rid: 5465612107755290723
|
||||
type: {class: CoreEncoderSettings, ns: UnityEditor.Recorder.Encoder, asm: Unity.Recorder.Editor}
|
||||
data:
|
||||
targetBitRate: 8
|
||||
gopSize: 25
|
||||
numConsecutiveBFrames: 2
|
||||
encodingProfile: 2
|
||||
keyframeDistance: 25
|
||||
codec: 0
|
||||
encodingQuality: 2
|
||||
- rid: 5465612107755290724
|
||||
type: {class: AccumulationSettings, ns: , asm: Unity.Recorder.Editor}
|
||||
data:
|
||||
captureAccumulation: 0
|
||||
samples: 1
|
||||
shutterInterval: 1
|
||||
shutterProfileType: 0
|
||||
shutterProfileCurve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 3
|
||||
time: 0
|
||||
value: 1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0
|
||||
outWeight: 0
|
||||
- serializedVersion: 3
|
||||
time: 1
|
||||
value: 1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0
|
||||
outWeight: 0
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
shutterFullyOpen: 0.25
|
||||
shutterBeginsClosing: 0.75
|
||||
useSubPixelJitter: 1
|
||||
8
Assets/Scripting/Robot/GameObjectTimeline.playable.meta
Normal file
8
Assets/Scripting/Robot/GameObjectTimeline.playable.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1db705b096781be4594bd90ce844c93f
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
9
Assets/Scripting/Robot/MainThreadDispatcher.cs
Normal file
9
Assets/Scripting/Robot/MainThreadDispatcher.cs
Normal file
@@ -0,0 +1,9 @@
|
||||
using UnityEngine;
|
||||
|
||||
public class MainThreadDispatcher : MonoBehaviour
|
||||
{
|
||||
private void Update()
|
||||
{
|
||||
UnityMainThreadDispatcher.Update();
|
||||
}
|
||||
}
|
||||
2
Assets/Scripting/Robot/MainThreadDispatcher.cs.meta
Normal file
2
Assets/Scripting/Robot/MainThreadDispatcher.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2a549a9912ffa1f4b9d7e5cade52a964
|
||||
145
Assets/Scripting/Robot/OrderProcessor.cs
Normal file
145
Assets/Scripting/Robot/OrderProcessor.cs
Normal file
@@ -0,0 +1,145 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using Newtonsoft.Json;
|
||||
using UnityEngine;
|
||||
|
||||
public class OrderProcessor
|
||||
{
|
||||
private readonly PathVisualizer pathVisualizer;
|
||||
private readonly PathMover pathMover;
|
||||
private readonly Transform transform;
|
||||
private string currentMapId;
|
||||
private readonly string serialNumber;
|
||||
private string lastNodeId;
|
||||
private string orderId;
|
||||
private int lastNodeSequenceId;
|
||||
private OrderData currentOrder;
|
||||
private readonly Queue<OrderData> orderQueue;
|
||||
private bool isProcessingOrder;
|
||||
|
||||
public OrderProcessor(PathVisualizer pathVisualizer, PathMover pathMover, Transform transform,
|
||||
string initialMapId, string serialNumber)
|
||||
{
|
||||
this.pathVisualizer = pathVisualizer;
|
||||
this.pathMover = pathMover;
|
||||
this.transform = transform;
|
||||
this.currentMapId = initialMapId;
|
||||
this.serialNumber = serialNumber;
|
||||
this.lastNodeId = null;
|
||||
this.orderId = null;
|
||||
this.lastNodeSequenceId = 0;
|
||||
this.currentOrder = null;
|
||||
this.orderQueue = new Queue<OrderData>();
|
||||
this.isProcessingOrder = false;
|
||||
|
||||
if (pathMover != null)
|
||||
{
|
||||
pathMover.OnMoveCompleted += OnMoveCompleted;
|
||||
}
|
||||
}
|
||||
|
||||
public string CurrentMapId => currentMapId;
|
||||
public string LastNodeId => lastNodeId;
|
||||
public string OrderId => orderId;
|
||||
public int LastNodeSequenceId => lastNodeSequenceId;
|
||||
public OrderData CurrentOrder => currentOrder;
|
||||
public string SerialNumber => serialNumber;
|
||||
|
||||
public async void ProcessOrderJson(string json)
|
||||
{
|
||||
try
|
||||
{
|
||||
OrderData order = await Task.Run(() => JsonConvert.DeserializeObject<OrderData>(json));
|
||||
|
||||
if (order.SerialNumber != serialNumber)
|
||||
{
|
||||
Debug.LogWarning($"SerialNumber trong JSON ({order.SerialNumber}) không khớp với serialNumber của robot ({serialNumber}).");
|
||||
return;
|
||||
}
|
||||
|
||||
lock (orderQueue)
|
||||
{
|
||||
orderQueue.Enqueue(order);
|
||||
}
|
||||
|
||||
if (!isProcessingOrder)
|
||||
{
|
||||
UnityMainThreadDispatcher.Enqueue(() => ProcessNextOrder());
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Debug.LogError($"Lỗi khi phân tích JSON: {ex.Message}, SerialNumber: {serialNumber}");
|
||||
}
|
||||
}
|
||||
|
||||
private void ProcessNextOrder()
|
||||
{
|
||||
if (isProcessingOrder)
|
||||
{
|
||||
Debug.Log($"Đang xử lý order, không thể bắt đầu order mới. SerialNumber: {serialNumber}");
|
||||
return;
|
||||
}
|
||||
|
||||
lock (orderQueue)
|
||||
{
|
||||
if (orderQueue.Count == 0)
|
||||
{
|
||||
Debug.Log($"Hàng đợi order trống. SerialNumber: {serialNumber}");
|
||||
return;
|
||||
}
|
||||
|
||||
isProcessingOrder = true;
|
||||
currentOrder = orderQueue.Dequeue();
|
||||
}
|
||||
|
||||
orderId = currentOrder.OrderId;
|
||||
|
||||
var lastNode = currentOrder.Nodes.OrderByDescending(n => n.SequenceId).FirstOrDefault();
|
||||
lastNodeId = lastNode?.NodeId ?? "";
|
||||
lastNodeSequenceId = lastNode?.SequenceId ?? 0;
|
||||
|
||||
string newMapId = currentOrder.Nodes.FirstOrDefault()?.NodePosition.MapId;
|
||||
if (!string.IsNullOrEmpty(newMapId))
|
||||
{
|
||||
currentMapId = newMapId;
|
||||
}
|
||||
|
||||
pathVisualizer.DrawPath(currentOrder.Nodes, currentOrder.Edges);
|
||||
pathMover.StartMove(currentOrder.Nodes, currentOrder.Edges);
|
||||
}
|
||||
|
||||
private void OnMoveCompleted()
|
||||
{
|
||||
Debug.Log($"Hoàn thành order. OrderId: {orderId}, SerialNumber: {serialNumber}");
|
||||
|
||||
lastNodeId = "";
|
||||
orderId = "";
|
||||
lastNodeSequenceId = 0;
|
||||
currentOrder = null;
|
||||
isProcessingOrder = false;
|
||||
|
||||
ProcessNextOrder();
|
||||
}
|
||||
|
||||
public void CancelOrder()
|
||||
{
|
||||
pathMover.CancelMove();
|
||||
pathVisualizer.ClearPath();
|
||||
lastNodeId = "";
|
||||
orderId = "";
|
||||
lastNodeSequenceId = 0;
|
||||
currentOrder = null;
|
||||
|
||||
lock (orderQueue)
|
||||
{
|
||||
orderQueue.Clear();
|
||||
Debug.Log($"Đã hủy order hiện tại và xóa hàng đợi. SerialNumber: {serialNumber}");
|
||||
}
|
||||
|
||||
isProcessingOrder = false;
|
||||
Debug.Log($"Đã hủy nhiệm vụ. SerialNumber: {serialNumber}");
|
||||
}
|
||||
}
|
||||
2
Assets/Scripting/Robot/OrderProcessor.cs.meta
Normal file
2
Assets/Scripting/Robot/OrderProcessor.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9461eea78d7ab1b42a75393b8636e54c
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user