Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 12278


Ignore:
Timestamp:
Apr 4, 2019, 4:17:26 PM (5 years ago)
Author:
ahuwyler
Message:

Class Wall is created

Location:
code/branches/OrxoBlox_FS19
Files:
2 added
4 edited

Legend:

Unmodified
Added
Removed
  • code/branches/OrxoBlox_FS19/data/levels/orxoblox.oxw

    r12277 r12278  
    6565
    6666  <WorldAmbientSound source="Ganymede.ogg" looping="true" playOnLoad="true"/>
    67   <OrxoBloxBot />
     67 
    6868
    6969  <Scene
  • code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/CMakeLists.txt

    r12269 r12278  
    66  BallGun/BallProjectile.cc
    77  OrxoBlox.cc
    8  
     8  OrxoBloxWall.cc
    99  OrxoBloxBall.cc
    1010  OrxoBloxBat.cc
  • code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/OrxoBlox.cc

    r12277 r12278  
    278278    }
    279279
     280    /*void OrxoBlox::createStonewall(void){
     281        this->futureWall_ = new OrxoBolxWall(this->center_->getContext());
     282
     283
     284
     285    }*/
     286
    280287    /**
    281288    @brief
  • code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/OrxoBloxBall.cc

    r12212 r12278  
    170170                    // Calculate the distance (in z-direction) between the ball and the center of the bat, weighted by half of the effective length of the bat (with additional 10%)
    171171                    distance = (position.z - this->bat_[1]->getPosition().z) / (this->fieldHeight_ * (this->batlength_ * 1.10f) / 2);
     172                   
     173
    172174                    if (fabs(distance) <= 1) // If the bat is there to parry.
    173175                    {
     
    183185                        this->fireEvent();
    184186                    }
     187
    185188                    // If the left player scores.
    186189                    else if (GameMode::isMaster() && position.x > this->fieldWidth_ / 2 * (1 + this->relMercyOffset_))
    187190                    {
     191                        ChatManager::message("You suck!!");
    188192                        defScoreSound_->play();//play score sound
    189193                        if (this->getGametype() && this->bat_[0])
    190194                        {
     195                            ChatManager::message("You suck!!");
     196
     197
    191198                            this->getGametype()->playerScored(this->bat_[0]->getPlayer());
    192199                            return;
    193200                        }
    194201                    }
     202
     203
     204
     205
     206
    195207                }
    196208                // If the left boundary has been crossed.
     
    218230                        if (this->getGametype() && this->bat_[1])
    219231                        {
     232                            ChatManager::message("You suck!!");
     233
    220234                            this->getGametype()->playerScored(this->bat_[1]->getPlayer());
    221235                            return;
Note: See TracChangeset for help on using the changeset viewer.