コード例 #1
0
    private void OnTriggerEnter(Collider other)
    {
        if (other.tag == "Head")
        {
            Destroy(gameObject);
            FoodManager.Instance.CreateFood();

            SceneManager.Instance.Score++;
            snake.EatFood(SceneManager.Instance.Score);
        }
    }