//what happens when certain enemy dies public override void Die() { if (tag == "Boss") { SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex + 1); } else { base.Die(); if (tag == "SpiderQueen") { ObjectivesManager.instance.DrawText("Find the portal."); } // death animation if (ragdoll != null) { GetComponent <CharacterAnimator>().isActive = false; ragdoll.Setup(); } else { animator.SetTrigger("dead"); } StartCoroutine(DestroyObject(30)); enemyController.active = false; enemy.radius = 0f; //loot LootManager lootManager = GetComponent <LootManager>(); lootManager.DropLoot(); } }
void Die() { ragdoll.transform.parent = null; ragdoll.Setup(); Destroy(gameObject); youWin.SetActive(true); }
void Die() { deathPoint = enemyPoint.position; deathPoint = new Vector3(deathPoint.x, deathPoint.y + .5f, deathPoint.z); Instantiate(lootObject, deathPoint, Quaternion.identity); ragdoll.transform.parent = null; ragdoll.Setup(); Destroy(gameObject); }
void Die() { ragdoll.transform.parent = null; ragdoll.Setup(); Destroy(gameObject); if (GameObject.FindWithTag("Boss")) { anim.Play("Die"); } }
private void OnEnable() { type = Random.Range(0, 3); if (type <= 0) { anim.SetBool("Melee", true); } else { if (type <= 1) { anim.SetBool("Rifle", true); rifle.SetActive(true); } else { anim.SetBool("Pistol", true); pistol.SetActive(true); } } ragdoll.Setup(); }
void Die() { ragdoll.transform.parent = null; ragdoll.Setup(); Destroy(gameObject); }