コード例 #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);
        }
コード例 #2
0
ファイル: Garage.cs プロジェクト: sk-zk/TruckLib
 public static Garage Add(IItemContainer map, Prefab parent, Vector3 position)
 {
     return(PrefabSlaveItem.Add <Garage>(map, parent, position));
 }
コード例 #3
0
 public static Company Add(IItemContainer map, Prefab parent, Vector3 position)
 {
     return(PrefabSlaveItem.Add <Company>(map, parent, position));
 }
コード例 #4
0
 public new static FuelPump Add(IItemContainer map, Prefab parent, Vector3 position)
 {
     return(PrefabSlaveItem.Add <FuelPump>(map, parent, position));
 }
コード例 #5
0
 public static BusStop Add(IItemContainer map, Prefab parent, Vector3 position)
 {
     return(PrefabSlaveItem.Add <BusStop>(map, parent, position));
 }