// Use this for initialization void Start() { RS = GameObject.Find("RespawnObject").GetComponent <RespawnScript>(); Stats = GameObject.Find("TotalStatsHolder").GetComponent <EndGameStatsScript>(); ES = GameObject.Find("EternalHolder").GetComponent <EternalScript> (); WinText = GameObject.Find("WinTextObj").GetComponent <Text>(); WarBarP1 = GameObject.Find("KillBarP1").GetComponent <Image> (); WarBarP2 = GameObject.Find("KillBarP2").GetComponent <Image> (); WarBarP3 = GameObject.Find("KillBarP3").GetComponent <Image> (); WarBarP4 = GameObject.Find("KillBarP4").GetComponent <Image> (); WarBarP1.color = ES.GetColor(0); WarBarP2.color = ES.GetColor(1); WarBarP3.color = ES.GetColor(2); WarBarP4.color = ES.GetColor(3); WarBarP1.fillAmount = 0; WarBarP2.fillAmount = 0; WarBarP3.fillAmount = 0; WarBarP4.fillAmount = 0; P1Kills = 0; P2Kills = 0; P3Kills = 0; P4Kills = 0; KillsToWin = ES.GetKillNumber(); WinText.text = ""; WinText.enabled = false; // temporary dev tool KillsToWin = 10; }
// Use this for initialization void Start() { SPS = GameObject.Find("SoundObject").GetComponent <SoundPlayerScript> (); PCS = GetComponent <PlayerControlScript> (); ES = GameObject.Find("EternalHolder").GetComponent <EternalScript> (); SpriteColor = GetComponent <SpriteRenderer> (); CurrentColor = ES.GetColor(PCS.GetPlayerNum()); SpriteColor.color = CurrentColor; Stats = GameObject.Find("TotalStatsHolder").GetComponent <EndGameStatsScript>(); }
// Use this for initialization void Start() { CCS = GameObject.Find("Main Camera").GetComponent <CameraControllerScript>(); PCS = GetComponent <PlayerControlScript> (); PlayerColor = GetComponent <SpriteRenderer> ().color; RHS = GameObject.Find("WinTextObj").GetComponent <RoundHandlerScript> (); BoarderColor = HitBoarder.color; SPS = GameObject.Find("SoundObject").GetComponent <SoundPlayerScript> (); Stats = GameObject.Find("TotalStatsHolder").GetComponent <EndGameStatsScript>(); ES = GameObject.Find("EternalHolder").GetComponent <EternalScript> (); Invincible = true; bulletNumbers = new int[4]; for (int x = 0; x < 4; x++) { bulletNumbers[x] = -1; } Invoke("RemoveIncincible", 2f); }