entity2D.cpp
资源名称:pong.rar [点击查看]
上传用户:szsg028
上传日期:2022-08-01
资源大小:12k
文件大小:1k
源码类别:
GDI/图象编程
开发平台:
Visual C++
- #include "entity2D.h"
- entity2D::entity2D()
- {
- mWidth = 0;
- mHeight = 0;
- mX = 0;
- mY = 0;
- }
- void entity2D::draw(HDC hDC)
- {
- }
- void entity2D::setDimensions(int width, int height)
- {
- mWidth = width;
- mHeight = height;
- }
- void entity2D::setPosition(int x, int y)
- {
- mX = x;
- mY = y;
- }
- void entity2D::setX(float valor)
- {
- mX = valor;
- }
- void entity2D::setY(float valor)
- {
- mY = valor;
- }
- int entity2D::getWidth()
- {
- return mWidth;
- }
- int entity2D::getHeight()
- {
- return mHeight;
- }
- float entity2D::getX()
- {
- return mX;
- }
- float entity2D::getY()
- {
- return mY;
- }