Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 27, 2017, 1:41:13 PM (6 years ago)
Author:
zarron
Message:

shooting mechanism fixed

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/SOBv2_HS17/src/modules/superorxobros/SOBFigure.cc

    r11578 r11592  
    127127            SOBGame->addMushroom(); // Tell the gametype to increase points
    128128            mush->hasCollided_ = true; // needed because of destroyLater takes some time and player should receive points only once
    129 
    130129           
    131130           
     
    201200        {
    202201            ball->addTemplate("fireball");
    203             ball->setPosition(spawnpos);
    204202            bool direction = ((this->getWorldOrientation().getRoll().valueRadians())>-1.6&&(this->getWorldOrientation().getRoll().valueRadians()<1.6));
    205203            ball->setDirection(direction);
    206204            orxout() << "Rotation: " << this->getWorldOrientation().getRoll() << " direction: "<< direction <<endl;
    207             //ball->
     205            if(direction)
     206            {
     207                spawnpos.x+=10;
     208            }
     209            else
     210            {
     211                spawnpos.x-=10;
     212            }
     213            ball->setPosition(spawnpos);
    208214
    209215        }
Note: See TracChangeset for help on using the changeset viewer.