本文整理汇总了C#中NFCoreEx.NFIDENTID类的典型用法代码示例。如果您正苦于以下问题:C# NFIDENTID类的具体用法?C# NFIDENTID怎么用?C# NFIDENTID使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
NFIDENTID类属于NFCoreEx命名空间,在下文中一共展示了NFIDENTID类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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
示例16: OnGUI
public void OnGUI(NFIKernel kernel, int nHeight, int nWidth)
{
if (buttonLeft == null)
{
buttonLeft = GUI.skin.button;
buttonLeft.alignment = TextAnchor.MiddleLeft;
}
int nElementWidth = 150;
int nElementHeight = 20;
GUI.color = Color.red;
strInfo = GUI.TextField(new Rect(0, nHeight - 20, nElementWidth * 3f + 120, 20), strInfo);
strCommand = GUI.TextField(new Rect(nElementWidth * 3f + 120, nHeight - 20, 350, 20), strCommand);
if (GUI.Button(new Rect(nWidth - 100, nHeight - 20, 100, 20), "cmd"))
{
}
GUI.color = Color.white;
NFIDataList objectList = kernel.GetObjectList();
scrollPositionFirst = GUI.BeginScrollView(new Rect(0, nElementHeight, nElementWidth / 2 + 20, nHeight), scrollPositionFirst, new Rect(0, 0, nElementWidth, objectList.Count() * (nElementHeight)));
//all object
for (int i = 0; i < objectList.Count(); i++)
{
NFIDENTID ident = objectList.ObjectVal(i);
if (GUI.Button(new Rect(0, i * nElementHeight, nElementWidth, nElementHeight), ident.nHead64.ToString() + "_" + ident.nData64.ToString()))
{
xTargetIdent = ident;
strTableName = "";
}
}
GUI.EndScrollView();
////////////////
if(!xTargetIdent.IsNull())
{
NFIObject go = kernel.GetObject(xTargetIdent);
NFIDataList recordLlist = go.GetRecordManager().GetRecordList();
NFIDataList propertyList = go.GetPropertyManager().GetPropertyList();
int nAllElement = 1;
for(int j = 0; j < recordLlist.Count(); j++)
{
string strRecordName = recordLlist.StringVal(j);
if(strRecordName.Length > 0)
{
nAllElement++;
}
}
for(int j = 0; j < propertyList.Count(); j++)
{
string strPropertyName = propertyList.StringVal(j);
if(strPropertyName.Length > 0)
{
nAllElement++;
}
}
//////////////////
scrollPositionSecond = GUI.BeginScrollView(new Rect(nElementWidth / 2 + 20, nElementHeight, nElementWidth+20, nHeight/2), scrollPositionSecond, new Rect(0, 0, nElementWidth, (nAllElement+1) * (nElementHeight) + 1));
int nElementIndex = 0;
GUI.Button(new Rect(0, nElementIndex*nElementHeight, nElementWidth, nElementHeight), xTargetIdent.nData64.ToString());
nElementIndex++;
//all record
for(int j = 0; j < recordLlist.Count(); j++)
{
string strRecordName = recordLlist.StringVal(j);
if(strRecordName.Length > 0)
{
if(GUI.Button(new Rect(0, nElementIndex*nElementHeight, nElementWidth, nElementHeight), "++" + strRecordName))
{
strTableName = strRecordName;
}
nElementIndex++;
}
}
///////////////////////////////
//all property
for (int k = 0; k < propertyList.Count(); k++)
{
string strPropertyValue = null;
string strPropertyName = propertyList.StringVal(k);
NFIProperty property = go.GetPropertyManager().GetProperty(strPropertyName);
NFIDataList.VARIANT_TYPE eType = property.GetType();
switch (eType)
{
//.........这里部分代码省略.........
开发者ID:idleness,项目名称:NoahGameFrame,代码行数:101,代码来源:NFObjectElement.cs
示例17: OnRecordEventHandler
static void OnRecordEventHandler(NFIDENTID self, string strRecordName, NFIRecord.eRecordOptype eType, int nRow, int nCol, NFIDataList oldVar, NFIDataList 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(0));
Console.Write(" ");
Console.Write(newVar.IntVal(0));
Console.WriteLine(" ");
}
开发者ID:joyfish,项目名称:NoahGameFrame,代码行数:17,代码来源:MainEx.cs
示例18: CreateObject
public override NFIObject CreateObject(NFIDENTID self, int nContainerID, int nGroupID, string strClassName, string strConfigIndex, NFIDataList arg)
{
if (!mhtObject.ContainsKey(self))
{
NFIObject xNewObject = new NFCObject(self, nContainerID, nGroupID, strClassName, strConfigIndex);
mhtObject.Add(self, xNewObject);
NFCDataList varConfigID = new NFCDataList();
varConfigID.AddString(strConfigIndex);
xNewObject.GetPropertyManager().AddProperty("ConfigID", varConfigID);
NFCDataList varConfigClass = new NFCDataList();
varConfigClass.AddString(strClassName);
xNewObject.GetPropertyManager().AddProperty("ClassName", varConfigClass);
if (arg.Count() % 2 == 0)
{
for (int i = 0; i < arg.Count() - 1; i += 2)
{
string strPropertyName = arg.StringVal(i);
NFIDataList.VARIANT_TYPE eType = arg.GetType(i + 1);
switch (eType)
{
case NFIDataList.VARIANT_TYPE.VTYPE_INT:
{
NFIDataList xDataList = new NFCDataList();
xDataList.AddInt(arg.IntVal(i+1));
xNewObject.GetPropertyManager().AddProperty(strPropertyName, xDataList);
}
break;
case NFIDataList.VARIANT_TYPE.VTYPE_FLOAT:
{
NFIDataList xDataList = new NFCDataList();
xDataList.AddFloat(arg.FloatVal(i + 1));
xNewObject.GetPropertyManager().AddProperty(strPropertyName, xDataList);
}
break;
case NFIDataList.VARIANT_TYPE.VTYPE_DOUBLE:
{
NFIDataList xDataList = new NFCDataList();
xDataList.AddDouble(arg.DoubleVal(i + 1));
xNewObject.GetPropertyManager().AddProperty(strPropertyName, xDataList);
}
break;
case NFIDataList.VARIANT_TYPE.VTYPE_STRING:
{
NFIDataList xDataList = new NFCDataList();
xDataList.AddString(arg.StringVal(i + 1));
xNewObject.GetPropertyManager().AddProperty(strPropertyName, xDataList);
}
break;
case NFIDataList.VARIANT_TYPE.VTYPE_OBJECT:
{
NFIDataList xDataList = new NFCDataList();
xDataList.AddObject(arg.ObjectVal(i + 1));
xNewObject.GetPropertyManager().AddProperty(strPropertyName, xDataList);
}
break;
default:
break;
}
}
}
InitProperty(self, strClassName);
InitRecord(self, strClassName);
ClassHandleDel xHandleDel = (ClassHandleDel)mhtClassHandleDel[strClassName];
if (null != xHandleDel && null != xHandleDel.GetHandler())
{
NFIObject.ClassEventHandler xHandlerList = xHandleDel.GetHandler();
xHandlerList(self, nContainerID, nGroupID, NFIObject.CLASS_EVENT_TYPE.OBJECT_CREATE, strClassName, strConfigIndex);
xHandlerList(self, nContainerID, nGroupID, NFIObject.CLASS_EVENT_TYPE.OBJECT_LOADDATA, strClassName, strConfigIndex);
xHandlerList(self, nContainerID, nGroupID, NFIObject.CLASS_EVENT_TYPE.OBJECT_CREATE_FINISH, strClassName, strConfigIndex);
}
return xNewObject;
}
return null;
}
开发者ID:joyfish,项目名称:NoahGameFrame,代码行数:80,代码来源:NFCKernel.cs
示例19: InitRecord
void InitRecord(NFIDENTID self, string strClassName)
{
NFILogicClass xLogicClass = NFCLogicClassManager.Instance.GetElement(strClassName);
NFIDataList xDataList = xLogicClass.GetRecordManager().GetRecordList();
for (int i = 0; i < xDataList.Count(); ++i)
{
string strRecordyName = xDataList.StringVal(i);
NFIRecord xRecord = xLogicClass.GetRecordManager().GetRecord(strRecordyName);
NFIObject xObject = GetObject(self);
NFIRecordManager xRecordManager = xObject.GetRecordManager();
xRecordManager.AddRecord(strRecordyName, xRecord.GetRows(), xRecord.GetColsData());
}
}
开发者ID:joyfish,项目名称:NoahGameFrame,代码行数:15,代码来源:NFCKernel.cs
示例20: InitProperty
void InitProperty(NFIDENTID self, string strClassName)
{
NFILogicClass xLogicClass = NFCLogicClassManager.Instance.GetElement(strClassName);
NFIDataList xDataList = xLogicClass.GetPropertyManager().GetPropertyList();
for (int i = 0; i < xDataList.Count(); ++i )
{
string strPropertyName = xDataList.StringVal(i);
NFIProperty xProperty = xLogicClass.GetPropertyManager().GetProperty(strPropertyName);
NFIObject xObject = GetObject(self);
NFIPropertyManager xPropertyManager = xObject.GetPropertyManager();
xPropertyManager.AddProperty(strPropertyName, xProperty.GetValue());
}
}
开发者ID:joyfish,项目名称:NoahGameFrame,代码行数:15,代码来源:NFCKernel.cs
注:本文中的NFCoreEx.NFIDENTID类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论