本文整理汇总了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);
}
}
示例2: NFCRecord
public NFCRecord(NFGUID self, string strRecordName, int nRow, NFIDataList varData)
{
mSelf = self;
mnRow = nRow;
mstrRecordName = strRecordName;
mVarRecordType = new NFCDataList(varData);
}
示例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;
}
}
示例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);
}
}
}
}
示例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;
}
示例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;
}
示例7: NFCHeartBeat
public NFCHeartBeat(NFGUID self, string strHeartBeatName, float fTime, int nCount)
{
mSelf = self;
mstrHeartBeatName = strHeartBeatName;
mfTime = fTime;
mfOldTime = fTime;
mnCount = nCount;
}
示例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;
}
示例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(" ");
}
示例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(" ");
}
示例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();
}
示例12: Set
public bool Set(NFGUID value)
{
if (nType == VARIANT_TYPE.VTYPE_OBJECT)
{
mData = value;
return true;
}
return false;
}
示例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(" ");
}
示例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(" ");
}
示例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(" ");
}