// Use this for initialization void Start() { _thisStartPosition = this.gameObject.transform.position; _check = GameObject.FindObjectOfType<CheckForMusicScript>(); if (_check.Check == true) { _arrowHit = GameObject.Find("ArrowHit").GetComponent<AudioSource>(); } }
// Use this for initialization void Start() { _check = GameObject.FindObjectOfType<CheckForMusicScript>(); if (_check.Check == true) { _hit1 = GameObject.Find("CannonShoot1").GetComponent<AudioSource>(); _hit2 = GameObject.Find("CannonShoot2").GetComponent<AudioSource>(); _hit3 = GameObject.Find("CannonShoot3").GetComponent<AudioSource>(); } }
// Use this for initialization void Start() { _check = GameObject.FindObjectOfType<CheckForMusicScript>(); if (_check.Check == true) { _hit = GameObject.Find("SlowHit").GetComponent<AudioSource>(); } _speedTime = CountTimerScript.AddSeconds(_speedTime); }
// Use this for initialization void Start() { _baseScript = GameObject.FindObjectOfType<BaseScript>(); _resumeButton = GameObject.Find("ResumeButton"); _quitButton = GameObject.Find("QuitButton"); _backGround = GameObject.Find("OverlayPause"); _pauseButton = GameObject.Find("PauseButton"); _ScoreScreenScript = GameObject.Find("ScoreScreen").GetComponent<ScoreScreenScript>(); _radialMenu = GameObject.FindObjectOfType<BuildingSpawnScript>().gameObject; _check = GameObject.FindObjectOfType<CheckForMusicScript>(); _hud = GameObject.Find("HUD"); _tutorialScript = GameObject.FindObjectOfType<TutorialMainScript>(); if (_check.Check == true)_map = GameObject.FindObjectOfType<DontDestroyOnLoadMusicScript>(); }
// Use this for initialization //Load all the Variables and Prepare the Radial Menu void Start() { //Get all the prefabs of the Idle towers level 1 _towerArrowIdle = (GameObject)Resources.Load("Towers/TreeIdleLevel1"); _towerCannonIdle = (GameObject)Resources.Load("Towers/TrollIdleLevel1"); _towerSpiderIdle = (GameObject)Resources.Load("Towers/SpiderIdleLevel1"); _check = GameObject.FindObjectOfType<CheckForMusicScript>(); _tileMap = FindObjectOfType<TileMapScript>(); _baseScript = GameObject.FindObjectOfType<BaseScript>(); _calculateEverything(); //Check if there is audio source and get all the sources if (_check.Check == true) { _troll1 = GameObject.Find("Troll1").GetComponent<AudioSource>(); _troll2 = GameObject.Find("Troll2").GetComponent<AudioSource>(); _spider1 = GameObject.Find("Spider1").GetComponent<AudioSource>(); _spider2 = GameObject.Find("Spider2").GetComponent<AudioSource>(); _tree1 = GameObject.Find("Tree1").GetComponent<AudioSource>(); _tree2 = GameObject.Find("Tree2").GetComponent<AudioSource>(); } }
//AUDIOSOURCE NEEDS TO BE CHANGED // Use this for initializations void Start() { _thisPosition = this.gameObject.transform.position; _bullet = (GameObject)Resources.Load("SlowBullet"); _check = GameObject.FindObjectOfType<CheckForMusicScript>(); _thisPosition = this.gameObject.transform.position; if (_check.Check == true) { _shoot = GameObject.Find("SlowShoot").GetComponent<AudioSource>(); _spider3 = GameObject.Find("Spider3").GetComponent<AudioSource>(); _spider4 = GameObject.Find("Spider4").GetComponent<AudioSource>(); _spider5 = GameObject.Find("Spider5").GetComponent<AudioSource>(); _spider6 = GameObject.Find("Spider6").GetComponent<AudioSource>(); _spider7 = GameObject.Find("Spider7").GetComponent<AudioSource>(); } _slowTime = _slowTimeTier1; _range = _rangeTier1; _rateOfFire = _rateOfFireTier1; _slowAmount = _slowAmountTier1; }
// Use this for initialization void Start() { //Get the prefabs _towerCannonAttackLevel1 = (GameObject)Resources.Load("Towers/TrollAttackLevel1"); _towerCannonAttackLevel2 = (GameObject)Resources.Load("Towers/TrollAttackLevel2"); _towerCannonAttackLevel3 = (GameObject)Resources.Load("Towers/TrollAttackLevel3"); //_towerCannonIdleLevel1 = (GameObject)Resources.Load("Towers/TrollIdleLevel1"); _towerCannonIdleLevel2 = (GameObject)Resources.Load("Towers/TrollIdleLevel2"); _towerCannonIdleLevel3 = (GameObject)Resources.Load("Towers/TrollIdleLevel3"); _thisPosition = this.gameObject.transform.position; _bullet = (GameObject)Resources.Load("CannonBullet"); _check = GameObject.FindObjectOfType<CheckForMusicScript>(); if (_check.Check == true) { _cannonFire = GameObject.Find("CannonHit").GetComponent<AudioSource>(); _troll3 = GameObject.Find("Troll3").GetComponent<AudioSource>(); _troll4 = GameObject.Find("Troll4").GetComponent<AudioSource>(); _troll5 = GameObject.Find("Troll5").GetComponent<AudioSource>(); _troll6 = GameObject.Find("Troll6").GetComponent<AudioSource>(); _troll7 = GameObject.Find("Troll7").GetComponent<AudioSource>(); } _damage = _damageTier1; _range = _rangeTier1; _rateOfFire = _rateOfFireTier1; }
// Use this for initializations void Start() { _tileX = (int)gameObject.transform.position.x; _tileY = (int)gameObject.transform.position.y; _thisPosition = this.gameObject.transform.position; _bullet = (GameObject)Resources.Load("ArrowBullet"); _check = GameObject.FindObjectOfType<CheckForMusicScript>(); _thisPosition = this.gameObject.transform.position; if (_check.Check == true) { _shoot1 = GameObject.Find("ArrowShoot1").GetComponent<AudioSource>(); _shoot2 = GameObject.Find("ArrowShoot2").GetComponent<AudioSource>(); _shoot3 = GameObject.Find("ArrowShoot3").GetComponent<AudioSource>(); _tree3 = GameObject.Find("Tree3").GetComponent<AudioSource>(); _tree4 = GameObject.Find("Tree4").GetComponent<AudioSource>(); _tree5 = GameObject.Find("Tree5").GetComponent<AudioSource>(); _tree6 = GameObject.Find("Tree6").GetComponent<AudioSource>(); _tree7 = GameObject.Find("Tree7").GetComponent<AudioSource>(); } _rateOfFire = _rateOfFireTier1; _damage = _damageTier1; _range = _rangeTier1; }