private IEnumerator Interact() { transform.LookAt(trap[trapIndex].transform); if (onInteracting != null) { onInteracting.Invoke(); onInteracting = null; } yield return(new WaitForSeconds(3)); dState = DeathState.Flee; }
void Interact() { if (action) { if (onInteracting != null) { onInteracting.Invoke(); onInteracting = null; anim.SetTrigger(animGetItem); } else { Debug.Log("Nothing to interact with!"); } } }
private IEnumerator Interact() { Debug.Log("Victim: Interacting with something"); transform.LookAt(traps[trapIndex].transform); if (onInteracting != null) { onInteracting.Invoke(); onInteracting = null; } yield return(new WaitForSeconds(3)); safePointIndex = UnityEngine.Random.Range(1, safePoints.Length); npcState = NPCState.Patrol; }