Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Apr 29, 2010, 1:16:16 PM (14 years ago)
Author:
dafrick
Message:

Created a new class of triggers called Multitriggers.
MultiTriggers are triggers which (as opposed to normal triggers) have a state for each object triggering the MultiTrigger, that means, that a MultiTrigger can be triggered for two different Players, while not being triggered for a third.
To go with this MultiTrigger I created a data structure (MultitriggerContainer), which helps relaying important information to the objects, that receive the Events of the trigger.
Also there is a MultiDistanceTrigger, which is just the DistanceTrigger as a MultiTrigger.

To make this work I had to make some adjustements to the eventsystem, namely an EventState can now be either an EventState (as it was before) or an EventSink, which means that every efent arriving at the EventState is processed as opposed to just the ones which change the state.
There is a new makro (XMLPortEventSink) to create an EventState with sink behaviour. It can be used exacly as the XMLPortEventState makro.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/libraries/core/BaseObject.h

    r6524 r6800  
    188188        private:
    189189            /** @brief Adds an object which listens to the events of this object. */
    190             inline void registerEventListener(BaseObject* object)
    191                 { this->eventListeners_.insert(object); }
     190            void registerEventListener(BaseObject* object);
    192191            /** @brief Removes an event listener from this object. */
    193192            inline void unregisterEventListener(BaseObject* object)
Note: See TracChangeset for help on using the changeset viewer.