void Awake() { if (instance != null) { Destroy(instance.gameObject); } instance = this; }
public void die() { MayaMove MayaS = Maya.GetComponent <MayaMove>(); MayaS.money += money; if (MayaS.XP + XP >= MayaS.xpNextLvl) { MayaS.LevelUp(XP); } else { MayaS.XP += XP; } }
void Start() { fireball = FindObjectOfType <SingleTargetSpell>(); aoeSpell = FindObjectOfType <Spell>(); fireShield = FindObjectOfType <FireShield>(); healSpell = FindObjectOfType <HealSpell>(); // fireball.addSpell(1); // aoeSpell.addSpell(2); // fireShield.addSpell(3); // healSpell.addSpell(4); FireballLvl = 0; HealLvl = 0; BurstballLvl = 0; FirewalkLvl = 0; FirearmorLvl = 0; FirespikeLvl = 0; MayaS = GetComponent <MayaMove>(); SpellsCanvas.enabled = false; }
// Use this for initialization void Start() { MayaS = GetComponent <MayaMove>(); StatsCanvas.alpha = 0f; }