本文整理汇总了C#中TileMap.DetectVisability方法的典型用法代码示例。如果您正苦于以下问题:C# TileMap.DetectVisability方法的具体用法?C# TileMap.DetectVisability怎么用?C# TileMap.DetectVisability使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TileMap
的用法示例。
在下文中一共展示了TileMap.DetectVisability方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Initialise
public void Initialise()
{
map = GetComponent<TileMap>();
effectLibrary = GetComponent<PrefabLibrary> ();
activeUnits = new List<GameObject> ();
everyUnit = new List<GameObject> ();
currentQueue = new List<GameObject> ();
currentDisplaying = Display.Movement;
enemies = new GameObject[MAXENEMIES];
playerUnitObjects = new GameObject[MAXCHARACTERS];
loadEnemies ();
loadCharacters ();
//temp
spawnUnit (5, 1, CharacterClass.Warrior);
spawnUnit (4, 1, CharacterClass.Highwayman);
spawnUnit (3, 1, CharacterClass.Ranger);
spawnUnit (2, 1, CharacterClass.Elementalist);
spawnUnit (1, 1, CharacterClass.Acolyte);
GetComponent<GameManager> ().UI.GetComponent<UIManager> ().SetupUnitFrames (playerUnitObjects);
//spawnEnemy (4, 2, EnemyClass.Goblin);
List<Unit> squad = new List<Unit> ();
squad.Add(spawnEnemy (42, 4, EnemyClass.GoblinShaman));
foreach (Unit u in squad) {
u.GetComponent<AIBehaviours>().myGroup = squad;
}
squad = new List<Unit> ();
squad.Add(spawnEnemy (15, 4, EnemyClass.GoblinAxeThrower));
squad.Add(spawnEnemy (15, 5, EnemyClass.Goblin));
squad.Add(spawnEnemy (17, 1, EnemyClass.Goblin));
squad.Add(spawnEnemy (15, 8, EnemyClass.GoblinAxeThrower));
foreach (Unit u in squad) {
u.GetComponent<AIBehaviours>().myGroup = squad;
}
squad = new List<Unit> ();
squad.Add(spawnEnemy (21, 4, EnemyClass.GoblinDrummer));
squad.Add(spawnEnemy (25, 8, EnemyClass.GoblinAxeThrower));
squad.Add(spawnEnemy (26, 1, EnemyClass.GoblinAxeThrower));
squad.Add(spawnEnemy (26, 4, EnemyClass.Goblin));
squad.Add(spawnEnemy (27, 4, EnemyClass.Goblin));
foreach (Unit u in squad) {
u.GetComponent<AIBehaviours>().myGroup = squad;
}
activeUnits.Sort(CompareListByInitiative);
foreach (GameObject go in activeUnits) {
currentQueue.Add(go);
}
//set the starting vision
foreach (GameObject go in playerUnitObjects) {
map.DetectVisability(go.GetComponent<Unit>());
}
GetComponentInChildren<UIManager> ().ChangeRound (currentQueue);
NextUnitsTurn ();
}