public TrailParticleGenerator(ParticleEffectSystem particleSystem, Particle particlePrototype)
     : base(particleSystem, particlePrototype)
 {
     Angle = 0;
     AngleDisplacement = 15;
     NumberOfParticles = 2;
     Speed = 5;
     Scale = 1;
     ParticleTexture = ParticleTextureType.BlurredCircle;
 }
        public FractionalParticleGenerator(ParticleEffectSystem particleSystem, Particle particlePrototype, int numberOfFractions = 20)
            : base(particleSystem, particlePrototype)
        {
            AngleDisplacement = 20;
            Speed = 5;
            Scale = 1;

            NumberOfCircles = 1;
            InterDistance = 20;

            this.numberOfFractions = numberOfFractions;
        }
        public CircleParticleGenerator(ParticleEffectSystem particleSystem, Particle particlePrototype)
            : base(particleSystem, particlePrototype)
        {
            AngleDisplacement = 15;
            StartingDistance = 0;
            Speed = 5;
            Scale = 1;
            ParticleTexture = ParticleTextureType.BlurredCircle;

            NumberOfCircles = 1;
            InterDistance = 20;
        }
예제 #4
0
        public static void Intialize()
        {
            ExplosionParticleEffectSystem = new ParticleEffectSystem(BlendState.Additive);
            TrailParticleEffectSystem = new ParticleEffectSystem(BlendState.Additive);
            LightingSystemLayer = new LightingSystem();
            AdditiveWhiteLightLayer = new AdditiveWhiteImage(-0.015f);

            ExplosionParticleEffectSystem.LoadContent();
            TrailParticleEffectSystem.LoadContent();
            LightingSystemLayer.LoadContent();

            CurrentDrive = 1;
            CurrentLevel = 1;
            PlayerScore = 0;
            ClearedLevels = 0;
            SurvivalMode = -1;

            XmlSerializer xml = new XmlSerializer(typeof(DataLoader));
            StreamReader reader = new StreamReader(@"Content\GameData\GameData.xml");
            dataLoader = (DataLoader)xml.Deserialize(reader);
            reader.Close();

            xml = new XmlSerializer(typeof(DriveData));
            reader = new StreamReader(@"Content\GameData\DriveData.xml");
            driveData = (DriveData)xml.Deserialize(reader);
            reader.Close();

            lockedLevels = new List<bool>();

            survivalScores = new List<int>();
            for (int i = 0; i < SURVIVAL_TYPES; i++)
            {
                survivalScores.Add(0);
            }

            IsFirstTime = true;

            TopPlayerIndex = 0;
            BottomPlayerIndex = 0;
            TopWeaponIndex = 0;
            BottomWeaponIndex = 0;

            achievements = new Dictionary<Type, AchievementData>();
            xml = new XmlSerializer(typeof(GameAchievements));
            reader = new StreamReader(@"Content\GameData\AchievementData.xml");
            GameAchievements gameAch = (GameAchievements)xml.Deserialize(reader);
            reader.Close();

            foreach (AchievementData achievement in gameAch.Achievements)
            {
                achievements.Add(achievement.GetObjectType(), achievement.Clone());
            }

            for (int i = 0; i < DriveData.MAX_DRIVE_NUMBER; i++)
            {
                for (int j = 0; j < LevelData.MAX_LEVEL_DRIVE_NUMBER; j++)
                {
                    lockedLevels.Add(true);
                }
            }
            lockedLevels[0] = false;

            for (int i = 0; i < dataLoader.Enemies.Length; i++)
            {
                dataLoader.Enemies[i].Locked = true;
            }

            allPlayerData = new List<PlayerData>();
            primaryWeaponData = new List<BaseWeapon>();
            secondaryWeaponData = new List<BaseWeapon>();
            enemyNumberData = new Dictionary<Type, int>();

            allPlayerData.Add(new SmithData());
            allPlayerData.Add(new JessicaData());
            allPlayerData.Add(new JackData());
            allPlayerData.Add(new OmarData());
            allPlayerData.Add(new EbsData());
            allPlayerData.Add(new DieselData());

            primaryWeaponData.Add(new UziWeapon());
            primaryWeaponData.Add(new RifleWeapon());
            primaryWeaponData.Add(new EvaporatorWeapon());
            primaryWeaponData.Add(new FreezerWeapon());
            primaryWeaponData.Add(new TommygunWeapon());
            primaryWeaponData.Add(new GrenadeLauncherWeapon());
            primaryWeaponData.Add(new ShotgunWeapon());
            primaryWeaponData.Add(new MinigunWeapon());
            primaryWeaponData.Add(new RocketLauncherWeapon());
            primaryWeaponData.Add(new MineLauncherWeapon());
            primaryWeaponData.Add(new BulletGrenadeLauncherWeapon());
            primaryWeaponData.Add(new SpikeLauncherWeapon());
            primaryWeaponData.Add(new RifleXpWeapon());
            primaryWeaponData.Add(new HomingRocketLauncherWeapon());
            primaryWeaponData.Add(new HellgunWeapon());
            primaryWeaponData.Add(new XenaWeapon());
            primaryWeaponData.Add(new HellRocketLauncherWeapon());
            primaryWeaponData.Add(new MotherBombLauncherWeapon());

            foreach (BaseWeapon weapon in primaryWeaponData)
            {
                secondaryWeaponData.Add((BaseWeapon)Activator.CreateInstance(weapon.GetType()));
            }

            enemyNumberData.Add(typeof(VirusEnemy), 0);
            enemyNumberData.Add(typeof(ExeFile), 1);
            enemyNumberData.Add(typeof(TroyEnemy), 2);
            enemyNumberData.Add(typeof(MalzoneEnemy), 3);
            enemyNumberData.Add(typeof(HackintoshEnemy), 4);
            enemyNumberData.Add(typeof(PopurEnemy), 5);
            enemyNumberData.Add(typeof(ZipFile), 6);
            enemyNumberData.Add(typeof(DOSEnemy), 7);
            enemyNumberData.Add(typeof(WormEnemy), 8);
            enemyNumberData.Add(typeof(DocumentFile), 9);
            enemyNumberData.Add(typeof(Popur2Enemy), 10);
            enemyNumberData.Add(typeof(Troy2Enemy), 11);
            enemyNumberData.Add(typeof(SlowEnemy), 12);
            enemyNumberData.Add(typeof(Hackintosh2Enemy), 13);
            enemyNumberData.Add(typeof(DOS2Enemy), 14);
            enemyNumberData.Add(typeof(Malzone2Enemy), 15);
            enemyNumberData.Add(typeof(BouncerEnemy), 16);

            for (int i = 0; i < allPlayerData.Count; i++)
            {
                allPlayerData[i].LoadContent();
            }

            for (int i = 0; i < primaryWeaponData.Count; i++)
            {
                primaryWeaponData[i].LoadContent();
                secondaryWeaponData[i].LoadContent();
            }
        }
예제 #5
0
 public ParticleGenerator(ParticleEffectSystem particleSystem, Particle particlePrototype)
 {
     this.particleSystem = particleSystem;
     this.particlePrototype = particlePrototype;
     this.random = new Random();
 }