Esempio n. 1
0
    void SpawnBug(BUG_SIZE size, BUG_DIFFICULTY diff, Vector3 start, Vector3 target)
    {
        bugsRemaining++;
        GameObject bugOne    = bugFarmScript.SpawnBug(size, diff);
        BugScript  scriptOne = bugOne.GetComponent <BugScript> ();

        bugOne.transform.localPosition = start;
        scriptOne.setMoveTarget(target);
    }
Esempio n. 2
0
 public GameObject SpawnBug(BUG_SIZE size, BUG_DIFFICULTY difficulty)
 {
     if (size.Equals(BUG_SIZE.SMALL))
     {
         if (difficulty.Equals(BUG_DIFFICULTY.EASY))
         {
             return(SpawnBug(BUG_SMALL_EASY));
         }
         else if (difficulty.Equals(BUG_DIFFICULTY.NORMAL))
         {
             return(SpawnBug(BUG_SMALL_NORMAL));
         }
         else if (difficulty.Equals(BUG_DIFFICULTY.HARD))
         {
             return(SpawnBug(BUG_SMALL_HARD));
         }
     }
     else if (size.Equals(BUG_SIZE.MEDIUM))
     {
         if (difficulty.Equals(BUG_DIFFICULTY.EASY))
         {
             return(SpawnBug(BUG_MEDIUM_EASY));
         }
         else if (difficulty.Equals(BUG_DIFFICULTY.NORMAL))
         {
             return(SpawnBug(BUG_MEDIUM_NORMAL));
         }
         else if (difficulty.Equals(BUG_DIFFICULTY.HARD))
         {
             return(SpawnBug(BUG_MEDIUM_HARD));
         }
     }
     else if (size.Equals(BUG_SIZE.LARGE))
     {
         if (difficulty.Equals(BUG_DIFFICULTY.EASY))
         {
             return(SpawnBug(BUG_LARGE_EASY));
         }
         else if (difficulty.Equals(BUG_DIFFICULTY.NORMAL))
         {
             return(SpawnBug(BUG_LARGE_NORMAL));
         }
         else if (difficulty.Equals(BUG_DIFFICULTY.HARD))
         {
             return(SpawnBug(BUG_LARGE_HARD));
         }
     }
     return(null);
 }