void Start() { youDiedSign = GameObject.Find("youDiedSign").GetComponent <SpriteRenderer> (); HideYouDied(); spriteRendererBull = GetComponent <SpriteRenderer> (); // we are accessing the SpriteRenderer that is attached to the Gameobject if (spriteRendererBull.sprite == null) // if the sprite on spriteRenderer is null then { spriteRendererBull.sprite = ryuSpriteIdle; // set the sprite to ryuSpriteIdle } lifeBarMorssi = GameObject.Find("lifeBarMorssiHealth"); mC = FindObjectOfType(typeof(MorssiController)) as MorssiController; if (firstRoundFighting) { // StartCoroutine (StartDelay ()); firstRoundFighting = false; } else if (!firstRoundFighting) { // StopCoroutine (StartDelay ()); // StopAllCoroutines (); } //StartCoroutine (bullDeathScript()); }
void Start() { ///Get object references lifeBarMorssi = GameObject.Find("lifeBarMorssiHealth"); mC = FindObjectOfType(typeof(MorssiController)) as MorssiController; youDiedSign = GameObject.Find("youDiedSign").GetComponent <SpriteRenderer> (); HideYouDied(); // hide the you died-sign on start spriteRendererBull = GetComponent <SpriteRenderer> (); if (spriteRendererBull.sprite == null) // if the sprite on spriteRenderer is null then { spriteRendererBull.sprite = ryuSpriteIdle; // set the sprite to ryuSpriteIdle } }
// Use this for initialization void Start() { ringSign = GameObject.Find("ringSign").GetComponent <SpriteRenderer> (); getReadySign = GameObject.Find("getReadySign").GetComponent <SpriteRenderer> (); bullControls = FindObjectOfType(typeof(FightController)) as FightController; bossControls = FindObjectOfType(typeof(MorssiController)) as MorssiController; if (firstRoundBossFight) { StartCoroutine(FirstRoundShowSign()); StopCoroutine(FirstRoundShowSign()); firstRoundBossFight = false; } else if (!firstRoundBossFight) { StopCoroutine(FirstRoundShowSign()); StartCoroutine(DelayBetweenRounds()); } }
void Start() { ///Get object references ringSign = GameObject.Find("ringSign").GetComponent <SpriteRenderer> (); getReadySign = GameObject.Find("getReadySign").GetComponent <SpriteRenderer> (); bullControls = FindObjectOfType(typeof(FightController)) as FightController; bossControls = FindObjectOfType(typeof(MorssiController)) as MorssiController; ///Coroutines to toggle instruction signs on the first round and showing a different sign afterwards if (firstRoundBossFight) { StartCoroutine(FirstRoundShowSign()); StopCoroutine(FirstRoundShowSign()); firstRoundBossFight = false; } else if (!firstRoundBossFight) { StopCoroutine(FirstRoundShowSign()); StartCoroutine(DelayBetweenRounds()); } }