Exemple #1
0
        /// <summary>
        /// LoadContent will be called once per game and is the place to load
        /// all of your content.
        /// </summary>
        protected override void LoadContent()
        {
            spriteBatch = new SpriteBatch(GraphicsDevice);

            creep      = Content.Load <Texture2D>("nemoSprites/nemo_creep");
            run        = Content.Load <Texture2D>("nemoSprites/nemo_run");
            idle       = Content.Load <Texture2D>("nemoSprites/nemo_idle");
            creep_idle = Content.Load <Texture2D>("nemoSprites/nemo_creep_idle");

            background = Content.Load <Texture2D>("fon");

            cloud       = Content.Load <Texture2D>("textures/cloud");
            grass       = Content.Load <Texture2D>("textures/grass");
            green_block = Content.Load <Texture2D>("textures/green_block");

            string[] s = File.ReadAllLines("content/levels/level1.txt");

            Rectangle rect = new Rectangle(100, 200, 60, 60);

            nemo   = new Nemo(rect, idle, run, creep, creep_idle, this);
            levels = new Level(cloud, grass, green_block, s);
        }
Exemple #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()
        {
            spriteBatch = new SpriteBatch(GraphicsDevice);

            creep = Content.Load<Texture2D>("nemoSprites/nemo_creep");
            run = Content.Load<Texture2D>("nemoSprites/nemo_run");
            idle = Content.Load<Texture2D>("nemoSprites/nemo_idle");
            creep_idle = Content.Load<Texture2D>("nemoSprites/nemo_creep_idle");

            background = Content.Load<Texture2D>("fon");

            cloud = Content.Load<Texture2D>("textures/cloud");
            grass = Content.Load<Texture2D>("textures/grass");
            green_block = Content.Load<Texture2D>("textures/green_block");

            string[] s = File.ReadAllLines("content/levels/level1.txt");

            Rectangle rect = new Rectangle(100, 200, 60, 60);
            nemo = new Nemo(rect, idle, run, creep, creep_idle, this);
            levels = new Level (cloud, grass, green_block, s);
        }