Ejemplo n.º 1
0
    void CatchTrash(TrashType type)
    {
        if (trashes.Count == 0)
        {
            return;
        }

        Trash t = trashes[0];

        if (t.type == type)
        {
            SoundManager.self.PlaySingle(clip);

            TrashCan trashCan = trashCans[(int)type];

            trashCan.StartCoroutine(trashCan.ScaleEffect(trashCan.transform));

            trashes.Remove(t);
            Destroy(t.gameObject);
        }
    }