Prechádzať zdrojové kódy

更改创建房间逻辑

liuqilin 8 rokov pred
rodič
commit
73587300c6
34 zmenil súbory, kde vykonal 1639 pridanie a 436 odobranie
  1. 0 309
      Assets/Resource/Logo.unity
  2. 2 0
      Assets/Resource/Prefab/Object/DebugMode.prefab
  3. 776 37
      Assets/Resource/Prefab/PrefabUI/GroupE.prefab
  4. 45 3
      Assets/Resource/Prefab/PrefabUI/PlazaRoomItem.prefab
  5. 1 1
      Assets/Resource/Prefab/PrefabUI/PlazaRoomItem.prefab.meta
  6. 11 0
      Assets/Resource/XML/Config/plaza_room_config.xml
  7. 8 0
      Assets/Resource/XML/Config/plaza_room_config.xml.meta
  8. 19 0
      Assets/Resource/XML/lan/ChineseSimplified.xml
  9. 19 0
      Assets/Resource/XML/lan/ChineseTraditional.xml
  10. 19 0
      Assets/Resource/XML/lan/English.xml
  11. BIN
      Assets/Resource/Xlsx/language_config.xlsx
  12. BIN
      Assets/Resource/Xlsx/plaza_room_config.xlsx
  13. 8 0
      Assets/Resource/Xlsx/plaza_room_config.xlsx.meta
  14. 16 0
      Assets/Script/Extension/ExAction.cs
  15. 12 0
      Assets/Script/Extension/ExAction.cs.meta
  16. 13 0
      Assets/Script/Manage/ManaData.cs
  17. 1 0
      Assets/Script/Manage/ManaReso.cs
  18. 1 1
      Assets/Script/Manage/ManaServer.cs
  19. 51 2
      Assets/Script/Manage/ManaUI.cs
  20. 294 44
      Assets/Script/Manage/PlazaRoomMge.cs
  21. 196 0
      Assets/Script/Object/PlazaRoomItem.cs
  22. 12 0
      Assets/Script/Object/PlazaRoomItem.cs.meta
  23. 3 3
      Assets/Script/SFS/Manager/DatabaseManager.cs
  24. 7 7
      Assets/Script/SFS/Manager/GardenSmartFox.cs
  25. 1 1
      Assets/Script/SFS/Manager/GardenSmartFoxManager.cs
  26. 2 2
      Assets/Script/SFS/Manager/SFSPlazaRoomManager.cs
  27. 4 4
      Assets/Script/SFS/SFSExtension/PlazaRoomExtension.cs
  28. 2 2
      Assets/Script/Tool/Auxiliary.cs
  29. 0 17
      Assets/Script/Tool/DashGame/DelayCall.cs
  30. 56 0
      Assets/Script/Tool/DelayCall.cs
  31. 2 2
      Assets/Script/Tool/DelayCall.cs.meta
  32. 41 0
      Assets/Script/Tool/VirtualScrollRect.cs
  33. 12 0
      Assets/Script/Tool/VirtualScrollRect.cs.meta
  34. 5 1
      第三期.txt

+ 0 - 309
Assets/Resource/Logo.unity

@@ -155,206 +155,6 @@ SpriteRenderer:
   m_Color: {r: 0, g: 0, b: 0, a: 1}
   m_FlipX: 0
   m_FlipY: 0
---- !u!1001 &724200061
-Prefab:
-  m_ObjectHideFlags: 0
-  serializedVersion: 2
-  m_Modification:
-    m_TransformParent: {fileID: 1435971795}
-    m_Modifications:
-    - target: {fileID: 224814127152008004, guid: 718ebdaed223e93409d6dc7e53a23167,
-        type: 2}
-      propertyPath: m_LocalPosition.x
-      value: 0
-      objectReference: {fileID: 0}
-    - target: {fileID: 224814127152008004, guid: 718ebdaed223e93409d6dc7e53a23167,
-        type: 2}
-      propertyPath: m_LocalPosition.y
-      value: 0
-      objectReference: {fileID: 0}
-    - target: {fileID: 224814127152008004, guid: 718ebdaed223e93409d6dc7e53a23167,
-        type: 2}
-      propertyPath: m_LocalPosition.z
-      value: 0
-      objectReference: {fileID: 0}
-    - target: {fileID: 224814127152008004, guid: 718ebdaed223e93409d6dc7e53a23167,
-        type: 2}
-      propertyPath: m_LocalRotation.x
-      value: -0
-      objectReference: {fileID: 0}
-    - target: {fileID: 224814127152008004, guid: 718ebdaed223e93409d6dc7e53a23167,
-        type: 2}
-      propertyPath: m_LocalRotation.y
-      value: -0
-      objectReference: {fileID: 0}
-    - target: {fileID: 224814127152008004, guid: 718ebdaed223e93409d6dc7e53a23167,
-        type: 2}
-      propertyPath: m_LocalRotation.z
-      value: -0
-      objectReference: {fileID: 0}
-    - target: {fileID: 224814127152008004, guid: 718ebdaed223e93409d6dc7e53a23167,
-        type: 2}
-      propertyPath: m_LocalRotation.w
-      value: 1
-      objectReference: {fileID: 0}
-    - target: {fileID: 224814127152008004, guid: 718ebdaed223e93409d6dc7e53a23167,
-        type: 2}
-      propertyPath: m_RootOrder
-      value: 1
-      objectReference: {fileID: 0}
-    - target: {fileID: 224814127152008004, guid: 718ebdaed223e93409d6dc7e53a23167,
-        type: 2}
-      propertyPath: m_AnchoredPosition.x
-      value: 0
-      objectReference: {fileID: 0}
-    - target: {fileID: 224814127152008004, guid: 718ebdaed223e93409d6dc7e53a23167,
-        type: 2}
-      propertyPath: m_AnchoredPosition.y
-      value: 0
-      objectReference: {fileID: 0}
-    - target: {fileID: 224814127152008004, guid: 718ebdaed223e93409d6dc7e53a23167,
-        type: 2}
-      propertyPath: m_SizeDelta.x
-      value: 0
-      objectReference: {fileID: 0}
-    - target: {fileID: 224814127152008004, guid: 718ebdaed223e93409d6dc7e53a23167,
-        type: 2}
-      propertyPath: m_SizeDelta.y
-      value: 0
-      objectReference: {fileID: 0}
-    - target: {fileID: 224814127152008004, guid: 718ebdaed223e93409d6dc7e53a23167,
-        type: 2}
-      propertyPath: m_AnchorMin.x
-      value: 0
-      objectReference: {fileID: 0}
-    - target: {fileID: 224814127152008004, guid: 718ebdaed223e93409d6dc7e53a23167,
-        type: 2}
-      propertyPath: m_AnchorMin.y
-      value: 0
-      objectReference: {fileID: 0}
-    - target: {fileID: 224814127152008004, guid: 718ebdaed223e93409d6dc7e53a23167,
-        type: 2}
-      propertyPath: m_AnchorMax.x
-      value: 1
-      objectReference: {fileID: 0}
-    - target: {fileID: 224814127152008004, guid: 718ebdaed223e93409d6dc7e53a23167,
-        type: 2}
-      propertyPath: m_AnchorMax.y
-      value: 1
-      objectReference: {fileID: 0}
-    - target: {fileID: 224814127152008004, guid: 718ebdaed223e93409d6dc7e53a23167,
-        type: 2}
-      propertyPath: m_Pivot.x
-      value: 0.5
-      objectReference: {fileID: 0}
-    - target: {fileID: 224814127152008004, guid: 718ebdaed223e93409d6dc7e53a23167,
-        type: 2}
-      propertyPath: m_Pivot.y
-      value: 0.5
-      objectReference: {fileID: 0}
-    m_RemovedComponents: []
-  m_ParentPrefab: {fileID: 100100000, guid: 718ebdaed223e93409d6dc7e53a23167, type: 2}
-  m_IsPrefabParent: 0
---- !u!1001 &1115265997
-Prefab:
-  m_ObjectHideFlags: 0
-  serializedVersion: 2
-  m_Modification:
-    m_TransformParent: {fileID: 1435971795}
-    m_Modifications:
-    - target: {fileID: 224198081419304548, guid: 4b27b1fc0c9780a4492f68549d3e1f52,
-        type: 2}
-      propertyPath: m_LocalPosition.x
-      value: 0
-      objectReference: {fileID: 0}
-    - target: {fileID: 224198081419304548, guid: 4b27b1fc0c9780a4492f68549d3e1f52,
-        type: 2}
-      propertyPath: m_LocalPosition.y
-      value: 0
-      objectReference: {fileID: 0}
-    - target: {fileID: 224198081419304548, guid: 4b27b1fc0c9780a4492f68549d3e1f52,
-        type: 2}
-      propertyPath: m_LocalPosition.z
-      value: 0
-      objectReference: {fileID: 0}
-    - target: {fileID: 224198081419304548, guid: 4b27b1fc0c9780a4492f68549d3e1f52,
-        type: 2}
-      propertyPath: m_LocalRotation.x
-      value: 0
-      objectReference: {fileID: 0}
-    - target: {fileID: 224198081419304548, guid: 4b27b1fc0c9780a4492f68549d3e1f52,
-        type: 2}
-      propertyPath: m_LocalRotation.y
-      value: 0
-      objectReference: {fileID: 0}
-    - target: {fileID: 224198081419304548, guid: 4b27b1fc0c9780a4492f68549d3e1f52,
-        type: 2}
-      propertyPath: m_LocalRotation.z
-      value: 0
-      objectReference: {fileID: 0}
-    - target: {fileID: 224198081419304548, guid: 4b27b1fc0c9780a4492f68549d3e1f52,
-        type: 2}
-      propertyPath: m_LocalRotation.w
-      value: 1
-      objectReference: {fileID: 0}
-    - target: {fileID: 224198081419304548, guid: 4b27b1fc0c9780a4492f68549d3e1f52,
-        type: 2}
-      propertyPath: m_RootOrder
-      value: 0
-      objectReference: {fileID: 0}
-    - target: {fileID: 224198081419304548, guid: 4b27b1fc0c9780a4492f68549d3e1f52,
-        type: 2}
-      propertyPath: m_AnchoredPosition.x
-      value: 0
-      objectReference: {fileID: 0}
-    - target: {fileID: 224198081419304548, guid: 4b27b1fc0c9780a4492f68549d3e1f52,
-        type: 2}
-      propertyPath: m_AnchoredPosition.y
-      value: 0
-      objectReference: {fileID: 0}
-    - target: {fileID: 224198081419304548, guid: 4b27b1fc0c9780a4492f68549d3e1f52,
-        type: 2}
-      propertyPath: m_SizeDelta.x
-      value: 0
-      objectReference: {fileID: 0}
-    - target: {fileID: 224198081419304548, guid: 4b27b1fc0c9780a4492f68549d3e1f52,
-        type: 2}
-      propertyPath: m_SizeDelta.y
-      value: 0
-      objectReference: {fileID: 0}
-    - target: {fileID: 224198081419304548, guid: 4b27b1fc0c9780a4492f68549d3e1f52,
-        type: 2}
-      propertyPath: m_AnchorMin.x
-      value: 0
-      objectReference: {fileID: 0}
-    - target: {fileID: 224198081419304548, guid: 4b27b1fc0c9780a4492f68549d3e1f52,
-        type: 2}
-      propertyPath: m_AnchorMin.y
-      value: 0
-      objectReference: {fileID: 0}
-    - target: {fileID: 224198081419304548, guid: 4b27b1fc0c9780a4492f68549d3e1f52,
-        type: 2}
-      propertyPath: m_AnchorMax.x
-      value: 1
-      objectReference: {fileID: 0}
-    - target: {fileID: 224198081419304548, guid: 4b27b1fc0c9780a4492f68549d3e1f52,
-        type: 2}
-      propertyPath: m_AnchorMax.y
-      value: 1
-      objectReference: {fileID: 0}
-    - target: {fileID: 224198081419304548, guid: 4b27b1fc0c9780a4492f68549d3e1f52,
-        type: 2}
-      propertyPath: m_Pivot.x
-      value: 0.5
-      objectReference: {fileID: 0}
-    - target: {fileID: 224198081419304548, guid: 4b27b1fc0c9780a4492f68549d3e1f52,
-        type: 2}
-      propertyPath: m_Pivot.y
-      value: 0.5
-      objectReference: {fileID: 0}
-    m_RemovedComponents: []
-  m_ParentPrefab: {fileID: 100100000, guid: 4b27b1fc0c9780a4492f68549d3e1f52, type: 2}
-  m_IsPrefabParent: 0
 --- !u!1 &1218118077
 GameObject:
   m_ObjectHideFlags: 0
@@ -442,115 +242,6 @@ Transform:
   m_Father: {fileID: 0}
   m_RootOrder: 1
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
---- !u!1001 &1435971794
-Prefab:
-  m_ObjectHideFlags: 0
-  serializedVersion: 2
-  m_Modification:
-    m_TransformParent: {fileID: 0}
-    m_Modifications:
-    - target: {fileID: 224229560457679016, guid: 8647d80b558fa724a84d05f9e6aee9bc,
-        type: 2}
-      propertyPath: m_LocalPosition.x
-      value: 0
-      objectReference: {fileID: 0}
-    - target: {fileID: 224229560457679016, guid: 8647d80b558fa724a84d05f9e6aee9bc,
-        type: 2}
-      propertyPath: m_LocalPosition.y
-      value: 0
-      objectReference: {fileID: 0}
-    - target: {fileID: 224229560457679016, guid: 8647d80b558fa724a84d05f9e6aee9bc,
-        type: 2}
-      propertyPath: m_LocalPosition.z
-      value: 0
-      objectReference: {fileID: 0}
-    - target: {fileID: 224229560457679016, guid: 8647d80b558fa724a84d05f9e6aee9bc,
-        type: 2}
-      propertyPath: m_LocalRotation.x
-      value: 0
-      objectReference: {fileID: 0}
-    - target: {fileID: 224229560457679016, guid: 8647d80b558fa724a84d05f9e6aee9bc,
-        type: 2}
-      propertyPath: m_LocalRotation.y
-      value: 0
-      objectReference: {fileID: 0}
-    - target: {fileID: 224229560457679016, guid: 8647d80b558fa724a84d05f9e6aee9bc,
-        type: 2}
-      propertyPath: m_LocalRotation.z
-      value: 0
-      objectReference: {fileID: 0}
-    - target: {fileID: 224229560457679016, guid: 8647d80b558fa724a84d05f9e6aee9bc,
-        type: 2}
-      propertyPath: m_LocalRotation.w
-      value: 1
-      objectReference: {fileID: 0}
-    - target: {fileID: 224229560457679016, guid: 8647d80b558fa724a84d05f9e6aee9bc,
-        type: 2}
-      propertyPath: m_RootOrder
-      value: 3
-      objectReference: {fileID: 0}
-    - target: {fileID: 224229560457679016, guid: 8647d80b558fa724a84d05f9e6aee9bc,
-        type: 2}
-      propertyPath: m_AnchoredPosition.x
-      value: 0
-      objectReference: {fileID: 0}
-    - target: {fileID: 224229560457679016, guid: 8647d80b558fa724a84d05f9e6aee9bc,
-        type: 2}
-      propertyPath: m_AnchoredPosition.y
-      value: 0
-      objectReference: {fileID: 0}
-    - target: {fileID: 224229560457679016, guid: 8647d80b558fa724a84d05f9e6aee9bc,
-        type: 2}
-      propertyPath: m_SizeDelta.x
-      value: 0
-      objectReference: {fileID: 0}
-    - target: {fileID: 224229560457679016, guid: 8647d80b558fa724a84d05f9e6aee9bc,
-        type: 2}
-      propertyPath: m_SizeDelta.y
-      value: 0
-      objectReference: {fileID: 0}
-    - target: {fileID: 224229560457679016, guid: 8647d80b558fa724a84d05f9e6aee9bc,
-        type: 2}
-      propertyPath: m_AnchorMin.x
-      value: 0
-      objectReference: {fileID: 0}
-    - target: {fileID: 224229560457679016, guid: 8647d80b558fa724a84d05f9e6aee9bc,
-        type: 2}
-      propertyPath: m_AnchorMin.y
-      value: 0
-      objectReference: {fileID: 0}
-    - target: {fileID: 224229560457679016, guid: 8647d80b558fa724a84d05f9e6aee9bc,
-        type: 2}
-      propertyPath: m_AnchorMax.x
-      value: 0
-      objectReference: {fileID: 0}
-    - target: {fileID: 224229560457679016, guid: 8647d80b558fa724a84d05f9e6aee9bc,
-        type: 2}
-      propertyPath: m_AnchorMax.y
-      value: 0
-      objectReference: {fileID: 0}
-    - target: {fileID: 224229560457679016, guid: 8647d80b558fa724a84d05f9e6aee9bc,
-        type: 2}
-      propertyPath: m_Pivot.x
-      value: 0
-      objectReference: {fileID: 0}
-    - target: {fileID: 224229560457679016, guid: 8647d80b558fa724a84d05f9e6aee9bc,
-        type: 2}
-      propertyPath: m_Pivot.y
-      value: 0
-      objectReference: {fileID: 0}
-    - target: {fileID: 1948781497737682, guid: 8647d80b558fa724a84d05f9e6aee9bc, type: 2}
-      propertyPath: m_IsActive
-      value: 0
-      objectReference: {fileID: 0}
-    m_RemovedComponents: []
-  m_ParentPrefab: {fileID: 100100000, guid: 8647d80b558fa724a84d05f9e6aee9bc, type: 2}
-  m_IsPrefabParent: 0
---- !u!224 &1435971795 stripped
-RectTransform:
-  m_PrefabParentObject: {fileID: 224229560457679016, guid: 8647d80b558fa724a84d05f9e6aee9bc,
-    type: 2}
-  m_PrefabInternal: {fileID: 1435971794}
 --- !u!1 &1511433816
 GameObject:
   m_ObjectHideFlags: 0

+ 2 - 0
Assets/Resource/Prefab/Object/DebugMode.prefab

@@ -127,6 +127,7 @@ MonoBehaviour:
   - {fileID: 1883440964438570, guid: 11e55fe29ace64347b31ab7593e7ea51, type: 2}
   - {fileID: 1203281534794934, guid: c9dfe3f9d9cf0f2428f731dc26ac10b5, type: 2}
   - {fileID: 1494806348296548, guid: 0b51a43aa6ef9574382eb28adc6b0fa7, type: 2}
+  - {fileID: 1792991775407706, guid: ce45010746b70ca40a7e91ce5a0a5e10, type: 2}
   AtlasList:
   - {fileID: 21300004, guid: b31bbacb2e0ff3d459f4878983a39b50, type: 3}
   - {fileID: 21300006, guid: b31bbacb2e0ff3d459f4878983a39b50, type: 3}
@@ -279,6 +280,7 @@ MonoBehaviour:
   - {fileID: 4900000, guid: c772e4a074d644a4aa3bdb7ed17ba7a2, type: 3}
   - {fileID: 4900000, guid: bab08a56dab6d9441b7fe6cdfbc075a4, type: 3}
   - {fileID: 4900000, guid: 37311be8685a98c4a850ea2c4ecd7bb4, type: 3}
+  - {fileID: 4900000, guid: 8d5d74d2d26a2be46a1f875c6130a57f, type: 3}
   DiscardList:
   - {fileID: 1422722603004606, guid: f66999d8c3be4ff46b7dbde0417af018, type: 2}
   - {fileID: 1178346060137818, guid: e2d62becad3f170428db59673f313354, type: 2}

Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 776 - 37
Assets/Resource/Prefab/PrefabUI/GroupE.prefab


+ 45 - 3
Assets/Resource/Prefab/PrefabUI/PlazaRoomItem.prefab

@@ -22,7 +22,7 @@ GameObject:
   - component: {fileID: 222447196702246476}
   - component: {fileID: 114293058855678016}
   m_Layer: 5
-  m_Name: RemainTime
+  m_Name: Duration
   m_TagString: Untagged
   m_Icon: {fileID: 0}
   m_NavMeshLayer: 0
@@ -172,6 +172,7 @@ GameObject:
   - component: {fileID: 224666961258069144}
   - component: {fileID: 222890118930594948}
   - component: {fileID: 114082464974762090}
+  - component: {fileID: 114939407959210020}
   m_Layer: 5
   m_Name: Btn
   m_TagString: Untagged
@@ -502,6 +503,47 @@ MonoBehaviour:
     m_VerticalOverflow: 0
     m_LineSpacing: 1
   m_Text: "\u72B6\u6001"
+--- !u!114 &114939407959210020
+MonoBehaviour:
+  m_ObjectHideFlags: 1
+  m_PrefabParentObject: {fileID: 0}
+  m_PrefabInternal: {fileID: 100100000}
+  m_GameObject: {fileID: 1826373426298724}
+  m_Enabled: 1
+  m_EditorHideFlags: 0
+  m_Script: {fileID: 1392445389, guid: f70555f144d8491a825f0804e09c671c, type: 3}
+  m_Name: 
+  m_EditorClassIdentifier: 
+  m_Navigation:
+    m_Mode: 3
+    m_SelectOnUp: {fileID: 0}
+    m_SelectOnDown: {fileID: 0}
+    m_SelectOnLeft: {fileID: 0}
+    m_SelectOnRight: {fileID: 0}
+  m_Transition: 1
+  m_Colors:
+    m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
+    m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
+    m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
+    m_DisabledColor: {r: 1, g: 1, b: 1, a: 1}
+    m_ColorMultiplier: 1
+    m_FadeDuration: 0.1
+  m_SpriteState:
+    m_HighlightedSprite: {fileID: 0}
+    m_PressedSprite: {fileID: 0}
+    m_DisabledSprite: {fileID: 0}
+  m_AnimationTriggers:
+    m_NormalTrigger: Normal
+    m_HighlightedTrigger: Highlighted
+    m_PressedTrigger: Pressed
+    m_DisabledTrigger: Disabled
+  m_Interactable: 1
+  m_TargetGraphic: {fileID: 114082464974762090}
+  m_OnClick:
+    m_PersistentCalls:
+      m_Calls: []
+    m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0,
+      Culture=neutral, PublicKeyToken=null
 --- !u!222 &222002107948443708
 CanvasRenderer:
   m_ObjectHideFlags: 1
@@ -658,9 +700,9 @@ RectTransform:
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
   m_AnchorMin: {x: 0, y: 0}
   m_AnchorMax: {x: 0, y: 0}
-  m_AnchoredPosition: {x: 0, y: 0}
+  m_AnchoredPosition: {x: 0, y: 30}
   m_SizeDelta: {x: 664, y: 60}
-  m_Pivot: {x: 0.5, y: 0.00000024959445}
+  m_Pivot: {x: 0.5, y: 0.5}
 --- !u!224 &224666961258069144
 RectTransform:
   m_ObjectHideFlags: 1

+ 1 - 1
Assets/Resource/Prefab/PrefabUI/PlazaRoomItem.prefab.meta

@@ -4,5 +4,5 @@ timeCreated: 1507858234
 licenseType: Pro
 NativeFormatImporter:
   userData: 
-  assetBundleName: 
+  assetBundleName: ui
   assetBundleVariant: 

+ 11 - 0
Assets/Resource/XML/Config/plaza_room_config.xml

@@ -0,0 +1,11 @@
+<data>
+  <item id="1" create_cost_fml="h*p" />
+  <comment>
+    <id>
+id
+</id>
+    <create_cost_fml>
+创建房间花费公式
+</create_cost_fml>
+  </comment>
+</data>

+ 8 - 0
Assets/Resource/XML/Config/plaza_room_config.xml.meta

@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 8d5d74d2d26a2be46a1f875c6130a57f
+timeCreated: 1508236276
+licenseType: Pro
+TextScriptImporter:
+  userData: 
+  assetBundleName: config
+  assetBundleVariant: 

+ 19 - 0
Assets/Resource/XML/lan/ChineseSimplified.xml

@@ -136,6 +136,25 @@
     <Y_Guess desc=""><![CDATA[猜]]></Y_Guess>
     <Y_Bingo desc=""><![CDATA[猜对了]]></Y_Bingo>
     <Y_WrongGusee desc=""><![CDATA[猜错了]]></Y_WrongGusee>
+    <Z_Closing desc=""><![CDATA[即将结束]]></Z_Closing>
+    <Z_Running desc=""><![CDATA[进行中]]></Z_Running>
+    <Z_Full desc=""><![CDATA[已满]]></Z_Full>
+    <Z_Available desc=""><![CDATA[未满]]></Z_Available>
+    <Z_Join desc=""><![CDATA[加入]]></Z_Join>
+    <AA_AllWhiteSpace desc=""><![CDATA[房间名字不能为空]]></AA_AllWhiteSpace>
+    <AA_ desc=""><![CDATA[]]></AA_>
+    <AA_Cost desc=""><![CDATA[花费]]></AA_Cost>
+    <AA_Lab desc=""><![CDATA[派对名称]]></AA_Lab>
+    <AA_NoEnoughDiamond desc=""><![CDATA[钻石不足]]></AA_NoEnoughDiamond>
+    <AA_Create desc=""><![CDATA[创建]]></AA_Create>
+    <AAa_Tit desc=""><![CDATA[时长]]></AAa_Tit>
+    <AAa_Value desc=""><![CDATA[小时]]></AAa_Value>
+    <AAb_Tit desc=""><![CDATA[人数]]></AAb_Tit>
+    <AAb_Value desc=""><![CDATA[人]]></AAb_Value>
+    <Loading desc=""><![CDATA[加载中]]></Loading>
+    <LoadFailed desc=""><![CDATA[加载失败]]></LoadFailed>
+    <LoadSucceed desc=""><![CDATA[加载成功]]></LoadSucceed>
+    <NoMore desc=""><![CDATA[没有更多内容了]]></NoMore>
     <热卖 desc=""><![CDATA[热卖]]></热卖>
     <超值 desc=""><![CDATA[超值]]></超值>
     <加入房间失败 desc=""><![CDATA[无法连接到服务器]]></加入房间失败>

+ 19 - 0
Assets/Resource/XML/lan/ChineseTraditional.xml

@@ -136,6 +136,25 @@
     <Y_Guess desc=""><![CDATA[猜]]></Y_Guess>
     <Y_Bingo desc=""><![CDATA[猜對了]]></Y_Bingo>
     <Y_WrongGusee desc=""><![CDATA[猜錯了]]></Y_WrongGusee>
+    <Z_Closing desc=""><![CDATA[]]></Z_Closing>
+    <Z_Running desc=""><![CDATA[]]></Z_Running>
+    <Z_Full desc=""><![CDATA[]]></Z_Full>
+    <Z_Available desc=""><![CDATA[]]></Z_Available>
+    <Z_Join desc=""><![CDATA[]]></Z_Join>
+    <AA_AllWhiteSpace desc=""><![CDATA[]]></AA_AllWhiteSpace>
+    <AA_ desc=""><![CDATA[]]></AA_>
+    <AA_Cost desc=""><![CDATA[]]></AA_Cost>
+    <AA_Lab desc=""><![CDATA[]]></AA_Lab>
+    <AA_NoEnoughDiamond desc=""><![CDATA[]]></AA_NoEnoughDiamond>
+    <AA_Create desc=""><![CDATA[]]></AA_Create>
+    <AAa_Tit desc=""><![CDATA[]]></AAa_Tit>
+    <AAa_Value desc=""><![CDATA[]]></AAa_Value>
+    <AAb_Tit desc=""><![CDATA[]]></AAb_Tit>
+    <AAb_Value desc=""><![CDATA[]]></AAb_Value>
+    <Loading desc=""><![CDATA[]]></Loading>
+    <LoadFailed desc=""><![CDATA[]]></LoadFailed>
+    <LoadSucceed desc=""><![CDATA[]]></LoadSucceed>
+    <NoMore desc=""><![CDATA[]]></NoMore>
     <热卖 desc=""><![CDATA[熱賣]]></热卖>
     <超值 desc=""><![CDATA[超值]]></超值>
     <加入房间失败 desc=""><![CDATA[無法連接到伺服器]]></加入房间失败>

+ 19 - 0
Assets/Resource/XML/lan/English.xml

@@ -136,6 +136,25 @@ Program 水怪
     <Y_Guess desc=""><![CDATA[Guess]]></Y_Guess>
     <Y_Bingo desc=""><![CDATA[Right]]></Y_Bingo>
     <Y_WrongGusee desc=""><![CDATA[Wrong]]></Y_WrongGusee>
+    <Z_Closing desc=""><![CDATA[]]></Z_Closing>
+    <Z_Running desc=""><![CDATA[]]></Z_Running>
+    <Z_Full desc=""><![CDATA[]]></Z_Full>
+    <Z_Available desc=""><![CDATA[]]></Z_Available>
+    <Z_Join desc=""><![CDATA[]]></Z_Join>
+    <AA_AllWhiteSpace desc=""><![CDATA[]]></AA_AllWhiteSpace>
+    <AA_ desc=""><![CDATA[]]></AA_>
+    <AA_Cost desc=""><![CDATA[]]></AA_Cost>
+    <AA_Lab desc=""><![CDATA[]]></AA_Lab>
+    <AA_NoEnoughDiamond desc=""><![CDATA[]]></AA_NoEnoughDiamond>
+    <AA_Create desc=""><![CDATA[]]></AA_Create>
+    <AAa_Tit desc=""><![CDATA[]]></AAa_Tit>
+    <AAa_Value desc=""><![CDATA[]]></AAa_Value>
+    <AAb_Tit desc=""><![CDATA[]]></AAb_Tit>
+    <AAb_Value desc=""><![CDATA[]]></AAb_Value>
+    <Loading desc=""><![CDATA[]]></Loading>
+    <LoadFailed desc=""><![CDATA[]]></LoadFailed>
+    <LoadSucceed desc=""><![CDATA[]]></LoadSucceed>
+    <NoMore desc=""><![CDATA[]]></NoMore>
     <热卖 desc=""><![CDATA[Most Popular]]></热卖>
     <超值 desc=""><![CDATA[Highest Value]]></超值>
     <加入房间失败 desc=""><![CDATA[Failed to connect]]></加入房间失败>

BIN
Assets/Resource/Xlsx/language_config.xlsx


BIN
Assets/Resource/Xlsx/plaza_room_config.xlsx


+ 8 - 0
Assets/Resource/Xlsx/plaza_room_config.xlsx.meta

@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: f72cc963046a8904c9022437ea79b869
+timeCreated: 1508236155
+licenseType: Pro
+DefaultImporter:
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 16 - 0
Assets/Script/Extension/ExAction.cs

@@ -0,0 +1,16 @@
+using System;
+using UnityEngine;
+
+using System.Collections;
+using System.Collections.Generic;
+
+public static class ExAction 
+{
+    public static void SafeInvoke(this Action action)
+    {
+        if (action != null)
+        {
+            action.Invoke();
+        }
+    }
+}

+ 12 - 0
Assets/Script/Extension/ExAction.cs.meta

@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 596316e662d3ab44093b0ead916f211d
+timeCreated: 1508122793
+licenseType: Pro
+MonoImporter:
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 13 - 0
Assets/Script/Manage/ManaData.cs

@@ -901,6 +901,19 @@ public class ManaData : Regist
         return xmlNode.Attributes;
     }
 
+    public static XmlAttributeCollection GetPlazaRoomConfig()
+    {
+        TextAsset textAsset = ManaReso.Load<TextAsset>("plaza_room_config", Folder.Config);
+
+        XmlDocument xmlDoc = new XmlDocument();
+
+        xmlDoc.LoadXml(textAsset.text);
+
+        XmlNode xmlNode = xmlDoc.SelectSingleNode("data").SelectSingleNode("item");
+
+        return xmlNode.Attributes;
+    }
+
     public static XmlAttributeCollection GetAwardConfig()
     {
         TextAsset textAsset = ManaReso.Load<TextAsset>("award_config", Folder.Config);

+ 1 - 0
Assets/Script/Manage/ManaReso.cs

@@ -59,6 +59,7 @@ public enum ObjType
     SkillItem,
     SignItem,
     RankItem,
+    PlazaRoomItem,
     FlowerItem,
     AchieveItem,
     CommentItem,

+ 1 - 1
Assets/Script/Manage/ManaServer.cs

@@ -110,7 +110,7 @@ public class ManaServer : Regist
     public static string ReportContent;
 
     public static JsonData JsonData;
-    public static DateTime Time;
+    public static DateTime Time = DateTime.Now;
 
     public static string MailXml;
     public static List<MailReward> MailRewardList = new List<MailReward>();

+ 51 - 2
Assets/Script/Manage/ManaUI.cs

@@ -3043,6 +3043,7 @@ public class ManaUI : Regist
         #region Z
 
         ManaReso.Get("Z_BK").CreateTweenCG(0, 1, 0.25f, false, true, Curve.EaseOutQuad);
+        ManaReso.Get("Z_Tip").CreateTweenCG(0, 1, 0.25f, false, true, Curve.EaseOutQuad);
 
         #region Z_Create
 
@@ -3051,7 +3052,9 @@ public class ManaUI : Regist
             "Z_Create",
             () =>
             {
-                
+                ManaAudio.PlayClip(Clip.BtnClip);
+
+                PlazaRoomMge.OpenCreatePanel();
             }
         );
 
@@ -3064,7 +3067,7 @@ public class ManaUI : Regist
             "Z_Close",
             () =>
             {
-                ManaAudio.PlayClip(Clip.BtnClip);
+                ManaAudio.PlayClip(Clip.CloseClip);
 
                 PlazaRoomMge.ClosePanel();
             }
@@ -3092,6 +3095,52 @@ public class ManaUI : Regist
 
         #endregion
 
+        #region AA
+
+        ManaLan.Add(ManaReso.Get<Text>("AA_Lab"), new LanStr("UI", "AA_Lab"));
+        ManaLan.Add(ManaReso.Get<Text>("AAa_Tit"), new LanStr("UI", "AAa_Tit"));
+        ManaLan.Add(ManaReso.Get<Text>("AAb_Tit"), new LanStr("UI", "AAb_Tit"));
+
+        ManaReso.Get("AA_CreatePlazaRoom").CreateTweenCG(0, 1, 0.25f, false, true, Curve.EaseOutQuad);
+
+        #region Sliders
+
+       
+
+        #endregion
+
+        #region AA_Close
+
+        ManaReso.SetButtonEvent
+        (
+            "AA_Close",
+            () =>
+            {
+                ManaAudio.PlayClip(Clip.CloseClip);
+
+                PlazaRoomMge.CloseCreatePanel();
+            }
+        );
+
+        #endregion
+
+        #region AA_Create
+
+        ManaReso.SetButtonEvent
+        (
+            "AA_Btn",
+            () =>
+            {
+                ManaAudio.PlayClip(Clip.BtnClip);
+
+                PlazaRoomMge.CreateRoom();
+            }
+        );
+
+        #endregion
+
+        #endregion
+
         if (!ManaTutorial.TutorialA)
         {
             HudTarget hudTarget = ManaReso.Get("C_MiniGame").AddComponent<HudTarget>();

+ 294 - 44
Assets/Script/Manage/PlazaRoomMge.cs

@@ -1,75 +1,256 @@
 using System;
 using System.Collections;
 using System.Collections.Generic;
+using System.Linq;
 using Sfs2X.Entities.Data;
 using UnityEngine;
+using UnityEngine.UI;
 
 public class PlazaRoomMge : Regist
 {
-    private class RoomData
+    #region Config
+
+    public static int CurrentRoomPage = 0;
+    public static int CurrentRoomCount = 1;
+    public static int DownloadVolume = 20;
+    public static bool FilterEnabled;
+    public static bool DownloadLock;
+    public static Transform Grid;
+    public static CounterAction DownloadCallback;
+
+    public static List<PlazaRoomItem> PlazaRoomItems = new List<PlazaRoomItem>();
+    public static Dictionary<int, RoomData> RoomDatas = new Dictionary<int, RoomData>();
+
+    #endregion
+
+    public override void RegistValueC()
     {
-        #region Config
+        DatabaseManager.OnReceiveRoomData += OnReceiveRoomData;
+        Download(DownloadVolume);
+
+        VirtualScrollRect virtualScrollRect = ManaReso.Get<VirtualScrollRect>("Z_ScrollRect");
+        virtualScrollRect.OnVerticalLessEqual0 = NextPage;
+        virtualScrollRect.OnVerticalGreaterEqual1 = PreviousPage;
 
-        private static string IDLabel = "i";
-        private static string OwnerLabel = "o";
-        private static string DurationLabel = "d";
-        private static string MaxPlayerLabel = "m";
-        private static string NameLabel = "n";
-        private static string StartTimeLabel = "s";
 
-        public int ID;
-        public long Owner;
-        public int Duration;
-        public int MaxPlayer;
-        public string Name;
-        public DateTime StartTime;
+        CostFml = ManaData.GetPlazaRoomConfig()[1].Value;
+        OnSliderValueChange(0);
+    }
 
-        public bool IsSystemRoom;
+    public override void RegistReference()
+    {
+        Grid = ManaReso.Get("Z_Grid");
+        DurationLab = ManaReso.Get<Text>("AAa_ValueLab");
+        DurationSlider = ManaReso.Get<Slider>("AAa_Slider");
+        MaxPlayerLab = ManaReso.Get<Text>("AAb_ValueLab");
+        MaxPlayerSlider = ManaReso.Get<Slider>("AAb_Slider");
 
-        #endregion
+        DurationSlider.onValueChanged.AddListener(OnSliderValueChange);
+        MaxPlayerSlider.onValueChanged.AddListener(OnSliderValueChange);
+    }
 
-        public RoomData(ISFSObject arg)
+    public static void OnReceiveRoomData(ISFSArray sfsArray)
+    {
+        Debug.Log(sfsArray.Size());
+        CurrentRoomCount = sfsArray.Size();
+        RoomDatas = new Dictionary<int, RoomData>();
+        for (int i = 0; i < sfsArray.Count; i++)
         {
-            ID = arg.GetInt(IDLabel);
-            Owner = arg.GetLong(OwnerLabel);
-            Duration = arg.GetInt(DurationLabel);
-            MaxPlayer = arg.GetInt(MaxPlayerLabel);
-            Name = arg.GetUtfString(NameLabel);
-            Debug.Log(arg.GetClass(StartTimeLabel).ToString());
-            Debug.Log(arg.GetData(StartTimeLabel).ToString());
-            //StartTime = DateTime.Parse();
+            RoomData roomData = new RoomData(sfsArray.GetSFSObject(i));
+            RoomDatas.Add(i, roomData);
+        }
 
-            if (ID == 0)
-                IsSystemRoom = true;
+        UpdateRoomItem();
 
-            Debug.Log(ID);
-            Debug.Log(Owner);
-            Debug.Log(Duration);
-            Debug.Log(MaxPlayer);
-            Debug.Log(Name);
-            Debug.Log(StartTime);
-            Debug.Log(IsSystemRoom);
+        if (DownloadCallback != null)
+        {
+            DownloadCallback.Invoke();
         }
     }
 
-    #region Config
 
-    public static bool FilterEnabled;
-    
-    #endregion
+    public static void NextPage()
+    {
+        if (RoomDatas.Count <= CurrentRoomPage*PageAmt)
+        {
+            if (!DownloadLock)
+            {
+                Debug.LogWarning("Download Page");
+                ManaLan.Add(ManaReso.Get<Text>("Z_Tip"), new LanStr("UI", "Loading"));
+                ManaReso.Get("Z_Tip").TweenForCG();
+                DownloadLock = true;
+                DownloadNext
+                (
+                    () =>
+                    {
+                        ManaLan.Add(ManaReso.Get<Text>("Z_Tip"), new LanStr("UI", "LoadSucceed"));
+                        DelayCall.Call(0.5f, () => { ManaReso.Get("Z_Tip").TweenBacCG(); });
+                    }
+                );
+            }
+        }
+        else
+        {
+            Debug.LogWarning("Next Page");
+            List<RoomData> roomDatas = GetRoomDatas(++CurrentRoomPage);
+            for (int i = 0; i < roomDatas.Count; i++)
+            {
+                CreateNextRoomItem(roomDatas[i]);
+            }
+        }
+    }
 
-    public override void RegistValueA()
+    public static void PreviousPage()
     {
-        DatabaseManager.OnReceiveRoomData += OnReceiveRoomData;
-        DatabaseManager.GetRoomList(0);
+        if (CurrentRoomPage < 1)
+        {
+            return;
+        }
+
+        Debug.LogWarning("Prev Page");
+        List<RoomData> roomDatas = GetRoomDatas(--CurrentRoomPage);
+        for (int i = 0; i < roomDatas.Count; i++)
+        {
+            CreatePreviousRoomItem(roomDatas[i]);
+        }
     }
 
-    public static void OnReceiveRoomData(ISFSArray sfsArray)
+    private static int MaxRoomItem = 10;
+    private static void CreateNextRoomItem(RoomData roomData)
     {
-        for (int i = 0; i < sfsArray.Count; i++)
+        if (PlazaRoomItems.Count >= MaxRoomItem)
+        {
+            Transform firstChild = Grid.GetChild(0);
+            firstChild.GetComponent<PlazaRoomItem>().Init(roomData);
+            firstChild.SetAsLastSibling();
+        }
+        else
+        {
+            PlazaRoomItems.Add(roomData.CreateItem().Init(roomData));
+        }
+    }
+
+    private static void CreatePreviousRoomItem(RoomData roomData)
+    {
+        if (PlazaRoomItems.Count >= MaxRoomItem)
+        {
+            Transform lastChild = Grid.GetChild(Grid.childCount - 1);
+            lastChild.GetComponent<PlazaRoomItem>().Init(roomData);
+            lastChild.SetAsFirstSibling();
+        }
+        else
+        {
+            return;
+        }
+    }
+
+    private static void UpdateRoomItem()
+    {
+        Debug.LogWarning("Update Page");
+        if (CurrentRoomPage == 0)
         {
-            new RoomData(sfsArray.GetSFSObject(i));
+            return;
         }
+
+        int lastPage = (RoomDatas.Count/PageAmt) + 1;
+        if (CurrentRoomPage > lastPage)
+        {
+            CurrentRoomPage = lastPage;
+        }
+
+        if (CurrentRoomPage == 1)
+        {
+            for (int i = PageAmt; i < Grid.childCount; i++)
+            {
+                ManaReso.Save(Grid.GetChild(i--));
+            }
+
+            for (int i = 0; i < PageAmt; i++)
+            {
+                if (RoomDatas.Count > i)
+                {
+                    if (Grid.childCount > i + 1)
+                    {
+                        Grid.GetChild(i).GetComponent<PlazaRoomItem>().Init(RoomDatas[i]);
+                    }
+                    else
+                    {
+                        RoomDatas[i].CreateItem().Init(RoomDatas[i]);
+                    }
+                }
+                else
+                {
+                    if (Grid.childCount > i + 1)
+                    {
+                        ManaReso.Save(Grid.GetChild(i--));
+                    }
+                }
+            }
+        }
+        else
+        {
+            int startIndex = (CurrentRoomPage - 1)*5;
+            for (int i = startIndex; i < startIndex + 10; i++)
+            {
+                if (RoomDatas.Count > i)
+                {
+                    if (Grid.childCount > i + 1)
+                    {
+                        Grid.GetChild(i).GetComponent<PlazaRoomItem>().Init(RoomDatas[i]);
+                    }
+                    else
+                    {
+                        RoomDatas[i].CreateItem().Init(RoomDatas[i]);
+                    }
+                }
+                else
+                {
+                    if (Grid.childCount > i + 1)
+                    {
+                        ManaReso.Save(Grid.GetChild(i--));
+                    }
+                }
+            }
+        }
+    }
+
+    private static void Download(int limit)
+    {
+        GardenSmartFoxManager.GardenSmartFox.ExecuteAfterCheckConection
+        (
+            () =>
+            {
+                DatabaseManager.GetRoomList(limit);
+            }
+        );
+    }
+
+    private static void DownloadNext(Action action)
+    {
+        int limit = (CurrentRoomCount/DownloadVolume + 1)*DownloadVolume;
+        DownloadCallback = new CounterAction(action);
+        Download(limit);
+    }
+
+    private static int PageAmt = 5;
+    private static List<RoomData> GetRoomDatas(int page)
+    {
+        List<RoomData> roomDatas = new List<RoomData>();
+        if (RoomDatas.Count >= page*PageAmt)
+        {
+            for (int i = 0; i < PageAmt; i++)
+            {
+                roomDatas.Add(RoomDatas[(page - 1)*PageAmt + i]);
+            }
+        }
+        else
+        {
+            for (int i = 0; i < (PageAmt - page*PageAmt - RoomDatas.Count); i++)
+            {
+                roomDatas.Add(RoomDatas[(page - 1)*PageAmt + i]);
+            }
+        }
+        return roomDatas;
     }
 
 
@@ -94,4 +275,73 @@ public class PlazaRoomMge : Regist
         FilterEnabled = false;
         ManaReso.SetActive("Z_InfoImg51", false);
     }
+
+
+    public static int Duration;
+    public static int MaxPlayer;
+    public static string CostFml;
+    private static Text DurationLab;
+    private static Text MaxPlayerLab;
+    private static Slider DurationSlider;
+    private static Slider MaxPlayerSlider;
+    public static void CreateRoom()
+    {
+        string rawName = ManaReso.Get<InputField>("AA_InputField").text;
+
+        if (string.IsNullOrEmpty(rawName))
+        {
+            Bubble.Show(null, Language.GetStr("UI", "AA_AllWhiteSpace"));
+            return;
+        }
+
+        if (StringFilter.ContainSensitiveWord(rawName))
+        {
+            Bubble.Show(null, Language.GetStr("Common", "ContainSensitiveWord"));
+            return;
+        }
+
+        //if (ManaCenter.Pay())
+        //{
+            
+        //}
+    }
+
+    public static void OnSliderValueChange(float value)
+    {
+        //if (!DurationSlider.gameObject.activeInHierarchy || !MaxPlayerSlider.gameObject.activeInHierarchy)
+        //{
+        //    return;
+        //}
+
+        Duration = (int) DurationSlider.value;
+        MaxPlayer = (int) MaxPlayerSlider.value;
+        DurationLab.text = Duration + Language.GetStr("UI", "AAa_Value");
+        MaxPlayerLab.text = MaxPlayer + Language.GetStr("UI", "AAb_Value");
+
+        int cost = (int) Auxiliary.FmlParse(CostFml, "h", Duration.ToString(), "p", MaxPlayer.ToString());
+        ManaReso.SetText("AA_Desc", Language.GetStr("UI", "AA_Cost") + "<(钻石)>" + cost);
+        
+        if (cost > ManaCenter.Diamond)
+        {
+            ManaReso.SetText("AA_BtnLab", Language.GetStr("UI", "AA_NoEnoughDiamond"));
+            ManaReso.Get<Button>("AA_Btn").image.material = Lib.GrayMat;
+            ManaReso.Get<Button>("AA_Btn").interactable = false;
+        }
+        else
+        {
+            ManaReso.SetText("AA_BtnLab", Language.GetStr("UI", "AA_Create"));
+            ManaReso.Get<Button>("AA_Btn").image.material = null;
+            ManaReso.Get<Button>("AA_Btn").interactable = true;
+        }
+    }
+
+    public static void OpenCreatePanel()
+    {
+        ManaReso.Get("AA_CreatePlazaRoom").TweenForCG();
+    }
+
+    public static void CloseCreatePanel()
+    {
+        ManaReso.Get("AA_CreatePlazaRoom").TweenBacCG();
+    }
 }

+ 196 - 0
Assets/Script/Object/PlazaRoomItem.cs

@@ -0,0 +1,196 @@
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using Sfs2X.Entities;
+using Sfs2X.Entities.Data;
+
+using UnityEngine;
+using UnityEngine.UI;
+
+public class RoomData
+{
+    #region Config
+
+    private static string IDLabel = "i";
+    private static string OwnerLabel = "o";
+    private static string DurationLabel = "d";
+    private static string MaxPlayerLabel = "m";
+    private static string NameLabel = "n";
+    private static string StartTimeLabel = "s";
+    private static string EndTimeLabel = "e";
+
+    public TimeSpan RemainTime
+    {
+        get
+        {
+            if (IsSystemRoom)
+            {
+                return new TimeSpan(1, 0, 0, 0);
+            }
+            else
+            {
+                return EndTime.Subtract(StartTime);
+            }
+        }
+    }
+
+    public int ID;
+    public int Duration;
+    public int MaxPlayer;
+    public long Owner;
+    public bool IsSystemRoom;
+    public string Name;
+    public DateTime StartTime;
+    public DateTime EndTime;
+
+    #endregion
+
+    public RoomData(ISFSObject arg)
+    {
+        ID = arg.GetInt(IDLabel);
+        Owner = arg.GetLong(OwnerLabel);
+        Duration = arg.GetInt(DurationLabel);
+        MaxPlayer = arg.GetInt(MaxPlayerLabel);
+        Name = arg.GetUtfString(NameLabel);
+        StartTime = DateUtil.GetTime(arg.GetClass(StartTimeLabel).ToString().TrimEnd('0'));
+        EndTime = DateUtil.GetTime(arg.GetClass(EndTimeLabel).ToString().TrimEnd('0'));
+
+        if (ID == 1)
+            IsSystemRoom = true;
+
+        //Debug.Log(ID);
+        //Debug.Log(Owner);
+        //Debug.Log(Duration);
+        //Debug.Log(MaxPlayer);
+        //Debug.Log(Name);
+        //Debug.Log(StartTime);
+        //Debug.Log(EndTime);
+        //Debug.Log(RemainHour);
+        //Debug.Log(IsSystemRoom);
+    }
+
+    public PlazaRoomItem CreateItem()
+    {
+        PlazaRoomItem plazaRoomItem = ManaReso.Get("PlazaRoomItem", Folder.UI, false, ManaReso.Get("Z_Grid"), false, ObjType.PlazaRoomItem, typeof(PlazaRoomItem)).GetComponent<PlazaRoomItem>();
+        plazaRoomItem.Regist();
+        return plazaRoomItem;
+    }
+
+    public static bool operator ==(RoomData r1, RoomData r2)
+    {
+        if (r1.ID == r2.ID)
+        {
+            return true;
+        }
+        else
+        {
+            return false;
+        }
+    }
+
+    public static bool operator !=(RoomData r1, RoomData r2)
+    {
+        return !(r1 == r2);
+    }
+
+    public override bool Equals(object obj)
+    {
+        return this == (RoomData) obj;
+    }
+
+    public override int GetHashCode()
+    {
+        return ID.GetHashCode();
+    }
+}
+
+public class PlazaRoomItem : MonoBehaviour
+{
+    #region Config
+
+    public bool Registed;
+    public RoomData RoomData;
+
+    public Text ID;
+    public Text Name;
+    public Text Status;
+    public Text Duration;
+    public Text People;
+    public Text ButtonLab;
+    public Image Img0;
+    public Button Button;
+
+    #endregion
+
+    public void Regist()
+    {
+        if (Registed)
+            return;
+        else
+            Registed = true;
+
+        Dictionary<string, Transform> dictionary = new Dictionary<string, Transform>();
+        Auxiliary.CompileDic(transform, dictionary);
+        ID = dictionary["ID"].GetComponent<Text>();
+        Name = dictionary["Name"].GetComponent<Text>();
+        Status = dictionary["Status"].GetComponent<Text>();
+        Duration = dictionary["Duration"].GetComponent<Text>();
+        People = dictionary["People"].GetComponent<Text>();
+        Img0 = dictionary["Img0"].GetComponent<Image>();
+        Button = dictionary["Btn"].GetComponent<Button>();
+        ButtonLab = dictionary["BtnLab"].GetComponent<Text>();
+    }
+
+    public PlazaRoomItem Init(RoomData roomData)
+    {
+        RoomData = roomData;
+        if (RoomData.IsSystemRoom)
+        {
+            ID.SetActive(false);
+            Img0.SetActive(true);
+        }
+        else
+        {
+            ID.SetActive(true);
+            Img0.SetActive(false);
+            ID.text = RoomData.ID.ToString();
+        }
+
+        if (RoomData.RemainTime.TotalMinutes > 10)
+        {
+            ManaLan.Add(Status, new LanStr("UI", "Z_Running"));
+            Status.color = Lib.RoomRunning;
+        }
+        else
+        {
+            ManaLan.Add(Status, new LanStr("UI", "Z_Closing"));
+            Status.color = Lib.RoomClosing;
+        }
+
+        Name.text = RoomData.Name;
+        Duration.text = RoomData.Duration.ToString();
+
+        //foreach (var VARIABLE in GardenSmartFoxManager.GardenSmartFox.SmartFox.GetRoomListFromGroup("default"))
+        //{
+        //    Debug.Log(VARIABLE.Id);
+        //}
+
+        Room room = GardenSmartFoxManager.GardenSmartFox.SmartFox.GetRoomById(RoomData.ID);
+        if (room == null || room.UserCount < room.MaxUsers)
+        {
+            ManaLan.Add(People, new LanStr("UI", "Z_Available"));
+            People.color = Lib.RoomRunning;
+            Button.image.material = null;
+            ManaLan.Add(ButtonLab, new LanStr("UI", "Z_Join"));
+        }
+        else
+        {
+            ManaLan.Add(People, new LanStr("UI", "Z_Full"));
+            People.color = Lib.RoomClosing;
+            Button.image.material = Lib.GrayMat;
+            ManaLan.Add(ButtonLab, new LanStr("UI", "Z_Full"));
+        }
+
+        return this;
+    }
+}

+ 12 - 0
Assets/Script/Object/PlazaRoomItem.cs.meta

@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 918a67a36a3ce784a81720e02caf072b
+timeCreated: 1508118970
+licenseType: Pro
+MonoImporter:
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 3 - 3
Assets/Script/SFS/Manager/DatabaseManager.cs

@@ -9,7 +9,7 @@ using UnityEngine;
 public class DatabaseManager
 {
     private static string DatabaseIDLabel = "D";
-    private static string StartIDLabel = "S";
+    private static string LimitLabel = "L";
     private static string ResultLabel = "R";
     private static GardenSmartFox GardenSmartFox;
 
@@ -25,13 +25,13 @@ public class DatabaseManager
     {
         SFSObject parameter = new SFSObject();
         parameter.PutInt(DatabaseIDLabel, DatabaseID.RoomData.GetHashCode());
-        parameter.PutInt(StartIDLabel, startID);
+        parameter.PutInt(LimitLabel, startID);
         GardenSmartFox.SmartFox.Send(new ExtensionRequest(RequestID.Database.GetHashString(), parameter));
     }
 
     public void RoomData(BaseEvent baseEvent)
     {
-        //DebugManager.PrintKeysAndValuesOfBaseEvent("RoomData", baseEvent);
+        //DebugManager.PrintKeysAndValuesOfBaseEvent("PlazaRoomData", baseEvent);
 
         SFSObject sfsObject = (SFSObject) baseEvent.Params["params"];
         OnReceiveRoomData.Invoke(sfsObject.GetSFSArray(ResultLabel));

+ 7 - 7
Assets/Script/SFS/Manager/GardenSmartFox.cs

@@ -34,8 +34,9 @@ public class GardenSmartFox
 
     public const string CommandArrayLabel = "A";
 	public const string CommandLabel = "C";
+	public const string RoomIDLabel = "I";
 	public const string ParameterLabel = "P";
-	public const string TargetUserLabel = "U";
+    public const string TargetUserLabel = "U";
 
     public User User;
     public SmartFox SmartFox;
@@ -246,15 +247,14 @@ public class GardenSmartFox
         return parameter;
     }
 
-    public static SFSObject ConstructCommandParameter(int commandID, SFSObject sfsObject, int targetUserID)
+    public static SFSObject ConstructCommandParameter(int commandID, SFSObject sfsObject, int targetUserID, int roomID)
     {
         SFSObject parameter = new SFSObject();
 
-        parameter.PutInt("C", commandID);
-        parameter.PutSFSObject("P", sfsObject);
-        parameter.PutInt("U", targetUserID);
-
-        parameter.PutSFSObject("P", sfsObject);
+        parameter.PutInt(CommandLabel, commandID);
+        parameter.PutSFSObject(ParameterLabel, sfsObject);
+        parameter.PutInt(TargetUserLabel, targetUserID);
+        parameter.PutInt(RoomIDLabel, roomID);
 
         return parameter;
     }

+ 1 - 1
Assets/Script/SFS/Manager/GardenSmartFoxManager.cs

@@ -101,7 +101,7 @@ public class GardenSmartFoxManager : Regist
     {
         GardenSmartFox = new GardenSmartFox(new Loggor(), new Connector());
 
-        GardenSmartFox.Connector.Connect();
+        //GardenSmartFox.Connector.Connect();
     }
 
     public void OnDisable()

+ 2 - 2
Assets/Script/SFS/Manager/SFSPlazaRoomManager.cs

@@ -363,7 +363,7 @@ public class SFSPlazaRoomManager
         {
             KeepAliveTimer = 0;
 
-            GardenSmartFox.AddRequest(GardenSmartFox.ConstructCommandParameter(CommandID.KeepAlive.GetHashCode(), new SFSObject(), 0), RequestType.Immediate);
+            GardenSmartFox.AddRequest(GardenSmartFox.ConstructCommandParameter(CommandID.KeepAlive.GetHashCode(), new SFSObject(), 0, GardenSmartFox.SFSPlazaRoomManager.CurrentPlazaRoom.Id), RequestType.Immediate);
         }
     }
 
@@ -588,7 +588,7 @@ public class SFSPlazaRoomManager
         parameter.PutInt(DataID.PlayerDirection.GetHashString(), SelfInstance.Player.PlayerDirection.GetHashCode());
         parameter.PutUtfString(DataID.NickName.GetHashString(), ManaNickName.NickName);
 
-        GardenSmartFox.AddRequest(GardenSmartFox.ConstructCommandParameter(CommandID.Instantiate.GetHashCode(), parameter, receiverID), RequestType.Immediate);
+        GardenSmartFox.AddRequest(GardenSmartFox.ConstructCommandParameter(CommandID.Instantiate.GetHashCode(), parameter, receiverID, GardenSmartFox.SFSPlazaRoomManager.CurrentPlazaRoom.Id), RequestType.Immediate);
 
         if (SelfInstance.IsMoving)
         {

+ 4 - 4
Assets/Script/SFS/SFSExtension/PlazaRoomExtension.cs

@@ -81,7 +81,7 @@ public class PlazaRoomExtension
         sfsObject.PutInt(DataID.SenderID.GetHashString(), BaseSFSExtension.GardenSmartFox.User.Id);
         sfsObject.PutUtfString(DataID.Destination.GetHashString(), destination.VectorToString());
 
-        SFSObject parameter = GardenSmartFox.ConstructCommandParameter(CommandID.Synchronize.GetHashCode(), sfsObject, -1);
+        SFSObject parameter = GardenSmartFox.ConstructCommandParameter(CommandID.Synchronize.GetHashCode(), sfsObject, -1, BaseSFSExtension.GardenSmartFox.SFSPlazaRoomManager.CurrentPlazaRoom.Id);
 
         BaseSFSExtension.GardenSmartFox.AddRequest(parameter, RequestType.BatchAndOverride, RequestName.SynchronizePosition.ToString(), BatchOption.TryNot);
     }
@@ -92,7 +92,7 @@ public class PlazaRoomExtension
         sfsObject.PutInt(DataID.SenderID.GetHashString(), BaseSFSExtension.GardenSmartFox.User.Id);
         sfsObject.PutIntArray(DataID.Close.GetHashString(), closeIDs.ToArray());
 
-        SFSObject parameter = GardenSmartFox.ConstructCommandParameter(CommandID.Synchronize.GetHashCode(), sfsObject, -1);
+        SFSObject parameter = GardenSmartFox.ConstructCommandParameter(CommandID.Synchronize.GetHashCode(), sfsObject, -1, BaseSFSExtension.GardenSmartFox.SFSPlazaRoomManager.CurrentPlazaRoom.Id);
 
         BaseSFSExtension.GardenSmartFox.AddRequest(parameter, RequestType.BatchAndOverride, RequestName.SynchronizeClose.ToString());
     }
@@ -103,7 +103,7 @@ public class PlazaRoomExtension
         sfsObject.PutInt(DataID.SenderID.GetHashString(), BaseSFSExtension.GardenSmartFox.User.Id);
         sfsObject.PutInt(DataID.Expression.GetHashString(), expressionID.GetHashCode());
 
-        SFSObject parameter = GardenSmartFox.ConstructCommandParameter(CommandID.ReceiveExpression.GetHashCode(), sfsObject, -1);
+        SFSObject parameter = GardenSmartFox.ConstructCommandParameter(CommandID.ReceiveExpression.GetHashCode(), sfsObject, -1, BaseSFSExtension.GardenSmartFox.SFSPlazaRoomManager.CurrentPlazaRoom.Id);
 
         BaseSFSExtension.GardenSmartFox.AddRequest(parameter, RequestType.Immediate);
     }
@@ -114,7 +114,7 @@ public class PlazaRoomExtension
         sfsObject.PutInt(DataID.SenderID.GetHashString(), BaseSFSExtension.GardenSmartFox.User.Id);
         sfsObject.PutUtfString(DataID.Message.GetHashString(), message);
 
-        SFSObject parameter = GardenSmartFox.ConstructCommandParameter(CommandID.ReceivePublicMessage.GetHashCode(), sfsObject, -1);
+        SFSObject parameter = GardenSmartFox.ConstructCommandParameter(CommandID.ReceivePublicMessage.GetHashCode(), sfsObject, -1, BaseSFSExtension.GardenSmartFox.SFSPlazaRoomManager.CurrentPlazaRoom.Id);
 
         BaseSFSExtension.GardenSmartFox.AddRequest(parameter, RequestType.Immediate);
     }

+ 2 - 2
Assets/Script/Tool/Auxiliary.cs

@@ -149,7 +149,7 @@ public class Auxiliary : Regist
 
         if (Input.GetKeyDown(KeyCode.A))
         {
-            DatabaseManager.GetRoomList(0);
+            DatabaseManager.GetRoomList(-1);
 
             //ManaServer.NotificationIndex = ManaData.GetPlayerInt("NotificationIndex") + 1;
             //ManaCenter.OfflineLock = true;
@@ -165,7 +165,7 @@ public class Auxiliary : Regist
 
         if (Input.GetKeyDown(KeyCode.D))
         {
-            ManaTutorial.EnterPlazaRoom();
+            GardenSmartFoxManager.GardenSmartFox.SFSPlazaRoomManager.OnEnterPlazaRoomButton();
         }
 
         if (Input.GetKeyDown(KeyCode.Z))

+ 0 - 17
Assets/Script/Tool/DashGame/DelayCall.cs

@@ -1,17 +0,0 @@
-using UnityEngine;
-using System.Collections;
-
-public class DelayCall : MonoBehaviour
-{
-    /// <summary>
-    /// eg: StartCoroutine(DelayCall.Call(callback, delay))
-    /// </summary>
-    /// <param name="callback"></param>
-    /// <param name="delay"></param>
-    /// <returns></returns>
-    public static IEnumerator Call(System.Action callback, float delay)
-    {
-        yield return new WaitForSeconds(delay);
-        callback();
-    }
-}

+ 56 - 0
Assets/Script/Tool/DelayCall.cs

@@ -0,0 +1,56 @@
+using System;
+using UnityEngine;
+
+using System.Collections;
+using System.Collections.Generic;
+
+public class DelayCall : MonoBehaviour 
+{
+    #region Config
+
+    public static DelayCall Instance
+    {
+        get
+        {
+            if (instance == null)
+            {
+                GameObject go = new GameObject("DelayCall");
+                instance = go.AddComponent<DelayCall>();
+                DontDestroyOnLoad(go);
+            }
+
+            return instance;
+        }
+        set { instance = value; }
+    }
+    private static DelayCall instance;
+
+    #endregion
+
+    public static Coroutine Call(int delayFrame, Action action)
+    {
+        return Instance.StartCoroutine(EDelayCall(delayFrame, action));
+    }
+
+    public static Coroutine Call(float delayTime, Action action)
+    {
+        return Instance.StartCoroutine(EDelayCall(delayTime, action));
+    }
+
+    private static IEnumerator EDelayCall(int delayFrame, Action action)
+    {
+        int count = 0;
+
+        while (count++ < delayFrame)
+            yield return null;
+
+        action.SafeInvoke();
+    }
+
+    private static IEnumerator EDelayCall(float delayTime, Action action)
+    {
+        yield return new WaitForSeconds(delayTime);
+        
+        action.SafeInvoke();
+    }
+}

+ 2 - 2
Assets/Script/Tool/DashGame/DelayCall.cs.meta → Assets/Script/Tool/DelayCall.cs.meta

@@ -1,6 +1,6 @@
 fileFormatVersion: 2
-guid: 90757a903d63d0a499cb48170796fec8
-timeCreated: 1488126441
+guid: 873a37a1257b36e43916eca0f039d0d3
+timeCreated: 1508122817
 licenseType: Pro
 MonoImporter:
   serializedVersion: 2

+ 41 - 0
Assets/Script/Tool/VirtualScrollRect.cs

@@ -0,0 +1,41 @@
+using System;
+using System.Collections;
+using System.Collections.Generic;
+
+using UnityEngine;
+using UnityEngine.EventSystems;
+using UnityEngine.UI;
+
+public class VirtualScrollRect : ScrollRect
+{
+    #region
+
+    public Action OnVerticalLessEqual0;
+    public Action OnVerticalGreaterEqual1;
+    public Action OnHorizontalLessEqual0;
+    public Action OnHorizontalGreaterEqual1;
+
+    #endregion
+
+    public void Recycle(Vector2 contentOffset)
+    {
+        m_ContentStartPosition += contentOffset;
+    }
+
+    public override void OnDrag(PointerEventData eventData)
+    {
+        base.OnDrag(eventData);
+
+        if (verticalNormalizedPosition >= 1)
+            OnVerticalGreaterEqual1.SafeInvoke();
+
+        if (verticalNormalizedPosition <= 0)
+            OnVerticalLessEqual0.SafeInvoke();
+
+        if (horizontalNormalizedPosition >= 1)
+            OnHorizontalGreaterEqual1.SafeInvoke();
+
+        if (horizontalNormalizedPosition <= 0)
+            OnHorizontalLessEqual0.SafeInvoke();
+    }
+}

+ 12 - 0
Assets/Script/Tool/VirtualScrollRect.cs.meta

@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: de06f8b322e33c140b14a482f454f454
+timeCreated: 1508122817
+licenseType: Pro
+MonoImporter:
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 5 - 1
第三期.txt

@@ -1,4 +1,8 @@
-Z界面的语言
+更新了内容的情况才update page 和lock
+
+每过一段时间允许去下载一次房间
+
+Z AA界面的语言
 
 房间名字长度测试
 

Niektoré súbory nie sú zobrazené, pretože je v týchto rozdielových dátach zmenené mnoho súborov