Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

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

orxonox/trunk: adding TestGun to implement a test gun :) some smaller changes in ghe weapon.h interface. some doxytags for primitive

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