Skip to content

Instantly share code, notes, and snippets.

View asus4's full-sized avatar
:octocat:
Working from home

Koki Ibukuro asus4

:octocat:
Working from home
View GitHub Profile
@asus4
asus4 / UnityKonashiPlugin.mm
Last active August 29, 2015 14:13
Unity wrapper for Konashi
//
// UnityKonashiPlugin.m
//
// Created by Koki Ibukuro on 1/8/15.
//
//
#import <Foundation/Foundation.h>
#import "Konashi.h"
@asus4
asus4 / 0_reuse_code.js
Last active August 29, 2015 14:15
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@asus4
asus4 / ShellCommand.swift
Last active September 20, 2015 06:56
Execute shell command from swift
//
// ShellCommand.swift
//
// Created by Koki Ibukuro on 9/19/15.
// Copyright © 2015 asus4. All rights reserved.
//
import Foundation
public struct ShellCommand {
@asus4
asus4 / TouchToMouseConverter.cs
Last active September 29, 2015 21:57
TouchEvent to MouseEvent for Unity
/**
Converts Mobile Touch to the default Mouse Click
## invoked these method in Mobile too
OnMouseDown
OnMouseDrag
OnMouseUp
## only called in touch screen
@asus4
asus4 / getUrlVars.js
Created February 12, 2012 14:38
getUrlVars
function getUrlVars() {
var vars = [],
hash,
i,
hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
for(i = 0; i < hashes.length; i++) {
hash = hashes[i].split('=');
vars.push(hash[0]);
vars[hash[0]] = hash[1];
@asus4
asus4 / GestureListener.cs
Created February 28, 2012 05:31
delegate Tap, Drag, Swipe
using UnityEngine;
using System.Collections;
// 3 types delegates
public delegate void TapDelegate();
public delegate void DragDelegate(Vector3 vec);
public delegate void SwipeDelegate(SwipeDirection direction);
public enum SwipeDirection {
@asus4
asus4 / GameObjectUtil.cs
Created February 29, 2012 13:43
make a plane from 2^x size image, ***need EzGUI***
using UnityEngine;
using System.Collections;
// /////////////////////////////////////////////////////////////////////////////////////////////////////////
//
// ゲームオブジェクトのユーティリティ
//
// /////////////////////////////////////////////////////////////////////////////////////////////////////////
public class GameObjectUtil {
@asus4
asus4 / UIPopup.cs
Created March 1, 2012 04:52
Popup script for Unity3D (using EzGUI, iTween)
using UnityEngine;
using System.Collections;
// delegates
public enum UIPopupState {
SUBMIT,
CANCEL
}
public delegate void ClickDelegate(UIPopupState state);
@asus4
asus4 / uniq_char.py
Created March 12, 2012 08:52
Export unique char from unicode text file. for Unity
#!/usr/bin/python
# coding: utf-8
import codecs,sys
"""
convert text to uniq characters
for Unity
ex:
@asus4
asus4 / UISystemFont.cs
Created March 28, 2012 02:37
SystemFontRenderer utility for nGUI
using UnityEngine;
using System.Collections;
//[ExecuteInEditMode]
[RequireComponent(typeof(SystemFontRenderer))]
[AddComponentMenu("NGUI/Interaction/Ex/System Font")]
public class UISystemFont : MonoBehaviour {
SystemFontRenderer fontRenderer;