-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implemented crosshair scaling to FOV
- Loading branch information
Showing
9 changed files
with
216 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
namespace Ausar.Enums | ||
{ | ||
public enum ECrosshairScaleMode : byte | ||
{ | ||
Off, | ||
Scale, | ||
ScaleSmartLink | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
namespace Ausar.Extensions | ||
{ | ||
public static class StringExtensions | ||
{ | ||
public static string Truncate(this string in_str, int in_maxLength, bool in_isEllipsis = false) | ||
{ | ||
if (string.IsNullOrEmpty(in_str)) | ||
return in_str; | ||
|
||
if (in_str.Length <= in_maxLength) | ||
return in_str; | ||
|
||
if (in_isEllipsis) | ||
{ | ||
if (in_maxLength <= 3) | ||
{ | ||
return in_str[..in_maxLength]; | ||
} | ||
else | ||
{ | ||
return in_str[..(in_maxLength - 3)] + "..."; | ||
} | ||
} | ||
|
||
return in_str[..in_maxLength]; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
namespace Ausar.Helpers | ||
{ | ||
internal class MathHelper | ||
{ | ||
public static float Lerp(float in_start, float in_end, float in_time) | ||
{ | ||
return in_start + (in_end - in_start) * in_time; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters