Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

Last change on this file since 3621 was 3620, checked in by patrick, 20 years ago

orxonox/trunk: added worldinterface, to enable all worldentities to access the entities list. so they can add entities themselfes. this is a nice hack

File size: 2.3 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  printf("TestGun::fire() - firing weapon now ---------------------------\n");
79  //this->myWorld;
80}
81
82
83/**
84   \brief is called, when the weapon gets hit (=collide with something)
85   \param from which entity it is been hit
86   \param where it is been hit
87
88   this may not be used, since it would make the game relay complicated when one
89   can destroy the weapons of enemies or vice versa.
90*/
91void TestGun::hit (WorldEntity* entity, Vector* position) 
92{}
93
94
95/**
96   \brief is called, when the weapon is destroyed
97
98   this is in conjunction with the hit function, so when a weapon is able to get
99   hit, it can also be destoryed.
100*/
101void TestGun::destroy () 
102{}
103
104
105/**
106   \brief tick signal for time dependent/driven stuff
107*/
108void TestGun::tick (float time) 
109{}
110
111
112/**
113   \brief is called, when there is no fire button pressed
114*/
115void TestGun::weaponIdle()
116{}
117
118
119/**
120   \brief this will draw the weapon
121*/
122void TestGun::draw () 
123{}
124
Note: See TracBrowser for help on using the repository browser.