Exemple #1
0
    public override void OnEnable() {
        base.OnEnable();

        spriteBar = serializedObject.FindProperty("spriteBar");

        spriteBarColorType = serializedObject.FindProperty("spriteBarColorType");
        spriteBarColor = serializedObject.FindProperty("spriteBarColor");
        spriteBarGradient = serializedObject.FindProperty("spriteBarGradient");
        growDirection = serializedObject.FindProperty("growDirection");
        spriteBarMinSize = serializedObject.FindProperty("spriteBarMinSize");

        radialOffset = serializedObject.FindProperty("radialOffset");
        radialLength = serializedObject.FindProperty("radialLength");

        barImageScale = serializedObject.FindProperty("barImageScale");
        barImageOffset = serializedObject.FindProperty("barImageOffset");

        effectBurn = serializedObject.FindProperty("effectBurn");
        effectBurnSprite = serializedObject.FindProperty("effectBurnSprite");
        effectBurnDirection = serializedObject.FindProperty("effectBurnDirection");

        effectBlink = serializedObject.FindProperty("effectBlink");
        effectBlinkValue = serializedObject.FindProperty("effectBlinkValue");
        effectBlinkRatePerSecond = serializedObject.FindProperty("effectBlinkRatePerSecond");
        effectBlinkColor = serializedObject.FindProperty("effectBlinkColor");
        effectBlinkOperator = serializedObject.FindProperty("effectBlinkOperator");

//        effectTiled = serializedObject.FindProperty("effectTiled");
//        effectTiledSprite = serializedObject.FindProperty("effectTiledSprite");
//        effectTiledTiling = serializedObject.FindProperty("effectTiledTiling");
//        effectTiledStartOffset = serializedObject.FindProperty("effectTiledStartOffset");
//        effectTiledOffsetChangeSpeed = serializedObject.FindProperty("effectTiledOffsetChangeSpeed");
//        effectTiledTint = serializedObject.FindProperty("effectTiledTint");
//
//        effectFollow = serializedObject.FindProperty("effectFollow");
//        effectFollowObject = serializedObject.FindProperty("effectFollowObject");
//        effectFollowOffset = serializedObject.FindProperty("effectFollowOffset");
//        effectFollowScaleX = serializedObject.FindProperty("effectFollowScaleX");
//        effectFollowScaleY = serializedObject.FindProperty("effectFollowScaleY");
//        effectFollowScaleZ = serializedObject.FindProperty("effectFollowScaleZ");
//        effectFollowRotation = serializedObject.FindProperty("effectFollowRotation");
//        effectFollowColor = serializedObject.FindProperty("effectFollowColor");

//        tiledEffectAnimBool.valueChanged.AddListener(Repaint);
        blinkEffectAnimBool.valueChanged.AddListener(Repaint);
        burnEffectAnimBool.valueChanged.AddListener(Repaint);
//        followEffectAnimBool.valueChanged.AddListener(Repaint);

//        tiledEffectAnimBool.value = effectTiled.boolValue;
        blinkEffectAnimBool.value = effectBlink.boolValue;
        burnEffectAnimBool.value = effectBurn.boolValue;
//        followEffectAnimBool.value = effectFollow.boolValue;

        renderer = (SlicedRendererUGUI) target;
    }
    public override void OnEnable() {
        base.OnEnable();

        spriteBar = serializedObject.FindProperty("spriteBar");

        spriteBarColorType = serializedObject.FindProperty("spriteBarColorType");
        spriteBarColor = serializedObject.FindProperty("spriteBarColor");
        spriteBarGradient = serializedObject.FindProperty("spriteBarGradient");
        growDirection = serializedObject.FindProperty("growDirection");
        spriteBarMinSize = serializedObject.FindProperty("spriteBarMinSize");

        radialOffset = serializedObject.FindProperty("radialOffset");
        radialLength = serializedObject.FindProperty("radialLength");

        barImageScale = serializedObject.FindProperty("barImageScale");
        barImageOffset = serializedObject.FindProperty("barImageOffset");

        effectBurn = serializedObject.FindProperty("effectBurn");
        effectBurnSprite = serializedObject.FindProperty("effectBurnSprite");
        effectBurnDirection = serializedObject.FindProperty("effectBurnDirection");

        effectBlink = serializedObject.FindProperty("effectBlink");
        effectBlinkValue = serializedObject.FindProperty("effectBlinkValue");
        effectBlinkRatePerSecond = serializedObject.FindProperty("effectBlinkRatePerSecond");
        effectBlinkColor = serializedObject.FindProperty("effectBlinkColor");
        effectBlinkOperator = serializedObject.FindProperty("effectBlinkOperator");

//        effectTiled = serializedObject.FindProperty("effectTiled");
//        effectTiledSprite = serializedObject.FindProperty("effectTiledSprite");
//        effectTiledTiling = serializedObject.FindProperty("effectTiledTiling");
//        effectTiledStartOffset = serializedObject.FindProperty("effectTiledStartOffset");
//        effectTiledOffsetChangeSpeed = serializedObject.FindProperty("effectTiledOffsetChangeSpeed");
//        effectTiledTint = serializedObject.FindProperty("effectTiledTint");
//
//        effectFollow = serializedObject.FindProperty("effectFollow");
//        effectFollowObject = serializedObject.FindProperty("effectFollowObject");
//        effectFollowOffset = serializedObject.FindProperty("effectFollowOffset");
//        effectFollowScaleX = serializedObject.FindProperty("effectFollowScaleX");
//        effectFollowScaleY = serializedObject.FindProperty("effectFollowScaleY");
//        effectFollowScaleZ = serializedObject.FindProperty("effectFollowScaleZ");
//        effectFollowRotation = serializedObject.FindProperty("effectFollowRotation");
//        effectFollowColor = serializedObject.FindProperty("effectFollowColor");

//        tiledEffectAnimBool.valueChanged.AddListener(Repaint);
        blinkEffectAnimBool.valueChanged.AddListener(Repaint);
        burnEffectAnimBool.valueChanged.AddListener(Repaint);
//        followEffectAnimBool.valueChanged.AddListener(Repaint);

//        tiledEffectAnimBool.value = effectTiled.boolValue;
        blinkEffectAnimBool.value = effectBlink.boolValue;
        burnEffectAnimBool.value = effectBurn.boolValue;
//        followEffectAnimBool.value = effectFollow.boolValue;

        renderer = (SlicedRendererUGUI) target;
    }