File tree Expand file tree Collapse file tree 3 files changed +6
-11
lines changed
Expand file tree Collapse file tree 3 files changed +6
-11
lines changed Original file line number Diff line number Diff line change @@ -32,11 +32,6 @@ public class JCS_2DCamera : JCS_Camera
3232
3333 [ Separator ( "Runtime Variables (JCS_2DCamera)" ) ]
3434
35- //-- Target information
36- [ Tooltip ( "Target transform information." ) ]
37- [ SerializeField ]
38- private Transform mTargetTransform = null ;
39-
4035 [ Tooltip ( "Set velocity to zero while the follow not active." ) ]
4136 [ SerializeField ]
4237 private bool mResetVelocityToZeroWhileNotActive = false ;
Original file line number Diff line number Diff line change @@ -41,10 +41,6 @@ public class JCS_3DCamera : JCS_Camera
4141
4242 [ Separator ( "Runtime Variables (JCS_3DCamera)" ) ]
4343
44- [ Tooltip ( "Target we want to look at." ) ]
45- [ SerializeField ]
46- private Transform mTargetTransform = null ;
47-
4844 [ Tooltip ( "Targeting revolution." ) ]
4945 [ SerializeField ]
5046 private float mTargetRevolution = 0.0f ;
Original file line number Diff line number Diff line change @@ -49,6 +49,10 @@ public abstract class JCS_Camera : MonoBehaviour
4949
5050 [ Separator ( "Runtime Variables (JCS_Camera)" ) ]
5151
52+ [ Tooltip ( "Target transform information." ) ]
53+ [ SerializeField ]
54+ protected Transform mTargetTransform = null ;
55+
5256 [ Tooltip ( "Flag to check if currently the camera following the target object." ) ]
5357 [ SerializeField ]
5458 protected bool mFollowing = true ;
@@ -95,8 +99,8 @@ public abstract class JCS_Camera : MonoBehaviour
9599 public bool Following { get { return this . mFollowing ; } set { this . mFollowing = value ; } }
96100 public bool SmoothTrack { get { return this . mSmoothTrack ; } set { this . mSmoothTrack = value ; } }
97101
98- public abstract void SetFollowTarget ( Transform trans ) ;
99- public abstract Transform GetFollowTarget ( ) ;
102+ public virtual void SetFollowTarget ( Transform trans ) { this . mTargetTransform = trans ; }
103+ public virtual Transform GetFollowTarget ( ) { return mTargetTransform ; }
100104
101105 public float ScreenAspect { get { return ( float ) mCamera . pixelWidth / ( float ) mCamera . pixelHeight ; } }
102106
You can’t perform that action at this time.
0 commit comments