00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 #ifndef DISCMANAGER_H
00012 #define DISCMANAGER_H
00013
00014 #include "Disc.h"
00015 #include "vector"
00016 #include "input.h"
00017 #include "CollisionManager.h"
00018 #include "Grid.h"
00019
00025 class DiscManager {
00026 public:
00031 static DiscManager* Instance();
00032
00036 static void DestroyInstance();
00037
00041 void CreateDisc();
00042
00048 void UpdateDiscsSingleplayer(double deltaTime,
00049 Grid *grid);
00050
00059 CIwFVec2 UpdateDiscsMultiplayer(double deltaTime, Grid *grid, bool myTurn, CIwFVec2 pos);
00060
00068 void CheckGridExteriorCollisions(Disc *disc,
00069 Grid *grid,
00070 double deltaTime,
00071 bool &colliderCollision);
00072
00080 void CheckGridInteriorCollisions(Disc* disc, Grid* grid, double deltaTime, bool &discCollision);
00081
00086 void DrawDiscs(double deltaTime);
00087
00092 bool CanCreateDisc();
00093
00097 void DeleteDiscs();
00098
00103 int GetCurrentDiscColour();
00104
00109 bool GetCurrentDiscLaunched();
00110
00115 bool GetCurrentDiscHasLanded();
00116
00121 bool GetCurrentDiscHasTarget();
00122
00127 void LaunchCurrentDisc(CIwFVec2 velocity);
00128
00129 protected:
00133 DiscManager();
00134
00138 ~DiscManager();
00139
00141 static DiscManager *m_instance;
00142
00144 std::vector<Disc*> m_discs;
00145
00147 float m_discSpawnX;
00148
00150 float m_discSpawnY;
00151 };
00152
00153 #endif