Exemple #1
0
        /// <summary>
        /// Load the textures needed to create the animation for the space shuttle.
        /// </summary>
        public override void Initialize()
        {
            List<Texture2D> slides = new List<Texture2D>();
            slides.Add(game.Content.Load<Texture2D>("Tiles\\Shuttle\\Shuttle1"));
            slides.Add(game.Content.Load<Texture2D>("Tiles\\Shuttle\\Shuttle2"));
            slides.Add(game.Content.Load<Texture2D>("Tiles\\Shuttle\\Shuttle3"));
            slides.Add(game.Content.Load<Texture2D>("Tiles\\Shuttle\\Shuttle4"));
            slides.Add(game.Content.Load<Texture2D>("Tiles\\Shuttle\\Shuttle5"));
            slides.Add(game.Content.Load<Texture2D>("Tiles\\Shuttle\\Shuttle6"));
            slides.Add(game.Content.Load<Texture2D>("Tiles\\Shuttle\\Shuttle7"));
            slides.Add(game.Content.Load<Texture2D>("Tiles\\Shuttle\\Shuttle8"));
            slides.Add(game.Content.Load<Texture2D>("Tiles\\Shuttle\\Shuttle9"));
            slides.Add(game.Content.Load<Texture2D>("Tiles\\Shuttle\\Shuttle8"));
            slides.Add(game.Content.Load<Texture2D>("Tiles\\Shuttle\\Shuttle7"));
            slides.Add(game.Content.Load<Texture2D>("Tiles\\Shuttle\\Shuttle6"));
            slides.Add(game.Content.Load<Texture2D>("Tiles\\Shuttle\\Shuttle5"));
            slides.Add(game.Content.Load<Texture2D>("Tiles\\Shuttle\\Shuttle4"));
            slides.Add(game.Content.Load<Texture2D>("Tiles\\Shuttle\\Shuttle3"));
            slides.Add(game.Content.Load<Texture2D>("Tiles\\Shuttle\\Shuttle2"));

            // Create the animation
            animation = new Animation(game, spriteBatch, this, slides, 2);

            base.Initialize();
        }
Exemple #2
0
        /// <summary>
        /// Load the textures for the different types of matter
        /// </summary>
        public override void Initialize()
        {
            List<Texture2D> slides = new List<Texture2D>();

            // Load red matter textures
            if (Color == Color.Red)
            {
                slides.Add(game.Content.Load<Texture2D>("Tiles\\Matter\\RedMatter\\RedMatter1"));
                slides.Add(game.Content.Load<Texture2D>("Tiles\\Matter\\RedMatter\\RedMatter2"));
                slides.Add(game.Content.Load<Texture2D>("Tiles\\Matter\\RedMatter\\RedMatter3"));
                slides.Add(game.Content.Load<Texture2D>("Tiles\\Matter\\RedMatter\\RedMatter4"));
                slides.Add(game.Content.Load<Texture2D>("Tiles\\Matter\\RedMatter\\RedMatter5"));
            }
            // Load blue matter textures
            else if (Color == Color.Blue)
            {
                slides.Add(game.Content.Load<Texture2D>("Tiles\\Matter\\BlueMatter\\BlueMatter1"));
                slides.Add(game.Content.Load<Texture2D>("Tiles\\Matter\\BlueMatter\\BlueMatter2"));
                slides.Add(game.Content.Load<Texture2D>("Tiles\\Matter\\BlueMatter\\BlueMatter3"));
                slides.Add(game.Content.Load<Texture2D>("Tiles\\Matter\\BlueMatter\\BlueMatter4"));
                slides.Add(game.Content.Load<Texture2D>("Tiles\\Matter\\BlueMatter\\BlueMatter5"));
            }

            // Create animation
            animation = new Animation(game, spriteBatch, this, slides, 4);

            base.Initialize();
        }
Exemple #3
0
        /// <summary>
        /// Loads all textures needed for player animations and movements.
        /// </summary>
        public override void Initialize()
        {
            // Load idle animation slides
            List<Texture2D> slides = new List<Texture2D>();
            slides.Add(game.Content.Load<Texture2D>("Player\\Idle\\Idle1"));
            slides.Add(game.Content.Load<Texture2D>("Player\\Idle\\Idle2"));
            slides.Add(game.Content.Load<Texture2D>("Player\\Idle\\Idle3"));
            slides.Add(game.Content.Load<Texture2D>("Player\\Idle\\Idle4"));
            slides.Add(game.Content.Load<Texture2D>("Player\\Idle\\Idle5"));
            slides.Add(game.Content.Load<Texture2D>("Player\\Idle\\Idle6"));
            slides.Add(game.Content.Load<Texture2D>("Player\\Idle\\Idle7"));
            slides.Add(game.Content.Load<Texture2D>("Player\\Idle\\Idle8"));
            slides.Add(game.Content.Load<Texture2D>("Player\\Idle\\Idle9"));
            slides.Add(game.Content.Load<Texture2D>("Player\\Idle\\Idle10"));

            // Create idle animation
            idle = new Animation(game, spriteBatch, this, slides, 6);

            // Load all other directional textures
            up = game.Content.Load<Texture2D>("Player\\Up\\Astronaut");
            down = game.Content.Load<Texture2D>("Player\\Idle\\Idle1");
            right = game.Content.Load<Texture2D>("Player\\Right\\Astronaut");
            left = game.Content.Load<Texture2D>("Player\\Left\\Astronaut");

            base.Initialize();
        }