protected void StartTransition(ShotInformation shot) { if (currentShot.valid && currentShot.strategy != null) { currentShot.strategy.StopStrategy(); } if (shot.valid) { // Select the strategy when starting the transition shot.strategy = ProceduralEngine.SelectRandomWeighted(shot.sampledStrategies, x => x.Value).Key; shot.selectedCamera = InstanceCamera(); this.history.Add(shot); this.nextShot = new ShotInformation(); this.nextShot.sampledStrategies = new List <KeyValuePair <ProceduralCameraStrategy, float> >(); this.nextShotTries = 0; this.currentCutTime = 0f; this.currentShot = shot; this.currentCamera = shot.selectedCamera; this.currentCamera.InitializeCamera(currentShot.strategy, GetComponent <PostProcessingBehaviour>().profile); this.currentShot.strategy.StartStrategy(currentCamera); } }
public void StartStrategy(ProceduralCamera camera) { this.camera = camera; this.cameraTime = 0f; this.initialPosition = CameraPosition; this.initialRotation = CameraRotation; mainInterestPoint.IsSelected = true; OnStart(); }