private float armor; //Current armor will be stored here // Use this for initialization void Start() { if (!isLocalPlayer) { return; } GameObject.Find("Main Camera").GetComponent <JustinCameraFollow> ().target = gameObject.transform; health = maxHealth; armor = 0; score = GameObject.Find("Highscore").GetComponent <JustinHighscore>(); JustinReference r = GameObject.Find("ReferencePoint").GetComponent <JustinReference>(); mainGame = r.mainMenu; gameOver = r.gameOver; if (GameObject.Find("Player(Clone)") != null) { gameOver = r.gameOverNetwork; } if (transform.gameObject.tag == "Player") { healthDisplay = GameObject.Find("Green Health Bar").GetComponent <JustinHealthBar>(); } if (healthDisplay != null) { healthDisplay.maxHealth = maxHealth; healthDisplay.currentHealth = health; } }
private float armor; //Current armor will be stored here // Use this for initialization void Start() { health = maxHealth; armor = 0; score = GameObject.Find("Highscore").GetComponent <JustinHighscore>(); JustinReference r = GameObject.Find("ReferencePoint").GetComponent <JustinReference>(); mainGame = r.mainMenu; gameOver = r.gameOver; if (transform.gameObject.tag == "Player") { PlayerPrefs.SetInt("Kills", 0); healthDisplay = GameObject.Find("Green Health Bar").GetComponent <JustinHealthBar>(); } if (healthDisplay != null) { healthDisplay.maxHealth = maxHealth; healthDisplay.currentHealth = health; } }
private JustinHighscore score; //The actual score component of the game // Use this for initialization void Start() { score = GameObject.Find("Highscore").GetComponent <JustinHighscore>(); }