本文整理汇总了C#中UnityEngine.RectTransform.DOLocalMove方法的典型用法代码示例。如果您正苦于以下问题:C# RectTransform.DOLocalMove方法的具体用法?C# RectTransform.DOLocalMove怎么用?C# RectTransform.DOLocalMove使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UnityEngine.RectTransform
的用法示例。
在下文中一共展示了RectTransform.DOLocalMove方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Initialize
protected override void Initialize()
{
rectTransform = GetComponent<RectTransform>();
tweener = rectTransform
.DOLocalMove(to, duration);
}
示例2: TranslateCard
private static void TranslateCard (int index, RectTransform cardRectTransform)
{
//by trial and error best fit for Deck element, this makes the DealCards(GameObject source = null) a bit pointless since it will work only for that element, whatev
cardRectTransform.Translate (-110, 175, 0);
var rotations = new float[] { 4, 1f, -1f, -4 };
var yDeltas = new int[] { -40, 0, 0, -40 };
var xDeltas = new int[] { 20, 5, -5, -20 };
var cardRotation = Vector3.forward * (rotations [index] * 5);
cardRectTransform
.DOLocalMove (new Vector3 (75 + xDeltas [index] + index * 150, 190 + yDeltas [index], 0), cardDealSpeed)
.JoinIntoSequence (cardRectTransform.DORotate (cardRotation, cardDealSpeed));
}