Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
DoTweenの拡張クラス
using System.Collections;
using System.Collections.Generic;
using DG.Tweening;
using UnityEngine;
public static class DoTweenExtension {
public static Tweener DoLocalAdditiveMoveX(this Transform transform, float diff,float duration)
{
var current = transform.localPosition;
return transform.DOLocalMoveX(current.x + diff, duration);
}
public static Tweener DoLocalAdditiveMoveY(this Transform transform, float diff,float duration)
{
var current = transform.localPosition;
return transform.DOLocalMoveY(current.y + diff, duration);
}
public static Tweener DoLocalAdditiveMoveZ(this Transform transform, float diff,float duration)
{
var current = transform.localPosition;
return transform.DOLocalMoveZ(current.z + diff, duration);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment