当前位置: 首页>>代码示例>>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;未经允许,请勿转载。