Skip to content

Instantly share code, notes, and snippets.

View is8r's full-sized avatar
🙂

Yu Ishihara is8r

🙂
View GitHub Profile
void Start()
{
Coroutine coroutine = StartCoroutine("DelayMethod", 1.0f);
}
private IEnumerator DelayMethod(float waitTime)
{
yield return new WaitForSeconds(waitTime);
Debug.Log("StartCoroutine");
}
void Start()
{
Coroutine coroutine = StartCoroutine(DelayMethod(1.0f, (int id) => {
Debug.Log("StartCoroutine: "+id);
}, 0));
}
private IEnumerator DelayMethod<T>(float waitTime, Action<T> action, T t)
{
yield return new WaitForSeconds(waitTime);
void Start()
{
Coroutine coroutine = StartCoroutine(DelayMethod(1.0f, () => {
Debug.Log("StartCoroutine");
}));
}
private IEnumerator DelayMethod(float waitTime, Action action)
{
yield return new WaitForSeconds(waitTime);
void Start()
{
Invoke("DelayMethod", 1.0f);
}
void DelayMethod()
{
Debug.Log("Invoke");
}
a
display: block
text-decoration: none
color: #777
padding: 0 10px
box-sizing: border-box
min-width: 80px
text-align: center
transition: background-color 0.5s ease-out
$(document).on('ready', function() {
var $target = $('.js-swipenavigation');
var hasTapEvent = ('ontouchstart' in window);
if(hasTapEvent) {
$target.find('a').each(function(index, el) {
var $el = $(el);
$el.addClass('hover-disabled');
$el.on('touchstart', function(event) {
$el.addClass('touch');
.followheader
$h: 50px
@keyframes enter
from
top: -$h
to
top: 0px
@keyframes leave
from
var element = '.js-followheader';
var lastY = 0;
var minY = $(element).height();
$(window).on('scroll', _.throttle(updateScroll, 100));
function updateScroll(e) {
var y = $(window).scrollTop();
if (y < lastY) {
plugin.scrollUp(y);
} else if (y > lastY) {
@is8r
is8r / js
Created March 11, 2016 02:23
Tablesorterプラグインでソートしたくない列をデータ属性(data-sorter="false")で指定する
$(".js-tablesorter").each(function(index, el) {
var hasSorter = [];
$("th", el).each(function(i, e) {
if($(e).data('sorter') != undefined) {
var option = {
id: i,
sorter: $(e).data('sorter')
};
hasSorter.push(option);
}
@is8r
is8r / Find.cs
Last active August 29, 2015 14:27
GameObject obj = GameObject.Find("Environments") as GameObject;