Skip to content

Commit 76fb095

Browse files
committed
style: clean up
1 parent ee43cec commit 76fb095

File tree

171 files changed

+866
-855
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

171 files changed

+866
-855
lines changed

Assets/JCSUnity/Scripts/Actions/2D/AI/AIMoveAction/JCS_2DFlyAction.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -480,15 +480,15 @@ private void RecalculateTimeAndResetTimer()
480480
/// </summary>
481481
private void SpaceLimitCheck()
482482
{
483-
Vector3 newPos = this.transform.position;
483+
Vector3 newPos = transform.position;
484484

485-
if (this.transform.position.y < mMinHeight)
485+
if (transform.position.y < mMinHeight)
486486
newPos.y = mMinHeight;
487487

488-
if (this.transform.position.y > mMaxHeight)
488+
if (transform.position.y > mMaxHeight)
489489
newPos.y = mMaxHeight;
490490

491-
this.transform.position = newPos;
491+
transform.position = newPos;
492492
}
493493

494494
/// <summary>

Assets/JCSUnity/Scripts/Actions/2D/AI/AIMoveAction/JCS_2DJumpAction.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,12 +109,12 @@ public class JCS_2DJumpAction : JCS_AIAction
109109

110110
private void Awake()
111111
{
112-
mVelocityInfo = this.GetComponent<JCS_VelocityInfo>();
113-
mCharacterControllerInfo = this.GetComponent<JCS_CharacterControllerInfo>();
112+
mVelocityInfo = GetComponent<JCS_VelocityInfo>();
113+
mCharacterControllerInfo = GetComponent<JCS_CharacterControllerInfo>();
114114

115115
// try to get the component in the same transform
116116
if (mLiveObjectAnimator == null)
117-
mLiveObjectAnimator = this.GetComponent<JCS_2DLiveObjectAnimator>();
117+
mLiveObjectAnimator = GetComponent<JCS_2DLiveObjectAnimator>();
118118
}
119119

120120
private void Start()

Assets/JCSUnity/Scripts/Actions/2D/AI/AIMoveAction/JCS_2DWalkAction.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ public void WalkDirectionPossibility()
192192
if (lastAttacker != null)
193193
{
194194
// if does exist, start following the attacker.
195-
if (lastAttacker.position.x < this.transform.position.x)
195+
if (lastAttacker.position.x < transform.position.x)
196196
direction = Status.LEFT;
197197
else
198198
direction = Status.RIGHT;

Assets/JCSUnity/Scripts/Actions/2D/AI/JCS_2DDeadAction.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,10 @@ public class JCS_2DDeadAction : MonoBehaviour
5555

5656
private void Awake()
5757
{
58-
mLiveObject = this.GetComponent<JCS_2DLiveObject>();
58+
mLiveObject = GetComponent<JCS_2DLiveObject>();
5959

6060
if (mLiveObjectAnimator == null)
61-
mLiveObjectAnimator = this.GetComponent<JCS_2DLiveObjectAnimator>();
61+
mLiveObjectAnimator = GetComponent<JCS_2DLiveObjectAnimator>();
6262
}
6363

6464
private void Update()
@@ -108,7 +108,7 @@ private void Update()
108108
if (mLiveObjectAnimator.animator.currentAnimation.isDonePlaying)
109109
{
110110
// if is end destroy the object itself.
111-
Destroy(this.gameObject);
111+
Destroy(gameObject);
112112
}
113113
}
114114
}

Assets/JCSUnity/Scripts/Actions/JCS_AppCloseSimulateSceneTextAction.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public class JCS_AppCloseSimulateSceneTextAction : MonoBehaviour
3535

3636
private void Awake()
3737
{
38-
mText = this.GetComponent<Text>();
38+
mText = GetComponent<Text>();
3939

4040
#if UNITY_EDITOR
4141
mText.text = mTextShowInEditMode;

Assets/JCSUnity/Scripts/Actions/JCS_DetectArea.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,13 @@ public class JCS_DetectArea : MonoBehaviour
2828

2929
/* Setter & Getter */
3030

31-
public void SetAction(JCS_DetectAreaAction da) { this.mDetectAreaAction = da; }
31+
public void SetAction(JCS_DetectAreaAction da) { mDetectAreaAction = da; }
3232

3333
/* Functions */
3434

3535
private void Awake()
3636
{
37-
mCollider = this.GetComponent<Collider>();
37+
mCollider = GetComponent<Collider>();
3838

3939
if (mCollider == null)
4040
Debug.LogError("No collider attached to do the dectect action");

Assets/JCSUnity/Scripts/Actions/JCS_DetectAreaAction.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ public JCS_DetectAreaObject FindTheFurthest()
127127
}
128128

129129
Vector3 objectPos = mDetectedObjects.at(index).transform.position;
130-
Vector3 areaPos = this.transform.position;
130+
Vector3 areaPos = transform.position;
131131

132132
float distance = Vector3.Distance(objectPos, areaPos);
133133

@@ -189,7 +189,7 @@ public JCS_DetectAreaObject FindTheClosest()
189189
}
190190

191191
Vector3 objectPos = obj.transform.position;
192-
Vector3 areaPos = this.transform.position;
192+
Vector3 areaPos = transform.position;
193193

194194
float distance = Vector3.Distance(objectPos, areaPos);
195195

Assets/JCSUnity/Scripts/Actions/JCS_InvincibleTimeAction.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,8 @@ protected override void Awake()
7878
{
7979
base.Awake();
8080

81-
mLiveObject = this.GetComponent<JCS_LiveObject>();
82-
mOrderLayerObject = this.GetComponent<JCS_OrderLayerObject>();
81+
mLiveObject = GetComponent<JCS_LiveObject>();
82+
mOrderLayerObject = GetComponent<JCS_OrderLayerObject>();
8383
}
8484

8585
private void Update()

Assets/JCSUnity/Scripts/Actions/JCS_PositionCastAction.cs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,10 @@ public class JCS_PositionCastAction : JCS_UnityObject , JCS_IAction
6161
/* Setter & Getter */
6262

6363
#if UNITY_EDITOR
64-
public Vector3 castToScreenPosition { get { return this.mCastToScreenPosition; } }
65-
public Vector3 castToWorldPosition { get { return this.mCastToWorldPosition; } }
64+
public Vector3 castToScreenPosition { get { return mCastToScreenPosition; } }
65+
public Vector3 castToWorldPosition { get { return mCastToWorldPosition; } }
6666
#endif
67-
public Vector3 positionOffset { get { return this.mPositionOffset; } set { this.mPositionOffset = value; } }
67+
public Vector3 positionOffset { get { return mPositionOffset; } set { mPositionOffset = value; } }
6868

6969
/* Functions */
7070

@@ -76,7 +76,7 @@ private void Start()
7676
{
7777
// Get panel root, in order to calculate the
7878
// correct distance base on the resolution.
79-
mPanelRoot = JCS_PanelRoot.GetFromParent(this.transform);
79+
mPanelRoot = JCS_PanelRoot.GetFromParent(transform);
8080
}
8181
}
8282

@@ -131,12 +131,12 @@ public Vector3 CastToScreen(Vector3 pos)
131131
worldToCanvasSpace.y /= resizeUI.targetScale;
132132
}
133133

134-
this.localPosition = worldToCanvasSpace + (Vector2)positionOffset;
134+
localPosition = worldToCanvasSpace + (Vector2)positionOffset;
135135
}
136136
break;
137137
}
138138

139-
return this.localPosition;
139+
return localPosition;
140140
}
141141

142142
/// <summary>
@@ -156,12 +156,12 @@ public Vector3 CastToWorld(Vector2 pos)
156156
case JCS_UnityObjectType.GAME_OBJECT:
157157
case JCS_UnityObjectType.SPRITE:
158158
{
159-
this.localPosition = camera.CanvasToWorldSpace(pos) + mPositionOffset;
159+
localPosition = camera.CanvasToWorldSpace(pos) + mPositionOffset;
160160
}
161161
break;
162162
}
163163

164-
return this.localPosition;
164+
return localPosition;
165165
}
166166
}
167167
}

Assets/JCSUnity/Scripts/Actions/JCS_SimpleTrackAction.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,9 @@ private void Update()
8989
float time = JCS_Time.ItTime(mTimeType);
9090

9191
if (mLocalSelf)
92-
this.localPosition += (newPos - localPosition) / mFriction * time;
92+
localPosition += (newPos - localPosition) / mFriction * time;
9393
else
94-
this.position += (newPos - position) / mFriction * time;
94+
position += (newPos - position) / mFriction * time;
9595
}
9696

9797
/// <summary>

0 commit comments

Comments
 (0)