Created
June 25, 2015 02:56
-
-
Save anzfactory/4a206927d31d822a7313 to your computer and use it in GitHub Desktop.
itween callback sample
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
public class Hoge : MonoBehaviour { | |
void MoveA () | |
{ | |
Action callback = () => { | |
// 何か処理 | |
}; | |
iTween.MoveBy (gameObject, iTween.Hash("y",1f,"time",0.5f, "oncomplete", "Fin", "oncompleteparams", callback)); | |
} | |
void MoveB () | |
{ | |
Action callback = () => { | |
// 何か処理 | |
}; | |
iTween.MoveBy (gameObject, iTween.Hash("y",1f,"time",0.5f, "oncomplete", "Fin", "oncompleteparams", callback)); | |
} | |
void Fin(Action callback) | |
{ | |
callback(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment