【称号时装坐骑】初提

dev_chengFeng
zhangqiang 2021-03-26 20:06:08 +08:00
parent d00236d6d0
commit 095701c33f
28 changed files with 541 additions and 428 deletions

View File

@ -91,6 +91,17 @@ TextureImporter:
allowsAlphaSplitting: 0
overridden: 1
androidETC2FallbackOverride: 0
- serializedVersion: 2
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
spriteSheet:
serializedVersion: 2
sprites: []

View File

@ -91,6 +91,17 @@ TextureImporter:
allowsAlphaSplitting: 0
overridden: 1
androidETC2FallbackOverride: 0
- serializedVersion: 2
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
spriteSheet:
serializedVersion: 2
sprites: []

View File

@ -91,6 +91,17 @@ TextureImporter:
allowsAlphaSplitting: 0
overridden: 1
androidETC2FallbackOverride: 0
- serializedVersion: 2
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
spriteSheet:
serializedVersion: 2
sprites: []

View File

@ -1,6 +1,6 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &7721468065601089189
--- !u!1 &1773938178805642000
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
@ -8,23 +8,23 @@ GameObject:
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 4464239834348640749}
- component: {fileID: 2643560322446384109}
- component: {fileID: 8466920518216357046}
- component: {fileID: 6932949317651037597}
- component: {fileID: 7371842824170146327}
- component: {fileID: 8973778804028359391}
m_Layer: 0
m_Name: live2d_npc_map
m_Name: npc_map
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &4464239834348640749
--- !u!224 &6932949317651037597
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7721468065601089189}
m_GameObject: {fileID: 1773938178805642000}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
@ -37,21 +37,21 @@ RectTransform:
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 100, y: 100}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &2643560322446384109
--- !u!222 &7371842824170146327
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7721468065601089189}
m_GameObject: {fileID: 1773938178805642000}
m_CullTransparentMesh: 0
--- !u!114 &8466920518216357046
--- !u!114 &8973778804028359391
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7721468065601089189}
m_GameObject: {fileID: 1773938178805642000}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: d85b887af7e6c3f45a2e2d2920d641bc, type: 3}

View File

@ -1,7 +1,7 @@
fileFormatVersion: 2
guid: b072ad6019c2b7a4fa299aa712edc127
guid: a83b259ad6308c0438fc673d4b5c849a
PrefabImporter:
externalObjects: {}
userData:
assetBundleName: lz4/prefabs/live2d/live2d_npc_map
assetBundleVariant: unity3d
assetBundleName:
assetBundleVariant:

View File

@ -1,6 +1,6 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &6215064165438005737
--- !u!1 &1491821065408660376
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
@ -8,23 +8,23 @@ GameObject:
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 747127079216296264}
- component: {fileID: 7703660334273445023}
- component: {fileID: 7396289312394494236}
m_Layer: 0
- component: {fileID: 6099875916605848844}
- component: {fileID: 7771554262164715917}
- component: {fileID: 7038560494115443806}
m_Layer: 5
m_Name: live2d_npc_map_nv
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &747127079216296264
--- !u!224 &6099875916605848844
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6215064165438005737}
m_GameObject: {fileID: 1491821065408660376}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
@ -37,21 +37,21 @@ RectTransform:
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 100, y: 100}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &7703660334273445023
--- !u!222 &7771554262164715917
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6215064165438005737}
m_GameObject: {fileID: 1491821065408660376}
m_CullTransparentMesh: 0
--- !u!114 &7396289312394494236
--- !u!114 &7038560494115443806
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6215064165438005737}
m_GameObject: {fileID: 1491821065408660376}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: d85b887af7e6c3f45a2e2d2920d641bc, type: 3}

View File

@ -1,7 +1,7 @@
fileFormatVersion: 2
guid: 73a03ed5703faef438a01fb6dbc12c47
guid: fc6dea0abfced404c95b37a30c6ddfb1
PrefabImporter:
externalObjects: {}
userData:
assetBundleName: lz4/prefabs/live2d/live2d_npc_map_nv
assetBundleVariant: unity3d
assetBundleName:
assetBundleVariant:

View File

@ -1,85 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &7721468065601089189
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 4464239834348640749}
- component: {fileID: 2643560322446384109}
- component: {fileID: 8466920518216357046}
m_Layer: 0
m_Name: liveAnim_npc_map
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &4464239834348640749
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7721468065601089189}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 100, y: 100}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &2643560322446384109
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7721468065601089189}
m_CullTransparentMesh: 0
--- !u!114 &8466920518216357046
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7721468065601089189}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: d85b887af7e6c3f45a2e2d2920d641bc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 2100000, guid: b66cf7a186d13054989b33a5c90044e4, type: 2}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
skeletonDataAsset: {fileID: 11400000, guid: df18fda9517bbe149807dd2370a5ec52, type: 2}
initialSkinName: default
initialFlipX: 0
initialFlipY: 0
startingAnimation: idle
startingLoop: 1
timeScale: 1
freeze: 0
unscaledTime: 0
meshGenerator:
settings:
useClipping: 1
zSpacing: 0
pmaVertexColors: 1
tintBlack: 0
calculateTangents: 0
addNormals: 0
immutableTriangles: 0

View File

@ -1,7 +0,0 @@
fileFormatVersion: 2
guid: b2e8b5aa17585764686d8cdc14734344
PrefabImporter:
externalObjects: {}
userData:
assetBundleName: lz4/prefabs/live2d/liveanim_npc_map
assetBundleVariant: unity3d

View File

@ -1,85 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &6215064165438005737
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 747127079216296264}
- component: {fileID: 7703660334273445023}
- component: {fileID: 7396289312394494236}
m_Layer: 0
m_Name: liveAnim_npc_map_nv
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &747127079216296264
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6215064165438005737}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 100, y: 100}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &7703660334273445023
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6215064165438005737}
m_CullTransparentMesh: 0
--- !u!114 &7396289312394494236
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6215064165438005737}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: d85b887af7e6c3f45a2e2d2920d641bc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 2100000, guid: b66cf7a186d13054989b33a5c90044e4, type: 2}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
skeletonDataAsset: {fileID: 11400000, guid: 797d02381f7ed57458ebbceefb9aa0c6, type: 2}
initialSkinName: default
initialFlipX: 0
initialFlipY: 0
startingAnimation: idle
startingLoop: 1
timeScale: 1
freeze: 0
unscaledTime: 0
meshGenerator:
settings:
useClipping: 1
zSpacing: 0
pmaVertexColors: 1
tintBlack: 0
calculateTangents: 0
addNormals: 0
immutableTriangles: 0

View File

@ -1,7 +0,0 @@
fileFormatVersion: 2
guid: fcb70f688759d324ab67dece6d4fd848
PrefabImporter:
externalObjects: {}
userData:
assetBundleName: lz4/prefabs/live2d/liveanim_npc_map_nv
assetBundleVariant: unity3d

View File

@ -54,7 +54,7 @@ MonoBehaviour:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1694397743547520}
m_Enabled: 1
m_Enabled: 0
m_EditorHideFlags: 0
m_Script: {fileID: 1392445389, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
@ -96,7 +96,7 @@ MonoBehaviour:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1694397743547520}
m_Enabled: 1
m_Enabled: 0
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: e459a084d8e15a240b58db751097122b, type: 3}
m_Name:
@ -136,8 +136,8 @@ RectTransform:
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 1055590887172563160}
- {fileID: 764014018822863512}
- {fileID: 1055590887172563160}
- {fileID: 7815803941768187495}
m_Father: {fileID: 224440747589353134}
m_RootOrder: 0
@ -145,7 +145,7 @@ RectTransform:
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 100, y: 100}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!1 &3373279371152457450
GameObject:
@ -175,12 +175,12 @@ RectTransform:
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 6716452405183363615}
m_RootOrder: 1
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 100, y: 100}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!1 &3474375057190085441
GameObject:
@ -215,7 +215,7 @@ RectTransform:
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0.00000333786, y: 0.00000012945384}
m_SizeDelta: {x: 100, y: 100}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!1 &3978225281938535133
GameObject:
@ -245,10 +245,10 @@ RectTransform:
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 6716452405183363615}
m_RootOrder: 0
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 100, y: 100}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}

View File

@ -4,5 +4,5 @@ folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName: lz4/spine/npc_map
assetBundleVariant: unity3d
assetBundleName:
assetBundleVariant:

Binary file not shown.

Before

Width:  |  Height:  |  Size: 495 KiB

After

Width:  |  Height:  |  Size: 495 KiB

View File

@ -75,7 +75,7 @@ TextureImporter:
outline: []
physicsShape: []
bones: []
spriteID: 6f853aa905276d7498b9bf9d6ef6fb4f
spriteID: f6e2b2a19ecab4744a8febeb409e6e9a
vertices: []
indices:
edges: []

View File

@ -2278,4 +2278,60 @@ EquipPositionIcon = {
[4] = "r_hero_zhuangbeiguanlikuang_04_zh",
[5] = "b_baowuxitong_hunbao_zh",
[6] = "b_baowuxitong_linbao_zh"
}
}
-- 设置角色行走方向
-- WALK_DIR = {
-- IDLE_FRONT = {animation = "idle2", y = 0},
-- IDLE_BACK = {animation = "idle3", y = 0},
-- IDLE_RIGHT = {animation = "idle1", y = 0},
-- IDLE_LEFT = {animation = "idle2", y = 0},
-- RUN_RIGHT = {animation = "run1", y = 180},
-- RUN_LEFT = {animation = "run1", y = 0},
-- RUN_UP = {animation = "run3", y = 0},
-- RUN_DOWN = {animation = "run2", y = 0},
-- }
WALK_DIR = {
IDLE_FRONT = 1,-- 站立_向前
IDLE_BACK = 2,-- 站立_向后
IDLE_LEFT = 3,-- 站立_向左
IDLE_RIGHT = 4,-- 站立_向右
RUN_RIGHT = 5,-- 跑_向右
RUN_LEFT = 6,-- 跑_向左
RUN_UP = 7,-- 跑_向上
RUN_DOWN = 8,-- 跑_向下
JINGYA = 9,--惊讶
LAUCH = 10,--发射
TOUCH = 11,--轻按
}
PLAYER_WALK_DIR = {
--没有坐骑的时候
IDLE = {animation = "idle", y = 0},
IDLEBACK = {animation = "idle", y = 180},
JINGYA = {animation = "jingya", y = 0},
LAUCH = {animation = "lauch", y = 0},
TOUCH = {animation = "touch", y = 0},
RIGHT = {animation = "move2", y = 0},
LEFT = {animation = "move2", y = 180},
UP = {animation = "move3", y = 0},
DOWN = {animation = "move", y = 0},
--有坐骑的时候
IDLE_FRONT = {animation = "ride_idle2", y = 0},
IDLE_BACK = {animation = "ride_idle3", y = 180},
IDLE_RIGHT = {animation = "ride_idle1", y = 180},
IDLE_LEFT = {animation = "ride_idle1", y = 0},
RUN_RIGHT = {animation = "ride_move1", y = 180},
RUN_LEFT = {animation = "ride_move1", y = 0},
RUN_UP = {animation = "ride_move3", y = 0},
RUN_DOWN = {animation = "ride_move2", y = 0},
}
-- 设置角色行走方向
RIDE_WALK_DIR = {
IDLE_FRONT = {animation = "idle2", y = 0},
IDLE_BACK = {animation = "idle3", y = 0},
IDLE_RIGHT = {animation = "idle1", y = 0},
IDLE_LEFT = {animation = "idle2", y = 0},
RUN_RIGHT = {animation = "run1", y = 180},
RUN_LEFT = {animation = "run1", y = 0},
RUN_UP = {animation = "run3", y = 0},
RUN_DOWN = {animation = "run2", y = 0},
}

View File

@ -285,6 +285,9 @@ FRIEND_ISAPPLYED_FIELD = protobuf.FieldDescriptor();
FRIEND_HEAD_FIELD = protobuf.FieldDescriptor();
FRIEND_FRAME_FIELD = protobuf.FieldDescriptor();
FRIEND_SOULVAL_FIELD = protobuf.FieldDescriptor();
FRIEND_USERSKIN_FIELD = protobuf.FieldDescriptor();
FRIEND_USERTITLE_FIELD = protobuf.FieldDescriptor();
FRIEND_USERMOUNT_FIELD = protobuf.FieldDescriptor();
GIFTGOODSINFO = protobuf.Descriptor();
GIFTGOODSINFO_GOODSID_FIELD = protobuf.FieldDescriptor();
GIFTGOODSINFO_BUYTIMES_FIELD = protobuf.FieldDescriptor();
@ -3328,11 +3331,41 @@ FRIEND_SOULVAL_FIELD.default_value = 0
FRIEND_SOULVAL_FIELD.type = 5
FRIEND_SOULVAL_FIELD.cpp_type = 1
FRIEND_USERSKIN_FIELD.name = "userSkin"
FRIEND_USERSKIN_FIELD.full_name = ".rpc.protocols.Friend.userSkin"
FRIEND_USERSKIN_FIELD.number = 15
FRIEND_USERSKIN_FIELD.index = 10
FRIEND_USERSKIN_FIELD.label = 1
FRIEND_USERSKIN_FIELD.has_default_value = false
FRIEND_USERSKIN_FIELD.default_value = 0
FRIEND_USERSKIN_FIELD.type = 5
FRIEND_USERSKIN_FIELD.cpp_type = 1
FRIEND_USERTITLE_FIELD.name = "userTitle"
FRIEND_USERTITLE_FIELD.full_name = ".rpc.protocols.Friend.userTitle"
FRIEND_USERTITLE_FIELD.number = 16
FRIEND_USERTITLE_FIELD.index = 11
FRIEND_USERTITLE_FIELD.label = 1
FRIEND_USERTITLE_FIELD.has_default_value = false
FRIEND_USERTITLE_FIELD.default_value = 0
FRIEND_USERTITLE_FIELD.type = 5
FRIEND_USERTITLE_FIELD.cpp_type = 1
FRIEND_USERMOUNT_FIELD.name = "userMount"
FRIEND_USERMOUNT_FIELD.full_name = ".rpc.protocols.Friend.userMount"
FRIEND_USERMOUNT_FIELD.number = 17
FRIEND_USERMOUNT_FIELD.index = 12
FRIEND_USERMOUNT_FIELD.label = 1
FRIEND_USERMOUNT_FIELD.has_default_value = false
FRIEND_USERMOUNT_FIELD.default_value = 0
FRIEND_USERMOUNT_FIELD.type = 5
FRIEND_USERMOUNT_FIELD.cpp_type = 1
FRIEND.name = "Friend"
FRIEND.full_name = ".rpc.protocols.Friend"
FRIEND.nested_types = {}
FRIEND.enum_types = {}
FRIEND.fields = {FRIEND_ID_FIELD, FRIEND_NAME_FIELD, FRIEND_LV_FIELD, FRIEND_OFFLINETIME_FIELD, FRIEND_HAVEREWARD_FIELD, FRIEND_ISGIVE_FIELD, FRIEND_ISAPPLYED_FIELD, FRIEND_HEAD_FIELD, FRIEND_FRAME_FIELD, FRIEND_SOULVAL_FIELD}
FRIEND.fields = {FRIEND_ID_FIELD, FRIEND_NAME_FIELD, FRIEND_LV_FIELD, FRIEND_OFFLINETIME_FIELD, FRIEND_HAVEREWARD_FIELD, FRIEND_ISGIVE_FIELD, FRIEND_ISAPPLYED_FIELD, FRIEND_HEAD_FIELD, FRIEND_FRAME_FIELD, FRIEND_SOULVAL_FIELD, FRIEND_USERSKIN_FIELD, FRIEND_USERTITLE_FIELD, FRIEND_USERMOUNT_FIELD}
FRIEND.is_extendable = false
FRIEND.extensions = {}
GIFTGOODSINFO_GOODSID_FIELD.name = "goodsId"

View File

@ -24,6 +24,9 @@ FAMILYUSERINFO_GUILDHELPTIME_FIELD = protobuf.FieldDescriptor();
FAMILYUSERINFO_ISTAKEGUILDHELPREWARD_FIELD = protobuf.FieldDescriptor();
FAMILYUSERINFO_GUILDHELPINFO_FIELD = protobuf.FieldDescriptor();
FAMILYUSERINFO_LASTHELPSENDTIME_FIELD = protobuf.FieldDescriptor();
FAMILYUSERINFO_USERSKIN_FIELD = protobuf.FieldDescriptor();
FAMILYUSERINFO_USERTITLE_FIELD = protobuf.FieldDescriptor();
FAMILYUSERINFO_USERMOUNT_FIELD = protobuf.FieldDescriptor();
CARDELAYPROGRESSINDICATION = protobuf.Descriptor();
CARDELAYPROGRESSINDICATION_PROGRESS_FIELD = protobuf.FieldDescriptor();
CARDELAYPROGRESSINDICATION_ENDTIME_FIELD = protobuf.FieldDescriptor();
@ -550,11 +553,41 @@ FAMILYUSERINFO_LASTHELPSENDTIME_FIELD.default_value = 0
FAMILYUSERINFO_LASTHELPSENDTIME_FIELD.type = 5
FAMILYUSERINFO_LASTHELPSENDTIME_FIELD.cpp_type = 1
FAMILYUSERINFO_USERSKIN_FIELD.name = "userSkin"
FAMILYUSERINFO_USERSKIN_FIELD.full_name = ".rpc.protocols.FamilyUserInfo.userSkin"
FAMILYUSERINFO_USERSKIN_FIELD.number = 20
FAMILYUSERINFO_USERSKIN_FIELD.index = 19
FAMILYUSERINFO_USERSKIN_FIELD.label = 1
FAMILYUSERINFO_USERSKIN_FIELD.has_default_value = false
FAMILYUSERINFO_USERSKIN_FIELD.default_value = 0
FAMILYUSERINFO_USERSKIN_FIELD.type = 5
FAMILYUSERINFO_USERSKIN_FIELD.cpp_type = 1
FAMILYUSERINFO_USERTITLE_FIELD.name = "userTitle"
FAMILYUSERINFO_USERTITLE_FIELD.full_name = ".rpc.protocols.FamilyUserInfo.userTitle"
FAMILYUSERINFO_USERTITLE_FIELD.number = 21
FAMILYUSERINFO_USERTITLE_FIELD.index = 20
FAMILYUSERINFO_USERTITLE_FIELD.label = 1
FAMILYUSERINFO_USERTITLE_FIELD.has_default_value = false
FAMILYUSERINFO_USERTITLE_FIELD.default_value = 0
FAMILYUSERINFO_USERTITLE_FIELD.type = 5
FAMILYUSERINFO_USERTITLE_FIELD.cpp_type = 1
FAMILYUSERINFO_USERMOUNT_FIELD.name = "userMount"
FAMILYUSERINFO_USERMOUNT_FIELD.full_name = ".rpc.protocols.FamilyUserInfo.userMount"
FAMILYUSERINFO_USERMOUNT_FIELD.number = 22
FAMILYUSERINFO_USERMOUNT_FIELD.index = 21
FAMILYUSERINFO_USERMOUNT_FIELD.label = 1
FAMILYUSERINFO_USERMOUNT_FIELD.has_default_value = false
FAMILYUSERINFO_USERMOUNT_FIELD.default_value = 0
FAMILYUSERINFO_USERMOUNT_FIELD.type = 5
FAMILYUSERINFO_USERMOUNT_FIELD.cpp_type = 1
FAMILYUSERINFO.name = "FamilyUserInfo"
FAMILYUSERINFO.full_name = ".rpc.protocols.FamilyUserInfo"
FAMILYUSERINFO.nested_types = {}
FAMILYUSERINFO.enum_types = {}
FAMILYUSERINFO.fields = {FAMILYUSERINFO_ROLEUID_FIELD, FAMILYUSERINFO_USERNAME_FIELD, FAMILYUSERINFO_USERLEVEL_FIELD, FAMILYUSERINFO_POSITION_FIELD, FAMILYUSERINFO_CONTRIBUTE_FIELD, FAMILYUSERINFO_SECONDS_FIELD, FAMILYUSERINFO_CONTRIBUTETODAY_FIELD, FAMILYUSERINFO_SOULFORCE_FIELD, FAMILYUSERINFO_HEAD_FIELD, FAMILYUSERINFO_FRAME_FIELD, FAMILYUSERINFO_MAXBOSSHURT_FIELD, FAMILYUSERINFO_LASTHURT_FIELD, FAMILYUSERINFO_TAKEFETEREWARD_FIELD, FAMILYUSERINFO_LASTFETEGUILDID_FIELD, FAMILYUSERINFO_LASTFETETYPE_FIELD, FAMILYUSERINFO_GUILDHELPTIME_FIELD, FAMILYUSERINFO_ISTAKEGUILDHELPREWARD_FIELD, FAMILYUSERINFO_GUILDHELPINFO_FIELD, FAMILYUSERINFO_LASTHELPSENDTIME_FIELD}
FAMILYUSERINFO.fields = {FAMILYUSERINFO_ROLEUID_FIELD, FAMILYUSERINFO_USERNAME_FIELD, FAMILYUSERINFO_USERLEVEL_FIELD, FAMILYUSERINFO_POSITION_FIELD, FAMILYUSERINFO_CONTRIBUTE_FIELD, FAMILYUSERINFO_SECONDS_FIELD, FAMILYUSERINFO_CONTRIBUTETODAY_FIELD, FAMILYUSERINFO_SOULFORCE_FIELD, FAMILYUSERINFO_HEAD_FIELD, FAMILYUSERINFO_FRAME_FIELD, FAMILYUSERINFO_MAXBOSSHURT_FIELD, FAMILYUSERINFO_LASTHURT_FIELD, FAMILYUSERINFO_TAKEFETEREWARD_FIELD, FAMILYUSERINFO_LASTFETEGUILDID_FIELD, FAMILYUSERINFO_LASTFETETYPE_FIELD, FAMILYUSERINFO_GUILDHELPTIME_FIELD, FAMILYUSERINFO_ISTAKEGUILDHELPREWARD_FIELD, FAMILYUSERINFO_GUILDHELPINFO_FIELD, FAMILYUSERINFO_LASTHELPSENDTIME_FIELD, FAMILYUSERINFO_USERSKIN_FIELD, FAMILYUSERINFO_USERTITLE_FIELD, FAMILYUSERINFO_USERMOUNT_FIELD}
FAMILYUSERINFO.is_extendable = false
FAMILYUSERINFO.extensions = {}
CARDELAYPROGRESSINDICATION_PROGRESS_FIELD.name = "progress"

View File

@ -73,8 +73,8 @@ local startUV = {
local maxIcon = 9
-- NPC
local roleRootPath = "UI_effect_DiTu_huoguang"
local npc1 = "live2d_npc_map"
local npc2 = "live2d_npc_map_nv"
-- local npc1 = "live2d_npc_map"
-- local npc2 = "live2d_npc_map_nv"
local npc, scale
local testAnims = {
"jingya",
@ -92,12 +92,12 @@ local m_orginLayer
-- 角色停止行走时的朝向, 上 下 左 右1 2 3 4
local m_faceDir = 0
-- 设置角色行走方向
local WALK_DIR = {
RIGHT = {animation = "move2", y = 0},
LEFT = {animation = "move2", y = 180},
UP = {animation = "move3", y = 0},
DOWN = {animation = "move", y = 0},
}
-- local WALK_DIR = {
-- RIGHT = {animation = "move2", y = 0},
-- LEFT = {animation = "move2", y = 180},
-- UP = {animation = "move3", y = 0},
-- DOWN = {animation = "move", y = 0},
-- }
-- 宝箱特效的位置
local boxEffectPos = {
[1] = Vector3.New(44, 140, 0),
@ -107,7 +107,7 @@ local boxEffectPos = {
local m_roleFaceDir = Vector2.New(-1, 0)
local SkeletonGraphic
-- local SkeletonGraphic
------------- 关卡地图的相关设置 -----------------
-- 地图的显示初始位置
@ -128,7 +128,8 @@ this.buffTipList = {}
local hitCallBack = function ()
this.targetTimer = nil
this.BattleEnd() -- 战斗结束
SkeletonGraphic.AnimationState:SetAnimation(0, "idle", true)
-- SkeletonGraphic.AnimationState:SetAnimation(0, "idle", true)
this.NpcGO:SetWalkDir(WALK_DIR.IDLE_FRONT)
this.targetTimer = Timer.New(function () -- 延迟生成下一个小怪
if not isPanelClose then
this.LoadPointIcon(math.random(1, maxIcon), false)
@ -287,18 +288,22 @@ function this.LoadRole(u, v)
this.role.transform.localPosition = Vector3(v3.x, v3.y, v3.z - 10)
this.role.transform.localScale = Vector3.one * 1.5
npc = NameManager.roleSex == ROLE_SEX.BOY and npc1 or npc2
scale = NameManager.roleSex == ROLE_SEX.BOY and 1 or 0.5
this.NpcGO = poolManager:LoadLive(npc, Util.GetTransform(this.role, "root/ui/roleRoot"), Vector3.one * scale, Vector3.zero)
-- npc = NameManager.roleSex == ROLE_SEX.BOY and npc1 or npc2
-- scale = NameManager.roleSex == ROLE_SEX.BOY and 1 or 0.5
-- this.NpcGO = poolManager:LoadLive(npc, Util.GetTransform(this.role, "root/ui/roleRoot"), Vector3.one * scale, Vector3.zero)
-- this.NpcGO.name = "npc"
this.NpcGO = PlayerLiveView:New(Util.GetTransform(this.role, "root/ui/roleRoot"),1, nil)
this.NpcGO:OnOpen()
this.NpcGO.name = "npc"
this.NpcGO.leader.transform.localScale = Vector3.New(100,100,100)
this.roleCurPos = TileMapView.GetMapData():GetMapData(u, v)
this.roleRoot = Util.GetGameObject(this.role, "root/ui/roleRoot")
SkeletonGraphic = Util.GetGameObject(this.role, "root/ui/roleRoot/npc"):GetComponent("SkeletonGraphic")
-- SkeletonGraphic = Util.GetGameObject(this.role, "root/ui/roleRoot/npc"):GetComponent("SkeletonGraphic")
SkeletonGraphic.AnimationState:SetAnimation(0, "lauch", false)
SkeletonGraphic.transform.localEulerAngles = Vector3.zero
-- SkeletonGraphic.AnimationState:SetAnimation(0, "lauch", false)
this.NpcGO:SetWalkDir(WALK_DIR.LAUCH)
-- SkeletonGraphic.transform.localEulerAngles = Vector3.zero
this.bLeaderIsIdle = true
this.battleEffect = Util.GetGameObject(this.role, "root/ui/quickBattleEffect")
@ -533,23 +538,24 @@ function this.SetRoleDirAction(u, v, isBack)
local dV = isBack and this.roleCurPos.v - v or v - this.roleCurPos.v
if dU > 0 then
this.SetWalkDir(WALK_DIR.RIGHT)
this.SetWalkDir(WALK_DIR.RUN_RIGHT)
elseif dU < 0 then
this.SetWalkDir(WALK_DIR.LEFT)
this.SetWalkDir(WALK_DIR.RUN_LEFT)
elseif dV < 0 then
this.SetWalkDir(WALK_DIR.UP)
this.SetWalkDir(WALK_DIR.RUN_UP)
elseif dV > 0 then
this.SetWalkDir(WALK_DIR.DOWN)
this.SetWalkDir(WALK_DIR.RUN_DOWN)
end
end
function this.SetWalkDir(dir)
if not curDir or curDir ~= dir then
curDir = dir
SkeletonGraphic.transform.localEulerAngles = Vector3.New(0, dir.y, 0)
SkeletonGraphic.AnimationState:SetAnimation(0, dir.animation, true)
end
this.NpcGO:SetWalkDir(dir)
-- if not curDir or curDir ~= dir then
-- curDir = dir
-- SkeletonGraphic.transform.localEulerAngles = Vector3.New(0, dir.y, 0)
-- SkeletonGraphic.AnimationState:SetAnimation(0, dir.animation, true)
-- end
end
-- 角色停止行走时的朝向
@ -584,8 +590,9 @@ end
function this.PlayerIdle()
this.bLeaderIsIdle = true
if SkeletonGraphic and SkeletonGraphic.AnimationState then
SkeletonGraphic.AnimationState:SetAnimation(0, "idle", true)
SkeletonGraphic.transform.localEulerAngles = Vector3.zero
-- SkeletonGraphic.AnimationState:SetAnimation(0, "idle", true)
-- SkeletonGraphic.transform.localEulerAngles = Vector3.zero
this.NpcGO:SetWalkDir(WALK_DIR.IDLE_FRONT)
end
curDir = nil
end
@ -666,7 +673,9 @@ function this.NotBattleShow()
end, 0.5)
this.targetTimer:Start()
-- 随意一个动画
SkeletonGraphic.AnimationState:SetAnimation(0, testAnims[math.random(1, 3)], false)
-- SkeletonGraphic.AnimationState:SetAnimation(0, testAnims[math.random(1, 3)], false)
local randomNum = math.random(9, 11)
this.NpcGO:SetWalkDir(randomNum)
end
end, 1)
this.battleTimer:Start()
@ -678,29 +687,34 @@ function this.SetIconShow(iconType)
local point = this.iconList[selectPointPos]
if iconType == 8 or iconType == 11 then -- 宝箱
SkeletonGraphic.AnimationState:SetAnimation(0, "jingya", false)
-- SkeletonGraphic.AnimationState:SetAnimation(0, "jingya", false)
this.NpcGO:SetWalkDir(WALK_DIR.JINGYA)
iconAction.public_MeGetBaby(iconType, m_faceDir, point, function ()
this.NotBattleShow()
end)
elseif iconType == 7 then -- NPC, 不一样的BB
SkeletonGraphic.AnimationState:SetAnimation(0, "jingya", false)
-- SkeletonGraphic.AnimationState:SetAnimation(0, "jingya", false)
this.NpcGO:SetWalkDir(WALK_DIR.JINGYA)
iconAction.public_MeetYourGrandPa(iconType, m_faceDir, point, function ()
this.NotBattleShow()
end)
elseif iconType == 3 then -- 回血buff
SkeletonGraphic.AnimationState:SetAnimation(0, "jingya", false)
-- SkeletonGraphic.AnimationState:SetAnimation(0, "jingya", false)
this.NpcGO:SetWalkDir(WALK_DIR.JINGYA)
iconAction.public_EndDialogue()
iconAction.public_GiveMeMilk(iconType, point, m_faceDir, selectPointPos, function ()
this.NotBattleShow()
end)
elseif iconType == 14 then -- 攻击buff
SkeletonGraphic.AnimationState:SetAnimation(0, "jingya", false)
-- SkeletonGraphic.AnimationState:SetAnimation(0, "jingya", false)
this.NpcGO:SetWalkDir(WALK_DIR.JINGYA)
iconAction.public_GetBuff(iconType, function ()
this.NotBattleShow()
end)
elseif iconType == 15 then -- 防御buff
SkeletonGraphic.AnimationState:SetAnimation(0, "jingya", false)
-- SkeletonGraphic.AnimationState:SetAnimation(0, "jingya", false)
this.NpcGO:SetWalkDir(WALK_DIR.JINGYA)
iconAction.public_GetBuff(iconType, function ()
this.NotBattleShow()
end)
@ -859,7 +873,8 @@ end
function this.StopAction()
callList:Clear()
FightPointPassManager.isBeginFight = true
SkeletonGraphic.AnimationState:SetAnimation(0, "idle", true)
-- SkeletonGraphic.AnimationState:SetAnimation(0, "idle", true)
this.NpcGO:SetWalkDir(WALK_DIR.IDLE_FRONT)
this.moneyEffect:SetActive(false)
this.hitEffect:SetActive(false)
iconAction.public_HideEffect()
@ -877,7 +892,8 @@ function this.OnGameOver()
Log("注销一次地图资源")
poolManager:UnLoadAsset(mapCtrl, this.mapRoot, PoolManager.AssetType.GameObject)
poolManager:UnLoadAsset(roleRootPath, this.role, PoolManager.AssetType.GameObject)
poolManager:UnLoadAsset(npc, this.NpcGO, PoolManager.AssetType.GameObject)
-- poolManager:UnLoadAsset(npc, this.NpcGO, PoolManager.AssetType.GameObject)
this.NpcGO:OnClose()
poolManager:UnLoadAsset(effectPath, this.moneyEffect, PoolManager.AssetType.GameObject)
UIManager.camera.clearFlags = CameraClearFlags.Skybox
TileMapView.Exit()

View File

@ -302,15 +302,15 @@ function this:BindEvent()
-- view:SetAutoMove()
-- end
curNPCList = {}
PlayerManager.GetMainPlayerNPCData(function(NPCList)
for i = 1, #NPCList do
local view = MainPlayerView.New(false, this.btnClickMove, rect, Vector2.New(math.random(rect.xMin, rect.xMax), math.random(rect.yMin, rect.yMax)),NPCList[i].sex)
view.NameText.text = NPCList[i].userName or NPCList[i].name
view:SetAutoMove()
view.leader.transform.name = "MainPlayerView"..i
table.insert(curNPCList,view)
end
end)
-- PlayerManager.GetMainPlayerNPCData(function(NPCList)
-- for i = 1, #NPCList do
-- local view = MainPlayerView.New(false, this.btnClickMove, rect, Vector2.New(math.random(rect.xMin, rect.xMax), math.random(rect.yMin, rect.yMax)),NPCList[i].sex)
-- view.NameText.text = NPCList[i].userName or NPCList[i].name
-- view:SetAutoMove()
-- view.leader.transform.name = "MainPlayerView"..i
-- table.insert(curNPCList,view)
-- end
-- end)
self.playerView = MainPlayerView.New(true, this.btnClickMove, rect, Vector2.New(-1210, 0))
table.insert(curNPCList,self.playerView)
--角色点击行走

View File

@ -2,8 +2,10 @@
MainPlayerView.__index = MainPlayerView
local mapNpcOp = "UI_MainPlayer"
require("View/PlayerLiveView")
function MainPlayerView.New(isSelf, root, rect, pos,_sex)
local instance = {}
local instance
instance = {}
setmetatable(instance, MainPlayerView)
instance.isSelf = isSelf
@ -21,37 +23,23 @@ function MainPlayerView.New(isSelf, root, rect, pos,_sex)
Util.GetGameObject(instance.leader, "name/text"):SetActive(true)
Util.GetGameObject(instance.leader, "name/text2"):SetActive(false)
sex = NameManager.roleSex
-- instance.NpcGO = PlayerLiveView:New(instance.roleRootTran,1, nil)
else
instance.NameText = Util.GetGameObject(instance.leader, "name/text2"):GetComponent("Text")
Util.GetGameObject(instance.leader, "name/text"):SetActive(false)
Util.GetGameObject(instance.leader, "name/text2"):SetActive(true)
sex = _sex or math.random(0,1)
local PlayerLiveViewData = {
skin = 80012,
}
-- instance.NpcGO = PlayerLiveView:New(instance.roleRootTran,2, PlayerLiveViewData)
end
instance.NpcGO = PlayerLiveView:New(instance.roleRootTran,1, nil)
instance.NpcGO:OnOpen()
instance.NameText.text = PlayerManager.nickName
npc = ConfigManager.GetConfigDataByKey(ConfigName.PlayerRole, "Role", sex).LiveAnimName
scale = sex == ROLE_SEX.BOY and 4 or 2
instance.NpcGO = poolManager:LoadAsset(npc, PoolManager.AssetType.GameObject)
if not instance.NpcGO then
LogRed("npc:"..npc.."资源不存在")
else
instance.NpcGO:SetActive(true)
instance.NpcGO.transform:SetParent(instance.roleRootTran)
instance.NpcGO.transform.localPosition = Vector3.zero
instance.NpcGO.transform.localScale = Vector3.one * 0.00375 * scale
instance.NpcGO.name = "npc"
instance.SkeletonGraphic = instance.NpcGO:GetComponent("SkeletonGraphic")
instance.SkeletonGraphic.AnimationState:SetAnimation(0, "idle", true)
instance.SkeletonGraphic.transform.localEulerAngles = Vector3.zero
end
instance.rect = rect
instance.leader:GetComponent("RectTransform").anchoredPosition = pos
instance.lastPos = pos
instance:SetRolePosZ(pos)
instance:AddListener()
@ -70,17 +58,6 @@ end
-- 点击角色
function MainPlayerView:OnClick()
end
-- 设置角色行走方向
local WALK_DIR = {
RIGHT = {animation = "move2", y = 0},
LEFT = {animation = "move2", y = 180},
UP = {animation = "move3", y = 0},
DOWN = {animation = "move", y = 0},
}
function MainPlayerView:SetAutoMove()
if self.isSelf then return end
local x = math.random(self.rect.xMin, self.rect.xMax)
@ -98,8 +75,9 @@ end
function MainPlayerView:SetWalkDir(dir)
if not self.curDir or self.curDir ~= dir then
self.curDir = dir
self.SkeletonGraphic.transform.localEulerAngles = Vector3.New(0, dir.y, 0)
self.SkeletonGraphic.AnimationState:SetAnimation(0, dir.animation, true)
-- self.SkeletonGraphic.transform.localEulerAngles = Vector3.New(0, dir.y, 0)
-- self.SkeletonGraphic.AnimationState:SetAnimation(0, dir.animation, true)
self.NpcGO:SetWalkDir(dir)
end
end
@ -136,23 +114,24 @@ function MainPlayerView:SetRolePos(pos, delay, func)
end):OnStart(function ()
if math.abs(dX) >= math.abs(dY) then
if dX > 0 then
self:SetWalkDir(WALK_DIR.RIGHT)
self:SetWalkDir(WALK_DIR.RUN_RIGHT)
else
self:SetWalkDir(WALK_DIR.LEFT)
self:SetWalkDir(WALK_DIR.RUN_LEFT)
end
else
if dY > 0 then
self:SetWalkDir(WALK_DIR.UP)
self:SetWalkDir(WALK_DIR.RUN_UP)
else
self:SetWalkDir(WALK_DIR.DOWN)
self:SetWalkDir(WALK_DIR.RUN_DOWN)
end
end
end)
end
function MainPlayerView:PlayerIdle()
self.SkeletonGraphic.AnimationState:SetAnimation(0, "idle", true)
self.SkeletonGraphic.transform.localEulerAngles = Vector3.zero
-- self.SkeletonGraphic.AnimationState:SetAnimation(0, "idle", true)
-- self.SkeletonGraphic.transform.localEulerAngles = Vector3.zero
self:SetWalkDir(WALK_DIR.IDLE_FRONT)
self.curDir = nil
end

View File

@ -115,6 +115,7 @@ function this.PlayerInfoRequest(func)
PlayerManager.userCreateTime = msg.userCreateTime
PatFaceManager.SetisFirstLogVal(msg.isDayFirst)
SoulPrintManager.soulEquipPool = msg.SoulEquipPool
LogBlue("msg.player.designation "..msg.player.designation.." msg.player.decrotion "..msg.player.decrotion.." msg.player.ride "..msg.player.ride)
PlayerManager.designation = msg.player.designation--称号
PlayerManager.skin = msg.player.decrotion--皮肤
PlayerManager.ride = msg.player.ride--坐骑
@ -222,7 +223,7 @@ function this.PlayerInfoRequest(func)
QinglongSerectTreasureManager.SetLevel(msg.treasureLevel)
QinglongSerectTreasureManager.SetTreasureBuyStatus(msg.hadBuyTreasure)
PlayerManager.RefreshWorldLeveData(msg.worldLeve)
-- PlayerManager.InitSkinTitleMountData(msg.userSkinList,msg.userTitleList,msg.userMountList)
PlayerManager.InitSkinTitleMountData(msg.userSkinList,msg.userTitleList,msg.userMountList)
if func then
func(msg)
end

View File

@ -339,6 +339,7 @@ end
--初始化所以激活的称号 时装 坐骑
function this.InitSkinTitleMountData(userSkinList,userTitleList,userMountList)
this.userSkinList = {}--[id] = {skinId , overTime}
LogBlue("#userSkinList "..#userSkinList.." #userTitleList "..#userTitleList.." #userMountList "..#userMountList)
for i = 1, #userSkinList do
local singData = {}
singData.skinId = userSkinList[i].skinId
@ -480,16 +481,18 @@ function this.CalculatePlayerDcorateProAddVal()
table.insert(allActiveConfig,PlayerHeadIcon)
end
end
for i = 1, #allActiveConfig do
for j = 1, #allPlayerUpConfig[i].UnlockProperty do
local curAddProInfo = allPlayerUpConfig[i].UnlockProperty[j]
if addAllProVal[curAddProInfo[1]] then
addAllProVal[curAddProInfo[1]] = addAllProVal[curAddProInfo[1]] + curAddProInfo[2]
else
addAllProVal[curAddProInfo[1]] = curAddProInfo[2]
end
end
end
-- for i = 1, #allActiveConfig do
-- if allPlayerUpConfig[i].UnlockProperty then
-- for j = 1, #allPlayerUpConfig[i].UnlockProperty do
-- local curAddProInfo = allPlayerUpConfig[i].UnlockProperty[j]
-- if addAllProVal[curAddProInfo[1]] then
-- addAllProVal[curAddProInfo[1]] = addAllProVal[curAddProInfo[1]] + curAddProInfo[2]
-- else
-- addAllProVal[curAddProInfo[1]] = curAddProInfo[2]
-- end
-- end
-- end
-- end
return addAllProVal
end
-----------------------------------玩家坐骑 皮肤 称号结束
@ -568,8 +571,8 @@ function this.StopBattleUpLvTipTime()
end
------- 主城NPC 选择star ----------
local needNum = 7
local needAllNum = 14
local needNum = 3--7
local needAllNum = 6--14
local rankNPCList = {}
local friendNPCList = {}
function this.GetMainPlayerNPCData(fun)

View File

@ -6,9 +6,9 @@ local funIndex = 1
local TabBox = require("Modules/Common/TabBox")
local _TabData={
[1] = { default = "r_hero_xuanze_002", select = "r_hero_xuanze_001", name = "信息" },
[2] = { default = "r_hero_xuanze_002", select = "r_hero_xuanze_001", name = "称号" },
[3] = { default = "r_hero_xuanze_002", select = "r_hero_xuanze_001", name = "时装" },
[4] = { default = "r_hero_xuanze_002", select = "r_hero_xuanze_001", name = "皮肤" },
-- [2] = { default = "r_hero_xuanze_002", select = "r_hero_xuanze_001", name = "称号" },
[2] = { default = "r_hero_xuanze_002", select = "r_hero_xuanze_001", name = "坐骑" },
-- [4] = { default = "r_hero_xuanze_002", select = "r_hero_xuanze_001", name = "时装" },
}
local _TabFontColor = { default = Color.New(130 / 255, 128 / 255, 120 / 255, 1),
select = Color.New(243 / 255, 235 / 255, 202 / 255, 1)}
@ -17,11 +17,11 @@ this.contents = {
--信息
[1] = {view = require("Modules/Setting/SettingInfo"), panelName = "settingInfo"},
--称号
[2] = {view = require("Modules/Setting/SettingPlayerTitle"), panelName = "settingPlayerTitle"},
-- [2] = {view = require("Modules/Setting/SettingPlayerTitle"), panelName = "settingPlayerTitle"},
--时装
[3] = {view = require("Modules/Setting/SettingPlayerRide"), panelName = "settingPlayerRide"},
[2] = {view = require("Modules/Setting/SettingPlayerRide"), panelName = "settingPlayerRide"},
--坐骑
[4] = {view = require("Modules/Setting/SettingPlayerSkin"), panelName = "settingPlayerSkin"},
-- [4] = {view = require("Modules/Setting/SettingPlayerSkin"), panelName = "settingPlayerSkin"},
}
--子模块预设
this.prefabs={}

View File

@ -10,11 +10,17 @@ function SettingPlayerRide:ctor(mainPanel, gameObject)
end
--初始化组件(用于子类重写)
function SettingPlayerRide:InitComponent(gameObject)
this.goToBtn = Util.GetGameObject(gameObject, "goToBtn")
end
--绑定事件(用于子类重写)
function SettingPlayerRide:BindEvent()
Util.AddClick(this.goToBtn, function()
NetManager.ActiveUserMountRequest(80008,function()
LogBlue("骑上金牛")
PlayerManager.SetPlayerRide(80008)
end)
end)
end
--添加事件监听(用于子类重写)

View File

@ -10,7 +10,7 @@ local this = SettingPlayerSkin
-- local parentGo = nil
-- local skinLive
-- local skinLiveStr
-- local playerLiveView--view
local playerLiveView--view
-- local posAddIndex = 0
-- local posJianIndex = 0
-- local curIndex = 0
@ -26,7 +26,7 @@ end
function SettingPlayerSkin:InitComponent(gameObject)
-- parentGo = gameObject
-- this.live2dRootParent = Util.GetGameObject(gameObject, "live2dRootParent")
this.live2dRootParent = Util.GetGameObject(gameObject, "live2dRootParent")
-- this.live2dRootParent2 = Util.GetGameObject(gameObject, "live2dRootParent2")
-- this.name = Util.GetGameObject(gameObject, "name/Text"):GetComponent("Text")
-- this.getInfo = Util.GetGameObject(gameObject, "skinProInfo/getInfo"):GetComponent("Text")
@ -127,10 +127,10 @@ function SettingPlayerSkin:OnShow()
-- this.OnShowAllSkinGrid()
-- posAddIndex = #playerSkinConFig
-- posJianIndex = 1
-- if playerLiveView == nil then
-- playerLiveView = SubUIManager.Open(SubUIConfig.PlayerLiveView, this.live2dRootParent.transform)
-- end
-- playerLiveView:OnOpen()
if playerLiveView == nil then
playerLiveView = SubUIManager.Open(SubUIConfig.PlayerLiveView, this.live2dRootParent.transform)
end
playerLiveView:OnOpen()
end
--坐骑属性展示
function this.OnShowCurSkinProData(skinId)

View File

@ -1,38 +1,67 @@
PlayerLiveView = {}
local this=PlayerLiveView
--立绘对象
local rideLive
local playerLive
local titleLive
--立绘资源名字
local rideLiveStr = ""
local playerLiveStr = ""
local titleLiveStr = ""
--立绘动画控制
local rideLivSkeletonGraphic
local playerLiveSkeletonGraphic
local titleLiveSkeletonGraphic
-- 设置角色行走方向
local WALK_DIR = {
RIGHT = {animation = "move2", y = 0},
LEFT = {animation = "move2", y = 180},
UP = {animation = "move3", y = 0},
DOWN = {animation = "move", y = 0},
}
function PlayerLiveView:New(gameObject)
local b = {}
b.gameObject = gameObject
b.transform = gameObject.transform
setmetatable(b, { __index = PlayerLiveView })
return b
local mapNpcOp = "PlayerLiveView"
-- PlayerLiveViewData = {
-- ride = 80008
-- skin = 80012
-- designation = 80010
-- }
function PlayerLiveView:New(gameObject,_Type, PlayerLiveViewData,orginLayer)
-- Type = _Type
-- local b = {}
-- b.gameObject = gameObject
-- b.transform = gameObject.transform
-- setmetatable(b, { __index = PlayerLiveView })
-- return b
local instance = {}
instance.leader = poolManager:LoadAsset(mapNpcOp, PoolManager.AssetType.GameObject)
instance.gameObject = gameObject
instance._Type = _Type--1 自己的数据 2 传入PlayerLiveViewData
if _Type == 2 then
instance.PlayerLiveViewData = PlayerLiveViewData
else
-- PlayerManager.ride = 80008
-- PlayerManager.skin = 80012
-- PlayerManager.designation = 80010
instance.PlayerLiveViewData = {
ride = PlayerManager.ride,
skin = PlayerManager.skin,
designation = PlayerManager.designation
}
end
instance.orginLayer = orginLayer
instance.transform = gameObject.transform
instance.leader:SetActive(true)
instance.leader.transform:SetParent(gameObject.transform)
instance.leader.transform.localPosition = Vector3.zero
instance.leader.transform.localScale = Vector3.one
LogBlue("gameObject "..gameObject.name)
instance.liveParent = Util.GetGameObject(instance.leader, "liveParent")
instance.rideLiveGo = Util.GetGameObject(instance.leader, "liveParent/rideLive")
instance.playerLiveGo = Util.GetGameObject(instance.leader, "liveParent/playerLive")
instance.titleLiveGo = Util.GetGameObject(instance.leader, "liveParent/titleLive")
--立绘对象
instance.rideLive = nil
instance.playerLive = nil
instance.titleLive = nil
--立绘资源名字
instance.rideLiveStr = ""
instance.playerLiveStr = ""
instance.titleLiveStr = ""
--立绘动画控制
instance.rideLivSkeletonGraphic = nil
instance.playerLiveSkeletonGraphic = nil
instance.titleLiveSkeletonGraphic = nil
setmetatable(instance, { __index = PlayerLiveView })
return instance
end
--初始化组件(用于子类重写)
function PlayerLiveView:InitComponent()
self.liveParent = Util.GetGameObject(self.gameObject, "liveParent")
self.rideLive = Util.GetGameObject(self.gameObject, "liveParent/rideLive")
self.playerLive = Util.GetGameObject(self.gameObject, "liveParent/playerLive")
self.titleLive = Util.GetGameObject(self.gameObject, "liveParent/titleLive")
end
--绑定事件(用于子类重写)
@ -57,51 +86,67 @@ end
--加载三个立绘(称号 坐骑 皮肤)
function PlayerLiveView:OnShowLive()
self.rideLive:SetActive(false)
self.playerLive:SetActive(false)
self.titleLive:SetActive(false)
--PlayerManager.ride = 0--80301
--PlayerManager.decrotion = 80201
--PlayerManager.designation = 0--80101
if rideLive then
poolManager:UnLoadLive(rideLiveStr, rideLive, PoolManager.AssetType.GameObject)
rideLive = nil
LogBlue("self.rideLiveGo "..self.rideLiveGo.name)
self.rideLiveGo:SetActive(false)
self.playerLiveGo:SetActive(false)
self.titleLiveGo:SetActive(false)
if self.rideLive then
poolManager:UnLoadLive(self.rideLiveStr, self.rideLive, PoolManager.AssetType.GameObject)
self.rideLive = nil
end
if playerLive then
poolManager:UnLoadLive(playerLiveStr, playerLive, PoolManager.AssetType.GameObject)
playerLive = nil
if self.playerLive then
poolManager:UnLoadLive(self.playerLiveStr, self.playerLive, PoolManager.AssetType.GameObject)
self.playerLive = nil
end
if titleLive then
poolManager:UnLoadLive(titleLiveStr, titleLive, PoolManager.AssetType.GameObject)
titleLive = nil
if self.titleLive then
poolManager:UnLoadAsset(self.titleLiveStr, self.titleLive, PoolManager.AssetType.GameObject)
self.titleLive = nil
end
if PlayerManager.ride and PlayerManager.ride > 0 then
self.rideLive:SetActive(true)
rideLiveStr = GetResourcePath(ConfigManager.GetConfigData(ConfigName.PlayerAppearance,PlayerManager.ride).Live)
rideLive = poolManager:LoadLive(rideLiveStr, self.rideLive.transform, Vector3.one, Vector3.zero)
rideLivSkeletonGraphic = rideLive:GetComponent("SkeletonGraphic")
if rideLivSkeletonGraphic then
--rideLivSkeletonGraphic.AnimationState:SetAnimation(0, "idle", true)
--时装
if self.PlayerLiveViewData.skin and self.PlayerLiveViewData.skin > 0 then
self.playerLiveGo:SetActive(true)
local skinId = tonumber( tostring(self.PlayerLiveViewData.skin) .. tostring(NameManager.roleSex))--皮肤 有男女之分 所以在id后加0 or 1
local curPlayerRole = ConfigManager.GetConfigData(ConfigName.PlayerRole,skinId)
local curArtResourcesConfig = ConfigManager.GetConfigData(ConfigName.ArtResourcesConfig,curPlayerRole.LiveAnimName)
local curLocalScale = Vector3.New(curArtResourcesConfig.Scale,curArtResourcesConfig.Scale,curArtResourcesConfig.Scale)
local curLocalPosition = Vector3.New(curArtResourcesConfig.Position[1],curArtResourcesConfig.Position[2],0)
self.playerLiveStr = curArtResourcesConfig.Name--"live2d_npc_map"
self.playerLive = poolManager:LoadLive(self.playerLiveStr, self.playerLiveGo.transform, curLocalScale, curLocalPosition)
self.playerLiveSkeletonGraphic = self.playerLive:GetComponent("SkeletonGraphic")
if self.playerLiveSkeletonGraphic then
if self.PlayerLiveViewData.ride and self.PlayerLiveViewData.ride > 0 then
self.playerLiveSkeletonGraphic.AnimationState:SetAnimation(0, PLAYER_WALK_DIR.IDLE_FRONT.animation, true)
else
self.playerLiveSkeletonGraphic.AnimationState:SetAnimation(0, PLAYER_WALK_DIR.IDLE.animation, true)
end
end
end
if PlayerManager.skin and PlayerManager.skin > 0 then
self.playerLive:SetActive(true)
playerLiveStr = "live2d_npc_map"--GetResourcePath(ConfigManager.GetConfigData(ConfigName.PlayerAppearance,PlayerManager.decrotion).Live)
playerLive = poolManager:LoadLive(playerLiveStr, self.playerLive.transform, Vector3.one, Vector3.zero)
playerLiveSkeletonGraphic = playerLive:GetComponent("SkeletonGraphic")
if playerLiveSkeletonGraphic then
playerLiveSkeletonGraphic.AnimationState:SetAnimation(0, "idle", true)
--坐骑
if self.PlayerLiveViewData.ride and self.PlayerLiveViewData.ride > 0 then
self.rideLiveGo:SetActive(true)
local curPlayerRole = ConfigManager.GetConfigData(ConfigName.PlayerRole,self.PlayerLiveViewData.ride)
local curArtResourcesConfig = ConfigManager.GetConfigData(ConfigName.ArtResourcesConfig,curPlayerRole.LiveAnimName)
local curLocalScale = Vector3.New(curArtResourcesConfig.Scale,curArtResourcesConfig.Scale,curArtResourcesConfig.Scale)
local curLocalPosition = Vector3.New(curArtResourcesConfig.Position[1],curArtResourcesConfig.Position[2],0)
self.rideLiveStr = curArtResourcesConfig.Name
self.rideLive = poolManager:LoadLive(self.rideLiveStr, self.rideLiveGo.transform, curLocalScale,curLocalPosition)
self.rideLivSkeletonGraphic = self.rideLive:GetComponent("SkeletonGraphic")
if self.rideLivSkeletonGraphic then
self.rideLivSkeletonGraphic.AnimationState:SetAnimation(0, RIDE_WALK_DIR.IDLE_FRONT.animation, true)
end
end
if PlayerManager.designation and PlayerManager.designation > 0 then
self.titleLive:SetActive(true)
titleLiveStr = GetResourcePath(ConfigManager.GetConfigData(ConfigName.PlayerAppearance,PlayerManager.designation).Live)
titleLive = poolManager:LoadLive(titleLiveStr, self.titleLive.transform, Vector3.one, Vector3.zero)
titleLiveSkeletonGraphic = titleLive:GetComponent("SkeletonGraphic")
if titleLiveSkeletonGraphic then
--titleLiveSkeletonGraphic.AnimationState:SetAnimation(0, "idle", true)
end
--称号
if self.PlayerLiveViewData.designation and self.PlayerLiveViewData.designation > 0 then
self.titleLiveGo:SetActive(true)
local curPlayerRole = ConfigManager.GetConfigData(ConfigName.PlayerRole,self.PlayerLiveViewData.designation)
local curArtResourcesConfig = ConfigManager.GetConfigData(ConfigName.ArtResourcesConfig,curPlayerRole.LiveAnimName)
local curLocalScale = Vector3.New(curArtResourcesConfig.Scale,curArtResourcesConfig.Scale,curArtResourcesConfig.Scale)
local curLocalPosition = Vector3.New(curArtResourcesConfig.Position[1],curArtResourcesConfig.Position[2],0)
self.titleLiveStr = curArtResourcesConfig.Name--GetResourcePath(ConfigManager.GetConfigData(ConfigName.PlayerAppearance,PlayerManager.designation).Live)
self.titleLive = poolManager:LoadAsset(self.titleLiveStr, PoolManager.AssetType.GameObject)
self.titleLive.transform:SetParent(self.titleLiveGo.transform)
self.titleLive.transform.localPosition = curLocalPosition
self.titleLive.transform.localScale = curLocalScale
end
end
@ -128,10 +173,10 @@ function PlayerLiveView:SetRoleWalk(_pos,_tagerPos,_fun)
end):OnComplete(function ()
Log("行走完毕")
if rideLive then
rideLivSkeletonGraphic.AnimationState:SetAnimation(0, "idle", true)
if self.rideLive then
self.rideLivSkeletonGraphic.AnimationState:SetAnimation(0, "idle", true)
else
playerLiveSkeletonGraphic.AnimationState:SetAnimation(0, "idle", true)
self.playerLiveSkeletonGraphic.AnimationState:SetAnimation(0, "idle", true)
end
if _fun then
_fun()
@ -144,39 +189,131 @@ function PlayerLiveView:SetRoleDirAction(targetU, targetV, u0, v0)
local dU = targetU - u0
local dV = targetV - v0
if dU > 0 then
PlayerLiveView:SetWalkDir(WALK_DIR.RIGHT)
PlayerLiveView:SetWalkDir(WALK_DIR.RUN_RIGHT)
elseif dU < 0 then
PlayerLiveView:SetWalkDir(WALK_DIR.LEFT)
PlayerLiveView:SetWalkDir(WALK_DIR.RUN_LEFT)
elseif dV < 0 then
PlayerLiveView:SetWalkDir(WALK_DIR.UP)
PlayerLiveView:SetWalkDir(WALK_DIR.RUN_UP)
elseif dV > 0 then
PlayerLiveView:SetWalkDir(WALK_DIR.DOWN)
PlayerLiveView:SetWalkDir(WALK_DIR.RUN_DOWN)
end
end
function PlayerLiveView:SetWalkDir(dir)
if rideLive then
rideLivSkeletonGraphic.transform.localEulerAngles = Vector3.New(0, dir.y, 0)
rideLivSkeletonGraphic.AnimationState:SetAnimation(0, dir.animation, true)
LogBlue("PlayerLiveView dir : "..dir)
if dir == WALK_DIR.IDLE_FRONT then-- 站立_向前
if self.PlayerLiveViewData.ride and self.PlayerLiveViewData.ride > 0 then
self:SetWalkDirInfo(PLAYER_WALK_DIR.IDLE_FRONT,RIDE_WALK_DIR.IDLE_FRONT)
else
self:SetWalkDirInfo(PLAYER_WALK_DIR.IDLE)
end
self:SetSiblingIndexPlayerOrRide(1)
elseif dir == WALK_DIR.IDLE_BACK then-- 站立_向后
if self.PlayerLiveViewData.ride and self.PlayerLiveViewData.ride > 0 then
self:SetWalkDirInfo(PLAYER_WALK_DIR.IDLE_BACK,RIDE_WALK_DIR.IDLE_BACK)
else
self:SetWalkDirInfo(PLAYER_WALK_DIR.IDLEBACK)
end
self:SetSiblingIndexPlayerOrRide(2)
elseif dir == WALK_DIR.LEFT then-- 站立_向左
if self.PlayerLiveViewData.ride and self.PlayerLiveViewData.ride > 0 then
self:SetWalkDirInfo(PLAYER_WALK_DIR.IDLE_LEFT,RIDE_WALK_DIR.IDLE_LEFT)
else
self:SetWalkDirInfo(PLAYER_WALK_DIR.IDLE)
end
self:SetSiblingIndexPlayerOrRide(2)
elseif dir == WALK_DIR.RIGHT then-- 站立_向右
if self.PlayerLiveViewData.ride and self.PlayerLiveViewData.ride > 0 then
self:SetWalkDirInfo(PLAYER_WALK_DIR.IDLE_RIGHT,RIDE_WALK_DIR.IDLE_RIGHT)
else
self:SetWalkDirInfo(PLAYER_WALK_DIR.IDLE)
end
self:SetSiblingIndexPlayerOrRide(2)
elseif dir == WALK_DIR.RUN_RIGHT then-- 跑_向右
if self.PlayerLiveViewData.ride and self.PlayerLiveViewData.ride > 0 then
self:SetWalkDirInfo(PLAYER_WALK_DIR.RUN_RIGHT,RIDE_WALK_DIR.RUN_RIGHT)
else
self:SetWalkDirInfo(PLAYER_WALK_DIR.RIGHT)
end
self:SetSiblingIndexPlayerOrRide(2)
elseif dir == WALK_DIR.RUN_LEFT then-- 跑_向左
if self.PlayerLiveViewData.ride and self.PlayerLiveViewData.ride > 0 then
self:SetWalkDirInfo(PLAYER_WALK_DIR.RUN_LEFT,RIDE_WALK_DIR.RUN_LEFT)
else
self:SetWalkDirInfo(PLAYER_WALK_DIR.LEFT)
end
self:SetSiblingIndexPlayerOrRide(2)
elseif dir == WALK_DIR.RUN_UP then-- 跑_向上
if self.PlayerLiveViewData.ride and self.PlayerLiveViewData.ride > 0 then
self:SetWalkDirInfo(PLAYER_WALK_DIR.RUN_UP,RIDE_WALK_DIR.RUN_UP)
else
self:SetWalkDirInfo(PLAYER_WALK_DIR.UP)
end
self:SetSiblingIndexPlayerOrRide(2)
elseif dir == WALK_DIR.RUN_DOWN then-- 跑_向下
if self.PlayerLiveViewData.ride and self.PlayerLiveViewData.ride > 0 then
self:SetWalkDirInfo(PLAYER_WALK_DIR.RUN_DOWN,RIDE_WALK_DIR.RUN_DOWN)
else
self:SetWalkDirInfo(PLAYER_WALK_DIR.DOWN)
end
self:SetSiblingIndexPlayerOrRide(1)
elseif dir == WALK_DIR.JINGYA then-- 惊讶
-- if self.PlayerLiveViewData.ride and self.PlayerLiveViewData.ride > 0 then
-- PlayerLiveView:SetWalkDirInfo(PLAYER_WALK_DIR.IDLE_FRONT,RIDE_WALK_DIR.IDLE_FRONT)
-- else
self:SetWalkDirInfo(PLAYER_WALK_DIR.JINGYA)
-- end
elseif dir == WALK_DIR.LAUCH then-- 发射
-- if self.PlayerLiveViewData.ride and self.PlayerLiveViewData.ride > 0 then
-- PlayerLiveView:SetWalkDirInfo(PLAYER_WALK_DIR.IDLE_FRONT,RIDE_WALK_DIR.IDLE_FRONT)
-- else
self:SetWalkDirInfo(PLAYER_WALK_DIR.LAUCH)
-- end
elseif dir == WALK_DIR.TOUCH then-- 轻按
-- if self.PlayerLiveViewData.ride and self.PlayerLiveViewData.ride > 0 then
-- PlayerLiveView:SetWalkDirInfo(PLAYER_WALK_DIR.IDLE_FRONT,RIDE_WALK_DIR.IDLE_FRONT)
-- else
self:SetWalkDirInfo(PLAYER_WALK_DIR.TOUCH)
-- end
end
end
function PlayerLiveView:SetWalkDirInfo(playerDir,RideDir)
if not playerDir then return end
if RideDir then
LogBlue("PlayerLiveView playerDir : "..playerDir.animation .." ".. playerDir.y.." RideDir : "..RideDir.animation .." ".. RideDir.y)
self.playerLiveSkeletonGraphic.transform.localEulerAngles = Vector3.New(0, playerDir.y, 0)
self.playerLiveSkeletonGraphic.AnimationState:SetAnimation(0, playerDir.animation, true)
self.rideLivSkeletonGraphic.transform.localEulerAngles = Vector3.New(0, RideDir.y, 0)
self.rideLivSkeletonGraphic.AnimationState:SetAnimation(0, RideDir.animation, true)
else
playerLiveSkeletonGraphic.transform.localEulerAngles = Vector3.New(0, dir.y, 0)
playerLiveSkeletonGraphic.AnimationState:SetAnimation(0, dir.animation, true)
LogBlue("PlayerLiveView playerDir : "..playerDir.animation .." ".. playerDir.y)
self.playerLiveSkeletonGraphic.transform.localEulerAngles = Vector3.New(0, playerDir.y, 0)
self.playerLiveSkeletonGraphic.AnimationState:SetAnimation(0, playerDir.animation, true)
end
end
function PlayerLiveView:SetSiblingIndexPlayerOrRide(type)
LogBlue("type "..type)
if type == 1 then--坐骑靠前
self.playerLiveGo.transform:SetSiblingIndex(2)
self.rideLiveGo.transform:SetSiblingIndex(3)
else--时装靠前
self.rideLiveGo.transform:SetSiblingIndex(2)
self.playerLiveGo.transform:SetSiblingIndex(3)
end
end
--界面销毁时调用(用于子类重写)
function PlayerLiveView:OnClose()
if rideLive then
poolManager:UnLoadLive(rideLiveStr, rideLive, PoolManager.AssetType.GameObject)
rideLive = nil
if self.rideLive then
poolManager:UnLoadLive(self.rideLiveStr, self.rideLive, PoolManager.AssetType.GameObject)
self.rideLive = nil
end
if playerLive then
poolManager:UnLoadLive(playerLiveStr, playerLive, PoolManager.AssetType.GameObject)
playerLive = nil
if self.playerLive then
poolManager:UnLoadLive(self.playerLiveStr, self.playerLive, PoolManager.AssetType.GameObject)
self.playerLive = nil
end
if titleLive then
poolManager:UnLoadLive(titleLiveStr, titleLive, PoolManager.AssetType.GameObject)
titleLive = nil
if self.titleLive then
poolManager:UnLoadAsset(self.titleLiveStr, self.titleLive, PoolManager.AssetType.GameObject)
self.titleLive = nil
end
end