Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am hyakugei on github.
  • I am hyakugei (https://keybase.io/hyakugei) on keybase.
  • I have a public key whose fingerprint is 0092 2125 C88F E1E7 C2A3 8EC4 BC69 8501 84B2 D52D

To claim this, I am signing this object:

@hyakugei
hyakugei / TaskHelper.cs
Created May 13, 2014 15:38
TaskHelper rewritten for Unity/Parse use.
// Copyright (c) 2012 Rizal Almashoor
// Licensed under the MIT license.
// http://gist.github.com/2818038#file_license.txt
//
// Additions as suggested by Mike Cann - http://www.mikecann.co.uk/personal-project/fixing-unitys-internal-compiler-error/
//
//
using System.Linq;
/**
* State names are described as a enum or string constants if language doesn't support them (as3 for example).
*/
private enum State {
A, B, C
}
/**
* Current state is always private. If previous state is needed add
* private State prevState;
@hyakugei
hyakugei / rot_classic.js
Created March 14, 2013 07:36
Following the rules (more or less) for the original Rogue map-generation algorithm, i made this addition to the rot.js lib. Please note, this is a early, ugly, bit of code. But it works. And makes cool dungeons!
ROT.Map.Classic = function(width, height, options) {
ROT.Map.call(this, width, height);
var getRoomSizes = function(size, cells)
{
var max = Math.floor((size/cells) * 0.8);
var min = Math.floor((size/cells) * 0.25);
if(min < 2) min = 2;
if(max < 2) min = 2;
return [min, max];
@hyakugei
hyakugei / exTextLayout.cs
Created September 17, 2012 13:31
Hacked "TextField" flow for ex2d's spriteFont
using UnityEngine;
using System.Text;
using System.Collections;
using System.Collections.Generic;
public class exTextLayout : MonoBehaviour {
public exSpriteFont textField;
// before
mainWindow.menu("File", function(err, file) {
if(err) throw err;
file.openMenu(function(err, menu) {
if(err) throw err;
menu.item("Open", function(err, item) {
if(err) throw err;
item.click(function(err) {
if(err) throw err;
mainWindow.getChild(type('Window'), function(err, dialog) {
package org.robotlegs.utilities.remote
{
import com.adobe.serializers.json.JSONDecoder;
import mx.collections.ArrayCollection;
public class JsonRemoteService extends RemoteServiceBase
{
public function JsonRemoteService(rootURL:String = "")
{
package org.robotlegs.extensions.mvcs
{
import flash.utils.Dictionary;
import org.robotlegs.base.EventMap;
import org.robotlegs.core.IEventMap;
import org.robotlegs.mvcs.Command;
public class AsyncCommand extends Command
{