My favorites | Sign in
Project Home Downloads Wiki Issues Source
Checkout   Browse   Changes    
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#pragma once

#include "BWAPI/Bullet.h"

#include <Util/Types.h>
#include <BWAPI/Position.h>
#include <BWAPI/BulletType.h>
#include <BWAPI/Client/BulletData.h>
namespace BW { struct Bullet; };

namespace BWAPI
{
/**
* Interface for broodwar bullets, can be used to obtain any information
* about bullets and spells
*/
class UnitImpl;
class BulletImpl : public Bullet
{
public:
virtual int getID() const;
virtual Player* getPlayer() const;
virtual BulletType getType() const;
virtual Unit* getSource() const;
virtual Position getPosition() const;
virtual double getAngle() const;
virtual double getVelocityX() const;
virtual double getVelocityY() const;
virtual Unit* getTarget() const;
virtual Position getTargetPosition() const;
virtual int getRemoveTimer() const;
virtual bool exists() const;
virtual bool isVisible() const;
virtual bool isVisible(Player* player) const;

BulletImpl(BW::Bullet* originalBullet, u16 index);
~BulletImpl();

void setExists(bool exists);
BW::Bullet* getRawData() const;
void saveExists();

BulletData* self;
BulletData data;
void updateData();

static BulletImpl* BWBulletToBWAPIBullet(BW::Bullet* bullet);
private:
BW::Bullet* bwOriginalBullet; /**< Pointer to broodwar unit data table. */
u16 index;
int id;
bool __exists;
bool lastExists;
};
};

Change log

r2785 by lowerlogic on Oct 15, 2010   Diff
moved bwapi_broken to bwapi
Go to: 
Sign in to write a code review

Older revisions

r2782 by lowerlogic on Oct 15, 2010   Diff
moving bwapi to bwapi_broken
r2568 by lowerlogic on Jul 18, 2010   Diff
optimized bullet class
r2363 by lowerlogic on Jun 7, 2010   Diff
Added Bullet::getID() and
Bullet::getPlayer().
All revisions of this file

File info

Size: 1614 bytes, 55 lines
Powered by Google Project Hosting