コード例 #1
0
ファイル: Collider.cs プロジェクト: elementalshotz/Snake
        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);
            }
        }