public override bool Equals(object obj) { if (!(obj is FCgInput)) { return(false); } FCgInput input = (FCgInput)obj; if (Action != input.Action) { return(false); } if (Event != input.Event) { return(false); } if (Value != input.Value) { return(false); } if (Location != input.Location) { return(false); } if (Rotation != input.Rotation) { return(false); } if (Duration != input.Duration) { return(false); } return(true); }
public void Raw(Vector3 rotation) { if ((Manager_Input.CurrentInputActionMap & (ActionMap)) == NONE) { return; } FCgInput input = Manager_Input.GetPreviousPreviousInputAction(Action); if (input == null && Info.Euler != rotation) { FirstMoved(rotation); } else if (Info.Euler != rotation) { Moved(rotation); } else if ((input == null && Info.Euler == rotation) || (input != null && input.Rotation != Info.Euler && Info.Euler == rotation)) { FirstStationary(rotation); } else if (Info.Euler == rotation) { Stationary(rotation); } }
public void Raw(float val) { if ((Manager_Input.CurrentInputActionMap & (ActionMap)) == NONE) { return; } FCgInput input = Manager_Input.GetPreviousPreviousInputAction(Action); if (input == null && Info.Value != val) { FirstMoved(val); } else if (Info.Value != val) { Moved(val); } else if ((input == null && Info.Value == val) || (input != null && input.Value != Info.Value && Info.Value == val)) { FirstStationary(val); } else if (Info.Value == val) { Stationary(val); } }
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 ProcessInput(FCgInputFrame inputFrame) { int and = 0; bool or = false; int count = inputFrame.Inputs.Count; for (int i = count - 1; i >= 0; --i) { FCgInput input = inputFrame.Inputs[i]; // Check And int andCount = AndInputs.Count; for (int j = and; j < andCount; ++j) { if (input.Action == AndInputs[j].Action && input.Event == AndInputs[j].Event) { ++and; } } // Check Or int orCount = OrInputs.Count; for (int j = 0; j < orCount; ++j) { or |= input.Action == OrInputs[j].Action && input.Event == OrInputs[j].Event; if (or) { break; } } Completed = (and > 0 && and == andCount) || or; if (Completed) { if (Consume) { inputFrame.Inputs.RemoveAt(i); } CompletedTime = inputFrame.Time; break; } } }