Created
December 18, 2016 14:42
-
-
Save baobao/9dde1d88be5aaccbf29f932513d92862 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using System.Collections; | |
using System.Collections.Generic; | |
public class SampleAnimHandler : MonoBehaviour | |
{ | |
public enum AnimType | |
{ | |
TYPE_1, | |
TYPE_2, | |
TYPE_3 | |
} | |
/// <summary> | |
/// 引数の無い関数 | |
/// 実行可能 | |
/// </summary> | |
public void CallNoArg () | |
{ | |
Debug.Log ("no arg"); | |
} | |
/// <summary> | |
/// float型の引数 | |
/// 実行可能 | |
/// </summary> | |
/// <param name="value">Value.</param> | |
public void SetFloat (float value) | |
{ | |
Debug.Log (value); | |
} | |
/// <summary> | |
/// int型の引数 | |
/// 実行可能 | |
/// </summary> | |
/// <param name="value">Value.</param> | |
public void SetInt (int value) | |
{ | |
Debug.Log (value); | |
} | |
/// <summary> | |
/// bool型の引数 | |
/// 実行可能 | |
/// </summary> | |
/// <param name="value">If set to <c>true</c> value.</param> | |
public void SetBool (bool value) | |
{ | |
Debug.Log (value); | |
} | |
/// <summary> | |
/// string型の引数 | |
/// 実行可能 | |
/// </summary> | |
/// <param name="value">Value.</param> | |
public void SetString (string value) | |
{ | |
Debug.Log (value); | |
} | |
/// <summary> | |
/// enum型の引数 | |
/// 実行可能 | |
/// </summary> | |
/// <param name="type">Type.</param> | |
public void SetType (AnimType type) | |
{ | |
Debug.Log (type); | |
} | |
/// <summary> | |
/// 複数引数 | |
/// 実行不可 | |
/// </summary> | |
/// <param name="value1">Value1.</param> | |
/// <param name="value2">Value2.</param> | |
public void SetMultiArgs (int value1, float value2) | |
{ | |
Debug.Log (value1 + " / " + value2); | |
} | |
/// <summary> | |
/// クラス型の引数 | |
/// 実行不可 | |
/// </summary> | |
/// <param name="data">Data.</param> | |
public void SetAnimData (AnimData data) | |
{ | |
Debug.Log (data); | |
} | |
/// <summary> | |
/// List型 | |
/// 実行不可 | |
/// </summary> | |
/// <param name="list">List.</param> | |
public void SetList (List<int> list) | |
{ | |
Debug.Log (list); | |
} | |
} | |
[System.Serializable] | |
public class AnimData | |
{ | |
public int index; | |
public float value; | |
public bool flg; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment