コード例 #1
0
        public LevelEditor(GameMeta GameMeta)
        {
            CurrentMeta = GameMeta;
            SceneBounds = new Rectangle(0, 0, 512, 764);
            Scenery     = new List <IObject>();
            LevelData   = new List <LevelKeypoint>();
            UI          = new List <UIObject>();

            BuildUI();
        }
コード例 #2
0
        /// <summary>
        /// LoadContent will be called once per game and is the place to load
        /// all of your content.
        /// </summary>
        protected override void LoadContent()
        {
            // Create a new SpriteBatch, which can be used to draw textures.
            spriteBatch = new SpriteBatch(GraphicsDevice);

            currentTextureCache = new TextureCache(Content, GraphicsDevice);
            currentInputManager = new InputManager();
            currentMeta         = new GameMeta(currentTextureCache, this, currentInputManager);
            currentScene        = new Menu(currentMeta);
            // TODO: use this.Content to load your game content here
        }
コード例 #3
0
        public Stage(GameMeta GameMeta)
        {
            CurrentMeta = GameMeta;
            SceneBounds = new Rectangle(0, 0, 512, 764);
            Scenery     = new List <IObject>();
            Player      = new Player(GameMeta)
            {
                RenderTexture = CurrentMeta.TextureCache["PlayerSprite"],
                Position      = new Vector2(SceneBounds.X + SceneBounds.Width / 2, SceneBounds.Height - 128),
            };

            Scenery.Add(Player);
        }
コード例 #4
0
 public Menu(GameMeta GameMeta)
 {
     CurrentMeta  = GameMeta;
     menuButtons  = new List <Button>();
     currentScene = this;
     menuButtons.Add(new Button(null, CurrentMeta.TextureCache["Button"], new UDim(new Vector2(0.5f, 0.5f), new Vector2(-50, -55)), new UDim(Vector2.Zero, new Vector2(100, 50)), () =>
     {
         currentScene = new Stage(CurrentMeta);
     }));
     menuButtons.Add(new Button(null, CurrentMeta.TextureCache["Button"], new UDim(new Vector2(0.5f, 0.5f), new Vector2(-50, 55)), new UDim(Vector2.Zero, new Vector2(100, 50)), () =>
     {
         currentScene = new LevelEditor(CurrentMeta);
     }));
 }
コード例 #5
0
ファイル: GameEntity.cs プロジェクト: Bantuman/Danmaku-Editor
 public GameEntity(GameMeta gameMeta)
 {
     GameMeta = gameMeta;
 }