Beispiel #1
0
    public void Add(PickupContainer container)
    {
        if (Filled)
        {
            throw new Exception();
        }

        this.pickup   = container.pickup;
        image.enabled = true;
        image.sprite  = container.pickup.sprite;
    }
Beispiel #2
0
    private bool add(PickupContainer container)
    {
        for (int i = 0; i < slots.Length; i++)
        {
            if (!slots[i].Filled)
            {
                AudioManager.Play("Pickup");
                slots[i].Add(container);
                return(true);
            }
        }

        return(false);
    }
Beispiel #3
0
 public static bool Add(PickupContainer container)
 {
     return(instance.add(container));
 }