Replaced SDLApp code in Game, no longer extends it

This commit is contained in:
Matt Thorson
2020-05-06 21:13:34 -07:00
parent 12c10909c9
commit 0a709b5788
8 changed files with 142 additions and 35 deletions

View File

@ -26,7 +26,7 @@ namespace Strawberry
for (var a in riders)
{
a.MoveExactX(amount);
a.Pushed += Point.UnitX * amount;
a.MovedByGeometry += Point.UnitX * amount;
}
}
else
@ -47,7 +47,7 @@ namespace Strawberry
{
let move = (Top + amount) - a.Bottom;
a.MoveExactY(move);
a.Pushed += Point.UnitY * move;
a.MovedByGeometry += Point.UnitY * move;
}
}
Y += amount;
@ -59,7 +59,7 @@ namespace Strawberry
for (var a in riders)
{
a.MoveExactY(amount);
a.Pushed += Point.UnitY * amount;
a.MovedByGeometry += Point.UnitY * amount;
}
Collidable = true;

View File

@ -45,13 +45,13 @@ namespace Strawberry
else
move = Left - a.Right;
a.MoveExactX(move, scope => a.Squish, this);
a.Pushed += Point.UnitX * move;
a.MovedByGeometry += Point.UnitX * move;
}
else if (riders.Contains(a))
{
//Carry
a.MoveExactX(amount);
a.Pushed += Point.UnitX * amount;
a.MovedByGeometry += Point.UnitX * amount;
}
}
@ -81,13 +81,13 @@ namespace Strawberry
else
move = Top - a.Bottom;
a.MoveExactY(move, scope => a.Squish, this);
a.Pushed += Point.UnitY * move;
a.MovedByGeometry += Point.UnitY * move;
}
else if (riders.Contains(a))
{
//Carry
a.MoveExactY(amount);
a.Pushed += Point.UnitY * amount;
a.MovedByGeometry += Point.UnitY * amount;
}
}