當前位置: 首頁>>代碼示例>>C#>>正文


C# NFCoreEx.NFIDENTID類代碼示例

本文整理匯總了C#中NFCoreEx.NFIDENTID的典型用法代碼示例。如果您正苦於以下問題:C# NFIDENTID類的具體用法?C# NFIDENTID怎麽用?C# NFIDENTID使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


NFIDENTID類屬於NFCoreEx命名空間,在下文中一共展示了NFIDENTID類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: NFCRecord

 public NFCRecord(NFIDENTID self, string strRecordName, int nRow, NFIDataList varData)
 {
     mSelf = self;
     mnRow = nRow;
     mstrRecordName = strRecordName;
     mVarRecordType = new NFCDataList(varData);
 }
開發者ID:joyfish,項目名稱:NoahGameFrame,代碼行數:7,代碼來源:NFCRecord.cs

示例2: Parse

        public bool Parse(string strData, out NFIDENTID id)
        {
            NFIDENTID xId = new NFIDENTID();
            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:idleness,項目名稱:NoahGameFrame,代碼行數:28,代碼來源:NFIdentID.cs

示例3: OnClassNPCEventHandler

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

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

            //CreateObject(self, strPrefabPath, vec, strClassName);
        }
        else if (eType == NFIObject.CLASS_EVENT_TYPE.OBJECT_DESTROY)
        {
            //DestroyObject(self);
        }
    }
開發者ID:joyfish,項目名稱:NoahGameFrame,代碼行數:27,代碼來源:NFCRenderInterface.cs

示例4: NFCHeartBeat

 public NFCHeartBeat(NFIDENTID self, string strHeartBeatName, float fTime, NFIDataList valueList)
 {
     mSelf = self;
     mstrHeartBeatName = strHeartBeatName;
     mfTime = fTime;
     mfOldTime = fTime;
     mArgValueList = valueList;
 }
開發者ID:cbbbc,項目名稱:NoahGameFrame,代碼行數:8,代碼來源:NFCHeartBeat.cs

示例5: PBToNF

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

            return xIdent;
        }
開發者ID:joyfish,項目名稱:NoahGameFrame,代碼行數:8,代碼來源:NFCoreExListener.cs

示例6: NFCObject

 public NFCObject(NFIDENTID self, int nContainerID, int nGroupID, string strClassName, string strConfigIndex)
 {
     mSelf = self;
     mstrClassName = strClassName;
     mstrConfigIndex = strConfigIndex;
     mnContainerID = nContainerID;
     mnGroupID = nGroupID;
     Init();
 }
開發者ID:joyfish,項目名稱:NoahGameFrame,代碼行數:9,代碼來源:NFCObject.cs

示例7: AddHeartBeat

 public override bool AddHeartBeat(NFIDENTID self, string strHeartBeatName, NFIHeartBeat.HeartBeatEventHandler handler, float fTime, NFIDataList valueList)
 {
     NFIObject xGameObject = GetObject(self);
     if (null != xGameObject)
     {
         xGameObject.GetHeartBeatManager().AddHeartBeat(strHeartBeatName, fTime, handler, valueList);
     }
     return true;
 }
開發者ID:joyfish,項目名稱:NoahGameFrame,代碼行數:9,代碼來源:NFCKernel.cs

示例8: OnPropertydHandler

 static void OnPropertydHandler(NFIDENTID self, string strProperty, NFIDataList oldVar, NFIDataList newVar)
 {
     Console.Write(self);
     Console.Write(" ");
     Console.Write(strProperty);
     Console.Write(" ");
     Console.Write(oldVar.IntVal(0));
     Console.Write(" ");
     Console.Write(newVar.IntVal(0));
     Console.WriteLine(" ");
 }
開發者ID:joyfish,項目名稱:NoahGameFrame,代碼行數:11,代碼來源:MainEx.cs

示例9: Main

        public static void Main()
        {
            NFIKernel kernel = new NFCKernel();

            Console.WriteLine("****************NFIDataList******************");

            NFIDataList var = new NFCDataList();

            for (int i = 0; i < 9; i +=3)
            {
                var.AddInt(i);
                var.AddFloat((float)i+1);
                var.AddString((i+2).ToString());
            }

            for (int i = 0; i < 9; i += 3)
            {
                Int64 n = var.IntVal(i);
                float f = var.FloatVal(i+1);
                string str = var.StringVal(i+2);
                Console.WriteLine(n);
                Console.WriteLine(f);
                Console.WriteLine(str);
            }

            Console.WriteLine("***************NFProperty*******************");

            NFIDENTID ident = new NFIDENTID(0, 1);
            NFIObject gameObject = kernel.CreateObject(ident, 0, 0, "", "", new NFCDataList());

            NFIDataList valueProperty = new NFCDataList();
            valueProperty.AddInt(112221);
            gameObject.GetPropertyManager().AddProperty("111", valueProperty);
            Console.WriteLine(gameObject.QueryPropertyInt("111"));

            Console.WriteLine("***************NFRecord*******************");

            NFIDataList valueRecord = new NFCDataList();
            valueRecord.AddInt(0);
            valueRecord.AddFloat(0);
            valueRecord.AddString("");
            valueRecord.AddObject(ident);

            gameObject.GetRecordManager().AddRecord("testRecord", 10, valueRecord);

            kernel.SetRecordInt(ident, "testRecord", 0, 0, 112221);
            kernel.SetRecordFloat(ident, "testRecord", 0, 1, 1122210.0f);
            kernel.SetRecordString(ident, "testRecord", 0, 2, ";;;;;;112221");
            kernel.SetRecordObject(ident, "testRecord", 0, 3, ident);

            Console.WriteLine(gameObject.QueryRecordInt("testRecord", 0,0));
            Console.WriteLine(gameObject.QueryRecordFloat("testRecord", 0, 1));
            Console.WriteLine(gameObject.QueryRecordString("testRecord", 0, 2));
            Console.WriteLine(gameObject.QueryRecordObject("testRecord", 0, 3));

            Console.WriteLine(" ");
            Console.WriteLine("***************PropertyNFEvent*******************");

            //掛屬性回調,掛表回調
            kernel.RegisterPropertyCallback(ident, "111", OnPropertydHandler);
            kernel.SetPropertyInt(ident, "111", 2456);

            Console.WriteLine(" ");
            Console.WriteLine("***************RecordNFEvent*******************");

            kernel.RegisterRecordCallback(ident, "testRecord", OnRecordEventHandler);
            kernel.SetRecordInt(ident, "testRecord", 0, 0, 1111111);

            Console.WriteLine(" ");
            Console.WriteLine("***************ClassNFEvent*******************");

            kernel.RegisterClassCallBack("CLASSAAAAA", OnClassHandler);
            kernel.CreateObject(new NFIDENTID(0, 2), 0, 0, "CLASSAAAAA", "CONFIGINDEX", new NFCDataList());
            kernel.DestroyObject(new NFIDENTID(0, 2));

            Console.WriteLine(" ");
            Console.WriteLine("***************NFHeartBeat*******************");
            kernel.AddHeartBeat(new NFIDENTID(0, 1), "TestHeartBeat", HeartBeatEventHandler, 5.0f, new NFCDataList());

            while (true)
            {
                System.Threading.Thread.Sleep(1000);
                kernel.UpDate(1.0f);
            }
        }
開發者ID:joyfish,項目名稱:NoahGameFrame,代碼行數:85,代碼來源:MainEx.cs

示例10: OnClassHandler

 static void OnClassHandler(NFIDENTID 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:joyfish,項目名稱:NoahGameFrame,代碼行數:11,代碼來源:MainEx.cs

示例11: SetObject

 public abstract bool SetObject(int nRow, int nCol, NFIDENTID value);
開發者ID:cbbbc,項目名稱:NoahGameFrame,代碼行數:1,代碼來源:NFIRecord.cs

示例12: RemoveHeartBeat

 public override bool RemoveHeartBeat(NFIDENTID self, string strHeartBeatName)
 {
     return true;
 }
開發者ID:joyfish,項目名稱:NoahGameFrame,代碼行數:4,代碼來源:NFCKernel.cs

示例13: SetPropertyString

        public override bool SetPropertyString(NFIDENTID self, string strPropertyName, string strValue)
        {
            if (mhtObject.ContainsKey(self))
            {
                NFIObject xGameObject = (NFIObject)mhtObject[self];
                return xGameObject.SetPropertyString(strPropertyName, strValue);
            }

            return false;
        }
開發者ID:joyfish,項目名稱:NoahGameFrame,代碼行數:10,代碼來源:NFCKernel.cs

示例14: AddObject

        public override bool AddObject(NFIDENTID value)
        {
            Var_Data data = new Var_Data();
            data.nType = VARIANT_TYPE.VTYPE_OBJECT;
            data.mData = value;

            return AddDataObject(ref data);
        }
開發者ID:huimiao638,項目名稱:NoahGameFrame,代碼行數:8,代碼來源:NFCDataList.cs

示例15: SetRecordString

        public override bool SetRecordString(NFIDENTID self, string strRecordName, int nRow, int nCol, string strValue)
        {
            if (mhtObject.ContainsKey(self))
            {
                NFIObject xGameObject = (NFIObject)mhtObject[self];
                return xGameObject.SetRecordString(strRecordName, nRow, nCol, strValue);
            }

            return false;
        }
開發者ID:joyfish,項目名稱:NoahGameFrame,代碼行數:10,代碼來源:NFCKernel.cs


注:本文中的NFCoreEx.NFIDENTID類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。