public floatProp ( string propertyName, float endValue, bool isRelative = false ) : GoTweenConfig, | ||
propertyName | string | |
endValue | float | |
isRelative | bool | |
Результат | GoTweenConfig, |
public static void Start(SampleClass[] cs, float[] to) { GoTweenConfig goConfig = new GoTweenConfig().setEaseType(GoEaseType.QuadInOut).setIterations(-1, GoLoopType.PingPong); for (int i = 0; i < cs.Length; ++i) { goConfig.clearProperties(); goConfig.floatProp("floatVal", to[i]); Go.to(cs[i], 1, goConfig); } }
public static GoTween alphaTo(this CanvasGroup self, float duration, float endValue, bool isRelative = false, GoUpdateType goUpdateType = GoUpdateType.Update) { if (duration == 0) { self.alpha = isRelative ? self.alpha + endValue : endValue; return(Go.to(self, 0.0001f, new GoTweenConfig())); } GoTweenConfig gtc = new GoTweenConfig(); gtc.setUpdateType(goUpdateType); gtc.floatProp(() => self.alpha, a => self.alpha = a, endValue, isRelative); return(Go.to(self, duration, gtc)); }
public static GoTween fovTo(this Camera self, float duration, float endValue, bool isRelative = false, GoUpdateType goUpdateType = GoUpdateType.Update) { if (duration == 0) { self.fieldOfView = isRelative ? self.fieldOfView + endValue : endValue; return(Go.to(self, 0.0001f, new GoTweenConfig())); } GoTweenConfig gtc = new GoTweenConfig(); gtc.setUpdateType(goUpdateType); gtc.floatProp(() => self.fieldOfView, a => self.fieldOfView = a, endValue, isRelative); return(Go.to(self, duration, gtc)); }
static public int floatProp(IntPtr l) { try { GoTweenConfig self = (GoTweenConfig)checkSelf(l); System.String a1; checkType(l, 2, out a1); System.Single a2; checkType(l, 3, out a2); System.Boolean a3; checkType(l, 4, out a3); var ret = self.floatProp(a1, a2, a3); pushValue(l, ret); return(1); } catch (Exception e) { return(error(l, e)); } }
public static void Start(SampleClass[] cs, float[] to) { GoTweenConfig goConfig = new GoTweenConfig().setEaseType(GoEaseType.QuadInOut).setIterations(-1, GoLoopType.PingPong); for (int i = 0; i < cs.Length; ++i) { goConfig.clearProperties(); goConfig.floatProp("floatVal", to[i]); Go.to(cs[i], 1, goConfig); } }
public void go(FNode node, float period, float ampX, float ampY) { Cancel (node); chain = new GoTweenChain(new GoTweenCollectionConfig().setIterations(-1,GoLoopType.PingPong)); chain.autoRemoveOnComplete=true; //chain.setIterations( -1, LoopType.PingPong ); GoTweenConfig config0=new GoTweenConfig(); if (ampX!=0) config0.floatProp( "x", node.x+ampX ); if (ampY!=0) config0.floatProp( "y", node.y+ampY ); config0.setEaseType(GoEaseType.SineInOut); chain.append( new GoTween( node, period, config0 ) ); chain.play(); pendings.Add(node,this); }
public void go(FNode node, float period, float scaleX, float scaleY) { Cancel (node); chain = new GoTweenChain(new GoTweenCollectionConfig().setIterations(-1,GoLoopType.PingPong)); chain.autoRemoveOnComplete=true; //chain.setIterations( -1, LoopType.PingPong ); GoTweenConfig config0=new GoTweenConfig(); if (scaleX!=node.scaleX) config0.floatProp( "scaleX", scaleX ); if (scaleY!=node.scaleY) config0.floatProp( "scaleY", scaleY ); config0.setEaseType(GoEaseType.SineInOut); chain.append( new GoTween( node, period, config0 ) ); chain.play(); memoScaleX=node.scaleX; memoScaleY=node.scaleY; pendings.Add(node,this); }
public void go(FSprite node, float period, float toAlpha ) { Cancel (node); chain = new GoTweenChain(new GoTweenCollectionConfig().setIterations(-1,GoLoopType.PingPong)); chain.autoRemoveOnComplete=true; //chain.setIterations( -1, LoopType.PingPong ); GoTweenConfig config0=new GoTweenConfig(); config0.floatProp("alpha",toAlpha); config0.setEaseType(GoEaseType.SineInOut); chain.append( new GoTween( node, period, config0 ) ); chain.play(); memoAlpha=node.alpha; pendings.Add(node,this); }
//this makes it so we don't have to specify false for isRelative every.single.time. public static GoTweenConfig floatProp(this GoTweenConfig config, string propName, float propValue) { return(config.floatProp(propName, propValue, false)); }