16-07-2020, 05:37 PM
Code:
ObiSolver solver;
bool isHit;
Obi.ObiSolver.ObiCollisionEventArgs collisionEvent;
List<Oni.Contact> c;
void Awake()
{
solver = GetComponent<Obi.ObiSolver>();
}
void OnEnable()
{
solver.OnCollision += Solver_OnCollision;
}
void OnDisable()
{
solver.OnCollision -= Solver_OnCollision;
}
void Solver_OnCollision(object sender, Obi.ObiSolver.ObiCollisionEventArgs e)
{
GameManager.instance.SetCompletion(e.contacts.Count);
}