public static void spawnShip(Ships ship, int team) { if (GameMode.Instance.teamIsShip[team] || GameMode.Instance.winning) { return; } else { ShipsHandler.getconstruction().ships[(int)ship].ëéíìðñîòçïï[team] = true; for (int i = 0; i < GameMode.Instance.teamParents.Length; i++) { GameMode.Instance.teamIsShip[i] = GameMode.Instance.isShip(i); } getconstruction().GetComponent <WakeNetObject>().îëæêéïåðæìå("allBuildShip", óëððîêðëóêó.îéäåéçèïïñí, new object[] { Enum.GetName(typeof(Ships), ship).ToLower(), team }); } }
private IEnumerator gameModeStart() { Log.log("Started [BoardingBloodbath] mode"); GameMode.Instance.useTickets = true; wno.îëæêéïåðæìå("broadcastChat", óëððîêðëóêó.îéäåéçèïïñí, new object[] { 1, 1, "game", "Loading BoardingBloodbath mode..." }); setTickets(pirateTickets, navyTickets); Log.log("Waiting 20sec"); ModeHandler.usersVoted.Clear(); ModeHandler.voteSucceded = false; yield return(new WaitForSeconds(20f)); Log.log("Passed 20sec"); try { ShipsHandler.spawnShip(ShipsHandler.Ships.Hoy, 0); ShipsHandler.spawnShip(ShipsHandler.Ships.Galleon, 1); ShipsHandler.spawnShip(ShipsHandler.Ships.Hoy, 2); ShipsHandler.spawnShip(ShipsHandler.Ships.Hoy, 4); ShipsHandler.spawnShip(ShipsHandler.Ships.Galleon, 5); ShipsHandler.spawnShip(ShipsHandler.Ships.Hoy, 6); } catch (Exception e) { Log.log(e.Message); } Log.log("Spawned ships"); try { GameMode.Instance.teamParents[0].GetComponent <ShipHealth>().ññçäîèäíñðó.transform.position = new Vector3(-80f, 4.5f, -60f); // Distance from each other, height, distance from center GameMode.Instance.teamParents[0].GetComponent <ShipHealth>().ññçäîèäíñðó.transform.eulerAngles = new Vector3(0f, 0f, 0f); GameMode.Instance.teamParents[1].GetComponent <ShipHealth>().ññçäîèäíñðó.transform.position = new Vector3(-40f, 9f, -60f); GameMode.Instance.teamParents[1].GetComponent <ShipHealth>().ññçäîèäíñðó.transform.eulerAngles = new Vector3(0f, 0f, 0f); GameMode.Instance.teamParents[2].GetComponent <ShipHealth>().ññçäîèäíñðó.transform.position = new Vector3(0f, 4.5f, -60f); GameMode.Instance.teamParents[2].GetComponent <ShipHealth>().ññçäîèäíñðó.transform.eulerAngles = new Vector3(0f, 0, 0f); GameMode.Instance.teamParents[4].GetComponent <ShipHealth>().ññçäîèäíñðó.transform.position = new Vector3(40f, 4.5f, -60f); GameMode.Instance.teamParents[4].GetComponent <ShipHealth>().ññçäîèäíñðó.transform.eulerAngles = new Vector3(0f, 180f, 0f); GameMode.Instance.teamParents[5].GetComponent <ShipHealth>().ññçäîèäíñðó.transform.position = new Vector3(80f, 9f, -60f); GameMode.Instance.teamParents[5].GetComponent <ShipHealth>().ññçäîèäíñðó.transform.eulerAngles = new Vector3(0f, 180f, 0f); GameMode.Instance.teamParents[6].GetComponent <ShipHealth>().ññçäîèäíñðó.transform.position = new Vector3(120f, 4.5f, -60f); GameMode.Instance.teamParents[6].GetComponent <ShipHealth>().ññçäîèäíñðó.transform.eulerAngles = new Vector3(0f, 180f, 0f); } catch (Exception e) { Log.log(e.Message); } Log.log("Moved ships to init"); try { GameMode.Instance.teamParents[0].GetComponent <ShipHealth>().ññçäîèäíñðó.transform.position = new Vector3(-37f, 4.5f, -10f); // Distance from each other, height, distance from center GameMode.Instance.teamParents[0].GetComponent <ShipHealth>().ññçäîèäíñðó.transform.eulerAngles = new Vector3(0f, -10f, 0f); GameMode.Instance.teamParents[2].GetComponent <ShipHealth>().ññçäîèäíñðó.transform.position = new Vector3(-16f, 4.5f, 13f); GameMode.Instance.teamParents[2].GetComponent <ShipHealth>().ññçäîèäíñðó.transform.eulerAngles = new Vector3(0f, -10f, 0f); } catch (Exception e) { Log.log(e.Message); } Log.log("Moved pirate ships"); try { GameMode.Instance.teamParents[4].GetComponent <ShipHealth>().ññçäîèäíñðó.transform.position = new Vector3(-46.5f, 4.5f, 23f); GameMode.Instance.teamParents[4].GetComponent <ShipHealth>().ññçäîèäíñðó.transform.eulerAngles = new Vector3(0f, 165f, 0f); GameMode.Instance.teamParents[6].GetComponent <ShipHealth>().ññçäîèäíñðó.transform.position = new Vector3(-25f, 4.5f, 44f); GameMode.Instance.teamParents[6].GetComponent <ShipHealth>().ññçäîèäíñðó.transform.eulerAngles = new Vector3(0f, 160f, 0f); } catch (Exception e) { Log.log(e.Message); } Log.log("Moved navy ships"); try { GameMode.Instance.teamParents[1].GetComponent <ShipHealth>().ññçäîèäíñðó.transform.eulerAngles = new Vector3(0f, 0f, 0f); GameMode.Instance.teamParents[1].GetComponent <ShipHealth>().ññçäîèäíñðó.transform.position = new Vector3(-26f, 9f, 4f); GameMode.Instance.teamParents[5].GetComponent <ShipHealth>().ññçäîèäíñðó.transform.eulerAngles = new Vector3(0f, 180f, 0f); GameMode.Instance.teamParents[5].GetComponent <ShipHealth>().ññçäîèäíñðó.transform.position = new Vector3(-36f, 9f, 35f); } catch (Exception e) { Log.log(e.Message); } Log.log("Setup big ships"); yield return(new WaitUntil(() => GameMode.Instance.votingOver)); started = true; Loaded = true; Log.log("Waiting complete!"); yield break; }