本文整理汇总了C#中Building.getUnlockSet方法的典型用法代码示例。如果您正苦于以下问题:C# Building.getUnlockSet方法的具体用法?C# Building.getUnlockSet怎么用?C# Building.getUnlockSet使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Building
的用法示例。
在下文中一共展示了Building.getUnlockSet方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Place
//Place a building on specific location
public void Place(Building building, int x, int y, int rotation, int lastCollection)
{
Vector3 newPosition = building.transform.localPosition;
newPosition.x = x*squareSize.x + building.size.x/2;
newPosition.z = y*squareSize.y + building.size.y/2;
building.transform.localPosition = newPosition;
building.setConflict(!isFree ());
building.setCoordinates (x, y);
building.rotation = rotation;
building.lastCollection = lastCollection;
buildingManager.addBuilding (building);
//rotate
//print ("The rotation is " + rotation.ToString());
for (int i=0; i<rotation; i++) {
building.rotate();
}
//mark ground taken
for (int i = 0; i < building.size.x/squareSize.x; i++) {
for (int j = 0; j < building.size.y/squareSize.y; j++) {
grid[x+i,y+j] = true;
highlightGrid[x+i, y+j].renderer.material = redMat;
}
}
HashSet<int> unlocks = building.getUnlockSet ();
foreach (BuildingButton b in buttons) {
if (unlocks.Contains(b.prefab.buildingType)) {
b.prefab.locked = false;
}
}
}