コード例 #1
0
    void OnTriggerEnter2D(Collider2D other)
    {
        if (other.gameObject.CompareTag("sprout") || snakeMove.reindeerTrail.Contains(other.transform))
        {
            snakeMove.Die();
        }

        else if (other.gameObject.CompareTag("pickup"))
        {
            snakeMove.AddTail(other.gameObject.transform);
            snakeMove.IncreaseSpeed();
            raindeerSpawner.SpawnRandomReindeer();
        }
    }