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);
        }
    }
Example #2
0
 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(" ");
 }
Example #3
0
 public void AddDel(NFIObject.ClassEventHandler handler)
 {
     if (!mhtHandleDelList.ContainsKey(handler))
     {
         mhtHandleDelList.Add(handler, handler.ToString());
         mHandleDel += handler;
     }
 }
Example #4
0
        public override void RegisterClassCallBack(string strClassName, NFIObject.ClassEventHandler handler)
        {
            if(mhtClassHandleDel.ContainsKey(strClassName))
            {
                ClassHandleDel xHandleDel = (ClassHandleDel)mhtClassHandleDel[strClassName];
                xHandleDel.AddDel(handler);

            }
            else
            {
                ClassHandleDel xHandleDel = new ClassHandleDel();
                xHandleDel.AddDel(handler);
                mhtClassHandleDel[strClassName] = xHandleDel;
            }
        }
Example #5
0
 static void OnClassHandler(NFIDENTID 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(" ");
 }
Example #6
0
 public abstract void RegisterClassCallBack(string strClassName, NFIObject.ClassEventHandler handler);