/// <summary> /// Invokes the action after t seconds. /// </summary> public IEnumerator invokeAction(ICameraAction action, float t = 0) { if (t > 0) { yield return(new WaitForSeconds(t)); } action.execute(cam); yield return(null); }
private void ChangeActiveMode(CameraAction cameraAction) { if (_currentAction?.CameraAction == cameraAction) { return; } _currentAction = _cameraActions.FirstOrDefault(cc => cc.CameraAction == cameraAction); _currentAction?.StartAction(); }