protected virtual void EnemyCustomAttack() { Attack_helper(); enemyAnimationUpdater.RangedAttack(rangedAnimation); AmmoMaster AM_temp = fireProjectile(CustomAngle()).GetComponent <AmmoMaster>(); AM_temp.Setup(ReturnFinalDamage(damage), dt_in: DT); AM_temp.AdditionalNPCSetup(ETM.Return_FactionEnum(), FL, ETM.Return_customReputation()); }
protected override void EnemyCustomAttack() { float spread = Random.Range(-SpreadAngle_half, SpreadAngle_half); Attack_helper(); enemyAnimationUpdater.RangedAttack(rangedAnimation); AmmoMaster AM_temp = fireProjectile(CustomAngle() + spread).GetComponent <AmmoMaster>(); AM_temp.Setup(ReturnFinalDamage(damage), dt_in: DT); AM_temp.AdditionalNPCSetup(ETM.Return_FactionEnum(), FL, ETM.Return_customReputation()); }
public override void AnimationTriggerAttack() //Can be overwritten { if (EnemyWeapon) { AmmoMaster AM_temp = fireProjectile(CustomAngle()).GetComponent<AmmoMaster>(); AM_temp.Setup(ReturnFinalDamage(damage), dt_in: DT); AM_temp.AdditionalNPCSetup(ETM.Return_FactionEnum(), FL, ETM.Return_customReputation()); } else { fireProjectile(CustomAngle()).GetComponent<AmmoMaster>().Setup(ReturnFinalDamage(damage), dt_in: DT); } }
private void OnTriggerExit(Collider other) { if (other.tag == "Player") { if (FL.ReturnIsEnemyCustomPlayer(ETM.Return_FactionEnum(), ETM.Return_customReputation())) { TargetsInMeleeRange.Remove(other.transform); } } else if (other.tag == "BasicEnemy" && other.transform != thisHitbox) { if (FL.ReturnIsEnemy(ETM.Return_FactionEnum(), other.gameObject.GetComponentInParent <EnemyTemplateMaster>().Return_FactionEnum())) { TargetsInMeleeRange.Add(other.transform); } } }
void OnTriggerStay(Collider other) //Uses physics time { if (other.tag == "Player") { if (FL.ReturnIsEnemyCustomPlayer(ETM.Return_FactionEnum(), ETM.Return_customReputation())) { shove(other); } } else if (other.tag == "BasicEnemy" && other.transform != thisHitbox) { if (FL.ReturnIsEnemy(ETM.Return_FactionEnum(), other.gameObject.GetComponentInParent <EnemyTemplateMaster>().Return_FactionEnum())) { shove(other); } } }
public override void AnimationTriggerAttack() { float angle = CustomAngle(); float fanMod = -fanAngle / 2; for (int i = 0; i < ProjectileCount; ++i) { float projectileAngle = angle + fanMod; if (EnemyWeapon) { if (i == 0) { AmmoMaster AM_temp = fireProjectile(projectileAngle, true).GetComponent <AmmoMaster>(); AM_temp.Setup(ReturnFinalDamage(damage), dt_in: DT); AM_temp.AdditionalNPCSetup(ETM.Return_FactionEnum(), FL, ETM.Return_customReputation()); } else { AmmoMaster AM_temp = fireProjectile(projectileAngle, true).GetComponent <AmmoMaster>(); AM_temp.Setup(ReturnFinalDamage(damage), dt_in: DT); AM_temp.AdditionalNPCSetup(ETM.Return_FactionEnum(), FL, ETM.Return_customReputation()); } } else { if (i == 0) { fireProjectile(projectileAngle, true).GetComponent <AmmoMaster>().Setup(ReturnFinalDamage(damage), dt_in: DT); } else { fireProjectile(projectileAngle, false).GetComponent <AmmoMaster>().Setup(ReturnFinalDamage(damage), dt_in: DT); } } fanMod += fanAngle / ProjectileCount; } }
private void CustomAttack() { if (CheckAmmo()) { if (energy.Drain_ES(false, energyCost)) //Like this because this uses energy { Attack_helper(); playMove.SetFollowCursorSustained(1f); animationUpdater.RangedAttack(rangedAnimation); if (EnemyWeapon) { AmmoMaster AM_temp = fireProjectile(CustomAngle()).GetComponent <AmmoMaster>(); AM_temp.Setup(ReturnFinalDamage(damage), dt_in: DT); AM_temp.AdditionalNPCSetup(ETM.Return_FactionEnum(), FL, ETM.Return_customReputation()); } else { fireProjectile(CustomAngle()).GetComponent <AmmoMaster>().Setup(ReturnFinalDamage(damage), dt_in: DT); } } } }