예제 #1
0
        public Optional <GameObject> Spawn(Entity entity, Optional <GameObject> parent, EntityCell cellRoot)
        {
            NitroxInt3 cellId  = entity.AbsoluteEntityCell.CellId;
            NitroxInt3 batchId = entity.AbsoluteEntityCell.BatchId;

            cellRoot.liveRoot.name = $"CellRoot {cellId.X}, {cellId.Y}, {cellId.Z}; Batch {batchId.X}, {batchId.Y}, {batchId.Z}";

            NitroxEntity.SetNewId(cellRoot.liveRoot, entity.Id);

            LargeWorldStreamer.main.cellManager.QueueForAwake(cellRoot);

            return(Optional.OfNullable(cellRoot.liveRoot));
        }
예제 #2
0
        public Optional <GameObject> Spawn(Entity entity, Optional <GameObject> parent, EntityCell cellRoot)
        {
            NitroxInt3 cellId  = entity.AbsoluteEntityCell.CellId;
            NitroxInt3 batchId = entity.AbsoluteEntityCell.BatchId;

            cellRoot.liveRoot.name = string.Format("CellRoot {0}, {1}, {2}; Batch {3}, {4}, {5}", cellId.X, cellId.Y, cellId.Z, batchId.X, batchId.Y, batchId.Z);

            NitroxEntity.SetNewId(cellRoot.liveRoot, entity.Id);

            LargeWorldStreamer.main.cellManager.QueueForAwake(cellRoot);

            return(cellRoot.liveRoot);
        }
예제 #3
0
 public static Int3 ToUnity(this NitroxModel.DataStructures.Int3 v)
 {
     return(new Int3(v.X, v.Y, v.Z));
 }
예제 #4
0
 public static Vector3 AsVector3(this NitroxModel.DataStructures.Int3 v)
 {
     return(new Vector3(v.X, v.Y, v.Z));
 }
예제 #5
0
 public static global::Int3 Global(this NitroxModel.DataStructures.Int3 int3)
 {
     return(new global::Int3(int3.X, int3.Y, int3.Z));
 }