HeadBall  1.0
A game
Wall.hpp
Go to the documentation of this file.
1 #pragma once
2 
3 #include "Game.hpp"
4 
5 namespace HeadBall {
10  class Wall {
11  public:
18  Wall (GameDataRef data, WorldRef world);
19 
24  void init ( );
25 
26  private:
29 
31  b2Body* _leftBody;
32  b2Body* _rightBody;
33  b2Body* _topBody;
34  b2Body* _leftPost;
35  b2Body* _rightPost;
38  };
39 
40 }
Class for invisible wall around the field and above the goalpost.
Definition: Wall.hpp:10
void init()
Initiate the wall object.
Definition: Wall.cpp:8
b2Body * _leftPost
The Box2D body of wall for left goal post.
Definition: Wall.hpp:34
b2BodyDef _leftDef
Definition: Wall.hpp:30
b2FixtureDef _lPostFixture
Definition: Wall.hpp:37
b2Body * _rightBody
The Box2d body of right wall
Definition: Wall.hpp:32
b2Body * _leftBody
The Box2d body of left wall
Definition: Wall.hpp:31
b2PolygonShape _rPostShape
The polygon shape for the fixure definition.
Definition: Wall.hpp:36
b2Body * _rightPost
The Box2D body of wall for right goal post.
Definition: Wall.hpp:35
WorldRef _world
The shared pointer for b2World
Definition: Wall.hpp:28
b2FixtureDef _topFixture
Definition: Wall.hpp:37
Wall(GameDataRef data, WorldRef world)
Construct a new Wall object.
Definition: Wall.cpp:6
b2FixtureDef _leftFixture
Definition: Wall.hpp:37
b2PolygonShape _lPostShape
Definition: Wall.hpp:36
b2FixtureDef _rightFixture
Definition: Wall.hpp:37
b2BodyDef _rPostDef
The definition of Box2d bodies
Definition: Wall.hpp:30
b2Body * _topBody
The Box2D body of top wall
Definition: Wall.hpp:33
b2PolygonShape _rightShape
Definition: Wall.hpp:36
b2BodyDef _lPostDef
Definition: Wall.hpp:30
GameDataRef _data
The shared pointer for GameData
Definition: Wall.hpp:27
b2BodyDef _topDef
Definition: Wall.hpp:30
b2FixtureDef _rPostFixture
The fixture of wall for defining its properties.
Definition: Wall.hpp:37
b2PolygonShape _leftShape
Definition: Wall.hpp:36
b2BodyDef _rightDef
Definition: Wall.hpp:30
b2PolygonShape _topShape
Definition: Wall.hpp:36
Custom namespace used throughout the project.
Definition: AboutState.cpp:6
std::shared_ptr< b2World > WorldRef
The Shared Pointer that points to the Box2D world.
Definition: Game.hpp:51
std::shared_ptr< GameData > GameDataRef
The Shared Pointer of GameData Struct.
Definition: Game.hpp:39