public Game(SceneEditor editor) : base(editor.StateManager) { Editor = editor; FromEditor = true; GameFocussed = true; SceneData = editor.SceneRenderData; }
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)); } }
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)); }
public new virtual void Initialize(RyneSceneRenderData renderData) { base.Initialize(renderData); }