using System.Collections;
using System.Collections.Generic;
public class Nightshade : Enemy
[Header("Attack System - Arcane Explotion")]
[SerializeField] protected float arcaneExplotionMana;
[SerializeField] protected float arcaneExplotionDamage;
[SerializeField] protected float arcaneExplotionRate;
[SerializeField] protected float arcaneExplotionRange;
protected float arcaneExplotionTime = 0f;
[Header("Attack System - Evocation")]
[SerializeField] protected float evocationMana;
[SerializeField] protected float evocationHeal;
[SerializeField] protected float evocationManaRegen;
[SerializeField] protected float evocationDuration;
[SerializeField] protected float evocationRate;
protected float evocationTime = 0f;
protected override void Animations()
anim.SetBool("Moving", agent.velocity.normalized.magnitude > 0.5f);
protected override void EnemyAI()
if(distanceToPlayer <= agroRange)
if ((distanceToPlayer <= meleeAttackRange && meleeAttack) ||
(distanceToPlayer <= rangedAttackRange && rangedAttack))
if (meleeAttack || rangedAttack)
agent.SetDestination(player.position);
agent.SetDestination(transform.position);
agent.SetDestination(transform.position);
protected override void Attack()
if(distanceToPlayer <= arcaneExplotionRange)
if(currentMana >= arcaneExplotionMana &&
Time.time >= arcaneExplotionTime)
if(currentLife <= maxLife * 0.1f &&
currentMana >= evocationMana &&
Time.time >= evocationTime)
if(distanceToPlayer <= meleeAttackRange &&
Time.time >= meleeAttackTime)
agent.SetDestination(player.position);
if(currentLife <= maxLife * 0.1f &&
currentMana >= arcaneExplotionMana &&
Time.time >= arcaneExplotionTime)
if(distanceToPlayer <= rangedAttackRange)
if(currentMana >= rangedAttackMana &&
Time.time >= rangedAttackTime)
if(currentMana >= evocationMana &&
Time.time >= evocationTime)
if(distanceToPlayer <= meleeAttackRange &&
Time.time >= meleeAttackTime)
agent.SetDestination(player.position);
agent.SetDestination(player.position);
void CastArcaneExplotion()
Debug.Log("CastArcaneExplotion");
Debug.Log("CastShadowbolt");
Debug.Log("CastEvocation");