forfeiture, abandoning, entry_fee_collection at start

This commit is contained in:
2026-08-14 11:13:01 +05:30
parent 9970488938
commit 74d9fae6e6
54 changed files with 6214 additions and 2576 deletions
+14 -1
View File
@@ -46,7 +46,12 @@ public class AiBotController : NetworkBehaviour
void Awake()
{
#if UNITY_SERVER
enabled = false;
return;
#else
EnsureTrajectoryLines();
#endif
}
void OnEnable()
@@ -100,6 +105,10 @@ public class AiBotController : NetworkBehaviour
return existingLine;
}
Shader shader = Shader.Find("Sprites/Default");
if (shader == null)
return null;
GameObject go = new GameObject(name);
go.transform.SetParent(transform, false);
@@ -109,7 +118,7 @@ public class AiBotController : NetworkBehaviour
line.endWidth = trajectoryLineWidth;
line.numCapVertices = 4;
line.sortingOrder = trajectorySortingOrder;
line.material = new Material(Shader.Find("Sprites/Default"));
line.material = new Material(shader);
line.startColor = color;
line.endColor = color;
line.positionCount = 0;
@@ -1066,9 +1075,13 @@ public class AiBotController : NetworkBehaviour
public void Setup(Team team)
{
#if UNITY_SERVER
return;
#else
aiTeam = team;
RefreshAiPucks();
isEnabled = true;
#endif
}
void RefreshAiPucks()