Skip to content

Instantly share code, notes, and snippets.

@shoridevel
shoridevel / file0.txt
Created Jul 7, 2013
【Unity】【NGUI】2D Sprite画像1枚で手動で位置座標を入れてみたメモ ref: http://qiita.com/shori0917/items/300d7bcc81d7dccc0cd6
View file0.txt
"1.png":
{
"frame": {"x":4,"y":4,"w":33,"h":43},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":33,"h":43},
"sourceSize": {"w":33,"h":43}
}
"2.png":
{
@shoridevel
shoridevel / Player.cs
Created Jul 27, 2013
【Unity】【NGUI】NGUIにVirtual Joystick(NGUI用)を追加してみた ref: http://qiita.com/shori0917/items/0b3237eb13889d3ea053
View Player.cs
UIJoystick joystick;
void Start() {
this.joystick = GameObject.FindGameObjectWithTag("Joystick").GetComponent<UIJoystick>();
}
void Update() {
if (this.joystick.position.y > 0)
{
@shoridevel
shoridevel / qiita.cs
Created Aug 30, 2013
【Unity】GUITextureを真ん中で表示する方法2つ ref: http://qiita.com/shori0917/items/2f302bb8badb5e6d5ffe
View qiita.cs
void Start () {
background = GetComponent<GUITexture>().texture;
}
void OnGUI(){
GUI.DrawTexture(new Rect(Screen.width / 2 - 128, Screen.height / 2 - 128, background.width,
background.width), background);
}
@shoridevel
shoridevel / center.cs
Created Aug 30, 2013
【Unity】GUITextureの画像を真ん中に表示する2つ方法 ref: http://qiita.com/shori0917/items/f32f9fcbce165c18e623
View center.cs
void Start () {
background = GetComponent<GUITexture>().texture;
}
void OnGUI(){
GUI.DrawTexture(new Rect(Screen.width / 2 - 128, Screen.height / 2 - 128, background.width,
background.width), background);
}
View itween.cs
void OnTriggerStay(Collider other) {
ins = Instantiate(PlusMoneyPrefab) as GameObject;
Vector3 startPosition = new Vector3(startX, startY, -1);
ins.transform.parent = Respawn.transform;
ins.transform.localPosition = startPosition;
ins.transform.localScale = new Vector3(50, 50, 0);
Hashtable parameters = new Hashtable();
parameters.Add("y", startY + 80);
@shoridevel
shoridevel / file0.txt
Created Feb 25, 2014
【Unity】Viewportを利用したWorldPoint(position)の画面外のposition ref: http://qiita.com/shori0917/items/5c4a249ff09244645c93
View file0.txt
public static Camera mainCamera;
public static float startWorldPointX;
public static float endWorldPointX;
public static float startWorldPointY;
public static float endWorldPointY;
void Start () {
@shoridevel
shoridevel / file0.txt
Created Jun 14, 2014
【node.js】nodebrewでnode.jsのインストールめも ref: http://qiita.com/shori0917/items/e45c4eca64a4992ad37b
View file0.txt
% node
% node -v
% which node
@shoridevel
shoridevel / file0.txt
Created Sep 4, 2014
【環境構築】GradleでGoogle Play Services対応(Mac, Linux) ref: http://qiita.com/gc-j-lee/items/8cd18e344a12da12ce5f
View file0.txt
apply plugin: 'android'
...
dependencies {
...
compile 'com.google.android.gms:play-services:+'
}
@shoridevel
shoridevel / file0.txt
Last active Aug 29, 2015
【環境構築】VirtualBox + Vagrant + CoreOS + Docker環境の構築めも ref: http://qiita.com/gc-j-lee/items/cf9877f3e459fb631dd1
View file0.txt
$ brew install caskroom/cask/brew-cask
View BlockDto.cs
public class BlockDto : ObjectBaseDto
{
public BlockDto ()
{
}
public BlockDto (PositionDto _Position, float _SpawnTime, int _Type) : base (_Position, _SpawnTime)
{
Type = _Type;
}
You can’t perform that action at this time.