示例#1
0
 public void Spawn(GameObject spawnPoint, string passengerName = "", TicketAdditionMode ticketMode = TicketAdditionMode.Default)
 {
     if(GameController.GetInstance().IsGameFinished)
         return;
     if (passengerName == "")
     {
         DoRegularSpawn(spawnPoint);
     }
     else
     {
         PassengerSM ps = InstantiateNPC(passengerName, spawnPoint.transform.position, true, true);
         ps.MoveToRandomPosition();
         if (ticketMode != TicketAdditionMode.Default)
         {
             ps.SetTicketAndVisibility(ticketMode == TicketAdditionMode.WithTicket, false);
         }
     }
 }
示例#2
0
 public void Spawn(GameObject spawnPoint, string passengerName = "", TicketAdditionMode ticketMode = TicketAdditionMode.Default)
 {
     if (GameController.GetInstance().IsGameFinished)
     {
         return;
     }
     if (passengerName == "")
     {
         DoRegularSpawn(spawnPoint);
     }
     else
     {
         PassengerSM ps = InstantiateNPC(passengerName, spawnPoint.transform.position, true, true);
         ps.MoveToRandomPosition();
         if (ticketMode != TicketAdditionMode.Default)
         {
             ps.SetTicketAndVisibility(ticketMode == TicketAdditionMode.WithTicket, false);
         }
     }
 }