Skip to content

Instantly share code, notes, and snippets.

View taross-f's full-sized avatar

Taro Furuya taross-f

View GitHub Profile
@taross-f
taross-f / UnityCSharpTemplate.cs
Last active September 14, 2015 00:42
Unity-C# Script Template
using UnityEngine;
using System;
using System.Collections.Generic;
using UniRx;
using UniRx.Triggers;
using UniLinq;
public class #SCRIPTNAME# : MonoBehaviour {
void Start() {
@taross-f
taross-f / GenerateSerialCode.cs
Created July 2, 2015 01:51
This tool generates some random serialcodes into a txt file. You can choose any characters that they include.
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
namespace GenerateSerialCode
{
/// <summary>
/// かぶりなし 文字種類指定 個数指定 でシリアルコードを生成する
@taross-f
taross-f / setting.json
Created September 3, 2015 08:15
VSCode Setting
{
"editor.insertSpaces":true,
"editor.tabSize": "4",
"editor.wrappingColumn": 200,
"editor.renderWhitespace": true
}
@taross-f
taross-f / SingletonMonoBehaviour.cs
Last active October 8, 2015 01:43 — forked from tsubaki/SingletonMonoBehaviour.cs
旧シングルトンの改良版。初回起動時にインスタンスが登録されていなければ自身を登録する
using UnityEngine;
using System.Collections;
public class SingletonMonoBehaviour<T> : MonoBehaviour where T : SingletonMonoBehaviour<T>
{
protected static T instance;
public static T Instance {
get {
if (instance == null) {
instance = (T)FindObjectOfType (typeof(T));
@taross-f
taross-f / packages.config
Last active October 20, 2015 02:46
chocolatey packages config
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="git" />
<package id="sourcetree" />
<package id="tortoisesvn" />
<package id="redis-desktop-manager" />
<package id="nodejs" />
<package id="npm" />
<package id="visualstudiocode" />
<package id="winmerge-jp" /><!-- runtime error. but install success... -->
@taross-f
taross-f / file0.txt
Last active October 18, 2015 09:23
VisualStudioCodeでUnityプロジェクトをデバッグする ref: http://qiita.com/t_furuya/items/c8d08c3f3dc2e7d5324b
{
"version":"0.1.0",
"configurations":[
{
"name":"Unity",// DropDownに表示される名前
"type":"mono",
"address":"localhost",
"port":56131 // AlwaysWriteLaunchFileをOnにしてたらここは適当で良さそう
}
]
using UnityEngine;
using System.Collections;
using UnityEngine.EventSystems;
using System;
public static class FindInterface {
public static void DoParentEventSystemHandler<T>(this Transform self, Action<T> action) where T:IEventSystemHandler
{
Transform parent = self.transform.parent;
while(parent != null) {
start();
loop(function() {
for (var i = 0; i < 60000; i++) {
work();
if (i % 1000 == 0)
purchase(i / 1000 % 5)
}
}, 1);
@taross-f
taross-f / gitlab flow rule.md
Created March 8, 2016 12:21
gitlab flow rule