// Use this for initialization void Start() { this.rb = this.GetComponent <Rigidbody2D>(); this.sb = GetComponent <ShootBullet>(); this.lastShotTime = Time.time; // Doing this so that when a wave loads the player doesn't double shoot this.ui = uiPre.GetComponent <UIScript>(); this.LevelSel = GameObject.FindGameObjectWithTag("LevelSupervisor").GetComponent <LevelSupervisor>(); }
void Start() { this.sb = GetComponent <ShootBullet>(); this.rb = GetComponent <Rigidbody2D>(); //this.sr = GetComponent<SpriteRenderer>(); // Set center to where we currently are positioned this.enemyCollider = GetComponent <PolygonCollider2D>(); this.lk = GetComponent <MoveLeftKinematic>(); this.playerPosition = mainChar.GetComponent <Transform>(); this.levSup = GameObject.FindGameObjectWithTag("LevelSupervisor").GetComponent <LevelSupervisor>(); }
// Use this for initialization void Start() { this.ls = GameObject.FindGameObjectWithTag("LevelSupervisor").GetComponent <LevelSupervisor>(); this.levelDropDown.ClearOptions(); this.levelDropDown.AddOptions(new List <string>(new string[] { "-" })); for (int i = 0; i < this.ls.levelsAccessible.Count; i++) { if (this.ls.levelsAccessible[i]) { this.levelDropDown.AddOptions(new List <string>(new string[] { this.ls.levelNames[i] })); } } }