命名规则修改
This commit is contained in:
parent
095446b063
commit
d8ea376ceb
|
|
@ -1,23 +1,23 @@
|
|||
#include "..\e2daction.h"
|
||||
|
||||
e2d::ActionGradual::ActionGradual(double duration)
|
||||
e2d::FiniteTimeAction::FiniteTimeAction(double duration)
|
||||
: _delta(0)
|
||||
, _duration(max(duration, 0))
|
||||
{
|
||||
}
|
||||
|
||||
void e2d::ActionGradual::reset()
|
||||
void e2d::FiniteTimeAction::reset()
|
||||
{
|
||||
Action::reset();
|
||||
_delta = 0;
|
||||
}
|
||||
|
||||
void e2d::ActionGradual::_init()
|
||||
void e2d::FiniteTimeAction::_init()
|
||||
{
|
||||
Action::_init();
|
||||
}
|
||||
|
||||
void e2d::ActionGradual::_update()
|
||||
void e2d::FiniteTimeAction::_update()
|
||||
{
|
||||
Action::_update();
|
||||
|
||||
|
|
@ -37,7 +37,7 @@ void e2d::ActionGradual::_update()
|
|||
}
|
||||
}
|
||||
|
||||
void e2d::ActionGradual::_resetTime()
|
||||
void e2d::FiniteTimeAction::_resetTime()
|
||||
{
|
||||
Action::_resetTime();
|
||||
_last = Time::getTotalTime() - _delta * _duration;
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
#include "..\e2daction.h"
|
||||
|
||||
e2d::JumpBy::JumpBy(double duration, const Vector & vec, double height, int jumps)
|
||||
: ActionGradual(duration)
|
||||
: FiniteTimeAction(duration)
|
||||
, _deltaPos(vec)
|
||||
, _height(height)
|
||||
, _jumps(jumps)
|
||||
|
|
@ -20,7 +20,7 @@ e2d::JumpBy * e2d::JumpBy::reverse() const
|
|||
|
||||
void e2d::JumpBy::_init()
|
||||
{
|
||||
ActionGradual::_init();
|
||||
FiniteTimeAction::_init();
|
||||
|
||||
if (_target)
|
||||
{
|
||||
|
|
@ -30,7 +30,7 @@ void e2d::JumpBy::_init()
|
|||
|
||||
void e2d::JumpBy::_update()
|
||||
{
|
||||
ActionGradual::_update();
|
||||
FiniteTimeAction::_update();
|
||||
|
||||
if (_target)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -2,14 +2,14 @@
|
|||
|
||||
|
||||
e2d::MoveBy::MoveBy(double duration, Vector vector)
|
||||
: ActionGradual(duration)
|
||||
: FiniteTimeAction(duration)
|
||||
{
|
||||
_deltaPos = vector;
|
||||
}
|
||||
|
||||
void e2d::MoveBy::_init()
|
||||
{
|
||||
ActionGradual::_init();
|
||||
FiniteTimeAction::_init();
|
||||
|
||||
if (_target)
|
||||
{
|
||||
|
|
@ -19,7 +19,7 @@ void e2d::MoveBy::_init()
|
|||
|
||||
void e2d::MoveBy::_update()
|
||||
{
|
||||
ActionGradual::_update();
|
||||
FiniteTimeAction::_update();
|
||||
|
||||
if (_target)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -2,14 +2,14 @@
|
|||
|
||||
|
||||
e2d::OpacityBy::OpacityBy(double duration, double opacity)
|
||||
: ActionGradual(duration)
|
||||
: FiniteTimeAction(duration)
|
||||
{
|
||||
_deltaVal = opacity;
|
||||
}
|
||||
|
||||
void e2d::OpacityBy::_init()
|
||||
{
|
||||
ActionGradual::_init();
|
||||
FiniteTimeAction::_init();
|
||||
|
||||
if (_target)
|
||||
{
|
||||
|
|
@ -19,7 +19,7 @@ void e2d::OpacityBy::_init()
|
|||
|
||||
void e2d::OpacityBy::_update()
|
||||
{
|
||||
ActionGradual::_update();
|
||||
FiniteTimeAction::_update();
|
||||
|
||||
if (_target)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -2,14 +2,14 @@
|
|||
|
||||
|
||||
e2d::RotateBy::RotateBy(double duration, double rotation)
|
||||
: ActionGradual(duration)
|
||||
: FiniteTimeAction(duration)
|
||||
{
|
||||
_deltaVal = rotation;
|
||||
}
|
||||
|
||||
void e2d::RotateBy::_init()
|
||||
{
|
||||
ActionGradual::_init();
|
||||
FiniteTimeAction::_init();
|
||||
|
||||
if (_target)
|
||||
{
|
||||
|
|
@ -19,7 +19,7 @@ void e2d::RotateBy::_init()
|
|||
|
||||
void e2d::RotateBy::_update()
|
||||
{
|
||||
ActionGradual::_update();
|
||||
FiniteTimeAction::_update();
|
||||
|
||||
if (_target)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -2,14 +2,14 @@
|
|||
|
||||
|
||||
e2d::ScaleBy::ScaleBy(double duration, double scale)
|
||||
: ActionGradual(duration)
|
||||
: FiniteTimeAction(duration)
|
||||
{
|
||||
_deltaX = scale;
|
||||
_deltaY = scale;
|
||||
}
|
||||
|
||||
e2d::ScaleBy::ScaleBy(double duration, double scaleX, double scaleY)
|
||||
: ActionGradual(duration)
|
||||
: FiniteTimeAction(duration)
|
||||
{
|
||||
_deltaX = scaleX;
|
||||
_deltaY = scaleY;
|
||||
|
|
@ -17,7 +17,7 @@ e2d::ScaleBy::ScaleBy(double duration, double scaleX, double scaleY)
|
|||
|
||||
void e2d::ScaleBy::_init()
|
||||
{
|
||||
ActionGradual::_init();
|
||||
FiniteTimeAction::_init();
|
||||
|
||||
if (_target)
|
||||
{
|
||||
|
|
@ -28,7 +28,7 @@ void e2d::ScaleBy::_init()
|
|||
|
||||
void e2d::ScaleBy::_update()
|
||||
{
|
||||
ActionGradual::_update();
|
||||
FiniteTimeAction::_update();
|
||||
|
||||
if (_target)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,18 +1,18 @@
|
|||
#include "..\e2dcollider.h"
|
||||
#include "..\e2dnode.h"
|
||||
|
||||
e2d::ColliderCircle::ColliderCircle()
|
||||
e2d::CircleCollider::CircleCollider()
|
||||
: _d2dCircle(nullptr)
|
||||
{
|
||||
}
|
||||
|
||||
e2d::ColliderCircle::ColliderCircle(Point center, double radius)
|
||||
e2d::CircleCollider::CircleCollider(Point center, double radius)
|
||||
: _d2dCircle(nullptr)
|
||||
{
|
||||
this->setCircle(center, radius);
|
||||
}
|
||||
|
||||
e2d::ColliderCircle::ColliderCircle(Node * node)
|
||||
e2d::CircleCollider::CircleCollider(Node * node)
|
||||
: _d2dCircle(nullptr)
|
||||
{
|
||||
double minSide = min(node->getRealWidth(), node->getRealHeight());
|
||||
|
|
@ -26,12 +26,12 @@ e2d::ColliderCircle::ColliderCircle(Node * node)
|
|||
this->setAutoResize(true);
|
||||
}
|
||||
|
||||
e2d::ColliderCircle::~ColliderCircle()
|
||||
e2d::CircleCollider::~CircleCollider()
|
||||
{
|
||||
SafeRelease(_d2dCircle);
|
||||
}
|
||||
|
||||
void e2d::ColliderCircle::setCircle(Point center, double radius)
|
||||
void e2d::CircleCollider::setCircle(Point center, double radius)
|
||||
{
|
||||
SafeRelease(_d2dCircle);
|
||||
|
||||
|
|
@ -46,7 +46,7 @@ void e2d::ColliderCircle::setCircle(Point center, double radius)
|
|||
);
|
||||
}
|
||||
|
||||
void e2d::ColliderCircle::_resize()
|
||||
void e2d::CircleCollider::_resize()
|
||||
{
|
||||
if (_parentNode && _enable)
|
||||
{
|
||||
|
|
@ -61,7 +61,7 @@ void e2d::ColliderCircle::_resize()
|
|||
}
|
||||
}
|
||||
|
||||
ID2D1EllipseGeometry * e2d::ColliderCircle::getD2dGeometry() const
|
||||
ID2D1EllipseGeometry * e2d::CircleCollider::getD2dGeometry() const
|
||||
{
|
||||
return _d2dCircle;
|
||||
}
|
||||
|
|
@ -1,18 +1,18 @@
|
|||
#include "..\e2dcollider.h"
|
||||
#include "..\e2dnode.h"
|
||||
|
||||
e2d::ColliderEllipse::ColliderEllipse()
|
||||
e2d::EllipseCollider::EllipseCollider()
|
||||
: _d2dEllipse(nullptr)
|
||||
{
|
||||
}
|
||||
|
||||
e2d::ColliderEllipse::ColliderEllipse(Point center, double radiusX, double radiusY)
|
||||
e2d::EllipseCollider::EllipseCollider(Point center, double radiusX, double radiusY)
|
||||
: _d2dEllipse(nullptr)
|
||||
{
|
||||
this->setEllipse(center, radiusX, radiusY);
|
||||
}
|
||||
|
||||
e2d::ColliderEllipse::ColliderEllipse(Node * node)
|
||||
e2d::EllipseCollider::EllipseCollider(Node * node)
|
||||
: _d2dEllipse(nullptr)
|
||||
{
|
||||
this->setEllipse(
|
||||
|
|
@ -26,12 +26,12 @@ e2d::ColliderEllipse::ColliderEllipse(Node * node)
|
|||
this->setAutoResize(true);
|
||||
}
|
||||
|
||||
e2d::ColliderEllipse::~ColliderEllipse()
|
||||
e2d::EllipseCollider::~EllipseCollider()
|
||||
{
|
||||
SafeRelease(_d2dEllipse);
|
||||
}
|
||||
|
||||
void e2d::ColliderEllipse::setEllipse(Point center, double radiusX, double radiusY)
|
||||
void e2d::EllipseCollider::setEllipse(Point center, double radiusX, double radiusY)
|
||||
{
|
||||
SafeRelease(_d2dEllipse);
|
||||
|
||||
|
|
@ -46,7 +46,7 @@ void e2d::ColliderEllipse::setEllipse(Point center, double radiusX, double radiu
|
|||
);
|
||||
}
|
||||
|
||||
void e2d::ColliderEllipse::_resize()
|
||||
void e2d::EllipseCollider::_resize()
|
||||
{
|
||||
if (_parentNode && _enable)
|
||||
{
|
||||
|
|
@ -61,7 +61,7 @@ void e2d::ColliderEllipse::_resize()
|
|||
}
|
||||
}
|
||||
|
||||
ID2D1EllipseGeometry * e2d::ColliderEllipse::getD2dGeometry() const
|
||||
ID2D1EllipseGeometry * e2d::EllipseCollider::getD2dGeometry() const
|
||||
{
|
||||
return _d2dEllipse;
|
||||
}
|
||||
|
|
@ -1,30 +1,30 @@
|
|||
#include "..\e2dcollider.h"
|
||||
#include "..\e2dnode.h"
|
||||
|
||||
e2d::ColliderRect::ColliderRect()
|
||||
e2d::RectCollider::RectCollider()
|
||||
: _d2dRectangle(nullptr)
|
||||
{
|
||||
}
|
||||
|
||||
e2d::ColliderRect::ColliderRect(double x, double y, double width, double height)
|
||||
e2d::RectCollider::RectCollider(double x, double y, double width, double height)
|
||||
: _d2dRectangle(nullptr)
|
||||
{
|
||||
this->setRect(x, y, x + width, y + height);
|
||||
}
|
||||
|
||||
e2d::ColliderRect::ColliderRect(Node * node)
|
||||
e2d::RectCollider::RectCollider(Node * node)
|
||||
: _d2dRectangle(nullptr)
|
||||
{
|
||||
this->setRect(0, 0, node->getRealWidth(), node->getRealHeight());
|
||||
this->setAutoResize(true);
|
||||
}
|
||||
|
||||
e2d::ColliderRect::~ColliderRect()
|
||||
e2d::RectCollider::~RectCollider()
|
||||
{
|
||||
SafeRelease(_d2dRectangle);
|
||||
}
|
||||
|
||||
void e2d::ColliderRect::setRect(double left, double top, double right, double bottom)
|
||||
void e2d::RectCollider::setRect(double left, double top, double right, double bottom)
|
||||
{
|
||||
SafeRelease(_d2dRectangle);
|
||||
|
||||
|
|
@ -38,7 +38,7 @@ void e2d::ColliderRect::setRect(double left, double top, double right, double bo
|
|||
);
|
||||
}
|
||||
|
||||
void e2d::ColliderRect::_resize()
|
||||
void e2d::RectCollider::_resize()
|
||||
{
|
||||
if (_parentNode && _enable)
|
||||
{
|
||||
|
|
@ -46,7 +46,7 @@ void e2d::ColliderRect::_resize()
|
|||
}
|
||||
}
|
||||
|
||||
ID2D1RectangleGeometry * e2d::ColliderRect::getD2dGeometry() const
|
||||
ID2D1RectangleGeometry * e2d::RectCollider::getD2dGeometry() const
|
||||
{
|
||||
return _d2dRectangle;
|
||||
}
|
||||
|
|
@ -544,19 +544,19 @@ void e2d::Node::setCollider(Collider::Type type)
|
|||
{
|
||||
case Collider::Type::RECT:
|
||||
{
|
||||
this->setCollider(GC::create<ColliderRect>(this));
|
||||
this->setCollider(GC::create<RectCollider>(this));
|
||||
break;
|
||||
}
|
||||
|
||||
case Collider::Type::CIRCLE:
|
||||
{
|
||||
this->setCollider(GC::create<ColliderCircle>(this));
|
||||
this->setCollider(GC::create<CircleCollider>(this));
|
||||
break;
|
||||
}
|
||||
|
||||
case Collider::Type::ELLIPSE:
|
||||
{
|
||||
this->setCollider(GC::create<ColliderEllipse>(this));
|
||||
this->setCollider(GC::create<EllipseCollider>(this));
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,40 +1,40 @@
|
|||
#include "..\..\e2dshape.h"
|
||||
|
||||
e2d::Circle::Circle()
|
||||
e2d::CircleShape::CircleShape()
|
||||
: _radius(0)
|
||||
{
|
||||
this->setPivot(0.5, 0.5);
|
||||
}
|
||||
|
||||
e2d::Circle::Circle(double radius)
|
||||
e2d::CircleShape::CircleShape(double radius)
|
||||
{
|
||||
this->setRadius(radius);
|
||||
this->setPivot(0.5, 0.5);
|
||||
}
|
||||
|
||||
e2d::Circle::Circle(Point center, double radius)
|
||||
e2d::CircleShape::CircleShape(Point center, double radius)
|
||||
{
|
||||
this->setRadius(radius);
|
||||
this->setPos(center);
|
||||
this->setPivot(0.5, 0.5);
|
||||
}
|
||||
|
||||
e2d::Circle::~Circle()
|
||||
e2d::CircleShape::~CircleShape()
|
||||
{
|
||||
}
|
||||
|
||||
double e2d::Circle::getRadius() const
|
||||
double e2d::CircleShape::getRadius() const
|
||||
{
|
||||
return _radius;
|
||||
}
|
||||
|
||||
void e2d::Circle::setRadius(double radius)
|
||||
void e2d::CircleShape::setRadius(double radius)
|
||||
{
|
||||
_radius = float(radius);
|
||||
Node::setSize(radius * 2, radius * 2);
|
||||
}
|
||||
|
||||
void e2d::Circle::_renderLine()
|
||||
void e2d::CircleShape::_renderLine()
|
||||
{
|
||||
Renderer::getRenderTarget()->DrawEllipse(
|
||||
D2D1::Ellipse(D2D1::Point2F(_radius, _radius), _radius, _radius),
|
||||
|
|
@ -43,7 +43,7 @@ void e2d::Circle::_renderLine()
|
|||
);
|
||||
}
|
||||
|
||||
void e2d::Circle::_renderFill()
|
||||
void e2d::CircleShape::_renderFill()
|
||||
{
|
||||
Renderer::getRenderTarget()->FillEllipse(
|
||||
D2D1::Ellipse(D2D1::Point2F(_radius, _radius), _radius, _radius),
|
||||
|
|
@ -1,20 +1,20 @@
|
|||
#include "..\..\e2dshape.h"
|
||||
|
||||
e2d::Ellipse::Ellipse()
|
||||
e2d::EllipseShape::EllipseShape()
|
||||
: _radiusX(0)
|
||||
, _radiusY(0)
|
||||
{
|
||||
this->setPivot(0.5, 0.5);
|
||||
}
|
||||
|
||||
e2d::Ellipse::Ellipse(double radiusX, double radiusY)
|
||||
e2d::EllipseShape::EllipseShape(double radiusX, double radiusY)
|
||||
{
|
||||
this->setRadiusX(radiusX);
|
||||
this->setRadiusY(radiusY);
|
||||
this->setPivot(0.5, 0.5);
|
||||
}
|
||||
|
||||
e2d::Ellipse::Ellipse(Point center, double radiusX, double radiusY)
|
||||
e2d::EllipseShape::EllipseShape(Point center, double radiusX, double radiusY)
|
||||
{
|
||||
this->setRadiusX(radiusX);
|
||||
this->setRadiusY(radiusY);
|
||||
|
|
@ -22,33 +22,33 @@ e2d::Ellipse::Ellipse(Point center, double radiusX, double radiusY)
|
|||
this->setPivot(0.5, 0.5);
|
||||
}
|
||||
|
||||
e2d::Ellipse::~Ellipse()
|
||||
e2d::EllipseShape::~EllipseShape()
|
||||
{
|
||||
}
|
||||
|
||||
double e2d::Ellipse::getRadiusX() const
|
||||
double e2d::EllipseShape::getRadiusX() const
|
||||
{
|
||||
return _radiusX;
|
||||
}
|
||||
|
||||
double e2d::Ellipse::getRadiusY() const
|
||||
double e2d::EllipseShape::getRadiusY() const
|
||||
{
|
||||
return _radiusY;
|
||||
}
|
||||
|
||||
void e2d::Ellipse::setRadiusX(double radiusX)
|
||||
void e2d::EllipseShape::setRadiusX(double radiusX)
|
||||
{
|
||||
_radiusX = float(radiusX);
|
||||
Node::setWidth(radiusX * 2);
|
||||
}
|
||||
|
||||
void e2d::Ellipse::setRadiusY(double radiusY)
|
||||
void e2d::EllipseShape::setRadiusY(double radiusY)
|
||||
{
|
||||
_radiusY = float(radiusY);
|
||||
Node::setHeight(radiusY * 2);
|
||||
}
|
||||
|
||||
void e2d::Ellipse::_renderLine()
|
||||
void e2d::EllipseShape::_renderLine()
|
||||
{
|
||||
Renderer::getRenderTarget()->DrawEllipse(
|
||||
D2D1::Ellipse(D2D1::Point2F(_radiusX, _radiusY), _radiusX, _radiusY),
|
||||
|
|
@ -57,7 +57,7 @@ void e2d::Ellipse::_renderLine()
|
|||
);
|
||||
}
|
||||
|
||||
void e2d::Ellipse::_renderFill()
|
||||
void e2d::EllipseShape::_renderFill()
|
||||
{
|
||||
Renderer::getRenderTarget()->FillEllipse(
|
||||
D2D1::Ellipse(D2D1::Point2F(_radiusX, _radiusY), _radiusX, _radiusY),
|
||||
|
|
@ -1,26 +1,26 @@
|
|||
#include "..\..\e2dshape.h"
|
||||
|
||||
e2d::Rect::Rect()
|
||||
e2d::RectShape::RectShape()
|
||||
{
|
||||
}
|
||||
|
||||
e2d::Rect::Rect(Size size)
|
||||
e2d::RectShape::RectShape(Size size)
|
||||
{
|
||||
this->setSize(size);
|
||||
}
|
||||
|
||||
e2d::Rect::Rect(Point topLeft, Size size)
|
||||
e2d::RectShape::RectShape(Point topLeft, Size size)
|
||||
{
|
||||
this->setPivot(0, 0);
|
||||
this->setPos(topLeft);
|
||||
this->setSize(size);
|
||||
}
|
||||
|
||||
e2d::Rect::~Rect()
|
||||
e2d::RectShape::~RectShape()
|
||||
{
|
||||
}
|
||||
|
||||
void e2d::Rect::_renderLine()
|
||||
void e2d::RectShape::_renderLine()
|
||||
{
|
||||
Renderer::getRenderTarget()->DrawRectangle(
|
||||
D2D1::RectF(0, 0, _width, _height),
|
||||
|
|
@ -29,7 +29,7 @@ void e2d::Rect::_renderLine()
|
|||
);
|
||||
}
|
||||
|
||||
void e2d::Rect::_renderFill()
|
||||
void e2d::RectShape::_renderFill()
|
||||
{
|
||||
Renderer::getRenderTarget()->FillRectangle(
|
||||
D2D1::RectF(0, 0, _width, _height),
|
||||
|
|
@ -1,19 +1,19 @@
|
|||
#include "..\..\e2dshape.h"
|
||||
|
||||
e2d::RoundRect::RoundRect()
|
||||
e2d::RoundRectShape::RoundRectShape()
|
||||
: _radiusX(0)
|
||||
, _radiusY(0)
|
||||
{
|
||||
}
|
||||
|
||||
e2d::RoundRect::RoundRect(Size size, double radiusX, double radiusY)
|
||||
e2d::RoundRectShape::RoundRectShape(Size size, double radiusX, double radiusY)
|
||||
: _radiusX(float(radiusX))
|
||||
, _radiusY(float(radiusY))
|
||||
{
|
||||
this->setSize(size);
|
||||
}
|
||||
|
||||
e2d::RoundRect::RoundRect(Point topLeft, Size size, double radiusX, double radiusY)
|
||||
e2d::RoundRectShape::RoundRectShape(Point topLeft, Size size, double radiusX, double radiusY)
|
||||
: _radiusX(float(radiusX))
|
||||
, _radiusY(float(radiusY))
|
||||
{
|
||||
|
|
@ -22,31 +22,31 @@ e2d::RoundRect::RoundRect(Point topLeft, Size size, double radiusX, double radiu
|
|||
this->setSize(size);
|
||||
}
|
||||
|
||||
e2d::RoundRect::~RoundRect()
|
||||
e2d::RoundRectShape::~RoundRectShape()
|
||||
{
|
||||
}
|
||||
|
||||
double e2d::RoundRect::getRadiusX() const
|
||||
double e2d::RoundRectShape::getRadiusX() const
|
||||
{
|
||||
return _radiusX;
|
||||
}
|
||||
|
||||
double e2d::RoundRect::getRadiusY() const
|
||||
double e2d::RoundRectShape::getRadiusY() const
|
||||
{
|
||||
return _radiusY;
|
||||
}
|
||||
|
||||
void e2d::RoundRect::setRadiusX(double radiusX)
|
||||
void e2d::RoundRectShape::setRadiusX(double radiusX)
|
||||
{
|
||||
_radiusX = float(radiusX);
|
||||
}
|
||||
|
||||
void e2d::RoundRect::setRadiusY(double radiusY)
|
||||
void e2d::RoundRectShape::setRadiusY(double radiusY)
|
||||
{
|
||||
_radiusY = float(radiusY);
|
||||
}
|
||||
|
||||
void e2d::RoundRect::_renderLine()
|
||||
void e2d::RoundRectShape::_renderLine()
|
||||
{
|
||||
Renderer::getRenderTarget()->DrawRoundedRectangle(
|
||||
D2D1::RoundedRect(D2D1::RectF(0, 0, _width, _height), _radiusX, _radiusY),
|
||||
|
|
@ -55,7 +55,7 @@ void e2d::RoundRect::_renderLine()
|
|||
);
|
||||
}
|
||||
|
||||
void e2d::RoundRect::_renderFill()
|
||||
void e2d::RoundRectShape::_renderFill()
|
||||
{
|
||||
Renderer::getRenderTarget()->FillRoundedRectangle(
|
||||
D2D1::RoundedRect(D2D1::RectF(0, 0, _width, _height), _radiusX, _radiusY),
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
#include "..\e2dnode.h"
|
||||
|
||||
e2d::ButtonToggle::ButtonToggle()
|
||||
e2d::ToggleButton::ToggleButton()
|
||||
: Button()
|
||||
, _toggle(true)
|
||||
, _normalOff(nullptr)
|
||||
|
|
@ -10,7 +10,7 @@ e2d::ButtonToggle::ButtonToggle()
|
|||
{
|
||||
}
|
||||
|
||||
e2d::ButtonToggle::ButtonToggle(Node * toggleOnNormal, Node * toggleOffNormal, const Function& func)
|
||||
e2d::ToggleButton::ToggleButton(Node * toggleOnNormal, Node * toggleOffNormal, const Function& func)
|
||||
: Button()
|
||||
, _toggle(true)
|
||||
, _normalOff(nullptr)
|
||||
|
|
@ -23,7 +23,7 @@ e2d::ButtonToggle::ButtonToggle(Node * toggleOnNormal, Node * toggleOffNormal, c
|
|||
this->setClickFunc(func);
|
||||
}
|
||||
|
||||
e2d::ButtonToggle::ButtonToggle(Node * toggleOnNormal, Node * toggleOffNormal, Node * toggleOnSelected, Node * toggleOffSelected, const Function& func)
|
||||
e2d::ToggleButton::ToggleButton(Node * toggleOnNormal, Node * toggleOffNormal, Node * toggleOnSelected, Node * toggleOffSelected, const Function& func)
|
||||
: Button()
|
||||
, _toggle(true)
|
||||
, _normalOff(nullptr)
|
||||
|
|
@ -38,7 +38,7 @@ e2d::ButtonToggle::ButtonToggle(Node * toggleOnNormal, Node * toggleOffNormal, N
|
|||
this->setClickFunc(func);
|
||||
}
|
||||
|
||||
e2d::ButtonToggle::ButtonToggle(Node * toggleOnNormal, Node * toggleOffNormal, Node * toggleOnMouseOver, Node * toggleOffMouseOver, Node * toggleOnSelected, Node * toggleOffSelected, const Function& func)
|
||||
e2d::ToggleButton::ToggleButton(Node * toggleOnNormal, Node * toggleOffNormal, Node * toggleOnMouseOver, Node * toggleOffMouseOver, Node * toggleOnSelected, Node * toggleOffSelected, const Function& func)
|
||||
: Button()
|
||||
, _toggle(true)
|
||||
, _normalOff(nullptr)
|
||||
|
|
@ -55,7 +55,7 @@ e2d::ButtonToggle::ButtonToggle(Node * toggleOnNormal, Node * toggleOffNormal, N
|
|||
this->setClickFunc(func);
|
||||
}
|
||||
|
||||
e2d::ButtonToggle::ButtonToggle(Node * toggleOnNormal, Node * toggleOffNormal, Node * toggleOnMouseOver, Node * toggleOffMouseOver, Node * toggleOnSelected, Node * toggleOffSelected, Node * toggleOnDisabled, Node * toggleOffDisabled, const Function& func)
|
||||
e2d::ToggleButton::ToggleButton(Node * toggleOnNormal, Node * toggleOffNormal, Node * toggleOnMouseOver, Node * toggleOffMouseOver, Node * toggleOnSelected, Node * toggleOffSelected, Node * toggleOnDisabled, Node * toggleOffDisabled, const Function& func)
|
||||
: Button()
|
||||
, _toggle(true)
|
||||
, _normalOff(nullptr)
|
||||
|
|
@ -74,12 +74,12 @@ e2d::ButtonToggle::ButtonToggle(Node * toggleOnNormal, Node * toggleOffNormal, N
|
|||
this->setClickFunc(func);
|
||||
}
|
||||
|
||||
bool e2d::ButtonToggle::getState() const
|
||||
bool e2d::ToggleButton::getState() const
|
||||
{
|
||||
return _toggle;
|
||||
}
|
||||
|
||||
void e2d::ButtonToggle::setState(bool bState)
|
||||
void e2d::ToggleButton::setState(bool bState)
|
||||
{
|
||||
if (_toggle != bState)
|
||||
{
|
||||
|
|
@ -89,7 +89,7 @@ void e2d::ButtonToggle::setState(bool bState)
|
|||
}
|
||||
}
|
||||
|
||||
void e2d::ButtonToggle::setNormal(Node * normal)
|
||||
void e2d::ToggleButton::setNormal(Node * normal)
|
||||
{
|
||||
if (normal != _normal)
|
||||
{
|
||||
|
|
@ -111,7 +111,7 @@ void e2d::ButtonToggle::setNormal(Node * normal)
|
|||
}
|
||||
}
|
||||
|
||||
void e2d::ButtonToggle::setMouseOver(Node * mouseover)
|
||||
void e2d::ToggleButton::setMouseOver(Node * mouseover)
|
||||
{
|
||||
if (mouseover != _mouseover)
|
||||
{
|
||||
|
|
@ -132,7 +132,7 @@ void e2d::ButtonToggle::setMouseOver(Node * mouseover)
|
|||
}
|
||||
}
|
||||
|
||||
void e2d::ButtonToggle::setSelected(Node * selected)
|
||||
void e2d::ToggleButton::setSelected(Node * selected)
|
||||
{
|
||||
if (selected != _selected)
|
||||
{
|
||||
|
|
@ -153,7 +153,7 @@ void e2d::ButtonToggle::setSelected(Node * selected)
|
|||
}
|
||||
}
|
||||
|
||||
void e2d::ButtonToggle::setDisabled(Node * disabled)
|
||||
void e2d::ToggleButton::setDisabled(Node * disabled)
|
||||
{
|
||||
if (disabled != _disabled)
|
||||
{
|
||||
|
|
@ -174,7 +174,7 @@ void e2d::ButtonToggle::setDisabled(Node * disabled)
|
|||
}
|
||||
}
|
||||
|
||||
void e2d::ButtonToggle::setNormalOff(Node * normal)
|
||||
void e2d::ToggleButton::setNormalOff(Node * normal)
|
||||
{
|
||||
if (normal != _normalOff)
|
||||
{
|
||||
|
|
@ -195,7 +195,7 @@ void e2d::ButtonToggle::setNormalOff(Node * normal)
|
|||
}
|
||||
}
|
||||
|
||||
void e2d::ButtonToggle::setMouseOverOff(Node * mouseover)
|
||||
void e2d::ToggleButton::setMouseOverOff(Node * mouseover)
|
||||
{
|
||||
if (mouseover != _mouseoverOff)
|
||||
{
|
||||
|
|
@ -216,7 +216,7 @@ void e2d::ButtonToggle::setMouseOverOff(Node * mouseover)
|
|||
}
|
||||
}
|
||||
|
||||
void e2d::ButtonToggle::setSelectedOff(Node * selected)
|
||||
void e2d::ToggleButton::setSelectedOff(Node * selected)
|
||||
{
|
||||
if (selected != _selectedOff)
|
||||
{
|
||||
|
|
@ -237,7 +237,7 @@ void e2d::ButtonToggle::setSelectedOff(Node * selected)
|
|||
}
|
||||
}
|
||||
|
||||
void e2d::ButtonToggle::setDisabledOff(Node * disabled)
|
||||
void e2d::ToggleButton::setDisabledOff(Node * disabled)
|
||||
{
|
||||
if (disabled != _disabledOff)
|
||||
{
|
||||
|
|
@ -258,7 +258,7 @@ void e2d::ButtonToggle::setDisabledOff(Node * disabled)
|
|||
}
|
||||
}
|
||||
|
||||
void e2d::ButtonToggle::_updateState()
|
||||
void e2d::ToggleButton::_updateState()
|
||||
{
|
||||
if (_toggle)
|
||||
{
|
||||
|
|
@ -286,7 +286,7 @@ void e2d::ButtonToggle::_updateState()
|
|||
}
|
||||
}
|
||||
|
||||
void e2d::ButtonToggle::_runCallback()
|
||||
void e2d::ToggleButton::_runCallback()
|
||||
{
|
||||
_toggle = !_toggle;
|
||||
_updateState();
|
||||
|
|
@ -1,18 +1,18 @@
|
|||
#include "..\e2dtransition.h"
|
||||
#include "..\e2dnode.h"
|
||||
|
||||
e2d::TransitionBox::TransitionBox(double duration)
|
||||
e2d::BoxTransition::BoxTransition(double duration)
|
||||
: Transition(duration)
|
||||
{
|
||||
}
|
||||
|
||||
void e2d::TransitionBox::_init(Scene * prev, Scene * next)
|
||||
void e2d::BoxTransition::_init(Scene * prev, Scene * next)
|
||||
{
|
||||
Transition::_init(prev, next);
|
||||
_inLayerParam.opacity = 0;
|
||||
}
|
||||
|
||||
void e2d::TransitionBox::_updateCustom()
|
||||
void e2d::BoxTransition::_updateCustom()
|
||||
{
|
||||
if (_delta <= 0.5)
|
||||
{
|
||||
|
|
@ -40,6 +40,6 @@ void e2d::TransitionBox::_updateCustom()
|
|||
}
|
||||
}
|
||||
|
||||
void e2d::TransitionBox::_reset()
|
||||
void e2d::BoxTransition::_reset()
|
||||
{
|
||||
}
|
||||
|
|
@ -1,19 +1,19 @@
|
|||
#include "..\e2dtransition.h"
|
||||
#include "..\e2dnode.h"
|
||||
|
||||
e2d::TransitionEmerge::TransitionEmerge(double duration)
|
||||
e2d::EmergeTransition::EmergeTransition(double duration)
|
||||
: Transition(duration)
|
||||
{
|
||||
}
|
||||
|
||||
void e2d::TransitionEmerge::_init(Scene * prev, Scene * next)
|
||||
void e2d::EmergeTransition::_init(Scene * prev, Scene * next)
|
||||
{
|
||||
Transition::_init(prev, next);
|
||||
_outLayerParam.opacity = 1;
|
||||
_inLayerParam.opacity = 0;
|
||||
}
|
||||
|
||||
void e2d::TransitionEmerge::_updateCustom()
|
||||
void e2d::EmergeTransition::_updateCustom()
|
||||
{
|
||||
_outLayerParam.opacity = float(1 - _delta);
|
||||
_inLayerParam.opacity = float(_delta);
|
||||
|
|
@ -24,6 +24,6 @@ void e2d::TransitionEmerge::_updateCustom()
|
|||
}
|
||||
}
|
||||
|
||||
void e2d::TransitionEmerge::_reset()
|
||||
void e2d::EmergeTransition::_reset()
|
||||
{
|
||||
}
|
||||
|
|
@ -1,19 +1,19 @@
|
|||
#include "..\e2dtransition.h"
|
||||
#include "..\e2dnode.h"
|
||||
|
||||
e2d::TransitionFade::TransitionFade(double duration)
|
||||
e2d::FadeTransition::FadeTransition(double duration)
|
||||
: Transition(duration)
|
||||
{
|
||||
}
|
||||
|
||||
void e2d::TransitionFade::_init(Scene * prev, Scene * next)
|
||||
void e2d::FadeTransition::_init(Scene * prev, Scene * next)
|
||||
{
|
||||
Transition::_init(prev, next);
|
||||
_outLayerParam.opacity = 1;
|
||||
_inLayerParam.opacity = 0;
|
||||
}
|
||||
|
||||
void e2d::TransitionFade::_updateCustom()
|
||||
void e2d::FadeTransition::_updateCustom()
|
||||
{
|
||||
if (_delta < 0.5)
|
||||
{
|
||||
|
|
@ -31,6 +31,6 @@ void e2d::TransitionFade::_updateCustom()
|
|||
}
|
||||
}
|
||||
|
||||
void e2d::TransitionFade::_reset()
|
||||
void e2d::FadeTransition::_reset()
|
||||
{
|
||||
}
|
||||
|
|
@ -1,13 +1,13 @@
|
|||
#include "..\e2dtransition.h"
|
||||
#include "..\e2dnode.h"
|
||||
|
||||
e2d::TransitionMove::TransitionMove(double duration, Direction direction)
|
||||
e2d::MoveTransition::MoveTransition(double duration, Direction direction)
|
||||
: Transition(duration)
|
||||
, _direction(direction)
|
||||
{
|
||||
}
|
||||
|
||||
void e2d::TransitionMove::_init(Scene * prev, Scene * next)
|
||||
void e2d::MoveTransition::_init(Scene * prev, Scene * next)
|
||||
{
|
||||
Transition::_init(prev, next);
|
||||
|
||||
|
|
@ -38,7 +38,7 @@ void e2d::TransitionMove::_init(Scene * prev, Scene * next)
|
|||
_inScene->getRoot()->setPos(_startPos);
|
||||
}
|
||||
|
||||
void e2d::TransitionMove::_updateCustom()
|
||||
void e2d::MoveTransition::_updateCustom()
|
||||
{
|
||||
if (_outScene)
|
||||
{
|
||||
|
|
@ -55,7 +55,7 @@ void e2d::TransitionMove::_updateCustom()
|
|||
}
|
||||
}
|
||||
|
||||
void e2d::TransitionMove::_reset()
|
||||
void e2d::MoveTransition::_reset()
|
||||
{
|
||||
if (_outScene) _outScene->getRoot()->setPos(0, 0);
|
||||
_inScene->getRoot()->setPos(0, 0);
|
||||
|
|
@ -89,12 +89,12 @@ protected:
|
|||
|
||||
|
||||
// 持续动作
|
||||
class ActionGradual :
|
||||
class FiniteTimeAction :
|
||||
public Action
|
||||
{
|
||||
public:
|
||||
// 创建特定时长的持续动作
|
||||
ActionGradual(
|
||||
FiniteTimeAction(
|
||||
double duration
|
||||
);
|
||||
|
||||
|
|
@ -119,7 +119,7 @@ protected:
|
|||
|
||||
// 相对位移动作
|
||||
class MoveBy :
|
||||
public ActionGradual
|
||||
public FiniteTimeAction
|
||||
{
|
||||
public:
|
||||
MoveBy(
|
||||
|
|
@ -177,7 +177,7 @@ protected:
|
|||
|
||||
// 相对跳跃动作
|
||||
class JumpBy :
|
||||
public ActionGradual
|
||||
public FiniteTimeAction
|
||||
{
|
||||
public:
|
||||
JumpBy(
|
||||
|
|
@ -242,7 +242,7 @@ protected:
|
|||
|
||||
// 相对缩放动作
|
||||
class ScaleBy :
|
||||
public ActionGradual
|
||||
public FiniteTimeAction
|
||||
{
|
||||
public:
|
||||
ScaleBy(
|
||||
|
|
@ -315,7 +315,7 @@ protected:
|
|||
|
||||
// 透明度相对渐变动作
|
||||
class OpacityBy :
|
||||
public ActionGradual
|
||||
public FiniteTimeAction
|
||||
{
|
||||
public:
|
||||
OpacityBy(
|
||||
|
|
@ -403,7 +403,7 @@ public:
|
|||
|
||||
// 相对旋转动作
|
||||
class RotateBy :
|
||||
public ActionGradual
|
||||
public FiniteTimeAction
|
||||
{
|
||||
public:
|
||||
RotateBy(
|
||||
|
|
|
|||
|
|
@ -128,7 +128,7 @@ class Collider :
|
|||
|
||||
public:
|
||||
// 碰撞体类别
|
||||
enum class Type : int
|
||||
enum Type : int
|
||||
{
|
||||
NONE, /* 无 */
|
||||
RECT, /* 矩形 */
|
||||
|
|
@ -206,24 +206,24 @@ protected:
|
|||
|
||||
|
||||
// 矩形碰撞体
|
||||
class ColliderRect :
|
||||
class RectCollider :
|
||||
public Collider
|
||||
{
|
||||
public:
|
||||
ColliderRect();
|
||||
RectCollider();
|
||||
|
||||
ColliderRect(
|
||||
RectCollider(
|
||||
double x,
|
||||
double y,
|
||||
double width,
|
||||
double height
|
||||
);
|
||||
|
||||
ColliderRect(
|
||||
RectCollider(
|
||||
Node * node
|
||||
);
|
||||
|
||||
virtual ~ColliderRect();
|
||||
virtual ~RectCollider();
|
||||
|
||||
// 修改矩形碰撞体大小
|
||||
void setRect(
|
||||
|
|
@ -246,22 +246,22 @@ protected:
|
|||
|
||||
|
||||
// 圆形碰撞体
|
||||
class ColliderCircle :
|
||||
class CircleCollider :
|
||||
public Collider
|
||||
{
|
||||
public:
|
||||
ColliderCircle();
|
||||
CircleCollider();
|
||||
|
||||
ColliderCircle(
|
||||
CircleCollider(
|
||||
Point center,
|
||||
double radius
|
||||
);
|
||||
|
||||
ColliderCircle(
|
||||
CircleCollider(
|
||||
Node * node
|
||||
);
|
||||
|
||||
virtual ~ColliderCircle();
|
||||
virtual ~CircleCollider();
|
||||
|
||||
// 修改圆形碰撞体大小
|
||||
void setCircle(
|
||||
|
|
@ -282,23 +282,23 @@ protected:
|
|||
|
||||
|
||||
// 椭圆形碰撞体
|
||||
class ColliderEllipse :
|
||||
class EllipseCollider :
|
||||
public Collider
|
||||
{
|
||||
public:
|
||||
ColliderEllipse();
|
||||
EllipseCollider();
|
||||
|
||||
ColliderEllipse(
|
||||
EllipseCollider(
|
||||
Point center,
|
||||
double radiusX,
|
||||
double radiusY
|
||||
);
|
||||
|
||||
ColliderEllipse(
|
||||
EllipseCollider(
|
||||
Node * node
|
||||
);
|
||||
|
||||
virtual ~ColliderEllipse();
|
||||
virtual ~EllipseCollider();
|
||||
|
||||
// 修改椭圆碰撞体大小
|
||||
void setEllipse(
|
||||
|
|
|
|||
|
|
@ -846,19 +846,19 @@ protected:
|
|||
};
|
||||
|
||||
|
||||
class ButtonToggle :
|
||||
class ToggleButton :
|
||||
public Button
|
||||
{
|
||||
public:
|
||||
ButtonToggle();
|
||||
ToggleButton();
|
||||
|
||||
ButtonToggle(
|
||||
ToggleButton(
|
||||
Node * onNormal, /* 按钮打开时,普通状态 */
|
||||
Node * offNormal, /* 按钮关闭时,普通状态 */
|
||||
const Function& func = nullptr /* 按钮点击后的执行函数 */
|
||||
);
|
||||
|
||||
ButtonToggle(
|
||||
ToggleButton(
|
||||
Node * onNormal, /* 按钮打开时,普通状态 */
|
||||
Node * offNormal, /* 按钮关闭时,普通状态 */
|
||||
Node * onSelected, /* 按钮打开时,鼠标按下状态 */
|
||||
|
|
@ -866,7 +866,7 @@ public:
|
|||
const Function& func = nullptr /* 按钮点击后的执行函数 */
|
||||
);
|
||||
|
||||
ButtonToggle(
|
||||
ToggleButton(
|
||||
Node * onNormal, /* 按钮打开时,普通状态 */
|
||||
Node * offNormal, /* 按钮关闭时,普通状态 */
|
||||
Node * onMouseOver, /* 按钮打开时,鼠标移入状态 */
|
||||
|
|
@ -876,7 +876,7 @@ public:
|
|||
const Function& func = nullptr /* 按钮点击后的执行函数 */
|
||||
);
|
||||
|
||||
ButtonToggle(
|
||||
ToggleButton(
|
||||
Node * onNormal, /* 按钮打开时,普通状态 */
|
||||
Node * offNormal, /* 按钮关闭时,普通状态 */
|
||||
Node * onMouseOver, /* 按钮打开时,鼠标移入状态 */
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ class Shape :
|
|||
{
|
||||
public:
|
||||
// 形状样式
|
||||
enum class Style : int
|
||||
enum Style : int
|
||||
{
|
||||
SOLID, /* 填充 */
|
||||
ROUND, /* 轮廓 */
|
||||
|
|
@ -72,22 +72,22 @@ protected:
|
|||
|
||||
|
||||
// 矩形
|
||||
class Rect :
|
||||
class RectShape :
|
||||
public Shape
|
||||
{
|
||||
public:
|
||||
Rect();
|
||||
RectShape();
|
||||
|
||||
Rect(
|
||||
RectShape(
|
||||
Size size /* 宽度和高度 */
|
||||
);
|
||||
|
||||
Rect(
|
||||
RectShape(
|
||||
Point topLeft, /* 左上角坐标 */
|
||||
Size size /* 宽度和高度 */
|
||||
);
|
||||
|
||||
virtual ~Rect();
|
||||
virtual ~RectShape();
|
||||
|
||||
protected:
|
||||
// 渲染轮廓
|
||||
|
|
@ -99,26 +99,26 @@ protected:
|
|||
|
||||
|
||||
// 圆角矩形
|
||||
class RoundRect :
|
||||
class RoundRectShape :
|
||||
public Shape
|
||||
{
|
||||
public:
|
||||
RoundRect();
|
||||
RoundRectShape();
|
||||
|
||||
RoundRect(
|
||||
RoundRectShape(
|
||||
Size size, /* 宽度和高度 */
|
||||
double radiusX, /* 圆角半径 */
|
||||
double radiusY /* 圆角半径 */
|
||||
);
|
||||
|
||||
RoundRect(
|
||||
RoundRectShape(
|
||||
Point topLeft, /* 左上角坐标 */
|
||||
Size size, /* 宽度和高度 */
|
||||
double radiusX, /* 圆角半径 */
|
||||
double radiusY /* 圆角半径 */
|
||||
);
|
||||
|
||||
virtual ~RoundRect();
|
||||
virtual ~RoundRectShape();
|
||||
|
||||
// 获取圆角半径
|
||||
double getRadiusX() const;
|
||||
|
|
@ -150,22 +150,22 @@ protected:
|
|||
|
||||
|
||||
// 圆形
|
||||
class Circle :
|
||||
class CircleShape :
|
||||
public Shape
|
||||
{
|
||||
public:
|
||||
Circle();
|
||||
CircleShape();
|
||||
|
||||
Circle(
|
||||
CircleShape(
|
||||
double radius /* 半径 */
|
||||
);
|
||||
|
||||
Circle(
|
||||
CircleShape(
|
||||
Point center, /* 圆心坐标 */
|
||||
double radius /* 半径 */
|
||||
);
|
||||
|
||||
virtual ~Circle();
|
||||
virtual ~CircleShape();
|
||||
|
||||
// 获取半径
|
||||
double getRadius() const;
|
||||
|
|
@ -188,24 +188,24 @@ protected:
|
|||
|
||||
|
||||
// 椭圆形
|
||||
class Ellipse :
|
||||
class EllipseShape :
|
||||
public Shape
|
||||
{
|
||||
public:
|
||||
Ellipse();
|
||||
EllipseShape();
|
||||
|
||||
Ellipse(
|
||||
EllipseShape(
|
||||
double radiusX, /* 横轴半径 */
|
||||
double radiusY /* 纵轴半径 */
|
||||
);
|
||||
|
||||
Ellipse(
|
||||
EllipseShape(
|
||||
Point center, /* 圆心坐标 */
|
||||
double radiusX, /* 横轴半径 */
|
||||
double radiusY /* 纵轴半径 */
|
||||
);
|
||||
|
||||
virtual ~Ellipse();
|
||||
virtual ~EllipseShape();
|
||||
|
||||
// 获取横轴半径
|
||||
double getRadiusX() const;
|
||||
|
|
|
|||
|
|
@ -63,11 +63,11 @@ protected:
|
|||
|
||||
|
||||
// 淡入淡出过渡
|
||||
class TransitionFade :
|
||||
class FadeTransition :
|
||||
public Transition
|
||||
{
|
||||
public:
|
||||
TransitionFade(
|
||||
FadeTransition(
|
||||
double duration /* 动画持续时长 */
|
||||
);
|
||||
|
||||
|
|
@ -85,11 +85,11 @@ protected:
|
|||
|
||||
|
||||
// 渐变过渡
|
||||
class TransitionEmerge :
|
||||
class EmergeTransition :
|
||||
public Transition
|
||||
{
|
||||
public:
|
||||
TransitionEmerge(
|
||||
EmergeTransition(
|
||||
double duration /* 浮现动画持续时长 */
|
||||
);
|
||||
|
||||
|
|
@ -107,11 +107,11 @@ protected:
|
|||
|
||||
|
||||
// 盒状过渡
|
||||
class TransitionBox :
|
||||
class BoxTransition :
|
||||
public Transition
|
||||
{
|
||||
public:
|
||||
TransitionBox(
|
||||
BoxTransition(
|
||||
double duration /* 动画持续时长 */
|
||||
);
|
||||
|
||||
|
|
@ -129,11 +129,11 @@ protected:
|
|||
|
||||
|
||||
// 移入过渡
|
||||
class TransitionMove :
|
||||
class MoveTransition :
|
||||
public Transition
|
||||
{
|
||||
public:
|
||||
TransitionMove(
|
||||
MoveTransition(
|
||||
double moveDuration, /* 场景移动动画持续时长 */
|
||||
Direction direction = Direction::LEFT /* 场景移动方向 */
|
||||
);
|
||||
|
|
|
|||
|
|
@ -213,7 +213,7 @@
|
|||
<ClCompile Include="..\..\core\Action\ScaleBy.cpp" />
|
||||
<ClCompile Include="..\..\core\Action\ScaleTo.cpp" />
|
||||
<ClCompile Include="..\..\core\Action\Sequence.cpp" />
|
||||
<ClCompile Include="..\..\core\Action\ActionGradual.cpp" />
|
||||
<ClCompile Include="..\..\core\Action\FiniteTimeAction.cpp" />
|
||||
<ClCompile Include="..\..\core\Action\Spawn.cpp" />
|
||||
<ClCompile Include="..\..\core\Base\Game.cpp" />
|
||||
<ClCompile Include="..\..\core\Base\GC.cpp" />
|
||||
|
|
@ -222,9 +222,9 @@
|
|||
<ClCompile Include="..\..\core\Base\Time.cpp" />
|
||||
<ClCompile Include="..\..\core\Base\Window.cpp" />
|
||||
<ClCompile Include="..\..\core\Collider\Collider.cpp" />
|
||||
<ClCompile Include="..\..\core\Collider\ColliderCircle.cpp" />
|
||||
<ClCompile Include="..\..\core\Collider\ColliderEllipse.cpp" />
|
||||
<ClCompile Include="..\..\core\Collider\ColliderRect.cpp" />
|
||||
<ClCompile Include="..\..\core\Collider\CircleCollider.cpp" />
|
||||
<ClCompile Include="..\..\core\Collider\EllipseCollider.cpp" />
|
||||
<ClCompile Include="..\..\core\Collider\RectCollider.cpp" />
|
||||
<ClCompile Include="..\..\core\Collider\Collision.cpp" />
|
||||
<ClCompile Include="..\..\core\Common\Color.cpp" />
|
||||
<ClCompile Include="..\..\core\Common\Font.cpp" />
|
||||
|
|
@ -241,13 +241,13 @@
|
|||
<ClCompile Include="..\..\core\Manager\ColliderManager.cpp" />
|
||||
<ClCompile Include="..\..\core\Manager\SceneManager.cpp" />
|
||||
<ClCompile Include="..\..\core\Node\Button.cpp" />
|
||||
<ClCompile Include="..\..\core\Node\ButtonToggle.cpp" />
|
||||
<ClCompile Include="..\..\core\Node\ToggleButton.cpp" />
|
||||
<ClCompile Include="..\..\core\Node\Menu.cpp" />
|
||||
<ClCompile Include="..\..\core\Node\Node.cpp" />
|
||||
<ClCompile Include="..\..\core\Node\Shape\Circle.cpp" />
|
||||
<ClCompile Include="..\..\core\Node\Shape\Ellipse.cpp" />
|
||||
<ClCompile Include="..\..\core\Node\Shape\Rect.cpp" />
|
||||
<ClCompile Include="..\..\core\Node\Shape\RoundRect.cpp" />
|
||||
<ClCompile Include="..\..\core\Node\Shape\CircleShape.cpp" />
|
||||
<ClCompile Include="..\..\core\Node\Shape\EllipseShape.cpp" />
|
||||
<ClCompile Include="..\..\core\Node\Shape\RectShape.cpp" />
|
||||
<ClCompile Include="..\..\core\Node\Shape\RoundRectShape.cpp" />
|
||||
<ClCompile Include="..\..\core\Node\Shape\Shape.cpp" />
|
||||
<ClCompile Include="..\..\core\Node\Sprite.cpp" />
|
||||
<ClCompile Include="..\..\core\Node\Text.cpp" />
|
||||
|
|
@ -259,10 +259,10 @@
|
|||
<ClCompile Include="..\..\core\Tool\Random.cpp" />
|
||||
<ClCompile Include="..\..\core\Tool\Timer.cpp" />
|
||||
<ClCompile Include="..\..\core\Transition\Transition.cpp" />
|
||||
<ClCompile Include="..\..\core\Transition\TransitionBox.cpp" />
|
||||
<ClCompile Include="..\..\core\Transition\TransitionEmerge.cpp" />
|
||||
<ClCompile Include="..\..\core\Transition\TransitionFade.cpp" />
|
||||
<ClCompile Include="..\..\core\Transition\TransitionMove.cpp" />
|
||||
<ClCompile Include="..\..\core\Transition\BoxTransition.cpp" />
|
||||
<ClCompile Include="..\..\core\Transition\EmergeTransition.cpp" />
|
||||
<ClCompile Include="..\..\core\Transition\FadeTransition.cpp" />
|
||||
<ClCompile Include="..\..\core\Transition\MoveTransition.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\..\core\e2daction.h" />
|
||||
|
|
|
|||
|
|
@ -36,9 +36,6 @@
|
|||
<ClCompile Include="..\..\core\Base\Input.cpp">
|
||||
<Filter>Base</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\core\Action\ActionGradual.cpp">
|
||||
<Filter>Action</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\core\Common\Image.cpp">
|
||||
<Filter>Common</Filter>
|
||||
</ClCompile>
|
||||
|
|
@ -57,9 +54,6 @@
|
|||
<ClCompile Include="..\..\core\Node\Button.cpp">
|
||||
<Filter>Node</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\core\Node\ButtonToggle.cpp">
|
||||
<Filter>Node</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\core\Node\Menu.cpp">
|
||||
<Filter>Node</Filter>
|
||||
</ClCompile>
|
||||
|
|
@ -99,15 +93,6 @@
|
|||
<ClCompile Include="..\..\core\Common\Size.cpp">
|
||||
<Filter>Common</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\core\Transition\TransitionEmerge.cpp">
|
||||
<Filter>Transition</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\core\Transition\TransitionFade.cpp">
|
||||
<Filter>Transition</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\core\Transition\TransitionMove.cpp">
|
||||
<Filter>Transition</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\core\Tool\Data.cpp">
|
||||
<Filter>Tool</Filter>
|
||||
</ClCompile>
|
||||
|
|
@ -117,33 +102,12 @@
|
|||
<ClCompile Include="..\..\core\Collider\Collider.cpp">
|
||||
<Filter>Collider</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\core\Collider\ColliderCircle.cpp">
|
||||
<Filter>Collider</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\core\Collider\ColliderEllipse.cpp">
|
||||
<Filter>Collider</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\core\Collider\ColliderRect.cpp">
|
||||
<Filter>Collider</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\core\Manager\ColliderManager.cpp">
|
||||
<Filter>Manager</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\core\Node\Shape\Shape.cpp">
|
||||
<Filter>Node\Shape</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\core\Node\Shape\Circle.cpp">
|
||||
<Filter>Node\Shape</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\core\Node\Shape\Rect.cpp">
|
||||
<Filter>Node\Shape</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\core\Node\Shape\RoundRect.cpp">
|
||||
<Filter>Node\Shape</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\core\Node\Shape\Ellipse.cpp">
|
||||
<Filter>Node\Shape</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\core\Common\Color.cpp">
|
||||
<Filter>Common</Filter>
|
||||
</ClCompile>
|
||||
|
|
@ -225,15 +189,51 @@
|
|||
<ClCompile Include="..\..\core\Custom\TextRenderer.cpp">
|
||||
<Filter>Custom</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\core\Transition\TransitionBox.cpp">
|
||||
<Filter>Transition</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\core\Tool\Listener.cpp">
|
||||
<Filter>Tool</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\core\Common\Font.cpp">
|
||||
<Filter>Common</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\core\Node\Shape\CircleShape.cpp">
|
||||
<Filter>Node\Shape</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\core\Node\Shape\EllipseShape.cpp">
|
||||
<Filter>Node\Shape</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\core\Node\Shape\RectShape.cpp">
|
||||
<Filter>Node\Shape</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\core\Node\Shape\RoundRectShape.cpp">
|
||||
<Filter>Node\Shape</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\core\Transition\BoxTransition.cpp">
|
||||
<Filter>Transition</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\core\Transition\EmergeTransition.cpp">
|
||||
<Filter>Transition</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\core\Transition\FadeTransition.cpp">
|
||||
<Filter>Transition</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\core\Transition\MoveTransition.cpp">
|
||||
<Filter>Transition</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\core\Collider\CircleCollider.cpp">
|
||||
<Filter>Collider</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\core\Collider\EllipseCollider.cpp">
|
||||
<Filter>Collider</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\core\Collider\RectCollider.cpp">
|
||||
<Filter>Collider</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\core\Action\FiniteTimeAction.cpp">
|
||||
<Filter>Action</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\core\Node\ToggleButton.cpp">
|
||||
<Filter>Node</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\..\core\easy2d.h" />
|
||||
|
|
|
|||
Loading…
Reference in New Issue