| | |
| | | public static void Init()
|
| | | {
|
| | | // 登记相应的数据体及对应的数据转逻辑类
|
| | | Register(typeof(HB106_tagMCNotifyPlayerMove), typeof(DTCB106_tagMCNotifyPlayerMove));
|
| | | Register(typeof(H0132_tagCreateRoleSucess), typeof(DTC0132_tagCreateRoleSucess));
|
| | | Register(typeof(HA326_tagMCNPCIDCollectionCntInfo), typeof(DTCA326_tagMCNPCIDCollectionCntInfo));
|
| | | Register(typeof(HA904_tagGCDogzNPCRefreshTime), typeof(DTCA904_tagGCDogzNPCRefreshTime));
|
| New file |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: 第二世界 |
| | | // [ Date ]: Wednesday, September 26, 2018 |
| | | //-------------------------------------------------------- |
| | | using UnityEngine; |
| | | |
| | | public class DTCB106_tagMCNotifyPlayerMove : DtcBasic |
| | | { |
| | | |
| | | public override void Done(GameNetPackBasic vNetPack) |
| | | { |
| | | base.Done(vNetPack); |
| | | var package = vNetPack as HB106_tagMCNotifyPlayerMove; |
| | | |
| | | MapTransferUtility.Instance.Clear(); |
| | | |
| | | Vector3 _pos = new Vector3((package.PosX - GA_Hero.MapOffset.x) * .5f, 0, (package.PosY - GA_Hero.MapOffset.z) * .5f); |
| | | PlayerDatas.Instance.hero.MoveToPosition(_pos); |
| | | |
| | | if (package.NPCID != 0) |
| | | { |
| | | MapTransferUtility.Instance.MapTransferDoType = MapTransferUtility.E_MapTransferDoType.Npc; |
| | | MapTransferUtility.Instance.NpcID = (int)package.NPCID; |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 3826652b2693c1a4aba8f48340defea8 |
| | | timeCreated: 1537926963 |
| | | licenseType: Free |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | using UnityEngine; |
| | | using System.Collections; |
| | | |
| | | // B1 06 通知玩家向目标点移动 #tagMCNotifyPlayerMove |
| | | |
| | | public class HB106_tagMCNotifyPlayerMove : GameNetPackBasic { |
| | | public uint PosX; |
| | | public uint PosY; |
| | | public uint NPCID; //目标点寻路NPCID, 可能为0 |
| | | |
| | | public HB106_tagMCNotifyPlayerMove () { |
| | | _cmd = (ushort)0xB106; |
| | | } |
| | | |
| | | public override void ReadFromBytes (byte[] vBytes) { |
| | | TransBytes (out PosX, vBytes, NetDataType.DWORD); |
| | | TransBytes (out PosY, vBytes, NetDataType.DWORD); |
| | | TransBytes (out NPCID, vBytes, NetDataType.DWORD); |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: fc7982354b8dd52459548536ebb5977d |
| | | timeCreated: 1537926821 |
| | | licenseType: Free |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| | |
| | | #region npc
|
| | | public int NpcID
|
| | | {
|
| | | get; private set;
|
| | | get; set;
|
| | | }
|
| | | #endregion
|
| | |
|