bool isColliding() { for (int i = 0; i < Colliders.GetChildCount(); i++) { FSprite s = (FSprite)Colliders.GetChildAt(i); if (s.GetTextureRectRelativeToContainer().CheckIntersect(this.GetTextureRectRelativeToContainer())) { return(true); } } return(false); }
void HandleUpdate() { if (lapCollider.GetTextureRectRelativeToContainer().CheckIntersect(c.GetTextureRectRelativeToContainer()) && st.s.ElapsedMilliseconds > 3000) { if (st.s.ElapsedTicks < bestTimeTicks) { bestTime.text = "Best:\n" + st.TimeStamp; bestTimeTicks = st.s.ElapsedTicks; bestTime.alpha = 0; Go.to(bestTime, 0.3f, new TweenConfig().floatProp("alpha", 1.0f).setIterations(3)); } st.Restart(); st.Start(); } timer.text = st.TimeStamp; this.gameNodes.SetPosition(-c.GetPosition() / 2); }