Пример #1
0
        public LuckyDay()
        {
            // Player has a width and height of 50
            PlayerSize = new Vector2(100, 100);
            // Player starts at middle of the screen, at the bottom
            PlayerLoc = Globals.StartAtMiddle(PlayerSize);
            // Player has an X velocity of 10 and a starting Y velocity of 0
            PlayerVel = new Vector2(10, 0);

            Globals.Player = new Player(PlayerLoc, PlayerSize, PlayerVel);

            // Gold spawns every 25 frames
            GoldCd = new Cooldown(25);

            // Difficulty affects amount of gold needed
            switch (Globals.Difficulty)
            {
            case Globals.EASY:
            {
                Goal = 6;
                break;
            }

            case Globals.MEDIUM:
            {
                Goal = 10;
                break;
            }

            case Globals.HARD:
            {
                Goal = 14;
                break;
            }
            }

            Collected = 0;

            // Game lasts 10 seconds
            Globals.GameDuration = new Cooldown(600);

            Coins = new List <Projectile>();

            // X velocity can be between 5 and 10
            VelocityXRange = new Vector2(5, 10);
        }
Пример #2
0
        public Buff()
        {
            Width   = 100;
            Height  = 100;
            Gravity = 9.81f / 60;

            X = 0;
            Y = 0;

            VelocityY = 0;

            Exists = false;
            Active = false;
            Held   = false;

            SpawnCooldown = new Cooldown(100);
            BuffDuration  = new Cooldown(240);
        }
Пример #3
0
        public TerminalVelocity()
        {
            // Creates the player
            PlayerSize     = new Vector2(100, 100);
            PlayerLoc      = new Vector2(Globals.StartAtMiddle(PlayerSize).X, 200);
            PlayerVel      = new Vector2(10, 0);
            Globals.Player = new Player(PlayerLoc, PlayerSize, PlayerVel);

            Spikes = new List <SideSpike>();

            Globals.GameDuration = new Cooldown(600);

            // The walls of the pit
            LeftWallX  = 400;
            RightWallX = 800;

            // Difficulty affects spawn rate of the spikes
            switch (Globals.Difficulty)
            {
            case Globals.EASY:
            {
                SpikeSpawnCd = new Cooldown(45);
                break;
            }

            case Globals.MEDIUM:
            {
                SpikeSpawnCd = new Cooldown(30);
                break;
            }

            case Globals.HARD:
            {
                SpikeSpawnCd = new Cooldown(20);
                break;
            }
            }
        }