Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 11240 for code


Ignore:
Timestamp:
Oct 17, 2016, 4:35:27 PM (8 years ago)
Author:
patricwi
Message:

Key binding added when user picks up an item(pickup).

Location:
code/branches/HUD_HS16/src/modules/pickup
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/HUD_HS16/src/modules/pickup/PickupManager.cc

    r11099 r11240  
    4141#include "network/Host.h"
    4242#include "network/NetworkFunctionIncludes.h"
     43#include "core/input/KeyBinderManager.h"    //for keybinding
     44#include "core/input/KeyBinder.h"           //for keybinding
    4345
    4446#include "infos/PlayerInfo.h"
     
    7476        this->defaultRepresentation_ = new PickupRepresentation();
    7577
    76         orxout(internal_info, context::pickups) << "PickupManager created." << endl;
     78        orxout() << "PickupManager created." << endl;
    7779    }
    7880
     
    287289            this->indexes_[pickup] = index;
    288290            this->pickups_[index] = pickup;
     291            // TODO: Add pickup keybinding -------------------------------------------
     292            if( KeyBinderManager::exists() )
     293                KeyBinderManager::getInstance().getCurrent()->setBinding("KeyESC", "Keys.KeyNumpad0",true);
     294            else
     295                orxout() << "Could not create new keybinding because KeyBinderManager doesn't exist." << endl;
     296            //----------------------------
     297
    289298        }
    290299        else // If it was dropped, it is removed from the required lists.
     
    297306            this->indexes_.erase(it);
    298307            this->pickups_.erase(index);
     308            // TODO: Remove pickup keybinding ------------------------------------
     309            if( KeyBinderManager::exists() )
     310                  KeyBinderManager::getInstance().getCurrent()->setBinding("", "Keys.KeyNumpad0",true);
     311            else
     312                orxout() << "Could not delete old keybinding because KeyBinderManager doesn't exist." << endl;
     313            //----------------------------
    299314        }
    300315
  • code/branches/HUD_HS16/src/modules/pickup/items/SpeedPickup.h

    r9667 r11240  
    4848        A Pickup which can manipulate the Speed of a Pawn.
    4949
    50         There are 5 parameters that can be cosen:
     50        There are 5 parameters that can be chosen:
    5151        - The @b speedMultiply, specifies a factor by which the Spaceships speed is multiplied. The default is 1.
    5252        - The @b speedAdd, specifies a value that is added to the speed of the Spaceship. The default is 0.
Note: See TracChangeset for help on using the changeset viewer.