Skip to content

Commit 66c83d8

Browse files
renamed metod in Projectile.cs
1 parent 661b3ad commit 66c83d8

File tree

5 files changed

+8
-12
lines changed

5 files changed

+8
-12
lines changed

Combat/Projectile.cs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,6 @@ private void Awake() {
3434
originalSpeed = speed;
3535
}
3636

37-
private void LookTowardsTarget() {
38-
if (target != null) {
39-
transform.LookAt(GetAimLocation());
40-
onLaunch.Invoke();
41-
}
42-
}
43-
4437
private void Update() {
4538
if (target == null) {
4639
return;
@@ -102,6 +95,13 @@ private void OnTriggerEnter(Collider other) {
10295
StartCoroutine(ReturnToPoolWithDelay(afterHitTTL));
10396
}
10497

98+
private void PointTowardsTarget() {
99+
if (target != null) {
100+
transform.LookAt(GetAimLocation());
101+
onLaunch.Invoke();
102+
}
103+
}
104+
105105
private Vector3 GetAimLocation() {
106106
CapsuleCollider targetCollider = target.GetComponent<CapsuleCollider>();
107107
if (targetCollider == null) {
@@ -133,7 +133,7 @@ public void SetTarget(Health target, GameObject instigator, float damage, Action
133133
this.instigator = instigator;
134134
this.updateUI = updateUI;
135135
speed = originalSpeed;
136-
LookTowardsTarget();
136+
PointTowardsTarget();
137137
}
138138

139139
public void SetPoolTag(string tag) {

UI/CameraFacing.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,4 @@ private void LateUpdate() {
1212
transform.forward = mainCamera.transform.forward;
1313
}
1414
}
15-
1615
}

UI/Damage Text/DamageText.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,4 @@ public void SetValue(float amount) {
2727
damageText.text = String.Format("{0:0}", amount);
2828
}
2929
}
30-
3130
}

UI/Damage Text/DamageTextSpawner.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,4 @@ public void Spawn(float damage) {
2121
damageText.SetPoolTag(poolTag);
2222
}
2323
}
24-
2524
}

UI/Health/HealthBar.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,4 @@ private void Update() {
1717
}
1818
}
1919
}
20-
2120
}

0 commit comments

Comments
 (0)