- 522 名前:名前は開発中のものです。 mailto:sage [2016/07/14(木) 18:29:06.65 ID:0T6tO2FN.net]
- キーコンフィグの制作が終わんない誰か助けて
public struct KeyValue{ public bool type; public KeyCode code; public int num; } public class InputData{ List<KeyConfig> keyList = new List<KeyConfig>(); public void Add(bool t, KeyCode c, int n){ keyList.Add(new KeyValue(t, c, n)); } public bool GetKeyDown(){ for(var n=0; n<keyList.Count; n++){ if(keyList[n].type == true) return Input.GetKeyDown(keyList[n].code); else return Input.GetMouseButton(keyList[n].num); } return false; } } この設計で作ったら何かUnityで問題ありそうかどうか直感でいいので教えてください
|

|