private void HealAllies() { List <Unit> playerUnits = this.UnitsMap.GetUnits(Type.Player); playerUnits.ForEach(unit => unit.Health.IncreaseHealth(this.DeltaHealth)); playerUnits.ForEach(unit => SkillActionFX.Play(unit.gameObject.transform.position)); }
private void PlayParticles(Point target) { Quaternion direction = RotationHelper.GetRotation(cardinalDirectionToRotate); Unit.FlipUnit(cardinalDirection); SkillActionFX?.Play(this.Unit.transform.position); SkillActionFX.UpdateParticlesRotation(direction); pukeSFx?.Play(this.transform.position); }
protected override void AttackPositions(Point point) { base.AttackPositions(point); if (!UnitsMap.Contains(point)) { return; } SkillActionFX?.Play(UnitsMap.Get(point).gameObject.transform.position); }
public override void Execute() { SkillActionFX?.Play(this.transform.position); if (extrude) { Extrude(); } else { SuckIn(); } }
private IEnumerator ShotTrajectory() { Vector3 destination = PointConverter.ToVector(this.Target); float progress = 0; var startPos = PointConverter.ToVector(this.Unit.GetPosition()); SkillActionFX.Play(startPos); while (progress <= 1.0) { progress += Time.deltaTime / shotSpeed; var height = Mathf.Sin(Mathf.PI * progress) * shotHeight; if (height < 0f) { height = 0f; } SkillActionFX.UpdateParticlesPosition(Vector3.Lerp(startPos, destination, progress) + Vector3.up * height); yield return(null); } AttackTarget(); SkillActionFX.UpdateParticlesPosition(destination); SkillActionFX.DestroyInstance(); }
public new void Execute(Point point) { SkillActionFX?.Play(this.transform.position); }