Ejemplo n.º 1
0
        public Game(SceneEditor editor) : base(editor.StateManager)
        {
            Editor       = editor;
            FromEditor   = true;
            GameFocussed = true;

            SceneData = editor.SceneRenderData;
        }
Ejemplo n.º 2
0
 public void UpdateMaterial(Entity owner, RyneSceneRenderData renderData, Material newMaterial, int materialId)
 {
     owner.SetChangedInEditor(true);
     // Update material in render backend
     renderData.SetMaterial(owner.RenderId, materialId, newMaterial.ToRenderMaterial());
     // Update local material
     if (owner.Mesh.CustomMaterials.Count > materialId)
     {
         owner.Mesh.CustomMaterials[materialId] = Material.Create(renderData.GetMaterial(owner.RenderId, materialId));
     }
 }
Ejemplo n.º 3
0
        public Game(StateManager manager) : base(manager)
        {
            SceneData = new RyneSceneRenderData();
            SceneData.SetRenderer(RyneRendererType.RayTracer);

            FromEditor   = false;
            GameFocussed = true;

            // Set render transform to render the game full window
            Global.Application.SetRenderTransform(new Int2(0), new Int2(Global.Config.Width, Global.Config.Height));
        }
Ejemplo n.º 4
0
 public new virtual void Initialize(RyneSceneRenderData renderData)
 {
     base.Initialize(renderData);
 }