Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 2, 2019, 4:40:50 PM (5 years ago)
Author:
pomselj
Message:

Ball can do bouncy stuff

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/OrxoBlox.cc

    r12336 r12337  
    6464        Constructor. Registers and initializes the object.
    6565    */
    66     OrxoBlox::OrxoBlox(Context* context) : Deathmatch(context)
     66    OrxoBlox::OrxoBlox(Context* context) : ::orxonox::Deathmatch::Deathmatch(context)
    6767    {
    6868        RegisterObject(OrxoBlox);
     
    154154            this->createWall();
    155155
     156            //Create Ship
     157            //this->ship_ = new OrxoBloxShip(this->center_->getContext());
     158            //this->ship_->setPosition(0, 0, 0);
     159
    156160        }
    157161        else // If no centerpoint was specified, an error is thrown and the level is exited.
     
    166170
    167171        // Set variable to temporarily force the player to spawn.
    168         this->bForceSpawn_ = false;
     172        this->bForceSpawn_ = true;
    169173
    170174        // Call start for the parent class.
     
    186190    }
    187191
    188     /**
    189     @brief
    190         Spawns the input player.
    191     @param player
    192         The player to be spawned.
    193     */
     192    OrxoBloxShip* OrxoBlox::getPlayer()
     193    {
     194        if (playership == nullptr)
     195        {
     196            for (OrxoBloxShip* ship_ : ObjectList<OrxoBloxShip>())
     197            {
     198                playership = ship_;
     199            }
     200        }
     201        return playership;
     202    }
     203   
    194204    void OrxoBlox::spawnPlayer(PlayerInfo* player)
    195205    {
    196          assert(player);
     206        assert(player);
    197207
    198208        if(this->player_ == nullptr)
     
    201211            this->players_[player].state_ = PlayerState::Alive;
    202212        }
    203     }
    204 
    205 
    206     OrxoBloxShip* OrxoBlox::getPlayer()
    207     {
    208         for (OrxoBloxShip* ship : ObjectList<OrxoBloxShip>())
    209         {
    210             return ship;
    211         }
    212         return nullptr;
     213
    213214    }
    214215
    215216    //void startWall(void);
    216    
    217217    void OrxoBlox::LevelUp(){
    218218        level_++;
Note: See TracChangeset for help on using the changeset viewer.