public void addToStreamEx(Bundle stream, PROP_LIST v)
 {
     stream.writeUint32((UInt32)v.Count);
     for (int i = 0; i < v.Count; ++i)
     {
         stream.writeUnicode(v[i]);
     }
     ;
 }
        public PROP_LIST createFromStreamEx(MemoryStream stream)
        {
            UInt32    size  = stream.readUint32();
            PROP_LIST datas = new PROP_LIST();

            while (size > 0)
            {
                --size;
                datas.Add(stream.readUnicode());
            }
            ;

            return(datas);
        }
Exemple #3
0
 /// <summary>
 /// 恢复相应道具
 /// </summary>
 /// <param name="propList">需要恢复的道具列表</param>
 public override void onResetProps(PROP_LIST propList)
 {
     KBEDebug.LogFormat("Room::onResetProps");
     Event.fireOut("onResetProps", propList);
 }
        public override void onRemoteMethodCall(MemoryStream stream)
        {
            ScriptModule sm = EntityDef.moduledefs["Room"];

            UInt16 methodUtype            = 0;
            UInt16 componentPropertyUType = 0;

            if (sm.usePropertyDescrAlias)
            {
                componentPropertyUType = stream.readUint8();
            }
            else
            {
                componentPropertyUType = stream.readUint16();
            }

            if (sm.useMethodDescrAlias)
            {
                methodUtype = stream.readUint8();
            }
            else
            {
                methodUtype = stream.readUint16();
            }

            Method method = null;

            if (componentPropertyUType == 0)
            {
                method = sm.idmethods[methodUtype];
            }
            else
            {
                Property pComponentPropertyDescription = sm.idpropertys[componentPropertyUType];
                switch (pComponentPropertyDescription.properUtype)
                {
                default:
                    break;
                }

                return;
            }

            switch (method.methodUtype)
            {
            case 40:
                Int32 onLoadingFinish_arg1 = stream.readInt32();
                onLoadingFinish(onLoadingFinish_arg1);
                break;

            case 42:
                Int32 onPropResult_arg1 = stream.readInt32();
                Int32 onPropResult_arg2 = stream.readInt32();
                Int32 onPropResult_arg3 = stream.readInt32();
                Byte  onPropResult_arg4 = stream.readUint8();
                onPropResult(onPropResult_arg1, onPropResult_arg2, onPropResult_arg3, onPropResult_arg4);
                break;

            case 43:
                Int32 onReachDestination_arg1 = stream.readInt32();
                Int32 onReachDestination_arg2 = stream.readInt32();
                onReachDestination(onReachDestination_arg1, onReachDestination_arg2);
                break;

            case 41:
                PROP_LIST onResetProps_arg1 = ((DATATYPE_PROP_LIST)method.args[0]).createFromStreamEx(stream);
                onResetProps(onResetProps_arg1);
                break;

            case 44:
                Int32 onTimerChanged_arg1 = stream.readInt32();
                onTimerChanged(onTimerChanged_arg1);
                break;

            default:
                break;
            }
            ;
        }
 public abstract void onResetProps(PROP_LIST arg1);