Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/campaignHS15/src/orxonox/worldentities/Actionpoint.cc @ 10863

Last change on this file since 10863 was 10863, checked in by gania, 8 years ago
File size: 2.8 KB
Line 
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 *      Fabian 'x3n' Landau
24 *   Co-authors:
25 *      ...
26 *
27 */
28
29#include "Actionpoint.h"
30
31#include "core/CoreIncludes.h"
32#include "core/XMLPort.h"
33
34namespace orxonox
35{
36    RegisterClass(Actionpoint);
37
38    Actionpoint::Actionpoint(Context* context) : StaticEntity(context)
39    {
40        RegisterObject(Actionpoint);
41
42    }
43   
44    void Actionpoint::XMLPort(Element& xmlelement, XMLPort::Mode mode)
45    {
46        SUPER(Actionpoint, XMLPort, xmlelement, mode);
47       
48        XMLPortParam( Actionpoint, "action", setActionXML, getActionXML,  xmlelement, mode );
49        XMLPortParam( Actionpoint, "protect", setProtectXML, getProtectXML,  xmlelement, mode );
50        XMLPortParam( Actionpoint, "attack", setAttackXML, getAttackXML,  xmlelement, mode );
51        XMLPortParam( Actionpoint, "protectMe", setProtectMeXML, getProtectMeXML,  xmlelement, mode ).defaultValues(false);
52        XMLPortParam( Actionpoint, "loopStart", setLoopStart, getLoopStart,  xmlelement, mode ).defaultValues(false);
53        XMLPortParam( Actionpoint, "loopEnd", setLoopEnd, getLoopEnd,  xmlelement, mode ).defaultValues(false);
54
55    }
56    void Actionpoint::setActionXML( std::string val)
57    {
58        this->actionName_ = getUppercase( val );
59        orxout(internal_error) << "action = " << this->actionName_ << endl;
60    }
61
62    std::string Actionpoint::getActionXML()
63    {
64        return this->actionName_;
65    }
66    void Actionpoint::setProtectXML( std::string val)
67    {
68        this->protectName_ = val;
69    }
70
71    std::string Actionpoint::getProtectXML()
72    {
73        return this->protectName_;
74    }
75    void Actionpoint::setAttackXML( std::string val)
76    {
77        this->attackName_ = val;
78    }
79
80    std::string Actionpoint::getAttackXML()
81    {
82        return this->attackName_;
83    }
84   
85    void Actionpoint::setTargetPosition(const Vector3& target)
86    {
87        this->targetPosition_ = target;
88    }
89    Vector3 Actionpoint::getTargetPosition ()
90    {
91        return this->targetPosition_;
92    }
93   
94}
Note: See TracBrowser for help on using the repository browser.