This file contains hidden or 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
'.source.js': | |
'console.log': | |
'prefix': 'co' | |
'body': 'console.log($1);' | |
'prev': | |
'prefix': 'pr' | |
'body': 'preventDefault();' | |
'on': | |
'prefix': 'on' | |
'body': 'on(\'change\', function(e) {$1})' |
This file contains hidden or 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
Array.prototype.arrange = function(n){ | |
return Array.from(new Array(n)).map((v,i) => i) | |
} |
This file contains hidden or 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
//Delayを使用する方法(引数が無い時) | |
Observable.Return(Unit.Default) | |
.Delay(TimeSpan.FromSeconds(1.0f)) | |
.Subscribe(_ => { | |
print("UniRx Observable.Delay"); | |
}); | |
//Delayを使用する方法(引数を渡したい時) | |
Observable.Return(0) | |
.Delay(TimeSpan.FromSeconds(1.0f)) |
This file contains hidden or 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
//Timerを使用する方法 | |
Observable.Timer(TimeSpan.FromSeconds(1.0f)) | |
.Subscribe(_ => { | |
print("UniRx Observable.Timer"); | |
}); | |
//TimerFrameを使用する方法 | |
Observable.TimerFrame(1) | |
.Subscribe(_ => { | |
print("UniRx Observable.TimerFrame"); |
This file contains hidden or 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
DOVirtual.DelayedCall (1.0f, () => { | |
print ("DOVirtual.DelayedCall"); | |
}); |
This file contains hidden or 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
Coroutine coroutine = this.Delay(1.0f, (int id) => { | |
print("Delay: "+id); | |
}, 0); |
This file contains hidden or 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 UnityEngine; | |
using System.Collections; | |
using System; | |
using System.Collections.Generic; | |
public static class MonoBehaviorExtentsion | |
{ | |
public static IEnumerator DelayMethod<T>(this MonoBehaviour mono, float waitTime, Action<T> action, T t) | |
{ |
This file contains hidden or 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
Coroutine coroutine = DelayUtil.Delay (1.0f, (int id) => { | |
Debug.Log ("DelayUtil.Delay: "+id); | |
}, 10); |
This file contains hidden or 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
void Start() | |
{ | |
Coroutine coroutine = DelayUtil.Delay (1.0f, () => { | |
Debug.Log ("DelayUtil.Delay"); | |
}); | |
} |
This file contains hidden or 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
/* | |
* DelayWrapperClass | |
* | |
* Example: | |
Coroutine coroutine = DelayUtil.Delay (1.0f, () => { | |
Debug.Log ("DelayedCall"); | |
}); | |
DelayUtil.Stop(coroutine); |