Ejemplo n.º 1
0
 void initMonster()
 {
     Vector3[] arr = new Vector3[4];
     int i;
     for (i = 0; i < arr.Length; i++)
     {
         arr[i] = new Vector3();
         arr[i].y = 1;
         if (i == 0)
         {
             arr[i].x = 110;
             arr[i].z = 128;
         }
         else if (i == 1)
         {
             arr[i].x = 120;
             arr[i].z = 120;
         }
         else if (i == 2)
         {
             arr[i].x = 100;
             arr[i].z = 140;
         }
         else if (i == 3)
         {
             arr[i].x = 120;
             arr[i].z = 140;
         }
     }
     for (i = 0; i < arr.Length; i++)
     {
         Monster monster = new Monster();
         monster.id = i;
         monster.reset();
         monster.play(AvatarUtil.ACT_STAND);
         monster.resetPos(arr[i]);
         SceneUnitMgr.addUnit(monster);
     }
 }
Ejemplo n.º 2
0
 public static void disposeMonster(Monster m)
 {
     if (monsterPool.Count < 120) {
         monsterPool.Add(m);
     }
 }