Initial commit

This commit is contained in:
Matt Thorson
2020-05-04 20:50:38 -07:00
commit 4a44eb0f26
15 changed files with 1457 additions and 0 deletions

42
src/Physics/Solid.bf Normal file
View File

@ -0,0 +1,42 @@
using System.Collections;
namespace Strawberry
{
public class Solid : Platform
{
public this(int x, int y, Rect hitbox)
: base(x, y)
{
Hitbox = hitbox;
}
public override void Draw()
{
DrawHitbox(.(255, 255, 255, 255));
}
public override List<Actor> GetRiders(List<Actor> into)
{
for (var a in Scene.All<Actor>(scope List<Actor>))
if (a.IsRiding(this))
into.Add(a);
return into;
}
public override void MoveExactX(int amount, System.Action onCollide = null)
{
if (amount != 0)
{
}
}
public override void MoveExactY(int amount, System.Action onCollide = null)
{
if (amount != 0)
{
}
}
}
}