Inheritance: ActionHandler
Exemple #1
0
 public void SpriteCollisionTest()
 {
     Collision target = new Collision(); // TODO: Initialize to an appropriate value
     PrincessZelda name = null; // TODO: Initialize to an appropriate value
     PrincessZelda nameExpected = null; // TODO: Initialize to an appropriate value
     target.SpriteCollision(ref name);
     Assert.AreEqual(nameExpected, name);
     Assert.Inconclusive("A method that does not return a value cannot be verified.");
 }
Exemple #2
0
 public void SpriteCollisionTest1()
 {
     Collision target = new Collision(); // TODO: Initialize to an appropriate value
     Character name = null; // TODO: Initialize to an appropriate value
     Character nameExpected = null; // TODO: Initialize to an appropriate value
     SoundEffectInstance song6Inst = null; // TODO: Initialize to an appropriate value
     SoundEffectInstance song7Inst = null; // TODO: Initialize to an appropriate value
     target.SpriteCollision(ref name, song6Inst, song7Inst);
     Assert.AreEqual(nameExpected, name);
     Assert.Inconclusive("A method that does not return a value cannot be verified.");
 }
Exemple #3
0
 public void CollisionConstructorTest()
 {
     Collision target = new Collision();
     Assert.Inconclusive("TODO: Implement code to verify target");
 }
Exemple #4
0
        /// <summary>
        /// Allows the game to perform any initialization it needs to before starting to run.
        /// This is where it can query for any required services and load any non-graphic
        /// related content.  Calling base.Initialize will enumerate through any components
        /// and initialize them as well.
        /// </summary>
        protected override void Initialize()
        {
            // TODO: Add your initialization logic here

            //Game starts with the menu
            state = gamestate.menu;

            //Game play starts with start map
            MapState = gamemap.start;
            previousMapState = MapState;

            //Player that can move around
            player = new Character();

            //ID number 0 indicate character that is only one exist.
            player.SpriteID = 0;

            //ID number 2xx indicate Enemy
            Enemy1 = new EnemyCharacter();
            Enemy1.SpriteID = 201;
            Dragon1 = new Dragon();
            Dragon1.SpriteID = 202;
            Enemy2 = new EnemyCharacter();
            Enemy2.SpriteID = 203;
            Enemy3 = new EnemyCharacter();
            Enemy3.SpriteID = 204;
            Enemy4 = new EnemyCharacter();
            Enemy4.SpriteID = 205;

            //ID number 1 indicate PrincessZelda
            Zelda = new PrincessZelda();
            Zelda.SpriteID = 1;

            //Backgrounds
            menu = new Sprite();
            help = new Sprite();
            BG0 = new Sprite();
            Blood = new Sprite();
            Thanks = new Sprite();
            Story1 = new Sprite();
            Story2 = new Sprite();

            //ID 9xx indicate non object sprite
            menu.SpriteID = 901;

            //ID 1xx indicate stationary object
            tree1 = new Sprite(101);
            tree2 = new Sprite(102);
            tree3 = new Sprite(103);
            tree4 = new Sprite(104);
            tree5 = new Sprite(105);

            //ID 5xx indicate Key acition abject that cause some action
            Arrow = new Sprite(501);

            //Action Handling including Collision Detection and EnemySight
            Action = new Collision();

            base.Initialize();
        }