static void Main(string[] args) { Console.WriteLine("Hello World!"); List <GamerEntity> gamers = new List <GamerEntity>(); for (int i = 0; i < 1; i++) { gamers.Add(StartAI(Guid.NewGuid().ToString())); Console.WriteLine($"AI 蛇 : {i}"); } Console.WriteLine("Create Finish"); Console.ReadLine(); GamerEntity StartAI(string devicedId) { GamerEntity ai = new GamerEntity(devicedId); ai.Start(agentServerIP, new ConsoleBotProxy()); return(ai); } }
// Start is called before the first frame update void Start() { ai = new GamerEntity(Guid.NewGuid().ToString()); ai.Start(agentServerIP, new ConsoleBotProxy()); ai.onReceiveGamerInfo += Ai_onReceiveGamerInfo; }