Why did I never update this
This commit is contained in:
1 file changed
+5
-4
@@ -201,7 +201,8 @@ public class CustomGamePlayer : MonoBehaviour {
|
||||
if (dir.magnitude < radius) {
|
||||
berryRect.position += speed * dir.normalized;
|
||||
ClampPosition(berry.GetComponent<Image>());
|
||||
}
|
||||
noGravityBerries.Add(berry.GetEntityId());
|
||||
} else noGravityBerries.Remove(berry.GetEntityId());
|
||||
}
|
||||
}
|
||||
} else if (noGravityBerries.Count() != 0) noGravityBerries.Clear();
|
||||
@@ -373,8 +374,8 @@ public class CustomGamePlayer : MonoBehaviour {
|
||||
if (antiLeft > 0f) berryTags.Add("PoisonBerry");
|
||||
|
||||
float scale = (canvasRect.lossyScale.x + canvasRect.lossyScale.y) / 2f;
|
||||
float radius = antiLeft > 0f ? 250f * scale : 300f * scale;
|
||||
float speed = antiLeft > 0f ? 1.75f * scale : -1f * scale;
|
||||
float radius = antiLeft > 0f ? 250f * scale : 325f * scale;
|
||||
float speed = antiLeft > 0f ? (300f * scale * Time.deltaTime) : -(420f * scale * Time.deltaTime);
|
||||
|
||||
foreach (string tag in berryTags) {
|
||||
foreach (var berry in GameObject.FindGameObjectsWithTag(tag)) {
|
||||
@@ -388,7 +389,7 @@ public class CustomGamePlayer : MonoBehaviour {
|
||||
} else noGravityBerries.Remove(berry.GetEntityId());
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (noGravityBerries.Count() != 0) noGravityBerries.Clear();
|
||||
}
|
||||
|
||||
void ClampPosition(Image image) {
|
||||
|
||||
Reference in new issue
Block a user