Example #1
0
        /// <summary>
        /// Creates slave item for the given spawnpoint.
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="spawnPoint"></param>
        /// <returns></returns>
        private T CreateSlaveItem <T>(SpawnPoint spawnPoint)
            where T : PrefabSlaveItem, new()
        {
            var pos = GetAbsolutePosition(spawnPoint.Position);

            var item = PrefabSlaveItem.Add <T>(map, prefab, pos);

            item.Node.Rotation    = spawnPoint.Rotation * prefabRot;
            item.Node.ForwardItem = item;

            return(item);
        }
Example #2
0
 public static Garage Add(IItemContainer map, Prefab parent, Vector3 position)
 {
     return(PrefabSlaveItem.Add <Garage>(map, parent, position));
 }
Example #3
0
 public static Company Add(IItemContainer map, Prefab parent, Vector3 position)
 {
     return(PrefabSlaveItem.Add <Company>(map, parent, position));
 }
Example #4
0
 public new static FuelPump Add(IItemContainer map, Prefab parent, Vector3 position)
 {
     return(PrefabSlaveItem.Add <FuelPump>(map, parent, position));
 }
Example #5
0
 public static BusStop Add(IItemContainer map, Prefab parent, Vector3 position)
 {
     return(PrefabSlaveItem.Add <BusStop>(map, parent, position));
 }