Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Class1
- {
- class Dele {
- delegate void MyDelegate();
- private MyDelegate dele;
- private int count = 0;
- public void Animate() {
- dele = new MyDelegate(DoIe);
- }
- IEnumerator Ie() {
- Debug.Log(count);
- count += 1;
- yield return new WaitForSeconds(5f);
- }
- private void DoIe() {
- StartCouroutine(Ie());
- for (int i=0; i<10; i++) {
- dele += DoIe;
- }
- dele();
- }
- }
- //call new Dele().Animate() here
- }
Add Comment
Please, Sign In to add comment