コード例 #1
0
 public void TestInitialize()
 {
     itemToBeAdded     = new List <GameObject>();
     itemToBeDeleted   = new List <GameObject>();
     allObject         = new List <GameObject>();
     testPlayer        = new Player.Player(200, 200);
     testMediator      = new Mediator(allObject, itemToBeAdded, itemToBeDeleted, testPlayer, testRoom, TestState);
     testRoom          = new Room(800, 400, testMediator);
     testMediator.room = testRoom;
     testWall          = new Wall(200, 200, testMediator);
     testMonster       = new Creep.Creep(200, 200, testMediator);
     testMonster2      = new Creep.Creep(200, 200, testMediator);
     HpPlus            = 100;
     testHpBoost       = new HpBoost(HpPlus, 200, 200, testMediator);
     testMSBoost       = new MsBoost(200, 200, testMediator);
     ExpectedMs        = testMSBoost.SpeedBoost;
     testCrossbow      = new Crossbow(200, 200, testMediator);
     testBow           = new FrozenBow(200, 200, testMediator);
     testGun           = new SimpleGun(200, 200, testMediator);
     testWand          = new Wand(200, 200, testMediator);
     testLaveTile      = new LavaTile(200, 200, 5, testMediator);
     testDoor          = new Door(200, 200, testMediator, true);
     FBProjectile      = new FrozenBowProjectile(200, 200, Direction.NORTH, testMediator);
     WProjectile       = new WandProjectile(200, 200, Direction.NORTH, testMediator);
     SGProjectile      = new SimpleGunProjectile(200, 200, Direction.NORTH, testMediator);
     CBProjectile      = new CrossbowProjectile(200, 200, Direction.NORTH, testMediator);
 }
コード例 #2
0
ファイル: Wand.cs プロジェクト: Gustavwk/Dungeon-Of-Doom-1.0
        public override void fire(int x, int y, Direction direction)
        {
            Projectile wandProjectile = new WandProjectile(x, y, direction, mediator);

            this.Load();
            shoot.Play();
            wandProjectile.Load();
            mediator.itemToBeAdded.Add(wandProjectile);
        }