示例#1
0
        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);
        }
示例#2
0
 private void ApplicationState_ExecutionRequested(object sender, IExecuteEventArgs e)
 {
     ExecuteItemAsync(e.Item);
 }