當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。