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;
            }
        }
示例#2
0
        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;
        }
示例#4
0
        protected override void Dispose(bool disposing)
        {
            base.Dispose(disposing);

            basicEffect  = null;
            Nodes        = null;
            RenderWindow = null;
        }
示例#5
0
        public frmDuplicateSpecial(List <VisualObject> obj, conRenderer renderer)
        {
            InitializeComponent();

            RenderWindow = renderer;

            SceneObjects = obj;
        }
        public frmAddLabel(conRenderer renderer)
        {
            InitializeComponent();

            RenderWindow = renderer;

            Globals.IsDialogWindowOpen = true;
        }
示例#7
0
        public EditorGroup(Game game, conRenderer renderer)
            : base(game)
        {
            RenderWindow = renderer;

            ObjectTypeName = string.Empty;

            Globals.OnSceneEvent += OnSceneEvent;
        }
示例#8
0
        public override void UnloadContent()
        {
            base.UnloadContent();

            Picker.UnloadContent();
            Picker = null;

            RenderWindow = null;
        }
示例#9
0
        public LedgeBuilder(Game game, conRenderer renderer)
            : base(game)
        {
            Sequences = new List <Sequence2D>();
            Nodes     = new List <LedgeNodeDisplay>();
            Role      = LedgeRole.Ground;

            RenderWindow = renderer;

            Globals.OnSceneEvent += OnSceneEventTriggered;
        }
示例#10
0
        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;
        }
示例#13
0
        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();
        }
示例#14
0
        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();
        }
示例#15
0
        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();
        }
示例#17
0
 public EditorButton(Game game, conRenderer renderer)
     : base(game)
 {
     RenderWindow         = renderer;
     SetShaderParameters += OnShaderParams;
 }
示例#18
0
 public EditorLabel(Game game, string asset, conRenderer renderer)
     : base(game, asset)
 {
     RenderWindow = renderer;
 }