/// <summary> /// Resets the boss for the next round /// </summary> /// <param name="totalReset">Whether to reset all of the boss' parameters</param> void ResetBoss(bool totalReset) { if (!boss) { boss = Instantiate(bossPrefab, Vector2.zero, Quaternion.identity); } DisableBoss(); if (totalReset) { boss.GetComponent <BossAction>().enabled = true; BossCollisionHandler col = boss.GetComponent <BossCollisionHandler>(); col.enabled = true; col.ResetHealth(); BossAnimFacilitator anim = boss.GetComponent <BossAnimFacilitator>(); anim.ResetState(); } }
float timeUntilDeactive; //time until deactivate after death // Use this for initialization void Start() { anim = GetComponent <BossAnimFacilitator>(); }