void Start() { // stats manager currentHP = HPLevels[1]; // start HP stats for level 1 currentMP = MPLevels[1]; // start MP stats for level 1 currentAttack = attackLevels[1]; // start Attack stats for level 1 currentDefense = defenseLevels[1]; // start Defense stats for level 1 // link legion stats to legion health manager legionHealth = FindObjectOfType <LegionHealthManager>(); // show player leveling up(getting yellow) legionSprite = GetComponent <SpriteRenderer>(); }
void Start() { // game over screen theLHM = FindObjectOfType <LegionHealthManager>(); gameOverScreen.SetActive(false); // avoid UI bar duplicates DontDestroyOnLoad(transform.gameObject); if (!UIBarsExists) { UIBarsExists = true; DontDestroyOnLoad(transform.gameObject); } else { Destroy(gameObject); } }
void Start() { anim = GetComponent <Animator>(); myRigidbody = GetComponent <Rigidbody2D>(); // use magic points from healthmanager legionHealth = FindObjectOfType <LegionHealthManager>(); // change areas, appear where we want, avoid duplicates if (!legionExists) { legionExists = true; DontDestroyOnLoad(transform.gameObject); } else { Destroy(gameObject); } // allow movement after dialogue canMove = true; }
void Start() { legionHealth = FindObjectOfType <LegionHealthManager>(); sfxController = FindObjectOfType <SFXController>(); }