Skip to content

Instantly share code, notes, and snippets.

@muzudho
Last active January 23, 2017 12:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save muzudho/c85bc3895f5c4f9b9abcc30e3e31593f to your computer and use it in GitHub Desktop.
Save muzudho/c85bc3895f5c4f9b9abcc30e3e31593f to your computer and use it in GitHub Desktop.
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]
hash_to_index.Add(Animator.StringToHash(astate.BreadCrumb + astate.Name), iAstate); // (~,AstateIndex)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment