private void CreateVan() { var van = new VanEntity(); van.PositionX = gameplayLayer.ContentSize.Width + 100; van.PositionY = gameplayLayer.ContentSize.Height / 2; gameplayLayer.AddChild(van); vanList.Add(van); }
private void VanLeft(VanEntity van) { if (van.PositionX < -100) { RemoveChild(van); vanList.Remove(van); CreateVan(); } }
private bool VanVsBiker(VanEntity van) { return(!van.Thrown && biker.Children[0].BoundingBoxTransformedToWorld.IntersectsRect(van.Children[0].BoundingBoxTransformedToWorld)); }