public override void Enable() { base.Enable(); _mouseFollow = new Doodad(Controller.Level); _mouseFollow.Models.Add(Game.ModelFactory.CreatePolygon(PolygonFactory.CreateRectangle(4, 0.5f))); _mouseFollow.Models[0].SetTexture(Controller.Renderer.Textures["default.png"]); _mouseFollow.IsPortalable = true; }
public override void Enable() { base.Enable(); isSecondPortal = false; portalPrevious = null; unsnapAngle = 0; _mouseFollow = new Doodad(Controller.Level); _mouseFollow.Models.Add(ModelFactory.CreatePortal()); }
public override void Enable() { base.Enable(); _translator = new Doodad(Controller.Level); //_translator.Models.Add(translationModel); //_translator.Visible = true; //_translator.DrawOverPortals = true; _dragState = DragState.Neither; Controller.CamControl.CameraMoved += UpdateTranslation; UpdateTranslation(Controller.CamControl); _mode = Mode.Position; }
public EditorScene(Renderer renderer = null) { Renderer = renderer; #region create background Model background = Game.ModelFactory.CreatePlane(); background.Texture = Renderer?.GetTexture("grid.png"); background.SetColor(new Vector3(1, 1, 0.5f)); background.Transform.Position = new Vector3(0, 0, -5f); float size = 50; background.Transform.Scale = new Vector3(size, size, size); background.TransformUv.Size = size; Doodad back = new Doodad(); back.Models.Add(background); Doodads.Add(back); #endregion }
public override void Enable() { base.Enable(); _polygon = new Doodad(Controller.Level); _polygon.IsPortalable = true; }