Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/orxonox/trunk/src/world_entities/test_gun.cc @ 3629

Last change on this file since 3629 was 3629, checked in by patrick, 19 years ago

orxonox/trunk: some changes in the storyentity framework: added a preLoad() function, since there is some stuff to be initialized before load(). written some comments to level loading doxygen stuff. now the worldinterface works

File size: 2.4 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: Patrick Boenzli
15   co-programmer:
16*/
17
18
19#include "test_gun.h"
20
21#include "stdincl.h"
22#include "world_entity.h"
23#include "objModel.h"
24#include "projectile.h"
25
26#include "vector.h"
27#include "list.h"
28
29using namespace std;
30
31
32/**
33   \brief standard constructor
34
35   creates a new weapon
36*/
37TestGun::TestGun () : Weapon()
38{}
39
40
41/**
42   \brief standard deconstructor
43*/
44TestGun::~TestGun () 
45{
46  // model will be deleted from WorldEntity-destructor
47}
48
49
50/**
51   \brief this activates the weapon
52
53   This is needed, since there can be more than one weapon on a ship. the
54   activation can be connected with an animation. for example the weapon is
55   been armed out.
56*/
57void TestGun::activate()
58{}
59
60
61/**
62   \brief this deactivates the weapon
63
64   This is needed, since there can be more than one weapon on a ship. the
65   activation can be connected with an animation. for example the weapon is
66   been armed out.
67*/
68void TestGun::deactivate()
69{}
70
71
72/**
73   \brief fires the weapon
74   
75   this is called from the player.cc, when fire-button is been pushed
76*/
77void TestGun::fire()
78{
79  printf("TestGun::fire() - firing weapon now ---------------------------\n");
80  //WorldEntity* pj = new Projectile();
81  //this->worldEntities->add(pj);
82}
83
84
85/**
86   \brief is called, when the weapon gets hit (=collide with something)
87   \param from which entity it is been hit
88   \param where it is been hit
89
90   this may not be used, since it would make the game relay complicated when one
91   can destroy the weapons of enemies or vice versa.
92*/
93void TestGun::hit (WorldEntity* entity, Vector* position) 
94{}
95
96
97/**
98   \brief is called, when the weapon is destroyed
99
100   this is in conjunction with the hit function, so when a weapon is able to get
101   hit, it can also be destoryed.
102*/
103void TestGun::destroy () 
104{}
105
106
107/**
108   \brief tick signal for time dependent/driven stuff
109*/
110void TestGun::tick (float time) 
111{}
112
113
114/**
115   \brief is called, when there is no fire button pressed
116*/
117void TestGun::weaponIdle()
118{}
119
120
121/**
122   \brief this will draw the weapon
123*/
124void TestGun::draw () 
125{}
126
Note: See TracBrowser for help on using the repository browser.