MCPcopy Create free account
hub / github.com/bwapi/bwapi / BulletImpl

Class BulletImpl

bwapi/BWAPI/Source/BWAPI/BulletImpl.h:20–56  ·  view source on GitHub ↗

* Interface for broodwar bullets, can be used to obtain any information * about bullets and spells */

Source from the content-addressed store, hash-verified

18 * about bullets and spells
19 */
20 class BulletImpl : public BulletInterface
21 {
22 public:
23 virtual int getID() const override;
24 virtual bool exists() const override;
25 virtual Player getPlayer() const override;
26 virtual BulletType getType() const override;
27 virtual Unit getSource() const override;
28 virtual Position getPosition() const override;
29 virtual double getAngle() const override;
30 virtual double getVelocityX() const override;
31 virtual double getVelocityY() const override;
32 virtual Unit getTarget() const override;
33 virtual Position getTargetPosition() const override;
34 virtual int getRemoveTimer() const override;
35 virtual bool isVisible(Player player = nullptr) const override;
36
37 BulletImpl(BW::CBullet* originalBullet, u16 index);
38
39 void setExists(bool exists);
40 BW::CBullet* getRawData() const;
41 void saveExists();
42
43 BulletData data = BulletData();
44 BulletData* self = &data;
45
46 void updateData();
47
48 static BulletImpl* BWBulletToBWAPIBullet(BW::CBullet* bullet);
49 static int nextId;
50 private:
51 BW::CBullet* bwOriginalBullet; /**< Pointer to broodwar unit data table. */
52 u16 index;
53 int id = -1;
54 bool __exists = false;
55 bool lastExists = false;
56 };
57};

Callers

nothing calls this directly

Calls 1

BulletDataClass · 0.85

Tested by

no test coverage detected