idk
This commit is contained in:
@@ -224,6 +224,15 @@ namespace RebootKit.Engine.Main {
|
||||
return Network.Actors.SpawnActor(assetReference, position, rotation);
|
||||
}
|
||||
|
||||
public static void DestroyActor(Actor actor) {
|
||||
if (actor == null) {
|
||||
s_Logger.Error("Cannot destroy actor. Actor is null.");
|
||||
return;
|
||||
}
|
||||
|
||||
Network.Actors.DestroyActor(actor);
|
||||
}
|
||||
|
||||
public static Actor FindSpawnedActor(ushort actorID) {
|
||||
if (Network is null) {
|
||||
s_Logger.Error("NetworkSystemInstance is not initialized. Cannot find actor.");
|
||||
@@ -252,6 +261,16 @@ namespace RebootKit.Engine.Main {
|
||||
Network.SendPossessedActor(clientID, actorID);
|
||||
}
|
||||
|
||||
public static IEnumerable<Actor> Actors() {
|
||||
foreach (Actor actor in Network.Actors.InSceneActors) {
|
||||
yield return actor;
|
||||
}
|
||||
|
||||
foreach (Actor actor in Network.Actors.SpawnedActors) {
|
||||
yield return actor;
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// @MARK: Service API
|
||||
// Services seems to be useless in the current architecture. Consider removing this API in the future.
|
||||
|
||||
Reference in New Issue
Block a user