Exemplo n.º 1
0
 public void Add(string name, SpriteSheet sheet)
 {
     if (!SpriteSheets.ContainsKey(name))
     {
         SpriteSheets.Add(name, sheet);
     }
 }
Exemplo n.º 2
0
        public override void LoadContent(ContentManager content)
        {
            _spriteBatch = new SpriteBatch(GraphicsDevice);

            _sheets = new SpriteSheets();
            SpriteSheet sheet1 = SpriteSheetLoader.LoadFromFile(@"Content\characters.spritesheet.json", content);

            _sheets.Add(sheet1);
            SpriteSheet sheet2 = SpriteSheetLoader.LoadFromFile(@"Content\playership.spritesheet.json", content);

            _sheets.Add(sheet2);
            SpriteSheet sheet3 = SpriteSheetLoader.LoadFromFile(@"Content\explosion1.spritesheet.json", content);

            _sheets.Add(sheet3);
            _animations = AnimationsLoader.LoadFromFile(@"Content\animations1.json");
            NextAnimation();

            _font.LoadContent();
            _statusPane.LoadContent(content);
        }
Exemplo n.º 3
0
        protected override void Initialize( )
        {
            base.Initialize( );

            //add sprite texture
            SpriteSheets.Add(0, Content.Load <Texture2D>("PikaSprite"));

            //Create main camera
            GameObject _camObj = new GameObject("SCENE_CAMERA");

            GAME_CAMERA = new Camera(GraphicsDevice.Viewport, _camObj);
            _camObj.AddComponent(GAME_CAMERA);

            //WorldManager.LoadWorld( Environment.GetFolderPath( Environment.SpecialFolder.MyDocuments ) + "\\TestWorldB.world" );

            //WorldManager.SaveWorld( "TestWorldB" );
        }