Example #1
0
        static void Initialize()
        {
            ArtemisEngine.RegisterMultiforms(typeof(MultiformTemplate));

            /* Alternative Ways of registering the MultiformTemplate:
             *
             * ArtemisEngine.RegisterMultiforms(new MultiformTemplate("name"));
             *
             * ArtemisEngine.RegisterMultiforms(new MultiformTemplate());
             *
             * The user can also decorate the MultiformTemplate class with a
             * NamedMultiformAttribute.
             */

            ArtemisEngine.StartWith("MultiformTemplate");
        }
Example #2
0
        static void Initialize()
        {
            var image = AssetLoader.Load <Texture2D>("text-image1");

            AssetLoader.RegisterAssetImporter <string>(new TestAssetImporter(), ".test");

            AssetLoader.PrepareAssetGroup("test-group", SearchOption.AllDirectories);
            var image2 = AssetLoader.Load <Texture2D>("test-group.test-image1");

            var group  = AssetLoader.GetGroup("test-group");
            var image3 = group.GetAsset <Texture2D>("test-image1");

            var text = group.GetAsset <string>("test-asset");

            Console.WriteLine(text);

            ArtemisEngine.RegisterMultiforms(
                new MainMultiform1("Main1"),
                new MainMultiform2("Main2"));
            ArtemisEngine.StartWith("Main2");

            AssetLoader.UnloadAssetGroup("test-group");
        }
Example #3
0
 static void Initialize()
 {
     ArtemisEngine.RegisterMultiforms(new MultiformTemplate());
     ArtemisEngine.StartWith("MultiformTemplate");
 }