/// <summary> /// Function that adds a hitsplat to the portrait /// </summary> /// <param name="details">The details needed to customize the splat.</param> private void AddHitsplat(SplatDetails details) { if (PortraitView != null && PortraitView.isActiveAndEnabled) { PortraitView.StartCoroutine(SFX.DoHitSplat(Character, details)); } }
/// <summary> /// Forces the spell. /// </summary> /// <param name="current">The current page.</param> /// <param name="caster">The caster.</param> /// <param name="target">The target.</param> /// <returns></returns> public Spell ForceSpell(Page current, Character caster, Character target) { Result res = new Result(); if (IsHit(caster, target)) { res.AddSFX(GetHitSFX(caster, target)); if (IsCritical(caster, target)) { res.Type = ResultType.CRITICAL; res.AddEffects(GetCriticalEffects(current, caster, target)); } else { res.Type = ResultType.HIT; res.AddEffects(GetHitEffects(current, caster, target)); } } else { res.AddSFX(GetMissSFX(caster, target)); res.AddSFX(SFX.DoHitSplat(target, new SplatDetails(Color.grey, "MISS!"))); res.Type = ResultType.MISS; res.AddEffects(GetMissEffects(current, caster, target)); } return(new Spell(this, res, caster, target)); }
/// <summary> /// Function that adds a hitsplat to the portrait /// </summary> /// <param name="details">The details needed to customize the splat.</param> private void AddHitsplat(SplatDetails details) { if (portrait != null && portrait.isActiveAndEnabled) { portrait.StartCoroutine(SFX.DoHitSplat(character, details)); } }