Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static void changeMonsterDirectionToPlayer(){
- for (int i = 0; i < listMonster.Count; i++) {
- MonsterController temp = listMonster [i].GetComponent<MonsterController> ();
- temp.monsterPath.Clear ();
- temp.aStar(temp.mapMonster [Mathf.RoundToInt (player.transform.position.x), Mathf.RoundToInt (player.transform.position.z)], temp.mapMonster [Mathf.RoundToInt (temp.transform.position.x), Mathf.RoundToInt (temp.transform.position.z)]);
- try{
- temp.monsterPath.RemoveAt(0);
- }catch(System.Exception e){
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment