[feat] Egun

This commit is contained in:
rhailrake
2023-04-28 02:10:32 +06:00
committed by Aviu00
parent 663cae3181
commit 72fa97798f
35 changed files with 425 additions and 15 deletions

View File

@@ -251,14 +251,19 @@ public sealed partial class GunSystem
_ammoCount.Visible = true;
_ammoCount.Text = $"x{count:00}";
max = Math.Min(max, 8);
FillBulletRow(_bulletsList, count, max);
float step = 1;
if (max > 8)
{
step = ((float)max / 8);
}
FillBulletRow(_bulletsList, count, max, step);
}
private static void FillBulletRow(Control container, int count, int capacity)
private static void FillBulletRow(Control container, int count, int capacity, float step = 1)
{
var colorGone = Color.FromHex("#000000");
var color = Color.FromHex("#E00000");
int emptyNumber = 0;
// Draw the empty ones
for (var i = count; i < capacity; i++)