Skip to content

Instantly share code, notes, and snippets.

@nanmo
nanmo / SavWav.cs
Created September 1, 2012 00:54 — forked from darktable/SavWav.cs
Unity3D: script to save an AudioClip as a .wav file.
// Copyright (c) 2012 Calvin Rien
// http://the.darktable.com
//
// This software is provided 'as-is', without any express or implied warranty. In
// no event will the authors be held liable for any damages arising from the use
// of this software.
//
// Permission is granted to anyone to use this software for any purpose,
// including commercial applications, and to alter it and redistribute it freely,
// subject to the following restrictions:
import random
import argparse
parser = argparse.ArgumentParser(description='Generate random characters from specified length/lines.')
parser.add_argument('length', help='length of line', type=int )
parser.add_argument('number', help='number of lines', type=int )
args = parser.parse_args()
passlen = args.length
count = args.number
@nanmo
nanmo / gist:5393249
Created April 16, 2013 04:01
http://charles.lescampeurs.org/2011/02/10/tint-color-uibutton-and-uibarbuttonitem をとりあえずARC対応させた(autorelease抜いた)だけ
#define UIColorFromRGB(rgbValue) [UIColor \
colorWithRed:((float)((rgbValue & 0xFF0000) >> 16))/255.0 \
green:((float)((rgbValue & 0xFF00) >> 8))/255.0 \
blue:((float)(rgbValue & 0xFF))/255.0 alpha:1.0]
- (void)viewDidLoad
{
/* Create a tinted "UIButton" */
UISegmentedControl *button3 = [[UISegmentedControl alloc] initWithItems:[NSArray arrayWithObjects:@"Add", nil]];
button3.frame = CGRectMake(0, 0, 160, 33);
@nanmo
nanmo / gist:361a716d1bb9222917e1
Last active June 23, 2021 02:13
トルクル(TorqueL)プレイ動画について

■はじめに(2021年6月1日追記)

2021年6月1日にPLAYISM販売タイトルの実況ガイドラインおよびクリエイター奨励プログラムが制定されました。

PLAYISM販売の「トルクル(TorqueL) / トルクル(TorqueL)物理調整版」はこの実況ガイドラインとクリエイター奨励プログラムの両方に参加しています。

よって、PLAYISM販売のものについては、PLAYISM販売タイトルの実況ガイドラインおよびクリエイター奨励プログラムに従って利用いただくようお願い致します。

PLAYISM販売となるプラットフォーム(SKU)は以下の通りです。

@nanmo
nanmo / detectInputDevice.cs
Created July 4, 2014 04:40
UnityでKeyCodeから入力元デバイスを判定する
//Unity - Scripting API: KeyCode http://docs.unity3d.com/ScriptReference/KeyCode.html
//Axis系はkeycodeから取得できない
//ちなみにintからKeyCodeにキャストは可能
void detectInputDevice( KeyCode kc) {
int keycode = (int)kc;
if ( keycode == 0 ) {
//None
}
else if ( keycode >= 8 && keycode <= 319 ) {
//Keyboard (8=Backspace, 319=Menu)
@nanmo
nanmo / gist:b1ca4f3ea02c54f3f6c4
Last active September 28, 2018 10:18
弊サークルビデオゲーム作品における貸与及び上映に関する基本許諾

弊サークルビデオゲーム作品における貸与及び上映に関する基本許諾

FullPowerSideAttack.com 2014年7月28日 より施行。

本許諾は適宜更新され、最終更新の内容が常に適用されます。

本許諾は「対象となるかわからない」領域が存在します。 不明瞭な箇所、個別の許諾取得についてはinfo@fullpowersideattack.comまでお問い合わせ下さい。

本許諾内用語の定義