增加移动端界面暂存

This commit is contained in:
Caiyanpeng committed 2021-08-24 17:50:14 +08:00
1 parent 31e8e3bebb
commit 3c9d489c76
56 files changed
+59321 -2517

No files matched your search

+33 -5
View File
@@ -1,16 +1,33 @@
using Assets.Scripts;
using DG.Tweening;
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class LoginControllerMobile : MonoBehaviour
{
// Start is called before the first frame update
void Start()
ScrollRect loginScrollView;
Transform thirdLoginPage;
void Awake()
{
loginScrollView = transform.Find("Panel/LoginContainer/LoginScrollView").GetComponent<ScrollRect>();
thirdLoginPage = loginScrollView.content.Find("FormContainer-Login/Mask/FormContainer-third");
UIManager.AddEvent(loginScrollView.content.Find("FormContainer-Login/Mask/FormContainer/BtnThirdLogin").gameObject,
UnityEngine.EventSystems.EventTriggerType.PointerClick,
(b)=> ShowThirdLoginPage());
UIManager.AddEvent(loginScrollView.content.Find("FormContainer-Login/Mask/FormContainer-third/BtnReturn").gameObject,
UnityEngine.EventSystems.EventTriggerType.PointerClick,
(b) => HideThirdLoginPage());
UIManager.AddEvent(loginScrollView.content.Find("FormContainer-Login/Mask/FormContainer-third/otherContainer/Wechat").gameObject,
UnityEngine.EventSystems.EventTriggerType.PointerClick,
(b) => goWxLogin());
}
// Update is called once per frame
void Update()
{
@@ -18,11 +35,22 @@ public class LoginControllerMobile : MonoBehaviour
}
private void ShowThirdLoginPage()
{
thirdLoginPage.DOLocalMoveY(0, 0.3f);
}
private void HideThirdLoginPage()
public void HideThirdLoginPage()
{
thirdLoginPage.DOLocalMoveY(-301, 0.3f);
}
private void goWxLogin()
{
#if !UNITY_EDITOR && (UNITY_ANDROID || UNITY_IOS)
var weChat = App.weChatController;
weChat.Init(App.WxAppId);
if (weChat.IsWeChatAppInstalled())
{
weChat.WxLogin("snsapi_userinfo", "");
}
#endif
}
/// <summary>
/// 从ios或者安卓接收code,在c#里不建议调用