AR以及对战房间部分代码重构
This commit is contained in:
1 parent
fb4da81ce2
commit
a149a7c08e
13 files changed
+280
-262
No files matched your search
@@ -519,17 +519,20 @@ namespace Assets.Scenes.Ride.Scripts
|
||||
}
|
||||
else
|
||||
{
|
||||
SendQuit4GameRoom();
|
||||
SceneManager.LoadScene("MainScene");
|
||||
}
|
||||
}
|
||||
private void SendQuit4GameRoom()
|
||||
|
||||
private void OnDestroy()
|
||||
{
|
||||
//如果在对战房间内,发送退出房间的命令
|
||||
if (mainController.roomId > 0)
|
||||
{
|
||||
MapUDPService.SendGameRoomKick(mainController.roomId, App.CurrentUser.Id, App.CurrentUser.Id);
|
||||
}
|
||||
QuitGameRoom();
|
||||
}
|
||||
|
||||
//如果在对战房间内,发送退出房间的命令
|
||||
private void QuitGameRoom()
|
||||
{
|
||||
if (mainController.roomId == 0) return;
|
||||
MapUDPService.SendGameRoomKick(mainController.roomId, App.CurrentUser.Id, App.CurrentUser.Id);
|
||||
}
|
||||
//不保存退出
|
||||
public virtual void CancelQuit(BaseEventData baseEventData)
|
||||
@@ -537,7 +540,6 @@ namespace Assets.Scenes.Ride.Scripts
|
||||
modalPanel.SetActive(false);
|
||||
quitPanel.SetActive(false);
|
||||
mainController.ClearTempFile();
|
||||
SendQuit4GameRoom();
|
||||
SceneManager.LoadScene("MainScene");
|
||||
}
|
||||
//取消退出
|
||||
@@ -556,8 +558,6 @@ namespace Assets.Scenes.Ride.Scripts
|
||||
}
|
||||
protected virtual void StopShortRide(BaseEventData baseEventData)
|
||||
{
|
||||
//发送退出房间的命令
|
||||
SendQuit4GameRoom();
|
||||
SceneManager.LoadScene("MainScene");
|
||||
}
|
||||
protected virtual void CancelStopShortRide(BaseEventData baseEventData)
|
||||
|
||||
@@ -1293,7 +1293,7 @@ public BaseUIManager singleUIManager;
|
||||
var path = PFConstants.MapWorkoutRecordFolder + "/" + recordId;
|
||||
Helper.CreateDirectoryIfNotExsit(path);
|
||||
|
||||
string imageFileName = path +"/"+ Guid.NewGuid().ToString() + ".png";
|
||||
var imageFileName = path +"/"+ Guid.NewGuid().ToString() + ".png";
|
||||
CaptureCamera(Camera.main, new Rect(Screen.width * 0f, Screen.height * 0f, Screen.width * 0.5f, Screen.height * 0.5f), imageFileName);
|
||||
cyclingController.recorderData.StartTime = startTime;
|
||||
cyclingController.recorderData.IsCompleted = totalDistance >= mapData.TotalDistance;
|
||||
|
||||
Reference in new issue
Block a user