Help with Script
using UnityEngine; using System.Collections;
public class PatrolState : IEnemyState { private Enemy enemy; private float patrolTimer; private float patrolDuration
public void Enter(Enemy enemy)
{
this.enemy = enemy;
}
public void Execute()
{
Debug.Log ("Patroling");
Patrol ();
}
public void Exit()
{
}
public void OnTriggerEnter (Collider2D other)
{
}
private void Patrol()
{
patrolTimer += Time.deltaTime;
if (patrolTimer >= patrolDuration)
{
enemy.ChangeState (new IdleState ());
}
}
}
Answer by TBruce · May 09, 2016 at 03:55 PM
I managed to solve it myself but I thank you nonetheless. I wish I could reward your response but I do not have any points left. I am still getting used to being on this site. I can give you nothing else than my gratitude and my apologies
Your answer
Follow this Question
Related Questions
i need help with my board manager coding ASAP 1 Answer
Several errors in my acceleration script trying to update variables from other scripts 0 Answers
error CS0103: The name `canvasGroup' does not exist in the current context 3 Answers
JavaScript Problem - BCE0043 - Unexpected Token Help 0 Answers
Hai guys i need help why my scripts not running "i will make button next3dobject and prev3dobject" 1 Answer