You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ballz/collisionHandler.cs

22 lines
488 B

using System;
using System.Collections.Generic;
using System.Runtime.CompilerServices;
using System.Text;
namespace game
{
static class collisionHandler
{
public static List<ball_t> registry = new List<ball_t>();
public static bool isColliding(ball_t ball)
{
foreach (ball_t registeredBall in registry)
{
if (registeredBall != ball && registeredBall.shape.GetGlobalBounds().Intersects(ball.shape.GetGlobalBounds()))
return true;
}
return false;
}
}
}