Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
GolfHelper.cs
Go to the documentation of this file.
1using System;
4using Terraria.Chat;
6using Terraria.ID;
9
11
12public static class GolfHelper
13{
14 public struct ClubProperties
15 {
16 public readonly Vector2 MinimumStrength;
17
18 public readonly Vector2 MaximumStrength;
19
20 public readonly float RoughLandResistance;
21
22 public ClubProperties(Vector2 minimumStrength, Vector2 maximumStrength, float roughLandResistance)
23 {
24 MinimumStrength = minimumStrength;
25 MaximumStrength = maximumStrength;
26 RoughLandResistance = roughLandResistance;
27 }
28 }
29
30 public struct ShotStrength
31 {
32 public readonly float AbsoluteStrength;
33
34 public readonly float RelativeStrength;
35
36 public readonly float RoughLandResistance;
37
38 public ShotStrength(float absoluteStrength, float relativeStrength, float roughLandResistance)
39 {
40 AbsoluteStrength = absoluteStrength;
41 RelativeStrength = relativeStrength;
42 RoughLandResistance = roughLandResistance;
43 }
44 }
45
47 {
48 public void OnCollision(PhysicsProperties properties, ref Vector2 position, ref Vector2 velocity, ref BallCollisionEvent collision)
49 {
50 TileMaterial byTileId = TileMaterials.GetByTileId(collision.Tile.type);
51 Vector2 vector = velocity * byTileId.GolfPhysics.SideImpactDampening;
52 Vector2 vector2 = collision.Normal * Vector2.Dot(velocity, collision.Normal) * (byTileId.GolfPhysics.DirectImpactDampening - byTileId.GolfPhysics.SideImpactDampening);
53 velocity = vector + vector2;
54 Projectile projectile = collision.Entity as Projectile;
55 switch (collision.Tile.type)
56 {
57 case 421:
58 case 422:
59 {
60 float num2 = 2.5f * collision.TimeScale;
61 Vector2 vector3 = new Vector2(0f - collision.Normal.Y, collision.Normal.X);
62 if (collision.Tile.type == 422)
63 {
64 vector3 = -vector3;
65 }
66 float num3 = Vector2.Dot(velocity, vector3);
67 if (num3 < num2)
68 {
69 velocity += vector3 * MathHelper.Clamp(num2 - num3, 0f, num2 * 0.5f);
70 }
71 break;
72 }
73 case 476:
74 {
75 float num = velocity.Length() / collision.TimeScale;
76 if (!(collision.Normal.Y > -0.01f) && !(num > 100f))
77 {
78 velocity *= 0f;
79 if (projectile != null && projectile.active)
80 {
81 PutBallInCup(projectile, collision);
82 }
83 }
84 break;
85 }
86 }
87 if (projectile != null && velocity.Y < -0.3f && velocity.Y > -2f && velocity.Length() > 1f)
88 {
89 Dust dust = Dust.NewDustPerfect(collision.Entity.Center, 31, collision.Normal, 127);
90 dust.scale = 0.7f;
91 dust.fadeIn = 1f;
92 dust.velocity = dust.velocity * 0.5f + Main.rand.NextVector2CircularEdge(0.5f, 0.4f);
93 }
94 }
95
96 public void PutBallInCup(Projectile proj, BallCollisionEvent collision)
97 {
98 if (proj.owner == Main.myPlayer && Main.LocalGolfState.ShouldScoreHole)
99 {
100 Point hitLocation = (collision.ImpactPoint - collision.Normal * 0.5f).ToTileCoordinates();
101 int owner = proj.owner;
102 int num = (int)proj.ai[1];
103 int type = proj.type;
104 if (num > 1)
105 {
106 Main.LocalGolfState.SetScoreTime();
107 }
108 Main.LocalGolfState.RecordBallInfo(proj);
109 Main.LocalGolfState.LandBall(proj);
110 int golfBallScore = Main.LocalGolfState.GetGolfBallScore(proj);
111 if (num > 0)
112 {
113 Main.player[owner].AccumulateGolfingScore(golfBallScore);
114 }
115 PutBallInCup_TextAndEffects(hitLocation, owner, num, type);
116 Main.LocalGolfState.ResetScoreTime();
117 Wiring.HitSwitch(hitLocation.X, hitLocation.Y);
118 NetMessage.SendData(59, -1, -1, null, hitLocation.X, hitLocation.Y);
119 if (Main.netMode == 1)
120 {
121 NetMessage.SendData(128, -1, -1, null, owner, num, type, 0f, hitLocation.X, hitLocation.Y);
122 }
123 }
124 proj.Kill();
125 }
126
127 public static void PutBallInCup_TextAndEffects(Point hitLocation, int plr, int numberOfHits, int projid)
128 {
129 if (numberOfHits != 0)
130 {
131 EmitGolfballExplosion(hitLocation.ToWorldCoordinates(8f, 0f));
132 string key = "Game.BallBounceResultGolf_Single";
133 NetworkText networkText;
134 if (numberOfHits != 1)
135 {
136 key = "Game.BallBounceResultGolf_Plural";
137 networkText = NetworkText.FromKey(key, Main.player[plr].name, NetworkText.FromKey(Lang.GetProjectileName(projid).Key), numberOfHits);
138 }
139 else
140 {
141 networkText = NetworkText.FromKey(key, Main.player[plr].name, NetworkText.FromKey(Lang.GetProjectileName(projid).Key));
142 }
143 if (Main.netMode == 0 || Main.netMode == 1)
144 {
145 Main.NewText(networkText.ToString(), byte.MaxValue, 240, 20);
146 }
147 else if (Main.netMode == 2)
148 {
149 ChatHelper.BroadcastChatMessage(networkText, new Color(255, 240, 20));
150 }
151 }
152 }
153
154 public void OnPassThrough(PhysicsProperties properties, ref Vector2 position, ref Vector2 velocity, ref float angularVelocity, ref BallPassThroughEvent collision)
155 {
156 switch (collision.Type)
157 {
158 case BallPassThroughType.Water:
159 velocity *= 0.91f;
160 angularVelocity *= 0.91f;
161 break;
162 case BallPassThroughType.Honey:
163 velocity *= 0.8f;
164 angularVelocity *= 0.8f;
165 break;
166 case BallPassThroughType.Tile:
167 {
168 TileMaterial byTileId = TileMaterials.GetByTileId(collision.Tile.type);
169 velocity *= byTileId.GolfPhysics.PassThroughDampening;
170 angularVelocity *= byTileId.GolfPhysics.PassThroughDampening;
171 break;
172 }
173 case BallPassThroughType.Lava:
174 break;
175 }
176 }
177
178 public static void EmitGolfballExplosion_Old(Vector2 Center)
179 {
180 EmitGolfballExplosion(Center);
181 }
182
183 public static void EmitGolfballExplosion(Vector2 Center)
184 {
186 for (float num = 0f; num < 1f; num += 0.085f)
187 {
188 Dust dust = Dust.NewDustPerfect(Center, 278, (num * ((float)Math.PI * 2f)).ToRotationVector2() * new Vector2(2f, 0.5f));
189 dust.fadeIn = 1.2f;
190 dust.noGravity = true;
191 dust.velocity.X *= 0.7f;
192 dust.velocity.Y -= 1.5f;
193 dust.position.Y += 8f;
194 dust.velocity.X *= 2f;
195 dust.color = Main.hslToRgb(Main.rand.NextFloat(), 1f, 0.5f);
196 }
197 float num2 = Main.rand.NextFloat();
198 float num3 = Main.rand.Next(5, 10);
199 for (int i = 0; (float)i < num3; i++)
200 {
201 int num4 = Main.rand.Next(5, 22);
202 Vector2 value = (((float)i - num3 / 2f) * ((float)Math.PI * 2f) / 256f - (float)Math.PI / 2f).ToRotationVector2() * new Vector2(5f, 1f) * (0.25f + Main.rand.NextFloat() * 0.05f);
203 Color color = Main.hslToRgb((num2 + (float)i / num3) % 1f, 0.7f, 0.7f);
204 color.A = 127;
205 for (int j = 0; j < num4; j++)
206 {
207 Dust dust2 = Dust.NewDustPerfect(Center + new Vector2((float)i - num3 / 2f, 0f) * 2f, 278, value);
208 dust2.fadeIn = 0.7f;
209 dust2.scale = 0.7f;
210 dust2.noGravity = true;
211 dust2.position.Y += -1f;
212 dust2.velocity *= (float)j;
213 dust2.scale += 0.2f - (float)j * 0.03f;
214 dust2.velocity += Main.rand.NextVector2Circular(0.05f, 0.05f);
215 dust2.color = color;
216 }
217 }
218 for (float num5 = 0f; num5 < 1f; num5 += 0.2f)
219 {
220 Dust dust3 = Dust.NewDustPerfect(Center, 278, (num5 * ((float)Math.PI * 2f)).ToRotationVector2() * new Vector2(1f, 0.5f));
221 dust3.fadeIn = 1.2f;
222 dust3.noGravity = true;
223 dust3.velocity.X *= 0.7f;
224 dust3.velocity.Y -= 0.5f;
225 dust3.position.Y += 8f;
226 dust3.velocity.X *= 2f;
227 dust3.color = Main.hslToRgb(Main.rand.NextFloat(), 1f, 0.3f);
228 }
229 float num6 = Main.rand.NextFloatDirection();
230 for (float num7 = 0f; num7 < 1f; num7 += 0.15f)
231 {
232 Dust dust4 = Dust.NewDustPerfect(Center, 278, (num6 + num7 * ((float)Math.PI * 2f)).ToRotationVector2() * 4f);
233 dust4.fadeIn = 1.5f;
234 dust4.velocity *= 0.5f + num7 * 0.8f;
235 dust4.noGravity = true;
236 dust4.velocity.X *= 0.35f;
237 dust4.velocity.Y *= 2f;
238 dust4.velocity.Y -= 1f;
239 dust4.velocity.Y = 0f - Math.Abs(dust4.velocity.Y);
240 dust4.position += dust4.velocity * 3f;
241 dust4.color = Main.hslToRgb(Main.rand.NextFloat(), 1f, 0.6f + Main.rand.NextFloat() * 0.2f);
242 }
243 }
244
245 public static void EmitGolfballExplosion_v1(Vector2 Center)
246 {
247 for (float num = 0f; num < 1f; num += 0.085f)
248 {
249 Dust dust = Dust.NewDustPerfect(Center, 278, (num * ((float)Math.PI * 2f)).ToRotationVector2() * new Vector2(2f, 0.5f));
250 dust.fadeIn = 1.2f;
251 dust.noGravity = true;
252 dust.velocity.X *= 0.7f;
253 dust.velocity.Y -= 1.5f;
254 dust.position.Y += 8f;
255 dust.color = Color.Lerp(Color.Silver, Color.White, 0.5f);
256 }
257 for (float num2 = 0f; num2 < 1f; num2 += 0.2f)
258 {
259 Dust dust2 = Dust.NewDustPerfect(Center, 278, (num2 * ((float)Math.PI * 2f)).ToRotationVector2() * new Vector2(1f, 0.5f));
260 dust2.fadeIn = 1.2f;
261 dust2.noGravity = true;
262 dust2.velocity.X *= 0.7f;
263 dust2.velocity.Y -= 0.5f;
264 dust2.position.Y += 8f;
265 dust2.color = Color.Lerp(Color.Silver, Color.White, 0.5f);
266 }
267 float num3 = Main.rand.NextFloatDirection();
268 for (float num4 = 0f; num4 < 1f; num4 += 0.15f)
269 {
270 Dust dust3 = Dust.NewDustPerfect(Center, 278, (num3 + num4 * ((float)Math.PI * 2f)).ToRotationVector2() * 4f);
271 dust3.fadeIn = 1.5f;
272 dust3.velocity *= 0.5f + num4 * 0.8f;
273 dust3.noGravity = true;
274 dust3.velocity.X *= 0.35f;
275 dust3.velocity.Y *= 2f;
276 dust3.velocity.Y -= 1f;
277 dust3.velocity.Y = 0f - Math.Abs(dust3.velocity.Y);
278 dust3.position += dust3.velocity * 3f;
279 dust3.color = Color.Lerp(Color.Silver, Color.White, 0.5f);
280 }
281 }
282 }
283
284 public const int PointsNeededForLevel1 = 500;
285
286 public const int PointsNeededForLevel2 = 1000;
287
288 public const int PointsNeededForLevel3 = 2000;
289
290 public static readonly PhysicsProperties PhysicsProperties = new PhysicsProperties(0.3f, 0.99f);
291
292 public static readonly ContactListener Listener = new ContactListener();
293
295
296 public static BallStepResult StepGolfBall(Entity entity, ref float angularVelocity)
297 {
298 return BallCollision.Step(PhysicsProperties, entity, ref angularVelocity, Listener);
299 }
300
301 public static Vector2 FindVectorOnOval(Vector2 vector, Vector2 radius)
302 {
303 if (Math.Abs(radius.X) < 0.0001f || Math.Abs(radius.Y) < 0.0001f)
304 {
305 return Vector2.Zero;
306 }
307 return Vector2.Normalize(vector / radius) * radius;
308 }
309
310 public static ShotStrength CalculateShotStrength(Vector2 shotVector, ClubProperties clubProperties)
311 {
312 Vector2.Normalize(shotVector);
313 float value = shotVector.Length();
314 float num = FindVectorOnOval(shotVector, clubProperties.MaximumStrength).Length();
315 float num2 = FindVectorOnOval(shotVector, clubProperties.MinimumStrength).Length();
316 float num3 = MathHelper.Clamp(value, num2, num);
317 float relativeStrength = Math.Max((num3 - num2) / (num - num2), 0.001f);
318 return new ShotStrength(num3 * 32f, relativeStrength, clubProperties.RoughLandResistance);
319 }
320
321 public static bool IsPlayerHoldingClub(Player player)
322 {
323 if (player == null || player.HeldItem == null)
324 {
325 return false;
326 }
327 int type = player.HeldItem.type;
328 if (type == 4039 || (uint)(type - 4092) <= 2u || (uint)(type - 4587) <= 11u)
329 {
330 return true;
331 }
332 return false;
333 }
334
335 public static ShotStrength CalculateShotStrength(Projectile golfHelper, Entity golfBall)
336 {
337 int num = Main.screenWidth;
338 if (num > Main.screenHeight)
339 {
340 num = Main.screenHeight;
341 }
342 int num2 = 150;
343 num -= num2;
344 num /= 2;
345 if (num < 200)
346 {
347 num = 200;
348 }
349 float num3 = num;
350 num3 = 300f;
351 if (golfHelper.ai[0] != 0f)
352 {
353 return default(ShotStrength);
354 }
355 Vector2 shotVector = (golfHelper.Center - golfBall.Center) / num3;
356 ClubProperties clubPropertiesFromGolfHelper = GetClubPropertiesFromGolfHelper(golfHelper);
357 return CalculateShotStrength(shotVector, clubPropertiesFromGolfHelper);
358 }
359
361 {
362 return GetClubProperties((short)Main.player[golfHelper.owner].HeldItem.type);
363 }
364
365 public static ClubProperties GetClubProperties(short itemId)
366 {
367 Vector2 vector = new Vector2(0.25f, 0.25f);
368 return itemId switch
369 {
370 4039 => new ClubProperties(vector, Vector2.One, 0f),
371 4092 => new ClubProperties(Vector2.Zero, vector, 0f),
372 4093 => new ClubProperties(vector, new Vector2(0.65f, 1.5f), 1f),
373 4094 => new ClubProperties(vector, new Vector2(1.5f, 0.65f), 0f),
374 4587 => new ClubProperties(vector, Vector2.One, 0f),
375 4588 => new ClubProperties(Vector2.Zero, vector, 0f),
376 4589 => new ClubProperties(vector, new Vector2(0.65f, 1.5f), 1f),
377 4590 => new ClubProperties(vector, new Vector2(1.5f, 0.65f), 0f),
378 4591 => new ClubProperties(vector, Vector2.One, 0f),
379 4592 => new ClubProperties(Vector2.Zero, vector, 0f),
380 4593 => new ClubProperties(vector, new Vector2(0.65f, 1.5f), 1f),
381 4594 => new ClubProperties(vector, new Vector2(1.5f, 0.65f), 0f),
382 4595 => new ClubProperties(vector, Vector2.One, 0f),
383 4596 => new ClubProperties(Vector2.Zero, vector, 0f),
384 4597 => new ClubProperties(vector, new Vector2(0.65f, 1.5f), 1f),
385 4598 => new ClubProperties(vector, new Vector2(1.5f, 0.65f), 0f),
386 _ => default(ClubProperties),
387 };
388 }
389
391 {
392 for (int i = 0; i < 1000; i++)
393 {
394 Projectile projectile = Main.projectile[i];
395 if (projectile.active && projectile.type == 722 && projectile.owner == golfBall.owner)
396 {
397 return Main.projectile[i];
398 }
399 }
400 return null;
401 }
402
404 {
405 for (int i = 0; i < 1000; i++)
406 {
407 Projectile projectile = Main.projectile[i];
408 Vector2 shotVector = golfHelper.Center - projectile.Center;
409 if (projectile.active && ProjectileID.Sets.IsAGolfBall[projectile.type] && projectile.owner == golfHelper.owner && ValidateShot(projectile, Main.player[golfHelper.owner], ref shotVector))
410 {
411 return Main.projectile[i];
412 }
413 }
414 return null;
415 }
416
417 public static bool IsGolfBallResting(Projectile golfBall)
418 {
419 if ((int)golfBall.localAI[1] != 0)
420 {
421 return Vector2.Distance(golfBall.position, golfBall.oldPos[golfBall.oldPos.Length - 1]) < 1f;
422 }
423 return true;
424 }
425
426 public static bool IsGolfShotValid(Entity golfBall, Player player)
427 {
428 Vector2 vector = golfBall.Center - player.Bottom;
429 if (player.direction == -1)
430 {
431 vector.X *= -1f;
432 }
433 if (vector.X >= -16f && vector.X <= 32f && vector.Y <= 16f)
434 {
435 return vector.Y >= -16f;
436 }
437 return false;
438 }
439
440 public static bool ValidateShot(Entity golfBall, Player player, ref Vector2 shotVector)
441 {
442 Vector2 vector = golfBall.Center - player.Bottom;
443 if (player.direction == -1)
444 {
445 vector.X *= -1f;
446 shotVector.X *= -1f;
447 }
448 float num = shotVector.ToRotation();
449 if (num > 0f)
450 {
451 shotVector = shotVector.Length() * new Vector2((float)Math.Cos(0.0), (float)Math.Sin(0.0));
452 }
453 else if (num < -1.5207964f)
454 {
455 shotVector = shotVector.Length() * new Vector2((float)Math.Cos(-1.5207964181900024), (float)Math.Sin(-1.5207964181900024));
456 }
457 if (player.direction == -1)
458 {
459 shotVector.X *= -1f;
460 }
461 if (vector.X >= -16f && vector.X <= 32f && vector.Y <= 16f)
462 {
463 return vector.Y >= -16f;
464 }
465 return false;
466 }
467
468 public static void HitGolfBall(Entity entity, Vector2 velocity, float roughLandResistance)
469 {
470 Vector2 bottom = entity.Bottom;
471 bottom.Y += 1f;
472 Point point = bottom.ToTileCoordinates();
473 Tile tile = Main.tile[point.X, point.Y];
474 if (tile != null && tile.active())
475 {
477 velocity = Vector2.Lerp(velocity * byTileId.GolfPhysics.ClubImpactDampening, velocity, byTileId.GolfPhysics.ImpactDampeningResistanceEfficiency * roughLandResistance);
478 }
479 entity.velocity = velocity;
480 if (entity is Projectile projectile)
481 {
482 projectile.timeLeft = 18000;
483 if (projectile.ai[1] < 0f)
484 {
485 projectile.ai[1] = 0f;
486 }
487 projectile.ai[1] += 1f;
488 projectile.localAI[1] = 1f;
489 Main.LocalGolfState.RecordSwing(projectile);
490 }
491 }
492
493 public static void DrawPredictionLine(Entity golfBall, Vector2 impactVelocity, float chargeProgress, float roughLandResistance)
494 {
495 if (PredictionLine == null)
496 {
498 }
499 PredictionLine.Update(golfBall, impactVelocity, roughLandResistance);
500 PredictionLine.Draw(Main.Camera, Main.spriteBatch, chargeProgress);
501 }
502}
static float Clamp(float value, float min, float max)
Definition MathHelper.cs:46
static double Cos(double d)
static double Abs(double value)
static double Sin(double a)
const double PI
Definition Math.cs:16
static byte Max(byte val1, byte val2)
Definition Math.cs:738
static void PlaySound(int type, Vector2 position, int style=1)
static void BroadcastChatMessage(NetworkText text, Color color, int excludedPlayer=-1)
Definition ChatHelper.cs:46
static Dust NewDustPerfect(Vector2 Position, int Type, Vector2? Velocity=null, int Alpha=0, Color newColor=default(Color), float Scale=1f)
Definition Dust.cs:52
Vector2 velocity
Definition Dust.cs:22
Vector2 Center
Definition Entity.cs:43
Vector2 Bottom
Definition Entity.cs:115
Vector2 position
Definition Entity.cs:14
void OnCollision(PhysicsProperties properties, ref Vector2 position, ref Vector2 velocity, ref BallCollisionEvent collision)
Definition GolfHelper.cs:48
void PutBallInCup(Projectile proj, BallCollisionEvent collision)
Definition GolfHelper.cs:96
void OnPassThrough(PhysicsProperties properties, ref Vector2 position, ref Vector2 velocity, ref float angularVelocity, ref BallPassThroughEvent collision)
static void PutBallInCup_TextAndEffects(Point hitLocation, int plr, int numberOfHits, int projid)
static void EmitGolfballExplosion_v1(Vector2 Center)
static void EmitGolfballExplosion_Old(Vector2 Center)
static readonly PhysicsProperties PhysicsProperties
static FancyGolfPredictionLine PredictionLine
static void HitGolfBall(Entity entity, Vector2 velocity, float roughLandResistance)
static Vector2 FindVectorOnOval(Vector2 vector, Vector2 radius)
static bool ValidateShot(Entity golfBall, Player player, ref Vector2 shotVector)
static ShotStrength CalculateShotStrength(Vector2 shotVector, ClubProperties clubProperties)
static Projectile FindGolfBallForHelper(Projectile golfHelper)
static ClubProperties GetClubPropertiesFromGolfHelper(Projectile golfHelper)
static BallStepResult StepGolfBall(Entity entity, ref float angularVelocity)
static readonly ContactListener Listener
static Projectile FindHelperFromGolfBall(Projectile golfBall)
static void DrawPredictionLine(Entity golfBall, Vector2 impactVelocity, float chargeProgress, float roughLandResistance)
static bool IsGolfBallResting(Projectile golfBall)
static ShotStrength CalculateShotStrength(Projectile golfHelper, Entity golfBall)
static ClubProperties GetClubProperties(short itemId)
static bool IsGolfShotValid(Entity golfBall, Player player)
static bool IsPlayerHoldingClub(Player player)
static TileMaterial GetByTileId(ushort tileId)
static readonly LegacySoundStyle Item129
Definition SoundID.cs:672
static LocalizedText GetProjectileName(int type)
Definition Lang.cs:413
static NetworkText FromKey(string key, params object[] substitutions)
static GolfState LocalGolfState
Definition Main.cs:1876
static SpriteBatch spriteBatch
Definition Main.cs:974
static int myPlayer
Definition Main.cs:1801
static int netMode
Definition Main.cs:2095
static int screenHeight
Definition Main.cs:1721
static void NewText(string newText, byte R=byte.MaxValue, byte G=byte.MaxValue, byte B=byte.MaxValue)
Definition Main.cs:61429
static Camera Camera
Definition Main.cs:289
static Tile[,] tile
Definition Main.cs:1675
static Projectile[] projectile
Definition Main.cs:1691
static UnifiedRandom rand
Definition Main.cs:1387
static int screenWidth
Definition Main.cs:1719
static Microsoft.Xna.Framework.Color hslToRgb(Vector3 hslVector)
Definition Main.cs:44913
static Player[] player
Definition Main.cs:1803
static void SendData(int msgType, int remoteClient=-1, int ignoreClient=-1, NetworkText text=null, int number=0, float number2=0f, float number3=0f, float number4=0f, int number5=0, int number6=0, int number7=0)
Definition NetMessage.cs:88
static BallStepResult Step(PhysicsProperties physicsProperties, Entity entity, ref float entityAngularVelocity, IBallContactListener listener)
ushort type
Definition Tile.cs:8
bool active()
Definition Tile.cs:565
static void HitSwitch(int i, int j)
Definition Wiring.cs:237
static Color Lerp(Color value1, Color value2, float amount)
Definition Color.cs:491
static float Dot(Vector2 value1, Vector2 value2)
Definition Vector2.cs:121
static float Distance(Vector2 value1, Vector2 value2)
Definition Vector2.cs:91
static Vector2 Lerp(Vector2 value1, Vector2 value2, float amount)
Definition Vector2.cs:227
ClubProperties(Vector2 minimumStrength, Vector2 maximumStrength, float roughLandResistance)
Definition GolfHelper.cs:22
ShotStrength(float absoluteStrength, float relativeStrength, float roughLandResistance)
Definition GolfHelper.cs:38