public override void Initialize() { if (Game != null) { base.Initialize(); // Grab a ref of our sprite batch if (SpriteBatch == null) { SpriteBatch = Globals.RenderWindow.RenderWindow.SpriteBatch; } // Load our textures Cursor = Globals.Game.Content.Load <Texture2D>("PathingCursor"); // Hook the global event in case we are told to place a node somewhere Globals.OnPathingNodePlaced += OnPathingNodePlaced; Globals.OnSaveCurrentPath += OnSavePathingNodes; Globals.OnCanceledCurrentPath += OnCanceledPath; } if (RenderWindow == null) { RenderWindow = Globals.RenderWindow; } }
protected override void Dispose(bool disposing) { base.Dispose(disposing); RenderWindow = null; Picker = null; }
public EditorActor(Game game, string folderName, string name, conRenderer renderer) : base(game, folderName, name) { RenderWindow = renderer; ObjectTypeName = string.Empty; }
protected override void Dispose(bool disposing) { base.Dispose(disposing); basicEffect = null; Nodes = null; RenderWindow = null; }
public frmDuplicateSpecial(List <VisualObject> obj, conRenderer renderer) { InitializeComponent(); RenderWindow = renderer; SceneObjects = obj; }
public frmAddLabel(conRenderer renderer) { InitializeComponent(); RenderWindow = renderer; Globals.IsDialogWindowOpen = true; }
public EditorGroup(Game game, conRenderer renderer) : base(game) { RenderWindow = renderer; ObjectTypeName = string.Empty; Globals.OnSceneEvent += OnSceneEvent; }
public override void UnloadContent() { base.UnloadContent(); Picker.UnloadContent(); Picker = null; RenderWindow = null; }
public LedgeBuilder(Game game, conRenderer renderer) : base(game) { Sequences = new List <Sequence2D>(); Nodes = new List <LedgeNodeDisplay>(); Role = LedgeRole.Ground; RenderWindow = renderer; Globals.OnSceneEvent += OnSceneEventTriggered; }
public override void LoadContent() { if (RenderWindow == null) { RenderWindow = Globals.RenderWindow; } Picker = new BoundingBoxRenderer(Game); Picker.Initialize(); base.LoadContent(); }
public frmGroupObjects(List <VisualObject> obj, conRenderer renderer) { Globals.IsDialogWindowOpen = true; RenderWindow = renderer; InitializeComponent(); SceneObjects = obj; rlSceneObjects.DataSource = SceneObjects; rlSceneObjects.DisplayMember = "Name"; }
public EditorEmitter(Game game, conRenderer renderer) : base(game) { RenderWindow = renderer; ShowBoundingBox = true; RespawnParticles = true; ParticleColor = Color.Gray; MinParticles = 6; MaxParticles = 10; MinAcceleration = 0.5f; MaxAcceleration = 2.0f; MinLifeSpan = 0.1f; MaxLifeSpan = 1.0f; MinInitialSpeed = 0.5f; MaxInitialSpeed = 2.0f; MinScale = 0.1f; MaxScale = 1.0f; }
public override void LoadContent() { if (RenderWindow == null) { RenderWindow = Globals.RenderWindow; } if (BoundingBoxRenderer == null) { BoundingBoxRenderer = new BoundingBoxRenderer(Game); BoundingBoxRenderer.SpriteBatch = SpriteBatch; BoundingBoxRenderer.Initialize(); } if (ClipPlayer.Texture == null) { ClipPlayer.Texture = Utilitys.TextureFromFile(Globals.Game.GraphicsDevice, Globals.GetDestinationTexturePath(SpriteSheetFileName)); } base.LoadContent(); }
public override void LoadContent() { if (RenderWindow == null) { RenderWindow = Globals.RenderWindow; } CustomEffect = GameScreen.Content.Load <Effect>("SpriteShader"); OnClick += OnButtonClicked; if (Texture == null) { Texture = Utilitys.TextureFromFile(Globals.Game.GraphicsDevice, Globals.GetDestinationTexturePath(AssetName)); } BoundingBoxRenderer = new BoundingBoxRenderer(Game); BoundingBoxRenderer.Initialize(); base.LoadContent(); }
public override void LoadContent() { if (basicEffect == null) { basicEffect = new BasicEffect(GraphicsDevice); basicEffect.VertexColorEnabled = true; } foreach (var n in Nodes) { if (n != null) { n.LoadContent(); } } if (RenderWindow == null) { RenderWindow = Globals.RenderWindow; } base.LoadContent(); }
public override void LoadContent() { Globals.OnSceneEvent += OnSceneEvent; if (RenderWindow == null) { RenderWindow = Globals.RenderWindow; } if (Texture == null) { Texture = Utilitys.TextureFromFile(Globals.Game.GraphicsDevice, Globals.GetDestinationTexturePath(AssetName)); } if (BoundingBoxRenderer == null) { BoundingBoxRenderer = new BoundingBoxRenderer(Game); BoundingBoxRenderer.SpriteBatch = SpriteBatch; BoundingBoxRenderer.Initialize(); } base.LoadContent(); }
public EditorButton(Game game, conRenderer renderer) : base(game) { RenderWindow = renderer; SetShaderParameters += OnShaderParams; }
public EditorLabel(Game game, string asset, conRenderer renderer) : base(game, asset) { RenderWindow = renderer; }