Created
June 29, 2017 17:08
-
-
Save sukedon/9fd932bbb72d2a8392f803619ab43c90 to your computer and use it in GitHub Desktop.
DoTweenの拡張クラス
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.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