// play the specified cinematic static public bool Play(Cinematic cinematicComp, GameObject localTo) { if (null == cinematicComp || _isPlayFunctionBlocked) { return(false); } _isPlayFunctionBlocked = true; // code in stop can cause this function to get called again, this blocking flag stops that happening if (null != _activeCinematic) { _activeCinematic.Stop(); } _activeCinematic = cinematicComp; cinematicComp.Play(localTo); _isPlayFunctionBlocked = false; return(true); }