colorProp() public method

generic color tween
public colorProp ( string propertyName, Color endValue, bool isRelative = false ) : GoTweenConfig,
propertyName string
endValue Color
isRelative bool
return GoTweenConfig,
Example #1
0
    private void Init()
    {
        Ship.transform.localScale = Vector3.zero;

        //init bg
        bg = GameObject.Find("Bg");
        bg.GetComponent <Image> ().color = Color.black;

        //init btns transforms
        btnsTrans.Add(GameObject.Find("PlayBtn"));
        btnsTrans.Add(GameObject.Find("HelpBtn"));
        btnsTrans.Add(GameObject.Find("RankBtn"));

        bgColorConfig.setIterations(1);
        bgColorConfig.colorProp("color", Color.gray);
        bgColorConfig.easeType = GoEaseType.ExpoOut;

        GameObject.Find("TopBar").GetComponentInChildren <Button> ().onClick.AddListener(delegate {
            gotoMainPanelPage();
        });
    }
Example #2
0
 static public int colorProp(IntPtr l)
 {
     try {
         GoTweenConfig self = (GoTweenConfig)checkSelf(l);
         System.String a1;
         checkType(l, 2, out a1);
         UnityEngine.Color a2;
         checkType(l, 3, out a2);
         System.Boolean a3;
         checkType(l, 4, out a3);
         var ret = self.colorProp(a1, a2, a3);
         pushValue(l, ret);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Example #3
0
    public void go(FSprite node, float period, Color toColor  )
    {
        Cancel (node);

        //Debug.Log ("OscilColorUtil node="+node);
        chain = new GoTweenChain(new GoTweenCollectionConfig().setIterations(-1,GoLoopType.PingPong));
        chain.autoRemoveOnComplete=true;
        //chain.setIterations( -1, LoopType.PingPong );
        GoTweenConfig config0=new GoTweenConfig();
        config0.colorProp("color",toColor);
        config0.setEaseType(GoEaseType.SineInOut);

        chain.append( new GoTween( node, period, config0 ) );
        chain.play();

        memoColor=node.color;
        pendings.Add(node,this);
    }