I am getting the error message
LooterAttackState' does not implement interface member
State.OnStateEnter()’ and the best implementing candidate `LooterAttackState.OnStateEnter()’ in not public
for each method in my interface. I have them all implemented, and even though they are empty, they are there. Is there a reason I am getting this error? Code will be below.
State Interface
using UnityEngine;
using System.Collections;
public interface State {
/// <summary>
/// Enter the state
/// </summary>
void OnStateEnter();
/// <summary>
/// Things to do in this state every frame
/// </summary>
void Execute(NPCController npc);
/// <summary>
/// Stuff that happens when you exit the state
/// </summary>
void OnStateExit();
}
Class Implementing the interface:
using UnityEngine;
using System.Collections;
public class LooterAttackState : State{
State previousState;
State nextState;
void OnStateEnter(){
}
void Execute(NPCController npc){
//get location of player
Vector3 playerLoc = new Vector3(0,0,0);
Vector3 looterLoc = new Vector3(10,0,10);
//get distance between the 2
var distance = Vector3.Distance(looterLoc, playerLoc);
}
void OnStateExit(){
}
}