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
// ==UserScript== | |
// @name Canvasタグで作るお絵かきツール | |
// @namespace su10 | |
// @description せつめいぶんだよ | |
// @include http://* | |
// @version 1.0.0 | |
// ==/UserScript== | |
var body = document.getElementsByTagName("body")[0]; | |
body_style = document.defaultView.getComputedStyle(body, ""); |
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
def hash_for_includes_all_masters(recursive=true, all_associations=[]) | |
all_associations << self.to_s | |
result_arr = [] | |
self.reflect_on_all_associations.each do |model| | |
association_name = model.name | |
class_name = model.class_name | |
next if all_associations.include?(class_name) | |
next unless class_name.include?('Master') | |
next if model.options.has_key?(:polymorphic) |
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 function when( ...args ):Promise { | |
if( args.length == 1 && args[0] is Array ) { | |
args = args[0]; | |
} | |
// 引数が0個ならreject | |
if( args.length == 0 ) { | |
return this.then( | |
function( value:* ):void { | |
Deferred.reject('arguments must not be empty.'); |
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
using UnityEngine; | |
using UnityEngine.EventSystems; | |
using UnityEngine.UI; | |
using UniRx; | |
using UniRx.Triggers; | |
public class Drag : MonoBehaviour | |
{ | |
public RectTransform target; | |
public bool horizontal = true; |
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
using System; | |
using UnityEngine; | |
using UniRx; | |
public class WaitForObservable : MonoBehaviour | |
{ | |
[SerializeField] | |
private Window _window; | |
void Start() |
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
using System; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using UnityEngine.UI; | |
using UniRx; | |
public class DataBindingSample1 : MonoBehaviour | |
{ | |
// NOTE: newするときに初期値を与えることが可能 | |
public ReactiveProperty<int> _intProperty = new ReactiveProperty<int>(1); |
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
namespace UniRx | |
{ | |
public static class PhotonExtensions | |
{ | |
public static IObservable<Tuple<byte, object, int>> AsObservable(this PhotonNetwork.EventCallback eventCallback) | |
{ | |
return Observable.FromEvent<PhotonNetwork.EventCallback, Tuple<byte, object, int>>( | |
h => (x, y, z) => h(Tuple.Create(x, y, z)), | |
h => PhotonNetwork.OnEventCall += h, | |
h => PhotonNetwork.OnEventCall -= h |
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
using Photon; | |
using PhotonRx; | |
using System.Linq; | |
using UniRx; | |
using UniRx.Toolkit; | |
using UniRx.Triggers; | |
using UnityEngine; | |
namespace Jagapippi.Network | |
{ |
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
using System.Collections; | |
using UniRx; | |
using UnityEditor; | |
using UnityEngine; | |
/// <summary> | |
/// Unityエディタ上からGameビューのスクリーンショットを撮るEditor拡張 | |
/// </summary> | |
public class CaptureScreenshotFromEditor : Editor | |
{ |
OlderNewer