//public GameObject _player; // Use this for initialization void Start() { // Make a reference with the Transform Component this._transform = gameObject.GetComponent <Transform>(); this._initialPositionX = this._transform.position.x; this._WarCryGameController = GameObject.Find("WarCryGameContoller").GetComponent <WarCryGameController> (); // Reset the bullets` Sprite to the Top //this.Reset (); }
private void _initialize() { this._transform = gameObject.GetComponent <Transform> (); this._WarCryGameController = GameObject.Find("WarCryGameContoller").GetComponent <WarCryGameController> (); //initialize the audio sources array this.audioSources = gameObject.GetComponents <AudioSource> (); this.coins = this.audioSources [1]; this.blast = this.audioSources [0]; }
// Use this for initialization void Start() { this._transform = gameObject.GetComponent <Transform> (); //initialize the audio sources array //this.audioSources = gameObject.GetComponents<AudioSource> (); //this.music = this.audioSources [0]; //this.music.Play (); this._warCryGameController = GameObject.Find("WarCryGameContoller").GetComponent <WarCryGameController> (); this._warCryGameController.BkgRestCount = 0; this.Reset(); //this._bkgResetCount = 0; }
//PRIVATE METHODS private void _initiallizeObjects() { Instantiate(this._playerController.gameObject); this.bossLifeLabel.gameObject.SetActive(false); this._bossLifeLine = 10; this._warCryGameController = GameObject.Find("WarCryGameContoller").GetComponent <WarCryGameController> (); this._warCryGameController.levelLabel.text = "Level: 3"; //this._playerController = GameObject.Find ("player").GetComponent<player> (); for (int i = 0; i < 2; i++) { Instantiate(this.miniEnemys); } }
// Use this for initialization void Start() { // Make a reference with the Transform Component this._transform = gameObject.GetComponent <Transform> (); // Reset the Ocean Sprite to the Top this.Reset(); //initialize the audio sources array this.audioSources = gameObject.GetComponents <AudioSource> (); this._warCryGameController = GameObject.Find("WarCryGameContoller").GetComponent <WarCryGameController> (); this._warCryGameController.levelLabel.text = "Level: 1"; this.music = this.audioSources [0]; this.music.Play(); //Initialize this._bkgResetCount = 0; }