feat: Circle & Shape Behaviours IsActive Check
This commit is contained in:
parent
1207d04d50
commit
ef347320fd
|
@ -18,6 +18,9 @@ public class CircleBehaviour : Syntriax.Engine.Physics2D.Collider2DCircleBehavio
|
||||||
|
|
||||||
public void Draw(ShapeBatch shapeBatch)
|
public void Draw(ShapeBatch shapeBatch)
|
||||||
{
|
{
|
||||||
|
if (!IsActive)
|
||||||
|
return;
|
||||||
|
|
||||||
Recalculate();
|
Recalculate();
|
||||||
|
|
||||||
shapeBatch.BorderCircle(CircleWorld.Center.ToDisplayVector2(), CircleWorld.Radius, Color);
|
shapeBatch.BorderCircle(CircleWorld.Center.ToDisplayVector2(), CircleWorld.Radius, Color);
|
||||||
|
|
|
@ -18,6 +18,9 @@ public class ShapeBehaviour : Syntriax.Engine.Physics2D.Collider2DShapeBehaviour
|
||||||
|
|
||||||
public void Draw(ShapeBatch shapeBatch)
|
public void Draw(ShapeBatch shapeBatch)
|
||||||
{
|
{
|
||||||
|
if (!IsActive)
|
||||||
|
return;
|
||||||
|
|
||||||
Recalculate();
|
Recalculate();
|
||||||
|
|
||||||
int count = ShapeWorld.Vertices.Count;
|
int count = ShapeWorld.Vertices.Count;
|
||||||
|
|
Loading…
Reference in New Issue