Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/trunk/src/modules/objects/triggers/EventMultiTrigger.h @ 10477

Last change on this file since 10477 was 9667, checked in by landauf, 11 years ago

merged core6 back to trunk

  • Property svn:eol-style set to native
File size: 3.2 KB
RevLine 
[6864]1/*
2 *   ORXONOX - the hottest 3D action shooter ever to exist
3 *                    > www.orxonox.net <
4 *
5 *
6 *   License notice:
7 *
8 *   This program is free software; you can redistribute it and/or
9 *   modify it under the terms of the GNU General Public License
10 *   as published by the Free Software Foundation; either version 2
11 *   of the License, or (at your option) any later version.
12 *
13 *   This program is distributed in the hope that it will be useful,
14 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
15 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 *   GNU General Public License for more details.
17 *
18 *   You should have received a copy of the GNU General Public License
19 *   along with this program; if not, write to the Free Software
20 *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
21 *
22 *   Author:
23 *      Damian 'Mozork' Frick
24 *   Co-authors:
25 *      ...
26 *
27 */
28
29/**
30    @file EventMultiTrigger.h
31    @brief Definition of the EventMultiTrigger class.
[7601]32    @ingroup MultiTrigger
[6864]33*/
34
35#ifndef _EventMultiTrigger_H__
36#define _EventMultiTrigger_H__
37
38#include "objects/ObjectsPrereqs.h"
39
40#include "MultiTrigger.h"
41
42namespace orxonox
43{
44
[7301]45    /**
46    @brief
[7601]47        The EventMultiTrigger class is the equivalent of the @ref orxonox::EventTrigger "EventTrigger" class for MultiTriggers.
48        Consequentially what it does is it provides a way to have a MultiTrigger triggered by any kinds of @ref orxonox::Event "Events".
49        @ref orxonox::Event "Events" that are not caused by a MultiTrigger, or that are caused by a MultiTrigger with an originator that is no target of this EventMultiTrigger, are broadcasted to all entities that are the target of this EventMultiTrigger. @ref orxonox::Event "Events" that are caused by @ref orxonox::MultiTrigger "MultiTriggers" with an originator that is a target of this EventMultiTrigger just trigger the EventMultiTrigger for the originator that caused the MultiTrigger to trigger. Thus showing the equivalent behavior to the @ref orxonox::EventTrigger "EventTrigger".
[7301]50
51        Example:
52        @code
53        <EventMultiTrigger invert="true">
54            <events>
55                <trigger>
56                    <MultiTrigger ... />
57                    <EventListener ... />
58                </trigger>
59            </events>
60        </EventMultiTrigger>
61        @endcode
[7601]62
63    @see MultiTrigger
[8213]64        For more information on @ref orxonox::MultiTrigger "MultiTriggers".
[7601]65
[7301]66    @author
67        Damian 'Mozork' Frick
[7601]68
69    @ingroup MultiTrigger
[7301]70    */
[6864]71    class _ObjectsExport EventMultiTrigger : public MultiTrigger
72    {
[7163]73
[6864]74        public:
[9667]75            EventMultiTrigger(Context* context); //!< Constructor. Registers the object.
[7301]76            virtual ~EventMultiTrigger(); //!< Destructor.
[6864]77
78            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); //!< Method for creating an EventMultiTrigger object through XML.
79            virtual void XMLEventPort(Element& xmlelement, XMLPort::Mode mode);
80
[7301]81        private:
[7601]82            void trigger(bool bTriggered, BaseObject* originator); //!< Method that causes the EventMultiTrigger to trigger upon receiving an @ref orxonox::Event "Event".
[6864]83
84    };
85
86}
87
88#endif // _EventMultiTrigger_H__
Note: See TracBrowser for help on using the repository browser.