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 override bool Equals(object obj) { if (!(obj is FCgKeyInputHandler)) { return(false); } FCgKeyInputHandler rhs = (FCgKeyInputHandler)obj; if (Action != rhs.Action) { return(false); } if (Event != rhs.Event) { return(false); } return(true); }