本文整理汇总了C#中FNode类的典型用法代码示例。如果您正苦于以下问题:C# FNode类的具体用法?C# FNode怎么用?C# FNode使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
FNode类属于命名空间,在下文中一共展示了FNode类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: TransitionFadeOut
public static void TransitionFadeOut(FNode node,float delay)
{
GoTweenConfig config=new GoTweenConfig().floatProp("alpha",0f).onComplete(FSpeechBubbleManager.Instance.RemoveFromContainer);
config.easeType=GoEaseType.ExpoOut;
config.delay=delay;
Go.to (node,0.5f,config);
}
示例2: FNode
public FNode(Schedule _data, float _key)
{
right = this;
left = this;
data = _data;
key = _key;
}
示例3: CompareY
//sorts array in DESCENDING order because the higher y values should be earlier (aka further back)
private static int CompareY(FNode a, FNode b)
{
float delta = b.y-a.y;
if(delta < 0) return -1;
if(delta > 0) return 1;
return 0;
}
示例4: ShowButtonHighlight
public FNode ShowButtonHighlight(FNode node, Vector2 offset, float width, float height, Color color, bool shouldPlaySound)
{
if (shouldPlaySound) {
FXPlayer.NormalButtonTap ();
}
FSliceSprite highlight = new FSliceSprite ("UI/ButtonHighlight", width, height, 8, 8, 8, 8);
AddChild (highlight);
highlight.SetPosition (this.OtherToLocal (node, offset));
highlight.shader = FShader.Additive;
highlight.scale = 1.0f;
highlight.alpha = 0.35f;
highlight.color = color + new Color (0.5f, 0.5f, 0.5f);//brighten the color
//uniform scaling
float growSize = 8.0f;
float growScaleX = (width + growSize) / width;
float growScaleY = (height + growSize) / height;
Go.to (highlight, 0.15f, new GoTweenConfig ().floatProp ("scaleX", growScaleX).floatProp ("scaleY", growScaleY).floatProp ("alpha", 0.0f).setEaseType (GoEaseType.Linear).removeWhenComplete ());
return highlight;
}
示例5: AddFadingNode
public void AddFadingNode(FNode node, float showDuration)
{
NodeInfo info = new NodeInfo ();
info.node = node;
info.showDuration = showDuration;
infos.Add (info);
}
示例6: Cancel
public static void Cancel(FNode node)
{
BlinkUtil obj=null;
pendings.TryGetValue(node, out obj);
if (obj!=null) {
obj.Stop();
}
}
示例7: Add
public void Add(Schedule _schedule)
{
if(_schedule.nextScheduleItem != null){
FNode _fNode = new FNode(_schedule, _schedule.nextScheduleItem.time);
_schedule.fNode = _fNode;
Add(_fNode);
}
}
示例8: FNodeEnablerForSingleTouch
public FNodeEnablerForSingleTouch(FNode node)
{
singleTouchable = node as FSingleTouchableInterface;
if(singleTouchable == null)
{
throw new FutileException("Trying to enable single touch on a node that doesn't implement FSingleTouchableInterface");
}
}
示例9: Tweener
public Tweener(FNode node)
{
this.node = node;
int n = values.Length;
for (int i = 0; i < n; ++i) {
values[i].style = Style.INACTIVE;
values[i].fn = IntSqrt;
}
}
示例10: ClearChildren
public static void ClearChildren(FNode n)
{
FContainer c = n as FContainer;
if (c != null) {
while (c.GetChildCount() > 0) {
FNode s = c.GetChildAt(0);
ClearChildren(s);
s.RemoveFromContainer();
}
}
}
示例11: FNodeFollower
public FNodeFollower(FNode follower,FNode following)
{
_follower=follower;
_following=following;
Vector2 globalPos=_following.LocalToGlobal(Vector2.zero);
Vector2 localPos=_follower.container.GlobalToLocal(globalPos);
_offset=_follower.GetPosition()-localPos;
((IFNodeWatcher)this).Watch(_following);
}
示例12: TransitionPop
public static void TransitionPop(FNode node)
{
node.scaleX=0;
node.scaleY=0.1f;
GoTweenConfig config0=new GoTweenConfig().floatProp("scaleX",1f);
config0.easeType=GoEaseType.ElasticOut;
Go.to(node,0.2f,config0);
GoTweenConfig config1=new GoTweenConfig().floatProp("scaleY",1f);
config1.easeType=GoEaseType.ElasticOut;
//config1.delay=0.15f;
Go.to(node,0.4f,config1);
}
示例13: go
public void go(FNode node_, float duration_, float amplitude_)
{
Cancel(node_);
oPosition = node_.GetPosition();
curDuration = duration = duration_;
curAmplitude = amplitude = amplitude_;
_pendings.Add(node_, this);
if (node == null)
{
Futile.instance.SignalUpdate += HandleUpdate;
}
node = node_;
}
示例14: MagicOrb
public MagicOrb(FNode owner, World world)
: base(new RXRect(0, 0, 5, 5), world)
{
this.useActualMaxVel = true;
maxVel = 2;
this.bounceiness = 1f;
this.owner = owner;
handleStateCount = true;
collidesWithWater = false;
sprite = new FAnimatedSprite("Magic Orb/magic_orb");
sprite.addAnimation(new FAnimation("idle", new int[] { 1, 2 }, 150, true));
sprite.play("idle");
this.AddChild(sprite);
this.xVel = RXRandom.Float() * .5f - .25f;
this.yVel = RXRandom.Float() * .5f - .25f;
FSoundManager.PlaySound("orbShoot");
}
示例15: ShowParticleBox
public void ShowParticleBox(FNode baseNode, Rect rect)
{
Vector2 offset = this.OtherToLocal (baseNode, Vector2.zero);
float cx = offset.x + rect.x + rect.width / 2;
float cy = offset.y + rect.y + rect.height / 2;
;
// FSprite sprite = new FSprite("Box");
// sprite.SetPosition(cx,cy);
// sprite.width = rect.width;
// sprite.height = rect.height;
//
// AddChild(sprite);
int count = 50;
float halfWidth = rect.width / 2;
float halfHeight = rect.height / 2;
FParticleDefinition pd = new FParticleDefinition ("Extra/Particle_Noise");
pd.startScale = 0.3f;
pd.endScale = 0.7f;
float speed = 30.0f;
for (int c = 0; c<count; c++) {
pd.lifetime = RXRandom.Range (0.9f, 1.3f);
//pd.delay = RXRandom.Range(0.0f,0.1f);
pd.x = cx + RXRandom.Range (-halfWidth, halfWidth);
pd.y = cy + RXRandom.Range (-halfHeight, halfHeight);
pd.speedX = RXRandom.Range (-speed, speed);
pd.speedY = RXRandom.Range (-speed, speed);
pd.startColor = new Color (1, 1, 0.8f, 0.7f);
pd.endColor = new Color (1, 1, 0.8f, 0.0f);
pd.startRotation = RXRandom.Range (0, 360.0f);
pd.endRotation = pd.startRotation + RXRandom.Range (-180.0f, 180.0f);
particleSystem.AddParticle (pd);
}
}