protected override void applyTrembling(float offset)
    {
        txUIObject mObject  = mComponentOwner as txUIObject;
        float      newAlpha = mStartAlpha + (mTargetAlpha - mStartAlpha) * offset;

        mObject.setAlpha(newAlpha);
    }
    //------------------------------------------------------------------------------------------------------------
    protected override void setValue(float value)
    {
        txUIObject obj = mComponentOwner as txUIObject;

        // 因为NGUI中透明度小于0.001时认为是将窗口隐藏,会重新构建网格顶点,所以此处最低为0.002
        if (WidgetUtility.isNGUI(obj.getObject()))
        {
            clampMin(ref value, 0.002f);
        }
        obj.setAlpha(value, false);
    }
Esempio n. 3
0
    //------------------------------------------------------------------------------------------------------------
    protected override void applyTrembling(float value)
    {
        txUIObject obj      = mComponentOwner as txUIObject;
        float      newAlpha = lerpSimple(mStartAlpha, mTargetAlpha, value);

        // 因为NGUI中透明度小于0.001时认为是将窗口隐藏,会重新构建网格顶点,所以此处最低为0.002
        if (WidgetUtility.isNGUI(obj.getObject()))
        {
            clampMin(ref newAlpha, 0.002f);
        }
        obj.setAlpha(newAlpha, false);
    }
Esempio n. 4
0
    public override void applyAlpha(float alpha, bool done = false)
    {
        txUIObject window = mComponentOwner as txUIObject;

        window.setAlpha(alpha);
    }