heryvandoro

Untitled

Mar 27th, 2017
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. public static void changeMonsterDirectionToPlayer(){
  2. for (int i = 0; i < listMonster.Count; i++) {
  3. MonsterController temp = listMonster [i].GetComponent<MonsterController> ();
  4. temp.monsterPath.Clear ();
  5. 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)]);
  6. try{
  7. temp.monsterPath.RemoveAt(0);
  8. }catch(System.Exception e){
  9. }
  10. }
  11. }
Advertisement
Add Comment
Please, Sign In to add comment