PhysicObject class
#include <PhysicObject.hpp>
Base classes
- class Object
Derived classes
- class GameObject
Constructors, destructors, conversion operators
- PhysicObject()
- ~PhysicObject() defaulted virtual
Public functions
- void update() override
- auto getBody() const -> b2Body* virtual
- auto getPosition() const -> b2Vec2 override
- auto getAngle() const -> float virtual
- auto getFootContact() const -> int virtual
- auto isOnGround() const -> bool virtual
- auto isRunning() const -> bool virtual
- auto canMoveRight() const -> bool virtual
- auto canMoveLeft() const -> bool virtual
- auto canJump() const -> bool virtual
- auto isDisableJump() const -> bool virtual
- void changeFootContact(const int n) virtual
- void moveLeft() virtual
- void moveRight() virtual
- void jump() const virtual
- void setMoveRight(const bool can_move_right) virtual
- void setMoveLeft(const bool can_move_left) virtual
- void setFilterData(const ContactCategory category, const ContactMask mask) const virtual
- void createBody(const int x, const int y, const int width, const int height) virtual
- void createRectangleFixture(const b2Vec2& position, const int width, const int height, const ContactCategory category, const ContactMask mask) virtual
- void createCircleFixture(const b2Vec2& position, const int radius, const ContactCategory category, const ContactMask mask) virtual
- auto createRectangleSensor(const b2Vec2& position, const int width, const int height, const ContactCategory category, const ContactMask mask) const -> b2Fixture* virtual
- auto createCircleSensor(const b2Vec2& position, const int radius, const ContactCategory category, const ContactMask mask) const -> b2Fixture* virtual
Protected variables
- b2Body* body_
- b2Fixture* fixture_
- bool can_move_right_
- bool can_move_left_
- bool can_jump_
- bool is_ground_
- bool is_running_
- bool is_disabled_jump_
- float move_speed_
- float jump_height_
- int num_foot_touch_