Jason Durand 01 1112e06d47 Merge remote-tracking branch 'origin/dev' into jason
# Conflicts:
#	Assets/Scripts/Entity.cs
2022-04-02 12:54:54 -04:00

34 lines
716 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Monster : AIEntity
{
// Start is called before the first frame update
override protected void Start()
{
base.Start();
base.entityName = "Monster";
base.ennemyName = "Gladiator";
}
protected override void FixedUpdate() {
base.FixedUpdate();
MoveToTarget();
}
// Update is called once per frame
void Update()
{
if(IsInAttackRange()){
if(attackTimer >= attackCooldown){
Attack();
attackTimer = 0;
}else{
attackTimer += Time.deltaTime;
}
}
}
}