Skip to content

Commit 3bffb90

Browse files
committed
add IGameControllerModel
1 parent 75ace59 commit 3bffb90

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+292
-289
lines changed

CrazyCar/Assets/Prefabs/Game/GameController.prefab

Lines changed: 10 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -499,10 +499,10 @@ MonoBehaviour:
499499
m_Calls: []
500500
m_FontData:
501501
m_Font: {fileID: 12800000, guid: 7f47410f368bf40f4b4be4929906c9c9, type: 3}
502-
m_FontSize: 64
502+
m_FontSize: 44
503503
m_FontStyle: 1
504504
m_BestFit: 0
505-
m_MinSize: 6
505+
m_MinSize: 4
506506
m_MaxSize: 64
507507
m_Alignment: 4
508508
m_AlignByGeometry: 0
@@ -914,27 +914,9 @@ MonoBehaviour:
914914
m_Script: {fileID: 11500000, guid: 8b14355e098f83841b5b491bd6b2cb6e, type: 3}
915915
m_Name:
916916
m_EditorClassIdentifier:
917-
sceneLoaded: 0
918917
gameHelper: {fileID: 1080195007177401364}
919918
warningAlert: {fileID: 1080195006748453127}
920919
infoConfirmAlert: {fileID: 1080195006399851747}
921-
token:
922-
userInfo:
923-
name:
924-
aid: 0
925-
uid: 0
926-
star: 0
927-
isVIP: 0
928-
travelTimes: 0
929-
avatarNum: 0
930-
mapNum: 0
931-
curGameType: 0
932-
sendMsgOffTime: 0.1
933-
standAlone: 0
934-
settingsInfo:
935-
language:
936-
isOnMusic: 0
937-
isOnSound: 0
938920
--- !u!1 &1818258267043662428
939921
GameObject:
940922
m_ObjectHideFlags: 0
@@ -1119,10 +1101,10 @@ RectTransform:
11191101
m_Father: {fileID: 2906845958272151714}
11201102
m_RootOrder: 0
11211103
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
1122-
m_AnchorMin: {x: 0, y: 1}
1123-
m_AnchorMax: {x: 0, y: 1}
1124-
m_AnchoredPosition: {x: 108.22302, y: -39}
1125-
m_SizeDelta: {x: 216.44604, y: 78}
1104+
m_AnchorMin: {x: 0, y: 0}
1105+
m_AnchorMax: {x: 0, y: 0}
1106+
m_AnchoredPosition: {x: 0, y: 0}
1107+
m_SizeDelta: {x: 0, y: 0}
11261108
m_Pivot: {x: 0.5, y: 0.5}
11271109
--- !u!114 &8320551508926209416
11281110
MonoBehaviour:
@@ -2130,10 +2112,10 @@ RectTransform:
21302112
m_Father: {fileID: 2906845958272151714}
21312113
m_RootOrder: 1
21322114
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
2133-
m_AnchorMin: {x: 0, y: 1}
2134-
m_AnchorMax: {x: 0, y: 1}
2135-
m_AnchoredPosition: {x: 424.66907, y: -39}
2136-
m_SizeDelta: {x: 216.44604, y: 78}
2115+
m_AnchorMin: {x: 0, y: 0}
2116+
m_AnchorMax: {x: 0, y: 0}
2117+
m_AnchoredPosition: {x: 0, y: 0}
2118+
m_SizeDelta: {x: 0, y: 0}
21372119
m_Pivot: {x: 0.5, y: 0.5}
21382120
--- !u!114 &372029003379562259
21392121
MonoBehaviour:

CrazyCar/Assets/Scenes/Login.unity

Lines changed: 43 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -1522,6 +1522,49 @@ CanvasRenderer:
15221522
m_PrefabAsset: {fileID: 0}
15231523
m_GameObject: {fileID: 597870386}
15241524
m_CullTransparentMesh: 0
1525+
--- !u!1 &646575192
1526+
GameObject:
1527+
m_ObjectHideFlags: 0
1528+
m_CorrespondingSourceObject: {fileID: 0}
1529+
m_PrefabInstance: {fileID: 0}
1530+
m_PrefabAsset: {fileID: 0}
1531+
serializedVersion: 6
1532+
m_Component:
1533+
- component: {fileID: 646575194}
1534+
- component: {fileID: 646575193}
1535+
m_Layer: 0
1536+
m_Name: GameObject
1537+
m_TagString: Untagged
1538+
m_Icon: {fileID: 0}
1539+
m_NavMeshLayer: 0
1540+
m_StaticEditorFlags: 0
1541+
m_IsActive: 1
1542+
--- !u!114 &646575193
1543+
MonoBehaviour:
1544+
m_ObjectHideFlags: 0
1545+
m_CorrespondingSourceObject: {fileID: 0}
1546+
m_PrefabInstance: {fileID: 0}
1547+
m_PrefabAsset: {fileID: 0}
1548+
m_GameObject: {fileID: 646575192}
1549+
m_Enabled: 1
1550+
m_EditorHideFlags: 0
1551+
m_Script: {fileID: 11500000, guid: 41d9b3ce4c2526c4b9f726408ad6f7e9, type: 3}
1552+
m_Name:
1553+
m_EditorClassIdentifier:
1554+
--- !u!4 &646575194
1555+
Transform:
1556+
m_ObjectHideFlags: 0
1557+
m_CorrespondingSourceObject: {fileID: 0}
1558+
m_PrefabInstance: {fileID: 0}
1559+
m_PrefabAsset: {fileID: 0}
1560+
m_GameObject: {fileID: 646575192}
1561+
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
1562+
m_LocalPosition: {x: 0, y: 0, z: 0}
1563+
m_LocalScale: {x: 1, y: 1, z: 1}
1564+
m_Children: []
1565+
m_Father: {fileID: 0}
1566+
m_RootOrder: 7
1567+
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
15251568
--- !u!1 &679276205
15261569
GameObject:
15271570
m_ObjectHideFlags: 0
@@ -4568,21 +4611,6 @@ PrefabInstance:
45684611
m_Modification:
45694612
m_TransformParent: {fileID: 0}
45704613
m_Modifications:
4571-
- target: {fileID: 1080195006543172641, guid: 05d5daf4c59b1c14ebdfd6ab03cc8a31,
4572-
type: 3}
4573-
propertyPath: m_FontData.m_FontSize
4574-
value: 44
4575-
objectReference: {fileID: 0}
4576-
- target: {fileID: 1080195006543172641, guid: 05d5daf4c59b1c14ebdfd6ab03cc8a31,
4577-
type: 3}
4578-
propertyPath: m_FontData.m_MinSize
4579-
value: 4
4580-
objectReference: {fileID: 0}
4581-
- target: {fileID: 1080195006748453120, guid: 05d5daf4c59b1c14ebdfd6ab03cc8a31,
4582-
type: 3}
4583-
propertyPath: m_IsActive
4584-
value: 0
4585-
objectReference: {fileID: 0}
45864614
- target: {fileID: 1080195007918201889, guid: 05d5daf4c59b1c14ebdfd6ab03cc8a31,
45874615
type: 3}
45884616
propertyPath: m_Name
@@ -4643,66 +4671,6 @@ PrefabInstance:
46434671
propertyPath: m_LocalEulerAnglesHint.z
46444672
value: 0
46454673
objectReference: {fileID: 0}
4646-
- target: {fileID: 1818258268186663946, guid: 05d5daf4c59b1c14ebdfd6ab03cc8a31,
4647-
type: 3}
4648-
propertyPath: m_AnchorMin.y
4649-
value: 0
4650-
objectReference: {fileID: 0}
4651-
- target: {fileID: 1818258268186663946, guid: 05d5daf4c59b1c14ebdfd6ab03cc8a31,
4652-
type: 3}
4653-
propertyPath: m_AnchorMax.y
4654-
value: 0
4655-
objectReference: {fileID: 0}
4656-
- target: {fileID: 1818258268186663946, guid: 05d5daf4c59b1c14ebdfd6ab03cc8a31,
4657-
type: 3}
4658-
propertyPath: m_AnchoredPosition.x
4659-
value: 0
4660-
objectReference: {fileID: 0}
4661-
- target: {fileID: 1818258268186663946, guid: 05d5daf4c59b1c14ebdfd6ab03cc8a31,
4662-
type: 3}
4663-
propertyPath: m_AnchoredPosition.y
4664-
value: 0
4665-
objectReference: {fileID: 0}
4666-
- target: {fileID: 1818258268186663946, guid: 05d5daf4c59b1c14ebdfd6ab03cc8a31,
4667-
type: 3}
4668-
propertyPath: m_SizeDelta.x
4669-
value: 0
4670-
objectReference: {fileID: 0}
4671-
- target: {fileID: 1818258268186663946, guid: 05d5daf4c59b1c14ebdfd6ab03cc8a31,
4672-
type: 3}
4673-
propertyPath: m_SizeDelta.y
4674-
value: 0
4675-
objectReference: {fileID: 0}
4676-
- target: {fileID: 8028510390702380689, guid: 05d5daf4c59b1c14ebdfd6ab03cc8a31,
4677-
type: 3}
4678-
propertyPath: m_AnchorMin.y
4679-
value: 0
4680-
objectReference: {fileID: 0}
4681-
- target: {fileID: 8028510390702380689, guid: 05d5daf4c59b1c14ebdfd6ab03cc8a31,
4682-
type: 3}
4683-
propertyPath: m_AnchorMax.y
4684-
value: 0
4685-
objectReference: {fileID: 0}
4686-
- target: {fileID: 8028510390702380689, guid: 05d5daf4c59b1c14ebdfd6ab03cc8a31,
4687-
type: 3}
4688-
propertyPath: m_AnchoredPosition.x
4689-
value: 0
4690-
objectReference: {fileID: 0}
4691-
- target: {fileID: 8028510390702380689, guid: 05d5daf4c59b1c14ebdfd6ab03cc8a31,
4692-
type: 3}
4693-
propertyPath: m_AnchoredPosition.y
4694-
value: 0
4695-
objectReference: {fileID: 0}
4696-
- target: {fileID: 8028510390702380689, guid: 05d5daf4c59b1c14ebdfd6ab03cc8a31,
4697-
type: 3}
4698-
propertyPath: m_SizeDelta.x
4699-
value: 0
4700-
objectReference: {fileID: 0}
4701-
- target: {fileID: 8028510390702380689, guid: 05d5daf4c59b1c14ebdfd6ab03cc8a31,
4702-
type: 3}
4703-
propertyPath: m_SizeDelta.y
4704-
value: 0
4705-
objectReference: {fileID: 0}
47064674
m_RemovedComponents: []
47074675
m_SourcePrefab: {fileID: 100100000, guid: 05d5daf4c59b1c14ebdfd6ab03cc8a31, type: 3}
47084676
--- !u!222 &1207902678594956678

CrazyCar/Assets/Scripts/Common/GameController.cs

Lines changed: 0 additions & 61 deletions
This file was deleted.

CrazyCar/Assets/Scripts/Common/Util.cs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
using UnityEngine.Networking;
1010
using UnityEngine.SceneManagement;
1111
using UnityEngine.UI;
12+
using TFramework;
1213

1314
namespace Utils {
1415
public static class GameObjectExtension {
@@ -96,7 +97,7 @@ public static DateTime GetUTCDateTime(long timeStamp) {
9697
}
9798

9899
public static Coroutine DelayExecute(NoneParamFunction f, Func<bool> pre) {
99-
return GameController.manager.StartCoroutine(DelayExecuting(f, pre));
100+
return CoroutineController.manager.StartCoroutine(DelayExecuting(f, pre));
100101
}
101102

102103
private static IEnumerator DelayExecuting(NoneParamFunction f, Func<bool> pre) {
@@ -108,7 +109,7 @@ private static IEnumerator DelayExecuting(NoneParamFunction f, Func<bool> pre) {
108109
}
109110

110111
public static void DelayExecuteWithSecond(float sec, NoneParamFunction func) {
111-
GameController.manager.StartCoroutine(DelayExecutingWithSecond(sec, func));
112+
CoroutineController.manager.StartCoroutine(DelayExecutingWithSecond(sec, func));
112113
}
113114

114115
private static IEnumerator DelayExecutingWithSecond(float sec, NoneParamFunction func) {
@@ -350,9 +351,9 @@ public static string GetFileMD5(string filepath)
350351
}
351352
#endif
352353
public static IEnumerator POSTHTTP(string url, byte[] data = null, string token = null, Action<JsonData> succData = null, Action<int> code = null) {
353-
if (GameController.manager.standAlone) {
354-
yield break;
355-
}
354+
//if (this.GetModel<IGameControllerModel>().StandAlone.Value) {
355+
// yield break;
356+
//}
356357

357358
UnityWebRequest request = new UnityWebRequest(url, UnityWebRequest.kHttpVerbPOST);
358359
if (data != null) {

CrazyCar/Assets/Scripts/Framework/Anim/CountDownAnim.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ private void Start() {
1515
}
1616

1717
public void PlayAnim(int time, Action succ = null) {
18-
GameController.manager.StartCoroutine(CountDown(time));
18+
CoroutineController.manager.StartCoroutine(CountDown(time));
1919
PlayScreenEffect();
2020
Sequence sequence = DOTween.Sequence();
2121
for (int i = 0; i < time; i++) {

0 commit comments

Comments
 (0)