1
0
This repository has been archived on 2024-09-03. You can view files and clone it, but cannot push or open issues or pull requests.
System-Purge/Assets/Resources/Scripts/AIScripts/idle.cs
2016-01-30 11:16:38 -05:00

30 lines
503 B
C#

using UnityEngine;
using System.Collections;
using System;
public class idle : state {
private Enemy enemy;
private float time = 0;
public void Execute()
{
time += Time.deltaTime;
if (time >= 1)
enemy.changestate(new wander());
}
public void Enter(Enemy enemy)
{
Debug.Log("idle");
time = 0;
this.enemy = enemy;
}
public void Exit()
{
}
public void onTriggerEnter(Collider2D other)
{
}
}