瀏覽代碼

增加机器人功能

LiuQilin 7 年之前
父節點
當前提交
4f41ac1c0e

+ 1 - 1
Assets/Resource/DragonBones/DragonBones/src/DragonBones/parser/DataParser.cs

@@ -425,7 +425,7 @@ namespace DragonBones
                     frames[0] = startFrame;
                     frames[(int)_animation.frameCount] = endFrame;
                 } 
-                else // TODO
+                else
                 {
                     DragonBones.ResizeList(frames, 1, null);
                     frames[0] = startFrame;

+ 3 - 3
Assets/Resource/DragonBones/DragonBones/src/DragonBones/parser/ObjectDataParser.cs

@@ -787,7 +787,7 @@ namespace DragonBones
                     var slotFrame = BaseObject.BorrowObject<SlotFrameData>();
                     slotTimeline.slot = slot;
                     slotFrame.displayIndex = slot.displayIndex;
-                    //slotFrame.zOrder = -2; // TODO zOrder.
+                    //slotFrame.zOrder = -2;
 
                     if (slot.color == SlotData.DEFAULT_COLOR)
                     {
@@ -1216,7 +1216,7 @@ namespace DragonBones
 
                                     if (_isOldData) // Support 2.x ~ 3.x data.
                                     {
-                                        // TweenFrameData<T> TODO
+                                        // TweenFrameData<T>
                                         if (prevFrame is BoneFrameData && _getNumber(frameObject, DISPLAY_INDEX, 0) == -1)
                                         {
                                             (prevFrame as BoneFrameData).tweenEasing = DragonBones.NO_TWEEN;
@@ -1240,7 +1240,7 @@ namespace DragonBones
 
                         if (_isOldData) // Support 2.x ~ 3.x data.
                         {
-                            // TweenFrameData<T> TODO
+                            // TweenFrameData<T>
                             if (prevFrame is BoneFrameData && _getNumber(rawFrames[0] as Dictionary<string, object>, DISPLAY_INDEX, 0) == -1)
                             {
                                 (prevFrame as BoneFrameData).tweenEasing = DragonBones.NO_TWEEN;

+ 1 - 3
Assets/Resource/DragonBones/Unity/src/DragonBones/unity/UnitySlot.cs

@@ -135,7 +135,6 @@ namespace DragonBones
          */
         override protected void _updateBlendMode()
         {
-            // TODO
             switch (_blendMode)
             {
                 case BlendMode.Normal:
@@ -153,7 +152,6 @@ namespace DragonBones
          */
         override protected void _updateColor()
         {
-            // TODO
             /*var renderer = _renderDisplay.GetComponent<SpriteRenderer>();
             if (renderer != null)
             {
@@ -487,7 +485,7 @@ namespace DragonBones
 
                 transform.localEulerAngles = _helpVector3;
 
-                // Modify mesh skew. // TODO child armature skew.
+                // Modify mesh skew. 
                 if ((_display == _rawDisplay || _display == _meshDisplay) && _mesh != null)
                 {
                     var dSkew = global.skewX - global.skewY;

+ 74 - 16
Assets/Resource/Prefab/Object/PlazaRoom.prefab

@@ -51,7 +51,7 @@ GameObject:
   m_Component:
   - component: {fileID: 4085176534001040}
   m_Layer: 0
-  m_Name: ChestLowerLeftBorder
+  m_Name: PlayerLeftDownBorder
   m_TagString: Untagged
   m_Icon: {fileID: 0}
   m_NavMeshLayer: 0
@@ -113,7 +113,7 @@ GameObject:
   m_Component:
   - component: {fileID: 4653417872032544}
   m_Layer: 0
-  m_Name: ChestUpperRightBorder
+  m_Name: PlayerRightTopBorder
   m_TagString: Untagged
   m_Icon: {fileID: 0}
   m_NavMeshLayer: 0
@@ -150,6 +150,21 @@ GameObject:
   m_NavMeshLayer: 0
   m_StaticEditorFlags: 0
   m_IsActive: 1
+--- !u!1 &1548894624720188
+GameObject:
+  m_ObjectHideFlags: 0
+  m_PrefabParentObject: {fileID: 0}
+  m_PrefabInternal: {fileID: 100100000}
+  serializedVersion: 5
+  m_Component:
+  - component: {fileID: 4354325187465410}
+  m_Layer: 0
+  m_Name: ChestLowerLeftBorder
+  m_TagString: Untagged
+  m_Icon: {fileID: 0}
+  m_NavMeshLayer: 0
+  m_StaticEditorFlags: 0
+  m_IsActive: 1
 --- !u!1 &1607659026408690
 GameObject:
   m_ObjectHideFlags: 0
@@ -212,6 +227,21 @@ GameObject:
   m_NavMeshLayer: 0
   m_StaticEditorFlags: 0
   m_IsActive: 1
+--- !u!1 &1869733757398268
+GameObject:
+  m_ObjectHideFlags: 0
+  m_PrefabParentObject: {fileID: 0}
+  m_PrefabInternal: {fileID: 100100000}
+  serializedVersion: 5
+  m_Component:
+  - component: {fileID: 4630770339919318}
+  m_Layer: 0
+  m_Name: ChestUpperRightBorder
+  m_TagString: Untagged
+  m_Icon: {fileID: 0}
+  m_NavMeshLayer: 0
+  m_StaticEditorFlags: 0
+  m_IsActive: 1
 --- !u!1 &1888753063508628
 GameObject:
   m_ObjectHideFlags: 0
@@ -271,7 +301,7 @@ Transform:
   m_LocalScale: {x: 1, y: 1, z: 1}
   m_Children: []
   m_Father: {fileID: 4518027564363394}
-  m_RootOrder: 11
+  m_RootOrder: 13
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
 --- !u!4 &4053414627786464
 Transform:
@@ -284,7 +314,7 @@ Transform:
   m_LocalScale: {x: 1, y: 1, z: 1}
   m_Children: []
   m_Father: {fileID: 4518027564363394}
-  m_RootOrder: 10
+  m_RootOrder: 12
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
 --- !u!4 &4079838987492840
 Transform:
@@ -305,12 +335,12 @@ Transform:
   m_PrefabParentObject: {fileID: 0}
   m_PrefabInternal: {fileID: 100100000}
   m_GameObject: {fileID: 1032328734171814}
-  m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
-  m_LocalPosition: {x: -17, y: -3.5, z: 0}
+  m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
+  m_LocalPosition: {x: -17, y: -5.25, z: 0}
   m_LocalScale: {x: 1, y: 1, z: 1}
   m_Children: []
   m_Father: {fileID: 4518027564363394}
-  m_RootOrder: 13
+  m_RootOrder: 7
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
 --- !u!4 &4281131997099946
 Transform:
@@ -323,7 +353,20 @@ Transform:
   m_LocalScale: {x: 1, y: 1, z: 1}
   m_Children: []
   m_Father: {fileID: 4518027564363394}
-  m_RootOrder: 12
+  m_RootOrder: 14
+  m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
+--- !u!4 &4354325187465410
+Transform:
+  m_ObjectHideFlags: 1
+  m_PrefabParentObject: {fileID: 0}
+  m_PrefabInternal: {fileID: 100100000}
+  m_GameObject: {fileID: 1548894624720188}
+  m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
+  m_LocalPosition: {x: -17, y: -3.5, z: 0}
+  m_LocalScale: {x: 1, y: 1, z: 1}
+  m_Children: []
+  m_Father: {fileID: 4518027564363394}
+  m_RootOrder: 15
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
 --- !u!4 &4421693630246596
 Transform:
@@ -336,7 +379,7 @@ Transform:
   m_LocalScale: {x: 1, y: 1.0291699, z: 1.0291699}
   m_Children: []
   m_Father: {fileID: 4518027564363394}
-  m_RootOrder: 7
+  m_RootOrder: 8
   m_LocalEulerAnglesHint: {x: 23.03, y: 0, z: 0}
 --- !u!4 &4462477909408554
 Transform:
@@ -381,14 +424,16 @@ Transform:
   - {fileID: 4079838987492840}
   - {fileID: 4493473737233732}
   - {fileID: 4462477909408554}
+  - {fileID: 4085176534001040}
   - {fileID: 4421693630246596}
+  - {fileID: 4653417872032544}
   - {fileID: 4800422243721380}
   - {fileID: 4693788232285786}
   - {fileID: 4053414627786464}
   - {fileID: 4035421916023222}
   - {fileID: 4281131997099946}
-  - {fileID: 4085176534001040}
-  - {fileID: 4653417872032544}
+  - {fileID: 4354325187465410}
+  - {fileID: 4630770339919318}
   m_Father: {fileID: 0}
   m_RootOrder: 0
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
@@ -405,6 +450,19 @@ Transform:
   m_Father: {fileID: 4518027564363394}
   m_RootOrder: 2
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
+--- !u!4 &4630770339919318
+Transform:
+  m_ObjectHideFlags: 1
+  m_PrefabParentObject: {fileID: 0}
+  m_PrefabInternal: {fileID: 100100000}
+  m_GameObject: {fileID: 1869733757398268}
+  m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
+  m_LocalPosition: {x: 16, y: -1, z: 0}
+  m_LocalScale: {x: 1, y: 1, z: 1}
+  m_Children: []
+  m_Father: {fileID: 4518027564363394}
+  m_RootOrder: 16
+  m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
 --- !u!4 &4653417872032544
 Transform:
   m_ObjectHideFlags: 1
@@ -412,11 +470,11 @@ Transform:
   m_PrefabInternal: {fileID: 100100000}
   m_GameObject: {fileID: 1223144705792492}
   m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
-  m_LocalPosition: {x: 16, y: -1, z: 0}
+  m_LocalPosition: {x: 17, y: -1.1, z: 0}
   m_LocalScale: {x: 1, y: 1, z: 1}
   m_Children: []
   m_Father: {fileID: 4518027564363394}
-  m_RootOrder: 14
+  m_RootOrder: 9
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
 --- !u!4 &4693788232285786
 Transform:
@@ -429,7 +487,7 @@ Transform:
   m_LocalScale: {x: 1, y: 1, z: 1}
   m_Children: []
   m_Father: {fileID: 4518027564363394}
-  m_RootOrder: 9
+  m_RootOrder: 11
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
 --- !u!4 &4694254291975466
 Transform:
@@ -455,7 +513,7 @@ Transform:
   m_LocalScale: {x: 0.5, y: 0.5, z: 0.5}
   m_Children: []
   m_Father: {fileID: 4518027564363394}
-  m_RootOrder: 8
+  m_RootOrder: 10
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
 --- !u!4 &4939484549403038
 Transform:
@@ -562,7 +620,7 @@ ParticleSystem:
   moveWithTransform: 1
   moveWithCustomTransform: {fileID: 0}
   scalingMode: 2
-  randomSeed: 706810313
+  randomSeed: 1635810750
   InitialModule:
     serializedVersion: 3
     enabled: 1

+ 1 - 3
Assets/Script/Editor/EditorConfigExporter.cs

@@ -71,7 +71,6 @@ public class EditorConfigExporter : EditorWindow
 
                 //file
                 int index = p.LastIndexOf("\\");
-                //string folder = p.Substring(0, index + 1); //todo 取消注释
                 string fileName = p.Substring(index + 1);
 
                 //if directoryEntries is not null, tempPaths cannot be null after splited
@@ -109,7 +108,6 @@ public class EditorConfigExporter : EditorWindow
 
         public static string[] SplitWithString(string sourceString, string splitString)
         {
-            //string tempSourceString = sourceString; //todo 取消注释
             List<string> arrayList = new List<string>();
             string s = string.Empty;
             while (sourceString.IndexOf(splitString) > -1)  //split
@@ -182,7 +180,7 @@ public class EditorConfigExporter : EditorWindow
 
         if ((!File.Exists(filepath) && !shouldDelete) || shouldDelete)
         {
-            List<string> labels = new List<string>(); //comments = new List<string>(); //todo 取消注释
+            List<string> labels = new List<string>(); 
 
             XmlDocument xmlDoc = new XmlDocument();
 

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

@@ -700,6 +700,28 @@ public class ManaData : Regist
         return dressDataIDs;
     }
 
+    public static List<int> GetDressDataIDs(List<string> dressdataNames)
+    {
+        //foreach (var VARIABLE in ManaPlayer.CloseIDDic)
+        //{
+        //    Debug.LogWarning(VARIABLE.Key);
+        //}
+
+        List<int> dressDataIDs = new List<int>();
+
+        int index = 0;
+        dressDataIDs.Add(ManaPlayer.CloseIDDic[dressdataNames[index++]]);
+        dressDataIDs.Add(ManaPlayer.CloseIDDic[dressdataNames[index++]]);
+        dressDataIDs.Add(ManaPlayer.CloseIDDic[dressdataNames[index++]]);
+        dressDataIDs.Add(ManaPlayer.CloseIDDic[dressdataNames[index++]]);
+        dressDataIDs.Add(ManaPlayer.CloseIDDic[dressdataNames[index++]]);
+        dressDataIDs.Add(ManaPlayer.CloseIDDic[dressdataNames[index++]]);
+        dressDataIDs.Add(ManaPlayer.CloseIDDic[dressdataNames[index++]]);
+        dressDataIDs.Add(ManaPlayer.CloseIDDic[dressdataNames[index++]]);
+
+        return dressDataIDs;
+    }
+
     public static List<int> GetDressDataIDs(ISFSObject parameter)
     {
         List<int> ids = parameter.GetIntArray(InfoLabel.Close.GetHashString()).ToList();

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

@@ -3089,7 +3089,7 @@ public class ManaUI : Regist
                 (
                     () =>
                     {
-                        ManaReso.Get<VerticalLayoutGroup>("X_Info").SetLayoutVertical();
+                        LayoutRebuilder.MarkLayoutForRebuild(ManaReso.Get<RectTransform>("X_Info"));
                     },
                     1
                 );

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

@@ -181,6 +181,12 @@ public class PlazaRoom : MonoBehaviour, IPointerClickHandler
 
     public void OnPointerClick(PointerEventData eventData)
     {
-        SFSManager.GardenSmartFox.PlazaRoomManager.MoveTo(eventData.pointerCurrentRaycast.worldPosition + new Vector3(0, 0, -3));
+        SFSManager.GardenSmartFox.PlazaRoomManager.MoveTo(HitPositionToDestination(eventData.pointerCurrentRaycast.worldPosition));
+    }
+
+    private static Vector3 Offset = new Vector3(0, 0, -3);
+    public static Vector3 HitPositionToDestination(Vector3 hitPosition)
+    {
+        return hitPosition + Offset;
     }
 }

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

@@ -11,7 +11,7 @@ public abstract class BaseConnector
     public static int TcpPort = 9933;
     //public static string Host = "121.199.20.79";
     public static string Host = "127.0.0.1";
-    public static string Zone = "Garden";
+    public static string Zone = "GardenTest";
 
     public Action<BaseEvent> onConnectSucceed;
     public Action<BaseEvent> onConnectFailed;

+ 6 - 1
Assets/Script/SFS/Manager/ChestMge.cs

@@ -305,12 +305,17 @@ public class ChestMge : Regist
 
         int databaseRoomID = SFSManager.GardenSmartFox.PlazaRoomManager.CurrentRoomData.ID;
         long serialNumber = long.Parse(ManaServer.SerialNumber);
-        Vector3 position = SFSManager.GardenSmartFox.PlazaRoomManager.SelfInstance.Player.transform.position + Mathf.Sign(Random.Range(-1f, 1f))*new Vector3(Random.Range(ChestXMinOffset, ChestXMaxOffset), 0, 0);
+        Vector3 position = PlayerPosToChestPos(SFSManager.GardenSmartFox.PlazaRoomManager.SelfInstance.Player.transform.position);
         SFSManager.GardenSmartFox.EventManager.PlazaRoomEvent.CreateChest(Round, Cost, ChestType, databaseRoomID, serialNumber, position);
 
         ManaReso.Get<CanvasGroup>("Y_Chest").interactable = false;
     }
 
+    public static Vector3 PlayerPosToChestPos(Vector3 playerPos)
+    {
+        return playerPos + Mathf.Sign(Random.Range(-1f, 1f))*new Vector3(Random.Range(ChestXMinOffset, ChestXMaxOffset), 0, 0);
+    }
+
     public static void OnCreateChestError()
     {
         ManaLan.Add(ManaReso.Get<Text>("Y_Tip"), new LanStr("UI", "AA_CreateError"));

+ 11 - 17
Assets/Script/SFS/Manager/RobotManager.cs

@@ -1,6 +1,7 @@
 using System;
 using System.Collections;
 using System.Collections.Generic;
+using UnityEngine;
 using Random = UnityEngine.Random;
 
 public class RobotManager
@@ -11,33 +12,26 @@ public class RobotManager
 
     #endregion
 
-    public static void AddRobot(int sfsRoomID, int maxRobot)
+    public static void AddRobot(int sfsRoomID, int maxRobot, Vector3 position, PlayerDirection direction)
     {
         Robot.Initialize();
-        Robot robot = new Robot();
+        Robot robot = new Robot(position, direction);
         robot.Connect(sfsRoomID, maxRobot);
         Robots.Add(robot);
     }
 
-    private static float MinRandomTime = 3f;
-    private static float MaxRandomTime = 10f;
-    public static void DeactivateAllRobots(bool afterRandomTime)
+
+    public static void DeactivateAllRobots(bool delay)
     {
-        if (afterRandomTime)
-        {
-            foreach (var robot in Robots)
-            {
-                DelayCall.Call(Random.Range(MinRandomTime, MaxRandomTime), robot.Deactivate);
-            }
-        }
-        else
+        for (int i = 0; i < Robots.Count; i++)
         {
-            foreach (var robot in Robots)
+            Robots[i].Deactivate(delay);
+
+            if (!delay)
             {
-                robot.Deactivate();
+                Robots.RemoveAt(i--);
             }
         }
-        Robots = new List<Robot>();
     }
 
     public static void Update()
@@ -46,7 +40,7 @@ public class RobotManager
         {
             if (Robots[i].Update())
             {
-                Robots[i--].Deactivate();
+                Robots[i--].Deactivate(false);
             }
         }
     }

+ 21 - 5
Assets/Script/SFS/Manager/SFSPlazaRoomManager.cs

@@ -10,6 +10,7 @@ using Sfs2X.Entities.Data;
 using Sfs2X.Requests;
 using Sfs2X.Entities.Variables;
 using UnityEngine.UI;
+using Random = UnityEngine.Random;
 
 public enum JoinRoomResult
 {
@@ -22,6 +23,7 @@ public enum JoinRoomResult
 
 public class SFSPlazaRoomManager 
 {
+    private static Vector3 PlazaRoomPlayerScale = new Vector3(0.525f, 0.525f, 0.525f);
     public class PlazaRoomPlayer
     {
         #region Config
@@ -262,7 +264,10 @@ public class SFSPlazaRoomManager
         foreach (var kv in UserInstanceDictionary)
         {
             if (kv.Value.Player.transform.parent == null)
+            {
                 kv.Value.Player.transform.parent = ManaReso.Get("PlazaRoom");
+                kv.Value.Player.transform.localScale = PlazaRoomPlayerScale;
+            }
         }
 
         ManaAudio.MusicPartyTheme.TweenForAudio();
@@ -279,10 +284,10 @@ public class SFSPlazaRoomManager
         GardenSmartFox.PlazaRoomManager.PlazaRoomCamera = ManaReso.Get<Camera>("MainCamera");
         GardenSmartFox.PlazaRoomManager.CameraOriginPosition = GardenSmartFox.PlazaRoomManager.PlazaRoomCamera.transform.position;
 
-        PlayerDefaultPosition = ManaReso.Get("PlazaRoomDefaultPosition").position;
+        PlayerDefaultPosition = GetDefaultPosition();
         SelfInstance = InstantiatePlayer(ManaNickName.NickName, PlayerDefaultPosition, PlayerDirection.Left, ManaData.GetDressDataIDs(ManaPlayer.Player));
-        SelfInstance.Player.transform.position += new Vector3(0, 0, -0.001f);
-        
+        SelfInstance.Player.transform.SetZ(SelfInstance.Player.transform.position.z - 0.1f);
+
         UserInstanceDictionary.Add(SFSManager.GardenSmartFox.User.Id, SelfInstance);
 
         SendInstantiateRequset(-1);
@@ -655,7 +660,7 @@ public class SFSPlazaRoomManager
 
     public void SendSynchronizeDestination(Vector3 destination)
     {
-        SFSManager.GardenSmartFox.EventManager.PlazaRoomEvent.SendSynchronizeDestination(destination);
+        SFSManager.GardenSmartFox.EventManager.PlazaRoomEvent.SendSynchronizeDestination(GardenSmartFox.User.Id, destination);
     }
 
     public PlazaRoomPlayer InstantiatePlayer(string nickName, Vector3 position, PlayerDirection direction, List<int> dressDataIDs)
@@ -685,7 +690,7 @@ public class SFSPlazaRoomManager
         player.ActiveShadow();
         player.Shadow.SetLZ(3);
 
-        tra.localScale = new Vector3(0.525f, 0.525f, 0.525f);
+        tra.localScale = PlazaRoomPlayerScale;
 
         return new PlazaRoomPlayer(player, nickName);
     }
@@ -701,4 +706,15 @@ public class SFSPlazaRoomManager
 
         return plazaRoomPlayer;
     }
+
+
+    private static float minZOffset = 0.01f;
+    private static float maxZOffset = 0.1f;
+    public static Vector3 GetDefaultPosition() //todo
+    {
+        float zOffset = Random.Range(minZOffset, maxZOffset);
+        Vector3 position = ManaReso.Get("PlazaRoomDefaultPosition").position;
+        position.z += zOffset;
+        return position;
+    }
 }

+ 218 - 27
Assets/Script/SFS/Object/Robot.cs

@@ -1,18 +1,26 @@
-using System.Collections;
+using System;
+using System.Collections;
 using System.Collections.Generic;
+using System.Linq;
 using System.Security.Policy;
 using System.Xml;
 using Sfs2X;
 using Sfs2X.Core;
+using Sfs2X.Entities;
 using Sfs2X.Entities.Data;
 using Sfs2X.Requests;
 using Sfs2X.Util;
 using UnityEngine;
+using Random = UnityEngine.Random;
 
 public class Robot
 {
     #region Config
 
+    private static Vector2 LeftDownBorder; //todo
+    private static Vector2 RightTop; //todo
+    private static Camera Camera; //todo
+
     private static bool Initialized;
     private static int MinChestValue;
     private static int MaxChestValue;
@@ -30,8 +38,15 @@ public class Robot
     private static string RootNodeName = "data";
     private static string DataNodeName = "item";
 
+    private string Nickname;
+    private Vector3 Position;
+    private PlayerDirection Direction;
+    private User User;
     private SmartFox SmartFox;
-    
+
+    private List<int> DressdataIDs = new List<int>();
+    private List<string> DressdataNames = new List<string>();
+
     #endregion
 
     public static void Initialize()
@@ -42,6 +57,10 @@ public class Robot
             return;
         }
 
+        LeftDownBorder = ManaReso.Get("PlayerLeftDownBorder").position;
+        RightTop = ManaReso.Get("PlayerRightTopBorder").position;
+        Camera = ManaReso.Get<Camera>("MainCamera");
+
         XmlDocument document = ManaData.GetXmlDocument(ConfigName);
         XmlNode dataNode = document.SelectSingleNode(RootNodeName).SelectSingleNode(DataNodeName);
         XmlAttributeCollection attributes = dataNode.Attributes;
@@ -78,15 +97,22 @@ public class Robot
         //Debug.Log($"RobotConfig {MaxLifetime}");
     }
 
+
+    public Robot(Vector3 position, PlayerDirection direction)
+    {
+        Position = position;
+        Direction = direction;
+    }
+
     public void Connect(int sfsRoomID, int maxRobot)
     {
         Debug.LogWarning("Robot connect");
         SmartFox = new SmartFox();
         SmartFox.AddEventListener(SFSEvent.CONNECTION, OnConnectReturn);
-        SmartFox.AddEventListener(SFSEvent.CONNECTION_LOST, OnActivateError);
-        SmartFox.AddEventListener(SFSEvent.LOGIN, evt => { Mark(sfsRoomID, maxRobot); });
-        SmartFox.AddEventListener(SFSEvent.LOGIN_ERROR, OnActivateError);
-        SmartFox.AddEventListener(SFSEvent.LOGOUT,  OnActivateError);
+        SmartFox.AddEventListener(SFSEvent.CONNECTION_LOST, (evt) => Deactivate(false));
+        SmartFox.AddEventListener(SFSEvent.LOGIN, evt => { Mark(evt, sfsRoomID, maxRobot); });
+        SmartFox.AddEventListener(SFSEvent.LOGIN_ERROR, (evt) => Deactivate(false));
+        SmartFox.AddEventListener(SFSEvent.LOGOUT, (evt) => Deactivate(false));
         SmartFox.AddEventListener(SFSEvent.EXTENSION_RESPONSE, OnExtensionResponse);
 
         ConfigData configData = new ConfigData
@@ -105,9 +131,10 @@ public class Robot
         SmartFox.Send(new LoginRequest(userName, ""));
     }
 
-    private void Mark(int sfsRoomID, int maxRobot)
+    private void Mark(BaseEvent evt, int sfsRoomID, int maxRobot)
     {
         Debug.LogWarning("Robot mark");
+        User = (User) evt.Params["user"];
         SFSObject arg = new SFSObject();
         arg.PutInt(Label.CommandID, PlazaRoomReq.MarkAsRobot.GetHashCode());
         arg.PutInt(Label.RoomID, sfsRoomID);
@@ -117,14 +144,19 @@ public class Robot
 
     private void SendRequest(SFSObject arg)
     {
-        arg = GardenSmartFox.WrapIntoArray(new List<SFSObject> { arg });
+        arg = GardenSmartFox.WrapIntoArray(new List<SFSObject> {arg});
         SmartFox.Send(new ExtensionRequest(HandlerID.PlazaRoom.GetHashString(), arg));
     }
 
+    private void SendInstantiateRequest(int receiver)
+    {
+        SFSManager.GardenSmartFox.EventManager.PlazaRoomEvent.SendInstantiateRequset(User.Id, DressdataIDs.ToArray(), Position, Direction, Nickname, receiver);
+    }
+
 
     private void OnConnectReturn(BaseEvent evt)
     {
-        if ((bool)evt.Params["success"])
+        if ((bool) evt.Params["success"])
         {
             Debug.LogWarning("Robot connect succeed");
             Login();
@@ -132,7 +164,7 @@ public class Robot
         else
         {
             Debug.LogWarning("Robot connect failed");
-            OnActivateError(null);
+            Deactivate(false);
         }
     }
 
@@ -142,11 +174,26 @@ public class Robot
 
         if (cmd == PlazaRoomRep.JoinRoomSucceed.GetHashString())
         {
-            Activate();
+            Activate(evt);
         }
         else if (cmd == PlazaRoomRep.MarkRobotError.GetHashString())
         {
-            OnActivateError(evt);
+            Deactivate(false);
+        }
+        else if (cmd == PlazaRoomRep.OtherEnterRoom.GetHashString()) //todo
+        {
+            OnOtherEnterRoom(evt);
+        }
+    }
+
+    private void OnOtherEnterRoom(BaseEvent evt)
+    {
+        ISFSObject arg = (ISFSObject) evt.Params["params"];
+        int userID = arg.GetInt(Label.UserID);
+
+        if (userID != User.Id)
+        {
+            SendInstantiateRequest(userID);
         }
     }
 
@@ -162,13 +209,32 @@ public class Robot
     }
 
     private bool Activated;
-    private void Activate()
+    private void Activate(BaseEvent evt)
     {
+        if (!SFSManager.GardenSmartFox.PlazaRoomManager.InPlazaRoom)
+        {
+            Deactivate(false);
+        }
+
         Debug.LogWarning("Robot Activate");
         Activated = true;
         MoveTime = Random.Range(MinMoveTime, MaxMoveTime);
         LifetimeTime = Random.Range(MinLifetime, MaxLifetime);
         CreateChestTime = Random.Range(0, LifetimeTime);
+
+        try
+        {
+            ISFSObject arg = evt.Params["params"] as ISFSObject;
+            Nickname = arg.GetUtfString(Label.Data);
+            DressdataNames = arg.GetUtfStringArray(Label.DataArray).ToList();
+            DressdataIDs = ManaData.GetDressDataIDs(DressdataNames);
+            SendInstantiateRequest(-1);
+        }
+        catch (Exception e)
+        {
+            Debug.LogWarning(e);
+            Deactivate(false);
+        }
     }
 
     private bool Behaviour()
@@ -178,14 +244,14 @@ public class Robot
             return false;
         }
 
-        if (LifetimeBehaviour())
-        {
-            return true;
-        }
+        //if (LifetimeBehaviour())
+        //{
+        //    return true;
+        //}
 
-        MoveBehaviour();
-        CreateChestBehaviour();
-        GetChestAwardBehaviour();
+        //MoveBehaviour();
+        //CreateChestBehaviour();
+        //GetChestAwardBehaviour();
         return false;
     }
 
@@ -198,9 +264,28 @@ public class Robot
         {
             MoveTimer = 0;
             Debug.LogWarning("Robot move");
+            Raycast();
         }
     }
 
+    private void Raycast() //todo
+    {
+        Vector3 origin = new Vector3(Random.Range(LeftDownBorder.x, RightTop.x), Random.Range(LeftDownBorder.y, RightTop.y), Camera.transform.position.z);
+        Ray ray = new Ray(origin, Vector3.forward);
+        RaycastHit hitInfo;
+        if (Physics.Raycast(ray, out hitInfo))
+        {
+            Vector3 destination = PlazaRoom.HitPositionToDestination(hitInfo.point);
+            SFSManager.GardenSmartFox.EventManager.PlazaRoomEvent.SendSynchronizeDestination(User.Id, destination);
+            Position = destination;
+        }
+        else
+        {
+            Debug.LogWarning("射线检测失败");
+        }
+    }
+
+
     private float LifetimeTime;
     private float LifetimeTimer;
     private bool LifetimeBehaviour()
@@ -220,7 +305,7 @@ public class Robot
     private bool CreateChestLock;
     private float CreateChestTime;
     private float CreateChestTimer;
-    private void CreateChestBehaviour()
+    private void CreateChestBehaviour() //todo
     {
         if (CreateChestLock)
         {
@@ -230,27 +315,133 @@ public class Robot
         CreateChestTimer += Time.deltaTime;
         if (CreateChestTimer >= CreateChestTime)
         {
-            Debug.LogWarning("Robot create chest");
             CreateChestLock = true;
+            if (Random.Range(0f, 1f) >= CreateChestRate)
+            {
+                Debug.LogWarning("create chest ran out of luck");
+                return;
+            }
+
+            Debug.LogWarning("Robot create a chest");
+            RoomData roomData = SFSManager.GardenSmartFox.PlazaRoomManager.CurrentRoomData;
+            int round = Random.Range(1, roomData.MaxPlayer + 1);
+            int value = Random.Range(MinChestValue, MaxChestValue);
+            Vector3 position = ChestMge.PlayerPosToChestPos(Position);
+            ChestType type = (ChestType) Random.Range(1, 4);
+            SFSManager.GardenSmartFox.EventManager.PlazaRoomEvent.CreateChest(round, value, type, roomData.ID, -1, position);
         }
     }
 
-    private void GetChestAwardBehaviour()
+    private float GetChestTime = 3;
+    private float GetChestTimer;
+    private float MaxChestDistance = 8; //todo
+    private List<long> OperatedChestIDs = new List<long>();
+    private void GetChestAwardBehaviour() //todo
     {
+        GetChestTimer += Time.deltaTime;
+        if (GetChestTimer >= GetChestTime)
+        {
+            GetChestTimer = 0;
+            Debug.LogWarning("Robot try get some chests");
+            List<PlazaRoomChest> chests = DetectChest();
+            Debug.LogWarning($"{chests.Count} chest/chests is available");
+            for (int i = 0; i < chests.Count; i++)
+            {
+                TryGetChestAward(chests[i]);
+            }
+        }
         //Debug.LogWarning("robot get a chest");
     }
 
+    private List<PlazaRoomChest> DetectChest()
+    {
+        List<PlazaRoomChest> chests = new List<PlazaRoomChest>();
+
+        for (int i = 0; i < ChestMge.PlazaRoomChests.Count; i++)
+        {
+            if (Mathf.Abs(ChestMge.PlazaRoomChests[i].transform.position.x - Position.x) <= MaxChestDistance)
+            {
+                if (OperatedChestIDs.Contains(ChestMge.PlazaRoomChests[i].ChestData.ID))
+                {
+                    Debug.LogWarning("this chest has been operated");
+                }
+                else
+                {
+                    chests.Add(ChestMge.PlazaRoomChests[i]);
+                }
+            }
+            else
+            {
+                Debug.LogWarning("this chest is too far");
+            }
+        }
+
+        return chests;
+    }
+
+    private void TryGetChestAward(PlazaRoomChest chest)
+    {
+        float rate = Random.Range(0f, 1f);
+        bool get = false;
+        if (chest.ChestData.ChestType == ChestType.GuessColor)
+        {
+            if (rate < ColorChestRate)
+            {
+                get = true;
+            }
+            else
+            {
+                get = false;
+            }
+        }
+        else if (chest.ChestData.ChestType == ChestType.GuessNumber)
+        {
+            if (rate < DigitChestRate)
+            {
+                get = true;
+            }
+            else
+            {
+                get = false;
+            }
+        }
+        else
+        {
+            get = true;
+        }
+
+        OperatedChestIDs.Add(chest.ChestData.ID);
+        if (get)
+        {
+            SFSManager.GardenSmartFox.EventManager.PlazaRoomEvent.GetChestAward(chest.ChestData.ID);
+        }
+        else
+        {
+            Debug.LogWarning("get chest ran out of luck");
+        }
+    }
+
 
-    public void Deactivate()
+    private static float MinDelayTime = 3f;
+    private static float MaxDelayTime = 10f;
+    public void Deactivate(bool delay)
     {
         Debug.LogWarning("Robot disconnect");
-        SmartFox.Disconnect();
         Activated = false;
+
+        if (delay)
+        {
+            DelayCall.Call(Random.Range(MinDelayTime, MaxDelayTime), Remove);
+        }
+        else
+        {
+            Remove();
+        }
     }
 
-    private void OnActivateError(BaseEvent evt)
+    private void Remove()
     {
-        Debug.LogWarning("Robot activate error");
         RobotManager.Robots.Remove(this);
+        SmartFox.Disconnect();
     }
 }

+ 32 - 37
Assets/Script/SFS/SFSEvent/PlazaRoomEvent.cs

@@ -97,25 +97,27 @@ public class PlazaRoomEvent
     }
 
 
-    public void SendInstantiateRequset(int senderID, int[] dressDataIDs, Vector3 position, PlayerDirection direction, string nickname,  int receiverID)
+    public void SendInstantiateRequset(int senderID, int[] dressDataIDs, Vector3 position, PlayerDirection direction, string nickname, int receiverID)
     {
         SFSObject parameter = new SFSObject();
+        parameter.PutInt(Label.InfoID, InfoID.Instantiate.GetHashCode());
         parameter.PutInt(InfoLabel.SenderID.GetHashString(), senderID);
         parameter.PutIntArray(InfoLabel.Close.GetHashString(), dressDataIDs);
         parameter.PutUtfString(InfoLabel.Position.GetHashString(), position.VectorToString());
         parameter.PutInt(InfoLabel.PlayerDirection.GetHashString(), direction.GetHashCode());
         parameter.PutUtfString(InfoLabel.NickName.GetHashString(), nickname);
 
-        SFSEventManager.GardenSmartFox.AddRequest(WrapInfoRequest(CurrentPlazaRoom.Id, receiverID, InfoID.Instantiate, parameter), RequestType.Immediate);
+        SFSEventManager.GardenSmartFox.AddRequest(WrapInfoRequest(CurrentPlazaRoom.Id, receiverID, parameter), RequestType.Immediate);
     }
 
-    public void SendSynchronizeDestination(Vector3 destination)
+    public void SendSynchronizeDestination(int senderID, Vector3 destination)
     {
         SFSObject sfsObject = new SFSObject();
-        sfsObject.PutInt(InfoLabel.SenderID.GetHashString(), SFSEventManager.GardenSmartFox.User.Id);
+        sfsObject.PutInt(Label.InfoID, InfoID.Synchronize.GetHashCode());
+        sfsObject.PutInt(InfoLabel.SenderID.GetHashString(), senderID);
         sfsObject.PutUtfString(InfoLabel.Destination.GetHashString(), destination.VectorToString());
 
-        SFSObject parameter = WrapInfoRequest(SFSEventManager.GardenSmartFox.PlazaRoomManager.CurrentPlazaRoom.Id, -1, InfoID.Synchronize, sfsObject);
+        SFSObject parameter = WrapInfoRequest(SFSEventManager.GardenSmartFox.PlazaRoomManager.CurrentPlazaRoom.Id, -1, sfsObject);
 
         SFSEventManager.GardenSmartFox.AddRequest(parameter, RequestType.BatchAndOverride, RequestName.SynchronizePosition.ToString(), BatchOption.TryNot);
     }
@@ -123,10 +125,11 @@ public class PlazaRoomEvent
     public void SendSynchronizeClose(List<int> closeIDs)
     {
         SFSObject sfsObject = new SFSObject();
+        sfsObject.PutInt(Label.InfoID, InfoID.Synchronize.GetHashCode());
         sfsObject.PutInt(InfoLabel.SenderID.GetHashString(), SFSEventManager.GardenSmartFox.User.Id);
         sfsObject.PutIntArray(InfoLabel.Close.GetHashString(), closeIDs.ToArray());
 
-        SFSObject parameter = WrapInfoRequest(SFSEventManager.GardenSmartFox.PlazaRoomManager.CurrentPlazaRoom.Id, -1, InfoID.Synchronize, sfsObject);
+        SFSObject parameter = WrapInfoRequest(SFSEventManager.GardenSmartFox.PlazaRoomManager.CurrentPlazaRoom.Id, -1, sfsObject);
 
         SFSEventManager.GardenSmartFox.AddRequest(parameter, RequestType.BatchAndOverride, RequestName.SynchronizeClose.ToString());
     }
@@ -134,10 +137,11 @@ public class PlazaRoomEvent
     public void SendExpression(ExpressionID expressionID)
     {
         SFSObject sfsObject = new SFSObject();
+        sfsObject.PutInt(Label.InfoID, InfoID.ReceiveExpression.GetHashCode());
         sfsObject.PutInt(InfoLabel.SenderID.GetHashString(), SFSEventManager.GardenSmartFox.User.Id);
         sfsObject.PutInt(InfoLabel.Expression.GetHashString(), expressionID.GetHashCode());
 
-        SFSObject parameter = WrapInfoRequest(SFSEventManager.GardenSmartFox.PlazaRoomManager.CurrentPlazaRoom.Id, -1, InfoID.ReceiveExpression, sfsObject);
+        SFSObject parameter = WrapInfoRequest(SFSEventManager.GardenSmartFox.PlazaRoomManager.CurrentPlazaRoom.Id, -1, sfsObject);
 
         SFSEventManager.GardenSmartFox.AddRequest(parameter, RequestType.Immediate);
     }
@@ -145,71 +149,64 @@ public class PlazaRoomEvent
     public void SendPublicMessage(string message)
     {
         SFSObject sfsObject = new SFSObject();
+        sfsObject.PutInt(Label.InfoID, InfoID.ReceivePublicMessage.GetHashCode());
         sfsObject.PutInt(InfoLabel.SenderID.GetHashString(), SFSEventManager.GardenSmartFox.User.Id);
         sfsObject.PutUtfString(InfoLabel.Message.GetHashString(), message);
 
-        SFSObject parameter = WrapInfoRequest(SFSEventManager.GardenSmartFox.PlazaRoomManager.CurrentPlazaRoom.Id, -1, InfoID.ReceivePublicMessage, sfsObject);
+        SFSObject parameter = WrapInfoRequest(SFSEventManager.GardenSmartFox.PlazaRoomManager.CurrentPlazaRoom.Id, -1, sfsObject);
 
         SFSEventManager.GardenSmartFox.AddRequest(parameter, RequestType.Immediate);
     }
 
     public void OnReceiveInfo(BaseEvent baseEvent)
     {
-        int infoID = (baseEvent.Params["params"] as ISFSObject).GetInt(Label.InfoID);
+        ISFSObject arg = (baseEvent.Params["params"] as ISFSObject).GetSFSObject(Label.Data);
+        int infoID = arg.GetInt(Label.InfoID);
 
         if (infoID == InfoID.Instantiate.GetHashCode())
         {
-            OnInstantiate(baseEvent);
+            OnInstantiate(arg);
         }
         else if (infoID == InfoID.Synchronize.GetHashCode())
         {
-            OnSynchronize(baseEvent);
+            OnSynchronize(arg);
         }
         else if (infoID == InfoID.ReceiveExpression.GetHashCode())
         {
-            OnReceiveExpression(baseEvent);
+            OnReceiveExpression(arg);
         }
         else if (infoID == InfoID.ReceivePublicMessage.GetHashCode())
         {
-            OnReceivePublicMessage(baseEvent);
+            OnReceivePublicMessage(arg);
         }
     }
 
-    public void OnInstantiate(BaseEvent baseEvent)
+    public void OnInstantiate(ISFSObject arg)
     {
-        ISFSObject parameter = (ISFSObject)baseEvent.Params["params"];
+        int senderID = arg.GetInt(InfoLabel.SenderID.GetHashString());
 
-        int senderID = parameter.GetInt(InfoLabel.SenderID.GetHashString());
-
-        SFSEventManager.GardenSmartFox.PlazaRoomManager.OnInstantiate(senderID, parameter.GetSFSObject(Label.Data));
+        SFSEventManager.GardenSmartFox.PlazaRoomManager.OnInstantiate(senderID, arg);
     }
 
-    public void OnSynchronize(BaseEvent baseEvent)
+    public void OnSynchronize(ISFSObject arg)
     {
-        ISFSObject parameter = (ISFSObject)baseEvent.Params["params"];
+        int senderID = arg.GetInt(InfoLabel.SenderID.GetHashString());
 
-        int senderID = parameter.GetInt(InfoLabel.SenderID.GetHashString());
-
-        SFSEventManager.GardenSmartFox.PlazaRoomManager.Synchronize(senderID, parameter.GetSFSObject(Label.Data));
+        SFSEventManager.GardenSmartFox.PlazaRoomManager.Synchronize(senderID, arg);
     }
 
-    public void OnReceiveExpression(BaseEvent baseEvent)
+    public void OnReceiveExpression(ISFSObject arg)
     {
-        ISFSObject parameter = (ISFSObject)baseEvent.Params["params"];
-        int senderID = parameter.GetInt(InfoLabel.SenderID.GetHashString());
-
-        parameter = parameter.GetSFSObject(Label.Data);
-        int expressionID = parameter.GetInt(InfoLabel.Expression.GetHashString());
+        int senderID = arg.GetInt(InfoLabel.SenderID.GetHashString());
+        int expressionID = arg.GetInt(InfoLabel.Expression.GetHashString());
 
         SFSEventManager.GardenSmartFox.PlazaRoomManager.ReceiveExpression(expressionID, senderID);
     }
 
-    public void OnReceivePublicMessage(BaseEvent baseEvent)
+    public void OnReceivePublicMessage(ISFSObject arg)
     {
-        ISFSObject parameter = (ISFSObject)baseEvent.Params["params"];
-        int senderID = parameter.GetInt(InfoLabel.SenderID.GetHashString());
-        parameter = parameter.GetSFSObject(Label.Data);
-        string message = parameter.GetUtfString(InfoLabel.Message.GetHashString());
+        int senderID = arg.GetInt(InfoLabel.SenderID.GetHashString());
+        string message = arg.GetUtfString(InfoLabel.Message.GetHashString());
 
         SFSEventManager.GardenSmartFox.PlazaRoomManager.ReceivePublicMessage(message, senderID);
     }
@@ -454,15 +451,13 @@ public class PlazaRoomEvent
     }
 
 
-    public static SFSObject WrapInfoRequest(int roomID, int targetUserID, InfoID infoID, SFSObject parameter)
+    public static SFSObject WrapInfoRequest(int roomID, int targetUserID, SFSObject parameter)
     {
         SFSObject obj = new SFSObject();
 
         obj.PutInt(Label.CommandID, PlazaRoomReq.SendInfo.GetHashCode());
         obj.PutInt(Label.RoomID, roomID);
         obj.PutInt(Label.TargetUserID, targetUserID);
-        obj.PutInt(Label.InfoID, infoID.GetHashCode());
-        obj.PutInt(InfoLabel.SenderID.GetHashString(), SFSManager.GardenSmartFox.User.Id);
         obj.PutSFSObject(Label.Data, parameter);
 
         return obj;

+ 0 - 2
Assets/Script/ThirdParty/DataEyeStatics/StaticsManager.cs

@@ -113,7 +113,6 @@ public class StaticsManager
     public void ChargeSuccess(int requestTimeStamp, string productName, int currencyAmount, string currencyType, string paymentType, string virtualCurrencyAmount)
     {
         DataEyeGA.Pay(currencyAmount, currencyType, productName, requestTimeStamp.ToString());
-        //TODO: 获取玩家自身的钻石数量
         DataEyeGA.VirtualCurrency(virtualCurrencyAmount, "钻石", GetStringByConsumeModule(ConsumeModule.Charge), true, (int)ManaCenter.Diamond);
         //AnySDKParam param = new AnySDKParam(requestTimeStamp.ToString());
         //AnySDKAnalytics.getInstance().callFuncWithParam("onChargeSuccess", param);
@@ -299,7 +298,6 @@ public class StaticsManager
     /// <param name="useReason">用途说明: 暂定显示为模块</param>
     public void RewardItem(ItemID itemId, ItemType itemType, string itemCount, ConsumeModule module)
     {
-        //TODO: 如果是钻石则记录为钻石,否则全部记录为道具
         if (itemType == ItemType.钻石)
             DataEyeGA.VirtualCurrency(itemCount, itemId.ToString(), GetStringByConsumeModule(module), true, (int)ManaCenter.Diamond);
         else

+ 3 - 1
Assets/Script/Tool/Auxiliary.cs

@@ -140,9 +140,11 @@ public class Auxiliary : Regist
 
         //}
 
+
         if (Input.GetKeyDown(KeyCode.Space))
         {
-            RobotManager.AddRobot(1, 3);
+            Vector3 position = SFSPlazaRoomManager.GetDefaultPosition();
+            RobotManager.AddRobot(1, 19, position, PlayerDirection.Left);
             //Resources.UnloadAsset(ManaReso.Get("U_LoadingPanel"));
             //foreach (var VARIABLE in ChestMge.PlazaRoomChests)
             //{

+ 1 - 1
Assets/Script/Tool/DashGame/DateUtil.cs

@@ -322,7 +322,7 @@ public class DateUtil
     /// </summary>
     public static DateTime GetStandardTimeExist()
     {
-        return startStandardTime; //todo 删掉这句 取消注释
+        return startStandardTime; 
         //if (startStandardTime != null) 
         //    return startStandardTime;
         //else

+ 0 - 2
Assets/Script/Tool/DashGame/DecryptionUtil.cs

@@ -46,8 +46,6 @@ public class DecryptionUtil
 		cs.Write(inputByteArray, 0, inputByteArray.Length);  
 		cs.FlushFinalBlock();
 		
-		//StringBuilder ret = new StringBuilder(); //todo 取消注释  
-		
 		return System.Text.Encoding.Default.GetString(ms.ToArray());  
 	}
 

+ 1 - 1
Assets/Script/Tool/DashGame/Language.cs

@@ -256,7 +256,7 @@ public class Language
     }
 
 	private static Font defaultFont;
-	public static Font font; //todo Public改为private
+	public static Font font; 
 
     public static Font GetFont()
     {

+ 0 - 1
Assets/ShareSDKiOSAutoPackage/Editor/SDKPorter/XCodeEditor/XCProject.cs

@@ -362,7 +362,6 @@ namespace cn.sharesdk.unity3d.sdkporter
 				parent = _rootGroup;
 			}
 			
-			// TODO: Aggiungere controllo se file già presente
 			PBXFileReference fileReference = GetFile( System.IO.Path.GetFileName( filePath ) );	
 			if( fileReference != null ) {
 //				UnityEngine.Debug.Log( "File già presente." );

+ 3 - 3
ProjectSettings/GraphicsSettings.asset

@@ -43,13 +43,13 @@ GraphicsSettings:
     type: 0}
   m_TierSettings_Tier1:
     renderingPath: 1
-    useCascadedShadowMaps: 0
+    useCascadedShadowMaps: 1
   m_TierSettings_Tier2:
     renderingPath: 1
-    useCascadedShadowMaps: 0
+    useCascadedShadowMaps: 1
   m_TierSettings_Tier3:
     renderingPath: 1
-    useCascadedShadowMaps: 0
+    useCascadedShadowMaps: 1
   m_DefaultRenderingPath: 1
   m_DefaultMobileRenderingPath: 1
   m_TierSettings: []

+ 1 - 1
ProjectSettings/ProjectSettings.asset

@@ -68,7 +68,7 @@ PlayerSettings:
   disableDepthAndStencilBuffers: 0
   defaultIsFullScreen: 1
   defaultIsNativeResolution: 1
-  runInBackground: 0
+  runInBackground: 1
   captureSingleScreen: 0
   muteOtherAudioSources: 0
   Prepare IOS For Recording: 0

+ 9 - 2
第四期.txt

@@ -1,15 +1,22 @@
-房间名字可以包含"吗
+要向新加入的玩家发送实例请求
 
+激活机器人时玩家必需在房间里
 
 收到ActivateError后便不再创建机器人
 
+一大堆玩家在初始点的情况
+
+
+房间名字可以包含"吗
+
+过一段时间数据库会关闭的问题
 
 开启公告
 
 
 //关闭ManaDebug 开启CatchException
 
-//切换到远程服务器
+//切换到远程服务器 正常Zone
 
 //关闭调试按键和界面