public void Execute(IExecuteEventArgs args) { var tile = _agent.Tile; // remove current tower args.Manager.Remove(_agent); // create new tower var towerArgs = new CreateAgentArgs() { Tile = tile }; var tower = args.Manager.CreateAgent(GunTowerBehaviour.AgentTypeName, towerArgs); args.Manager.Register(tower); args.Manager.Site(tower); }
private void ApplicationState_ExecutionRequested(object sender, IExecuteEventArgs e) { ExecuteItemAsync(e.Item); }