Esempio n. 1
0
 public override VehicleNode MakeNode(IntVector pos, PathCategory category)
 {
     switch (category)
     {
         case PathCategory.Rail: return new RailNode(pos);
         case PathCategory.Road: return new RoadNode(pos);
         default: return new RoadNode(pos);
     }
 }
Esempio n. 2
0
        public static Transform GetSpawnPoint(PathCategory category)
        {
            switch (category)
            {
            case PathCategory.Client:
                return(spawnPoints[0]);

            case PathCategory.Network:
                return(spawnPoints[1]);

            case PathCategory.Server:
                return(spawnPoints[2]);

            default:
                throw new ArgumentOutOfRangeException("category", category, "Path category doesn't exist.");
            }
        }