Ejemplo n.º 1
0
    public CustomAsyncOperation Out()
    {
//		finished = false;
        CustomAsyncOperation operation = outAnimator.StartAnimation(max, min);

        state = InOutState.OutAnim;
        operation.OnComplete += (op) => state = InOutState.Minimum;
        return(operation);
    }
Ejemplo n.º 2
0
//	private void finishIn () {
//		state = InOutState.Maximum;
//		finished = true;
//		if (onInFinish != null) onInFinish ();
//	}

//	private void finishOut () {
//		state = InOutState.Minimum;
//		finished = true;
//		if (onOutFinish != null) onOutFinish ();
//	}

    public CustomAsyncOperation In()
    {
//		finished = false;
        CustomAsyncOperation operation = inAnimator.StartAnimation(min, max);

        state = InOutState.InAnim;
        operation.OnComplete += (op) => state = InOutState.Maximum;
        return(operation);
    }
Ejemplo n.º 3
0
    public AnimationCurve valueOverTime; // 1/Second

    public CustomAsyncOperation StartAnimation(float start, float target)
    {
        this.start            = start;
        this.value            = start;
        this.target           = target;
        this.time             = 0;
        this.finished         = false;
        this.currentOperation = new CustomAsyncOperation(() => finished, () => time / duration, (operation) => {});
        return(currentOperation);
    }