コード例 #1
0
    public override void GetContent(IDocumentationBuilder _)
    {
        base.GetContent(_);

        var graph = new ScaffoldGraph();
        var node  = graph.BeginNode <SceneTypeNode>("UIScene").EndNode() as SceneTypeNode;

        _.Paragraph("Scene Types exist on the root game object of a scene. These components need to live on the root game-object of the scene. This allows uFrame to know what scene has been loaded and to keep a reference for removing this scene when needed.");


        _.Title2("Generated Scene Types");
        _.Paragraph("The scene type is a mono behaviour that will go on your root scene object.  This allows uFrame to associate a game object so it can easily be destroyed when you want to unload a scene.  This also allows uFrame to listen for when the scene has actually been loaded.");
        _.Break();
        _.TemplateExample <SceneTemplate, SceneTypeNode>(node, true);
        _.Break();
        _.Title2("Generated Scene Loaders");
        _.Paragraph("A scene loader is generated for every scene type that exists in the graph.");
        _.Paragraph("The scene loader lives as a gameobject on the uFrame Kernel, when the same corresponding 'Scene Type' has been loaded," +
                    " the scene loader will get a reference to the scene type and allow you to load it accordingly.  This gives very fine grained " +
                    "control on how scenes are loaded and unloaded.");
        _.Break();
        _.TemplateExample <SceneLoaderTemplate, SceneTypeNode>(node, true);


        _.AlsoSeePages(typeof(UsingSceneLoaders));
    }
コード例 #2
0
    public override void GetContent(IDocumentationBuilder _)
    {
        base.GetContent(_);

        var graph = new ScaffoldGraph();
        var node = graph.BeginNode<SceneTypeNode>("UIScene").EndNode() as SceneTypeNode;
        _.Paragraph("Scene Types exist on the root game object of a scene. These components need to live on the root game-object of the scene. This allows uFrame to know what scene has been loaded and to keep a reference for removing this scene when needed.");

        _.Title2("Generated Scene Types");
        _.Paragraph("The scene type is a mono behaviour that will go on your root scene object.  This allows uFrame to associate a game object so it can easily be destroyed when you want to unload a scene.  This also allows uFrame to listen for when the scene has actually been loaded.");
        _.Break();
        _.TemplateExample<SceneTemplate, SceneTypeNode>(node, true);
        _.Break();
        _.Title2("Generated Scene Loaders");
        _.Paragraph("A scene loader is generated for every scene type that exists in the graph.");
        _.Paragraph("The scene loader lives as a gameobject on the uFrame Kernel, when the same corresponding 'Scene Type' has been loaded," +
                    " the scene loader will get a reference to the scene type and allow you to load it accordingly.  This gives very fine grained " +
                    "control on how scenes are loaded and unloaded.");
        _.Break();
        _.TemplateExample<SceneLoaderTemplate, SceneTypeNode>(node, true);

        _.AlsoSeePages(typeof(UsingSceneLoaders));
    }
コード例 #3
0
        public override void GetContent(IDocumentationBuilder _)
        {
            base.GetContent(_);

            _.Paragraph("System loaders are used to setup the uFrame Runtime with any dependencies it might need before the game begins.");
            _.Break();


            _.Title2("Custom System Loaders");
            _.Paragraph("In some cases creating a custom system loader can be very useful for different environments.  e.g. Dev Environment, Production Environment..etc");
            _.Paragraph("To create a custom system loader, derive from SystemLoader, override the load method, and add it to the kernel.");
            _.Break();
            _.Break();
            _.Title2("Generated System Loaders From Subsystems");
            _.Paragraph("All subsystem nodes inside a project will generate a 'SystemLoader'. These register an instance of every element " +
                        "controller that lives inside of it, as well as any 'Instances' defined on it.");

            _.Break();

            var graph = new ScaffoldGraph();
            InstancesReference instance;

            graph.BeginNode <SubsystemNode>(Name)
            .AddItem <InstancesReference>("MyInstance", out instance);

            var subsystem = graph.EndNode();

            graph.BeginNode <ElementNode>("Player");
            var playerNode = graph.EndNode();

            graph.PushFilter(subsystem);
            graph.SetItemLocation(playerNode, new Vector2(10f, 10f));

            instance.SourceIdentifier = playerNode.Identifier;

            _.TemplateExample <SystemLoaderTemplate, SubsystemNode>(subsystem as SubsystemNode, true, "Load");
        }