コード例 #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);
     }
 }
コード例 #2
0
ファイル: SpawnPoints.cs プロジェクト: dagerikhl/ddsg
        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.");
            }
        }