private int protection = 0; //Variable which is changed when upgrading equipped shield void Start() { if (wrahh == null) //Function which prevents stack Overflow { wrahh = new Wrahh(); } }
//Created so that when wrahh dies and the game is restarted a new HUD containing the "new" Wrahhs stats will appear void OnLevelWasLoaded(int level) { if (level == 1){ //player variable will contain the Wrahh currently located in the scene player = GameObject.FindWithTag("Player").gameObject.GetComponent<Wrahh>(); } }
void Start() { if (wrahh == null) { wrahh = GameObject.FindWithTag("Player").AddComponent <Wrahh>(); } }
//Created so that when wrahh dies and the game is restarted a new HUD containing the "new" Wrahhs stats will appear void OnLevelWasLoaded(int level) { if (level == 1) { //player variable will contain the Wrahh currently located in the scene player = GameObject.FindWithTag("Player").gameObject.GetComponent <Wrahh>(); } }
void Start() { //The player variable containing an instance of wrahh has the current wrahh in the scene player = GameObject.FindWithTag("Player").gameObject.GetComponent<Wrahh>(); }
void Start() { if(wrahh == null) //Function which prevents stack Overflow wrahh = new Wrahh(); }
void Start() { if(wrahh == null) wrahh = GameObject.FindWithTag("Player").AddComponent<Wrahh>(); }
void Start() { //The player variable containing an instance of wrahh has the current wrahh in the scene player = GameObject.FindWithTag("Player").gameObject.GetComponent <Wrahh>(); }