particles testing
This commit is contained in:
1 parent
cbb3ffb008
commit
c55b8694e7
14 files changed
+614
-100
No files matched your search
+4
-12
@@ -66,20 +66,14 @@ void TMyApplication::InnerDeinit()
|
||||
{
|
||||
}
|
||||
|
||||
bool ignoreMove = false;
|
||||
|
||||
void TMyApplication::InnerOnMouseDown(TMouseState& mouseState)
|
||||
{
|
||||
ignoreMove = false;
|
||||
|
||||
if (mouseState.LeftButtonPressed)
|
||||
{
|
||||
sparkler.setCoords({ (float)mouseState.X, Renderer->GetScreenHeight() - (float)mouseState.Y, 0 });
|
||||
}
|
||||
else if (mouseState.RightButtonPressed)
|
||||
if (mouseState.RightButtonPressed)
|
||||
{
|
||||
ignoreMove = true;
|
||||
|
||||
if (sparkler.isSpawning())
|
||||
{
|
||||
sparkler.stopSpawn();
|
||||
@@ -91,14 +85,12 @@ void TMyApplication::InnerOnMouseDown(TMouseState& mouseState)
|
||||
}
|
||||
}
|
||||
|
||||
void TMyApplication::InnerOnMove(Vector2f p, Vector2f shift)
|
||||
void TMyApplication::InnerOnMouseMove(TMouseState& mouseState)
|
||||
{
|
||||
if (ignoreMove)
|
||||
if (mouseState.LeftButtonPressed)
|
||||
{
|
||||
return;
|
||||
sparkler.setCoords({ (float)mouseState.X, Renderer->GetScreenHeight() - (float)mouseState.Y, 0 });
|
||||
}
|
||||
|
||||
sparkler.setCoords({ p[0], p[1], 0 });
|
||||
}
|
||||
|
||||
void TMyApplication::InnerDraw()
|
||||
|
||||
+1
-1
@@ -54,7 +54,7 @@ public:
|
||||
|
||||
virtual void InnerOnMouseDown(TMouseState& mouseState);
|
||||
|
||||
virtual void InnerOnMove(Vector2f p, Vector2f shift);
|
||||
virtual void InnerOnMouseMove(TMouseState& mouseState);
|
||||
|
||||
};
|
||||
|
||||
|
||||
Reference in new issue
Block a user