protected override void Hit(AbilityHitDetector projectile) { base.Hit(projectile); Debug.Log("hit " + projectile.velocity); Knockback(projectile.velocity, Mathf.Abs(projectile.ability.damage)); }
public override void OnUse(AbilityHitDetector AHD = null) { MeleeAbilityHitDetector MAHD = new GameObject().AddComponent <MeleeAbilityHitDetector>(); MAHD.Init(this, "Enemy", UsedBy.AimDirection); base.OnUse(MAHD); }
protected override void Hit(AbilityHitDetector projectile) { base.Hit(projectile); Knockback(projectile.velocity, Mathf.Abs(projectile.ability.damage)); Burrow(); }
public override void Trigger(AbilityHitDetector hitWith) { Debug.Log("Me"); hitDetector = hitWith; ((RangedAbilityHitDetector)hitDetector).HitSlave.StopAllCoroutines(); ((RangedAbilityHitDetector)hitDetector).HitSlave.StartCoroutine(PlayAnimation()); }
protected virtual void Hit(AbilityHitDetector projectile) { if (!invincible) { //ChangeHealth((int)projectile.ability.damage); //lastAttacker = projectile.ability.UsedBy.gameObject; } }
public override void OnUse(AbilityHitDetector AHD = null) { if (ready) { for (int i = 0; i < projectileCount; i++) { RangedAbilityHitDetector temp = new GameObject().AddComponent <RangedAbilityHitDetector>(); temp.Init(this, "Enemy", UsedBy.AimDirection, lifeTime); base.OnUse(temp); } } }
public virtual void OnHit(AbilityHitDetector attack, GameObject hit) { if (OnHitSound != string.Empty) { AudioManager.Instance.PlayAudioClip(OnHitSound); } InitOnHitEffects(); if (hit.tag == foeTag) { if (foeTag == "Enemy") { float lvl = UsedBy.gameObject.GetComponent <Player>().Level; int dmg; if (lvl > 1f) { dmg = (int)(damage * (1f + (((float)UsedBy.gameObject.GetComponent <Player>().Level * 10f) / 100f))); } else { dmg = (int)(damage); } hit.gameObject.GetComponent <Enemy>().lastAttacker = UsedBy.gameObject; hit.gameObject.GetComponent <Enemy>().ChangeHealth(-dmg); hit.gameObject.GetComponent <Enemy>().attacking = true; } else if (foeTag == "Player") { hit.gameObject.GetComponent <Player>().ChangeHealth(-(int)damage); } } for (int i = 0; i < OnHitEffectInstance.Count; i++) { if (hit == null) { OnHitEffectInstance[i].Trigger(attack); } else { OnHitEffectInstance[i].Trigger(attack, hit); } } }
public virtual void OnUse(AbilityHitDetector AHD = null) { if (OnUseSound != string.Empty) { AudioManager.Instance.PlayAudioClip(OnUseSound); } if (ready) { InitOnUseEffects(); Debug.Log("OnUseEffectInstance " + OnUseEffectInstance.Count); for (int i = 0; i < OnUseEffectInstance.Count; i++) { if (AHD != null) { OnUseEffectInstance[i].Trigger(AHD); } else { OnUseEffectInstance[i].Trigger(this); } } if (cooldown > 0) { if (CDC != null) { slave.StopCoroutine(CDC); } CDC = slave.StartCoroutine(CoolDownCoroutine()); if (OnAbilityUse != null) { OnAbilityUse(); } } } }
public override void Trigger(AbilityHitDetector hitWith, GameObject hit) { Debug.Log(debugText); }
public override void Trigger(AbilityHitDetector hitWith, GameObject hitTarget) { hitDetector = hitWith; ((RangedAbilityHitDetector)hitDetector).HitSlave.StopAllCoroutines(); ((RangedAbilityHitDetector)hitDetector).HitSlave.StartCoroutine(PlayAnimation()); }
public virtual void Trigger(AbilityHitDetector hitWith, GameObject hit) { }
public virtual void Trigger(AbilityHitDetector hitWith) { }