public override void ExplodeEffect(MapTile landingTile) { var grenade = new Equipments.Utilities.Grenades.SmokeGrenade(); var aoeTile = ThrowTarget.FindAOETiles(landingTile.UiTile, grenade.BlastAreaOfEffect, grenade.ShrapnelAreaOfEffect); foreach (var mapTile in aoeTile.Item1) { mapTile.CreateProp(Resources.Load("Prefabs/Battle/Map/Props/SmokeEffect", typeof(GameObject)) as GameObject); } //AbilityPause.StartPause(1.5F, this, "EndAbility"); }
public override void ExplodeEffect(MapTile landingTile) { var grenade = new Equipments.Utilities.Grenades.FragGrenade(); var aoeTile = ThrowTarget.FindAOETiles(landingTile.UiTile, grenade.BlastAreaOfEffect, grenade.ShrapnelAreaOfEffect); foreach (var mapTile in aoeTile.Item1) { if (mapTile.GetUnitInTile()) { mapTile.GetUnitInTile().PopUpText(grenade.BlastDamage.ToString()); mapTile.GetUnitInTile().TakeDamage(grenade.BlastDamage); } } foreach (var mapTile in aoeTile.Item2) { if (mapTile.GetUnitInTile()) { mapTile.GetUnitInTile().PopUpText(grenade.ShrapnelDamage.ToString()); mapTile.GetUnitInTile().TakeDamage(grenade.ShrapnelDamage); } } landingTile.UiTile.AddComponent <AudioSource>().PlayOneShot(grenade.ExplosionAudio); }