forfeiture, abandoning, entry_fee_collection at start
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user