This commit is contained in:
jonasty 2022-05-09 13:25:17 +03:00
commit d924a45ca6
1 changed files with 0 additions and 23 deletions

View File

@ -144,29 +144,6 @@ public class SlimeAI : MonoBehaviour
//do attack e.g check for player in range/hit collider
}
void Attack()
{
if (!isAttacking)
{
isAttacking = true;
attackStartTime = Time.time;
StartCoroutine(DelayedAttack());
}
else if (Time.time - attackStartTime > 0.833)
{
isAttacking = false;
attackStartTime = 0.0f;
}
}
IEnumerator DelayedAttack()
{
yield return new WaitForSeconds(0.2f);
Debug.Log("Attack");
//do attack e.g check for player in range/hit collider
}
IEnumerator Wander()
{
int rotTime = Random.Range(1, 3);