本文整理汇总了C#中FNode类的典型用法代码示例。如果您正苦于以下问题:C# FNode类的具体用法?C# FNode怎么用?C# FNode使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
FNode类属于命名空间,在下文中一共展示了FNode类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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);
}
开发者ID:tanis2000,项目名称:Futile,代码行数:7,代码来源:FSpeechBubbleManager.cs
示例2: FNode
public FNode(Schedule _data, float _key)
{
right = this;
left = this;
data = _data;
key = _key;
}
开发者ID:Jonanory,项目名称:Reputations,代码行数:7,代码来源:ScheduleHeap.cs
示例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;
}
开发者ID:maggardJosh,项目名称:NinjaCircuit,代码行数:8,代码来源:FSortYContainer.cs
示例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;
}
开发者ID:tanis2000,项目名称:Futile,代码行数:26,代码来源:EffectManager.cs
示例5: AddFadingNode
public void AddFadingNode(FNode node, float showDuration)
{
NodeInfo info = new NodeInfo ();
info.node = node;
info.showDuration = showDuration;
infos.Add (info);
}
开发者ID:tanis2000,项目名称:Futile,代码行数:7,代码来源:FadeSequenceContainer.cs
示例6: Cancel
public static void Cancel(FNode node)
{
BlinkUtil obj=null;
pendings.TryGetValue(node, out obj);
if (obj!=null) {
obj.Stop();
}
}
开发者ID:tanis2000,项目名称:Futile,代码行数:8,代码来源:FxUtils.cs
示例7: Add
public void Add(Schedule _schedule)
{
if(_schedule.nextScheduleItem != null){
FNode _fNode = new FNode(_schedule, _schedule.nextScheduleItem.time);
_schedule.fNode = _fNode;
Add(_fNode);
}
}
开发者ID:Jonanory,项目名称:Reputations,代码行数:8,代码来源:ScheduleHeap.cs
示例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");
}
}
开发者ID:blakejia,项目名称:Futile,代码行数:8,代码来源:FNodeEnabler.cs
示例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;
}
}
开发者ID:TheJare,项目名称:UnityUtils,代码行数:9,代码来源:Tweener.cs
示例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();
}
}
}
开发者ID:TheJare,项目名称:UnityUtils,代码行数:11,代码来源:Scene.cs
示例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);
}
开发者ID:tanis2000,项目名称:Futile,代码行数:11,代码来源:NodeWatchManager.cs
示例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);
}
开发者ID:tanis2000,项目名称:Futile,代码行数:12,代码来源:FSpeechBubbleManager.cs
示例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_;
}
开发者ID:riktothepast,项目名称:LD30,代码行数:13,代码来源:ShakeUtil.cs
示例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");
}
开发者ID:maggardJosh,项目名称:SpiritGuard,代码行数:17,代码来源:MagicOrb.cs
示例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);
}
}
开发者ID:tanis2000,项目名称:Futile,代码行数:44,代码来源:EffectManager.cs
示例16: addObject
public void addObject(FNode objectToAdd)
{
if (objectToAdd is Knight || objectToAdd is Arrow || objectToAdd is Heart || objectToAdd is MagicOrb || objectToAdd is Ghost || objectToAdd is SoulPickup)
damageObjects.Add((FutilePlatformerBaseObject)objectToAdd);
else
if (objectToAdd is FutilePlatformerBaseObject)
collisionObjects.Add((FutilePlatformerBaseObject)objectToAdd);
if (objectToAdd is Sign)
signs.Add((Sign)objectToAdd);
if (objectToAdd is Villager)
villagers.Add((Villager)objectToAdd);
if (objectToAdd is HitSwitch)
hitSwitches.Add((HitSwitch)objectToAdd);
if (objectToAdd is PushBlock || objectToAdd is Switch)
background.AddChild(objectToAdd);
else
playerLayer.AddChild(objectToAdd);
}
开发者ID:maggardJosh,项目名称:SpiritGuard,代码行数:19,代码来源:World.cs
示例17: go
public void go(FNode node_,float duration_,float period_,float visibleRatio_)
{
Cancel(node_);
oVisible=node_.isVisible;
//Debug.Log("oPosition="+oPosition);
curDuration=duration=duration_;
period=period_;
visibleRatio=visibleRatio_;
if (oVisible) {
nextToggle=period*visibleRatio;
} else {
nextToggle=period*(1f-visibleRatio);
}
pendings.Add(node_,this);
if (node==null) {
Futile.instance.SignalUpdate+=HandleUpdate;
}
node=node_;
}
开发者ID:tanis2000,项目名称:Futile,代码行数:20,代码来源:FxUtils.cs
示例18: AddChild
public void AddChild(FNode node)
{
int nodeIndex = _childNodes.IndexOf(node);
if(nodeIndex == -1) //add it if it's not a child
{
node.HandleAddedToContainer(this);
_childNodes.Add(node);
if(_isOnStage)
{
node.HandleAddedToStage();
}
}
else if(nodeIndex != _childNodes.Count-1) //if node is already a child, put it at the top of the children if it's not already
{
_childNodes.RemoveAt(nodeIndex);
_childNodes.Add(node);
if(_isOnStage) _stage.HandleQuadsChanged();
}
}
开发者ID:GeekAndDad,项目名称:Futile,代码行数:21,代码来源:FContainer.cs
示例19: AddChildAtIndex
public void AddChildAtIndex(FNode node, int newIndex)
{
int nodeIndex = _childNodes.IndexOf(node);
if(newIndex > _childNodes.Count) //if it's past the end, make it at the end
{
newIndex = _childNodes.Count;
}
if(nodeIndex == newIndex) return; //if it's already at the right index, just leave it there
if(nodeIndex == -1) //add it if it's not a child
{
node.HandleAddedToContainer(this);
_childNodes.Insert(newIndex, node);
if(_isOnStage)
{
node.stage = _stage;
node.HandleAddedToStage();
}
}
else //if node is already a child, move it to the desired index
{
_childNodes.RemoveAt(nodeIndex);
if(nodeIndex < newIndex)
{
_childNodes.Insert(newIndex-1, node); //gotta subtract 1 to account for it moving in the order
}
else
{
_childNodes.Insert(newIndex, node);
}
if(_isOnStage) _stage.HandleFacetsChanged();
}
}
开发者ID:rhololkeolke,项目名称:Game-Design-Class,代码行数:39,代码来源:FContainer.cs
示例20: Watch
public static void Watch(this IFNodeWatcher watcher, FNode watched)
{
FNodeWatcherManager.Instance.Subscribe(watcher,watched);
}
开发者ID:tanis2000,项目名称:Futile,代码行数:4,代码来源:NodeWatchManager.cs
注:本文中的FNode类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论