예제 #1
0
 public GameSettings(Arkanoid arkanoidGame)
 {
     ArkanoidGame = arkanoidGame;
     if (AsyncIO.DoesFileExistAsync(ApplicationData.Current.RoamingFolder, "Unlocks"))
     {
         _result = Load <Dictionary <string, WadScore> >(ApplicationData.Current.RoamingFolder, "Unlocks");
     }
     else
     {
         _unlocks = new Dictionary <string, WadScore>();
         Save();
     }
 }
예제 #2
0
        public static Enemy GetEnemy(EnemyTypes type, Arkanoid game, PlayArena playArena, Vector2 location,
                                     Direction direction)
        {
            switch (type)
            {
            case EnemyTypes.Orb:
            {
                return(new Enemy(game, playArena, Sprites.EnmOrb, Sprites.EnmDieOrbTri, location));
            }

            case EnemyTypes.Geom:
            {
                return(new Enemy(game, playArena, Sprites.EnmGeom, Sprites.EnmDieGeomUfo, location));
            }

            case EnemyTypes.Tri:
            {
                return(new Enemy(game, playArena, Sprites.EnmTri, Sprites.EnmDieOrbTri, location));
            }

            case EnemyTypes.Blob:
            {
                return(new BlobEnemy(game, playArena, Sprites.EnmBlob, Sprites.EnmDieOrbTri, location));
            }

            case EnemyTypes.OrbSpawn:
            {
                return(new OrbSpawnEnemy(game, playArena, Sprites.EnmOrb, Sprites.EnmDieOrbTri, location));
            }

            case EnemyTypes.UfoGreen:
            {
                return(new UfoGreenEnemy(game, playArena, Sprites.EnmUfoGreen, Sprites.EnmDieUfo, location));
            }

            case EnemyTypes.CubeOrb:
            {
                return(new Enemy(game, playArena, Sprites.EnmCubeOrb, Sprites.EnmDieOrbTri, location));
            }

            case EnemyTypes.Rubix:
            {
                return(new Rubix(game, playArena, Sprites.EnmRubix, Sprites.EnmDieUfo, location));
            }

            default:
            {
                return(new Enemy(game, playArena, Sprites.EnmUfo, Sprites.EnmDieGeomUfo, location, direction));
            }
            }
        }
예제 #3
0
 public static Capsule GetRandomCapsule(Arkanoid game, PlayArena playArena, Vector2 location)
 {
     return(GetCapsule(RandomUtils.RandomEnum <CapsuleTypes>(), playArena, game, location));
 }
예제 #4
0
 public static Capsule GetCapsule(CapsuleTypes type, PlayArena playArena, Arkanoid game, Vector2 location)
 {
     return(new Capsule(type, game, playArena, location));
 }
예제 #5
0
 public static Enemy GetRandomEnemy(Arkanoid game, PlayArena playArena, Vector2 location)
 {
     return(GetEnemy(RandomUtils.RandomEnum <EnemyTypes>(), game, playArena, location, Direction.Down));
 }
예제 #6
0
 public static Brick GetRandomBrick(Arkanoid game, PlayArena playArena, Vector2 location)
 {
     return(GetBrick(RandomUtils.RandomEnum <BrickTypes>(), game, playArena, location, Arkanoid.Random.Next(10),
                     RandomUtils.RandomEnum <CapsuleTypes>()));
 }
예제 #7
0
        public static Brick GetBrick(BrickTypes type, Arkanoid game, PlayArena playArena, Vector2 location, int chance,
                                     CapsuleTypes capsuleType)
        {
            switch (type)
            {
            case BrickTypes.White:
            {
                return(new Brick(game, playArena, Sprites.BrkWhite, Sprites.BrkFlash, location, Scoring.White, 1,
                                 chance, capsuleType));
            }

            case BrickTypes.Yellow:
            {
                return(new Brick(game, playArena, Sprites.BrkYellow, Sprites.BrkFlash, location, Scoring.Yellow, 1,
                                 chance, capsuleType));
            }

            case BrickTypes.Pink:
            {
                return(new Brick(game, playArena, Sprites.BrkPink, Sprites.BrkFlash, location, Scoring.Pink, 1,
                                 chance, capsuleType));
            }

            case BrickTypes.Blue:
            {
                return(new Brick(game, playArena, Sprites.BrkBlue, Sprites.BrkFlash, location, Scoring.Blue, 1,
                                 chance, capsuleType));
            }

            case BrickTypes.Red:
            {
                return(new Brick(game, playArena, Sprites.BrkRed, Sprites.BrkFlash, location, Scoring.Red, 1, chance,
                                 capsuleType));
            }

            case BrickTypes.Green:
            {
                return(new Brick(game, playArena, Sprites.BrkGreen, Sprites.BrkFlash, location, Scoring.Green, 1,
                                 chance, capsuleType));
            }

            case BrickTypes.SkyBlue:
            {
                return(new Brick(game, playArena, Sprites.BrkSkyBlue, Sprites.BrkFlash, location, Scoring.SkyBlue, 1,
                                 chance, capsuleType));
            }

            case BrickTypes.Orange:
            {
                return(new Brick(game, playArena, Sprites.BrkOrange, Sprites.BrkFlash, location, Scoring.Orange, 1,
                                 chance, capsuleType));
            }

            case BrickTypes.Silver:
            {
                return(new Brick(game, playArena, Sprites.BrkSilver, Sprites.BrkFlash, location, Scoring.Silver, 2,
                                 chance, capsuleType));
            }

            case BrickTypes.Gold:
            {
                return(new Brick(game, playArena, Sprites.BrkGold, Sprites.BrkFlash, location, 0, -1, chance,
                                 capsuleType));
            }

            case BrickTypes.Regen:
            {
                return(new Brick(game, playArena, Sprites.BrkRegen, Sprites.BrkFlash, location, Scoring.Silver, -2,
                                 chance, capsuleType));
            }

            case BrickTypes.Teleport:
            {
                return(new Brick(game, playArena, Sprites.BrkTeleport, Sprites.BrkFlash, location, 0, -3, chance,
                                 capsuleType));
            }

            case BrickTypes.SilverSwap:
            {
                return(new Brick(game, playArena, Sprites.BrkSilverSwap, Sprites.BrkFlash, location, Scoring.Silver,
                                 -4, chance, capsuleType));
            }

            case BrickTypes.GoldSwap:
            {
                return(new Brick(game, playArena, Sprites.BrkGoldSwap, Sprites.BrkFlash, location, 0, -5, chance,
                                 capsuleType));
            }

            case BrickTypes.BlueSwap:
            {
                return(new Brick(game, playArena, Sprites.BrkBlueSwap, Sprites.BrkFlash, location, Scoring.Blue, -6,
                                 chance, capsuleType));
            }

            case BrickTypes.Black:
            {
                return(new Brick(game, playArena, Sprites.BrkBlack, Sprites.BrkFlash, location, Scoring.Black, 4,
                                 chance, capsuleType));
            }

            case BrickTypes.DarkRed:
            {
                return(new Brick(game, playArena, Sprites.BrkDarkRed, Sprites.BrkFlash, location, Scoring.DarkRed, 1,
                                 chance, capsuleType));
            }

            case BrickTypes.DarkBlue:
            {
                return(new Brick(game, playArena, Sprites.BrkDarkBlue, Sprites.BrkFlash, location, Scoring.DarkBlue, 1,
                                 chance, capsuleType));
            }

            case BrickTypes.BlackRegen:
            {
                return(new Brick(game, playArena, Sprites.BrkBlackRegen, Sprites.BrkFlash, location, Scoring.Black,
                                 -7, chance, capsuleType));
            }

            case BrickTypes.Transmit:
            {
                return(new Brick(game, playArena, Sprites.BrkTransmit, Sprites.BrkFlash, location, Scoring.Transmit,
                                 -8, chance, capsuleType));
            }

            case BrickTypes.HorizonalMove:
            {
                return(new Brick(game, playArena, Sprites.BrkGold, Sprites.BrkFlash, location, 0, -9, chance,
                                 capsuleType));
            }

            default:
            {
                return(new Brick(game, playArena, Sprites.BrkWhite, Sprites.BrkFlash, location, 0, -1, chance,
                                 capsuleType));
            }
            }
        }