Ejemplo n.º 1
0
 void FirstOpenShow(int id, string name)
 {
     TweenAlpha_2.Begin(FrontBG.gameObject, 0.3f, 0);
     if (meshes.Count > 0)
     {
         Obj.enabled = true;
         Obj.sprite  = meshes [id];
     }
 }
Ejemplo n.º 2
0
    void FirstOpenClose(int id, string name)
    {
        TweenAlpha_2.Begin(FrontBG.gameObject, 0.3f, 1);

        if (meshes.Count > 0)
        {
            Obj.enabled = false;
            Obj.sprite  = null;
        }
    }
Ejemplo n.º 3
0
    void AddOnAlpha()
    {
        transform.localPosition = StartPos.localPosition;

        _alpha       = TweenAlpha_2.Begin(gameObject, 0.6f, 1);
        _alpha.delay = delay;
        _alpha.AddOnFinished(Recall);
        _alpha.AddOnFinished(ChangueSpriteToTouch);
        _alpha.AddOnFinished(StartPositionTween);
    }
Ejemplo n.º 4
0
    /// <summary>
    /// Start the tweening operation.
    /// </summary>

    static public TweenAlpha_2 Begin(GameObject go, float duration, float alpha)
    {
        TweenAlpha_2 comp = UITweener.Begin <TweenAlpha_2> (go, duration);

        comp.from = comp.value;
        comp.to   = alpha;

        if (duration <= 0f)
        {
            comp.Sample(1f, true);
            comp.enabled = false;
        }
        return(comp);
    }
Ejemplo n.º 5
0
    public override void OnInspectorGUI()
    {
        GUILayout.Space(6f);
        NGUIEditorTools.SetLabelWidth(120f);

        TweenAlpha_2 tw = target as TweenAlpha_2;

        GUI.changed = false;

        float from = EditorGUILayout.Slider("From", tw.from, 0f, 1f);
        float to   = EditorGUILayout.Slider("To", tw.to, 0f, 1f);

        if (GUI.changed)
        {
            NGUIEditorTools.RegisterUndo("Tween Change", tw);
            tw.from = from;
            tw.to   = to;
            NGUITools.SetDirty(tw);
        }

        DrawCommonProperties();
    }
Ejemplo n.º 6
0
 public void EndAlpha()
 {
     _alpha       = TweenAlpha_2.Begin(gameObject, 0.6f, 0);
     _alpha.delay = 0;
     _alpha.onFinished.Clear();
 }