public static void _fruitEat() { if (character.Bounds.IntersectsWith(fruit.Bounds)) { if (character_hp == hp_max) { Inventory._getItem(1, hp_amount); } fruit.Location = new Point(_width + 50, 10); character_hp = character_hp + hp_amount * lvl; double hp_temp = character_hp - hp_max; if (hp_temp > 0) { character_hp = character_hp - hp_temp; } } }