예제 #1
0
 public override void OnCollectedByHero(Hero collector)
 {
     for (int i = 0; i < SAND_ADDED_ON_COLLECT; i++)
     {
         RetroGame.AddSand();
     }
 }
예제 #2
0
 public PlayerPrisoner(Hero player, int levelX, int levelY, int tileX, int tileY)
     : base(player.color, player.prisonerName, levelX * Level.TEX_SIZE + tileX * Level.TILE_SIZE + Level.TILE_SIZE / 2, levelY * Level.TEX_SIZE + tileY * Level.TILE_SIZE + Level.TILE_SIZE / 2, levelX, levelY, tileX, tileY)
 {
     this.player = player;
     TAKEN_IDS[int.Parse(id)] = false;
     id = player.prisonerID.ToString("0000");
 }
예제 #3
0
 public HeroHighscore(Hero hero)
 {
     id = hero.prisonerID;
     name = hero.prisonerName;
     color = hero.color;
     score = RetroGame.Score;
 }
예제 #4
0
 public static void ActivateRevert(Hero controllingHero, InputAction cancelAction)
 {
     LastState = RetroGame.State;
     RetroGame.AddScreen(new RetroPortScreen(controllingHero, cancelAction), true);
     SoundManager.SetMusicReverse(true);
     SoundManager.SetLoopingSoundsReverse(true);
 }
예제 #5
0
 public override void OnCollectedByHero(Hero collector)
 {
     for(int i = 0; i < BOMBS_ADDED_ON_COLLECT; i++)
     {
         RetroGame.AddBomb();
     }
 }
예제 #6
0
 public static void LoadContent(ContentManager Content)
 {
     //determine wild powerups
     Assembly myAssembly = Assembly.GetExecutingAssembly();
     Hero dummyHero = new Hero(PlayerIndex.One);
     foreach (Type type in myAssembly.GetTypes())
     {
         if (type.IsClass && !type.IsAbstract && type.IsSubclassOf(typeof(Powerup)))
         {
             Object powerup = null;
             bool coop = type.IsSubclassOf(typeof(CoOpPowerup));
             if (coop)
                 powerup = type.GetConstructor(new Type[] { typeof(Hero), typeof(Hero) }).Invoke(new object[] { dummyHero, dummyHero });
             else
                 powerup = type.GetConstructor(new Type[] { typeof(Hero) }).Invoke(new object[] { dummyHero });
             if (!ignoredPowerupTypes.Contains(type))
             {
                 List<Type> typesList = coop ? powerupTypesCoOp : powerupTypes;
                 List<Type> typesListWild = coop ? powerupTypesCoOpWild : powerupTypesWild;
                 if (!((Powerup)powerup).StoreOnly)
                     typesListWild.Add(type);
                 typesList.Add(type);
             }
             DummyPowerups[type] = (Powerup)powerup;
         }
     }
 }
예제 #7
0
        //dummy screen that doesn't draw anything, just waits for a cancel action and disables all other input
        public RetroPortScreen(Hero controllingHero, InputAction cancelAction)
        {
            DrawPreviousScreen = true;

            bindings = controllingHero.bindings;
            this.controllingHero = controllingHero;
            this.cancelAction = cancelAction;
        }
예제 #8
0
 public LevelManager()
 {
     heroes = new Hero[RetroGame.MAX_PLAYERS];
     for (int i = 0; i < heroes.Length; i++)
     {
         heroes[i] = new Hero((PlayerIndex)Enum.Parse(typeof(PlayerIndex), i.ToString()));
     }
 }
예제 #9
0
 public Flame(Hero hero, float damagePerSecond, float offset)
     : base(new Vector2(hero.position.X, hero.position.Y), new Hitbox(32, 32))
 {
     active = false;
     this.hero = hero;
     this.offset = offset;
     setTexture("flame");
     this.damagePerSecond = damagePerSecond;
     flameEmitter = Emitter.getPrebuiltEmitter(PrebuiltEmitter.FlameFire);
 }
예제 #10
0
 public HeroHighscoreCoop(Hero hero1, Hero hero2)
 {
     id1 = hero1.prisonerID;
     name1 = hero1.prisonerName;
     color1 = hero1.color;
     id2 = hero2.prisonerID;
     name2 = hero2.prisonerName;
     color2 = hero2.color;
     score = RetroGame.Score;
 }
예제 #11
0
 public FullHealthPickup(Hero hero)
     : base(hero)
 {
     /* Set these properties for your specific powerup */
     GenericName = "Health";
     SpecificName = "Full Revive";
     Rank = 1; //when should this powerup be updated/drawn in relation to all other powerups? (lower ranks first)
     Active = false; //is this powerup activated with a button press?
     StoreOnly = true; //can the powerup be found randomly in a level, or can it only be bought in the store?
     GemCost = COST_VERYEXPENSIVE; //how many gems does it take to buy this from the store?
     Icon = TextureManager.Get("healthicon"); //filename for this powerup's icon
     DrawBeforeHero = true; //should the powerup's effects be drawn before the sprite of the hero, or above?
     TintColor = Color.Gold; //what color should this powerup's icon and related effects be?
     Description = "Survive a killing blow\nonce with all health\n restored"; //give a short description (with appropriate newlines) of the powerup, for display to the player
 }
예제 #12
0
 public BombPickup(Hero hero)
     : base(hero)
 {
     /* Set these properties for your specific powerup */
     GenericName = Powerups.INSTANT;
     SpecificName = "Bomb";
     Rank = 1; //when should this powerup be updated/drawn in relation to all other powerups? (lower ranks first)
     Active = false; //is this powerup activated with a button press?
     StoreOnly = false; //can the powerup be found randomly in a level, or can it only be bought in the store?
     GemCost = COST_MEDIUM; //how many gems does it take to buy this from the store?
     Icon = TextureManager.Get("bomb"); //filename for this powerup's icon
     DrawBeforeHero = true; //should the powerup's effects be drawn before the sprite of the hero, or above?
     TintColor = Color.Black; //what color should this powerup's icon and related effects be?
     Description = "+1 Bomb"; //give a short description (with appropriate newlines) of the powerup, for display to the player
 }
예제 #13
0
 public RadarPowerup(Hero hero)
     : base(hero)
 {
     /* Set these properties for your specific powerup */
     GenericName = "Radar";
     SpecificName = "Basic";
     Rank = 1; //when should this powerup be updated/drawn in relation to all other powerups? (lower ranks first)
     Active = false; //is this powerup activated with a button press?
     StoreOnly = true; //can the powerup be found randomly in a level, or can it only be bought in the store?
     Icon = TextureManager.Get("radaricon1"); //filename for this powerup's icon
     DrawBeforeHero = false; //should the powerup's effects be drawn before the sprite of the hero, or above?
     GemCost = 0; //how many gems does it take to buy this from the store?
     TintColor = Color.MediumPurple; //what color should this powerup's icon and related effects be?
     Description = "Displays a map of\nsurrounding levels"; //give a short description (with appropriate newlines) of the powerup, for display to the player
 }
예제 #14
0
 public RetroPort(Hero hero)
     : base(hero)
 {
     /* Set these properties for your specific powerup */
     GenericName = "Retro";
     SpecificName = "Reverse";
     Rank = 1; //when should this powerup be updated/drawn in relation to all other powerups? (lower ranks first)
     Active = true; //is this powerup activated with a button press?
     StoreOnly = true; //can the powerup be found randomly in a level, or can it only be bought in the store?
     Icon = TextureManager.Get("retroicon1"); //filename for this powerup's icon
     DrawBeforeHero = true; //should the powerup's effects be drawn before the sprite of the hero, or above?
     GemCost = COST_EXPENSIVE; //how many gems does it take to buy this from the store?
     TintColor = new Color(25, 25, 25); //what color should this powerup's icon and related effects be?
     Description = "Rewinds the game\nfor a short time"; //give a short description (with appropriate newlines) of the powerup, for display to the player
 }
예제 #15
0
 public RescuePowerup(Hero hero, Hero otherHero)
     : base(hero, otherHero)
 {
     rescueTimer = 0f;
     /* Set these properties for your specific powerup */
     GenericName = "Rescue";
     SpecificName = "Rescue";
     Rank = 1; //when should this powerup be updated/drawn in relation to all other powerups? (lower ranks first)
     Active = true; //is this powerup activated with a button press?
     StoreOnly = true; //can the powerup be found randomly in a level, or can it only be bought in the store?
     Icon = TextureManager.Get("warptopartner"); //filename for this powerup's icon
     DrawBeforeHero = false; //should the powerup's effects be drawn before the sprite of the hero, or above?
     TintColor = Color.Yellow; //what color should this powerup's icon and related effects be?
     Description = "Instantly teleport to\nyour partner";
     GemCost = 0; //how many gems does it take to buy this from the store?
 }
예제 #16
0
        public float modifier; //How much faster the cooldowns are.

        #endregion Fields

        #region Constructors

        public Adrenaline(Hero hero)
            : base(hero)
        {
            /* Set these properties for your specific powerup */
            GenericName = "Adrenaline";
            SpecificName = "Permanent";
            Rank = 1; //when should this powerup be updated/drawn in relation to all other powerups? (lower ranks first)
            Active = false; //is this powerup activated with a button press?
            StoreOnly = true; //can the powerup be found randomly in a level, or can it only be bought in the store?
            GemCost = COST_VERYEXPENSIVE; //how many gems does it take to buy this from the store?
            Icon = TextureManager.Get("adrenalinepermanent");
            DrawBeforeHero = true;
            modifier = 1.25f;
            Description = "Permanently reduces\ncooldown times\nby 25%";
            TintColor = Color.Violet;
        }
예제 #17
0
        public ShotBasic(Hero hero)
            : base(hero)
        {
            /* Set these properties for your specific powerup */
            GenericName = "Gun";
            SpecificName = "Basic Shot";
            Rank = 1; //when should this powerup be updated/drawn in relation to all other powerups? (lower ranks first)
            Active = true; //is this powerup activated with a button press?
            StoreOnly = true; //can the powerup be found randomly in a level, or can it only be bought in the store?
            Icon = TextureManager.Get("chargeshoticon1"); //filename for this powerup's icon
            DrawBeforeHero = false; //should the powerup's effects be drawn before the sprite of the hero, or above?
            TintColor = Color.SandyBrown; //what color should this powerup's icon and related effects be?
            Description = "A weak gun, but it gets\nthe job done"; //give a short description (with appropriate newlines) of the powerup, for display to the player
            GemCost = 0;

            FiredSound = "BulletTiny";
        }
예제 #18
0
        public FireChains(Hero hero, Hero otherHero)
            : base(hero, otherHero)
        {
            /* Set these properties for your specific powerup */
            GenericName = "Chains";
            SpecificName = "Fire";
            Rank = 1; //when should this powerup be updated/drawn in relation to all other powerups? (lower ranks first)
            Active = false; //is this powerup activated with a button press?
            StoreOnly = false; //can the powerup be found randomly in a level, or can it only be bought in the store?
            Icon = TextureManager.Get("firechain"); //filename for this powerup's icon
            DrawBeforeHero = false; //should the powerup's effects be drawn before the sprite of the hero, or above?
            TintColor = new Color(255, 100, 100); //what color should this powerup's icon and related effects be?
            Description = "Forms a damaging\nchain between two players\nwhen close to each other";
            GemCost = COST_VERYEXPENSIVE; //how many gems does it take to buy this from the store?

            chainsEmitter = LineEmitter.getPrebuiltEmitter(PrebuiltLineEmitter.FireChainsFire);
        }
예제 #19
0
        public ShotForward(Hero hero)
            : base(hero)
        {
            /* Set these properties for your specific powerup */
            GenericName = "Gun";
            SpecificName = "Forward Shot";
            Rank = 1; //when should this powerup be updated/drawn in relation to all other powerups? (lower ranks first)
            Active = true; //is this powerup activated with a button press?
            StoreOnly = true; //can the powerup be found randomly in a level, or can it only be bought in the store?
            Icon = TextureManager.Get("forwardshoticon1"); //filename for this powerup's icon
            DrawBeforeHero = false; //should the powerup's effects be drawn before the sprite of the hero, or above?
            TintColor = Color.OrangeRed; //what color should this powerup's icon and related effects be?
            Description = "A quick forward\nfiring gun"; //give a short description (with appropriate newlines) of the powerup, for display to the player
            GemCost = COST_EXPENSIVE;

            FiredSound = "BulletLight";
        }
예제 #20
0
        public ShotCharge(Hero hero)
            : base(hero)
        {
            /* Set these properties for your specific powerup */
            GenericName = "Gun";
            SpecificName = "Charge Shot";
            Rank = 1; //when should this powerup be updated/drawn in relation to all other powerups? (lower ranks first)
            Active = true; //is this powerup activated with a button press?
            StoreOnly = true; //can the powerup be found randomly in a level, or can it only be bought in the store?
            Icon = TextureManager.Get("chargeshoticon2"); //filename for this powerup's icon
            DrawBeforeHero = false; //should the powerup's effects be drawn before the sprite of the hero, or above?
            TintColor = Color.Goldenrod; //what color should this powerup's icon and related effects be?
            Description = "A slow firing gun that\ncharges up when held"; //give a short description (with appropriate newlines) of the powerup, for display to the player
            GemCost = COST_EXPENSIVE;

            chargeEmitter = Emitter.getPrebuiltEmitter(PrebuiltEmitter.ChargingSparks);
        }
예제 #21
0
        public static readonly float DRILL_BASIC_TIME = 2f; // seconds to drill

        #endregion Fields

        #region Constructors

        public DrillBasic(Hero hero)
            : base(hero)
        {
            /* Set these properties for your specific powerup */
            GenericName = "Drill";
            SpecificName = "Basic";
            Rank = 1; //when should this powerup be updated/drawn in relation to all other powerups? (lower ranks first)
            Active = false; //is this powerup activated with a button press?
            StoreOnly = true; //can the powerup be found randomly in a level, or can it only be bought in the store?
            Icon = TextureManager.Get("normaldrill2"); //filename for this powerup's icon
            DrawBeforeHero = false; //should the powerup's effects be drawn before the sprite of the hero, or above?
            GemCost = 0; //how many gems does it take to buy this from the store?
            TintColor = Color.Gray; //what color should this powerup's icon and related effects be?
            Description = "Drills through a\nsingle wall slowly"; //give a short description (with appropriate newlines) of the powerup, for display to the player

            DrillSoundName = "BasicDrillLoop";
            DrillTime = DRILL_BASIC_TIME;
        }
예제 #22
0
        public BombTimed(Hero hero)
            : base(hero)
        {
            /* Set these properties for your specific powerup */
            GenericName = "Bomb";
            SpecificName = "Timed";
            Rank = 1; //when should this powerup be updated/drawn in relation to all other powerups? (lower ranks first)
            Active = true; //is this powerup activated with a button press?
            StoreOnly = false; //can the powerup be found randomly in a level, or can it only be bought in the store?
            Icon = TextureManager.Get("bombtimed"); //filename for this powerup's icon
            DrawBeforeHero = false; //should the powerup's effects be drawn before the sprite of the hero, or above?
            GemCost = COST_EXPENSIVE; //how many gems does it take to buy this from the store?
            TintColor = Color.Lime; //what color should this powerup's icon and related effects be?
            Description = "Requires bomb charge!\nPlaces a bomb that\nautomatically detonates\nafter a short time"; //give a short description (with appropriate newlines) of the powerup, for display to the player

            BombInterval = 2.0f;
            ExplosionRadius = 3;
        }
예제 #23
0
        public AdrenalinePickup(Hero hero)
            : base(hero)
        {
            GenericName = "Adrenaline";
            SpecificName = "Pickup";
            Rank = 1; //when should this powerup be updated/drawn in relation to all other powerups? (lower ranks first)
            Active = true; //is this powerup activated with a button press?
            StoreOnly = false; //can the powerup be found randomly in a level, or can it only be bought in the store?
            GemCost = COST_CHEAP; //how many gems does it take to buy this from the store?
            DrawBeforeHero = false;
            Icon = TextureManager.Get("adrenalinepickup");
            Description = "Temporarily reduces\ncooldown times when\nactivated";
            TintColor = Color.GreenYellow;

            modifier = 2f;
            adrenalineEmitter = Emitter.getPrebuiltEmitter(PrebuiltEmitter.ChargingSparks);
            adrenalineEmitter.startColor = Color.Yellow;
            adrenalineEmitter.endColor = Color.Red;
        }
예제 #24
0
        public BlinkPowerup(Hero hero)
            : base(hero)
        {
            /* Set these properties for your specific powerup */
            GenericName = "Blink";
            SpecificName = "Blink";
            Rank = 1; //when should this powerup be updated/drawn in relation to all other powerups? (lower ranks first)
            Active = true; //is this powerup activated with a button press?
            StoreOnly = true; //can the powerup be found randomly in a level, or can it only be bought in the store?
            Icon = TextureManager.Get("blinkicon"); //placeholder icon
            DrawBeforeHero = false; //draw the particles above the hero
            GemCost = COST_VERYEXPENSIVE; //how many gems does it take to buy this from the store?
            TintColor = Color.Aquamarine; //what color should this powerup's icon and related effects be?
            Description = "Instantly teleports a\nshort distance forward"; //give a short description (with appropriate newlines) of the powerup, for display to the player

            /* Do any other sort of initialization right here */
            initializeBlinkEmitter();
            initializeEndEmitter();
        }
예제 #25
0
        public RocketBoost(Hero hero)
            : base(hero)
        {
            /* Set these properties for your specific powerup */
            GenericName = "Rocket";
            SpecificName = "Boost";
            Rank = 1; //when should this powerup be updated/drawn in relation to all other powerups? (lower ranks first)
            Active = false; //is this powerup activated with a button press?
            StoreOnly = true; //can the powerup be found randomly in a level, or can it only be bought in the store?
            Icon = TextureManager.Get("boosticon2");
            DrawBeforeHero = true;
            GemCost = COST_EXPENSIVE; //how many gems does it take to buy this from the store?
            TintColor = Color.Orange; //what color should this powerup's icon and related effects be?
            Description = "Provides a steady\nboost to movement speed"; //give a short description (with appropriate newlines) of the powerup, for display to the player

            leftBooster = Emitter.getPrebuiltEmitter(PrebuiltEmitter.RocketBoostFire);
            rightBooster = Emitter.getPrebuiltEmitter(PrebuiltEmitter.RocketBoostFire);
            moveSpeedMultiplier = BOOST_SPEED_MULTIPLIER;
        }
예제 #26
0
        public RetroStasis(Hero hero)
            : base(hero)
        {
            /* Set these properties for your specific powerup */
            GenericName = "Retro";
            SpecificName = "Slowmo";
            Rank = 1; //when should this powerup be updated/drawn in relation to all other powerups? (lower ranks first)
            Active = true; //is this powerup activated with a button press?
            StoreOnly = true; //can the powerup be found randomly in a level, or can it only be bought in the store?
            Icon = TextureManager.Get("retroicon2"); //filename for this powerup's icon
            DrawBeforeHero = true; //should the powerup's effects be drawn before the sprite of the hero, or above?
            TintColor = Color.LightGray; //what color should this powerup's icon and related effects be?
            Description = "Slows playback of the\ngame, giving you\ngreater reaction time"; //give a short description (with appropriate newlines) of the powerup, for display to the player
            GemCost = COST_EXPENSIVE; //how many gems does it take to buy this from the store?

            effectInnerRadius = 0;
            effectOuterRadius = 0;
            effectOutroModifier = 1f;
            effectFinished = true;
        }
예제 #27
0
        public ShieldDamage(Hero hero)
            : base(hero)
        {
            /* Set these properties for your specific powerup */
            GenericName = "Shield";
            SpecificName = "Burning Shield";
            Rank = 1; //when should this powerup be updated/drawn in relation to all other powerups? (lower ranks first)
            Active = false; //is this powerup activated with a button press?
            StoreOnly = false; //can the powerup be found randomly in a level, or can it only be bought in the store?
            DrawBeforeHero = false; //should the powerup's effects be drawn before the sprite of the hero, or above?
            TintColor = Color.OrangeRed; //what color should this powerup's icon and related effects be?
            Description = "Deploys a shield when\nnot moving that\ndamages enemies in range";
            GemCost = COST_EXPENSIVE;

            ShieldColor = Color.OrangeRed;
            MaxShieldRadius = 100f;
            ShieldDeployRate = 50f;
            ShieldDeployDelay = 0.1f;
            InitializeSprites();
        }
예제 #28
0
        public TimedSpeedBoost(Hero hero)
            : base(hero)
        {
            /* Set these properties for your specific powerup */
            GenericName = "Speed";
            SpecificName = "Pickup";
            Rank = 1; //when should this powerup be updated/drawn in relation to all other powerups? (lower ranks first)
            Active = true; //is this powerup activated with a button press?
            StoreOnly = false; //can the powerup be found randomly in a level, or can it only be bought in the store?
            Icon = TextureManager.Get("fastforward"); //filename for this powerup's icon
            DrawBeforeHero = true; //should the powerup's effects be drawn before the sprite of the hero, or above?
            TintColor = Color.Green; //what color should this powerup's icon and related effects be?
            Description = "Temporarily speed\n yourself up once"; //give a short description (with appropriate newlines) of the powerup, for display to the player
            GemCost = COST_CHEAP;

            speedEmitter = Emitter.getPrebuiltEmitter(PrebuiltEmitter.ChargingSparks);
            speedEmitter.startColor = Color.LawnGreen;
            speedEmitter.endColor = Color.LightSkyBlue;
            speedEmitter.particlesPerSecond = 100;
        }
예제 #29
0
        public DrillTriple(Hero hero)
            : base(hero)
        {
            /* Set these properties for your specific powerup */
            GenericName = "Drill";
            SpecificName = "Triple";
            Rank = 1; //when should this powerup be updated/drawn in relation to all other powerups? (lower ranks first)
            Active = false; //is this powerup activated with a button press?
            StoreOnly = true; //can the powerup be found randomly in a level, or can it only be bought in the store?
            Icon = TextureManager.Get("drillicon2"); //filename for this powerup's icon
            DrawBeforeHero = false; //should the powerup's effects be drawn before the sprite of the hero, or above?
            GemCost = COST_EXPENSIVE; //how many gems does it take to buy this from the store?
            TintColor = Color.DimGray; //what color should this powerup's icon and related effects be?
            Description = "Drills through three\nadjacent walls at once"; //give a short description (with appropriate newlines) of the powerup, for display to the player

            DrillTime = DRILL_TRIPLE_TIME;
            drillEmitter = Emitter.getPrebuiltEmitter(PrebuiltEmitter.DrillSparks);
            drillEmitterLeft = Emitter.getPrebuiltEmitter(PrebuiltEmitter.DrillSparks);
            drillEmitterRight = Emitter.getPrebuiltEmitter(PrebuiltEmitter.DrillSparks);
        }
예제 #30
0
        public Flamethrower(Hero hero)
            : base(hero)
        {
            /* Set these properties for your specific powerup */
            GenericName = "Flamethrower";
            SpecificName = "Short";
            Rank = 1; //when should this powerup be updated/drawn in relation to all other powerups? (lower ranks first)
            Active = true; //is this powerup activated with a button press?
            StoreOnly = false; //can the powerup be found randomly in a level, or can it only be bought in the store?
            Icon = TextureManager.Get("flamethrower"); //filename for this powerup's icon
            DrawBeforeHero = false; //should the powerup's effects be drawn before the sprite of the hero, or above?
            GemCost = COST_VERYEXPENSIVE; //how many gems does it take to buy this from the store?
            TintColor = Color.OrangeRed; //what color should this powerup's icon and related effects be?
            Description = "Burns enemies in\nfront of the hero"; //give a short description (with appropriate newlines) of the powerup, for display to the player

            flames = new List<Flame>();
            flame1 = new Flame(hero, flameDamagePerSecond, 40);
            flame2 = new Flame(hero, flameDamagePerSecond, 70);
            flame3 = new Flame(hero, flameDamagePerSecond, 100);
            flames.AddRange(new[] {flame1, flame2, flame3});
        }