Skip to content

Instantly share code, notes, and snippets.

View muzudho's full-sized avatar

むずでょ muzudho

View GitHub Profile
@muzudho
muzudho / file0.txt
Last active January 21, 2017 04:08
Unityで2D格闘(2D Fighting game)作るときに相手の方向を向くには? ref: http://qiita.com/muzudho1/items/cfe352c864d791c3a98f
相手 - 自分
@muzudho
muzudho / file0.txt
Last active January 22, 2017 05:39
Unityで2D格闘(2D Fighting game)作ったとしても解決してくれないだろうこと ref: http://qiita.com/muzudho1/items/56f6d287c4f6857b2900
UPDATE ADDLINE From "立ち待機" To "*ジャンプ"
UPDATE ADDCOND trigger "jump" From "立ち待機" To "*ジャンプ"
@muzudho
muzudho / file0.txt
Last active January 22, 2017 17:24
UnityEditorを使って2D格闘(2D Fighting game)作るときのモーション遷移図作成の半自動化に挑戦しよう<その1> ref: http://qiita.com/muzudho1/items/9c50b8b894e3cf4c90da
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEditor; // 追加
public class Banana1 : MonoBehaviour {
[MenuItem("Bye bye Earth!/Rocket1/Space2/Moon3")]
static void GoToTheMoon()
@muzudho
muzudho / file0.txt
Last active January 23, 2017 07:03
UnityEditorを使って2D格闘(2D Fighting game)作るときのモーション遷移図作成の半自動化に挑戦しよう<その2> ref: http://qiita.com/muzudho1/items/8455c0c7a26d5788b541
// アニメーター・コントローラーの取得例。
// AnimatorController ac = (AnimatorController)AssetDatabase.LoadAssetAtPath<AnimatorController>("Assets/Resources/AnimatorControllers/AniCon@Char3.controller");
void ScanRecursive(List<AnimatorStateMachine> aStateMachineList, AnimatorStateMachine aStateMachine)
{
aStateMachineList.Add(aStateMachine);
foreach (ChildAnimatorStateMachine caStateMachine in aStateMachine.stateMachines)
{
ScanRecursive(aStateMachineList, caStateMachine.stateMachine);
@muzudho
muzudho / file0.txt
Last active January 23, 2017 12:26
UnityEditorを使って2D格闘(2D Fighting game)作るときのモーション遷移図作成の半自動化に挑戦しよう<その3> ref: http://qiita.com/muzudho1/items/a1669f4d1721428790c1
/// <summary>
/// シーンの Start( )メソッドで呼び出してください。
/// </summary>
public void InsertAllStates()
{
hash_to_index = new Dictionary<int, int>(); // <hash,AstateIndex>
for (int iAstate = 0; iAstate < index_to_record.Count; iAstate++)
{
AstateRecordable astate = index_to_record[iAstate]; // [AstateIndex]
@muzudho
muzudho / file0.txt
Last active January 27, 2017 15:49
UnityEditorを使って2D格闘(2D Fighting game)作るときのモーション遷移図作成の半自動化に挑戦しよう<その4> ref: http://qiita.com/muzudho1/items/baf4b06cdcda96ca9a11
TRANSITION ADD
FROM "Base Layer.SMove"
TO "Base Layer.SAtkLP"
@muzudho
muzudho / file0.txt
Last active February 1, 2017 03:42
Unityで動く、自分で作ったスクリプト言語を使ってみよう ref: http://qiita.com/muzudho1/items/4515786beb49fae24992
TRANSITION INSERT
FROM "Base Layer\.DMove"
TO TAG ( (Dash) [Punch Kick] )
@muzudho
muzudho / file0.txt
Last active February 2, 2017 12:59
LibreOfficeをインストールしよう ref: http://qiita.com/muzudho1/items/dcd876a26a223045535c
REM ***** BASIC *****
Sub Main
msgbox "Hello World!!"
Dim oSheet as Object ' シート
Dim oSheets As Object ' シートのリスト
Dim sheetName As String ' シートの名前
Dim oDoc As Object ' 新しいブック
Dim Dummy() ' 使わない引数に
@muzudho
muzudho / file0.txt
Last active February 3, 2017 08:16
UnityのAnimationControllerのデータをLibraOfficeを使って設定することに挑戦 ref: http://qiita.com/muzudho1/items/b9d16d1f64bf6e9639c0
REM ***** BASIC *****
Option Explicit
' CreateUpdateRequest シート用
Sub Main
' 0 設定、1 入力、 2 出力
Dim oSheet0 as Object ' 設定シート
@muzudho
muzudho / file0.txt
Last active February 3, 2017 20:20
UnityにCSVのインポートボタンを付けよう ref: http://qiita.com/muzudho1/items/4707ba7fca1b64c36f7f
/// <summary>
/// struct を object に渡したいときに使うラッパーだぜ☆(^~^)
/// </summary>
public class PositionWrapper
{
public PositionWrapper(AnimatorStateMachine statemachine, string propertyName)
{
this.m_statemachine = statemachine;
this.PropertyName = propertyName;
}