Tactics: Western Philosophers Vs. Musicians  0.12
A turn-based tactical game combining rules and gameplay elements inspired by Final Fantasy Tactics and the Mayfair Exponential Game System. Unlike most games of this type, motion is in full, grid-less 3D.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Tactics3DInventory.h
Go to the documentation of this file.
1 // Copyright (C) 2012-2013 Dylan Blair
3 //
4 // email: dblair@alumni.cs.utexas.edu
5 //
6 // This file is part of Tactics3D.
7 //
8 // Tactics3D 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 of the License, or
11 // (at your option) any later version.
12 //
13 // Tactics3D 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 St, Fifth Floor, Boston, MA 02110-1301 USA
22 
23 #ifndef TACTICS3DINVENTORY_H
24 #define TACTICS3DINVENTORY_H
25 
26 #include "../Libs/Core_LIB/IObject.h"
27 #include "../Libs/CD_LIB/CDVolume.h"
28 
29 #include "Tactics3DAttackRange.h"
30 
31 namespace Tactics3D {
32  struct Action;
33 
34  class ICollectible {
35  protected:
37  public:
39 
40  virtual void setVisible(bool isVisible_) {}
41 
42  virtual ~ICollectible() {}
43  };
44 
45  class IEquipable : public ICollectible {
46  public:
48  };
49 
50  class IWeapon : public IEquipable {
51  protected:
52  int _damage;
55  public:
56  IWeapon(OpenSkyNet::Core::Object* owner_, int damage_, float minSpread_, float maxSpread_, float spreadPerShot_) :
57  IEquipable(owner_), _damage(damage_), _spread(minSpread_), _minSpread(minSpread_), _maxSpread(maxSpread_),
58  _spreadPerShot(spreadPerShot_), _attackRange(0) {}
59 
60  virtual ~IWeapon();
61 
62  inline const AttackRange* getAttackRange() const { return _attackRange; }
63  inline AttackRange* getAttackRange() { return _attackRange; }
64 
65  virtual void calcSpread() = 0;
66  virtual void getAim(OpenSkyNet::Math::Point<>& origin_, OpenSkyNet::Math::Point<>& dir_) const;
67  virtual bool fire(OpenSkyNet::CD::HitInfo& hitInfo_, OpenSkyNet::Core::Object* intendedTarget_, Action* action_) = 0;
68 
71  inline int getDamage() const { return _damage; }
72  inline float getSpread() const { return _spread; }
73  inline float getMinSpread() const { return _minSpread; }
74  inline float getMaxSpread() const { return _maxSpread; }
75  inline float getSpreadPerShot() const { return _spreadPerShot; }
77  };
78 
79  //extern std::map<std::string, const ICollectible*> g_collectibleArchetypes;
80 }
81 
82 #endif //TACTICS3DINVENTORY_H
float getSpreadPerShot() const
Definition: Tactics3DInventory.h:75
virtual ~IWeapon()
Definition: Tactics3DInventory.cpp:14
Definition: Tactics3DAction.h:40
Definition: CDVolume.h:36
float _spreadPerShot
Definition: Tactics3DInventory.h:53
Definition: Tactics3DInventory.h:50
virtual bool fire(OpenSkyNet::CD::HitInfo &hitInfo_, OpenSkyNet::Core::Object *intendedTarget_, Action *action_)=0
Definition: Tactics3DInventory.cpp:20
virtual void getAim(OpenSkyNet::Math::Point<> &origin_, OpenSkyNet::Math::Point<> &dir_) const
Definition: Tactics3DInventory.cpp:77
AttackRange * _attackRange
Definition: Tactics3DInventory.h:54
float _minSpread
Definition: Tactics3DInventory.h:53
const AttackRange * getAttackRange() const
Definition: Tactics3DInventory.h:62
float getSpread() const
Definition: Tactics3DInventory.h:72
OpenSkyNet::Core::Object * _owner
Definition: Tactics3DInventory.h:36
Definition: Tactics3DAttackRange.h:33
float _spread
Definition: Tactics3DInventory.h:53
Definition: Tactics3DInventory.h:45
float getMinSpread() const
Definition: Tactics3DInventory.h:73
ICollectible(OpenSkyNet::Core::Object *owner_)
Definition: Tactics3DInventory.h:38
Definition: MPoint.h:33
AttackRange * getAttackRange()
Definition: Tactics3DInventory.h:63
Definition: IObject.h:36
IEquipable(OpenSkyNet::Core::Object *owner_)
Definition: Tactics3DInventory.h:47
virtual ~ICollectible()
Definition: Tactics3DInventory.h:42
int getDamage() const
Definition: Tactics3DInventory.h:71
virtual void calcSpread()=0
IWeapon(OpenSkyNet::Core::Object *owner_, int damage_, float minSpread_, float maxSpread_, float spreadPerShot_)
Definition: Tactics3DInventory.h:56
float _maxSpread
Definition: Tactics3DInventory.h:53
int _damage
Definition: Tactics3DInventory.h:52
float getMaxSpread() const
Definition: Tactics3DInventory.h:74
virtual void setVisible(bool isVisible_)
Definition: Tactics3DInventory.h:40
Definition: Tactics3DInventory.h:34