public FCgInputActionMapping() { ActionName = ""; Action = null; KeyName = ""; Key = KeyCode.None; Scale = 1.0f; }
public void Set(FECgInputAction action, ECgInputEvent e, float value, Vector3 location, Vector3 rotation) { Action = action; Event = e; Value = value; Location = location; Rotation = rotation; }
public FCgInput GetInput(FECgInputAction action, List <ECgInputEvent> events) { FCgInput input = GetInput(action); if (input != null) { return(events.IndexOf(input.Event) != CgTypes.INDEX_NONE ? input : null); } return(null); }
public FCgInput GetInput(FECgInputAction action, ECgInputEvent e) { FCgInput input = GetInput(action); if (input != null) { return(input.Event == e ? input : null); } return(null); }
public void AddAndInput(FECgInputAction action, ECgInputEvent e, float value, Vector3 location, Vector3 rotation) { AndInputs.Add(new FCgInput()); int index = AndInputs.Count - 1; AndInputs[index].Action = action; AndInputs[index].Event = e; AndInputs[index].Value = value; AndInputs[index].Location = location; AndInputs[index].Rotation = rotation; }
public void Reset() { IsAllocated = false; IsConsumed = false; Action = null; Event = ECgInputEvent.MAX; Value = Mathf.Infinity; Location = Vector3.zero; Rotation = Vector3.zero; Duration = 0f; }
public FCgInput() { PoolIndex = INVALID_POOL_INDEX; IsAllocated = false; IsConsumed = false; Action = null; Event = ECgInputEvent.MAX; Value = Mathf.Infinity; Location = Vector3.zero; Rotation = Vector3.zero; Duration = 0f; }
public void Init(ushort poolIndex) { PoolIndex = poolIndex; IsAllocated = false; IsConsumed = false; Action = null; Event = ECgInputEvent.MAX; Value = Mathf.Infinity; Location = Vector3.zero; Rotation = Vector3.zero; Duration = 0f; }
public void AddOrInputToWord(int index, FECgInputAction action, ECgInputEvent e, float value = 0.0f, Vector3 location = new Vector3(), Vector3 rotation = new Vector3()) { int count = Words.Count; if (index >= count) { for (int i = 0; i < index - count + 1; ++i) { Words.Add(new FCgInputWord()); } } Words[index].AddOrInput(action, e, value, location, rotation); }
public FCgInput GetInput(FECgInputAction action) { int count = Inputs.Count; for (int i = 0; i < count; ++i) { if (Inputs[i].Action == action) { return(Inputs[i]); } } return(null); }
public void AddMapping(ECgInputDevice device, string actionName, FECgInputAction action, string keyName, KeyCode key) { FCgInputActionMappings deviceMapping = DeviceMappings[(byte)device]; List <FCgInputActionMapping> mappings = deviceMapping.Mappings; int count = mappings.Count; mappings.Add(new FCgInputActionMapping()); FCgInputActionMapping mapping = mappings[count]; mapping.ActionName = actionName; mapping.Action = action; mapping.KeyName = keyName; mapping.Key = key; }
public FCgInputActionMapping GetMapping(ECgInputDevice device, FECgInputAction action) { FCgInputActionMappings deviceMapping = DeviceMappings[(byte)device]; List <FCgInputActionMapping> mappings = deviceMapping.Mappings; int count = mappings.Count; for (int i = 0; i < count; ++i) { FCgInputActionMapping mapping = mappings[i]; if (action == mapping.Action) { return(deviceMapping.Mappings[i]); } } return(mappings[CgTypes.FIRST]); }
public KeyCode GetKey(ECgInputDevice device, FECgInputAction action) { FCgInputActionMappings deviceMapping = DeviceMappings[(byte)device]; List <FCgInputActionMapping> mappings = deviceMapping.Mappings; int count = mappings.Count; for (int i = 0; i < count; ++i) { FCgInputActionMapping mapping = mappings[i]; if (action == mapping.Action) { return(mapping.Key); } } return(KeyCode.None); }
public void SetKey(ECgInputDevice device, FECgInputAction action, KeyCode key) { FCgInputActionMappings deviceMapping = DeviceMappings[(byte)device]; List <FCgInputActionMapping> mappings = deviceMapping.Mappings; int count = mappings.Count; for (int i = 0; i < count; ++i) { FCgInputActionMapping mapping = mappings[i]; if (action == mapping.Action) { mapping.KeyName = key == KeyCode.None ? "" : key.ToString(); mapping.Key = key; break; } } }
public FCgDelegateHandle Bind(FECgInputAction action, ECgInputEvent e, FCgMulticastDelegate.Event del) { Dictionary <FECgInputAction, FCgKeyInputHandler> map = HandlerMap[(byte)e]; FCgKeyInputHandler handle = null; bool found = map.TryGetValue(action, out handle); if (found) { return(handle.Add(del)); } else { handle = new FCgKeyInputHandler(action); map.Add(action, handle); return(handle.Add(del)); } }
public void AddOrInput(FECgInputAction action, ECgInputEvent e, Quaternion rotation) { AddOrInput(action, e, 0.0f, Vector3.zero, rotation.eulerAngles); }
public FCgKeyInputHandler() { Action = null; }
public FCgKeyInputHandler(FECgInputAction action) { Action = action; Event = new FCgKeyInputHandler_Event(); }
public void Allocate(FECgInputAction action, ECgInputEvent e) { Allocate(action, e, 0f, Vector3.zero, Vector3.zero); }
public void Allocate(FECgInputAction action, ECgInputEvent e, float value) { Allocate(action, e, value, Vector3.zero, Vector3.zero); }
public void Allocate(FECgInputAction action, ECgInputEvent e, Vector3 location, Vector3 rotation) { Allocate(action, e, 0f, location, rotation); }
public void Allocate(FECgInputAction action, ECgInputEvent e, float value, Vector3 location, Vector3 rotation) { IsAllocated = true; Set(action, e, value, location, rotation); }
public void Set(FECgInputAction action, ECgInputEvent e) { Set(action, e, 0f, Vector3.zero, Vector3.zero); }
public void AddAndInput(FECgInputAction action, ECgInputEvent e) { AddAndInput(action, e, 0.0f, Vector3.zero, Vector3.zero); }
public void Set(FECgInputAction action, ECgInputEvent e, Vector3 location, Vector3 rotation) { Set(action, e, 0f, location, rotation); }
public void Set(FECgInputAction action, ECgInputEvent e, float time) { Set(action, e, time, Vector3.zero, Vector3.zero); }
public void AddAndInput(FECgInputAction action, ECgInputEvent e, float value) { AddAndInput(action, e, value, Vector3.zero, Vector3.zero); }
public void AddOrInput(FECgInputAction action, ECgInputEvent e, Vector3 location) { AddOrInput(action, e, 0.0f, location, Vector3.zero); }