public void StartTyphoon() { //Dung Crest cloud on slam if (PlayerData.instance.equippedCharm_10) { HP_Prefabs.SpawnObjectFromDictionary("Knight Dung Cloud", HeroController.instance.transform.position + new Vector3(0, 0, -.001f), Quaternion.identity); } typhoonTimer = 25f; }
public void OnDestroy() { Destroy(Instantiate(HP_Prefabs.bulletFadePrefab, gameObject.transform.position, gameObject.transform.localRotation), 0.03f); //bullet fade out sprite if (specialAttrib.Contains("Explosion") && PlayerData.instance.equippedCharm_17) { HP_Prefabs.prefabDictionary.TryGetValue("Knight Spore Cloud", out GameObject sporeCloud); GameObject sporeCloudGO = Instantiate(sporeCloud, gameObject.transform.position + new Vector3(0, 0, -.001f), Quaternion.identity); sporeCloudGO.SetActive(true); } if (specialAttrib.Contains("DungExplosion")) { HP_Prefabs.prefabDictionary.TryGetValue("Dung Explosion", out GameObject dungExplosion); GameObject dungExplosionGO = Instantiate(dungExplosion, gameObject.transform.position + new Vector3(0, 0, -.001f), Quaternion.identity); dungExplosionGO.SetActive(true); dungExplosionGO.name += " KnightMadeDungExplosion"; if (specialAttrib.Contains("Small")) { dungExplosionGO.transform.localScale = new Vector3(0.75f, 0.75f, 0); } } //If its from a grenade launch or a offensive fire support projectile, make it explode else if (gameObject.GetComponent <HP_BulletBehaviour>().specialAttrib.Contains("Explosion") || isFireSupportBullet) { GameObject explosionClone = HP_Prefabs.SpawnObjectFromDictionary("Gas Explosion Recycle M", gameObject.transform.position + new Vector3(0, 0, -.001f), Quaternion.identity); explosionClone.name += " KnightMadeExplosion"; //Shrinks the explosion when its not a fire support bullet or its not an upgraded vengeful, as a nerf/downgrade if (isFireSupportBullet) { HP_SpellControl.PlayAudio("mortarexplosion", true); } else if (PlayerData.instance.fireballLevel > 1) { explosionClone.transform.localScale = new Vector3(1.3f, 1.3f, 0); } else { explosionClone.transform.localScale = new Vector3(0.7f, 0.7f, 0); } } }