Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 13, 2017, 9:21:25 AM (6 years ago)
Author:
vyang
Message:

Kommentare hinzugefuegt und Projektile in die richtige Richtung ausgerichtet.

File:
1 edited

Legend:

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

    r11660 r11668  
    3636        - Implement a counting system for the score
    3737        - HUD can be improved (display health, points, level etc.)
    38         - Projectiles still
     38        - Projectiles still fly in a mysterious direction
     39        - Problem: The asteroids spawn randomly on the playing field.
     40            During spawn or level up, there is the possibility that they pawn at the position of the ship.
     41            ->spawn somewhere with a safty distance/radius
     42
    3943*/
    4044
     
    5458
    5559        bEndGame = false;
    56         lives = 1000;
     60        lives = 3;
    5761        level = 1;
    5862        point = 0;
     
    7579        {
    7680
    77             //kann schoener gemacht werden
     81            //Do something that indicates a level up
    7882            for (int i = 0; i < 7; i++)
    7983            {
     
    9498
    9599
    96         //After level up -> spawn stones
     100        //After level up -> spawn stones. Modify for different difficulty level
    97101        for(int i = 0; i < level*2; i++){
    98102            spawnStone();
     
    111115                spawnStone();
    112116            }
    113 
     117            //after first tick, firstTick_ will remain false
    114118            this->firstTick_ = false;
    115119        }
     
    121125    {
    122126
    123         //stones are created with a size
     127        //stones are created with a size -> second constructor in Asteroids2DStone class
    124128        Asteroids2DStone* newStone = new Asteroids2DStone(this->center_->getContext());
    125129        newStone->setAsteroids2DPlayer(player);
    126130
     131        //look at templates in data/levels/templates/asteroidsAsteroids2D.oxt
    127132        switch(newStone->getSize()){
    128133            case 1:
     
    165170    void Asteroids2D::start()
    166171    {
    167         orxout() << "start" << endl;
     172        //orxout() << "start" << endl;
    168173
    169174        // Set variable to temporarily force the player to spawn.
     
    188193    }
    189194
    190     //wird gerufen, falls man einen Asteroiden trifft->Aufruf durch Schiffklasse
     195    //This function will be called from the ship or the stone class (if the stone was hit)
    191196    void Asteroids2D::addPoints(int numPoints)
    192197    {
Note: See TracChangeset for help on using the changeset viewer.