Exemple #1
0
void rb::Cannon::OnCollision(Collider& other)
{
	assert(other.GetGameObject());
	if (other.GetGameObject()->tag == "Asteroid")
	{
		//Debug::Log("Collided with " + otherGO->tag + "dist " + ToString(glm::distance(pos, other.GetGameObject()->GetTransform()->position)));
		other.GetGameObject()->GetRenderer()->SetColour(Colour::red);
		Destroy(other.GetGameObject());
	}
}