Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
readonly MIN_PER_STAMINA=5
function usage() {
cat <<_EOT_
Usage:
$0 \$1
スタミナが\$1まで回復する時刻
Game_Interpreter.prototype.EventSample1 = function*() {
this.showText('hello event script sample!');
yield this.waitForMessage();
this.showText('ok!');
yield this.waitForMessage();
}
###:
# @plugindesc ツイートするやつ
# @author kyubuns
#
# @help
#
# Plugin Command:
# Tweet (message)
#
# Example:
// Generated by CoffeeScript 1.10.0
/*:
* @plugindesc ツイートするやつ
* @author kyubuns
*
* @help
*
* Plugin Command:
* Tweet (message)
@kyubuns
kyubuns / open_unity.sh
Last active October 26, 2015 07:34
Mac用。適切っぽいバージョンのUnityでプロジェクトを開く。 ex. open_unity ~/code/unity_project/
Target=$(cd $(dirname $1) && pwd)/$(basename $1)
if [ $# == 0 ]; then
echo "Usage: OpenUnity [project path] [unity version]"
exit 0
fi
if [ ! -e "${Target}/ProjectSettings/ProjectVersion.txt" ]; then
echo "${Target}/ProjectSettings/ProjectVersion.txt が見つかりません。"
exit 1
fi
using System;
using System.Collections;
using System.Reflection;
using UnityEditor;
using UnityEngine;
[InitializeOnLoad]
class SpaceSphere
{
static SpaceSphere()
using UnityEngine;
using UnityEditor;
using System.Collections;
[CustomEditor(typeof(CanvasRenderer))]
public class CanvasRendererMover : Editor
{
static int hint = "WidgetHash".GetHashCode();
void OnSceneGUI()
{
@kyubuns
kyubuns / Model.cs
Created October 14, 2014 14:59
Hoge
using UnityEngine;
using System;
using System.Collections;
public class Model
{
public Action<string> OnChange;
protected void Changed(string propertyName)
{
if(OnChange != null) OnChange(propertyName);
import vibe.core.core : sleep;
import vibe.core.log;
import vibe.http.fileserver : serveStaticFiles;
import vibe.http.router : URLRouter;
import vibe.http.server;
import vibe.http.websockets : WebSocket, handleWebSockets;
import core.time;
shared static this()
using UnityEngine;
using System.Collections;
public class TestButton : MonoBehaviour {
[SerializeField] string imageUrl;
UITexture texture;
void Awake()
{
texture = GetComponent<UITexture>();