Ejemplo n.º 1
0
        // -----------------------

        private void registerChaseService()
        {
            DFAgentDescription dfAgentDescription = new DFAgentDescription();

            dfAgentDescription.AgentId = AId;
            DFServiceDescription serviceDescription = new DFServiceDescription();

            serviceDescription.Type = ChaseVocabulary.CHASE_TYPE;
            serviceDescription.Name = ChaseVocabulary.CHASE_SERVICE;
            dfAgentDescription.AddService(serviceDescription);
            DFService.RegisterService(this, dfAgentDescription);
        }
    protected override void Action()
    {
        DFAgentDescription dfAgentDescription = new DFAgentDescription();

        dfAgentDescription.AgentId = Agent.AId;
        DFServiceDescription collectWoodServiceDescription = new DFServiceDescription();

        collectWoodServiceDescription.Type = WorkVocabulary.WORK;
        collectWoodServiceDescription.Name = WorkVocabulary.COLLECT_WOOD_SERVICE;
        DFServiceDescription collectStoneServiceDescription = new DFServiceDescription();

        collectStoneServiceDescription.Type = WorkVocabulary.WORK;
        collectStoneServiceDescription.Name = WorkVocabulary.COLLECT_STONE_SERVICE;
        dfAgentDescription.AddService(collectStoneServiceDescription);
        dfAgentDescription.AddService(collectWoodServiceDescription);
        DFService.RegisterService(Agent, dfAgentDescription);
    }