-
-
Notifications
You must be signed in to change notification settings - Fork 65
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: move interfaces into their own files (#613)
- Loading branch information
Showing
6 changed files
with
83 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
using System; | ||
using UnityEngine; | ||
|
||
namespace Mirage | ||
{ | ||
public delegate NetworkIdentity SpawnHandlerDelegate(SpawnMessage msg); | ||
|
||
// Handles requests to unspawn objects on the client | ||
public delegate void UnSpawnDelegate(NetworkIdentity spawned); | ||
|
||
public interface IClientObjectManager | ||
{ | ||
GameObject GetPrefab(Guid assetId); | ||
|
||
void RegisterPrefab(NetworkIdentity prefab); | ||
|
||
void RegisterPrefab(NetworkIdentity prefab, Guid newAssetId); | ||
|
||
void RegisterPrefab(NetworkIdentity prefab, SpawnHandlerDelegate spawnHandler, UnSpawnDelegate unspawnHandler); | ||
|
||
void UnregisterPrefab(NetworkIdentity prefab); | ||
|
||
void RegisterSpawnHandler(Guid assetId, SpawnHandlerDelegate spawnHandler, UnSpawnDelegate unspawnHandler); | ||
|
||
void UnregisterSpawnHandler(Guid assetId); | ||
|
||
void ClearSpawners(); | ||
|
||
void DestroyAllClientObjects(); | ||
|
||
void PrepareToSpawnSceneObjects(); | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
using System; | ||
using UnityEngine; | ||
|
||
namespace Mirage | ||
{ | ||
public interface IServerObjectManager | ||
{ | ||
bool AddPlayerForConnection(INetworkConnection conn, GameObject player); | ||
|
||
bool AddPlayerForConnection(INetworkConnection conn, GameObject player, Guid assetId); | ||
|
||
bool ReplacePlayerForConnection(INetworkConnection conn, NetworkClient client, GameObject player, bool keepAuthority = false); | ||
|
||
bool ReplacePlayerForConnection(INetworkConnection conn, NetworkClient client, GameObject player, Guid assetId, bool keepAuthority = false); | ||
|
||
void Spawn(GameObject obj, GameObject ownerPlayer); | ||
|
||
void Spawn(GameObject obj, INetworkConnection ownerConnection = null); | ||
|
||
void Spawn(GameObject obj, Guid assetId, INetworkConnection ownerConnection = null); | ||
|
||
void Destroy(GameObject obj); | ||
|
||
void UnSpawn(GameObject obj); | ||
|
||
bool SpawnObjects(); | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.