private void tweenCountText()
        {
            originalCountTextPosition     = CountPanel.transform.position;
            CountPanel.transform.position = CountPanel.transform.position + new Vector3(0f, -2f, 0f);
            Tweenable countPanel = CountPanel;

            countPanel.TweenCompleteAction = (Action <GameObject>)Delegate.Combine(countPanel.TweenCompleteAction, new Action <GameObject>(onTweenComplete));
            CountPanel.TweenPosition(originalCountTextPosition, 1f);
            CountPanel.transform.localScale = Vector3.zero;
            CountPanel.TweenScale(Vector3.one, 1f);
            CoroutineRunner.Start(restoreCountTextAlpha(), this, "");
        }
예제 #2
0
    private IEnumerator tweenObjectsToHUD()
    {
        YieldInstruction waitforInterval = new WaitForSeconds(tweenInterval);

        while (true)
        {
            GameObject particle = getParticleFromPool();
            particle.transform.position = originPosition;
            Tweenable tweenable = particle.GetComponent <Tweenable>();
            tweenable.TweenCompleteAction = (Action <GameObject>) Delegate.Combine(tweenable.TweenCompleteAction, (Action <GameObject>) delegate(GameObject go)
            {
                addParticleToPool(go);
            });
            tweenable.TweenPosition(destinationPosition, tweenTime);
            yield return(waitforInterval);
        }
    }