LiuQilin 8 gadi atpakaļ
vecāks
revīzija
791db1aaaa

+ 0 - 144
Assets/Resource/Logo.unity

@@ -155,103 +155,6 @@ SpriteRenderer:
   m_Color: {r: 0, g: 0, b: 0, a: 1}
   m_FlipX: 0
   m_FlipY: 0
---- !u!1001 &563484837
-Prefab:
-  m_ObjectHideFlags: 0
-  serializedVersion: 2
-  m_Modification:
-    m_TransformParent: {fileID: 0}
-    m_Modifications:
-    - target: {fileID: 4784130365705390, guid: 810874a84a2ed314dbe993d242dae47d, type: 2}
-      propertyPath: m_LocalPosition.x
-      value: 25.15
-      objectReference: {fileID: 0}
-    - target: {fileID: 4784130365705390, guid: 810874a84a2ed314dbe993d242dae47d, type: 2}
-      propertyPath: m_LocalPosition.y
-      value: 2.1
-      objectReference: {fileID: 0}
-    - target: {fileID: 4784130365705390, guid: 810874a84a2ed314dbe993d242dae47d, type: 2}
-      propertyPath: m_LocalPosition.z
-      value: -2.1
-      objectReference: {fileID: 0}
-    - target: {fileID: 4784130365705390, guid: 810874a84a2ed314dbe993d242dae47d, type: 2}
-      propertyPath: m_LocalRotation.x
-      value: -0.6599197
-      objectReference: {fileID: 0}
-    - target: {fileID: 4784130365705390, guid: 810874a84a2ed314dbe993d242dae47d, type: 2}
-      propertyPath: m_LocalRotation.y
-      value: 0.25398037
-      objectReference: {fileID: 0}
-    - target: {fileID: 4784130365705390, guid: 810874a84a2ed314dbe993d242dae47d, type: 2}
-      propertyPath: m_LocalRotation.z
-      value: 0.6599197
-      objectReference: {fileID: 0}
-    - target: {fileID: 4784130365705390, guid: 810874a84a2ed314dbe993d242dae47d, type: 2}
-      propertyPath: m_LocalRotation.w
-      value: 0.25398037
-      objectReference: {fileID: 0}
-    - target: {fileID: 4784130365705390, guid: 810874a84a2ed314dbe993d242dae47d, type: 2}
-      propertyPath: m_RootOrder
-      value: 5
-      objectReference: {fileID: 0}
-    - target: {fileID: 1976919018343882, guid: 810874a84a2ed314dbe993d242dae47d, type: 2}
-      propertyPath: m_Name
-      value: NotePartical (1)
-      objectReference: {fileID: 0}
-    - target: {fileID: 198047900219734454, guid: 810874a84a2ed314dbe993d242dae47d,
-        type: 2}
-      propertyPath: randomSeed
-      value: 1708220054
-      objectReference: {fileID: 0}
-    m_RemovedComponents: []
-  m_ParentPrefab: {fileID: 100100000, guid: 810874a84a2ed314dbe993d242dae47d, type: 2}
-  m_IsPrefabParent: 0
---- !u!1001 &673258688
-Prefab:
-  m_ObjectHideFlags: 0
-  serializedVersion: 2
-  m_Modification:
-    m_TransformParent: {fileID: 0}
-    m_Modifications:
-    - target: {fileID: 4518027564363394, guid: a9536479b9a1e3945bbff2f92a19715b, type: 2}
-      propertyPath: m_LocalPosition.x
-      value: 7.5
-      objectReference: {fileID: 0}
-    - target: {fileID: 4518027564363394, guid: a9536479b9a1e3945bbff2f92a19715b, type: 2}
-      propertyPath: m_LocalPosition.y
-      value: 0
-      objectReference: {fileID: 0}
-    - target: {fileID: 4518027564363394, guid: a9536479b9a1e3945bbff2f92a19715b, type: 2}
-      propertyPath: m_LocalPosition.z
-      value: -10
-      objectReference: {fileID: 0}
-    - target: {fileID: 4518027564363394, guid: a9536479b9a1e3945bbff2f92a19715b, type: 2}
-      propertyPath: m_LocalRotation.x
-      value: 0
-      objectReference: {fileID: 0}
-    - target: {fileID: 4518027564363394, guid: a9536479b9a1e3945bbff2f92a19715b, type: 2}
-      propertyPath: m_LocalRotation.y
-      value: 0
-      objectReference: {fileID: 0}
-    - target: {fileID: 4518027564363394, guid: a9536479b9a1e3945bbff2f92a19715b, type: 2}
-      propertyPath: m_LocalRotation.z
-      value: 0
-      objectReference: {fileID: 0}
-    - target: {fileID: 4518027564363394, guid: a9536479b9a1e3945bbff2f92a19715b, type: 2}
-      propertyPath: m_LocalRotation.w
-      value: 1
-      objectReference: {fileID: 0}
-    - target: {fileID: 4518027564363394, guid: a9536479b9a1e3945bbff2f92a19715b, type: 2}
-      propertyPath: m_RootOrder
-      value: 3
-      objectReference: {fileID: 0}
-    - target: {fileID: 1888753063508628, guid: a9536479b9a1e3945bbff2f92a19715b, type: 2}
-      propertyPath: m_IsActive
-      value: 1
-      objectReference: {fileID: 0}
-    m_RemovedComponents: []
-  m_ParentPrefab: {fileID: 100100000, guid: a9536479b9a1e3945bbff2f92a19715b, type: 2}
-  m_IsPrefabParent: 0
 --- !u!1 &1218118077
 GameObject:
   m_ObjectHideFlags: 0
@@ -515,53 +418,6 @@ MonoBehaviour:
   m_Script: {fileID: 11500000, guid: d995bd93e747b4143812c28df116ed09, type: 3}
   m_Name: 
   m_EditorClassIdentifier: 
---- !u!1001 &1653614446
-Prefab:
-  m_ObjectHideFlags: 0
-  serializedVersion: 2
-  m_Modification:
-    m_TransformParent: {fileID: 0}
-    m_Modifications:
-    - target: {fileID: 4784130365705390, guid: 810874a84a2ed314dbe993d242dae47d, type: 2}
-      propertyPath: m_LocalPosition.x
-      value: 18.55
-      objectReference: {fileID: 0}
-    - target: {fileID: 4784130365705390, guid: 810874a84a2ed314dbe993d242dae47d, type: 2}
-      propertyPath: m_LocalPosition.y
-      value: 2.1
-      objectReference: {fileID: 0}
-    - target: {fileID: 4784130365705390, guid: 810874a84a2ed314dbe993d242dae47d, type: 2}
-      propertyPath: m_LocalPosition.z
-      value: -14.83
-      objectReference: {fileID: 0}
-    - target: {fileID: 4784130365705390, guid: 810874a84a2ed314dbe993d242dae47d, type: 2}
-      propertyPath: m_LocalRotation.x
-      value: -0.6599197
-      objectReference: {fileID: 0}
-    - target: {fileID: 4784130365705390, guid: 810874a84a2ed314dbe993d242dae47d, type: 2}
-      propertyPath: m_LocalRotation.y
-      value: 0.25398037
-      objectReference: {fileID: 0}
-    - target: {fileID: 4784130365705390, guid: 810874a84a2ed314dbe993d242dae47d, type: 2}
-      propertyPath: m_LocalRotation.z
-      value: 0.6599197
-      objectReference: {fileID: 0}
-    - target: {fileID: 4784130365705390, guid: 810874a84a2ed314dbe993d242dae47d, type: 2}
-      propertyPath: m_LocalRotation.w
-      value: 0.25398037
-      objectReference: {fileID: 0}
-    - target: {fileID: 4784130365705390, guid: 810874a84a2ed314dbe993d242dae47d, type: 2}
-      propertyPath: m_RootOrder
-      value: 4
-      objectReference: {fileID: 0}
-    - target: {fileID: 199997109612976202, guid: 810874a84a2ed314dbe993d242dae47d,
-        type: 2}
-      propertyPath: m_Materials.Array.data[0]
-      value: 
-      objectReference: {fileID: 2100000, guid: 44ecd87927b86314f9818cbdabbeae17, type: 2}
-    m_RemovedComponents: []
-  m_ParentPrefab: {fileID: 100100000, guid: 810874a84a2ed314dbe993d242dae47d, type: 2}
-  m_IsPrefabParent: 0
 --- !u!1 &1833966243
 GameObject:
   m_ObjectHideFlags: 0

+ 1 - 1
Assets/Resource/Prefab/Object/DebugMode.prefab

@@ -241,6 +241,7 @@ MonoBehaviour:
   - {fileID: 21300000, guid: 70c3c26b0d699b447a93c31f311fc6f0, type: 3}
   - {fileID: 2800000, guid: 7ac265c5bd69ac5488e5fe03a9b10399, type: 3}
   - {fileID: 1534767049009076, guid: b6c28e79e69b67b41bb8d878bcc3cd54, type: 2}
+  - {fileID: 1888753063508628, guid: a9536479b9a1e3945bbff2f92a19715b, type: 2}
   ConfigList:
   - {fileID: 4900000, guid: f039d2181a3e9ea418ff5f211730b175, type: 3}
   - {fileID: 4900000, guid: ff8c2496a2cfe6e4eaa5262e9d7b0b2a, type: 3}
@@ -267,5 +268,4 @@ MonoBehaviour:
   DiscardList:
   - {fileID: 1422722603004606, guid: f66999d8c3be4ff46b7dbde0417af018, type: 2}
   - {fileID: 1178346060137818, guid: e2d62becad3f170428db59673f313354, type: 2}
-  - {fileID: 1888753063508628, guid: a9536479b9a1e3945bbff2f92a19715b, type: 2}
   PlazaRoomList: []

+ 1 - 1
Assets/Resource/Prefab/Object/PlazaRoom.prefab

@@ -475,7 +475,7 @@ ParticleSystem:
   moveWithTransform: 0
   moveWithCustomTransform: {fileID: 0}
   scalingMode: 2
-  randomSeed: -703572424
+  randomSeed: -1196264515
   InitialModule:
     serializedVersion: 3
     enabled: 1

+ 0 - 127
Assets/Resource/Sprite/Editor/PlazaRoom/New Material.mat

@@ -1,127 +0,0 @@
-%YAML 1.1
-%TAG !u! tag:unity3d.com,2011:
---- !u!21 &2100000
-Material:
-  serializedVersion: 6
-  m_ObjectHideFlags: 0
-  m_PrefabParentObject: {fileID: 0}
-  m_PrefabInternal: {fileID: 0}
-  m_Name: New Material
-  m_Shader: {fileID: 4800000, guid: 014e2b4476181e242abeed99a5d07482, type: 3}
-  m_ShaderKeywords: _EMISSION
-  m_LightmapFlags: 1
-  m_CustomRenderQueue: -1
-  stringTagMap: {}
-  m_SavedProperties:
-    serializedVersion: 2
-    m_TexEnvs:
-    - first:
-        name: _BumpMap
-      second:
-        m_Texture: {fileID: 0}
-        m_Scale: {x: 1, y: 1}
-        m_Offset: {x: 0, y: 0}
-    - first:
-        name: _DetailAlbedoMap
-      second:
-        m_Texture: {fileID: 0}
-        m_Scale: {x: 1, y: 1}
-        m_Offset: {x: 0, y: 0}
-    - first:
-        name: _DetailMask
-      second:
-        m_Texture: {fileID: 0}
-        m_Scale: {x: 1, y: 1}
-        m_Offset: {x: 0, y: 0}
-    - first:
-        name: _DetailNormalMap
-      second:
-        m_Texture: {fileID: 0}
-        m_Scale: {x: 1, y: 1}
-        m_Offset: {x: 0, y: 0}
-    - first:
-        name: _EmissionMap
-      second:
-        m_Texture: {fileID: 0}
-        m_Scale: {x: 1, y: 1}
-        m_Offset: {x: 0, y: 0}
-    - first:
-        name: _MainTex
-      second:
-        m_Texture: {fileID: 2800000, guid: 155a51226f4c7b541b84af353b0db63e, type: 3}
-        m_Scale: {x: 1, y: 1}
-        m_Offset: {x: 0, y: 0}
-    - first:
-        name: _MetallicGlossMap
-      second:
-        m_Texture: {fileID: 0}
-        m_Scale: {x: 1, y: 1}
-        m_Offset: {x: 0, y: 0}
-    - first:
-        name: _OcclusionMap
-      second:
-        m_Texture: {fileID: 0}
-        m_Scale: {x: 1, y: 1}
-        m_Offset: {x: 0, y: 0}
-    - first:
-        name: _ParallaxMap
-      second:
-        m_Texture: {fileID: 0}
-        m_Scale: {x: 1, y: 1}
-        m_Offset: {x: 0, y: 0}
-    m_Floats:
-    - first:
-        name: _BumpScale
-      second: 1
-    - first:
-        name: _Cutoff
-      second: 0.5
-    - first:
-        name: _DetailNormalMapScale
-      second: 1
-    - first:
-        name: _DstBlend
-      second: 0
-    - first:
-        name: _GlossMapScale
-      second: 1
-    - first:
-        name: _Glossiness
-      second: 0.5
-    - first:
-        name: _GlossyReflections
-      second: 1
-    - first:
-        name: _Metallic
-      second: 0
-    - first:
-        name: _Mode
-      second: 0
-    - first:
-        name: _OcclusionStrength
-      second: 1
-    - first:
-        name: _Parallax
-      second: 0.02
-    - first:
-        name: _SmoothnessTextureChannel
-      second: 0
-    - first:
-        name: _SpecularHighlights
-      second: 1
-    - first:
-        name: _SrcBlend
-      second: 1
-    - first:
-        name: _UVSec
-      second: 0
-    - first:
-        name: _ZWrite
-      second: 1
-    m_Colors:
-    - first:
-        name: _Color
-      second: {r: 1, g: 1, b: 1, a: 1}
-    - first:
-        name: _EmissionColor
-      second: {r: 0, g: 0, b: 0, a: 1}

+ 0 - 8
Assets/Resource/Sprite/Editor/PlazaRoom/New Material.mat.meta

@@ -1,8 +0,0 @@
-fileFormatVersion: 2
-guid: 44ecd87927b86314f9818cbdabbeae17
-timeCreated: 1506674232
-licenseType: Pro
-NativeFormatImporter:
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

+ 62 - 19
Assets/Resource/Sprite/Editor/PlazaRoom/Note.shader

@@ -1,26 +1,69 @@
-Shader "DashGame/Particles/PlazaRoomStar" 
+Shader "DashGame/PlazaRoomStar" 
 {
-	Properties{
-		_MainTex("Particle Texture", 2D) = "white" {}
+	Properties 
+	{
+		_TintColor ("Tint Color", Color) = (0.5,0.5,0.5,0.5)
+		_MainTex ("Particle Texture", 2D) = "white" {}
+		_InvFade ("Soft Particles Factor", Range(0.01,3.0)) = 1.0
 	}
 
-		Category{
-		Tags{ "Queue" = "Transparent" "IgnoreProjector" = "True" "RenderType" = "Transparent" "PreviewType" = "Plane" }
-		Blend SrcAlpha zero
-		Cull Off Lighting Off ZWrite Off Fog{ Color(0,0,0,0) }
+	Category 
+	{
+		Tags { "Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent" "PreviewType"="Plane" }
+		Blend SrcAlpha OneMinusSrcAlpha
+		Lighting Off 
+		ZWrite Off
+	
+		SubShader 
+		{
+			Pass 
+			{
+				CGPROGRAM
 
-		BindChannels{
-		Bind "Color", color
-		Bind "Vertex", vertex
-		Bind "TexCoord", texcoord
-	}
+				#pragma vertex vert
+				#pragma fragment frag
+				#pragma target 2.0
 
-		SubShader{
-		Pass{
-		SetTexture[_MainTex]{
-		combine texture * primary
-	}
-	}
-	}
+				#include "UnityCG.cginc"
+
+				sampler2D _MainTex;
+				fixed4 _TintColor;
+				
+				struct appdata_t 
+				{
+					float4 vertex : POSITION;
+					fixed4 color : COLOR;
+					float2 texcoord : TEXCOORD0;
+				};
+
+				struct v2f 
+				{
+					float4 vertex : SV_POSITION;
+					fixed4 color : COLOR;
+					float2 texcoord : TEXCOORD0;
+				};
+			
+				float4 _MainTex_ST;
+
+				v2f vert (appdata_t v)
+				{
+					v2f o;
+
+					o.vertex = UnityObjectToClipPos(v.vertex);
+					o.color = v.color;
+					o.texcoord = TRANSFORM_TEX(v.texcoord,_MainTex);
+
+					return o;
+				}
+
+				fixed4 frag (v2f i) : SV_Target
+				{
+					fixed4 col = 2 * i.color * _TintColor * tex2D(_MainTex, i.texcoord);
+					return col;
+				}
+
+				ENDCG 
+			}
+		}	
 	}
 }

+ 1 - 1
Assets/Resource/Sprite/Editor/PlazaRoom/NoteMat.mat

@@ -7,7 +7,7 @@ Material:
   m_PrefabParentObject: {fileID: 0}
   m_PrefabInternal: {fileID: 0}
   m_Name: NoteMat
-  m_Shader: {fileID: 10753, guid: 0000000000000000f000000000000000, type: 0}
+  m_Shader: {fileID: 4800000, guid: 014e2b4476181e242abeed99a5d07482, type: 3}
   m_ShaderKeywords: _EMISSION
   m_LightmapFlags: 1
   m_CustomRenderQueue: -1

BIN
Assets/Resource/Sprite/Editor/PlazaRoom/音符 1.png


+ 0 - 92
Assets/Resource/Sprite/Editor/PlazaRoom/音符 1.png.meta

@@ -1,92 +0,0 @@
-fileFormatVersion: 2
-guid: afd240192c7d4df4d8a512e03751559c
-timeCreated: 1506673184
-licenseType: Pro
-TextureImporter:
-  fileIDToRecycleName: {}
-  serializedVersion: 4
-  mipmaps:
-    mipMapMode: 0
-    enableMipMap: 1
-    sRGBTexture: 1
-    linearTexture: 0
-    fadeOut: 0
-    borderMipMap: 0
-    mipMapFadeDistanceStart: 1
-    mipMapFadeDistanceEnd: 3
-  bumpmap:
-    convertToNormalMap: 0
-    externalNormalMap: 0
-    heightScale: 0.25
-    normalMapFilter: 0
-  isReadable: 0
-  grayScaleToAlpha: 0
-  generateCubemap: 6
-  cubemapConvolution: 0
-  seamlessCubemap: 0
-  textureFormat: 1
-  maxTextureSize: 2048
-  textureSettings:
-    filterMode: -1
-    aniso: -1
-    mipBias: -1
-    wrapMode: 1
-  nPOTScale: 0
-  lightmap: 0
-  compressionQuality: 50
-  spriteMode: 1
-  spriteExtrude: 1
-  spriteMeshType: 1
-  alignment: 0
-  spritePivot: {x: 0.5, y: 0.5}
-  spriteBorder: {x: 0, y: 0, z: 0, w: 0}
-  spritePixelsToUnits: 100
-  alphaUsage: 1
-  alphaIsTransparency: 0
-  spriteTessellationDetail: -1
-  textureType: 0
-  textureShape: 1
-  maxTextureSizeSet: 0
-  compressionQualitySet: 0
-  textureFormatSet: 0
-  platformSettings:
-  - buildTarget: DefaultTexturePlatform
-    maxTextureSize: 2048
-    textureFormat: -1
-    textureCompression: 1
-    compressionQuality: 50
-    crunchedCompression: 0
-    allowsAlphaSplitting: 0
-    overridden: 0
-  - buildTarget: Standalone
-    maxTextureSize: 2048
-    textureFormat: -1
-    textureCompression: 1
-    compressionQuality: 50
-    crunchedCompression: 0
-    allowsAlphaSplitting: 0
-    overridden: 0
-  - buildTarget: iPhone
-    maxTextureSize: 2048
-    textureFormat: -1
-    textureCompression: 1
-    compressionQuality: 50
-    crunchedCompression: 0
-    allowsAlphaSplitting: 0
-    overridden: 0
-  - buildTarget: Android
-    maxTextureSize: 2048
-    textureFormat: -1
-    textureCompression: 1
-    compressionQuality: 50
-    crunchedCompression: 0
-    allowsAlphaSplitting: 0
-    overridden: 0
-  spriteSheet:
-    serializedVersion: 2
-    sprites: []
-    outline: []
-  spritePackingTag: 
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

+ 1 - 1
Assets/Script/Object/PlazaRoom.cs

@@ -69,7 +69,7 @@ public class PlazaRoom : MonoBehaviour, IPointerClickHandler
         StarCreaterB = new StarCreater();
 
 
-        Transform tra = ManaReso.Get("PlazaRoom", Folder.Discard, true, null, true);
+        Transform tra = ManaReso.Get("PlazaRoom", Folder.Scene, true, null, true);
         tra.AddComponent<PlazaRoom>();
         
 

+ 71 - 15
Assets/Script/SFS/Manager/GardenSmartFox.cs

@@ -8,6 +8,12 @@ using Sfs2X.Entities.Data;
 using Sfs2X.Requests;
 using UnityEngine;
 
+public enum BatchOption
+{
+    Always,
+    TryNot,
+}
+
 public enum RequestType
 {
     Batch,
@@ -40,9 +46,11 @@ public class GardenSmartFox
     public SFSExtensionManager ExtensionManager;
     public PlazaRoomManager PlazaRoomManager;
 
-    public float RequestTime = 0.5f;
+    public float RequestTime = 3f;
     public float RequestTimer = 0f;
     public List<SFSObject> BatchRequestList = new List<SFSObject>();
+
+    public List<string> StaleRequests = new List<string>();
     public Dictionary<string, SFSObject> BatchAndOverrideRequestDictionary = new Dictionary<string, SFSObject>();
 
     #endregion
@@ -104,12 +112,12 @@ public class GardenSmartFox
 
     public void Reset()
     {
+        SmartFox.RemoveAllEventListeners();
         SmartFox = new SmartFox();
-
+        
         Loggor.Init(this);
         Connector.Init(this);
-        ExtensionManager = new SFSExtensionManager(this);
-        PlazaRoomManager = new PlazaRoomManager(this);
+        ExtensionManager.Init(this);
     }
 
     public void ProcessRequest()
@@ -120,33 +128,39 @@ public class GardenSmartFox
         {
             RequestTimer = 0;
 
+            StaleRequests = new List<string>();
+
             if (BatchRequestList.Count > 0 || BatchAndOverrideRequestDictionary.Count > 0)
             {
                 BatchRequestList.AddRange(BatchAndOverrideRequestDictionary.Values.ToList());
 
-                SFSObject parameter = ConstructRequestParameter(BatchRequestList);
+                SendRequest(BatchRequestList);
 
                 BatchRequestList = new List<SFSObject>();
                 BatchAndOverrideRequestDictionary = new Dictionary<string, SFSObject>();
-
-                SendRequest(parameter);
             }
         }
     }
 
-    public void AddRequest(SFSObject sfsObject, RequestType requestType, string requestName = null)
+
+    public void AddRequest(SFSObject sfsObject, RequestType requestType, string requestName = null, BatchOption batchOption = BatchOption.Always)
     {
         if (requestType == RequestType.Immediate)
         {
-            SFSObject parameter = ConstructRequestParameter(new List<SFSObject>() { sfsObject });
-
-            SendRequest(parameter);
+            SendRequest(sfsObject);
 
             //Debug.Log("Send request immediately");
         }
         else if (requestType == RequestType.Batch)
         {
-            BatchRequestList.Add(sfsObject);
+            if (CheckBatchOption(sfsObject, requestName, batchOption))
+            {
+                return;
+            }
+            else
+            {
+                BatchRequestList.Add(sfsObject);
+            }
 
             //Debug.Log("Add batch request");
         }
@@ -154,13 +168,20 @@ public class GardenSmartFox
         {
             //Debug.Log("Override batch request");
 
-            if (BatchAndOverrideRequestDictionary.ContainsKey(requestName))
+            if (CheckBatchOption(sfsObject, requestName, batchOption))
             {
-                BatchAndOverrideRequestDictionary[requestName] = sfsObject;
+                return;
             }
             else
             {
-                BatchAndOverrideRequestDictionary.Add(requestName, sfsObject);
+                if (BatchAndOverrideRequestDictionary.ContainsKey(requestName))
+                {
+                    BatchAndOverrideRequestDictionary[requestName] = sfsObject;
+                }
+                else
+                {
+                    BatchAndOverrideRequestDictionary.Add(requestName, sfsObject);
+                }
             }
         }
         else
@@ -169,8 +190,43 @@ public class GardenSmartFox
         }
     }
 
+    public bool CheckBatchOption(SFSObject sfsObject, string requestName, BatchOption batchOption)
+    {
+        if (batchOption == BatchOption.Always)
+        {
+            return false;
+        }
+        else if (batchOption == BatchOption.TryNot)
+        {
+            if (!StaleRequests.Contains(requestName))
+            {
+                SendRequest(sfsObject);
+                StaleRequests.Add(requestName);
+                return true;
+            }
+            else
+            {
+                return false;
+            }
+        }
+        else
+        {
+            throw new Exception();
+        }
+    }
+
+
     public void SendRequest(SFSObject parameter)
     {
+        parameter = ConstructRequestParameter(new List<SFSObject>() { parameter });
+
+        SmartFox.Send(new ExtensionRequest(CommandRequestLabel, parameter));
+    }
+
+    public void SendRequest(List<SFSObject> parameters)
+    {
+        SFSObject parameter = ConstructRequestParameter(parameters);
+
         SmartFox.Send(new ExtensionRequest(CommandRequestLabel, parameter));
     }
 

+ 4 - 7
Assets/Script/SFS/Manager/PlazaRoomManager.cs

@@ -179,22 +179,18 @@ public class PlazaRoomManager
                         GardenSmartFox.PlazaRoomManager.JoinRoomStatus = RequestStatus.Failed;
                         TryEnterPlazaRoom();
                     }
-                    else
-                    {
-                        //GardenSmartFox.PlazaRoomManager.SyncClose();
-                    }
                 }
             );
     }
 
     public void TryEnterPlazaRoom()
     {
-        if (!IsBlackMaskFinish)
+        if (!GardenSmartFox.PlazaRoomManager.IsBlackMaskFinish)
         {
             return;
         }
 
-        if (!EnteringPlazaRoom)
+        if (!GardenSmartFox.PlazaRoomManager.EnteringPlazaRoom)
         {
             return;
         }
@@ -290,7 +286,7 @@ public class PlazaRoomManager
         GardenSmartFox.ExtensionManager.PlazaRoomExtension.onReceivePublicMessage += ReceivePublicMessage;
         GardenSmartFox.ExtensionManager.PlazaRoomExtension.onInstantiate += Instantiate;
 
-        GardenSmartFox.Connector.onConnectionLost += OnConectionLost;
+        gardenSmartFox.Connector.onConnectionLost += OnConectionLost;
     }
 
     public void Update()
@@ -411,6 +407,7 @@ public class PlazaRoomManager
         SelfUser = GardenSmartFox.User;
         PlayerDefaultPosition = ManaReso.Get("PlazaRoomDefaultPosition").position;
         SelfInstance = InstantiatePlayer(SelfUser, ManaNickName.NickName, PlayerDefaultPosition, PlayerDirection.Left, ManaData.GetDressDataIDs(ManaPlayer.Player));
+        SelfInstance.Player.transform.position += new Vector3(0, 0, -0.001f);
 
         UserInstanceDictionary.Add(SelfUser, SelfInstance);
 

+ 3 - 1
Assets/Script/SFS/SFSExtension/BaseSFSExtension.cs

@@ -15,7 +15,7 @@ public class BaseSFSExtension
 
     public Dictionary<int, Action<BaseEvent>> ResponseDictionary = new Dictionary<int, Action<BaseEvent>>();
 
-    public BaseSFSExtension(GardenSmartFox smartFox)
+    public BaseSFSExtension Init(GardenSmartFox smartFox)
     {
         GardenSmartFox = smartFox;
         
@@ -25,6 +25,8 @@ public class BaseSFSExtension
         GardenSmartFox.SmartFox.AddEventListener(SFSEvent.ROOM_JOIN_ERROR, OnRoomJoinError);
         GardenSmartFox.SmartFox.AddEventListener(SFSEvent.USER_ENTER_ROOM, OnUserEnterRoom);
         GardenSmartFox.SmartFox.AddEventListener(SFSEvent.USER_EXIT_ROOM, OnUserExitRoom);
+
+        return this;
     }
 
 

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

@@ -82,7 +82,7 @@ public class PlazaRoomExtension
 
         SFSObject parameter = GardenSmartFox.ConstructCommandParameter(CommandID.Synchronize.GetHashCode(), sfsObject, -1);
 
-        BaseSFSExtension.GardenSmartFox.AddRequest(parameter, RequestType.BatchAndOverride, RequestName.SynchronizePosition.ToString());
+        BaseSFSExtension.GardenSmartFox.AddRequest(parameter, RequestType.BatchAndOverride, RequestName.SynchronizePosition.ToString(), BatchOption.TryNot);
     }
 
     public void SendSynchronizeClose(List<int> closeIDs)

+ 9 - 2
Assets/Script/SFS/SFSExtension/SFSExtensionManager.cs

@@ -1,11 +1,18 @@
-public class SFSExtensionManager
+using System.Collections.Generic;
+
+public class SFSExtensionManager
 {
     public BaseSFSExtension BaseSFSExtension;
     public PlazaRoomExtension PlazaRoomExtension;
 
     public SFSExtensionManager(GardenSmartFox smartFox)
     {
-        BaseSFSExtension = new BaseSFSExtension(smartFox);
+        BaseSFSExtension = new BaseSFSExtension().Init(smartFox);
         PlazaRoomExtension = new PlazaRoomExtension(BaseSFSExtension);
     }
+
+    public void Init(GardenSmartFox smartFox)
+    {
+        BaseSFSExtension.Init(smartFox);
+    }
 }

+ 3 - 1
第三期.txt

@@ -1,4 +1,6 @@
-同步位置增加一个Stale功能
+黑色遮罩还没播放完就加载出Plaza了
+
+进入Plaza后不弹出宝箱 星星等
 
 进入访问后立即点击评论的话没有内容