Beispiel #1
0
 public void OnNetworkDestroy(NetworkDestroyArgs args)
 {
     foreach (Action <NetworkDestroyArgs> evt in destroyEvents)
     {
         evt(args);
     }
 }
Beispiel #2
0
        private static void ServerDestroyNoTracking(NetworkEntity toDestroy, NetworkDestroyArgs args)
        {
            DestroyCommand destroy = new DestroyCommand(toDestroy.instanceId, args);

            GameObject.Destroy(toDestroy.gameObject);

            pendingDestroyCommands.Add(destroy);
        }
Beispiel #3
0
        public static void ServerDestroy(NetworkEntity toDestroy, NetworkDestroyArgs args)
        {
            DestroyCommand destroy = new DestroyCommand(toDestroy.instanceId, args);

            objectsManager.spawnedEntities.Remove(toDestroy.instanceId);
            GameObject.Destroy(toDestroy.gameObject);

            pendingDestroyCommands.Add(destroy);
        }
Beispiel #4
0
 public DestroyCommand(NetworkInstanceId id, NetworkDestroyArgs args)
 {
     this.id   = id;
     this.args = args;
 }