private void Broadcast(ECgInputEvent e, MonoBehaviour mb) { CgInputAction_Event del; Events.TryGetValue(e, out del); del.Broadcast(mb); }
private void Broadcast(ECgInputEvent e, MonoBehaviour mb, float val) { FCgInputAxis_Event del; Events.TryGetValue(e, out del); del.Broadcast(mb, val); }
private void Broadcast(ECgInputEvent e, MonoBehaviour mb, Vector3 rotation) { FCgInputRotation_Event del; Events.TryGetValue(e, out del); del.Broadcast(mb, rotation); }
public void AddEvent(ECgInputEvent e, CgInputAction_Event.Event del) { CgInputAction_Event handler; Events.TryGetValue(e, out handler); handler.Add(del); }
public void AddEvent(ECgInputEvent e, FCgInputAxis_Event.Event del) { FCgInputAxis_Event handler; Events.TryGetValue(e, out handler); handler.Add(del); }
public void Set(ECgInputEvent e, float time, float realTime, ulong frame) { Event = e; Time = time; RealTime = realTime; Frame = frame; Execute(e); }
public void Set(FECgInputAction action, ECgInputEvent e, float value, Vector3 location, Vector3 rotation) { Action = action; Event = e; Value = value; Location = location; Rotation = rotation; }
public void Moved(float val) { ECgInputEvent e = ECgInputEvent.Moved; Info.Set(e, val); Manager_Input.AddInput(Action, e, val); Broadcast(e, Manager_Input.InputOwner, val); }
public void Stationary(Vector3 rotation) { ECgInputEvent e = ECgInputEvent.Stationary; Info.Set(e, rotation); Manager_Input.AddInput(Action, e, 0.0f, Vector3.zero, rotation); Broadcast(e, Manager_Input.InputOwner, rotation); }
public void Stationary(float val) { ECgInputEvent e = ECgInputEvent.Stationary; Info.Set(e, val); Manager_Input.AddInput(Action, e, val); Broadcast(e, Manager_Input.InputOwner, val); }
public void Moved(Vector3 location) { ECgInputEvent e = ECgInputEvent.Moved; Info.Set(e, location); Manager_Input.AddInput(Action, e, 0.0f, location); Broadcast(e, Manager_Input.InputOwner, location); }
public void FirstStationary(Vector3 location) { ECgInputEvent e = ECgInputEvent.FirstStationary; Info.Set(e, location); Manager_Input.AddInput(Action, e, 0.0f, location); Broadcast(e, Manager_Input.InputOwner, location); }
public FCgInput GetInput(FECgInputAction action, ECgInputEvent e) { FCgInput input = GetInput(action); if (input != null) { return(input.Event == e ? input : null); } return(null); }
public void Reset() { IsAllocated = false; IsConsumed = false; Action = null; Event = ECgInputEvent.MAX; Value = Mathf.Infinity; Location = Vector3.zero; Rotation = Vector3.zero; Duration = 0f; }
public void Execute(ECgInputEvent e) { Dictionary <FECgInputAction, FCgKeyInputHandler> map = HandlerMap[(byte)e]; Dictionary <FECgInputAction, FCgKeyInputHandler> .ValueCollection handles = map.Values; foreach (FCgKeyInputHandler h in handles) { h.Broadcast(); } }
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 Pressed() { ECgInputEvent e = ECgInputEvent.Pressed; if (Info.Last_Event == ECgInputEvent.FirstPressed) { Info.Event = e; } Manager_Input.AddInput(Action, e); Broadcast(e, Manager_Input.InputOwner); }
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 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 FCgInputInfo(ECgInputType type, ECgInputValue valueType) { Type = type; ValueType = valueType; Event = ECgInputEvent.MAX; Last_Event = ECgInputEvent.MAX; Value = 0f; Location = Vector3.zero; Rotation = Quaternion.identity; Euler = 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 void FirstReleased() { if ((Manager_Input.CurrentInputActionMap & ActionMap) == NONE) { return; } ECgInputEvent e = ECgInputEvent.FirstReleased; Info.Event = e; Manager_Input.AddInput(Action, e); Broadcast(e, Manager_Input.InputOwner); }
public bool UnBind(ECgInputEvent e, FCgDelegateHandle handle) { Dictionary <FECgInputAction, FCgKeyInputHandler> map = HandlerMap[(byte)e]; Dictionary <FECgInputAction, FCgKeyInputHandler> .ValueCollection handles = map.Values; bool success = false; foreach (FCgKeyInputHandler h in handles) { success |= h.Remove(handle); } return(success); }
public FCgKeyInput(KeyCode key) { Key = key; Event = ECgInputEvent.MAX; Time = 0f; RealTime = 0f; DeltaTime = 0f; Frame = 0; HandlerMap = new Dictionary <FECgInputAction, FCgKeyInputHandler> [(byte)ECgInputEvent.MAX]; int len = (int)ECgInputEvent.MAX; for (int i = 0; i < len; ++i) { HandlerMap[i] = new Dictionary <FECgInputAction, FCgKeyInputHandler>(new FECgInputActionEqualityComparer()); } }
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 AddAndInput(FECgInputAction action, ECgInputEvent e, float value) { AddAndInput(action, e, value, Vector3.zero, Vector3.zero); }
public void AddAndInput(FECgInputAction action, ECgInputEvent e) { AddAndInput(action, e, 0.0f, Vector3.zero, Vector3.zero); }
public void Set(ECgInputEvent e, Quaternion rotation) { Event = e; Rotation = rotation; Euler = Rotation.eulerAngles; }
public void Set(ECgInputEvent e, Vector3 location) { Event = e; Location = location; }
public void Set(ECgInputEvent e, float value) { Event = e; Value = value; }