// Start is called before the first frame update void Start() { persistentSFXGameObject = GameObject.Find("PersistentSFX"); persistentSFX = persistentSFXGameObject.GetComponent <PersistentSFX>(); audioForThisLevelContainer = GameObject.Find("MusicForThisLevel"); audioForThisLevel = audioForThisLevelContainer.GetComponent <AudioForThisLevel>(); player = GameObject.FindWithTag("Player"); levelManager = GameObject.Find("LevelManager"); fadeInTweenContainer = GameObject.FindWithTag("FadeInTweener"); fadeInTweener = fadeInTweenContainer.GetComponent <DOTweenVisualManager>(); fadeOutTweenContainer = GameObject.FindWithTag("FadeOutTweener"); fadeOutTweener = fadeOutTweenContainer.GetComponent <DOTweenVisualManager>(); fadeInTweener.enabled = true; fadeOutTweener.enabled = false; _gameHandler = GameObject.FindWithTag("GameHandler"); gameHandler = _gameHandler.GetComponent <GameHandler>(); audioForThisLevel.PlayMusicForThisLevel(); }
void Start() { persistentSFXGameObject = GameObject.Find("PersistentSFX"); persistentSFX = persistentSFXGameObject.GetComponent <PersistentSFX>(); jingleBellGameObject = GameObject.Find("jingleBell"); jingleBellEquip = jingleBellGameObject.GetComponent <EquipItem>(); marbles = 0; brambleStones = 0; essence = 0; jingleBell = false; // get panel object for each pickip // get TMP for each pickup from hud object // set TMP using pickup value marblePanel = GameObject.Find("marblePanel"); brambleStonePanel = GameObject.Find("bramblePanel"); essencePanel = GameObject.Find("essencePanel"); marbleCountTMP = marblePanel.GetComponentInChildren <TextMeshProUGUI>(); brambleStoneCountTMP = brambleStonePanel.GetComponentInChildren <TextMeshProUGUI>(); essenceCountTMP = essencePanel.GetComponentInChildren <TextMeshProUGUI>(); }
// Start is called before the first frame update void Start() { persistentSFXGameObject = GameObject.Find("PersistentSFX"); persistentSFX = persistentSFXGameObject.GetComponent <PersistentSFX>(); anim = GetComponentInParent <Animator>(); // this might need to be getcomponentinchildren // DOTween.Init(autoKillMode, useSafeMode, logBehaviour); }
void Start() { persistentSFXGameObject = GameObject.Find("PersistentSFX"); persistentSFX = persistentSFXGameObject.GetComponent <PersistentSFX>(); bombTimer = 15; Invoke("Explode", bombTimer); }
void Start() { persistentSFXGameObject = GameObject.Find("PersistentSFX"); persistentSFX = persistentSFXGameObject.GetComponent <PersistentSFX>(); if (this.tag == "FrogBoss") { damageValue = 40; } else { damageValue = 10; } }
public void Start() { frogBossDead = false; persistentSFXGameObject = GameObject.Find("PersistentSFX"); persistentSFX = persistentSFXGameObject.GetComponent <PersistentSFX>(); pauseMenuOn = false; hudOn = false; pauseTweens = GameObject.Find("PauseMoveIn"); hudTweens = GameObject.Find("HUDMoveIn"); pauseTweenManager = pauseTweens.GetComponent <DOTweenVisualManager>(); hudTweenManager = hudTweens.GetComponent <DOTweenVisualManager>(); }
public void Start() { _gameHandler = GameObject.FindWithTag("GameHandler"); gameHandler = _gameHandler.GetComponent <GameHandler>(); _portalState = GameObject.FindWithTag("PortalHandler"); portalState = _portalState.GetComponent <PortalState>(); persistentSFXGameObject = GameObject.Find("PersistentSFX"); persistentSFX = persistentSFXGameObject.GetComponent <PersistentSFX>(); DOTween.Init(); levelManager = GameObject.Find("LevelManager"); fadeInTweenContainer = GameObject.FindWithTag("FadeInTweener"); fadeInTweener = fadeInTweenContainer.GetComponent <DOTweenVisualManager>(); fadeOutTweenContainer = GameObject.FindWithTag("FadeOutTweener"); fadeOutTweener = fadeOutTweenContainer.GetComponent <DOTweenVisualManager>(); hostileBrain = this.GetComponentInChildren <HostileBrain>(); //healthMax = 100; containerHealth = 20; enemyHealth = 50; playerHealth = 100; critterHealth = 10; foliageHealth = 15; frogBossHealth = 100; chaosVillagerHealth = 30; respawnPos = new Vector3(0, 0, 0); if (this.tag == "Player") { health = playerHealth; //anim = gameObject.GetComponent<Animator>(); anim = gameObject.GetComponentInChildren <Animator>(); if (anim == null) { //anim = gameObject.GetComponentInChildren<Animator>(); Debug.Log("Error: Did not find anim!"); } else { //Debug.Log("Got anim"); } } if (this.tag == "Foliage") { health = foliageHealth; } if (this.tag == "Enemy") { health = enemyHealth; anim = gameObject.GetComponent <Animator>(); if (anim == null) { Debug.Log("Error: Did not find anim!"); } else { //Debug.Log("Got anim"); } } if (this.tag == "Container") { health = containerHealth; } if (this.tag == "Critter") { health = critterHealth; anim = gameObject.GetComponent <Animator>(); if (anim == null) { Debug.Log("Error: Did not find anim!"); } else { //Debug.Log("Got anim"); } } if (this.tag == "FrogBoss") { health = frogBossHealth; animContainer = GameObject.Find("chaosFrog"); anim = animContainer.GetComponent <Animator>(); if (anim == null) { Debug.Log("Error: Did not find anim!"); } else { //Debug.Log("Got anim"); } } if (this.tag == "ChaosVillager") { health = chaosVillagerHealth; anim = this.GetComponentInChildren <Animator>(); if (anim == null) { Debug.Log("Error: Did not find anim!"); } else { //Debug.Log("Got anim"); } } }