Пример #1
0
    // Update is called once per frame
    void Update()
    {
        if (DoThing)
        {
            DoThing = false;
            EquipableItem newItem = Instantiate(Item);
            newItem.ApplyVariantion();

            foreach (var target in FindObjectsOfType <EquipableTarget>())
            {
                if (target.TryEquipItem(newItem))
                {
                    break;
                }
            }
        }
    }