Grid out of bounds checks snap into bounds. RemoveSelf->Destroy

This commit is contained in:
Maddy Thorson
2021-02-07 18:01:14 -08:00
parent 33dad92fcf
commit ccf4db2f9f
5 changed files with 13 additions and 125 deletions

View File

@ -33,7 +33,7 @@ namespace Strawberry
value = 0;
OnComplete?.Invoke();
if (RemoveOnComplete)
RemoveSelf();
Entity.Remove(this);
}
}
}

View File

@ -6,7 +6,7 @@ namespace Strawberry
public Ease.Easer Easer ~ delete _;
public delegate void(float) OnUpdate ~ delete _;
public delegate void() OnComplete ~ delete _;
public bool RemoveOnComplete;
public bool DestroyOnComplete;
public bool Playing { get; private set; }
public float T { get; private set; }
@ -17,7 +17,7 @@ namespace Strawberry
Easer = easer;
OnUpdate = onUpdate;
OnComplete = onComplete;
RemoveOnComplete = removeOnComplete;
DestroyOnComplete = removeOnComplete;
}
[Inline]
@ -45,8 +45,8 @@ namespace Strawberry
{
OnComplete?.Invoke();
Playing = false;
if (RemoveOnComplete)
RemoveSelf();
if (DestroyOnComplete)
Destroy();
}
}
}