本文整理汇总了C#中FNode.LocalToGlobal方法的典型用法代码示例。如果您正苦于以下问题:C# FNode.LocalToGlobal方法的具体用法?C# FNode.LocalToGlobal怎么用?C# FNode.LocalToGlobal使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FNode
的用法示例。
在下文中一共展示了FNode.LocalToGlobal方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: 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);
}
示例2: LocalToLocal
//returns the position in THIS node of a point in the OTHER node
public Vector2 LocalToLocal(FNode otherNode, Vector2 otherVector)
{
UpdateMatrix();
return GlobalToLocal(otherNode.LocalToGlobal(otherVector));
}
示例3: OtherToLocal
//takes a point in another node and converts it to a point in this node
public Vector2 OtherToLocal(FNode otherNode, Vector2 otherVector)
{
return GlobalToLocal(otherNode.LocalToGlobal(otherVector));
}
示例4: OtherToLocal
public Vector2 OtherToLocal(FNode otherNode, Vector2 otherVector) //takes a point in another node and converts it to a point in this node
{
return GlobalToLocal(otherNode.LocalToGlobal(otherVector));
}