static public bool OnCollisionFruits() { if (FruitPointManager.CheckedList(HeadElement().X, HeadElement().Y)) { return(true); } return(false); }
static public void EatingFruit() { FruitPointManager.CheckedList(HeadElement().X, HeadElement().Y, out FruitPoint fruitPoint, out int i); if (fruitPoint != null) { FruitPointManager.DeleteElement(i); FruitPointManager.GenerateFruits(); FruitPointManager.ShowSceneFruit(); AddSnakeElement(); Game.UpdateTime -= 10; Game.numFruitsEat++; } }