public void StructureRepositoryEditModeGetRoadPrefabPasses()
        {
            GameObject returnObject = structureRepo.GetBuildingPrefabByName("Road", StructureType.Road);

            Assert.AreEqual(testRoad, returnObject);
            // Use the Assert class to test conditions
        }
コード例 #2
0
    public void PlaceStructureAt(Vector3 inputPosition, string structureName, StructureType structureType)
    {
        GameObject buildingPrefab = structureRepository.GetBuildingPrefabByName(structureName, structureType);
        Vector3    gridPosition   = grid.CalculateGridPosition(inputPosition);

        if (!grid.IsCellTaken(gridPosition))
        {
            placementManager.CreateBuilding(gridPosition, grid, buildingPrefab);
        }
    }