Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Apr 6, 2011, 11:06:45 PM (13 years ago)
Author:
anbueche
Message:

First steps to use of Triggers and Events

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/portals/src/orxonox/worldentities/PortalEndPoint.cc

    r8177 r8198  
    1111    {
    1212        RegisterObject(PortalEndPoint);
    13         trigger_.setDistance(10);
    14         trigger_.setStayActive(true);
    1513    }
    1614   
     
    2927        if(mode == XMLPort::LoadObject)
    3028        {
    31             idMap_s[this->id_] = this;
     29            PortalEndPoint::idMap_s[this->id_] = this;
    3230        }
    3331    }
     32
     33    void PortalEndPoint::tick(float dt)
     34    {
     35        SUPER(PortalEndPoint, tick);
     36    }
     37
     38    void PortalEndPoint::jumpOut(WorldEntity* entity)
     39    {
     40        this->recentlyJumpedOut_.insert(entity);
     41        entity->setPosition(this->getPosition());
     42    }
     43
     44    bool PortalEndPoint::hasRecentlyJumpedOut(WorldEntity* entity)
     45    {
     46        if(this->recentlyJumpedOut_.find(entity) == this->recentlyJumpedOut_.end())
     47        {
     48            return false;
     49        }
     50        else
     51            return true;
     52    }
     53
    3454}
Note: See TracChangeset for help on using the changeset viewer.