浏览代码

more feedback fixups

/main
David Woodruff 4 年前
当前提交
681b08bc
共有 4 个文件被更改,包括 24 次插入12 次删除
  1. 2
      Assets/Scenes/MainMenu.unity
  2. 5
      Assets/Scripts/Server/Game/ServerGameBRState.cs
  3. 13
      Assets/Scripts/Shared/Game/GameBRState.cs
  4. 16
      ProjectSettings/BurstAotSettings_StandaloneWindows.json

2
Assets/Scenes/MainMenu.unity


ProtocolVersion: 0
NetworkTransport: {fileID: 1359040529}
RegisteredScenes:
- SampleScene
- SampleScene
AllowRuntimeSceneChanges: 1
NetworkedPrefabs:
- Prefab: {fileID: 922472105905938403, guid: e57f88b20c296674cb0c1517a43f99da, type: 3}

5
Assets/Scripts/Server/Game/ServerGameBRState.cs


public override void Initialize(BossRoomStateManager manager, Dictionary<string, object> stateParams )
{
base.Initialize(manager, stateParams);
//NOTE: it's very important to use MLAPI's scene switching logic, and not switch the scene yourself. If you do,
//MLAPI will get confused internally about which scene is active.
//MLAPI_WISHLIST: could MLAPI listen to scene change events and then handle the networked switch itself, internally?
MLAPI.SceneManagement.NetworkSceneManager.SwitchScene("SampleScene");
}
public override void Update()

13
Assets/Scripts/Shared/Game/GameBRState.cs


public BossRoomState State { get { return BossRoomState.GAME; } }
//!! STUB !! will be filled out with any gamestate logic shared between server and client.
public virtual void Destroy()
{
}

m_manager = manager;
// FIXME_DMW: we probably need to rely on MLAPI's scene management on the client to change scenes, rather than doing it here.
// I haven't yet been able to get SceneManagement to work though--on login, the client just stays at the MainMenu scene, even though
// the server is in the SampleScene.
//
// problems with doing LoadScene here:
// 1.Runs twice on the host. This is harmless, but not ideal.
// 2.This may happen AFTER the server has sent us all dynamic object spawns in ITS scene (because we can't send the event that
// triggers this code until after we have returned ConnectionApproval==true to MLAPI).
UnityEngine.SceneManagement.SceneManager.LoadScene("SampleScene");
}
public virtual void Update()

16
ProjectSettings/BurstAotSettings_StandaloneWindows.json


{
"MonoBehaviour": {
"Version": 3,
"EnableBurstCompilation": true,
"EnableOptimisations": true,
"EnableSafetyChecks": false,
"EnableDebugInAllBuilds": false,
"UsePlatformSDKLinker": false,
"CpuMinTargetX32": 0,
"CpuMaxTargetX32": 0,
"CpuMinTargetX64": 0,
"CpuMaxTargetX64": 0,
"CpuTargetsX32": 6,
"CpuTargetsX64": 72
}
}
正在加载...
取消
保存