void Awake()
        {
            // Set up a bike with a human driver and jet engine
            IEngine jetEngine   = new JetEngine();
            IDriver humanDriver = new HumanDriver();

            m_PlayerPlane.SetEngine(jetEngine);
            m_PlayerPlane.SetDriver(humanDriver);
            m_PlayerPlane.StartEngine();

            // Set up a bike with a AI driver and a nitro engine
            IEngine nitroEngine   = new NitroEngine();
            IDriver androidDriver = new AndroidDriver();

            m_AndroidPlane.SetEngine(nitroEngine);
            m_AndroidPlane.SetDriver(androidDriver);
            m_AndroidPlane.StartEngine();

            // Set up a bike with a alien driver and a world engine
            IEngine worldEngine = new WorldEngine();
            IDriver alienDriver = new AlienDriver();

            m_AlienPlane.SetEngine(worldEngine);
            m_AlienPlane.SetDriver(alienDriver);
            m_AlienPlane.StartEngine();

            // Set up a bike with a chicken driver and a hydro engine
            IEngine hydroEngine   = new HydroEngine();
            IDriver chickenDriver = new ChickenDriver();

            m_ChickenPlane.SetEngine(hydroEngine);
            m_ChickenPlane.SetDriver(chickenDriver);
            m_ChickenPlane.StartEngine();
        }
示例#2
0
    // Use this for initialization
    void Start()
    {
        agents = new List <NEEDSIMNode> ();
        agent1 = null;
        agent2 = null;

        state = State.NoConversation;


        worldEngine = new WorldEngine();
        worldEngine.loadWorldFile();

        dialogueGenerator = new DialogueGenerator(worldEngine);

        cParams = new ConversationalParamaters(ConversationalParamaters.conversationType.helloOnly, "<agent1>", "<agent2>");
        cParams.greetingMode         = ConversationalParamaters.GreetingMode.fourTurn;
        cParams.farewellMode         = ConversationalParamaters.FarewellMode.simple;
        cParams.conversationLocation = worldEngine.world.findByProperNoun("Germany");

        QUDitem q = new QUDitem(QUDitem.ExchangeTypeEnum.where);

        q.subject = worldEngine.world.findByProperNoun("Westerberg Campus");

        cParams.addQUDitem(q);
    }
示例#3
0
    void Start()
    {
        WorldEngine     = GetComponent <WorldEngine>();
        NoiseMapService = GetComponent <NoiseMapService>();
        MeshService     = GetComponent <MeshService>();

        EventBus.Manager.Subscribe(EventBus.Actions.GENERATE_WORLD_COMPLETE, generateLakes);
    }
    public override void OnInspectorGUI()
    {
        DrawDefaultInspector();

        WorldEngine myScript = (WorldEngine)target;

        if (GUILayout.Button("Generate World"))
        {
            // EventBus.Manager.Broadcast(EventBus.Actions.GENERATE_WORLD, "");
            GameObject.Find("WorldEngine").GetComponent <WorldEngine>().generateWorld("", "");
        }


        if (GUILayout.Button("Generate Chunk"))
        {
            // EventBus.Manager.Broadcast(EventBus.Actions.GENERATE_CHUNK, "");
            GameObject.Find("WorldEngine").GetComponent <WorldEngine>().generateChunk(0, 1);
        }
    }
        private void newWorld()
        {
            worldManager = new WorldEngine();
            worldManager.newWorld("Hello World");


            //insert objects
            PhysicalEntity pe0;

            pe0            = new PhysicalEntity(worldManager.typeDictionary.tryGetValue("area"));
            pe0.properNoun = "Europe";
            pe0.oneOfAKind = true;
            int europe = worldManager.world.add(pe0);//int is the ID of the object


            PhysicalEntity pe;

            pe            = new PhysicalEntity(worldManager.typeDictionary.tryGetValue("country"));
            pe.properNoun = "Germany";
            pe.oneOfAKind = true;
            pe.setSpatialParent(Preposition.@in, pe0);
            int germany = worldManager.world.add(pe);//int is the ID of the object

            PhysicalEntity pe2 = new PhysicalEntity(worldManager.typeDictionary.tryGetValue("state"));

            pe2.properNoun = "LowerSaxony";
            pe2.setSpatialParent(Preposition.@in, pe);
            pe2.oneOfAKind = true;

            int lowerSaxony = worldManager.world.add(pe2);//int is the ID of the object

            PhysicalEntity pe3 = new PhysicalEntity(worldManager.typeDictionary.tryGetValue("state"));

            pe3.properNoun = "Osnabrück";
            pe3.setSpatialParent(Preposition.@in, pe2);
            pe3.oneOfAKind = true;

            int osna = worldManager.world.add(pe3);//int is the ID of the object

            PhysicalEntity nrw = new PhysicalEntity(worldManager.typeDictionary.tryGetValue("state"));

            nrw.properNoun = "North Rhine Westfalia";
            nrw.setSpatialParent(Preposition.@in, pe2);
            nrw.oneOfAKind = true;

            int nrwInt = worldManager.world.add(nrw);//int is the ID of the object

            PhysicalEntity pe4 = new PhysicalEntity(worldManager.typeDictionary.tryGetValue("area"));

            pe4.properNoun = "Westerberg Campus";
            pe4.setSpatialParent(Preposition.@in, pe3);
            pe4.oneOfAKind = true;

            int westerberg = worldManager.world.add(pe4);//int is the ID of the object

            PhysicalEntity pe5 = new PhysicalEntity(worldManager.typeDictionary.tryGetValue("area"));

            pe5.properNoun = "Schloss Campus";
            pe5.setSpatialParent(Preposition.@in, pe3);//in osnabrueck
            pe5.oneOfAKind = true;

            int schloss = worldManager.world.add(pe5);//int is the ID of the object

            PhysicalEntity pe6 = new PhysicalEntity(worldManager.typeDictionary.tryGetValue("area"));

            pe6.properNoun = "Mensa";
            pe6.setSpatialParent(Preposition.@on, pe4);
            pe6.oneOfAKind = false;

            int mensa = worldManager.world.add(pe6);//int is the ID of the object

            PhysicalEntity pe7 = new PhysicalEntity(worldManager.typeDictionary.tryGetValue("banana"));

            //pe4.properNoun = "Westerberg Campus";
            pe7.setSpatialParent(Preposition.@in, pe6);
            pe7.oneOfAKind = true;

            int banana = worldManager.world.add(pe7);//int is the ID of the object

            PhysicalEntity pe8 = new PhysicalEntity(worldManager.typeDictionary.tryGetValue("coffee"));

            //pe4.properNoun = "Westerberg Campus";
            pe8.setSpatialParent(Preposition.@in, pe6);
            pe8.oneOfAKind = true;

            int coffee = worldManager.world.add(pe8);//int is the ID of the object

            PhysicalEntity pe9 = new PhysicalEntity(worldManager.typeDictionary.tryGetValue("mango"));

            //pe4.properNoun = "Westerberg Campus";
            pe9.setSpatialParent(Preposition.@in, pe6);
            pe9.oneOfAKind = true;

            int mango = worldManager.world.add(pe9);//int is the ID of the object

            PhysicalEntity pe10 = new PhysicalEntity(worldManager.typeDictionary.tryGetValue("banana"));

            //pe4.properNoun = "Westerberg Campus";
            pe10.setSpatialParent(Preposition.@in, pe6);
            pe10.oneOfAKind = true;

            int banana2 = worldManager.world.add(pe10);//int is the ID of the object

            PhysicalEntity pe11 = new PhysicalEntity(worldManager.typeDictionary.tryGetValue("bar"));

            pe11.properNoun = "Sauber von Oz";
            pe11.setSpatialParent(Preposition.@in, worldManager.world.findByProperNoun("Osnabrück"));
            pe11.oneOfAKind = true;

            int svo = worldManager.world.add(pe10);//int is the ID of the object

            PhysicalEntity pe12 = new PhysicalEntity(worldManager.typeDictionary.tryGetValue("beer"));

            //pe11.properNoun = "Sauber von Oz";
            pe11.setSpatialParent(Preposition.@in, pe11);
            pe11.oneOfAKind = true;

            int thingy = worldManager.world.add(pe12);//int is the ID of the object

            PhysicalEntity_Agent pe13 = new PhysicalEntity_Agent(worldManager.typeDictionary.tryGetValue("human"), "John", "Snow", PhysicalEntity_Agent.Gender.male);

            //pe11.properNoun = "Sauber von Oz";
            pe11.setSpatialParent(Preposition.on, pe4);
            pe11.oneOfAKind = true;

            int agent1 = worldManager.world.add(pe13);//int is the ID of the object

            PhysicalEntity_Agent pe14 = new PhysicalEntity_Agent(worldManager.typeDictionary.tryGetValue("human"), "Mary", "Jane", PhysicalEntity_Agent.Gender.female);

            //pe11.properNoun = "Sauber von Oz";
            pe11.setSpatialParent(Preposition.on, pe4);
            pe11.oneOfAKind = true;

            int agent2 = worldManager.world.add(pe14);//int is the ID of the object

            /*END adding objects*/

            worldManager.saveWorldFile();
            loadWorld();
        }
 private void closeButton_Click(object sender, EventArgs e)
 {
     worldManager = null;
     worldListBox.Items.Clear();
     worldGroupBox.Enabled = false;
 }
 public EditorForm()
 {
     InitializeComponent();
     worldManager = new WorldEngine();
 }
        public Conversation conversation;//may need to make this a list of conversations if multiples convos are going on at once
        //private list of recent conversations and utterances

        public DialogueGenerator(WorldEngine wm)
        {
            worldManager    = wm;
            vocabDictionary = new LinguisticDictionary.LinguisticDictionary();
        }