Пример #1
0
        public virtual void Start(Vector2 target, GameObject parent)
        {
            Vector2 direction = target - parent.transform.position;

            direction.Normalize();

            GetComponent <Navigation.ProjectileMovementComponent>().Direction = direction;
            GetComponent <Navigation.ProjectileMovementComponent>().Velocity  = speed;

            Damage = new Gameplay.DamageInfo(parent, baseDamage);
        }
Пример #2
0
 private void Die(Gameplay.Health damaged, Gameplay.DamageInfo damageInfo)
 {
     SpawnCorpse();
     Destroy();
 }
Пример #3
0
 private void OnDamage(Gameplay.Health damaged, Gameplay.DamageInfo damageInfo)
 {
     hitSFX.Stop();
     hitSFX.Play();
 }
Пример #4
0
 public void Refresh(Gameplay.Health damaged, Gameplay.DamageInfo dmgInfo)
 {
     SetValue(damaged.GetPercentage());
 }