I finished the scripting for my game and i says that there is no suitable method to enter exit and perform and I dont know what to do. Here are all three errors and the script and the video.
Assets\Script\Enemy\States\SearchState.cs(9,26): error CS0115: ‘SearchState.Enter()’: no suitable method found to override
Assets\Script\Enemy\States\SearchState.cs(9,26): error CS0115: ‘SearchState.Perform()’: no suitable method found to override
Assets\Script\Enemy\States\SearchState.cs(9,26): error CS0115: ‘SearchState.Exit()’: no suitable method found to override
public class SearchState : MonoBehaviour
{
private float searchTimer;
private float moveTimer;
public override void Enter()
{
enemy.Agent.SetDestination(enemy.LastKnowPos);
}
public override void Perform()
{
if (enemy.CanSeePlayer())
stateMachine.ChangeState(new AttackState());
if (enemy.Agent.remainingDistance < enemy.Agent.stoppingDistance)
{
searchTimer += Time.deltaTime;
moveTimer += Time.deltaTime;
if (moveTimer > Random.Range(3, 5))
{
enemy.Agent.SetDestination(enemy.transform.position + (Random.insideUnitSphere * 10));
moveTimer = 0;
}
if (searchTimer > 10)
{
stateMachine.ChangeState(new PatrolState());
}
}
}
public override void Exit()
{
}
}