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

            SceneData = editor.SceneRenderData;
        }
Esempio 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));
     }
 }
Esempio 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));
        }
Esempio n. 4
0
 public new virtual void Initialize(RyneSceneRenderData renderData)
 {
     base.Initialize(renderData);
 }