• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# NFrame.NFGUID类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: OnPropertydHandler

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


示例17: DoEvent

 public override void DoEvent(NFGUID self, int nEventID, NFIDataList valueList)
 {
     Dictionary<int, NFIEvent> xData = mhtEvent[self];
     if (null != xData)
     {
         if (xData.ContainsKey(nEventID))
         {
             NFIEvent identEvent = (NFIEvent)xData[nEventID];
             identEvent.DoEvent(valueList);
         }
     }
 }
开发者ID:ketoo,项目名称:NFrame,代码行数:12,代码来源:NFCEventModule.cs


示例18: OnRecordEventHandler

        static void OnRecordEventHandler(NFGUID self, string strRecordName, NFIRecord.eRecordOptype eType, int nRow, int nCol, NFIDataList.TData oldVar, NFIDataList.TData newVar)
		{
            Console.Write(self);
            Console.Write(" ");
            Console.Write(strRecordName);
            Console.Write(" ");
            Console.Write(eType.ToString());
            Console.Write(" ");
            Console.Write(nRow);
            Console.Write(" ");
            Console.Write(nCol);
            Console.Write(" ");
            Console.Write(oldVar.IntVal());
            Console.Write(" ");
            Console.Write(oldVar.IntVal());
            Console.WriteLine(" ");
		}
开发者ID:ketoo,项目名称:NoahGameFrame,代码行数:17,代码来源:MainEx.cs


示例19: OnRecordEventHandler

        static void OnRecordEventHandler(NFGUID self, string strRecordName, NFIRecord.eRecordOptype eType, int nRow, int nCol, NFIDataList.TData oldVar, NFIDataList.TData newVar)
		{
            Debug.Log(self);
            Debug.Log(" ");
            Debug.Log(strRecordName);
            Debug.Log(" ");
            Debug.Log(eType.ToString());
            Debug.Log(" ");
            Debug.Log(nRow);
            Debug.Log(" ");
            Debug.Log(nCol);
            Debug.Log(" ");
            Debug.Log(oldVar.IntVal());
            Debug.Log(" ");
            Debug.Log(newVar.IntVal());
            Debug.Log(" ");
		}
开发者ID:ketoo,项目名称:NoahGameFrame,代码行数:17,代码来源:MainExU3D.cs


示例20: OnPropertyHandler

        public void OnPropertyHandler(NFGUID self, string strPropertyName, NFIDataList.TData oldVar, NFIDataList.TData newVar)
        {
            NFIObject xObject = NFCKernelModule.Instance.GetObject(self);
            NFIProperty xProperty = xObject.GetPropertyManager().GetProperty(strPropertyName);
            if (!xProperty.GetUpload())
            {
                return;
            }

            switch (oldVar.GetType())
            {
                case NFIDataList.VARIANT_TYPE.VTYPE_INT:
                    {
                        NFStart.Instance.GetFocusSender().RequirePropertyInt(self, strPropertyName, newVar);
                    }
                    break;
                case NFIDataList.VARIANT_TYPE.VTYPE_FLOAT:
                    {
                        NFStart.Instance.GetFocusSender().RequirePropertyFloat(self, strPropertyName, newVar);
                    }
                    break;
                case NFIDataList.VARIANT_TYPE.VTYPE_STRING:
                    {
                        NFStart.Instance.GetFocusSender().RequirePropertyString(self, strPropertyName, newVar);
                    }
                    break;
                case NFIDataList.VARIANT_TYPE.VTYPE_OBJECT:
                    {
                        NFStart.Instance.GetFocusSender().RequirePropertyObject(self, strPropertyName, newVar);
                    }
                    break;
                case NFIDataList.VARIANT_TYPE.VTYPE_VECTOR2:
                    {
                        NFStart.Instance.GetFocusSender().RequirePropertyVector2(self, strPropertyName, newVar);
                    }
                    break;
                case NFIDataList.VARIANT_TYPE.VTYPE_VECTOR3:
                    {
                        NFStart.Instance.GetFocusSender().RequirePropertyVector3(self, strPropertyName, newVar);
                    }
                    break;
            }

        }
开发者ID:ketoo,项目名称:NoahGameFrame,代码行数:44,代码来源:NFCUploadModule.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Searcher.EmployeeSearcher类代码示例发布时间:2022-05-26
下一篇:
C# Common.UserModel类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap