示例#1
0
    private void Update()
    {
        _secondsAfterLastBubble += Time.deltaTime;

        if (_secondsAfterLastBubble >= (_secondsBetweenBubles + _delay))
        {
            _bubble = _bubbles.GetItem();

            if (_bubble != null)
            {
                _bubble.gameObject.SetActive(true);
                _secondsAfterLastBubble = 0;
            }
        }

        if (_bubble != null)
        {
            _bubble.transform.position = _bubblePoint.position;
        }
    }