void Awake() { i = this; ostats = this.GetComponent <ThingStats>(); foreach (ParticleSystem par in EyeParts) { par.enableEmission = false; } }
void Awake() { i = this; ostats = this.GetComponent<ThingStats>(); foreach (ParticleSystem par in EyeParts) { par.enableEmission = false; } }
void DrawGUI(Rect outside) { GUI.color = new Color(1, 1, 1, 0.3f); GUI.DrawTexture(DrawInside(outside, new Rect(Screen.width / 2 - 100 / 2, 10, 100, 40)), PointsBG); GUI.color = new Color(1, 1, 1, 1f); GUI.Box(DrawInside(outside, new Rect(Screen.width / 2 - 100 / 2, 10, 100, 40)), points.ToString()); if (winnrar) { if (GUI.Button(DrawInside(outside, new Rect(Screen.width / 2 - WinTexture.width / 2, Screen.height / 2 - WinTexture.height / 2, WinTexture.width, WinTexture.height)), WinTexture)) { if (wintimebuttonpoop < Time.time) { Screen.showCursor = false; Playerton.points = 0; Application.LoadLevel(0); } } return; } if (OctoGun.i != null) { //Debug.Log(OctoGun.HPPercent()); GUI.DrawTexture(DrawInside(outside, new Rect(Screen.width / 2 - 1005 / 2, 60, 1005, 131)), HPBar); //player GUI.DrawTexture(DrawInside(outside, new Rect(Screen.width / 2 - 1005 / 2 + 181, 62, this.hpperc() * 320, 59)), HealthTexture); //octo float octowidth = OctoGun.HPPercent() * 320; GUI.DrawTexture(DrawInside(outside, new Rect(Screen.width / 2 + 1005 / 2 - 181 - octowidth, 62, octowidth, 59)), HealthTexture); } if (deaded) { Screen.lockCursor = false; Screen.showCursor = true; if (GUI.Button(DrawInside(outside, new Rect(Screen.width / 2 - 800 / 2, Screen.height / 2 - 400 / 2, 800, 400)), RestartTexture)) { Screen.showCursor = false; Playerton.points = 0; Application.LoadLevel(0); } } }