本文整理汇总了C#中Stage._addRooms方法的典型用法代码示例。如果您正苦于以下问题:C# Stage._addRooms方法的具体用法?C# Stage._addRooms怎么用?C# Stage._addRooms使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Stage
的用法示例。
在下文中一共展示了Stage._addRooms方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Awake
/*Everything related to creating the dungeon itself */
void Awake()
{
newEnemyWeights = new Dictionary<string, int>();
newEnemyWeights.Add("aggressive", 3);
newEnemyWeights.Add("smart", 3);
newEnemyWeights.Add("turret", 1);
newEnemyWeights.Add("zombie", 2);
newEnemyWeights.Add("worm", 2);
Application.targetFrameRate = 60 ;
QualitySettings.vSyncCount = 0;
scale = Accessiblescale;
stage = new Stage(floorMaterials, wallMaterials, FBuilder);
//TODO: place rooms first.
stage._addRooms();
stage.PlaceHalls();
stage.createDoors();
stage.removeDeadEnds();
stage.Create();
spawnPlayer();
Player = GameObject.FindWithTag("Player").transform;
maxEnemies = (Player.gameObject.GetComponent<PlayerController>().getCurrentFloor() + 1) * enemiesPerLevel;
numEnemies = 0;
enemyWeights = new float[6, 3];
enemyWeights[0, 0] = 0.5f;
enemyWeights[0, 1] = 1f;
enemyWeights[0, 2] = 0;
enemyWeights[1, 0] = 0.4f;
enemyWeights[1, 1] = 0.8f;
enemyWeights[1, 2] = 1f;
enemyWeights[2, 0] = 0.35f;
enemyWeights[2, 1] = 0.7f;
enemyWeights[2, 2] = 1f;
enemyWeights[3, 0] = 0.35f;
enemyWeights[3, 1] = 0.7f;
enemyWeights[3, 2] = 1f;
enemyWeights[4, 0] = 0.35f;
enemyWeights[4, 1] = 0.7f;
enemyWeights[4, 2] = 0.3f;
enemyWeights[5, 0] = 0.35f;
enemyWeights[5, 1] = 0.35f;
enemyWeights[5, 2] = 0.3f;
pool = GameObject.Find("ObjectPool").GetComponent<ObjectPooling>();
}