示例#1
0
    void GetItemID(int id)
    {
        audio.PlayOneShot(eat, 1.0f);

        float ax       = 0.0f;
        float ay       = 0.0f;
        float distance = 0.0f;

        distance = (float)0.5f + (Partner_Num * 0.5f);
        if (Way == 0)
        {
            ax = RoundX;
            ay = RoundY - distance;
        }
        if (Way == 1)
        {
            ax = RoundX;
            ay = RoundY + distance;
        }
        if (Way == 2)
        {
            ax = RoundX + distance;
            ay = RoundY;
        }
        if (Way == 3)
        {
            ax = RoundX - distance;
            ay = RoundY;
        }

        if (id < 11 && id >= 4)
        {
            if (Partner_Num < 4)
            {
                par = SummonPartner(id);
                Instantiate(Partner_Set [par], new Vector3(ax, ay, 0.0f), Quaternion.identity);
                EatPartner   = id + 1;
                Partner_Num += 1;
                Drop.PartnerItem(id);
            }
        }
        else if (id == 3)
        {
        }
        else
        {
            Drop.FindItem(id);
        }
    }