protected override void OnStartGame() { for (int i = 0; i < _spawnAmount; i++) { AgentController ac = new AgentController(); PlayerManager.AddController (ac); ac.CreateAgent (_spawnCode,Vector2d.zero); } }
protected override void OnStartGame() { for (int i = 0; i < _spawnAmount; i++) { AgentController ac = new AgentController(); PlayerManager.AddController(ac); spawnedAgents.Add(ac.CreateAgent(_spawnCode, Vector2d.zero)); } }
void Update() { LockstepManager.Visualize(); if (Input.GetKeyDown(KeyCode.Space)) { LSAgent temp = controller.CreateAgent(AgentCode.Minion); //temp.Body.Parent = agent.Body; } }
void Start() { LockstepManager.Initialize(); AgentController controller = AgentController.Create(); for (int i = 0; i < 256; i++) { controller.CreateAgent(AgentCode.Footman); } PlayerManager.AddAgentController(controller); }
protected override void OnGameStart() { AgentController ac = AgentController.Create(); PlayerManager.AddController(ac); for (int i = 0; i < agentsToSpawn; i++) { spawnedAgents.Add(ac.CreateAgent(agentName, Vector2d.zero)); } }
public virtual void ProcessSpawn(byte conID, Vector2d pos, ushort agentCodeID, ushort count, string UID) { cacheTarget = agentCodeID; cacheCount = count; cacheUID = UID; AgentController ac = AgentController.InstanceManagers[conID]; cacheAgentCode = AgentController.GetAgentCode(cacheTarget); bufferSpawnedAgents.FastClear(); for (int i = 0; i < cacheCount; i++) { LSAgent agent = ac.CreateAgent(cacheAgentCode, pos); bufferSpawnedAgents.Add(agent); } }
/* * Command com = new Command (InputCodeManager.GetCodeID ("Spawn")); * com.ControllerID = cont.ControllerID; * com.Position = position; * com.Target = (ushort)AgentController.GetAgentCodeIndex(agentCode); * com.Count = count; * return com; */ protected override void OnExecute(Command com) { byte conID = com.ControllerID; Vector2d pos = com.GetData <Vector2d>(); ushort target = (ushort)com.GetData <DefaultData>(0).Value; ushort count = (ushort)com.GetData <DefaultData>(1).Value; AgentController ac = AgentController.InstanceManagers [conID]; string agentCode = AgentController.GetAgentCode(target); for (int i = 0; i < count; i++) { ac.CreateAgent(agentCode, pos); } }
protected override void OnRawExecute(Command com) { if (com.InputCode == RegisterCode) { AgentController cont = AgentController.Create(); var agent = cont.CreateAgent(this._FPSAgentCode, _spawnPos); int playerID = (int)com.GetData <DefaultData> ().Value; if (playerID == ClientManager.ClientID) { PlayerManager.AddController(cont); FPSAgent = agent; FPSAgent.GetAbility <FPSTurn> ().IsControlling = true; cont.AddToSelection(FPSAgent); } } }
protected override void OnExecute(Command com) { byte conID = com.ControllerID; Vector2d pos = com.GetData <Vector2d>(); cacheTarget = (ushort)com.GetData <DefaultData>(0).Value; cacheCount = (ushort)com.GetData <DefaultData>(1).Value; AgentController ac = AgentController.InstanceManagers [conID]; cacheAgentCode = AgentController.GetAgentCode(cacheTarget); bufferSpawnedAgents.FastClear(); for (int i = 0; i < cacheCount; i++) { LSAgent agent = ac.CreateAgent(cacheAgentCode, pos); bufferSpawnedAgents.Add(agent); } }
public LSAgent SpawnUnit(AgentController controller, string agentCode, Vector2d position) { LSAgent agent = controller.CreateAgent(agentCode, position); return(agent); }