Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/branches/mount_points/src/world_entities/mount_point.cc @ 10058

Last change on this file since 10058 was 10058, checked in by patrick, 17 years ago

mount point interaction

File size: 1.9 KB
Line 
1
2
3/*
4   orxonox - the future of 3D-vertical-scrollers
5
6   Copyright (C) 2004 orx
7
8   This program is free software; you can redistribute it and/or modify
9   it under the terms of the GNU General Public License as published by
10   the Free Software Foundation; either version 2, or (at your option)
11   any later version.
12
13   ### File Specific
14   main-programmer:
15   co-programmer:
16*/
17#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_WORLD_ENTITY
18
19
20#include "executor/executor.h"
21#include "util/loading/factory.h"
22#include "util/loading/load_param.h"
23
24
25#include "mount_point.h"
26#include "debug.h"
27
28
29
30
31#include "state.h"
32
33
34
35#include "class_id_DEPRECATED.h"
36ObjectListDefinition(MountPoint);
37CREATE_FACTORY(MountPoint);
38
39
40
41/**
42 * construct
43 */
44MountPoint::MountPoint ()
45{
46  this->init();
47}
48
49
50/**
51 * constructor
52 * @param root the xml root element
53 */
54MountPoint::MountPoint(const TiXmlElement* root)
55{
56  this->init();
57
58  if( root != NULL)
59    this->loadParams(root);
60}
61
62
63/**
64 * deconstructor
65 */
66MountPoint::~MountPoint ()
67{}
68
69
70/**
71 * initializing function
72 */
73void MountPoint::init()
74{
75  this->registerObject(this, MountPoint::_objectList);
76  this->toList(OM_GROUP_00);
77
78  this->_mount = NULL;
79}
80
81
82/**
83 * loads the Settings of a MD2Creature from an XML-element.
84 * @param root the XML-element to load the MD2Creature's properties from
85 */
86void MountPoint::loadParams(const TiXmlElement* root)
87{
88  WorldEntity::loadParams(root);
89}
90
91
92
93/**
94 * tick
95 * @param time  time passed since the last tick
96 */
97void MountPoint::tick (float time)
98{
99
100
101}
102
103
104/**
105 * draw this entity
106 */
107void MountPoint::draw() const
108{
109
110}
111
112
113
114/**
115 *  function called to draw the mount point itself for debug purposes only
116 */
117void MountPoint::debugDraw() const
118{
119
120}
121
122
123/**
124 * adds an entity to this mount point
125 * @param entity entity to be added
126 */
127void MountPoint::mount(WorldEntity* entity)
128{
129  this->_mount = entity;
130}
131
132
133/**
134 * removes an entity from this mount point
135 */
136void MountPoint::unmount()
137{
138  this->_mount = NULL;
139}
140
Note: See TracBrowser for help on using the repository browser.