Boss Room 是一款使用 Unity MLAPI 制作的全功能合作多人 RPG。 它旨在作为学习样本,展示类似游戏中经常出现的某些典型游戏模式。
您最多选择25个主题 主题必须以中文或者字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

33 行
1.0 KiB

using System;
using System.Collections.Generic;
using BossRoom;
namespace BossRoomServer
{
class ServerGameBRState : GameBRState
{
// !! STUB CLASS !!
// this will be fleshed out with all server-side logic for the Game BossRoom state.
public override void Destroy()
{
base.Destroy();
}
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()
{
base.Update();
}
}
}