|
@@ -224,8 +224,27 @@ public class PlazaRoomManager
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ private Vector3 PlayerDefaultPosition;
|
|
|
public void EnterPlazaRoom()
|
|
|
{
|
|
|
+ PlazaRoom.Initialize();
|
|
|
+
|
|
|
+ GardenSmartFox.PlazaRoomManager.PlazaRoomSky = ManaReso.Get("PlazaRoomSky");
|
|
|
+ SkyOriginPosition = GardenSmartFox.PlazaRoomManager.PlazaRoomSky.position;
|
|
|
+
|
|
|
+ GardenSmartFox.PlazaRoomManager.PlazaRoomCamera = ManaReso.Get<Camera>("MainCamera");
|
|
|
+ GardenSmartFox.PlazaRoomManager.CameraOriginPosition = GardenSmartFox.PlazaRoomManager.PlazaRoomCamera.transform.position;
|
|
|
+
|
|
|
+ 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);
|
|
|
+
|
|
|
+ SendInstantiateRequset(-1);
|
|
|
+
|
|
|
+
|
|
|
GardenSmartFox.PlazaRoomManager.CameraLeftBorder = ManaReso.Get("PlazaRoomCameraLeftBorder").position.x;
|
|
|
GardenSmartFox.PlazaRoomManager.CameraRightBorder = ManaReso.Get("PlazaRoomCameraRightBorder").position.x;
|
|
|
|
|
@@ -400,30 +419,12 @@ public class PlazaRoomManager
|
|
|
ExitPlazaRoom();
|
|
|
}
|
|
|
|
|
|
- private Vector3 PlayerDefaultPosition;
|
|
|
public void OnJoinPlazaRoom(Room room)
|
|
|
{
|
|
|
- PlazaRoom.Initialize();
|
|
|
-
|
|
|
- GardenSmartFox.PlazaRoomManager.PlazaRoomSky = ManaReso.Get("PlazaRoomSky");
|
|
|
- SkyOriginPosition = GardenSmartFox.PlazaRoomManager.PlazaRoomSky.position;
|
|
|
-
|
|
|
- GardenSmartFox.PlazaRoomManager.PlazaRoomCamera = ManaReso.Get<Camera>("MainCamera");
|
|
|
- GardenSmartFox.PlazaRoomManager.CameraOriginPosition = GardenSmartFox.PlazaRoomManager.PlazaRoomCamera.transform.position;
|
|
|
-
|
|
|
GardenSmartFox.PlazaRoomManager.CurrentPlazaRoom = room;
|
|
|
|
|
|
- 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);
|
|
|
-
|
|
|
JoinRoomStatus = RequestStatus.Succeed;
|
|
|
TryEnterPlazaRoom();
|
|
|
-
|
|
|
- SendInstantiateRequset(-1);
|
|
|
}
|
|
|
|
|
|
public void OnUserExitPlazaRoom(User user)
|