Exemplo n.º 1
0
        /// <summary>
        /// Constructs a new particle emitter object.
        /// </summary>
        public ParticleEmitter(ParticleSystem particleSystem, float particlesPerSecond, Vector2 initialPosition)
        {
            this.particleSystem = particleSystem;

            timeBetweenParticles = 1.0f / particlesPerSecond;

            position = initialPosition;
        }
Exemplo n.º 2
0
        public HackNodeGameBoardMedia(Game game, ContentManager content)
        {
            NodeBoxtexture = content.Load<Texture2D>("Sprites\\nodebox");
            NodeEmptytexture = content.Load<Texture2D>("Sprites\\nodeempty");
            BridgeNStexture = content.Load<Texture2D>("Sprites\\north_south");
            BridgeEWtexture = content.Load<Texture2D>("Sprites\\east_west");

            NodeBox_Pathedtexture = content.Load<Texture2D>("Sprites\\nodebox_pathed");
            BridgeNS_Pathedtexture = content.Load<Texture2D>("Sprites\\north_south_pathed");
            BridgeEW_Pathedtexture = content.Load<Texture2D>("Sprites\\east_west_pathed");

            Loot_Blue_Texture = content.Load<Texture2D>("Sprites\\Loot\\blue_loot");
            Loot_Yellow_Texture = content.Load<Texture2D>("Sprites\\Loot\\yellow_loot");
            Loot_Black_Texture = content.Load<Texture2D>("Sprites\\Loot\\black_loot");

            Loot_2x_Score_Texture = content.Load<Texture2D>("Sprites\\Loot\\2x_score");
            Loot_4x_Score_Texture = content.Load<Texture2D>("Sprites\\Loot\\4x_score");

            Weapon_Multimissile_texture = content.Load<Texture2D>("Sprites\\weapon_multimissile");
            Weapon_Heatseeker_texture = content.Load<Texture2D>("Sprites\\weapon_heatseeker");
            Weapon_Decoy_texture = content.Load<Texture2D>("Sprites\\weapon_decoy");
            Weapon_Mortar_texture = content.Load<Texture2D>("Sprites\\weapon_mortar");

            PlayerTexture = content.Load<Texture2D>("Sprites\\player");
            AITexture = content.Load<Texture2D>("Sprites\\ai");
            ProjectileTexture = content.Load<Texture2D>("Sprites\\projectile");

            TimingRingEmpty = content.Load<Texture2D>("Sprites\\timing_ring_0");
            TimingRing1_4 = content.Load<Texture2D>("Sprites\\timing_ring_1");
            TimingRing2_4 = content.Load<Texture2D>("Sprites\\timing_ring_2");
            TimingRing3_4 = content.Load<Texture2D>("Sprites\\timing_ring_3");
            TimingRingComplete = content.Load<Texture2D>("Sprites\\timing_ring_4");

            ExitTexture = content.Load<Texture2D>("Sprites\\exit");

            PingTexture = content.Load<Texture2D>("Sprites\\ping_effect");
            WeaponPingTexture = content.Load<Texture2D>("Sprites\\weapon_ping_effect");
            CollapserPingTexture = content.Load<Texture2D>("Sprites\\collapser_ping_effect");

            AIQuestionMark_Left = content.Load<Texture2D>("Sprites\\ai_question_left");
            AIQuestionMark_Center = content.Load<Texture2D>("Sprites\\ai_question_center");
            AIQuestionMark_Right = content.Load<Texture2D>("Sprites\\ai_question_right");

            AIExclamationMark_Left = content.Load<Texture2D>("Sprites\\ai_exclaim_left");
            AIExclamationMark_Center = content.Load<Texture2D>("Sprites\\ai_exclaim_center");
            AIExclamationMark_Right = content.Load<Texture2D>("Sprites\\ai_exclaim_right");

            LowerUI_Shell = content.Load<Texture2D>("Sprites\\UI\\ui_lower_section_portrait");
            //LowerUI_BonusShell = content.Load<Texture2D>("Sprites\\UI\\ui_lower_section_bonus");
            //LowerUI_AlertShell = content.Load<Texture2D>("Sprites\\UI\\alert_level_text");

            //LowerUI_Alert_Light_Off = content.Load<Texture2D>("Sprites\\UI\\alert_level_light_off");
            //LowerUI_Alert_Light_On = content.Load<Texture2D>("Sprites\\UI\\alert_level_light_on");

            TargetSlice_0_Percent = content.Load<Texture2D>("Sprites\\UI\\target_slice_0_percent");
            TargetSlice_25_Percent = content.Load<Texture2D>("Sprites\\UI\\target_slice_25_percent");
            TargetSlice_50_Percent = content.Load<Texture2D>("Sprites\\UI\\target_slice_50_percent");
            TargetSlice_75_Percent = content.Load<Texture2D>("Sprites\\UI\\target_slice_75_percent");
            TargetSlice_100_Percent = content.Load<Texture2D>("Sprites\\UI\\target_slice_100_percent");

            CollapserTexture = content.Load<Texture2D>("Sprites\\collapser");
            WhiteOneByOne = content.Load<Texture2D>("Sprites\\white_1_1");
            GradientLeft = content.Load<Texture2D>("Sprites\\gradient_left");

            debugSpriteFont = content.Load<SpriteFont>("Fonts\\DebugUI");
            LowerUI_Bonus_Font = content.Load<SpriteFont>("Fonts\\LowerUI_Bonus");
            LowerUI_Score_Font = content.Load<SpriteFont>("Fonts\\LowerUI_Score");
            Overlay_Font = content.Load<SpriteFont>("Fonts\\OverlayFont");
            Ticker_Font = content.Load<SpriteFont>("Fonts\\TickerFont");
            LootAmount_Font = content.Load<SpriteFont>("Fonts\\LootAmountFont");
            BG_Font = content.Load<SpriteFont>("Fonts\\bgfontsheet");
            Collapse_GiantNumbers_Font = content.Load<SpriteFont>("Fonts\\GiantNumbersOnly");
            Collapse_Warning_Font = content.Load<SpriteFont>("Fonts\\WarningMoire");
            Collapse_Node_Font = content.Load<SpriteFont>("Fonts\\CollapseNodeCountFont");

            // create the particle systems and add them to the components list.
            explosion = new ParticleSystem(game, "ExplosionSettings") { DrawOrder = ParticleSystem.AdditiveDrawOrder };
            game.Components.Add(explosion);

            binaryOneFountain = new ParticleSystem(game, "BinaryOneEmitterSettings") { DrawOrder = ParticleSystem.AlphaBlendDrawOrder };
            binaryOneFountain_emitter = new ParticleEmitter(binaryOneFountain, 10.0f, new Vector2(200.0f, 200.0f));
            game.Components.Add(binaryOneFountain);

            binaryZeroFountain = new ParticleSystem(game, "BinaryZeroEmitterSettings") { DrawOrder = ParticleSystem.AlphaBlendDrawOrder };
            binaryZeroFountain_emitter = new ParticleEmitter(binaryZeroFountain, 5.0f, new Vector2(200.0f, 200.0f));
            game.Components.Add(binaryZeroFountain);

            playerDeathParticles = new ParticleSystem(game, "PlayerDeathParticleSettings") { DrawOrder = ParticleSystem.AlphaBlendDrawOrder };
            game.Components.Add(playerDeathParticles);
            AIDeathParticles = new ParticleSystem(game, "AIDeathParticleSettings") { DrawOrder = ParticleSystem.AlphaBlendDrawOrder };
            game.Components.Add(AIDeathParticles);

            //now load sounds
            ExplosionSound = content.Load<SoundEffect>("Sounds\\Explosion");
            AlertUpSound = content.Load<SoundEffect>("Sounds\\Alert_Up");
            GameOverSound = content.Load<SoundEffect>("Sounds\\Game_Over");
            PlayerPingSound = content.Load<SoundEffect>("Sounds\\Player_Ping");
            PlayerLockLocationSound = content.Load<SoundEffect>("Sounds\\Player_Move_Start");
            HackSuccessfulSound = content.Load<SoundEffect>("Sounds\\Hack_Successful");
            MoneyLoopSound = content.Load<SoundEffect>("Sounds\\Money_Loop_Short");
            HackProgressSound = content.Load<SoundEffect>("Sounds\\Hacking_Loop");
            MoneyLoopSoundInstance = MoneyLoopSound.CreateInstance();
            MoneyLoopSoundInstance.IsLooped = true;
            HackProgressSoundInstance = HackProgressSound.CreateInstance();
            HackProgressSoundInstance.IsLooped = true;
            ThumpSound = content.Load<SoundEffect>("Sounds\\Thump");
            WhooshSound = content.Load<SoundEffect>("Sounds\\Whoosh");
            NodeRevealSound = content.Load<SoundEffect>("Sounds\\NodeReveal");
            MessageSound = content.Load<SoundEffect>("Sounds\\MorseCode");
            StartExitSound = content.Load<SoundEffect>("Sounds\\StartExit");
            MissileLaunchSound = content.Load<SoundEffect>("Sounds\\MissileLaunch");
            ProximityAlertSound = content.Load<SoundEffect>("Sounds\\HeatSeeker_2");
            MortarFallSound = content.Load<SoundEffect>("Sounds\\MortarFall");
            TimerTickSound = content.Load<SoundEffect>("Sounds\\TimerTick");
            TimerWarningSound = content.Load<SoundEffect>("Sounds\\TimerWarning");
            WarningLoopSoundInstance = TimerWarningSound.CreateInstance();
            WarningLoopSoundInstance.IsLooped = true;

            MessageSoundInstance = MessageSound.CreateInstance();
            MessageSoundInstance.IsLooped = false;
        }
Exemplo n.º 3
0
        public ParticleSampleGame()
        {
            graphics = new GraphicsDeviceManager(this);

            #if WINDOWS_PHONE
            graphics.IsFullScreen = true;

            TargetElapsedTime = TimeSpan.FromTicks(333333);
            #endif

            Content.RootDirectory = "Content";

            // create the particle systems and add them to the components list.
            explosion = new ParticleSystem(this, "ExplosionSettings") { DrawOrder = ParticleSystem.AdditiveDrawOrder };
            Components.Add(explosion);

            smoke = new ParticleSystem(this, "ExplosionSmokeSettings") { DrawOrder = ParticleSystem.AlphaBlendDrawOrder };
            Components.Add(smoke);

            smokePlume = new ParticleSystem(this, "SmokePlumeSettings") { DrawOrder = ParticleSystem.AlphaBlendDrawOrder };
            Components.Add(smokePlume);

            emitterSystem = new ParticleSystem(this, "EmitterSettings") { DrawOrder = ParticleSystem.AlphaBlendDrawOrder };
            Components.Add(emitterSystem);
            emitter = new ParticleEmitter(emitterSystem, 60, new Vector2(400, 240));

            // enable the tap gesture for changing particle effects
            TouchPanel.EnabledGestures = GestureType.Tap;
        }