コード例 #1
0
 public void AddCollectable(Collectable genericCollectable)
 {
     CollectablesCollectionManger.CollectableEntities.Add(genericCollectable);
     Game.CollectablesDrawingManager.DrawableEntities.Add(genericCollectable);
     CollectablesUpdateManger.UpdatableEntities.Add(genericCollectable);
     Collectables.Add(genericCollectable);
 }
コード例 #2
0
        public Collectable CreateNewEnergyCollectable()
        {
            Collectable energyCollectable = new Collectable(Game,
                                                            RandomCollectableSpawnLocation(),
                                                            FloatMathHelper.Max(MINIMUM_ENERGY_COLLECTABLE_LIFETIME, RandomHelper.NextRandomDouble() * MAXIMUM_ENERGY_COLLECTABLE_LIFETIME),
                                                            CollectableEntityType.Energy);

            this.AddCollectable(energyCollectable);
            return(energyCollectable);
        }
コード例 #3
0
        public Collectable CreateNewShotgunAmmoCollectable()
        {
            Collectable shotgunAmmoCollectable = new Collectable(Game,
                                                                 RandomCollectableSpawnLocation(),
                                                                 FloatMathHelper.Max(MINIMUM_SHOTGUN_AMMO_COLLECTABLE_LIFETIME, RandomHelper.NextRandomDouble() * MAXIMUM_SHOTGUN_AMMO_COLLECTABLE_LIFETIME),
                                                                 CollectableEntityType.ShotgunAmmo);

            this.AddCollectable(shotgunAmmoCollectable);
            return(shotgunAmmoCollectable);
        }
コード例 #4
0
        public Collectable CreateNewPistolAmmoCollectable()
        {
            Collectable pistolAmmoCollectable = new Collectable(Game,
                                                                RandomCollectableSpawnLocation(),
                                                                FloatMathHelper.Max(MINIMUM_PISTOL_AMMO_COLLECTABLE_LIFETIME, RandomHelper.NextRandomDouble() * MAXIMUM_PISTOL_AMMO_COLLECTABLE_LIFETIME),
                                                                CollectableEntityType.PistolAmmo);

            this.AddCollectable(pistolAmmoCollectable);
            return(pistolAmmoCollectable);
        }
コード例 #5
0
        public Collectable CreateNewGasolineCollectable()
        {
            Collectable gasolineCollectable = new Collectable(Game,
                                                              RandomCollectableSpawnLocation(),
                                                              FloatMathHelper.Max(MINIMUM_GASOLINE_COLLECTABLE_LIFETIME, RandomHelper.NextRandomDouble() * MAXIMUM_GASOLINE_COLLECTABLE_LIFETIME),
                                                              CollectableEntityType.Gasoline);

            this.AddCollectable(gasolineCollectable);
            return(gasolineCollectable);
        }
コード例 #6
0
        public Collectable CreateNewHealthCollectable()
        {
            Collectable healthCollectable = new Collectable(Game,
                                                            RandomCollectableSpawnLocation(),
                                                            FloatMathHelper.Max(MINIMUM_HEALTH_COLLECTABLE_LIFETIME, RandomHelper.NextRandomDouble() * MAXIMUM_HEALTH_COLLECTABLE_LIFETIME),
                                                            CollectableEntityType.Health);

            this.AddCollectable(healthCollectable);
            return(healthCollectable);
        }
コード例 #7
0
 public Collectable CreateNewShotgunAmmoCollectable()
 {
     Collectable shotgunAmmoCollectable = new Collectable(Game,
                                                          RandomCollectableSpawnLocation(),
                                                          FloatMathHelper.Max(MINIMUM_SHOTGUN_AMMO_COLLECTABLE_LIFETIME, RandomHelper.NextRandomDouble() * MAXIMUM_SHOTGUN_AMMO_COLLECTABLE_LIFETIME),
                                                          CollectableEntityType.ShotgunAmmo);
     this.AddCollectable(shotgunAmmoCollectable);
     return shotgunAmmoCollectable;
 }
コード例 #8
0
 public Collectable CreateNewPistolAmmoCollectable()
 {
     Collectable pistolAmmoCollectable = new Collectable(Game,
                                                         RandomCollectableSpawnLocation(),
                                                         FloatMathHelper.Max(MINIMUM_PISTOL_AMMO_COLLECTABLE_LIFETIME, RandomHelper.NextRandomDouble() * MAXIMUM_PISTOL_AMMO_COLLECTABLE_LIFETIME),
                                                         CollectableEntityType.PistolAmmo);
     this.AddCollectable(pistolAmmoCollectable);
     return pistolAmmoCollectable;
 }
コード例 #9
0
 public Collectable CreateNewHealthCollectable()
 {
     Collectable healthCollectable = new Collectable(Game,
                                                     RandomCollectableSpawnLocation(),
                                                     FloatMathHelper.Max(MINIMUM_HEALTH_COLLECTABLE_LIFETIME, RandomHelper.NextRandomDouble() * MAXIMUM_HEALTH_COLLECTABLE_LIFETIME),
                                                     CollectableEntityType.Health);
     this.AddCollectable(healthCollectable);
     return healthCollectable;
 }
コード例 #10
0
 public Collectable CreateNewGasolineCollectable()
 {
     Collectable gasolineCollectable = new Collectable(Game,
                                                       RandomCollectableSpawnLocation(),
                                                       FloatMathHelper.Max(MINIMUM_GASOLINE_COLLECTABLE_LIFETIME, RandomHelper.NextRandomDouble() * MAXIMUM_GASOLINE_COLLECTABLE_LIFETIME),
                                                       CollectableEntityType.Gasoline);
     this.AddCollectable(gasolineCollectable);
     return gasolineCollectable;
 }
コード例 #11
0
 public Collectable CreateNewEnergyCollectable()
 {
     Collectable energyCollectable = new Collectable(Game,
                                                     RandomCollectableSpawnLocation(),
                                                     FloatMathHelper.Max(MINIMUM_ENERGY_COLLECTABLE_LIFETIME, RandomHelper.NextRandomDouble() * MAXIMUM_ENERGY_COLLECTABLE_LIFETIME),
                                                     CollectableEntityType.Energy);
     this.AddCollectable(energyCollectable);
     return energyCollectable;
 }
コード例 #12
0
 public void AddCollectable(Collectable genericCollectable)
 {
     CollectablesCollectionManger.CollectableEntities.Add(genericCollectable);
     Game.CollectablesDrawingManager.DrawableEntities.Add(genericCollectable);
     CollectablesUpdateManger.UpdatableEntities.Add(genericCollectable);
     Collectables.Add(genericCollectable);
 }
コード例 #13
0
 public static void LoadContent(ContentManager contentManager)
 {
     Collectable.LoadContent(contentManager);
 }