Esempio n. 1
0
		public static bool GetKey (string inputName)
		{
			List<RebindableKey> keyDatabase = rebindableManager.GetCurrentKeys ();
			
			foreach (RebindableKey key in keyDatabase)
			{
				if (key.inputName == inputName)
				{
					return Input.GetKey (key.input);
				}
			}
			
			throw new RebindableNotFoundException ("The rebindable key '" + inputName + "' was not found.\nBe sure you have created it and haven't misspelled it.");
		}
Esempio n. 2
0
        // Use this for initialization
        void Start()
        {
            //获取RB的信息
            rebindableManager = RebindableData.GetRebindableManager();
            List <RebindableKey> keyDatabase = rebindableManager.GetCurrentKeys();

            //长度赋值
            WhichKeyIsDown = new bool[keyDatabase.Count];
        }