Beispiel #1
0
    private void setupWorld()
    {
        GDKnyttWorldImpl world = GDKnyttDataStore.KWorld;

        GDWorld.setWorld(this, world);
        GDWorld.loadWorld();
        createJuni();

        this.changeArea(GDWorld.KWorld.CurrentSave.getArea(), true);
        Juni.moveToPosition(CurrentArea, GDWorld.KWorld.CurrentSave.getAreaPosition());
        saveGame(Juni, false);

        UI.initialize(this);
        UI.updatePowers();

        mapPanel = GetNode <MapPanel>("UICanvasLayer/MapBackgroundPanel/MapPanel");
        if (hasMap())
        {
            mapPanel.init(GDWorld.KWorld, Juni);
            GetNode <TouchPanel>("UICanvasLayer/TouchPanel").InstallMap();
        }
        else
        {
            mapPanel.init(null, null);
        }
    }
Beispiel #2
0
    private void setupWorld()
    {
        GDKnyttWorldImpl world;

        if (GDKnyttDataStore.KWorld != null)
        {
            world = GDKnyttDataStore.KWorld;
        }
        else
        {
            world = new GDKnyttWorldImpl();
            world.setDirectory(this.demoWorld, "");
            var save_data = GDKnyttAssetManager.loadTextFile(this.demoWorld + "/DefaultSavegame.ini");
            world.CurrentSave = new KnyttSave(world, save_data, 1);
        }

        GDWorld.setWorld(this, world);
        createJuni();
        GDWorld.loadWorld();

        this.changeArea(GDWorld.KWorld.CurrentSave.getArea(), true);
        Juni.moveToPosition(CurrentArea, GDWorld.KWorld.CurrentSave.getAreaPosition());

        UI.initialize(this);
        UI.updatePowers();
    }