Example #1
0
	/**
	 * Fires all functions that are mapped to the given input.
	*/
	public void FireInputEvents(MultiPlatformInputs input) {
		if (inputMap.ContainsKey (input)) {
			foreach(InputAction function in inputMap[input]) {
				function.DynamicInvoke();
			}
		}
	}
Example #2
0
 /**
  * Fires all functions that are mapped to the given input.
  */
 public void FireInputEvents(MultiPlatformInputs input)
 {
     if (inputMap.ContainsKey(input))
     {
         foreach (InputAction function in inputMap[input])
         {
             function.DynamicInvoke();
         }
     }
 }
Example #3
0
	/**
	 * Maps a given input to a given function so that
	 * when that input is detected the function will be called.
	*/
	public void Add(MultiPlatformInputs input, InputAction function) {
		if (inputMap.ContainsKey (input)) {
			List<InputAction> value = inputMap[input];
			if(!value.Contains(function)) {
				value.Add(function);
				return;
			}
		}
		else {
			List<InputAction> value = new List<InputAction>();
			value.Add(function);
			inputMap.Add (input, value);
		}
	}
Example #4
0
 /**
  * Maps a given input to a given function so that
  * when that input is detected the function will be called.
  */
 public void Add(MultiPlatformInputs input, InputAction function)
 {
     if (inputMap.ContainsKey(input))
     {
         List <InputAction> value = inputMap[input];
         if (!value.Contains(function))
         {
             value.Add(function);
             return;
         }
     }
     else
     {
         List <InputAction> value = new List <InputAction>();
         value.Add(function);
         inputMap.Add(input, value);
     }
 }