Last active
August 29, 2015 14:03
-
-
Save takashicompany/4c5cdacc91ede8323f77 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
public Child child; | |
private IEnumerator StartPlay() | |
{ | |
child.Play(); | |
while (!child.isComplete) | |
{ | |
// childのisComplete変数がtrueになるまで待機 | |
yield return new WaitForEndOfFrame(); | |
} | |
// childのアニメーションが終了したとき | |
// (child.isCompleteがtrueになったとき) | |
// ここより下にかかれた処理が実行される | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment