void OnCollisionEnter(Collision collision) { foreach (ContactPoint contact in collision.contacts) { if (contact.otherCollider.name == "Landscape") { onGround = true; } if (contact.otherCollider.name == "_Rock" && !isGameOver) { isGameOver = true; IRageSpline rageSpline = GetComponent(typeof(RageSpline)) as IRageSpline; rageSpline.SetFillColor1(new Color(1f, 0.2f, 0.2f)); rageSpline.RefreshMesh(); scoreCounter.SendMessage("GameOver"); Invoke("GameOverFinal", 2f); } } onGround = true; }
void _tweenFillColor(Vector3 x) { spline.SetFillColor1(new Color(x.x, x.y, x.z)); }