比赛;编辑页面

This commit is contained in:
Caiyanpeng committed 2021-08-31 17:11:43 +08:00
1 parent 85130ce6c3
commit 3ec6fd0569
56 files changed
+16371 -2749

No files matched your search

+3 -1
View File
@@ -22,7 +22,7 @@ public static class App
public static string WxAppId => "wx9e8ca734e024f084";
#else
//移动版微信id
public static string WxAppId => "wx9146e6697a6aef2d";
public static string WxAppId => "wxe3573a84e7e29902";
#endif
public static string MapBoxAccessToken => "pk.eyJ1IjoiYW5keXNqdCIsImEiOiJja2ZhajE5OGwwamRiMnltcW96bHk0ZWFuIn0.GvKanc6UveWSvIjS9HfBPA";
@@ -73,6 +73,8 @@ public static class App
}
public static string CurrentScene { get; set; }//当前场景
public static float? topRectStartX { get; internal set; }
public static WeChatController weChatController = new WeChatController();
static App()
{
@@ -7,6 +7,7 @@ using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using UnityEngine;
@@ -74,6 +74,8 @@ public class WeChatController
return mainActivityClass.CallStatic<bool>("IsWeChatInstalled");
#elif UNITY_IOS
return IsWechatInstalled_iOS();
#else
return false;
#endif
}
@@ -88,6 +90,8 @@ public class WeChatController
return mainActivityClass.CallStatic<bool>("isApplicationAvilible",pkgName);
#elif UNITY_IOS
return checkAPPIsExist(URLScheme);
#else
return false;
#endif
}
/// <summary>
+6 -3
View File
@@ -486,14 +486,16 @@ public class LoginController : MonoBehaviour
}
async void Init()
{
UIManager.Instance.ModalsPanel = this.transform.Find("ModalPanel").GetComponent<PFUIPanel>();
userInfos = UIManager.Instance.userInfos;
App.DefaultRotateTexture = Utils.ReadTextureFromPlayerPrefs("rotateImage");
App.firstEnter = PlayerPrefs.GetInt("firstEnter");
PlayerPrefs.SetInt("firstEnter", 1);
var notifyId = PlayerPrefs.GetInt("notifyId");
//Task.Run(async () =>
//{
//});
var r = await ConfigHelper.userApi.GetNotify();
if (r.result)
{
@@ -508,13 +510,14 @@ public class LoginController : MonoBehaviour
//#endif
App.notifyContent = r.data.Value<string>("Content");
if (r.data.Value<int>("Id") != notifyId)
if (r.data.Value<int>("Id") != notifyId)//r.data.Value<int>("Id") != notifyId
{
UIManager.ShowNewsModal();
PlayerPrefs.SetInt("notifyId", r.data.Value<int>("Id"));
}
}
GetRotateImage();
}
async void GetRotateImage()
-1
View File
@@ -33,7 +33,6 @@ public class MainController : BaseScene
//transform.Find("ModalPanel").GetComponent<RectTransform>().sizeDelta = new Vector2(844, 390);
#endif
App.MainDeviceAdapter.StartScan();
#endif
}
// Start is called before the first frame update
+1 -1
View File
@@ -81,7 +81,7 @@ namespace Assets.Scripts.UI.Control
material = Instantiate(Resources.Load<Material>("UI/Material/RoundedCornersTextureMaterial"));
}
var rect = ((RectTransform)transform).rect;
material.SetVector(Shader.PropertyToID("_WidthHeightRadius"), new Vector4(rect.width, rect.height, Math.Min(rect.height*0.7f, 50f), 0));
material.SetVector(Shader.PropertyToID("_WidthHeightRadius"), new Vector4(rect.width, rect.height, Math.Min(rect.height*0.35f, 50f), 0));
gameObject.GetComponent<Image>().material = material;
outline = this.GetComponent<Outline>();
+2
View File
@@ -110,12 +110,14 @@ namespace Assets.Scripts.UI.Control
{
if (!this.isActiveAndEnabled) return;
//Cursor.SetCursor(cursor, Vector2.zero, CursorMode.Auto);
#if !(UNITY_ANDROID || UNITY_IOS)
if (!string.IsNullOrWhiteSpace(Tooltips))
{
tooltips.GetComponent<CanvasGroup>().alpha = 0f;
tooltips.SetActive(true);
tooltips.GetComponent<CanvasGroup>().DOFade(1f, 0.2f);
}
#endif
switch (mType)
{
case Type.Normal:
+20 -13
View File
@@ -110,9 +110,11 @@ public class MapItem : MonoBehaviour, IPointerExitHandler, IPointerEnterHandler,
tabContainer.Find("3d").gameObject.SetActive(myMap.Enable3D);
tabContainer.Find("Country").GetComponent<RawImage>().texture = UIManager.Instance.loginRegOptions.GetCountryImage(myMap.CountryCode);
transform.Find("CollectImg").GetComponent<Button>().onClick.AddListener(Collect);
transform.Find("CollectImg").gameObject.SetActive(false);
transform.Find("CollectImg").Find("Image").GetComponent<Image>().sprite =
UIManager.Instance.collectDict[myMap.IsFavorite];
#if !(UNITY_ANDROID || UNITY_IOS)
transform.Find("CollectImg").gameObject.SetActive(false);
#endif
transform.Find("BtnInfo").GetComponent<Button>().onClick.AddListener(Info);
transform.Find("BtnRide").GetComponent<Button>().onClick.AddListener(Ride);
@@ -141,8 +143,23 @@ public class MapItem : MonoBehaviour, IPointerExitHandler, IPointerEnterHandler,
UIManager.ShowMapDetailPanel(map.Id);
}
public void OnPointerExit(PointerEventData eventData)
{
#if !(UNITY_ANDROID || UNITY_IOS)
if (localY != null)
{
transform.DOLocalMoveY(localY.Value, 0.3f);
}
transform.Find("CollectImg").gameObject.SetActive(false);
transform.Find("Shadow").gameObject.SetActive(false);
Cursor.SetCursor(null, Vector2.zero, CursorMode.Auto);
//SetActive4Button(false);
SetColor(false);
#endif
}
public void OnPointerEnter(PointerEventData eventData)
{
#if !(UNITY_ANDROID || UNITY_IOS)
if (localY == null)
{
localY = transform.localPosition.y;
@@ -153,6 +170,7 @@ public class MapItem : MonoBehaviour, IPointerExitHandler, IPointerEnterHandler,
Cursor.SetCursor(Resources.Load<Texture2D>("Images/PointerButtonHover"), Vector2.zero, CursorMode.Auto);
//SetActive4Button(true);
SetColor(true);
#endif
}
void SetActive4Button(bool b)
{
@@ -160,18 +178,7 @@ public class MapItem : MonoBehaviour, IPointerExitHandler, IPointerEnterHandler,
transform.Find("BtnInfo").gameObject.SetActive(b);
transform.Find("BtnRide").gameObject.SetActive(b);
}
public void OnPointerExit(PointerEventData eventData)
{
if (localY != null)
{
transform.DOLocalMoveY(localY.Value, 0.3f);
}
transform.Find("CollectImg").gameObject.SetActive(false);
transform.Find("Shadow").gameObject.SetActive(false);
Cursor.SetCursor(null, Vector2.zero, CursorMode.Auto);
//SetActive4Button(false);
SetColor(false);
}
private void SetColor(bool isFav)
{
PropNames.icons.ForEach((v) =>
@@ -2,6 +2,7 @@
using Assets.Scripts.Apis;
using Assets.Scripts.Apis.Models;
using Assets.Scripts.UI.Control;
using DG.Tweening;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using System;
@@ -48,8 +49,23 @@ public class EditUserController : PFUIPanel
{
Debug.Log(Utils.GetIP(Utils.ADDRESSFAM.IPv4));
userApi = new UserApi();
#if !(UNITY_ANDROID || UNITY_IOS)
var panel = this.transform.Find("Panel");
#else
var panel = this.transform.Find("Panel/MainPanel");
float? panelTop = null;
Debug.Log($"cyp,{panelTop}");
UIManager.AddEvent(transform.Find("Panel/Btn1").gameObject, EventTriggerType.PointerClick, b =>
{
if (!panelTop.HasValue) panelTop = transform.localPosition.y+185;
panel.DOLocalMoveY(panelTop.Value, 0.3f);
});
UIManager.AddEvent(transform.Find("Panel/Btn2").gameObject, EventTriggerType.PointerClick, b =>
{
if (!panelTop.HasValue) panelTop = transform.localPosition.y+185;
panel.DOLocalMoveY(panelTop.Value + 370, 0.3f);
});
#endif
mID = panel.Find("IDNumber").Find("input").Find("Text").GetComponent<Text>();
mSexDropdown = panel.Find("SexDropdown").GetComponent<PFUIDropdown>();
mSexDropdown = panel.Find("SexDropdown").GetComponent<PFUIDropdown>();
@@ -41,8 +41,44 @@ public class MapListController : PFUIPanel
}
}
private bool isEnd = false;
private Transform topContainer;
protected override void Start()
{
#if (UNITY_ANDROID || UNITY_IOS)
topContainer = transform.Find("Top");
var rectTransform = transform.GetComponent<RectTransform>();
var offsetMax = rectTransform.offsetMax;
rectTransform.offsetMax = new Vector2(0, offsetMax.y);
var offsetMin = rectTransform.offsetMin;
rectTransform.offsetMin = new Vector2(0, offsetMin.y);
//筛选按钮
var topRect = topContainer.GetComponent<RectTransform>();
if (!App.topRectStartX.HasValue)
{
App.topRectStartX = topRect.localPosition.x;
}
var mc = transform.Find("MC");
UIManager.AddEvent(transform.Find("Panel/BtnFilter").gameObject, EventTriggerType.PointerClick, b =>
{
topContainer.DOLocalMoveX(App.topRectStartX.Value - topRect.rect.width, 0.3f);
mc.gameObject.SetActive(true);
mc.GetComponent<CanvasGroup>().alpha = 0;
mc.GetComponent<CanvasGroup>().DOFade(1, 0.3f);
});
UIManager.AddEvent(topContainer.Find("BtnCancel").gameObject, EventTriggerType.PointerClick, b =>
{
topContainer.DOLocalMoveX(App.topRectStartX.Value, 0.3f);
mc.GetComponent<CanvasGroup>().DOFade(0, 0.3f).onComplete = () =>
{
mc.gameObject.SetActive(false);
};
});
map = Resources.Load<GameObject>("UI/Prefab/MapList/MapItem-Mobile");
#else
topContainer = transform.Find("Panel").Find("Top");
#endif
sort = "Near";
sortDire = "asc";
//if (hardSelector != null)
@@ -69,14 +105,14 @@ public class MapListController : PFUIPanel
// layout.cellSize = new Vector2((width - 120) / 5, (width - 120) / 5);
//}
}
distanceOptions = transform.Find("Panel").Find("Top").Find("distanceOptions");
distanceOptions = topContainer.Find("distanceOptions");
if (distanceOptions != null)
{
var dDropdown = distanceOptions.GetComponent<Dropdown>();
dDropdown.options = MapFilterOptions.distances;
dDropdown.onValueChanged.AddListener(ChangeDistance);
}
diffOptions = transform.Find("Panel").Find("Top").Find("DifficultyContainer");
diffOptions = topContainer.Find("DifficultyContainer");
if (diffOptions != null)
{
foreach (Transform t in diffOptions)
@@ -130,8 +166,8 @@ public class MapListController : PFUIPanel
UIManager.ShowHomePanel();
});
}
tdContainer = transform.Find("Panel").Find("Top").Find("3dContainer");
favContainer = transform.Find("Panel").Find("Top").Find("FavContainer");
tdContainer = topContainer.Find("3dContainer");
favContainer = topContainer.Find("FavContainer");
if (tdContainer != null)
{
UIManager.AddEvent(tdContainer.gameObject, EventTriggerType.PointerClick, (b) =>
@@ -154,7 +190,7 @@ public class MapListController : PFUIPanel
Refresh();
});
}
searchInput = transform.Find("Panel").Find("Top").Find("SearchInput");
searchInput = topContainer.Find("SearchInput");
if (searchInput != null)
{
//searchInput.GetComponent<InputField>().onEndEdit.AddListener((s) =>
@@ -167,7 +203,7 @@ public class MapListController : PFUIPanel
onEndEdit();
});
}
sorts = transform.Find("Panel").Find("Top").Find("FilterOptions");
sorts = topContainer.Find("FilterOptions");
if (sorts != null)
{
var drop = sorts.GetComponent<Dropdown>();
@@ -195,7 +231,7 @@ public class MapListController : PFUIPanel
Refresh();
});
}
sortDir = transform.Find("Panel").Find("Top").Find("Dir");
sortDir = topContainer.Find("Dir");
if (sortDir)
{
var image = sortDir.Find("Image").GetComponent<Image>();
@@ -71,7 +71,11 @@ public class RaceHomeScript : RaceScript
StartTime();
rightContainer = transform.Find("RightContainer");
leftContainer = transform.Find("LeftContainer");
#if !(UNITY_ANDROID || UNITY_IOS)
btnGoList = rightContainer.Find("Container-2/BtnGoList");
#else
btnGoList = rightContainer.Find("BtnGoList");
#endif
if (btnGoList != null)
{
UIManager.AddEvent(btnGoList.gameObject, UnityEngine.EventSystems.EventTriggerType.PointerClick, b =>
@@ -92,7 +96,11 @@ public class RaceHomeScript : RaceScript
async void GetData()
{
#if !(UNITY_ANDROID || UNITY_IOS)
var r = await ConfigHelper.mapCompetitionApi.GetCompetitionListV2("", 0, 7, order: 0);
#else
var r = await ConfigHelper.mapCompetitionApi.GetCompetitionListV2("", 0, 4, order: 0);
#endif
var activityList = await ConfigHelper.mapCompetitionApi.GetCompetitionListV2("", 0, 3, activity: 1, order: 2);
DisplayMaps(r.data, activityList.data);
Initial();
@@ -112,6 +120,10 @@ public class RaceHomeScript : RaceScript
smallGame = Resources.Load<GameObject>("UI/Prefab/Race/ItemSmall"),
bannerItem = Resources.Load<GameObject>("UI/Prefab/Race/Banner/BannerItem"),
dotItem = Resources.Load<GameObject>("UI/Prefab/Race/Banner/DotItem");
#if UNITY_ANDROID || UNITY_ANDROID
bannerItem = Resources.Load<GameObject>("UI/Prefab/Race/Banner/BannerItem-Mobile");
smallGame = Resources.Load<GameObject>("UI/Prefab/Race/Mobile/ItemSmall-Mobile");
#endif
//for (i = 0; i < 2; i++)
//{
// var game = Instantiate<GameObject>(bigGame);
@@ -166,9 +178,11 @@ public class RaceHomeScript : RaceScript
dot.transform.localScale = Vector3.one;
//scroll.content
}
#if !(UNITY_ANDROID || UNITY_IOS)
rightContainer.Find("Container-2/BtnGoList").SetAsLastSibling();
rightContainer.Find("Container-2/BtnGoList").GetComponent<RaceMaskScript>().localY =
list.Count < 4 ? -167.5f :-492.5f;
#endif
}
void OnBannerClick(MapCompetition map)
{
@@ -192,7 +206,14 @@ public class RaceHomeScript : RaceScript
//{
// contentSize = 0;
//}
contentSize = 1f / (content.childCount - 1);
if (content.childCount > 1)
{
contentSize = 1f / (content.childCount - 1);
}
else
{
contentSize = 0;
}
scroll.horizontalNormalizedPosition = 0;
}
void goLeft()
@@ -211,7 +232,7 @@ public class RaceHomeScript : RaceScript
void goMove(int i = 1)
{
//doAni();
if (startMoveEnd) return;
if (startMoveEnd || contentSize == 0) return;
if (!start) startPosition = scroll.horizontalNormalizedPosition;
start = true;
scrollValue = i * contentSize / 20;
@@ -9,7 +9,10 @@ using UnityEngine.EventSystems;
using UnityEngine.SceneManagement;
using UnityEngine.UI;
public class RaceItemScript : MonoBehaviour, IPointerExitHandler, IPointerEnterHandler, IPointerUpHandler
public class RaceItemScript : MonoBehaviour
#if !(UNITY_ANDROID||UNITY_IOS)
, IPointerExitHandler, IPointerEnterHandler, IPointerUpHandler
#endif
{
// Start is called before the first frame update
public enum ItemType { big, small }
@@ -26,8 +29,9 @@ public class RaceItemScript : MonoBehaviour, IPointerExitHandler, IPointerEnterH
{
}
public void Initial(MapCompetition mapCompetition,Transform parent)
public void Initial(MapCompetition mapCompetition,Transform parent,string from = "list")
{
#if !(UNITY_ANDROID || UNITY_IOS)
transform.GetComponent<Button>().onClick.AddListener(() =>
{
App.RouteIdParam = mapCompetition.RouteId;
@@ -35,6 +39,16 @@ public class RaceItemScript : MonoBehaviour, IPointerExitHandler, IPointerEnterH
SceneManager.LoadScene("Ride");
});
Utils.DisplayImage(transform.GetComponent<RawImage>(), mapCompetition.RouteCover, true);
#else
if (from == "list")
{
Utils.DisplayImage(transform.GetComponent<RawImage>(), mapCompetition.RouteCover, true);
transform.GetComponent<Button>().onClick.AddListener(() =>
{
UIManager.ShowRaceDetailModal(mapCompetition);
});
}
#endif
Utils.DisplayImage(transform.Find("AltitudeCurve").GetComponent<RawImage>(), mapCompetition.AltitudeGraph, true);
transform.Find("InfoContainer/Text").GetComponent<Text>().SetTextWithEllipsis(mapCompetition.Title);
transform.Find("GetReadyContainer").gameObject.SetActive(mapCompetition.Status != 4);
@@ -52,7 +66,14 @@ public class RaceItemScript : MonoBehaviour, IPointerExitHandler, IPointerEnterH
transform.Find("InfoContainer/StartTime/Text").GetComponent<Text>().text = mapCompetition.StartTime.ToLocalTime().ToString();
transform.Find("CountContainer/Text").GetComponent<Text>().text = mapCompetition.ApplyCount.ToString();
SetStatus(mapCompetition);
#if !(UNITY_ANDROID || UNITY_IOS)
SetButtonGroup(mapCompetition);
#else
if (from != "list")
{
SetButtonGroup(mapCompetition);
}
#endif
if (parent != null)
{
this.parent = parent;
@@ -193,7 +193,16 @@ public class RaceListScript : RaceScript
}
//Refresh();
}
protected override void Start()
{
#if (UNITY_ANDROID || UNITY_IOS)
var rectTransform = transform.GetComponent<RectTransform>();
var offsetMax = rectTransform.offsetMax;
rectTransform.offsetMax = new Vector2(0, offsetMax.y);
var offsetMin = rectTransform.offsetMin;
rectTransform.offsetMin = new Vector2(0, offsetMin.y);
#endif
}
private async Task Login()
{
var result = await ConfigHelper.userApi.Login("13115011550", "laozhong", "");
@@ -279,7 +288,12 @@ public class RaceListScript : RaceScript
private void DisplayMaps(List<MapCompetition> list)
{
#if UNITY_ANDROID || UNITY_IOS
GameObject smallGame = Resources.Load<GameObject>("UI/Prefab/Race/Mobile/ItemSmall-Mobile");
#else
GameObject smallGame = Resources.Load<GameObject>("UI/Prefab/Race/ItemSmall");
#endif
foreach (var map in list)
{
var game = Instantiate<GameObject>(smallGame);
@@ -9,10 +9,12 @@ public class RaceMaskScript : MonoBehaviour, IPointerEnterHandler,IPointerExitHa
public void OnPointerEnter(PointerEventData eventData)
{
transform.Find("Panel").GetComponent<CanvasGroup>().DOFade(1, 0.5f);
if (localY.HasValue)
if (!localY.HasValue)
{
transform.DOLocalMoveY(localY.Value + 5, 0.3f);
localY = transform.localPosition.y;
}
transform.DOLocalMoveY(localY.Value + 5, 0.3f);
}
public void OnPointerExit(PointerEventData eventData)
@@ -0,0 +1,36 @@
using Assets.Scripts;
using Assets.Scripts.Apis.Models;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class RaceModalScript : RaceScript
{
// Start is called before the first frame update
void Start()
{
UIManager.AddEvent(transform.Find("Container/Exit").gameObject, UnityEngine.EventSystems.EventTriggerType.PointerClick, b =>
{
//停止计时器
UIManager.CloseModal();
transform.GetComponent<RaceScript>().SetCurrentItem(null);
});
}
// Update is called once per frame
void Update()
{
}
public void Initial(MapCompetition mapCompetition)
{
var item = transform.Find("Container/Main/ItemSmall-Mobile");
item.GetComponent<RaceItemScript>().Initial(mapCompetition, transform,"modal");
//开始计时器
transform.GetComponent<RaceScript>().SetCurrentItem(item);
Utils.DisplayImage(transform.Find("Container/Main/Left").GetComponent<RawImage>(),
mapCompetition.RouteCover, true);
}
}
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 95df82ebb7d60894c80ae5ba7afdf48b
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
+2 -2
View File
@@ -31,10 +31,10 @@ public class RaceScript : PFUIPanel
/// <param name="t"></param>
public void SetCurrentItem(Transform t)
{
currentItem = t;
HandleTime();
if (t != null)
{
currentItem = t;
HandleTime();
StartTime();
}
else
@@ -179,6 +179,7 @@ public class RouteItem : MonoBehaviour, IPointerExitHandler, IPointerEnterHandle
}
});
}
#if !(UNITY_ANDROID||UNITY_IOS)
void SetButtonColor(bool f)
{
if (routeResult!=null)
@@ -222,6 +223,32 @@ public class RouteItem : MonoBehaviour, IPointerExitHandler, IPointerEnterHandle
}
}
#else
void SetButtonColor(bool f)
{
if (!f)
{
transform.Find("Right").gameObject.SetActive(false);
transform.Find("RightMatch").gameObject.SetActive(false);
transform.Find("RightDot").gameObject.SetActive(true);
}
else
{
transform.Find("Right").gameObject.SetActive(index == 0);
if (index == 0)
{
bool disabled = routeResult.ContinueCyclingParam == null;
if (disabled)
{
btnContinue.GetComponent<Image>().color = Utils.HexToColorHtml("#cdcdcd");
}
}
transform.Find("RightMatch").gameObject.SetActive(index == 1);
transform.Find("RightDot").gameObject.SetActive(false);
}
}
#endif
public void OnPointerExit(PointerEventData eventData)
{
transform.GetComponent<Image>().color = Utils.HexToColorHtml("#23232d");
+23 -3
View File
@@ -168,7 +168,7 @@ public class UIManager : MonoBehaviour
{
UIManager.PopStack();
}
UIManager.Instance.MainPanel.transform.parent.Find("Bg").GetComponent<Image>().sprite =
UIManager.Instance.MainPanel.GetComponent<Image>().sprite =
Resources.Load<Sprite>("Images/Race/RACE-BG");
UIManager.Show(UIManager.Instance.RaceHomePanel, UIManager.Instance.MainPanel);
}
@@ -202,6 +202,22 @@ public class UIManager : MonoBehaviour
//UIManager.Show(UIManager.Instance.RaceListPanel, UIManager.Instance.MainPanel);
}
/*比赛列表*/
#region 比赛点击弹窗
private RaceModalScript mRaceModalScript;
public RaceModalScript RaceDetailModal
{
get
{
return this.GetPanelInstance("RaceDetailModal", ref this.mRaceModalScript);
}
}
public static void ShowRaceDetailModal(MapCompetition mapCompetition)
{
UIManager.Show(UIManager.Instance.RaceDetailModal, null, true);
UIManager.Instance.mRaceModalScript.Initial(mapCompetition);
//UIManager.Show(UIManager.Instance.RaceListPanel, UIManager.Instance.MainPanel);
}
#endregion
private PFUIPanel mModalsPanel;
public PFUIPanel ModalsPanel
{
@@ -345,7 +361,11 @@ public class UIManager : MonoBehaviour
{
if (internalComponent == null)
{
#if !(UNITY_ANDROID || UNITY_IOS)
UnityEngine.Object @object = Resources.Load("UI/Prefab/Common/" + prefabName);
#else
UnityEngine.Object @object = Resources.Load("UI/Prefab/Common/Mobile/" + prefabName);
#endif
if (@object != null)
{
GameObject gameObject = (GameObject)UnityEngine.Object.Instantiate(@object, base.transform.parent, false);
@@ -491,7 +511,7 @@ public class UIManager : MonoBehaviour
public static void ShowHomePanel()
{
stack.Clear();
UIManager.Instance.MainPanel.transform.parent.Find("Bg").GetComponent<Image>().sprite =
UIManager.Instance.MainPanel.GetComponent<Image>().sprite =
Resources.Load<Sprite>("Images/main-bg");
UIManager.Show(UIManager.Instance.HomePanel, UIManager.Instance.MainPanel);
}
@@ -852,7 +872,7 @@ public class UIManager : MonoBehaviour
ShowConfirm("Logout", "Do you want to log out and change accounts?", () =>
{
#if !(UNITY_ANDROID || UNITY_IOS)
SceneManager.LoadScene("Login");
SceneManager.LoadScene("Login");
#else
SceneManager.LoadScene("Login-Mobile");
#endif
+1 -1
View File
@@ -253,7 +253,7 @@ namespace Assets.Scripts
yield return request.SendWebRequest();
if (request.isNetworkError || request.isHttpError)
Debug.Log(request.error);
else
else if(img!=null)
{
img.texture = ((DownloadHandlerTexture)request.downloadHandler).texture;
if (action != null)