当前位置: 首页>>代码示例>>C#>>正文


C# NFrame.NFGUID类代码示例

本文整理汇总了C#中NFrame.NFGUID的典型用法代码示例。如果您正苦于以下问题:C# NFGUID类的具体用法?C# NFGUID怎么用?C# NFGUID使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


NFGUID类属于NFrame命名空间,在下文中一共展示了NFGUID类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: OnClassNPCEventHandler

    private void OnClassNPCEventHandler(NFGUID self, int nContainerID, int nGroupID, NFIObject.CLASS_EVENT_TYPE eType, string strClassName, string strConfigIndex)
    {
        if (eType == NFIObject.CLASS_EVENT_TYPE.OBJECT_CREATE)
        {
            string strConfigID = NFCKernelModule.Instance.QueryPropertyString(self, "ConfigID");
            Vector3 vec = new Vector3();
            vec.x = (float)NFCKernelModule.Instance.QueryPropertyFloat(self, "X");
            vec.y = (float)NFCKernelModule.Instance.QueryPropertyFloat(self, "Y");
            vec.z = (float)NFCKernelModule.Instance.QueryPropertyFloat(self, "Z");

            string strPrefabPath = "";
            if (strConfigID.Length <= 0)
            {
                strPrefabPath = NFCKernelModule.Instance.GetElementModule().QueryPropertyString("Player", "Prefab");
            }
            else
            {
                strPrefabPath = NFCKernelModule.Instance.GetElementModule().QueryPropertyString(strConfigID, "Prefab");
            }

            //CreateObject(self, strPrefabPath, vec, strClassName);
        }
        else if (eType == NFIObject.CLASS_EVENT_TYPE.OBJECT_DESTROY)
        {
            //DestroyObject(self);
        }
        
    }
开发者ID:ketoo,项目名称:NoahGameFrame,代码行数:28,代码来源:NFCRenderInterface.cs

示例2: NFCRecord

		public NFCRecord(NFGUID self, string strRecordName, int nRow, NFIDataList varData)
		{
			mSelf = self;
			mnRow = nRow;
			mstrRecordName = strRecordName;
            mVarRecordType = new NFCDataList(varData);
		}
开发者ID:ketoo,项目名称:NoahGameFrame,代码行数:7,代码来源:NFCRecord.cs

示例3: NFCProperty

        public NFCProperty( NFGUID self, string strPropertyName, NFIDataList varData)
        {
            mSelf = self;
            msPropertyName = strPropertyName;
            mxData = new NFIDataList.TData(varData.GetType(0));

            switch (varData.GetType(0))
            {
                case NFIDataList.VARIANT_TYPE.VTYPE_INT:
                    mxData.Set(varData.IntVal(0));
                    break;
                case NFIDataList.VARIANT_TYPE.VTYPE_FLOAT:
                    mxData.Set(varData.FloatVal(0));
                    break;
                case NFIDataList.VARIANT_TYPE.VTYPE_DOUBLE:
                    mxData.Set(varData.DoubleVal(0));
                    break;
                case NFIDataList.VARIANT_TYPE.VTYPE_OBJECT:
                    mxData.Set(varData.ObjectVal(0));
                    break;
                case NFIDataList.VARIANT_TYPE.VTYPE_STRING:
                    mxData.Set(varData.StringVal(0));
                    break;
                default:
                    break;
            }
        }
开发者ID:ketoo,项目名称:NFrame,代码行数:27,代码来源:NFCProperty.cs

示例4: OnClassHandler

        public void OnClassHandler(NFGUID self, int nContainerID, int nGroupID, NFIObject.CLASS_EVENT_TYPE eType, string strClassName, string strConfigIndex)
        {
            if (eType == NFIObject.CLASS_EVENT_TYPE.OBJECT_CREATE)
            {
                NFIObject xObject = NFCKernelModule.Instance.GetObject(self);

                NFIPropertyManager xPropertyManager = xObject.GetPropertyManager();
                NFIDataList xPropertyNameList = xPropertyManager.GetPropertyList();
                for (int i = 0; i < xPropertyNameList.Count(); i++)
                {
                    string strPropertyName = xPropertyNameList.StringVal(i);
                    NFIProperty xProperty = xPropertyManager.GetProperty(strPropertyName);
                    if (xProperty.GetUpload())
                    {
                        xProperty.RegisterCallback(OnPropertyHandler);
                    }
                }

                NFIRecordManager xRecordManager = xObject.GetRecordManager();
                NFIDataList xRecordNameList = xRecordManager.GetRecordList();
                for (int i = 0; i < xRecordNameList.Count(); i++)
                {
                    string strRecodeName = xRecordNameList.StringVal(i);
                    NFIRecord xRecord = xRecordManager.GetRecord(strRecodeName);
                    if(xRecord.GetUpload())
                    {
                        xRecord.RegisterCallback(OnRecordHandler);
                    }
                }
            }
        }
开发者ID:ketoo,项目名称:NoahGameFrame,代码行数:31,代码来源:NFCUploadModule.cs

示例5: CreateActor

        public override NFGUID CreateActor(NFIActor.Handler handler)
        {
            NFGUID xID = new NFGUID(0, ++mnActorIndex);
            NFIActor xActor = new NFCActor(xID, this);

            //添加仍旧有问题,foreach中万一有其他线程添加
            bool bRet = mxActorDic.TryAdd(xID, xActor);
            if (bRet)
            {
                if (null != handler)
                {
                    RegisterHandler(xID, handler);

                    NFIActorMessage xMessage = new NFIActorMessage();
                    xMessage.bAsync = false;//同步消息
                    xMessage.bReturn = false;//无需返回

                    xMessage.eType = NFIActorMessage.EACTOR_MESSAGE_ID.EACTOR_INIT;
                    SendMsg(xActor.GetAddress(), null, xMessage);

                    xMessage.eType = NFIActorMessage.EACTOR_MESSAGE_ID.EACTOR_AFTER_INIT;
                    SendMsg(xActor.GetAddress(), null, xMessage);
                }

                return xID;
            }

            return null;
        }
开发者ID:ketoo,项目名称:NFrame,代码行数:29,代码来源:NFCActorMng.cs

示例6: Parse

        public bool Parse(string strData, out NFGUID id)
        {
            NFGUID xId = new NFGUID();
            id = xId;

            string[] strList = strData.Split('-');
            if (strList.Count() != 2)
            {
                return false;
            }

            Int64 nHead = 0;
            if (!Int64.TryParse(strList[0], out nHead))
            {
                return false;
            }

            Int64 nData = 0;
            if (!Int64.TryParse(strList[1], out nData))
            {
                return false;
            }

            id.nHead64 = nHead;
            id.nData64 = nData;

            return true;
        }
开发者ID:ketoo,项目名称:NoahGameFrame,代码行数:28,代码来源:NFGUID.cs

示例7: NFCHeartBeat

 public NFCHeartBeat(NFGUID self, string strHeartBeatName, float fTime, int nCount)
 {
     mSelf = self;
     mstrHeartBeatName = strHeartBeatName;
     mfTime = fTime;
     mfOldTime = fTime;
     mnCount = nCount;
 }
开发者ID:ketoo,项目名称:NFrame,代码行数:8,代码来源:NFCHeartBeat.cs

示例8: PBToNF

        static public NFrame.NFGUID PBToNF(NFMsg.Ident xID)
        {
            NFrame.NFGUID xIdent = new NFrame.NFGUID();
            xIdent.nHead64 = xID.svrid;
            xIdent.nData64 = xID.index;

            return xIdent;
        }
开发者ID:ketoo,项目名称:NoahGameFrame,代码行数:8,代码来源:NFCoreExListener.cs

示例9: HeartBeatEventHandler

 static void HeartBeatEventHandler(NFGUID self, string strHeartBeat, float fTime,int nCount)
 {
     Debug.Log(self);
     Debug.Log(" ");
     Debug.Log(strHeartBeat);
     Debug.Log(" ");
     Debug.Log(fTime.ToString());
     Debug.Log(" ");
 }
开发者ID:ketoo,项目名称:NoahGameFrame,代码行数:9,代码来源:MainExU3D.cs

示例10: HeartBeatEventHandler

 static void HeartBeatEventHandler(NFGUID self, string strHeartBeat, float fTime, int nRemainCount)
 {
     Console.Write(self);
     Console.Write(" ");
     Console.Write(strHeartBeat);
     Console.Write(" ");
     Console.Write(fTime.ToString());
     Console.WriteLine(" ");
 }
开发者ID:ketoo,项目名称:NoahGameFrame,代码行数:9,代码来源:MainEx.cs

示例11: NFCObject

		public NFCObject(NFGUID self, int nContainerID, int nGroupID, string strClassName, string strConfigIndex)
		{
			mSelf = self;
            mstrClassName = strClassName;
            mstrConfigIndex = strConfigIndex;
			mnContainerID = nContainerID;
			mnGroupID = nGroupID;
			Init();
		}
开发者ID:ketoo,项目名称:NoahGameFrame,代码行数:9,代码来源:NFCObject.cs

示例12: Set

            public bool Set(NFGUID value)
            {
                if (nType == VARIANT_TYPE.VTYPE_OBJECT)
                {
                    mData = value;
                    return true;
                }

                return false;
            }
开发者ID:ketoo,项目名称:NoahGameFrame,代码行数:10,代码来源:NFIDataList.cs

示例13: OnClassHandler

 static void OnClassHandler(NFGUID self, int nContainerID, int nGroupID, NFIObject.CLASS_EVENT_TYPE eType, string strClassName, string strConfigIndex)
 {
     Debug.Log(self);
     Debug.Log(" ");
     Debug.Log(eType.ToString());
     Debug.Log(" ");
     Debug.Log(strClassName);
     Debug.Log(" ");
     Debug.Log(strConfigIndex);
     Debug.Log(" ");
 }
开发者ID:ketoo,项目名称:NoahGameFrame,代码行数:11,代码来源:MainExU3D.cs

示例14: OnPropertydHandler

        static void OnPropertydHandler(NFGUID self, string strProperty, NFIDataList.TData oldVar, NFIDataList.TData newVar)
		{
            Debug.Log(self);
            Debug.Log(" ");
            Debug.Log(strProperty);
            Debug.Log(" ");
            Debug.Log(oldVar.IntVal());
            Debug.Log(" ");
            Debug.Log(newVar.IntVal());
            Debug.Log(" ");
		}
开发者ID:ketoo,项目名称:NoahGameFrame,代码行数:11,代码来源:MainExU3D.cs

示例15: OnClassHandler

 static void OnClassHandler(NFGUID self, int nContainerID, int nGroupID, NFIObject.CLASS_EVENT_TYPE eType, string strClassName, string strConfigIndex)
 {
     Console.Write(self);
     Console.Write(" ");
     Console.Write(eType.ToString());
     Console.Write(" ");
     Console.Write(strClassName);
     Console.Write(" ");
     Console.Write(strConfigIndex);
     Console.WriteLine(" ");
 }
开发者ID:ketoo,项目名称:NoahGameFrame,代码行数:11,代码来源:MainEx.cs


注:本文中的NFrame.NFGUID类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。