Example Usage

Collecting Items

To collect items, you can call the OnCollectButtonClick method from your UI button. This method will trigger the collection process defined in the CollectorTest class.

public void OnCollectButtonClick() => _collectorCanvas.Collect(_source, 1);

Customizing Collection Behavior

You can customize the collection behavior by modifying the parameters in the Collect method. For example, you can change the total amount of items to collect, the interval between collections, and the animation duration.

public void Collect(GSUICollectorCaller collector, Transform source, int totalAmount, int interval = 0, float intervalTime = 0, float movementDuration = 1f, bool isFollow = false)
{    
    collector.Collect(source, null, totalAmount, interval, intervalTime, movementDuration, isFollow, () => Debug.Log("Collect Complete"), () => Debug.Log("Collect ALL Complete"));
}

Last updated