Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/Asteroid_HS17/src/modules/asteroids2D/Asteroids2DStone.h @ 11669

Last change on this file since 11669 was 11666, checked in by vyang, 7 years ago

damage Funktion der Steine ueberschrieben → Sie koennen sich teilen

File size: 2.3 KB
RevLine 
[11616]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 *      Viviane Yang
24 *   Co-authors:
25 *      ...
26 *    TO DO:
27 *
28 */
29
30/**
31    @file Asteroids2D.h
32    @brief Gametype.
33    @ingroup Asteroids2D
34*/
35
36#ifndef _Asteroids2DStone_H__
37#define _Asteroids2DStone_H__
38
39#include "asteroids2D/Asteroids2DPrereqs.h"
40
41#include "worldentities/pawns/Pawn.h"
42
43
44namespace orxonox
45{
46    class _Asteroids2DExport Asteroids2DStone : public Pawn
47    {
48       public:
49            Asteroids2DStone(Context* context);
[11637]50            Asteroids2DStone(Context* c, int sze, Vector3 pos);
51
[11616]52            virtual void tick(float dt) override;
53            Vector3 randomPosition (float maxwidth, float maxheight);
54            Vector3 randomVelocity(float maxspeed);
55            void setAsteroids2DPlayer(Asteroids2DShip* player){this->player = player;};
[11619]56            virtual int getSize(){ return this->size;}
[11637]57            virtual bool collidesAgainst(WorldEntity* otherObject, const btCollisionShape* ownCollisionShape, btManifoldPoint& contactPoint) override;
58            virtual void split();
[11666]59            virtual void damage(float damage, float healthdamage, float shielddamage, Pawn* originator, const btCollisionShape* cs) override;
[11616]60
61       private:
[11666]62          Asteroids2D* getGame();
63          WeakPtr<Asteroids2D> game;
[11616]64          WeakPtr<Asteroids2DShip> player;         
65                int size;                               // three sizes, 3-> two 2s, 2-> two 1s, 1-> die
66                float width, height;    //field
[11637]67          float MAX_SPEED = 100;
68          float delta = 5;
[11616]69    };
70}
71
72#endif /* _Asteroids2DStone_H__ */
Note: See TracBrowser for help on using the repository browser.