Exemplo n.º 1
0
 void ConvertEventData(AMEventData oldParam, EventData newParam)
 {
     newParam.paramName  = oldParam.paramName;
     newParam.valueType  = (EventData.ValueType)oldParam.valueType;
     newParam.val_int    = oldParam.val_int;
     newParam.val_string = oldParam.val_string;
     newParam.val_vect4  = oldParam.val_vect4;
     newParam.val_obj    = oldParam.val_obj;
 }
Exemplo n.º 2
0
    public override void fromObject(object dat)
    {
        if(valueType == (int)ValueType.Array) {
            System.Array arr = (System.Array)dat;
            lsArray = new List<AMEventData>(arr.Length);
            System.Type t = arr.GetType().GetElementType();
            for(int i = 0; i < arr.Length; i++) {
                object arrElem = arr.GetValue(i);

                AMEventData a = new AMEventData();
                a.setValueType(arrElem != null ? arrElem.GetType() : t);
                a.fromObject(arrElem);
                lsArray.Add(a);
            }
        }
        else
            base.fromObject(dat);
    }