void OnTriggerEnter(Collider col) { if (thisAction == null || isFlat) { return; } if (!thisAction.IsPlaying() && readyToPlayAgain) { readyToPlayAgain = false; thisAction.Receive(col.gameObject, false); } }
public bool IsPlaying() { // Check if this action or any chained action is playing if (currentState == ActionState.PlayingForward || currentState == ActionState.PlayingReverse) { return(true); } else { if (NextObject == null) { return(false); } DaggerfallAction nextAction = NextObject.GetComponent <DaggerfallAction>(); if (nextAction == null) { return(false); } return(nextAction.IsPlaying()); } }