样式调整
This commit is contained in:
1 parent
7d0128d912
commit
ab9b6a86f3
24 files changed
+2626
-1655
No files matched your search
@@ -11,7 +11,7 @@ using Assets.Scripts.Devices;
|
||||
|
||||
public static class App
|
||||
{
|
||||
public static string Host = "http://192.168.0.102:5082/";
|
||||
public static string Host = "http://192.168.0.101:5085/";
|
||||
|
||||
public static string AppVersion = Application.version;
|
||||
|
||||
|
||||
@@ -360,7 +360,7 @@ public class EditUserController : PFUIPanel
|
||||
if (r.result)
|
||||
{
|
||||
var img = JObject.FromObject(r.data).Value<string>("WxHeadImg");
|
||||
Utils.DisplayImage(mHeadImage, img);
|
||||
Utils.DisplayImage(mHeadImage, img, true);
|
||||
var userinfos = UIManager.Instance.userInfos;
|
||||
var i = userinfos.FindIndex(x => x.Id == App.CurrentUser.Id);
|
||||
if (i != -1)
|
||||
@@ -368,6 +368,7 @@ public class EditUserController : PFUIPanel
|
||||
userinfos[i].Avatar = img;
|
||||
UIManager.Instance.userInfos = userinfos;
|
||||
}
|
||||
Debug.Log(img);
|
||||
App.CurrentUser.WxHeadImg = img;
|
||||
Utils.showToast(gameObject, "Success", type: 1);
|
||||
//UIManager.ShowAlert();
|
||||
|
||||
@@ -57,6 +57,8 @@ public class HomeController : PFUIPanel
|
||||
//Debug.Log(System.IO.File.Exists(path + ));
|
||||
if (!System.IO.File.Exists(path))
|
||||
{
|
||||
//TODO: auto update
|
||||
Application.OpenURL("https://powerfun.oss-cn-shanghai.aliyuncs.com/Releases/PowerFunWorkouts.exe");
|
||||
return;
|
||||
}
|
||||
Utils.ExecFile(path);
|
||||
|
||||
@@ -35,10 +35,15 @@ public class RaceButtonGroupScript : MonoBehaviour
|
||||
}
|
||||
void GoJoin()
|
||||
{
|
||||
if (!map.HasJoin)
|
||||
UIManager.ShowConfirm("Apply", "Are you wanting to apply?", () =>
|
||||
{
|
||||
parent.GetComponent<RaceItemScript>().Join();
|
||||
} App.RouteIdParam = map.RouteId;
|
||||
if (!map.HasJoin)
|
||||
{
|
||||
parent.GetComponent<RaceItemScript>().Join();
|
||||
}
|
||||
App.RouteIdParam = map.RouteId;
|
||||
UIManager.CloseConfirm();
|
||||
});
|
||||
}
|
||||
void GoEnter()
|
||||
{
|
||||
@@ -48,10 +53,14 @@ public class RaceButtonGroupScript : MonoBehaviour
|
||||
}
|
||||
void GoCancel()
|
||||
{
|
||||
if (map.HasJoin)
|
||||
UIManager.ShowConfirm("Cancel application", "Are you wanting to cancel the application?", () =>
|
||||
{
|
||||
parent.GetComponent<RaceItemScript>().CancelJoin();
|
||||
}
|
||||
if (map.HasJoin)
|
||||
{
|
||||
parent.GetComponent<RaceItemScript>().CancelJoin();
|
||||
}
|
||||
UIManager.CloseConfirm();
|
||||
});
|
||||
}
|
||||
void GoWatch()
|
||||
{
|
||||
|
||||
@@ -10,10 +10,10 @@ namespace Assets.Scripts.UI.Prefab.Race
|
||||
{
|
||||
public static Dictionary<string, string> statusDict = new Dictionary<string, string>()
|
||||
{
|
||||
{"1","1" },
|
||||
{"2","2" },
|
||||
{"3","3" },
|
||||
{"4","4" },
|
||||
{"Not started","1" },
|
||||
{"Appling","2" },
|
||||
{"Racing","3" },
|
||||
{"Finished","4" },
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -65,10 +65,14 @@ public class RaceHomeScript : RaceScript
|
||||
UIManager.ShowUserInfoPanel();
|
||||
});
|
||||
}
|
||||
var r = await ConfigHelper.mapCompetitionApi.GetCompetitionListV2("", 0, 5);
|
||||
var activityList = await ConfigHelper.mapCompetitionApi.GetCompetitionListV2("", 0, 3, activity: 1);
|
||||
var r = await ConfigHelper.mapCompetitionApi.GetCompetitionListV2("", 0, 7,order:0);
|
||||
var activityList = await ConfigHelper.mapCompetitionApi.GetCompetitionListV2("", 0, 3, activity: 1,order:1);
|
||||
DisplayMaps(r.data,activityList.data);
|
||||
Initial();
|
||||
Utils.StartTimeUnLimit(10, () =>
|
||||
{
|
||||
goRight();
|
||||
});
|
||||
}
|
||||
|
||||
private void DisplayMaps(List<MapCompetition> list, List<MapCompetition> activityList)
|
||||
@@ -78,14 +82,14 @@ 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");
|
||||
for (i = 0; i < 2; i++)
|
||||
{
|
||||
var game = Instantiate<GameObject>(bigGame);
|
||||
game.GetComponent<RaceItemScript>().Initial(list[i], transform);
|
||||
game.transform.SetParent(rightContainer.Find("Container-1"));
|
||||
game.transform.localScale = Vector3.one;
|
||||
}
|
||||
for (; i < 5; i++)
|
||||
//for (i = 0; i < 2; i++)
|
||||
//{
|
||||
// var game = Instantiate<GameObject>(bigGame);
|
||||
// game.GetComponent<RaceItemScript>().Initial(list[i], transform);
|
||||
// game.transform.SetParent(rightContainer.Find("Container-1"));
|
||||
// game.transform.localScale = Vector3.one;
|
||||
//}
|
||||
for (; i < list.Count; i++)
|
||||
{
|
||||
var game = Instantiate<GameObject>(smallGame);
|
||||
game.GetComponent<RaceItemScript>().Initial(list[i], transform);
|
||||
|
||||
@@ -157,7 +157,7 @@ public class RaceItemScript : MonoBehaviour, IPointerExitHandler, IPointerEnterH
|
||||
{
|
||||
transform.Find("InfoContainer/DataContainer").GetComponent<CanvasGroup>().DOFade(1, 0.5f);
|
||||
transform.Find("InfoContainer/AltitudeCurve").DOScaleY(1f, 0.5f);
|
||||
transform.Find("InfoContainer").DOLocalMoveY(-225, 0.3f);
|
||||
transform.Find("InfoContainer").DOLocalMoveY(-207, 0.3f);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -183,7 +183,7 @@ public class RaceItemScript : MonoBehaviour, IPointerExitHandler, IPointerEnterH
|
||||
if (myType == ItemType.small)
|
||||
{
|
||||
transform.Find("InfoContainer/DataContainer").GetComponent<CanvasGroup>().DOFade(0, 0.5f);
|
||||
transform.Find("InfoContainer/AltitudeCurve").DOScaleY(1.7f, 0.5f);
|
||||
//transform.Find("InfoContainer/AltitudeCurve").DOScaleY(1.7f, 0.5f);
|
||||
transform.Find("InfoContainer").DOLocalMoveY(-124 + 50, 0.3f);
|
||||
//transform.Find("InfoContainer").DOLocalMoveY(-139, 0.3f);
|
||||
}
|
||||
|
||||
@@ -182,7 +182,7 @@ public class RaceListScript : RaceScript
|
||||
{
|
||||
if (isEnd) return;
|
||||
var res = await ConfigHelper.mapCompetitionApi.GetCompetitionListV2(raceName, pageIndex,pageSize,
|
||||
status:string.Join(",", statusOptions),self:isReserve,order:order);
|
||||
status:string.Join(",", statusOptions),self:isReserve,order:1);
|
||||
if (res.result)
|
||||
{
|
||||
if (res.data.Count == 0)
|
||||
|
||||
@@ -473,5 +473,18 @@ namespace Assets.Scripts
|
||||
var ts = TimeSpan.FromSeconds(second);
|
||||
return $"{ (int)ts.TotalHours }:{ts:mm}:{ts:ss}";
|
||||
}
|
||||
private static IEnumerator TimerFunc(float seconds, Action action)
|
||||
{
|
||||
while (true)
|
||||
{
|
||||
yield return new WaitForSeconds(seconds); // 停止执行1秒
|
||||
action.Invoke();
|
||||
//time = UIManager.Now.GetDateTime().AddSeconds(1);
|
||||
}
|
||||
}
|
||||
public static void StartTimeUnLimit(float seconds,Action action)
|
||||
{
|
||||
UIManager.Instance.StartCoroutine(TimerFunc(seconds, action));
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user