Created
October 29, 2019 04:45
-
-
Save baobao/a54b2620e4d88c5e51c6093eaa56c954 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Threading; | |
using System.Threading.Tasks; | |
using DG.Tweening; | |
using UnityEngine; | |
// DOTweenAwaiterExtensionサンプルコード(キャンセル処理なし) | |
public class DOTweenAwaiterExtensionSample : MonoBehaviour | |
{ | |
async void Start() | |
{ | |
// 2秒かけてx:3 | |
await transform.DOLocalMoveX(3f, 2f).ToAwaiter(); | |
// 2秒かけてy:3 | |
await transform.DOLocalMoveY(3f, 2f).ToAwaiter(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment