Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 10406 in orxonox.OLD for trunk/src/world_entities/cameraman.cc


Ignore:
Timestamp:
Jan 27, 2007, 3:27:50 PM (19 years ago)
Author:
snellen
Message:

NPC is now scriptabel, added method atachCurrCameraToWorldEntity to CameraMan and made it scriptable

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/world_entities/cameraman.cc

    r10404 r10406  
    3333CREATE_SCRIPTABLE_CLASS(CameraMan,
    3434                        addMethod("changeCurrTarget", Executor2<CameraMan, lua_State*,const std::string&,const std::string&>(&CameraMan::changeCurrTarget))
     35                        ->addMethod("atachCurrCameraToWorldEntity", Executor2<CameraMan, lua_State*,const std::string&,const std::string&>(&CameraMan::atachCurrCameraToWorldEntity))
    3536                        ->addMethod("changeTarget", Executor3<CameraMan, lua_State*, const std::string&, const std::string&,const std::string&>(&CameraMan::changeTarget))
    3637                        ->addMethod("setCam", Executor1<CameraMan, lua_State*, const std::string&>(&CameraMan::setCam))
     
    163164}
    164165
     166void CameraMan::atachCurrCameraToWorldEntity(const std::string& className, const std::string& targetEntity)
     167{
     168  BaseObject* object = ObjectListBase::getBaseObject(className, targetEntity);
     169  if(object != NULL)
     170   this->atachCurrTarget(dynamic_cast<PNode*>(object));
     171}
     172
     173
    165174void CameraMan::jumpCam(int x, int y, int z, int camNo)
    166175{
Note: See TracChangeset for help on using the changeset viewer.