Beispiel #1
0
        public void Collide(Food food)      //Check if anyplayer in the matrix is colliding with the food
        {
            if (collidables[food.Matrix.X, food.Matrix.Y] != null)
            {
                Player player = (Player)collidables[food.Matrix.X, food.Matrix.Y];

                food.IncreaseLength(player);
                food.IncreaseScore(player);
                food.AddEffect(Players);

                food.Remove(this);
            }
        }