Beispiel #1
0
 void Awake()
 {
     if (_instance != null)
     {
         Debug.Log("more than one keymap on scene", gameObject);
     }
     _instance = this;
     if (k == null)
     {
         createLists();
     }
 }
Beispiel #2
0
    static void createLists()

    {
        if (_instance == null)
        {
            _instance = GameObject.FindObjectOfType <zKeyMap>();
            if (_instance == null)
            {
                GameObject g = new GameObject("keymap");
                g.AddComponent <zKeyMap>();
            }
        }
        k          = new List <KeyCode>();
        m          = new List <MonoBehaviour>();
        onUpList   = new List <Action>();
        onDownList = new List <Action>();
    }