예제 #1
0
        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));
        }
예제 #2
0
        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);
        }
예제 #3
0
        protected override void AttackPositions(Point point)
        {
            base.AttackPositions(point);
            if (!UnitsMap.Contains(point))
            {
                return;
            }

            SkillActionFX?.Play(UnitsMap.Get(point).gameObject.transform.position);
        }
예제 #4
0
 public override void Execute()
 {
     SkillActionFX?.Play(this.transform.position);
     if (extrude)
     {
         Extrude();
     }
     else
     {
         SuckIn();
     }
 }
예제 #5
0
        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);
 }