【寻宝迷踪】增加主角箭头
parent
4632665c49
commit
13777a78cb
|
|
@ -18,7 +18,7 @@ GameObject:
|
||||||
m_Icon: {fileID: 0}
|
m_Icon: {fileID: 0}
|
||||||
m_NavMeshLayer: 0
|
m_NavMeshLayer: 0
|
||||||
m_StaticEditorFlags: 0
|
m_StaticEditorFlags: 0
|
||||||
m_IsActive: 0
|
m_IsActive: 1
|
||||||
--- !u!224 &224440747589353134
|
--- !u!224 &224440747589353134
|
||||||
RectTransform:
|
RectTransform:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
|
@ -110,6 +110,80 @@ MonoBehaviour:
|
||||||
m_Calls: []
|
m_Calls: []
|
||||||
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
|
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
|
||||||
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
|
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||||
|
--- !u!1 &178304411965181743
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 889222201921733154}
|
||||||
|
- component: {fileID: 6226350842825389135}
|
||||||
|
- component: {fileID: 7807818646768025738}
|
||||||
|
m_Layer: 5
|
||||||
|
m_Name: Image
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!224 &889222201921733154
|
||||||
|
RectTransform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 178304411965181743}
|
||||||
|
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: 3136468929308353954}
|
||||||
|
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: 100, y: 0}
|
||||||
|
m_SizeDelta: {x: 60, y: 84}
|
||||||
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
|
--- !u!222 &6226350842825389135
|
||||||
|
CanvasRenderer:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 178304411965181743}
|
||||||
|
m_CullTransparentMesh: 0
|
||||||
|
--- !u!114 &7807818646768025738
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 178304411965181743}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
m_Material: {fileID: 0}
|
||||||
|
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
|
||||||
|
m_Sprite: {fileID: 21300000, guid: 3a26a653ede19f547aa35b873069fb87, type: 3}
|
||||||
|
m_Type: 0
|
||||||
|
m_PreserveAspect: 0
|
||||||
|
m_FillCenter: 1
|
||||||
|
m_FillMethod: 4
|
||||||
|
m_FillAmount: 1
|
||||||
|
m_FillClockwise: 1
|
||||||
|
m_FillOrigin: 0
|
||||||
|
m_UseSpriteMesh: 0
|
||||||
--- !u!1 &3103464990422712865
|
--- !u!1 &3103464990422712865
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
|
@ -279,7 +353,8 @@ RectTransform:
|
||||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
m_Children: []
|
m_Children:
|
||||||
|
- {fileID: 3136468929308353954}
|
||||||
m_Father: {fileID: 224440747589353134}
|
m_Father: {fileID: 224440747589353134}
|
||||||
m_RootOrder: 0
|
m_RootOrder: 0
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
|
@ -288,3 +363,39 @@ RectTransform:
|
||||||
m_AnchoredPosition: {x: 0, y: 0}
|
m_AnchoredPosition: {x: 0, y: 0}
|
||||||
m_SizeDelta: {x: 100, y: 100}
|
m_SizeDelta: {x: 100, y: 100}
|
||||||
m_Pivot: {x: 0.5, y: 0.5}
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
|
--- !u!1 &9119682637275814337
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 3136468929308353954}
|
||||||
|
m_Layer: 5
|
||||||
|
m_Name: direction
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 0
|
||||||
|
--- !u!224 &3136468929308353954
|
||||||
|
RectTransform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 9119682637275814337}
|
||||||
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
|
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||||
|
m_LocalScale: {x: 0.05, y: 0.05, z: 0.05}
|
||||||
|
m_Children:
|
||||||
|
- {fileID: 889222201921733154}
|
||||||
|
m_Father: {fileID: 1996889979900709481}
|
||||||
|
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: 10, y: 10}
|
||||||
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
|
|
|
||||||
|
|
@ -105,7 +105,7 @@ function XunBaoMiZongMap:LoadMapData()
|
||||||
local go = poolManager:LoadAsset("FightMiddleFlag", PoolManager.AssetType.GameObject)
|
local go = poolManager:LoadAsset("FightMiddleFlag", PoolManager.AssetType.GameObject)
|
||||||
go.transform:SetParent(Util.GetTransform(self.mapRoot, "uiObj#"))
|
go.transform:SetParent(Util.GetTransform(self.mapRoot, "uiObj#"))
|
||||||
go.name = "FightMiddleFlag"..buildType
|
go.name = "FightMiddleFlag"..buildType
|
||||||
go:GetComponent("RectTransform").anchoredPosition3D = Vector3.New(config.ChapterTitlePosition[1], config.ChapterTitlePosition[2]-254, 10)
|
go:GetComponent("RectTransform").anchoredPosition3D = Vector3.New(config.ChapterTitlePosition[1], config.ChapterTitlePosition[2]-254, 1)
|
||||||
Util.GetTransform(go, "click"):GetComponent("RectTransform").anchoredPosition3D = Vector3.New(config.ChapterClickPosition[1], config.ChapterClickPosition[2], 0)
|
Util.GetTransform(go, "click"):GetComponent("RectTransform").anchoredPosition3D = Vector3.New(config.ChapterClickPosition[1], config.ChapterClickPosition[2], 0)
|
||||||
go.transform.localScale = Vector3.one
|
go.transform.localScale = Vector3.one
|
||||||
self._BuildFlag[buildType] = go
|
self._BuildFlag[buildType] = go
|
||||||
|
|
@ -133,6 +133,7 @@ function XunBaoMiZongMap:LoadMapData()
|
||||||
----设置人物初始位置
|
----设置人物初始位置
|
||||||
self:SelectRenPos(Util.GetTransform(self.mapRoot, "uiObj#"),self.oldPos)
|
self:SelectRenPos(Util.GetTransform(self.mapRoot, "uiObj#"),self.oldPos)
|
||||||
end)
|
end)
|
||||||
|
self.liveNode:SetSelfDirectingTag(true,self.oldPos,self.rewardPos)
|
||||||
end
|
end
|
||||||
|
|
||||||
function XunBaoMiZongMap:SelectRenPos(_parent,ChapterRolePosition)
|
function XunBaoMiZongMap:SelectRenPos(_parent,ChapterRolePosition)
|
||||||
|
|
@ -204,8 +205,10 @@ function XunBaoMiZongMap:DoCheckDistance()
|
||||||
local distance = math.distanceXY(self.rewardPos,self.liveNode.leader.transform.localPosition)
|
local distance = math.distanceXY(self.rewardPos,self.liveNode.leader.transform.localPosition)
|
||||||
if distance <= 100 then
|
if distance <= 100 then
|
||||||
self.btnGet.sprite = self.spLoader:LoadSprite("x_xbmz_xunbaoanniu")
|
self.btnGet.sprite = self.spLoader:LoadSprite("x_xbmz_xunbaoanniu")
|
||||||
|
self.liveNode:SetSelfDirectingTag(false)
|
||||||
else
|
else
|
||||||
self.btnGet.sprite = self.spLoader:LoadSprite("x_xbmz_xunbaoanniu01")
|
self.btnGet.sprite = self.spLoader:LoadSprite("x_xbmz_xunbaoanniu01")
|
||||||
|
self.liveNode:SetSelfDirectingTag(true,self.liveNode.leader.transform.localPosition,self.rewardPos)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -439,6 +439,20 @@ function PlayerLiveView:SetSelfTag()
|
||||||
Util.SetParticleSortLayer(self.SelfTagGo, self:GetSelfTagLayer())
|
Util.SetParticleSortLayer(self.SelfTagGo, self:GetSelfTagLayer())
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
--设置角色脚底箭头
|
||||||
|
function PlayerLiveView:SetSelfDirectingTag(_isShow,_curPos,_targetPos)
|
||||||
|
self.selfTagParent:SetActive(true)
|
||||||
|
-- if not self.directImg then
|
||||||
|
self.directImg = Util.GetGameObject(self.selfTagParent,"direction")
|
||||||
|
-- end
|
||||||
|
self.directImg:SetActive(_isShow)
|
||||||
|
if _isShow then
|
||||||
|
local angle = math.atan((_targetPos.y - _curPos.y)/(_targetPos.x - _curPos.x))/math.pi*180
|
||||||
|
self.directImg:GetComponent("RectTransform").rotation = Quaternion.Euler(Vector3.New(0,0,angle))
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
function PlayerLiveView:SetEffectScale(effectScale)
|
function PlayerLiveView:SetEffectScale(effectScale)
|
||||||
if self.SelfTagGo then
|
if self.SelfTagGo then
|
||||||
Util.SetParticleScale(self.SelfTagGo, effectScale)
|
Util.SetParticleScale(self.SelfTagGo, effectScale)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue