Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 11, 2017, 4:06:44 PM (6 years ago)
Author:
vyang
Message:

Projektile fliegen in 2D Ebene, jedoch in eine falsche Richtung. Kommentare hinzugefuegt

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/Asteroid_HS17/src/modules/asteroids2D/Asteroids2D.cc

    r11645 r11660  
    2121 *
    2222 *   Author:
    23  *      Florian Zinggeler
     23 *      Viviane Yang
    2424 *   Co-authors:
    2525 *      ...
     
    2727 */
    2828
    29 /*TODO: Punktesystem aufbauen -> in HUD anzeigen
    30         Schwierigkeitsgrad mit jedem levelup erhöhen -> mehr Steine spawnen?
    31         spawnStone Methode schreiben
    32         templates für die drei Grössen von Asteroiden erstellen
     29
    3330
    3431/**
    3532    @file Asteroids2D.cc
    3633    @brief Implementation of the Asteroids2D class.
     34
     35    TODO:
     36        - Implement a counting system for the score
     37        - HUD can be improved (display health, points, level etc.)
     38        - Projectiles still
    3739*/
    3840
     
    6264        this->center_ = nullptr;
    6365        this->setHUDTemplate("Asteroids2DHUD");
    64         levelupTimer.setTimer(60.0f, true, createExecutor(createFunctor(&Asteroids2D::levelUp, this)));
     66        levelupTimer.setTimer(30.0f, true, createExecutor(createFunctor(&Asteroids2D::levelUp, this))); //level up every 30s
    6567    }
    6668
     
    9294
    9395
    94         //Nach jedem Level Up werden mehr Steine gespawnt -> abhängig vom Schwierigkeitsgrad
     96        //After level up -> spawn stones
    9597        for(int i = 0; i < level*2; i++){
    9698            spawnStone();
     
    101103    void Asteroids2D::tick(float dt)
    102104    {
    103         //Do this only for the first tick, generate 5 stones for the beginning
     105        //Do this only for the first tick, generate 5 stones in the beginning
    104106        if(this->firstTick_)
    105107        {
     
    118120    void Asteroids2D::spawnStone()
    119121    {
     122
     123        //stones are created with a size
    120124        Asteroids2DStone* newStone = new Asteroids2DStone(this->center_->getContext());
    121125        newStone->setAsteroids2DPlayer(player);
     
    158162    };
    159163   
    160 //Funktion wird als erstes im Level aufgerufen
     164    //The first function that will be called
    161165    void Asteroids2D::start()
    162166    {
Note: See TracChangeset for help on using the changeset viewer.