private static void PostInit() { Renderer r = new Renderer(new Matrix4x4(Vector.up * 2, new Vector(0, 0, 0), Vector.one * 0.01f), modelsAsset[1]); IncBehaviour.incBehaviours = new List <IncBehaviour>(); foreach (var inc in IncBehaviour.incBehaviours) { inc.Update(); } Vector rot = r.matrix.localEulerAngles; Vector pos = Vector.zero; currentBuffer.arrows = new ArrowsView(r.matrix); IncBehaviour rotator = new IncBehaviour(() => { r.matrix.globalEulerAngles = rot; if (Input.IsKeyPressed(Keys.Left)) { rot -= Vector.forward * 2; } if (Input.IsKeyPressed(Keys.Right)) { rot += Vector.forward * 2; } if (Input.IsKeyPressed(Keys.Up)) { rot += Vector.right * 2; } if (Input.IsKeyPressed(Keys.Down)) { rot -= Vector.right * 2; } if (Input.IsKeyPressed(Keys.PageUp)) { rot += Vector.up * 2; } if (Input.IsKeyPressed(Keys.PageDown)) { rot -= Vector.up * 2; } //pos += Vector.forward * 0.1f; //Program.currentEngine.Window.Title = r.matrix.localEulerAngles.ToString(); }); }
public static void Destroy(IncBehaviour behaviour) { incBehaviours.Remove(behaviour); }