本文整理汇总了C#中Sprite.setWorldPosition方法的典型用法代码示例。如果您正苦于以下问题:C# Sprite.setWorldPosition方法的具体用法?C# Sprite.setWorldPosition怎么用?C# Sprite.setWorldPosition使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Sprite
的用法示例。
在下文中一共展示了Sprite.setWorldPosition方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: BigMouthAnimator
public BigMouthAnimator(float startTime, GameObjectFactory<string> resourceFactory)
: base(0.25f, 0, startTime)
{
var mouthLeftGameObject = resourceFactory.Create("SceneFive/MouthLeft");
mouthLeft = mouthLeftGameObject.GetComponent<Sprite>();
mouthLeft.setWorldPosition(-29.5f, -56f, -5f);
var mouthRightGameObject = resourceFactory.Create("SceneFive/MouthRight");
mouthRight = mouthRightGameObject.GetComponent<Sprite>();
mouthRight.setWorldPosition(10f, -56f, -5f);
}
示例2: SpeechBubble
public SpeechBubble(Camera camera, float leftToRightSwitchOverPosition)
{
this.camera = camera;
this.leftToRightSwitchOverPosition = leftToRightSwitchOverPosition;
speechBubble = Sprite.create("SceneFour/bubble");
speechBubbleLeft = Sprite.create("SceneFour/bubble_1");
speechBubbleRight = Sprite.create("SceneFour/bubble_2");
speechBubbleRight.visible(false);
speechBubble.setWorldPosition(-80f, 60f, -1f);
speechBubbleLeft.setWorldPosition(-55f, 50f, -5f);
speechBubbleRight.setWorldPosition(-55f, 50f, -5f);
speechBubbleRight.transform.Rotate(Vector3.forward * 5);
input = new UnityInput();
dragger = new Dragger(input, speechBubble);
}
示例3: addMouth
private void addMouth()
{
leftMouth = resourceFactory.Create(this, "LeftMouth").GetComponent<Sprite>();
rightMouth = resourceFactory.Create(this, "RightMouth").GetComponent<Sprite>();
leftMouth.visible(false);
rightMouth.visible(false);
leftMouth.setWorldPosition(-19f, 25f, -4f);
rightMouth.setWorldPosition(22.5f, 24f, -4f);
}