예제 #1
0
    private KnyttWorldInfo getWorldInfo(byte[] ini_bin, KeyDataCollection merge_to = null)
    {
        string           ini   = GDKnyttAssetManager.loadTextFile(ini_bin);
        GDKnyttWorldImpl world = new GDKnyttWorldImpl();

        world.loadWorldConfig(ini);
        if (merge_to != null)
        {
            merge_to.Merge(world.INIData["World"]);
        }
        return(world.Info);
    }
예제 #2
0
        public void check_merge_keys()
        {
            var keys1 = new KeyDataCollection();
            keys1.AddKey( "key1", "value1");
            keys1.AddKey( "key2", "value2");
            keys1.AddKey( "key3", "value3");

            var keys2 = new KeyDataCollection();
            keys2.AddKey("key1", "value11");
            keys2.AddKey("key4", "value4");

            keys1.Merge(keys2);

            Assert.That(keys1["key1"], Is.EqualTo("value11"));
            Assert.That(keys1["key2"], Is.EqualTo("value2"));
            Assert.That(keys1["key3"], Is.EqualTo("value3"));
            Assert.That(keys1["key4"], Is.EqualTo("value4"));
        }
예제 #3
0
        public void check_merge_keys()
        {
            var keys1 = new KeyDataCollection();

            keys1.AddKey("key1", "value1");
            keys1.AddKey("key2", "value2");
            keys1.AddKey("key3", "value3");

            var keys2 = new KeyDataCollection();

            keys2.AddKey("key1", "value11");
            keys2.AddKey("key4", "value4");

            keys1.Merge(keys2);

            Assert.That(keys1["key1"], Is.EqualTo("value11"));
            Assert.That(keys1["key2"], Is.EqualTo("value2"));
            Assert.That(keys1["key3"], Is.EqualTo("value3"));
            Assert.That(keys1["key4"], Is.EqualTo("value4"));
        }