private void eventHandlerFunc(int EventContext) { //eventInTimeStamp = VRsqr_EventsManager.getEventInTime(EventContext); //eventOutTimeStamp = VRsqr_EventsManager.getEventOutTime(EventContext); VRsqrUtil.Debug.LogInfo("eventHandlerFunc: EventContext = " + EventContext); int eventParamInd = 0; // use reflection mechanisms to collect the EventParam fields, as added in the definition of the current sub-class, which is inheriting EventIn foreach (EventParamsField epf in this.eventParamFields) { VRsqrUtil.Debug.Log(LogLevel.Debug, "eventHandlerFunc: epf.paramName = " + epf.paramName + " , epf.paramType = " + epf.paramType); EventParam ep = VRsqr_EventsManager.GetEventParam(EventContext, epf.paramName); if (ep != null) // data was set in this event for this param { VRsqrUtil.Debug.Log(LogLevel.Debug, "eventHandlerFunc: ep.paramType = " + ep.paramType + " , ep.paramObjVal = " + ep.paramObjVal); if (ep.paramObjVal != null) // ep.Val() == null) { epf.fiEventParamObj.SetValue(this, ep.paramObjVal); // TODO: save the setter function one time, at init } else { if (ep.paramType == null) { ep.paramType = epf.paramType; // interpret the received parameter based on the receiving-end expected input } VRsqrUtil.Debug.Log(LogLevel.Debug, "eventHandlerFunc: ep.StringToObjVal() = " + ep.StringToObjVal()); epf.fiEventParamObj.SetValue(this, ep.StringToObjVal()); // TODO: make this mode, of string-based setting, deprecate } eventParams[eventParamInd++] = ep; } } }
public void eventHandlerFunc(int EventContext) { VRsqrUtil.Debug.Log("eventHandlerFunc: EventContext = " + EventContext); // use reflection mechanisms to collect the EventParam fields, as added in the definition of the current sub-class, which is inheriting EventIn foreach (EventParamsField epf in this.eventParamFields) { VRsqrUtil.Debug.Log("eventHandlerFunc: epf.paramName = " + epf.paramName); EventParam ep = VRsqr_EventsManager.GetEventParam(EventContext, epf.paramName); VRsqrUtil.Debug.Log("eventHandlerFunc: ep.Val() = " + ep.Val()); epf.fiEventParamObj.SetValue(this, ep.Val()); } }
public void eventHandlerFunc(int EventContext) { VRsqrUtil.Debug.LogInfo("eventHandlerFunc: EventContext = " + EventContext); // use reflection mechanisms to collect the EventParam fields, as added in the definition of the current sub-class, which is inheriting EventIn foreach (EventParamsField epf in this.eventParamFields) { string nameFieldVal = (string)epf.fiParamName.GetValue(epf.fiEventParamObj.GetValue(this)); //VRsqrUtil.Debug.Log(LogLevel.Debug, "eventHandlerFunc: nameFieldVal = " + nameFieldVal); EventParam ep = VRsqr_EventsManager.GetEventParam(EventContext, nameFieldVal); epf.fiEventParamObj.SetValue(this, ep); } }