接动态地图,忘记密码,文件弹窗置顶
This commit is contained in:
1 parent
2b275d6dc5
commit
1002b0433a
206 files changed
+13484
-2849
No files matched your search
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: beb365ac9b4b5684981508211eca5546
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,39 @@
|
||||
using Assets.Scripts;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
public class LoadingAnimation : MonoBehaviour
|
||||
{
|
||||
// Start is called before the first frame update
|
||||
[SerializeField] Color c;
|
||||
void Start()
|
||||
{
|
||||
Refresh();
|
||||
}
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
|
||||
}
|
||||
void OnRectTransformDimensionsChange()
|
||||
{
|
||||
Refresh();
|
||||
}
|
||||
|
||||
private void OnValidate()
|
||||
{
|
||||
Refresh();
|
||||
}
|
||||
|
||||
void Refresh()
|
||||
{
|
||||
Transform L = transform.Find("L"), R = transform.Find("R");
|
||||
if (L && R && c.a!=0)
|
||||
{
|
||||
transform.Find("L").GetComponent<Image>().color = c;
|
||||
transform.Find("R").GetComponent<Image>().color = c;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f5f763f23abe4724987b307b9cf9fb0f
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,42 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
public class LoadingPf : MonoBehaviour
|
||||
{
|
||||
List<Sprite> sprites;
|
||||
Image image;
|
||||
|
||||
private void Start()
|
||||
{
|
||||
sprites = new List<Sprite>();
|
||||
for (int i = 1; i < 80; i++)
|
||||
{
|
||||
sprites.Add(Resources.Load<Sprite>($"Images/全屏loading/loading{i.ToString("0000")}"));
|
||||
}
|
||||
image = transform.GetComponent<Image>();
|
||||
}
|
||||
int index = 0;
|
||||
float time = 0;
|
||||
public void Initial()
|
||||
{
|
||||
index = 0;
|
||||
time = 0;
|
||||
}
|
||||
void Update()
|
||||
{
|
||||
time += Time.deltaTime;
|
||||
if (time < 0.03)
|
||||
{
|
||||
return;
|
||||
}
|
||||
time = 0;
|
||||
if (index % 79 == 0)
|
||||
{
|
||||
index = 0;
|
||||
}
|
||||
image.sprite = sprites[index];
|
||||
index++;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0cb3d6b847d2e034b9ba054d0220dc0d
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -54,6 +54,7 @@ public class FeedbackController : PFUIPanel
|
||||
for (int i = 0; i < images.childCount; i++)
|
||||
{
|
||||
images.GetChild(i).GetComponent<Image>().sprite = plus;
|
||||
images.GetChild(i).Find("close").gameObject.SetActive(false);
|
||||
//if (i > 0) SetImageActive(img, false);
|
||||
}
|
||||
content.Text = "";
|
||||
@@ -79,6 +80,11 @@ public class FeedbackController : PFUIPanel
|
||||
var self = ((PointerEventData)e).pointerEnter;
|
||||
Utils.OpenFile((path) =>
|
||||
{
|
||||
if (paths.ContainsValue(path))
|
||||
{
|
||||
Utils.showToast(gameObject, "图片已存在,请选择其他图片");
|
||||
return;
|
||||
}
|
||||
self.GetComponent<Image>().sprite = Utils.PngToSprite(path, 110, 110);
|
||||
self.transform.Find("close").gameObject.SetActive(true);
|
||||
paths[self.name] = path;
|
||||
|
||||
@@ -42,6 +42,10 @@ public class QuickLoginScroll : MonoBehaviour
|
||||
{
|
||||
lightbg.GetComponent<Image>().color = Utils.HexToColorHtml("#ffffff00");
|
||||
lightbg.GetComponent<Image>().gameObject.SetActive(false);
|
||||
int index = (int)System.Math.Round(
|
||||
(scroll.horizontalNormalizedPosition + (contentSize / 2)) / contentSize,
|
||||
0);
|
||||
content.GetChild(index).GetComponent<QuickLoginUser>().setNoActive();
|
||||
//lightbg.GetComponent<Image>().DOFade(0, 0.15f);
|
||||
}
|
||||
|
||||
@@ -66,27 +70,31 @@ public class QuickLoginScroll : MonoBehaviour
|
||||
void goLeft()
|
||||
{
|
||||
if (scroll.horizontalNormalizedPosition <= contentSize) return;
|
||||
doAni();
|
||||
if (!start) startPosition = scroll.horizontalNormalizedPosition;
|
||||
start = true;
|
||||
scrollValue = -1 * contentSize / 30;
|
||||
goMove(-1);
|
||||
}
|
||||
void goRight()
|
||||
{
|
||||
if ((scroll.horizontalNormalizedPosition + contentSize) >= 1) return;
|
||||
goMove();
|
||||
}
|
||||
void goMove(int i = 1)
|
||||
{
|
||||
doAni();
|
||||
if (!start) startPosition = scroll.horizontalNormalizedPosition;
|
||||
start = true;
|
||||
scrollValue = contentSize / 30;
|
||||
scrollValue = i*contentSize / 30;
|
||||
}
|
||||
private bool start = false, _lock = false;
|
||||
private bool start = false;
|
||||
private float scrollValue = 0, totalScrollValue = 0, startPosition = 0;
|
||||
void SetColor()
|
||||
{
|
||||
int index = (int)System.Math.Round(
|
||||
(scroll.horizontalNormalizedPosition + (contentSize / 2)) / contentSize,
|
||||
0);
|
||||
for (int i = 1; i < content.childCount-1; i++)
|
||||
//lightbg.GetComponent<Image>().gameObject.SetActive(true);
|
||||
//lightbg.GetComponent<Image>().DOFade(1, 0.2f);
|
||||
//content.GetChild(index).GetComponent<QuickLoginUser>().setActive();
|
||||
for (int i = 1; i < content.childCount - 1; i++)
|
||||
{
|
||||
string c;
|
||||
if (i == index)
|
||||
@@ -96,7 +104,7 @@ public class QuickLoginScroll : MonoBehaviour
|
||||
content.GetChild(i).GetComponent<QuickLoginUser>().setActive();
|
||||
//
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
content.GetChild(i).GetComponent<QuickLoginUser>().setNoActive();
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ public class PropNames
|
||||
{ true,"#ffffff"},{false,"#5c5c6e" }
|
||||
};
|
||||
}
|
||||
public class MapItem : MonoBehaviour, IPointerExitHandler, IPointerEnterHandler
|
||||
public class MapItem : MonoBehaviour, IPointerExitHandler, IPointerEnterHandler,IPointerUpHandler
|
||||
{
|
||||
float width;
|
||||
float height;
|
||||
@@ -68,8 +68,22 @@ public class MapItem : MonoBehaviour, IPointerExitHandler, IPointerEnterHandler
|
||||
// //transform.DOLocalMoveY(localY.Value, 0.5f);
|
||||
//});
|
||||
|
||||
UIManager.AddEvent(transform.gameObject, UnityEngine.EventSystems.EventTriggerType.PointerClick, (Base) =>
|
||||
//UIManager.AddEvent(transform.gameObject, UnityEngine.EventSystems.EventTriggerType.PointerClick, (Base) =>
|
||||
//{
|
||||
// App.RouteIdParam = myMap.Id;
|
||||
// if (!App.MainSceneParam.ContainsKey("Name"))
|
||||
// {
|
||||
// App.MainSceneParam.Add("Name", "MapListPanel");
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// App.MainSceneParam["Name"] = "MapListPanel";
|
||||
// }
|
||||
// SceneManager.LoadScene("Ride");
|
||||
//});
|
||||
transform.GetComponent<Button>().onClick.AddListener(() =>
|
||||
{
|
||||
//UIManager.ShowMapDetailPanel(myMap.Id);
|
||||
App.RouteIdParam = myMap.Id;
|
||||
if (!App.MainSceneParam.ContainsKey("Name"))
|
||||
{
|
||||
@@ -81,20 +95,6 @@ public class MapItem : MonoBehaviour, IPointerExitHandler, IPointerEnterHandler
|
||||
}
|
||||
SceneManager.LoadScene("Ride");
|
||||
});
|
||||
//transform.GetComponent<Button>().onClick.AddListener(() =>
|
||||
//{
|
||||
// //UIManager.ShowMapDetailPanel(myMap.Id);
|
||||
// App.RouteIdParam = myMap.Id;
|
||||
// if (!App.MainSceneParam.ContainsKey("Name"))
|
||||
// {
|
||||
// App.MainSceneParam.Add("Name", "MapListPanel");
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// App.MainSceneParam["Name"]= "MapListPanel";
|
||||
// }
|
||||
// SceneManager.LoadScene("Ride");
|
||||
//});
|
||||
transform.Find("Name").GetComponent<Text>().text = myMap.Name;
|
||||
Utils.DisplayImage(StartCoroutine, transform.Find("MapTitleImg").GetComponent<RawImage>(), myMap.CoverImage);
|
||||
|
||||
@@ -145,7 +145,9 @@ public class MapItem : MonoBehaviour, IPointerExitHandler, IPointerEnterHandler
|
||||
localY = transform.localPosition.y;
|
||||
}
|
||||
transform.Find("CollectImg").gameObject.SetActive(true);
|
||||
transform.DOLocalMoveY(localY.Value + 5, 0.5f);
|
||||
transform.DOLocalMoveY(localY.Value + 5, 0.3f);
|
||||
transform.Find("Shadow").gameObject.SetActive(true);
|
||||
Cursor.SetCursor(Resources.Load<Texture2D>("Images/PointerButtonHover"), Vector2.zero, CursorMode.Auto);
|
||||
//SetActive4Button(true);
|
||||
SetColor(true);
|
||||
}
|
||||
@@ -157,8 +159,10 @@ public class MapItem : MonoBehaviour, IPointerExitHandler, IPointerEnterHandler
|
||||
}
|
||||
public void OnPointerExit(PointerEventData eventData)
|
||||
{
|
||||
transform.DOLocalMoveY(localY.Value, 0.5f);
|
||||
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);
|
||||
}
|
||||
@@ -265,4 +269,9 @@ public class MapItem : MonoBehaviour, IPointerExitHandler, IPointerEnterHandler
|
||||
{
|
||||
DestroyImmediate(this.gameObject);
|
||||
}
|
||||
|
||||
public void OnPointerUp(PointerEventData eventData)
|
||||
{
|
||||
Cursor.SetCursor(null, Vector2.zero, CursorMode.Auto);
|
||||
}
|
||||
}
|
||||
@@ -96,7 +96,7 @@ public class EditUserController : PFUIPanel
|
||||
|
||||
ofn.defExt = "JPG";//显示文件的类型
|
||||
//注意 一下项目不一定要全选 但是0x00000008项不要缺少
|
||||
ofn.flags = 0x00080000 | 0x00001000 | 0x00000800 | 0x00000200 | 0x00000008;//OFN_EXPLORER|OFN_FILEMUSTEXIST|OFN_PATHMUSTEXIST| OFN_ALLOWMULTISELECT|OFN_NOCHANGEDIR
|
||||
ofn.flags = 0x00080000 | 0x00001000 | 0x00000800 | 0x00000008;//OFN_EXPLORER|OFN_FILEMUSTEXIST|OFN_PATHMUSTEXIST| OFN_ALLOWMULTISELECT|OFN_NOCHANGEDIR
|
||||
|
||||
|
||||
if (Win32.GetOpenFileName(ofn))
|
||||
|
||||
@@ -53,7 +53,7 @@ public class HomeController : PFUIPanel
|
||||
UIManager.ShowUserInfoPanel();
|
||||
//UIManager.ShowConfirm("Quit", "Do you want to quit PowerFun?", null);
|
||||
});
|
||||
GetSummary();
|
||||
//GetSummary();
|
||||
}
|
||||
private void GoRide(BaseEventData e)
|
||||
{
|
||||
@@ -64,17 +64,19 @@ public class HomeController : PFUIPanel
|
||||
{
|
||||
var pe = (PointerEventData)e;
|
||||
var parent = pe.pointerEnter.transform.parent;
|
||||
parent.Find("Image").GetComponent<Image>().sprite = Resources.Load<Sprite>("Images/home/Entrance - ROUTES_hover");
|
||||
parent.Find("Text").GetComponent<Text>().color = Utils.HexToColorHtml("#ffffff");
|
||||
parent.GetComponent<RectTransform>().localScale = new Vector3(1.05f, 1.05f, 0);
|
||||
//parent.Find("Image").GetComponent<Image>().sprite = Resources.Load<Sprite>("Images/home/Entrance - ROUTES_hover");
|
||||
//parent.Find("Text").GetComponent<Text>().color = Utils.HexToColorHtml("#ffffff");
|
||||
parent.DOScale(new Vector3(1.05f, 1.05f, 0), 0.3f);
|
||||
//parent.GetComponent<RectTransform>().localScale = ;
|
||||
}
|
||||
private void OnExit(BaseEventData e)
|
||||
{
|
||||
var pe = (PointerEventData)e;
|
||||
var parent = pe.pointerEnter.transform.parent;
|
||||
parent.Find("Image").GetComponent<Image>().sprite = Resources.Load<Sprite>("Images/home/Entrance - ROUTES_nomal");
|
||||
parent.Find("Text").GetComponent<Text>().color = Utils.HexToColorHtml("#5C5C6E");
|
||||
parent.GetComponent<RectTransform>().localScale = new Vector3(1f, 1f, 0);
|
||||
//parent.Find("Image").GetComponent<Image>().sprite = Resources.Load<Sprite>("Images/home/Entrance - ROUTES_nomal");
|
||||
//parent.Find("Text").GetComponent<Text>().color = Utils.HexToColorHtml("#5C5C6E");
|
||||
parent.DOScale(new Vector3(1f, 1f, 0), 0.3f);
|
||||
//parent.GetComponent<RectTransform>().localScale = new Vector3(1f, 1f, 0);
|
||||
}
|
||||
void MoreFunc()
|
||||
{
|
||||
|
||||
@@ -49,9 +49,11 @@ public class MapListController : PFUIPanel
|
||||
//}
|
||||
//ApiBase.SetCookie("15A37DF28842CBA8E4E550BFA24186C8222D392F3EE18D9E95A49CC32796D2E3F6E40385C6A114942546EE1DD793DF34880DE48090B91AD2460EB887B59664BB3965F3371DDA1F1401EC7F27C5A1084566E47069F12CB6BBC0BC7A84ADC5582B");
|
||||
btnMapMode = this.transform.Find("SwitchMode").gameObject;
|
||||
|
||||
SetRounded(btnMapMode.transform, 64);
|
||||
UIManager.AddEvent(btnMapMode.transform.Find("GoList").gameObject, EventTriggerType.PointerClick, (e) =>
|
||||
{
|
||||
UIManager.PopStack();
|
||||
UIManager.ShowBigMapPanel();
|
||||
});
|
||||
if (content!=null)
|
||||
@@ -349,7 +351,14 @@ public class MapListController : PFUIPanel
|
||||
var cg = this.GetComponent<CanvasGroup>();
|
||||
cg.alpha = 0;
|
||||
base.Show();
|
||||
|
||||
if (App.TextureCache.ContainsKey("rotateImage"))
|
||||
{
|
||||
transform.Find("RawImage").GetComponent<RawImage>().texture = App.TextureCache["rotateImage"];
|
||||
}
|
||||
else if(App.DefaultRotateTexture!=null)
|
||||
{
|
||||
transform.Find("RawImage").GetComponent<RawImage>().texture = App.DefaultRotateTexture;
|
||||
}
|
||||
cg.DOFade(1f, .3f);
|
||||
}
|
||||
}
|
||||
@@ -117,26 +117,30 @@ public class RouteItem : MonoBehaviour, IPointerExitHandler, IPointerEnterHandle
|
||||
}
|
||||
void SetButtonColor(bool f)
|
||||
{
|
||||
if (f)
|
||||
if (index == 0)
|
||||
{
|
||||
bool enabled = routeResult.ContinueCyclingParam == null;
|
||||
btnContinue.GetComponent<Image>().color =
|
||||
enabled ? Utils.HexToColorHtml("#c8c8c880"): Utils.HexToColorHtml("#F93086");
|
||||
btnReRide.GetComponent<Image>().color = Utils.HexToColorHtml("#F93086");
|
||||
btnDelete.GetComponent<Image>().color = Utils.HexToColorHtml("#353543");
|
||||
btnContinue.Find("Text").GetComponent<Text>().color = Utils.HexToColorHtml("#ffffff");
|
||||
btnReRide.Find("Text").GetComponent<Text>().color = Utils.HexToColorHtml("#ffffff");
|
||||
btnDelete.Find("Text").GetComponent<Text>().color = Utils.HexToColorHtml("#474759");
|
||||
}
|
||||
else
|
||||
{
|
||||
btnContinue.GetComponent<Image>().color = Utils.HexToColorHtml("#414251");
|
||||
btnReRide.GetComponent<Image>().color = Utils.HexToColorHtml("#414251");
|
||||
btnDelete.GetComponent<Image>().color = Utils.HexToColorHtml("#23232D");
|
||||
btnContinue.Find("Text").GetComponent<Text>().color = Utils.HexToColorHtml("#353543");
|
||||
btnReRide.Find("Text").GetComponent<Text>().color = Utils.HexToColorHtml("#353543");
|
||||
btnDelete.Find("Text").GetComponent<Text>().color = Utils.HexToColorHtml("#353543");
|
||||
if (f)
|
||||
{
|
||||
bool enabled = routeResult.ContinueCyclingParam == null;
|
||||
btnContinue.GetComponent<Image>().color =
|
||||
enabled ? Utils.HexToColorHtml("#75264e") : Utils.HexToColorHtml("#F93086");
|
||||
btnReRide.GetComponent<Image>().color = Utils.HexToColorHtml("#F93086");
|
||||
btnDelete.GetComponent<Image>().color = Utils.HexToColorHtml("#353543");
|
||||
btnContinue.Find("Text").GetComponent<Text>().color = Utils.HexToColorHtml("#ffffff");
|
||||
btnReRide.Find("Text").GetComponent<Text>().color = Utils.HexToColorHtml("#ffffff");
|
||||
btnDelete.Find("Text").GetComponent<Text>().color = Utils.HexToColorHtml("#474759");
|
||||
}
|
||||
else
|
||||
{
|
||||
btnContinue.GetComponent<Image>().color = Utils.HexToColorHtml("#414251");
|
||||
btnReRide.GetComponent<Image>().color = Utils.HexToColorHtml("#414251");
|
||||
btnDelete.GetComponent<Image>().color = Utils.HexToColorHtml("#23232D");
|
||||
btnContinue.Find("Text").GetComponent<Text>().color = Utils.HexToColorHtml("#353543");
|
||||
btnReRide.Find("Text").GetComponent<Text>().color = Utils.HexToColorHtml("#353543");
|
||||
btnDelete.Find("Text").GetComponent<Text>().color = Utils.HexToColorHtml("#353543");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
public void OnPointerExit(PointerEventData eventData)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user