36 lines
538 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Ally : Entity
{
public override void Start()
{
base.Start();
}
void Update()
{
if(IsEnemyDetected) {
AttackEnemy();
}
}
void AttackEnemy()
{
//Attack Cooldown
if(AttackSpeed < AttackSpeedWait) {
Animation.PlayAttackAnim();
AttackSpeedWait = 0f;
}
AttackSpeedWait += Time.deltaTime;
}
}