// Use this for initialization void Awake() { Instance = this; shootFireBall = GetComponentInChildren <ShootFireBall> (); playerHealth = GetComponent <PlayerHealth> (); playerMana = GetComponent <PlayerMana> (); playerMovement = GetComponent <PlayerMovement> (); orbControl = GetComponentInChildren <OrbControl> (); skill1Text = Skill1.GetComponentsInChildren <Text> (); skill2Text = Skill2.GetComponentsInChildren <Text> (); skill3Text = Skill3.GetComponentsInChildren <Text> (); skill1Image = Skill1.GetComponentInChildren <Image> (); skill2Image = Skill2.GetComponentInChildren <Image> (); skill3Image = Skill3.GetComponentInChildren <Image> (); skill1Button = Skill1.GetComponent <Button> (); skill2Button = Skill2.GetComponent <Button> (); skill3Button = Skill3.GetComponent <Button> (); skillValues.Add(new KeyValuePair <string, int> ("Explosion Size", 1)); skillValues.Add(new KeyValuePair <string, int> ("FireBolt Damage", 1)); skillValues.Add(new KeyValuePair <string, int> ("FireBall", 0)); skillValues.Add(new KeyValuePair <string, int> ("Health Up", 1)); skillValues.Add(new KeyValuePair <string, int> ("Mana Up", 1)); skillValues.Add(new KeyValuePair <string, int> ("Mana Recovery Rate", 1)); skillValues.Add(new KeyValuePair <string, int> ("Walking Speed", 1)); skillText = new string[] { "Radius +0.5 \r\nMana Cost +0.1", "SpellDamage +10 \r\nManaCost +0.2", "New Skill: FireBall\r\nPress 1 to use", "Max Health +20", "Max Mana +20", "Recovery Rate +0.2", "Speed +0.2" }; eventAdded = false; currentLevel = 1; }
void Start() { Instance = this; // Get and store a reference to our AudioSource component spellAudio = GetComponent <AudioSource>(); playerMovement = GetComponentInParent <PlayerMovement> (); playerMana = GetComponentInParent <PlayerMana> (); anim = GetComponentInParent <Animator> (); timer = (float)fireRate; }
void Awake() { shootFireBall = GetComponentInChildren <ShootFireBall> (); shootFlameStike = GetComponentInChildren <ShootFlameStrike> (); }