Exemplo n.º 1
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);
        }
Exemplo n.º 2
0
        /* Hard coded emitter temples to use... get the particle emitter using this function instead of building your own.*/
        public static LineEmitter getPrebuiltEmitter(PrebuiltLineEmitter prebuiltEmitter)
        #region Prebuilt Emitter Declarations
        {
            LineEmitter e = null;

            switch (prebuiltEmitter)
            {
            case PrebuiltLineEmitter.FlamethrowerFire:
                e = new LineEmitter(TextureManager.Get("circle"),
                                    Vector2.Zero,
                                    Vector2.Zero,
                                    100f,
                                    ParticleDeathMode.Distance,
                                    14f,
                                    0,
                                    0.2f,
                                    0.7f,
                                    new Color(255, 0, 0, 255),
                                    new Color(255, 100, 0, 0),
                                    ParticleRandType.Uniform,
                                    0.1f,
                                    0.3f,
                                    0f,
                                    0f,
                                    0.25f,
                                    0.50f,
                                    1000,
                                    1000,
                                    -1,
                                    false,
                                    true
                                    );
                break;

            case PrebuiltLineEmitter.RiotGuardWallDrillSparks:
                e = new LineEmitter(TextureManager.Get("circle"),
                                    Vector2.Zero,
                                    Vector2.Zero,
                                    100,
                                    ParticleDeathMode.Seconds,
                                    0.5f,
                                    0,
                                    0.5f,
                                    -1,
                                    new Color(62, 62, 62, 255),
                                    new Color(62, 62, 62, 128),
                                    ParticleRandType.Uniform,
                                    0.2f,
                                    0.2f,
                                    0,
                                    50,
                                    0,
                                    0,
                                    1000,
                                    500,
                                    -1,
                                    false,
                                    true
                                    );
                break;

            case PrebuiltLineEmitter.FireChainsFire:
                e = new LineEmitter(TextureManager.Get("circle"),
                                    Vector2.Zero,
                                    Vector2.Zero,
                                    30,
                                    ParticleDeathMode.Distance,
                                    12,
                                    0,
                                    0.3f,
                                    0.1f,
                                    new Color(255, 0, 0, 255),
                                    new Color(255, 160, 0, 50),
                                    ParticleRandType.Uniform,
                                    0.1f,
                                    0.05f,
                                    3f,
                                    15f,
                                    0.25f,
                                    0,
                                    1000,
                                    300,
                                    -1,
                                    false,
                                    true
                                    );
                break;
            }
            return(e);
        }
Exemplo n.º 3
0
 public LineEmitterMemento(LineEmitter target)
     : base(target)
 {
     positionB = target.positionB;
 }
Exemplo n.º 4
0
 /* Hard coded emitter temples to use... get the particle emitter using this function instead of building your own.*/
 public static LineEmitter getPrebuiltEmitter(PrebuiltLineEmitter prebuiltEmitter)
 #region Prebuilt Emitter Declarations
 {
     LineEmitter e = null;
     switch (prebuiltEmitter)
     {
         case PrebuiltLineEmitter.FlamethrowerFire:
             e = new LineEmitter(TextureManager.Get("circle"),
                 Vector2.Zero,
                 Vector2.Zero,
                 100f,
                 ParticleDeathMode.Distance,
                 14f,
                 0,
                 0.2f,
                 0.7f,
                 new Color(255, 0, 0, 255),
                 new Color(255, 100, 0, 0),
                 ParticleRandType.Uniform,
                 0.1f,
                 0.3f,
                 0f,
                 0f,
                 0.25f,
                 0.50f,
                 1000,
                 1000,
                 -1,
                 false,
                 true
                 );
             break;
         case PrebuiltLineEmitter.RiotGuardWallDrillSparks:
             e = new LineEmitter(TextureManager.Get("circle"),
                 Vector2.Zero,
                 Vector2.Zero,
                 100,
                 ParticleDeathMode.Seconds,
                 0.5f,
                 0,
                 0.5f,
                 -1,
                 new Color(62, 62, 62, 255),
                 new Color(62, 62, 62, 128),
                 ParticleRandType.Uniform,
                 0.2f,
                 0.2f,
                 0,
                 50,
                 0,
                 0,
                 1000,
                 500,
                 -1,
                 false,
                 true
                 );
             break;
         case PrebuiltLineEmitter.FireChainsFire:
             e = new LineEmitter(TextureManager.Get("circle"),
                 Vector2.Zero,
                 Vector2.Zero,
                 30,
                 ParticleDeathMode.Distance,
                 12,
                 0,
                 0.3f,
                 0.1f,
                 new Color(255, 0, 0, 255), 
                 new Color(255, 160, 0, 50),
                 ParticleRandType.Uniform,
                 0.1f,
                 0.05f,
                 3f,
                 15f,
                 0.25f,
                 0,
                 1000,
                 300,
                 -1,
                 false,
                 true
                 );
             break;
     }
     return e;
 }
Exemplo n.º 5
0
 public LineEmitterMemento(LineEmitter target)
     : base(target)
 {
     positionB = target.positionB;
 }
Exemplo n.º 6
0
        public static void Initialize(SaveGame saveGame = null)
        {
            riotGuardTexture = TextureManager.Get(RIOTGUARD_TEXTURE_NAME);
            drillingEmitter = LineEmitter.getPrebuiltEmitter(PrebuiltLineEmitter.RiotGuardWallDrillSparks);

            farthestLevelX = (saveGame != null) ? saveGame.levelX : LevelManager.STARTING_LEVEL.X;
            wallPos = new Vector2((farthestLevelX - 0.5f) * Level.TEX_SIZE, 0);
            if(saveGame != null) farthestLevelX++; //automatically chase after reloading
            int heroY = (int)RetroGame.getHeroes()[0].position.Y;
            mode = (saveGame != null) ? RiotGuardMode.Moving : RiotGuardMode.Waiting;
            drillingTime = 0;

            heroCoverageArea = new Rectangle[RetroGame.NUM_PLAYERS];

            guardOffsets = new RiotGuardOffset[GUARD_OFFSET_COUNT];
            for(int i = 0; i < GUARD_OFFSET_COUNT; i++)
            {
                guardOffsets[i] = new RiotGuardOffset();
            }
        }