Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Apr 14, 2016, 4:05:48 PM (9 years ago)
Author:
tgidron
Message:

Pickups + Flags HUD

Location:
code/branches/tgidronFS16
Files:
2 added
10 edited

Legend:

Unmodified
Added
Removed
  • code/branches/tgidronFS16/data/levels/Hover.oxw

    r11163 r11168  
    33 description = "Level for Minigame Hover"
    44 tags = "minigame"
    5  screenshot = "emptylevel.png"
     5 screenshot = "Hover.png"
    66/>
    77
     
    2525?>
    2626
     27<?lua
     28    include("templates/pickupRepresentationTemplates.oxt")
     29    include("includes/pickups.oxi")
     30 ?>
     31
    2732<Template name=destroyhoverpickupRepresentation>
    2833    <PickupRepresentation>
     
    3944        </spawner-representation>
    4045    </PickupRepresentation>
     46</Template>
     47
     48<Template name=destroymetapickup baseclass=MetaPickup>
     49  <MetaPickup representation="destroy" metaType="destroy" />
    4150</Template>
    4251
     
    7483          cellSize="<?lua print(MAZE_CELL_SIZE)?>"
    7584          cellHeight="<?lua print(MAZE_CELL_HEIGHT)?>"
     85          pickuptemplate=destroyhoverpickupRepresentation
     86          pickupbase=destroymetapickup
    7687        />
    7788        <Model
  • code/branches/tgidronFS16/data/levels/includes/weaponSettingsHover.oxi

    r11052 r11168  
    1414    </links>
    1515    <Weapon>
    16       <IceGun mode=0 munitionpershot=0 delay=0.125 damage=9.3 material="Flares/point_lensflare" muzzleoffset=" 0.1, 1.6,-2" projectileMesh="LaserBeam2.mesh" />
     16      <HsW01 mode=0 munitionpershot=0 delay=0.125 damage=9.3 material="Flares/point_lensflare" muzzleoffset=" 1, 1,-18 " projectileMesh="LaserBeam2.mesh" />
    1717    </Weapon>
    1818    <Weapon>
    19       <IceGun mode=0 munitionpershot=0 delay=0     damage=9.3 material="Flares/point_lensflare" muzzleoffset=" 1.6, 1.3, -2.0" projectileMesh="LaserBeam2.mesh" />
     19      <EnergyDrink mode=0 munitionpershot=0 delay=0     damage=9.3 material="Flares/point_lensflare" muzzleoffset=" 0.8, 1, -18.0" projectileMesh="LaserBeam2.mesh" />
    2020    </Weapon>
    2121  </WeaponPack>
     
    2727</weaponpacks> 
    2828<munition>
    29   <IceMunition initialmagazines=1 maxmagazines=1 munitionpermagazine=10/>
     29  <LaserMunition initialmagazines=1 maxmagazines=1 munitionpermagazine=10/>
     30  <FusionMunition initialmagazines=1 maxmagazines=1 munitionpermagazine=10/>
    3031</munition>
  • code/branches/tgidronFS16/data/levels/templates/spaceshipHover.oxt

    r11163 r11168  
    1818   reloadwaittime      = 0.5
    1919
    20    primaryThrust     = 100
     20   primaryThrust     = 200
    2121   auxilaryThrust    = 1
    22    rotationThrust    = 40
     22   rotationThrust    = 45
    2323
    24    jumpBoost = 120
     24   jumpBoost = 110
    2525
    2626   lift = 1;
  • code/branches/tgidronFS16/data/overlays/HoverHUD.oxo

    r11163 r11168  
    5555    />
    5656
     57
     58    <OverlayText
     59     position  = "0.02, 0.02"
     60     pickpoint = "0.0, 0.0"
     61     font      = "ShareTechMono"
     62     textsize  = 0.04
     63     colour    = "1.0, 1.0, 1.0, 1.0"
     64     align     = "left"
     65     caption   = "Total Flags: "
     66    />
     67
     68    <TotalFlagsHUD
     69     position  = "0.14, 0.02"
     70     pickpoint = "0.0, 0.0"
     71     font      = "ShareTechMono"
     72     textsize  = 0.04
     73     colour    = "1.0, 1.0, 1.0, 1.0"
     74     align     = "left"
     75
     76     showpoints     = true
     77    />
     78
     79   
     80  </OverlayGroup>
     81
    5782 </OverlayGroup>
     83
     84
    5885</Template>
     86
     87
     88 
     89
  • code/branches/tgidronFS16/src/modules/hover/CMakeLists.txt

    r11035 r11168  
    1717    objects
    1818    overlays
     19    pickup
    1920  SOURCE_FILES ${Hover_SRC_FILES}
    2021)
  • code/branches/tgidronFS16/src/modules/hover/Hover.cc

    r11163 r11168  
    6262        cellHeight = 0;
    6363
     64        totFlags = 0;
     65
    6466        this->setHUDTemplate("HoverHUD");
    6567
     
    115117           
    116118
    117             //Generate 10 Pickups randomly
    118             for (int i = 0; i<10; i++)
     119            //Generate 5 PickupSpawners randomly
     120            for (int i = 0; i<5; i++)
    119121            {
    120122                PickupSpawner* pickup = new PickupSpawner(origin_->getContext());
    121                 //PickupSpawner(this->getContext());
    122                 //pickup->createDroppedPickup(this->getContext(), pickup , this, 10);
     123                pickup->setPosition(rand()%numCells, rand()%numCells, cellSize);
     124                //pickup->setPickupTemplateName(origin_->getPickupMeta());
     125                //pickup->setPickupTemplateName("destroymetapickup");
     126                pickup->setMaxSpawnedItems(5);
     127                pickup->setRespawnTime(30);
     128                pickup->setTriggerDistance(5);
     129                //pickup->createDroppedPickup(this->getContext(), pickup , this, 5);
    123130                pickups_.push_back(pickup);
    124131            }
     132
    125133
    126134        }
     
    138146            }
    139147
     148        //Generate 5 PickupSpawners randomly
     149            for (int i = 0; i<5; i++)
     150            {
     151                PickupSpawner* pickup = new PickupSpawner(origin_->getContext());
     152                //PickupSpawner->setPosition(rand()%numCells, rand()%numCells, cellSize);
     153                //pickup->createDroppedPickup(this->getContext(), pickup , this, 5);
     154                pickups_.push_back(pickup);
     155            }
     156
    140157    }
    141158
     
    150167                flags_[i]->destroyLater();
    151168                flags_.erase (flags_.begin()+i);
     169                totFlags++;
    152170                if(flags_.size()<=0){
    153171                    ChatManager::message("Level Up!");
  • code/branches/tgidronFS16/src/modules/hover/Hover.h

    r11163 r11168  
    7979            int numCells;
    8080
     81            int totFlags;
     82
    8183            std::vector<PickupSpawner*> pickups_;
    8284    };
  • code/branches/tgidronFS16/src/modules/hover/HoverOrigin.cc

    r11071 r11168  
    5454        XMLPortParam(HoverOrigin, "cellSize", setCellSize, getCellSize, xmlelement, mode);
    5555        XMLPortParam(HoverOrigin, "cellHeight", setCellHeight, getCellHeight, xmlelement, mode);
     56        XMLPortParam(HoverOrigin, "pickuptemplate", setPickup, getPickup, xmlelement, mode);
     57        XMLPortParam(HoverOrigin, "pickupbase", setPickupMeta, getPickupMeta, xmlelement, mode);
    5658    }
    5759
  • code/branches/tgidronFS16/src/modules/hover/HoverOrigin.h

    r11099 r11168  
    6666                { return this->cellHeight_; }
    6767
     68            inline void setPickup(std::string pickuptemplate)
     69                { this->pickupTemplate_ = pickuptemplate; }
     70            inline std::string getPickup() const
     71                { return this->pickupTemplate_; }
     72
     73            inline void setPickupMeta(std::string pickupbase)
     74                { this->pickupMeta_ = pickupbase; }
     75            inline std::string getPickupMeta() const
     76                { return this->pickupMeta_; }
     77
    6878        private:
    6979            void checkGametype();
     
    7282            int cellSize_;
    7383            int cellHeight_;
     84            std::string pickupTemplate_;
     85            std::string pickupMeta_;
    7486    };
    7587}
  • code/branches/tgidronFS16/src/modules/pickup/PickupSpawner.h

    r11071 r11168  
    114114                {return this->pickupTemplate_; }
    115115
     116
     117            void setPickupTemplateName(const std::string& name);
     118            void setPickupTemplate(Template* temp);
     119
     120
     121/**
     122            @brief Set the distance in which to trigger.
     123            @param value The new distance in which to trigger.
     124            */
     125            inline void setTriggerDistance(float value)
     126                { this->triggerDistance_ = value; }
     127            /**
     128            @brief Set the time to respawn.
     129            @param time New time after which this gets re-actived.
     130            */
     131            inline void setRespawnTime(float time)
     132                { this->respawnTime_ = time; }
     133
     134            void setMaxSpawnedItems(int items); //!< Sets the maximum number of spawned items.
     135
    116136        private:
    117137            void initialize(void);
     
    131151                { this->blocked_.insert(std::pair<PickupCarrier*, std::time_t>(carrier, std::time(0)+time)); }
    132152
    133             /**
    134             @brief Set the distance in which to trigger.
    135             @param value The new distance in which to trigger.
    136             */
    137             inline void setTriggerDistance(float value)
    138                 { this->triggerDistance_ = value; }
    139             /**
    140             @brief Set the time to respawn.
    141             @param time New time after which this gets re-actived.
    142             */
    143             inline void setRespawnTime(float time)
    144                 { this->respawnTime_ = time; }
     153           
     154           
    145155
    146             void setMaxSpawnedItems(int items); //!< Sets the maximum number of spawned items.
    147 
    148             void setPickupTemplateName(const std::string& name);
    149             void setPickupTemplate(Template* temp);
    150156
    151157            Pickupable* createPickup(void); //!< Creates a new Pickupable.
Note: See TracChangeset for help on using the changeset viewer.