Skip to content

Commit

Permalink
将C#代码转到lua
Browse files Browse the repository at this point in the history
  • Loading branch information
prescalamity committed Jan 6, 2023
1 parent c5d118c commit 183cc47
Show file tree
Hide file tree
Showing 5 changed files with 118 additions and 400 deletions.
309 changes: 0 additions & 309 deletions Assets/Scenes/MainScene.unity
Original file line number Diff line number Diff line change
Expand Up @@ -245,108 +245,6 @@ CanvasRenderer:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 178399560}
m_CullTransparentMesh: 1
--- !u!1001 &361506383
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 1161547452}
m_Modifications:
- target: {fileID: 5305322589050781078, guid: 775debcd35a951c4382a23f0b005183e, type: 3}
propertyPath: m_Name
value: power
objectReference: {fileID: 0}
- target: {fileID: 5305322589050781079, guid: 775debcd35a951c4382a23f0b005183e, type: 3}
propertyPath: m_Pivot.x
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 5305322589050781079, guid: 775debcd35a951c4382a23f0b005183e, type: 3}
propertyPath: m_Pivot.y
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 5305322589050781079, guid: 775debcd35a951c4382a23f0b005183e, type: 3}
propertyPath: m_RootOrder
value: 7
objectReference: {fileID: 0}
- target: {fileID: 5305322589050781079, guid: 775debcd35a951c4382a23f0b005183e, type: 3}
propertyPath: m_AnchorMax.x
value: 1
objectReference: {fileID: 0}
- target: {fileID: 5305322589050781079, guid: 775debcd35a951c4382a23f0b005183e, type: 3}
propertyPath: m_AnchorMax.y
value: 0.880625
objectReference: {fileID: 0}
- target: {fileID: 5305322589050781079, guid: 775debcd35a951c4382a23f0b005183e, type: 3}
propertyPath: m_AnchorMin.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5305322589050781079, guid: 775debcd35a951c4382a23f0b005183e, type: 3}
propertyPath: m_AnchorMin.y
value: 0.1625
objectReference: {fileID: 0}
- target: {fileID: 5305322589050781079, guid: 775debcd35a951c4382a23f0b005183e, type: 3}
propertyPath: m_SizeDelta.x
value: 0.0001
objectReference: {fileID: 0}
- target: {fileID: 5305322589050781079, guid: 775debcd35a951c4382a23f0b005183e, type: 3}
propertyPath: m_SizeDelta.y
value: -0.8257141
objectReference: {fileID: 0}
- target: {fileID: 5305322589050781079, guid: 775debcd35a951c4382a23f0b005183e, type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5305322589050781079, guid: 775debcd35a951c4382a23f0b005183e, type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5305322589050781079, guid: 775debcd35a951c4382a23f0b005183e, type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5305322589050781079, guid: 775debcd35a951c4382a23f0b005183e, type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 5305322589050781079, guid: 775debcd35a951c4382a23f0b005183e, type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5305322589050781079, guid: 775debcd35a951c4382a23f0b005183e, type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5305322589050781079, guid: 775debcd35a951c4382a23f0b005183e, type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5305322589050781079, guid: 775debcd35a951c4382a23f0b005183e, type: 3}
propertyPath: m_AnchoredPosition.x
value: 0.000061035156
objectReference: {fileID: 0}
- target: {fileID: 5305322589050781079, guid: 775debcd35a951c4382a23f0b005183e, type: 3}
propertyPath: m_AnchoredPosition.y
value: 0.08538818
objectReference: {fileID: 0}
- target: {fileID: 5305322589050781079, guid: 775debcd35a951c4382a23f0b005183e, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5305322589050781079, guid: 775debcd35a951c4382a23f0b005183e, type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5305322589050781079, guid: 775debcd35a951c4382a23f0b005183e, type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 775debcd35a951c4382a23f0b005183e, type: 3}
--- !u!224 &361506384 stripped
RectTransform:
m_CorrespondingSourceObject: {fileID: 5305322589050781079, guid: 775debcd35a951c4382a23f0b005183e, type: 3}
m_PrefabInstance: {fileID: 361506383}
m_PrefabAsset: {fileID: 0}
--- !u!1 &361957142
GameObject:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -1052,11 +950,6 @@ CanvasRenderer:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1043808947}
m_CullTransparentMesh: 1
--- !u!224 &1154272132 stripped
RectTransform:
m_CorrespondingSourceObject: {fileID: 56736033015117735, guid: a53a32c7e80d5554a88dfbb314ed0909, type: 3}
m_PrefabInstance: {fileID: 56736034009414691}
m_PrefabAsset: {fileID: 0}
--- !u!1 &1157783815
GameObject:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -1289,9 +1182,6 @@ RectTransform:
- {fileID: 1860290642}
- {fileID: 847403122}
- {fileID: 1017079745}
- {fileID: 2032102687}
- {fileID: 1154272132}
- {fileID: 361506384}
m_Father: {fileID: 0}
m_RootOrder: 4
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
Expand Down Expand Up @@ -1670,11 +1560,6 @@ CanvasRenderer:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1860290641}
m_CullTransparentMesh: 1
--- !u!224 &2032102687 stripped
RectTransform:
m_CorrespondingSourceObject: {fileID: 5381216537922143345, guid: fb7ddddea66fb23499b2664e1be11a00, type: 3}
m_PrefabInstance: {fileID: 5381216538610231662}
m_PrefabAsset: {fileID: 0}
--- !u!1 &2118422776
GameObject:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -1706,197 +1591,3 @@ Transform:
m_Father: {fileID: 0}
m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1001 &56736034009414691
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 1161547452}
m_Modifications:
- target: {fileID: 56736033015117728, guid: a53a32c7e80d5554a88dfbb314ed0909, type: 3}
propertyPath: m_Name
value: sound_record
objectReference: {fileID: 0}
- target: {fileID: 56736033015117735, guid: a53a32c7e80d5554a88dfbb314ed0909, type: 3}
propertyPath: m_Pivot.x
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 56736033015117735, guid: a53a32c7e80d5554a88dfbb314ed0909, type: 3}
propertyPath: m_Pivot.y
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 56736033015117735, guid: a53a32c7e80d5554a88dfbb314ed0909, type: 3}
propertyPath: m_RootOrder
value: 6
objectReference: {fileID: 0}
- target: {fileID: 56736033015117735, guid: a53a32c7e80d5554a88dfbb314ed0909, type: 3}
propertyPath: m_AnchorMax.x
value: 1
objectReference: {fileID: 0}
- target: {fileID: 56736033015117735, guid: a53a32c7e80d5554a88dfbb314ed0909, type: 3}
propertyPath: m_AnchorMax.y
value: 0.92562497
objectReference: {fileID: 0}
- target: {fileID: 56736033015117735, guid: a53a32c7e80d5554a88dfbb314ed0909, type: 3}
propertyPath: m_AnchorMin.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 56736033015117735, guid: a53a32c7e80d5554a88dfbb314ed0909, type: 3}
propertyPath: m_AnchorMin.y
value: 0.561875
objectReference: {fileID: 0}
- target: {fileID: 56736033015117735, guid: a53a32c7e80d5554a88dfbb314ed0909, type: 3}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 56736033015117735, guid: a53a32c7e80d5554a88dfbb314ed0909, type: 3}
propertyPath: m_SizeDelta.y
value: 0.0000076293945
objectReference: {fileID: 0}
- target: {fileID: 56736033015117735, guid: a53a32c7e80d5554a88dfbb314ed0909, type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 56736033015117735, guid: a53a32c7e80d5554a88dfbb314ed0909, type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 56736033015117735, guid: a53a32c7e80d5554a88dfbb314ed0909, type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 56736033015117735, guid: a53a32c7e80d5554a88dfbb314ed0909, type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 56736033015117735, guid: a53a32c7e80d5554a88dfbb314ed0909, type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 56736033015117735, guid: a53a32c7e80d5554a88dfbb314ed0909, type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 56736033015117735, guid: a53a32c7e80d5554a88dfbb314ed0909, type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 56736033015117735, guid: a53a32c7e80d5554a88dfbb314ed0909, type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 56736033015117735, guid: a53a32c7e80d5554a88dfbb314ed0909, type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 56736033015117735, guid: a53a32c7e80d5554a88dfbb314ed0909, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 56736033015117735, guid: a53a32c7e80d5554a88dfbb314ed0909, type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 56736033015117735, guid: a53a32c7e80d5554a88dfbb314ed0909, type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: a53a32c7e80d5554a88dfbb314ed0909, type: 3}
--- !u!1001 &5381216538610231662
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 1161547452}
m_Modifications:
- target: {fileID: 5381216537922143344, guid: fb7ddddea66fb23499b2664e1be11a00, type: 3}
propertyPath: m_Name
value: head_photo
objectReference: {fileID: 0}
- target: {fileID: 5381216537922143345, guid: fb7ddddea66fb23499b2664e1be11a00, type: 3}
propertyPath: m_Pivot.x
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 5381216537922143345, guid: fb7ddddea66fb23499b2664e1be11a00, type: 3}
propertyPath: m_Pivot.y
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 5381216537922143345, guid: fb7ddddea66fb23499b2664e1be11a00, type: 3}
propertyPath: m_RootOrder
value: 5
objectReference: {fileID: 0}
- target: {fileID: 5381216537922143345, guid: fb7ddddea66fb23499b2664e1be11a00, type: 3}
propertyPath: m_AnchorMax.x
value: 1
objectReference: {fileID: 0}
- target: {fileID: 5381216537922143345, guid: fb7ddddea66fb23499b2664e1be11a00, type: 3}
propertyPath: m_AnchorMax.y
value: 0.92562497
objectReference: {fileID: 0}
- target: {fileID: 5381216537922143345, guid: fb7ddddea66fb23499b2664e1be11a00, type: 3}
propertyPath: m_AnchorMin.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5381216537922143345, guid: fb7ddddea66fb23499b2664e1be11a00, type: 3}
propertyPath: m_AnchorMin.y
value: 0.561875
objectReference: {fileID: 0}
- target: {fileID: 5381216537922143345, guid: fb7ddddea66fb23499b2664e1be11a00, type: 3}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5381216537922143345, guid: fb7ddddea66fb23499b2664e1be11a00, type: 3}
propertyPath: m_SizeDelta.y
value: 0.0000076293945
objectReference: {fileID: 0}
- target: {fileID: 5381216537922143345, guid: fb7ddddea66fb23499b2664e1be11a00, type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5381216537922143345, guid: fb7ddddea66fb23499b2664e1be11a00, type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5381216537922143345, guid: fb7ddddea66fb23499b2664e1be11a00, type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5381216537922143345, guid: fb7ddddea66fb23499b2664e1be11a00, type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 5381216537922143345, guid: fb7ddddea66fb23499b2664e1be11a00, type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5381216537922143345, guid: fb7ddddea66fb23499b2664e1be11a00, type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5381216537922143345, guid: fb7ddddea66fb23499b2664e1be11a00, type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5381216537922143345, guid: fb7ddddea66fb23499b2664e1be11a00, type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5381216537922143345, guid: fb7ddddea66fb23499b2664e1be11a00, type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5381216537922143345, guid: fb7ddddea66fb23499b2664e1be11a00, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5381216537922143345, guid: fb7ddddea66fb23499b2664e1be11a00, type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5381216537922143345, guid: fb7ddddea66fb23499b2664e1be11a00, type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: fb7ddddea66fb23499b2664e1be11a00, type: 3}
18 changes: 18 additions & 0 deletions Assets/Scripts/Platform/PlatformAdapter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,25 @@ public static string CallPlatformFunc(string key, string data, string lua_callba
}


public static string PlatformNameOnly()
{
string platformName = "windows";

if (mPlatform == PlatformType.AndroidRuntime)
{
platformName = "android";
}
else if (mPlatform == PlatformType.WebglRuntime)
{
platformName = "webgl";
}
else if (mPlatform == PlatformType.IosRuntime)
{
platformName = "ios";
}

return platformName;
}


}
Loading

0 comments on commit 183cc47

Please sign in to comment.