Exemplo n.º 1
0
        public MoveableBuilding(InstanceID instanceID, bool sub = false) : base(instanceID)
        {
            isSubInstance = sub;
            Info          = new Info_Prefab(BuildingManager.instance.m_buildings.m_buffer[instanceID.Building].Info);

            ResetSubInstances();
        }
Exemplo n.º 2
0
 public MoveableSegment(InstanceID instanceID) : base(instanceID)
 {
     //if ((NetManager.instance.m_segments.m_buffer[instanceID.NetSegment].m_flags & NetSegment.Flags.Created) == NetSegment.Flags.None)
     //{
     //    throw new Exception($"Segment #{instanceID.NetSegment} not found!");
     //}
     Info = new Info_Prefab(NetManager.instance.m_segments.m_buffer[instanceID.NetSegment].Info);
 }
Exemplo n.º 3
0
 public MoveableBuilding(InstanceID instanceID) : base(instanceID)
 {
     //if ((BuildingManager.instance.m_buildings.m_buffer[instanceID.Building].m_flags & Building.Flags.Created) == Building.Flags.None)
     //{
     //    throw new Exception($"Building #{instanceID.Building} not found!");
     //}
     Info = new Info_Prefab(BuildingManager.instance.m_buildings.m_buffer[instanceID.Building].Info);
 }
Exemplo n.º 4
0
 public MoveableTree(InstanceID instanceID) : base(instanceID)
 {
     //if (((TreeInstance.Flags)TreeManager.instance.m_trees.m_buffer[instanceID.Tree].m_flags & TreeInstance.Flags.Created) == TreeInstance.Flags.None)
     //{
     //    throw new Exception($"Tree #{instanceID.Tree} not found!");
     //}
     Info = new Info_Prefab(TreeManager.instance.m_trees.m_buffer[instanceID.Tree].Info);
 }
Exemplo n.º 5
0
 public MoveableProp(InstanceID instanceID) : base(instanceID)
 {
     //if (((PropInstance.Flags)PropManager.instance.m_props.m_buffer[instanceID.Prop].m_flags & PropInstance.Flags.Created) == PropInstance.Flags.None)
     //{
     //    throw new Exception($"Prop #{instanceID.Prop} not found!");
     //}
     Info = new Info_Prefab(PropManager.instance.m_props.m_buffer[instanceID.Prop].Info);
 }
Exemplo n.º 6
0
        public MoveableBuilding(InstanceID instanceID, bool sub = false) : base(instanceID)
        {
            isSubInstance = sub;
            isHidden      = (buildingBuffer[id.Building].m_flags & Building.Flags.Hidden) == Building.Flags.Hidden;
            Info          = new Info_Prefab(BuildingManager.instance.m_buildings.m_buffer[instanceID.Building].Info);

            ResetSubInstances();
        }
Exemplo n.º 7
0
 public MoveableNode(InstanceID instanceID) : base(instanceID)
 {
     //if ((NetManager.instance.m_nodes.m_buffer[instanceID.NetNode].m_flags & NetNode.Flags.Created) == NetNode.Flags.None)
     //{
     //    Debug.Log($"Node #{instanceID.NetNode} not found!");
     //    return;
     //    // TODO throw new Exception($"Node #{instanceID.NetNode} not found!");
     //}
     Info = new Info_Prefab(NetManager.instance.m_nodes.m_buffer[instanceID.NetNode].Info);
 }
Exemplo n.º 8
0
 public MoveableProp(InstanceID instanceID) : base(instanceID)
 {
     Info = new Info_Prefab(PropManager.instance.m_props.m_buffer[instanceID.Prop].Info);
 }
Exemplo n.º 9
0
        public MoveableNode(InstanceID instanceID) : base(instanceID)
        {
            Info = new Info_Prefab(NetManager.instance.m_nodes.m_buffer[instanceID.NetNode].Info);

            subInstances = GetSubInstances();
        }