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); } } }
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); } } }