From fc9a5341f00029ec5486d450f54033b10120dee1 Mon Sep 17 00:00:00 2001 From: gaoxin Date: Sat, 29 Aug 2020 17:22:46 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B1=8F=E5=B9=95=E9=80=82=E9=85=8D=E6=96=B9?= =?UTF-8?q?=E5=BC=8F=E6=94=B9=E4=B8=BA=E6=8C=89=E9=AB=98=E5=BA=A6=E9=80=82?= =?UTF-8?q?=E9=85=8D=EF=BC=8C=E4=BF=AE=E5=A4=8D=E7=82=B9=E5=87=BB=E7=89=B9?= =?UTF-8?q?=E6=95=88=E4=BD=8D=E7=BD=AE=E9=94=99=E8=AF=AF=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ManagedResources/Prefabs/UI/Login/LoginPanel.prefab | 8 ++++---- Assets/ManagedResources/Prefabs/UI/UIRoot/UIRoot.prefab | 2 +- Assets/ManagedResources/~Lua/Framework/Framework.lua | 6 +++++- Assets/ManagedResources/~Lua/Modules/Login/LoginPanel.lua | 3 +++ 4 files changed, 13 insertions(+), 6 deletions(-) diff --git a/Assets/ManagedResources/Prefabs/UI/Login/LoginPanel.prefab b/Assets/ManagedResources/Prefabs/UI/Login/LoginPanel.prefab index d778e96945..b1677c5615 100644 --- a/Assets/ManagedResources/Prefabs/UI/Login/LoginPanel.prefab +++ b/Assets/ManagedResources/Prefabs/UI/Login/LoginPanel.prefab @@ -11112,10 +11112,10 @@ RectTransform: m_Father: {fileID: 8490762427581985335} 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_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 1080, y: 1920} + m_SizeDelta: {x: 0, y: 0} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &8490762427331175397 CanvasRenderer: @@ -11493,7 +11493,7 @@ Animator: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 8490762427581985332} - m_Enabled: 1 + m_Enabled: 0 m_Avatar: {fileID: 0} m_Controller: {fileID: 9100000, guid: b85d6ca1190810742abf849920ed910d, type: 2} m_CullingMode: 0 diff --git a/Assets/ManagedResources/Prefabs/UI/UIRoot/UIRoot.prefab b/Assets/ManagedResources/Prefabs/UI/UIRoot/UIRoot.prefab index 04cea422c9..6499867526 100644 --- a/Assets/ManagedResources/Prefabs/UI/UIRoot/UIRoot.prefab +++ b/Assets/ManagedResources/Prefabs/UI/UIRoot/UIRoot.prefab @@ -156,7 +156,7 @@ MonoBehaviour: m_ScaleFactor: 1 m_ReferenceResolution: {x: 1080, y: 1920} m_ScreenMatchMode: 0 - m_MatchWidthOrHeight: 0.5 + m_MatchWidthOrHeight: 1 m_PhysicalUnit: 3 m_FallbackScreenDPI: 96 m_DefaultSpriteDPI: 96 diff --git a/Assets/ManagedResources/~Lua/Framework/Framework.lua b/Assets/ManagedResources/~Lua/Framework/Framework.lua index c2240b5101..967374ddd0 100644 --- a/Assets/ManagedResources/~Lua/Framework/Framework.lua +++ b/Assets/ManagedResources/~Lua/Framework/Framework.lua @@ -50,8 +50,12 @@ local update = function() clickEffect.transform.localScale = Vector3.one clickEffect.transform.localPosition = Vector3.zero + local ft = UIManager.width/UIManager.height + local rw = ft * 1920 + local v3 = Input.mousePosition - effectPos - v3 = Vector3.New(v3.x / UIManager.width * 1080, v3.y / UIManager.height * 1920, v3.z) + + v3 = Vector3.New(v3.x / UIManager.width * rw, v3.y / UIManager.height * 1920, v3.z) clickEffect:GetComponent("RectTransform").anchoredPosition = v3 clickEffect:SetActive(true) diff --git a/Assets/ManagedResources/~Lua/Modules/Login/LoginPanel.lua b/Assets/ManagedResources/~Lua/Modules/Login/LoginPanel.lua index 76135f3af6..82e2f3d790 100644 --- a/Assets/ManagedResources/~Lua/Modules/Login/LoginPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Login/LoginPanel.lua @@ -28,6 +28,8 @@ function this:InitComponent() this.loginPart = this.gameObject this.tip = Util.GetGameObject(this.loginPart, "tip/Text") + this.loginAnim = this.gameObject:GetComponent("Animator") + this.loginAnim.enabled = false this.btnLoginPart = Util.GetGameObject(this.loginPart, "jinruyouxi") this.btnLogin = Util.GetGameObject(this.loginPart, "jinruyouxi _wenzi") @@ -660,6 +662,7 @@ function this.OnDisconnect(network) end function this.SetLoginPart(flag) + this.loginAnim.enabled = flag this.btnLoginPart:SetActive(flag) this.btnLogin:SetActive(flag) this.serverSelectPart:SetActive(flag)