src/GameState.hh
author terom
Sat, 06 Dec 2008 23:47:13 +0000
changeset 236 0048ba274152
parent 233 ff4ecea83cf5
child 266 ad72d0a0cc02
permissions -rw-r--r--
move weapons definition out to Weapons.cc
#ifndef GAMESTATE_HH
#define GAMESTATE_HH

class GameState;

#include "PhysicsWorld.hh"
#include "Player.hh"
#include "Projectile.hh"
#include "Rope.hh"
#include "Input.hh"
#include "GraphicsPointer.hh"
#include "Config.hh"

#include <list>
#include <stdexcept>
#include <cmath>

class GameState {
public:
    std::list<Player*> player_list;
    std::list<Projectile*> projectiles;
    PhysicsWorld world;

    // only one local player is supported
    LocalPlayer *local_player;

    GameState (void);
    
    void addProjectile(Projectile *projectile);

    /*
     * This will return NULL if we don't have a local player - yet
     */
    LocalPlayer *getLocalPlayer (void);

    void newLocalPlayer (LocalPlayer *player);        
    void newPlayer (Player *player);

    void removePlayer (Player *player);

    virtual void draw (Graphics *g, bool displayWeapon);
};

#endif