private void SetBehaviorStaticUserPerspective(bool resetAnchor) { if (resetAnchor) { this.m_behaviorStatic.ResetCameraAnchorPosition(base.transform); } if (this.m_behaviorStatic != null) { this.m_currentBehavior = this.m_behaviorStatic; this.m_currentBehavior.Init(this.m_target); } this.m_behaviorType = CGolfCamera.CAMERA_BEHAVIOR.CAMERA_STATIC_USER_PERSPECTIVE; }
private void SetBehaviorDynamic(bool resetAnchor) { if (resetAnchor) { this.m_behaviorDynamic.ResetCameraAnchorPosition(base.transform); } if (this.m_behaviorDynamic != null) { this.m_currentBehavior = this.m_behaviorDynamic; this.m_currentBehavior.Init(this.m_target); } this.m_behaviorType = CGolfCamera.CAMERA_BEHAVIOR.CAMERA_LAND_DYNAMIC; }
private void SetBehaviorStaticCutBehindBall(bool resetAnchor) { if (resetAnchor) { this.m_behaviorStatic.ResetCameraAnchorPosition(base.transform); } if (this.m_behaviorStatic != null) { this.m_currentBehavior = this.m_behaviorStaticCutPin; ((CBehaviorStaticCutPin)this.m_currentBehavior).SetSecondTarget(this.m_pinTarget); this.m_currentBehavior.Init(this.m_target); } this.m_behaviorType = CGolfCamera.CAMERA_BEHAVIOR.CAMERA_STATIC_CUT_BEHIND_BALL; }
private void Start() { if (this.m_pinTarget == null) { this.m_pinTarget = GameObject.FindGameObjectWithTag("FalgGreen"); } this.m_behaviorType = CGolfCamera.CAMERA_BEHAVIOR.CAMERA_NO_BEHAVIOR; this.m_behaviorStatic = new CBehaviorStatic(base.transform); this.m_behaviorStaticCutPin = new CBehaviorStaticCutPin(base.transform); this.m_behaviorFollowBehind = new CBehaviorFollowBehind(base.transform); this.m_behaviorFollowFront = new CBehaviorFollowFront(base.transform); this.m_behavior45Degrees = new CBehavior45Degrees(base.transform); this.m_behavior45DegreesZoom = new CBehavior45DegreesZoom(base.transform); this.m_behaviorStaticDownrange = new CBehaviorStaticDownrange(base.transform); this.m_behaviorFollowFrontPin = new CBehaviorFollowFrontPin(base.transform); this.m_behaviorDynamic = new CBehaviorDynamic(base.transform); this.SetCameraBehavior(CGolfCamera.CAMERA_BEHAVIOR.CAMERA_STATIC_USER_PERSPECTIVE); }
public void UserOverride(CGolfCamera.CAMERA_BEHAVIOR newBehavior) { this._isUserOverride = true; this.overrideBehavior = newBehavior; this.SetCameraBehavior(newBehavior); }
public void SetCameraBehavior(CGolfCamera.CAMERA_BEHAVIOR newBehavior) { if (this._isUserOverride) { newBehavior = this.overrideBehavior; } if (newBehavior != this.m_behaviorType) { switch (newBehavior) { case CGolfCamera.CAMERA_BEHAVIOR.CAMERA_NO_BEHAVIOR: { this.m_behaviorType = newBehavior; break; } case CGolfCamera.CAMERA_BEHAVIOR.CAMERA_STATIC_USER_PERSPECTIVE: { this.SetBehaviorStaticUserPerspective(false); break; } case CGolfCamera.CAMERA_BEHAVIOR.CAMERA_STATIC_CUT_BEHIND_BALL: { this.SetBehaviorStaticCutBehindBall(false); break; } case CGolfCamera.CAMERA_BEHAVIOR.CAMERA_FOLLOW_BEHIND_BALL: { this.m_currentBehavior = this.m_behaviorFollowBehind; this.m_currentBehavior.ResetAngle(); this.m_currentBehavior.SetFollowAngle(this.m_followBehindAngle); this.m_currentBehavior.SetFollowRadius(this.m_followBehindRadius); this.m_currentBehavior.SetFollowHeight(this.m_followBehindHeight); this.m_currentBehavior.SetFollowRate(this.m_followBehindRate); this.m_currentBehavior.SetFollowHeightRate(this.m_followBehindHeightRate); this.m_currentBehavior.SetFollowRotationRate(this.m_followBehindRotationRate); this.m_currentBehavior.SetFollowTransitionAcceleration(this.m_transitionAcceleration); this.m_currentBehavior.SetFollowLookAtRotationRate(this.m_lookAtRate); this.m_currentBehavior.Init(this.m_target); this.m_behaviorType = newBehavior; break; } case CGolfCamera.CAMERA_BEHAVIOR.CAMERA_FOLLOW_FRONT_BALL: { this.m_currentBehavior = this.m_behaviorFollowFront; this.m_currentBehavior.SetFollowAngle(this.m_followFrontAngle); this.m_currentBehavior.SetFollowRadius(this.m_followFrontRadius); this.m_currentBehavior.SetFollowHeight(this.m_followFrontHeight); this.m_currentBehavior.SetFollowRate(this.m_followFrontRate); this.m_currentBehavior.SetFollowHeightRate(this.m_followFrontHeightRate); this.m_currentBehavior.SetFollowRotationRate(this.m_followFrontRotationRate); this.m_currentBehavior.SetFollowTransitionAcceleration(this.m_transitionAcceleration); this.m_currentBehavior.SetFollowLookAtRotationRate(this.m_lookAtRate); ((CBehaviorFollowFront)this.m_currentBehavior).ShouldContinuallyOrbit(this.m_continuallyOrbit); ((CBehaviorFollowFront)this.m_currentBehavior).SetOrbitRate(this.m_orbitRate); this.m_currentBehavior.Init(this.m_target); this.m_behaviorType = newBehavior; break; } case CGolfCamera.CAMERA_BEHAVIOR.CAMERA_FOLLOW_FRONT_BALL_PIN: { this.m_currentBehavior = this.m_behaviorFollowFrontPin; this.m_currentBehavior.SetFollowAngle(this.m_followFrontAnglePin); this.m_currentBehavior.SetFollowRadius(this.m_followFrontRadiusPin); this.m_currentBehavior.SetFollowHeight(this.m_followFrontHeightPin); this.m_currentBehavior.SetFollowRate(this.m_followFrontRatePin); this.m_currentBehavior.SetFollowHeightRate(this.m_followFrontHeightRatePin); this.m_currentBehavior.SetFollowRotationRate(this.m_followFrontRotationRatePin); this.m_currentBehavior.SetFollowTransitionAcceleration(this.m_transitionAcceleration); this.m_currentBehavior.SetFollowLookAtRotationRate(this.m_lookAtRate); ((CBehaviorFollowFrontPin)this.m_currentBehavior).ShouldContinuallyOrbit(this.m_continuallyOrbitPin); ((CBehaviorFollowFrontPin)this.m_currentBehavior).SetOrbitRate(this.m_orbitRate); ((CBehaviorFollowFrontPin)this.m_currentBehavior).SetSecondTarget(this.m_pinTarget); this.m_currentBehavior.Init(this.m_target); this.m_behaviorType = newBehavior; break; } case CGolfCamera.CAMERA_BEHAVIOR.CAMERA_45_DEGREES: { this.m_currentBehavior = this.m_behavior45Degrees; this.m_currentBehavior.Init(this.m_target); this.m_behaviorType = newBehavior; break; } case CGolfCamera.CAMERA_BEHAVIOR.CAMERA_45_DEGREES_ZOOM: { this.m_currentBehavior = this.m_behavior45DegreesZoom; this.m_currentBehavior.Init(this.m_target); this.m_behaviorType = newBehavior; break; } case CGolfCamera.CAMERA_BEHAVIOR.CAMERA_STATIC_DOWNRANGE: { this.m_currentBehavior = this.m_behaviorStaticDownrange; this.m_currentBehavior.Init(this.m_target); this.m_behaviorType = newBehavior; break; } case CGolfCamera.CAMERA_BEHAVIOR.CAMERA_LAND_DYNAMIC: { this.SetBehaviorDynamic(false); break; } } } }
public virtual void ChangeCameraMode(CGolfCamera.CAMERA_BEHAVIOR camMode, bool isIgnoreBallLand) { }
public void SetupPlayCamera(CGolfCamera.CAMERA_BEHAVIOR CamMode, bool IsIgnoreBallLand) { this._gameInterface.ChangeCameraMode(CamMode, IsIgnoreBallLand); }