정합성/ui
This commit is contained in:
4049
Assets/Prefabs/Canvas_Library.prefab
Normal file
4049
Assets/Prefabs/Canvas_Library.prefab
Normal file
File diff suppressed because it is too large
Load Diff
7
Assets/Prefabs/Canvas_Library.prefab.meta
Normal file
7
Assets/Prefabs/Canvas_Library.prefab.meta
Normal file
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d8c9eb2a0c47b494a936ab4f05ac9623
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
230
Assets/Resources/BubbleUI.prefab
Normal file
230
Assets/Resources/BubbleUI.prefab
Normal file
@@ -0,0 +1,230 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &4241215396963091630
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 2755101199226849326}
|
||||
- component: {fileID: 7495036409506831421}
|
||||
- component: {fileID: 2959744261684156557}
|
||||
m_Layer: 5
|
||||
m_Name: Text (TMP)
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &2755101199226849326
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4241215396963091630}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 6670826217856903638}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &7495036409506831421
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4241215396963091630}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &2959744261684156557
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4241215396963091630}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_text: New Text
|
||||
m_isRightToLeft: 0
|
||||
m_fontAsset: {fileID: 11400000, guid: 05bae3109f77490458ea729d51e7df78, type: 2}
|
||||
m_sharedMaterial: {fileID: -7290017371581542385, guid: 05bae3109f77490458ea729d51e7df78, type: 2}
|
||||
m_fontSharedMaterials: []
|
||||
m_fontMaterial: {fileID: 0}
|
||||
m_fontMaterials: []
|
||||
m_fontColor32:
|
||||
serializedVersion: 2
|
||||
rgba: 4278190080
|
||||
m_fontColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
m_enableVertexGradient: 0
|
||||
m_colorMode: 3
|
||||
m_fontColorGradient:
|
||||
topLeft: {r: 1, g: 1, b: 1, a: 1}
|
||||
topRight: {r: 1, g: 1, b: 1, a: 1}
|
||||
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
|
||||
bottomRight: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_fontColorGradientPreset: {fileID: 0}
|
||||
m_spriteAsset: {fileID: 0}
|
||||
m_tintAllSprites: 0
|
||||
m_StyleSheet: {fileID: 0}
|
||||
m_TextStyleHashCode: -1183493901
|
||||
m_overrideHtmlColors: 0
|
||||
m_faceColor:
|
||||
serializedVersion: 2
|
||||
rgba: 4294967295
|
||||
m_fontSize: 18
|
||||
m_fontSizeBase: 18
|
||||
m_fontWeight: 400
|
||||
m_enableAutoSizing: 0
|
||||
m_fontSizeMin: 18
|
||||
m_fontSizeMax: 72
|
||||
m_fontStyle: 1
|
||||
m_HorizontalAlignment: 2
|
||||
m_VerticalAlignment: 512
|
||||
m_textAlignment: 65535
|
||||
m_characterSpacing: 0
|
||||
m_wordSpacing: 0
|
||||
m_lineSpacing: 0
|
||||
m_lineSpacingMax: 0
|
||||
m_paragraphSpacing: 0
|
||||
m_charWidthMaxAdj: 0
|
||||
m_TextWrappingMode: 0
|
||||
m_wordWrappingRatios: 0.4
|
||||
m_overflowMode: 0
|
||||
m_linkedTextComponent: {fileID: 0}
|
||||
parentLinkedComponent: {fileID: 0}
|
||||
m_enableKerning: 0
|
||||
m_ActiveFontFeatures: 6e72656b
|
||||
m_enableExtraPadding: 0
|
||||
checkPaddingRequired: 0
|
||||
m_isRichText: 1
|
||||
m_EmojiFallbackSupport: 1
|
||||
m_parseCtrlCharacters: 1
|
||||
m_isOrthographic: 1
|
||||
m_isCullingEnabled: 0
|
||||
m_horizontalMapping: 0
|
||||
m_verticalMapping: 0
|
||||
m_uvLineOffset: 0
|
||||
m_geometrySortingOrder: 0
|
||||
m_IsTextObjectScaleStatic: 0
|
||||
m_VertexBufferAutoSizeReduction: 0
|
||||
m_useMaxVisibleDescender: 1
|
||||
m_pageToDisplay: 1
|
||||
m_margin: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_isUsingLegacyAnimationComponent: 0
|
||||
m_isVolumetricText: 0
|
||||
m_hasFontAssetChanged: 0
|
||||
m_baseMaterial: {fileID: 0}
|
||||
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
|
||||
--- !u!1 &7932083815135180818
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 6670826217856903638}
|
||||
- component: {fileID: 5476817062972023011}
|
||||
- component: {fileID: 3649460406689858812}
|
||||
- component: {fileID: -539001808304557592}
|
||||
m_Layer: 5
|
||||
m_Name: BubbleUI
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &6670826217856903638
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7932083815135180818}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 2755101199226849326}
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 60, y: 15}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &5476817062972023011
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7932083815135180818}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &3649460406689858812
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7932083815135180818}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Sprite: {fileID: 0}
|
||||
m_Type: 0
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
m_FillMethod: 4
|
||||
m_FillAmount: 1
|
||||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
m_PixelsPerUnitMultiplier: 1
|
||||
--- !u!114 &-539001808304557592
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7932083815135180818}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: c9b008a8d2f09754a942d2f7c1367134, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
target: {fileID: 0}
|
||||
worldOffset: {x: 0, y: 0, z: 0}
|
||||
messageText: {fileID: 2959744261684156557}
|
||||
7
Assets/Resources/BubbleUI.prefab.meta
Normal file
7
Assets/Resources/BubbleUI.prefab.meta
Normal file
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f8d8d87683f7d974fb1a14d055fb8263
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -32,6 +32,7 @@ Transform:
|
||||
m_Children:
|
||||
- {fileID: 5535364212552884847}
|
||||
- {fileID: 414497630174355040}
|
||||
- {fileID: 340113977905215727}
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &6186946468553865181
|
||||
@@ -52,6 +53,9 @@ MonoBehaviour:
|
||||
prefabName:
|
||||
modelID:
|
||||
nodeID:
|
||||
DataBubbleSocket: {fileID: 340113977905215727}
|
||||
bubbleUIPrefab: {fileID: -539001808304557592, guid: f8d8d87683f7d974fb1a14d055fb8263, type: 3}
|
||||
currentBubble: {fileID: 0}
|
||||
eventKey:
|
||||
listProducts: []
|
||||
productPos: {fileID: 414497630174355040}
|
||||
@@ -118,6 +122,37 @@ BoxCollider:
|
||||
serializedVersion: 3
|
||||
m_Size: {x: 1, y: 1, z: 1}
|
||||
m_Center: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &5955114681487636968
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 340113977905215727}
|
||||
m_Layer: 0
|
||||
m_Name: BubbleSocket
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &340113977905215727
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5955114681487636968}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 7601693463947693784}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1001 &5429978928869705092
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
|
||||
@@ -1,5 +1,36 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &2352839737889670633
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 3945620513325696033}
|
||||
m_Layer: 0
|
||||
m_Name: BubbleSocket
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &3945620513325696033
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2352839737889670633}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 1, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 7242566744747594202}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &2699054045993086224
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -64,6 +95,7 @@ Transform:
|
||||
- {fileID: 377206244395683982}
|
||||
- {fileID: 4944395255821514270}
|
||||
- {fileID: 7471619554222518859}
|
||||
- {fileID: 3945620513325696033}
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &1476521013217735438
|
||||
@@ -79,9 +111,12 @@ MonoBehaviour:
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
modelName: AssemblyLine
|
||||
objectName:
|
||||
modelType: 2
|
||||
prefabName:
|
||||
modelID:
|
||||
nodeID:
|
||||
DataBubbleSocket: {fileID: 0}
|
||||
eventKey:
|
||||
moveTargetCargo: {fileID: 0}
|
||||
storedCargo: {fileID: 0}
|
||||
|
||||
@@ -1,5 +1,36 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &1562304695918946596
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1183634028199014266}
|
||||
m_Layer: 0
|
||||
m_Name: BubbleSocket
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &1183634028199014266
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1562304695918946596}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 1, z: -0.7}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 6053481281116128508}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &2682254222029196753
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -32,6 +63,7 @@ Transform:
|
||||
m_Children:
|
||||
- {fileID: 4942942637526331387}
|
||||
- {fileID: 6385394304813669100}
|
||||
- {fileID: 1183634028199014266}
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &7561954272858952850
|
||||
@@ -47,9 +79,12 @@ MonoBehaviour:
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
modelName: ForkLift
|
||||
objectName:
|
||||
modelType: 2
|
||||
prefabName:
|
||||
modelID:
|
||||
nodeID:
|
||||
DataBubbleSocket: {fileID: 1183634028199014266}
|
||||
eventKey:
|
||||
listProducts: []
|
||||
productPos: {fileID: 6385394304813669100}
|
||||
@@ -60,6 +95,9 @@ MonoBehaviour:
|
||||
onWait:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
destination: {fileID: 0}
|
||||
arrivalTime: 0
|
||||
elapsedTime: 0
|
||||
--- !u!1 &6138082612605327659
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
||||
@@ -32,6 +32,37 @@ Transform:
|
||||
- {fileID: 8147186228743834315}
|
||||
m_Father: {fileID: 7054039277474966850}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &4956580884041488474
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 3528131080961768508}
|
||||
m_Layer: 0
|
||||
m_Name: BubbleSocket
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &3528131080961768508
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4956580884041488474}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 2.5, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 7054039277474966850}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &8186549463259896341
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -95,6 +126,7 @@ Transform:
|
||||
m_Children:
|
||||
- {fileID: 444580504555709431}
|
||||
- {fileID: 8746603792214944495}
|
||||
- {fileID: 3528131080961768508}
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &-3743166843612441236
|
||||
@@ -115,6 +147,7 @@ MonoBehaviour:
|
||||
prefabName:
|
||||
modelID:
|
||||
nodeID:
|
||||
DataBubbleSocket: {fileID: 0}
|
||||
eventKey:
|
||||
eventUsingQueue: processor_using_queue
|
||||
eventUsingStore: processor_using_store
|
||||
|
||||
@@ -64,6 +64,7 @@ Transform:
|
||||
- {fileID: 8106578039535807440}
|
||||
- {fileID: 3518951519622711998}
|
||||
- {fileID: 7236234594493469454}
|
||||
- {fileID: 7982214872954640662}
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &1166314466484888031
|
||||
@@ -84,6 +85,7 @@ MonoBehaviour:
|
||||
prefabName:
|
||||
modelID:
|
||||
nodeID:
|
||||
DataBubbleSocket: {fileID: 0}
|
||||
eventKey:
|
||||
storePositions:
|
||||
- {fileID: 3518951519622711998}
|
||||
@@ -179,6 +181,37 @@ MeshRenderer:
|
||||
m_SortingLayer: 0
|
||||
m_SortingOrder: 0
|
||||
m_AdditionalVertexStreams: {fileID: 0}
|
||||
--- !u!1 &4004603511644442822
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 7982214872954640662}
|
||||
m_Layer: 0
|
||||
m_Name: BubbleSocket
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &7982214872954640662
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4004603511644442822}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 1, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 8919246687821753581}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &4131199017715023977
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
||||
@@ -1,5 +1,36 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &2245906455345788610
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 9151051356405803661}
|
||||
m_Layer: 0
|
||||
m_Name: BubbleSocket
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &9151051356405803661
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2245906455345788610}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 2.75, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 8916579774980777993}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &2931528002891540222
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -31,6 +62,7 @@ Transform:
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 2773164636772181219}
|
||||
- {fileID: 9151051356405803661}
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &7603118197445908879
|
||||
@@ -46,11 +78,16 @@ MonoBehaviour:
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
modelName: Container
|
||||
objectName:
|
||||
modelType: 7
|
||||
prefabName:
|
||||
modelID:
|
||||
nodeID:
|
||||
DataBubbleSocket: {fileID: 0}
|
||||
eventKey:
|
||||
eventShipItem: items_shipped_successfully
|
||||
eventRemoveItem: item_removed_from_queue
|
||||
eventRemoveItemQueue: item_removed_from_queue
|
||||
eventRemoveItemStore: item_removed_from_store
|
||||
totalShipped: 0
|
||||
--- !u!1 &5564620023822695086
|
||||
GameObject:
|
||||
|
||||
@@ -1,5 +1,36 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &8814803461517099830
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1180134219867491011}
|
||||
m_Layer: 0
|
||||
m_Name: BubbleSocket
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &1180134219867491011
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8814803461517099830}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 1, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 6733763396490065076}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &8981091474273742600
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -31,6 +62,7 @@ Transform:
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 6052881152895185930}
|
||||
- {fileID: 1180134219867491011}
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &3778496298057829303
|
||||
@@ -51,6 +83,7 @@ MonoBehaviour:
|
||||
prefabName:
|
||||
modelID:
|
||||
nodeID:
|
||||
DataBubbleSocket: {fileID: 0}
|
||||
eventKey:
|
||||
eventGenerateProduct: product_generated
|
||||
eventGenerateDefect: product_defective
|
||||
|
||||
@@ -457,6 +457,7 @@ Transform:
|
||||
- {fileID: 7451646129477244190}
|
||||
- {fileID: 8283148175014277045}
|
||||
- {fileID: 2569539448628245481}
|
||||
- {fileID: 4568039613043782270}
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &1438450274458501216
|
||||
@@ -472,9 +473,13 @@ MonoBehaviour:
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
modelName: BufferRack
|
||||
objectName:
|
||||
modelType: 5
|
||||
prefabName:
|
||||
modelID:
|
||||
nodeID:
|
||||
DataBubbleSocket: {fileID: 0}
|
||||
eventKey:
|
||||
storePositions:
|
||||
- {fileID: 3987515700259093686}
|
||||
- {fileID: 8751383082811728600}
|
||||
@@ -1918,6 +1923,37 @@ BoxCollider:
|
||||
serializedVersion: 3
|
||||
m_Size: {x: 1, y: 1, z: 1}
|
||||
m_Center: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &6267930577467912605
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 4568039613043782270}
|
||||
m_Layer: 0
|
||||
m_Name: BubbleSocket
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &4568039613043782270
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6267930577467912605}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 4, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 2127442700830948185}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &7267154135711523565
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
||||
@@ -794,6 +794,7 @@ Transform:
|
||||
- {fileID: 6572439212797043635}
|
||||
- {fileID: 2461248213983903281}
|
||||
- {fileID: 777034524018022917}
|
||||
- {fileID: 3784894198220622031}
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &7967327075547964767
|
||||
@@ -814,6 +815,7 @@ MonoBehaviour:
|
||||
prefabName:
|
||||
modelID:
|
||||
nodeID:
|
||||
DataBubbleSocket: {fileID: 0}
|
||||
eventKey:
|
||||
storePositions:
|
||||
- {fileID: 2278764131860809793}
|
||||
@@ -1386,6 +1388,37 @@ BoxCollider:
|
||||
serializedVersion: 3
|
||||
m_Size: {x: 1, y: 1, z: 1}
|
||||
m_Center: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &6081195176652777350
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 3784894198220622031}
|
||||
m_Layer: 0
|
||||
m_Name: BubbleSocket
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &3784894198220622031
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6081195176652777350}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 7.25, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 5459601425847701988}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &6184667571360871068
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -6,4 +6,9 @@ public class SimulationModelProduct : SimulationModel
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
|
||||
public override void SetBubble(object data)
|
||||
{
|
||||
Debug.Log(data.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,6 +20,7 @@ public class ResourceStatus
|
||||
public int claimers;
|
||||
public int available;
|
||||
public int capacity;
|
||||
public int original_capacity;
|
||||
public float utilization;
|
||||
public float occupancy;
|
||||
public int broken_units;
|
||||
@@ -45,6 +46,7 @@ public class SimulationModelResource : SimulationModel
|
||||
private void Message_Status_Updted(ResourceStatus data)
|
||||
{
|
||||
this.currentStatus = data;
|
||||
SetBubble($"{data.claimers}/{data.original_capacity}");
|
||||
}
|
||||
|
||||
public override void GetData(string data)
|
||||
@@ -66,8 +68,21 @@ public class SimulationModelResource : SimulationModel
|
||||
default:
|
||||
|
||||
return;
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public override void SetBubble(object data)
|
||||
{
|
||||
string msg = data.ToString();
|
||||
|
||||
if (currentBubble == null)
|
||||
{
|
||||
// 생성
|
||||
currentBubble = Instantiate(bubbleUIPrefab, FindAnyObjectByType<Canvas_Bubble>().transform);
|
||||
currentBubble.target = DataBubbleSocket;
|
||||
currentBubble.worldOffset = new Vector3(0, 2.0f, 0); // 필요에 따라 조절
|
||||
}
|
||||
// 텍스트 갱신
|
||||
currentBubble.SetMessage(msg);
|
||||
}
|
||||
}
|
||||
|
||||
16
Assets/WorkSpace/LH/Canvas_Bubble.cs
Normal file
16
Assets/WorkSpace/LH/Canvas_Bubble.cs
Normal file
@@ -0,0 +1,16 @@
|
||||
using UnityEngine;
|
||||
|
||||
public class Canvas_Bubble : MonoBehaviour
|
||||
{
|
||||
// Start is called once before the first execution of Update after the MonoBehaviour is created
|
||||
void Start()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
2
Assets/WorkSpace/LH/Canvas_Bubble.cs.meta
Normal file
2
Assets/WorkSpace/LH/Canvas_Bubble.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 231eeea68d16664439d7f9a821a40c14
|
||||
43
Assets/WorkSpace/LH/LogicData/BubbleUI.cs
Normal file
43
Assets/WorkSpace/LH/LogicData/BubbleUI.cs
Normal file
@@ -0,0 +1,43 @@
|
||||
using UnityEngine;
|
||||
using TMPro;
|
||||
|
||||
public class BubbleUI : MonoBehaviour
|
||||
{
|
||||
public Transform target; // 따라갈 대상
|
||||
public Vector3 worldOffset; // 말풍선이 떠 있을 높이(예: (0,2,0))
|
||||
public TMP_Text messageText; // Text 컴포넌트 참조
|
||||
Camera mainCam;
|
||||
RectTransform rt;
|
||||
|
||||
void Awake()
|
||||
{
|
||||
mainCam = Camera.main;
|
||||
rt = GetComponent<RectTransform>();
|
||||
}
|
||||
|
||||
void Update()
|
||||
{
|
||||
if (target == null)
|
||||
{
|
||||
Destroy(gameObject);
|
||||
return;
|
||||
}
|
||||
// 월드 좌표 → 스크린 좌표 변환
|
||||
Vector3 screenPos = mainCam.WorldToScreenPoint(target.position + worldOffset);
|
||||
// 시야 뒤(음수 z)에 있으면 숨기기
|
||||
if (screenPos.z < 0)
|
||||
{
|
||||
rt.gameObject.SetActive(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
rt.gameObject.SetActive(true);
|
||||
rt.position = screenPos;
|
||||
}
|
||||
}
|
||||
|
||||
public void SetMessage(string msg)
|
||||
{
|
||||
messageText.text = msg;
|
||||
}
|
||||
}
|
||||
2
Assets/WorkSpace/LH/LogicData/BubbleUI.cs.meta
Normal file
2
Assets/WorkSpace/LH/LogicData/BubbleUI.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c9b008a8d2f09754a942d2f7c1367134
|
||||
@@ -13,5 +13,6 @@ namespace Octopus.Simulator.Networks
|
||||
public string name;
|
||||
public string host;
|
||||
public int port;
|
||||
public string protocol = "wss";
|
||||
}
|
||||
}
|
||||
@@ -24,6 +24,8 @@ namespace Octopus.Simulator.Networks
|
||||
|
||||
public event Action onLogicUpdated;
|
||||
bool flag = true;
|
||||
|
||||
string protocol="wss";
|
||||
// Start is called once before the first execution of Update after the MonoBehaviour is created
|
||||
void Awake()
|
||||
{
|
||||
@@ -57,6 +59,7 @@ namespace Octopus.Simulator.Networks
|
||||
MQTTConfigList ConfigList = JsonConvert.DeserializeObject<MQTTConfigList>(json);
|
||||
var config = ConfigList.configs[0];
|
||||
string clientName = config.name;
|
||||
protocol = config.protocol;
|
||||
string host = config.host;
|
||||
int port = config.port;
|
||||
|
||||
@@ -82,14 +85,26 @@ namespace Octopus.Simulator.Networks
|
||||
|
||||
public void Connect(string clientName, string host, int port)
|
||||
{
|
||||
client = new MQTTClientBuilder()
|
||||
.WithOptions(new ConnectionOptionsBuilder().WithWebSocket(host,port).WithPath("/mqtt").WithTLS())
|
||||
.WithEventHandler(client => OnConnected(client, clientName))
|
||||
.WithEventHandler(OnStateChange)
|
||||
.WithEventHandler(OnDisconnected)
|
||||
.WithEventHandler(OnError)
|
||||
.CreateClient();
|
||||
|
||||
if (string.Equals(protocol, "wss"))
|
||||
{
|
||||
client = new MQTTClientBuilder()
|
||||
.WithOptions(new ConnectionOptionsBuilder().WithWebSocket(host, port).WithPath("/mqtt").WithTLS())
|
||||
.WithEventHandler(client => OnConnected(client, clientName))
|
||||
.WithEventHandler(OnStateChange)
|
||||
.WithEventHandler(OnDisconnected)
|
||||
.WithEventHandler(OnError)
|
||||
.CreateClient();
|
||||
}
|
||||
else
|
||||
{
|
||||
client = new MQTTClientBuilder()
|
||||
.WithOptions(new ConnectionOptionsBuilder().WithWebSocket(host, port).WithPath("/mqtt"))
|
||||
.WithEventHandler(client => OnConnected(client, clientName))
|
||||
.WithEventHandler(OnStateChange)
|
||||
.WithEventHandler(OnDisconnected)
|
||||
.WithEventHandler(OnError)
|
||||
.CreateClient();
|
||||
}
|
||||
client.BeginConnect(ConnectPacketBuilderCallback);
|
||||
}
|
||||
|
||||
|
||||
@@ -25,6 +25,9 @@ public abstract class SimulationModel : MonoBehaviour, IClickable
|
||||
public string prefabName;
|
||||
public string modelID;
|
||||
public string nodeID;
|
||||
public Transform DataBubbleSocket;
|
||||
protected BubbleUI bubbleUIPrefab;
|
||||
protected BubbleUI currentBubble;
|
||||
public string eventKey;
|
||||
private bool isQuitting = false;
|
||||
public Action<SimulationModel> onModelClicked;
|
||||
@@ -44,6 +47,12 @@ public abstract class SimulationModel : MonoBehaviour, IClickable
|
||||
protected virtual void init()
|
||||
{
|
||||
FitCollider();
|
||||
bubbleUIPrefab = Resources.Load<BubbleUI>("BubbleUI");
|
||||
DataBubbleSocket = transform.Find("BubbleSocket");
|
||||
if (!DataBubbleSocket)
|
||||
{
|
||||
DataBubbleSocket = this.transform;
|
||||
}
|
||||
}
|
||||
|
||||
private void OnEnable()
|
||||
@@ -86,4 +95,6 @@ public abstract class SimulationModel : MonoBehaviour, IClickable
|
||||
}
|
||||
|
||||
public abstract void GetData(string data);
|
||||
|
||||
public abstract void SetBubble(object data);
|
||||
}
|
||||
|
||||
@@ -272,6 +272,26 @@ public class SimulationModelConveyor : SimulationModel
|
||||
storedCargo = null;
|
||||
}
|
||||
}
|
||||
|
||||
if (wrapclass._event.Contains("conveyor_statistics_update"))
|
||||
{
|
||||
SetBubble(JsonConvert.DeserializeObject<ConveyorStatisticsData>(wrapclass.data.ToString()).statistics.transported_count);
|
||||
}
|
||||
}
|
||||
|
||||
public override void SetBubble(object data)
|
||||
{
|
||||
string msg = data.ToString();
|
||||
|
||||
if (currentBubble == null)
|
||||
{
|
||||
// 생성
|
||||
currentBubble = Instantiate(bubbleUIPrefab, FindAnyObjectByType<Canvas_Bubble>().transform);
|
||||
currentBubble.target = DataBubbleSocket;
|
||||
currentBubble.worldOffset = new Vector3(0, 2.0f, 0); // 필요에 따라 조절
|
||||
}
|
||||
// 텍스트 갱신
|
||||
currentBubble.SetMessage(msg);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -726,3 +746,15 @@ public class ConveyorMovingData
|
||||
[JsonProperty("items_on_belt")]
|
||||
public int? ItemsOnBelt { get; set; }
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class ConveyorStatisticsData
|
||||
{
|
||||
public StatisticsConveyor statistics;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class StatisticsConveyor
|
||||
{
|
||||
public int transported_count;
|
||||
}
|
||||
|
||||
@@ -130,6 +130,18 @@ public class MoveDataClass_returning
|
||||
public float return_time;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class MoveDataClassStatistics
|
||||
{
|
||||
public statisticsMove statistics;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class statisticsMove
|
||||
{
|
||||
public int total_moved;
|
||||
}
|
||||
|
||||
public class SimulationModelMove : SimulationModel
|
||||
{
|
||||
string eventLoading = "move_loading";
|
||||
@@ -522,5 +534,24 @@ public class SimulationModelMove : SimulationModel
|
||||
destination = origin;
|
||||
}
|
||||
}
|
||||
if (wrapclass._event.Contains("move_statistics_update"))
|
||||
{
|
||||
SetBubble(JsonConvert.DeserializeObject<MoveDataClassStatistics>(wrapclass.data.ToString()).statistics.total_moved);
|
||||
}
|
||||
}
|
||||
|
||||
public override void SetBubble(object data)
|
||||
{
|
||||
string msg = data.ToString();
|
||||
|
||||
if (currentBubble == null)
|
||||
{
|
||||
// 생성
|
||||
currentBubble = Instantiate(bubbleUIPrefab, FindAnyObjectByType<Canvas_Bubble>().transform);
|
||||
currentBubble.target = DataBubbleSocket;
|
||||
currentBubble.worldOffset = new Vector3(0, 2.0f, 0); // 필요에 따라 조절
|
||||
}
|
||||
// 텍스트 갱신
|
||||
currentBubble.SetMessage(msg);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -138,14 +138,26 @@ public class ProcessDataClass_waiting
|
||||
public int missing;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
|
||||
[Serializable]
|
||||
public class ProcessDataClass_ResourceAcquired
|
||||
{
|
||||
public string processor_id;
|
||||
public string resource_name;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class ProcessDataClass_statistics
|
||||
{
|
||||
public StatisticsProcess statistics;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class StatisticsProcess
|
||||
{
|
||||
public int total_input;
|
||||
public int total_processed;
|
||||
}
|
||||
|
||||
public class SimulationModelProcess : SimulationModel
|
||||
{
|
||||
public string eventUsingQueue = "processor_using_queue";
|
||||
@@ -454,16 +466,33 @@ public class SimulationModelProcess : SimulationModel
|
||||
//Debug.Log($"{this.nodeID} release event");
|
||||
//Debug.Log($"{this.nodeID} release {this.resource.nodeID} ");
|
||||
ResourceReleased();
|
||||
|
||||
return;
|
||||
case "processor_statistics_update":
|
||||
SetBubble(message.data.ToObject<ProcessDataClass_statistics>().statistics);
|
||||
break;
|
||||
|
||||
default:
|
||||
|
||||
//Debug.Log($"{message._event} does not match any case!!!");
|
||||
|
||||
return;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public override void SetBubble(object data)
|
||||
{
|
||||
var processStatistics = data as StatisticsProcess;
|
||||
|
||||
string msg = $"{processStatistics.total_input}/{processStatistics.total_processed}";
|
||||
|
||||
if (currentBubble == null)
|
||||
{
|
||||
// 생성
|
||||
currentBubble = Instantiate(bubbleUIPrefab, FindAnyObjectByType<Canvas_Bubble>().transform);
|
||||
currentBubble.target = DataBubbleSocket;
|
||||
currentBubble.worldOffset = new Vector3(0, 0, 0); // 필요에 따라 조절
|
||||
}
|
||||
// 텍스트 갱신
|
||||
currentBubble.SetMessage(msg);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -80,6 +80,18 @@ public class SinkDataClass_item_removed_from_store
|
||||
public int remaining_store_length;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class SinkDataClass_Statistics
|
||||
{
|
||||
public StatisticsSink statistics;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class StatisticsSink
|
||||
{
|
||||
public int sink_items_count;
|
||||
}
|
||||
|
||||
public class SimulationModelSink : SimulationModel
|
||||
{
|
||||
public string eventShipItem = "items_shipped_successfully";
|
||||
@@ -172,5 +184,24 @@ public class SimulationModelSink : SimulationModel
|
||||
totalShipped++;
|
||||
}
|
||||
}
|
||||
else if (wrapclass._event.Contains("sink_statistics_update"))
|
||||
{
|
||||
SetBubble(JsonConvert.DeserializeObject<SinkDataClass_Statistics>(wrapclass.data.ToString()).statistics.sink_items_count);
|
||||
}
|
||||
}
|
||||
|
||||
public override void SetBubble(object data)
|
||||
{
|
||||
string msg = data.ToString();
|
||||
|
||||
if (currentBubble == null)
|
||||
{
|
||||
// 생성
|
||||
currentBubble = Instantiate(bubbleUIPrefab, FindAnyObjectByType<Canvas_Bubble>().transform);
|
||||
currentBubble.target = DataBubbleSocket;
|
||||
currentBubble.worldOffset = new Vector3(0, 2.0f, 0); // 필요에 따라 조절
|
||||
}
|
||||
// 텍스트 갱신
|
||||
currentBubble.SetMessage(msg);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -44,6 +44,19 @@ public class SourceDataClass_Stored
|
||||
public int store_length;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class SourceDataClass_statistics
|
||||
{
|
||||
public StatisticsSource statistics;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class StatisticsSource
|
||||
{
|
||||
public int total_output;
|
||||
public int total_defects;
|
||||
}
|
||||
|
||||
public class SimulationModelSource : SimulationModel
|
||||
{
|
||||
public string eventGenerateProduct = "product_generated";
|
||||
@@ -132,6 +145,10 @@ public class SimulationModelSource : SimulationModel
|
||||
Destroy(product);
|
||||
}
|
||||
}
|
||||
else if (wrapclass._event.Contains("source_statistics_update"))
|
||||
{
|
||||
SetBubble(JsonConvert.DeserializeObject<SourceDataClass_statistics>(wrapclass.data.ToString()).statistics);
|
||||
}
|
||||
}
|
||||
|
||||
void ProductSorting()
|
||||
@@ -158,4 +175,21 @@ public class SimulationModelSource : SimulationModel
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override void SetBubble(object data)
|
||||
{
|
||||
var processStatistics = data as StatisticsSource;
|
||||
|
||||
string msg = $"{processStatistics.total_output}/{processStatistics.total_defects}";
|
||||
|
||||
if (currentBubble == null)
|
||||
{
|
||||
// 생성
|
||||
currentBubble = Instantiate(bubbleUIPrefab, FindAnyObjectByType<Canvas_Bubble>().transform);
|
||||
currentBubble.target = DataBubbleSocket;
|
||||
currentBubble.worldOffset = new Vector3(0, 0, 0); // 필요에 따라 조절
|
||||
}
|
||||
// 텍스트 갱신
|
||||
currentBubble.SetMessage(msg);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -171,13 +171,32 @@ public class SimulationModelStore : SimulationModel
|
||||
switch (wrapclass._event)
|
||||
{
|
||||
case "store_status_update":
|
||||
AdjustStore(JsonConvert.DeserializeObject<StoreStatusUpdateData>(wrapclass.data.ToString()));
|
||||
var storeStatus = JsonConvert.DeserializeObject<StoreStatusUpdateData>(wrapclass.data.ToString());
|
||||
AdjustStore(storeStatus);
|
||||
SetBubble(storeStatus.statistics.current_length);
|
||||
break;
|
||||
case "queue_status_update":
|
||||
AdjustQueue(JsonConvert.DeserializeObject<QueueStatusUpdateData>(wrapclass.data.ToString()));
|
||||
var queueStatus = JsonConvert.DeserializeObject<QueueStatusUpdateData>(wrapclass.data.ToString());
|
||||
AdjustQueue(queueStatus);
|
||||
SetBubble(queueStatus.statistics.current_length);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
public override void SetBubble(object data)
|
||||
{
|
||||
string msg = data.ToString();
|
||||
|
||||
if (currentBubble == null)
|
||||
{
|
||||
// 생성
|
||||
currentBubble = Instantiate(bubbleUIPrefab, FindAnyObjectByType<Canvas_Bubble>().transform);
|
||||
currentBubble.target = DataBubbleSocket;
|
||||
currentBubble.worldOffset = new Vector3(0, 0, 0); // 필요에 따라 조절
|
||||
}
|
||||
// 텍스트 갱신
|
||||
currentBubble.SetMessage(msg);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,6 +14,7 @@ namespace Octopus.Simulator.Networks
|
||||
|
||||
public void Start()
|
||||
{
|
||||
WebParameters.code = "";
|
||||
onParameterRecived += FindAnyObjectByType<ProjectDataManager>().RequestInfo;
|
||||
onParameterRecived += FindAnyObjectByType<LogicDataManager>().RequestInfo;
|
||||
#if UNITY_EDITOR
|
||||
|
||||
Reference in New Issue
Block a user