新增贪吃蛇游戏UI
This commit is contained in:
parent
057e3e6b6d
commit
c4a02eace6
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
8
EintooAR/Assets/AssetRaw/UI/YL/UISnackWindow.meta
Normal file
8
EintooAR/Assets/AssetRaw/UI/YL/UISnackWindow.meta
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: f79738d02a96b1944a7ccd42e978efc8
|
||||||
|
folderAsset: yes
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
2680
EintooAR/Assets/AssetRaw/UI/YL/UISnackWindow/UISnackWindow.prefab
Normal file
2680
EintooAR/Assets/AssetRaw/UI/YL/UISnackWindow/UISnackWindow.prefab
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,7 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 5001ca0eb822158489f8007235a5f413
|
||||||
|
PrefabImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
BIN
EintooAR/Assets/AssetRaw/UIRaw/Atlas/YL/Snack/1.png
Normal file
BIN
EintooAR/Assets/AssetRaw/UIRaw/Atlas/YL/Snack/1.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 13 KiB |
169
EintooAR/Assets/AssetRaw/UIRaw/Atlas/YL/Snack/1.png.meta
Normal file
169
EintooAR/Assets/AssetRaw/UIRaw/Atlas/YL/Snack/1.png.meta
Normal file
@ -0,0 +1,169 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 23ebaaeb56cdcf44e8d0f503fc7019d2
|
||||||
|
TextureImporter:
|
||||||
|
internalIDToNameTable: []
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 13
|
||||||
|
mipmaps:
|
||||||
|
mipMapMode: 0
|
||||||
|
enableMipMap: 0
|
||||||
|
sRGBTexture: 1
|
||||||
|
linearTexture: 0
|
||||||
|
fadeOut: 0
|
||||||
|
borderMipMap: 0
|
||||||
|
mipMapsPreserveCoverage: 0
|
||||||
|
alphaTestReferenceValue: 0.5
|
||||||
|
mipMapFadeDistanceStart: 1
|
||||||
|
mipMapFadeDistanceEnd: 3
|
||||||
|
bumpmap:
|
||||||
|
convertToNormalMap: 0
|
||||||
|
externalNormalMap: 0
|
||||||
|
heightScale: 0.25
|
||||||
|
normalMapFilter: 0
|
||||||
|
flipGreenChannel: 0
|
||||||
|
isReadable: 0
|
||||||
|
streamingMipmaps: 0
|
||||||
|
streamingMipmapsPriority: 0
|
||||||
|
vTOnly: 0
|
||||||
|
ignoreMipmapLimit: 0
|
||||||
|
grayScaleToAlpha: 0
|
||||||
|
generateCubemap: 6
|
||||||
|
cubemapConvolution: 0
|
||||||
|
seamlessCubemap: 0
|
||||||
|
textureFormat: 1
|
||||||
|
maxTextureSize: 2048
|
||||||
|
textureSettings:
|
||||||
|
serializedVersion: 2
|
||||||
|
filterMode: 1
|
||||||
|
aniso: 1
|
||||||
|
mipBias: 0
|
||||||
|
wrapU: 1
|
||||||
|
wrapV: 1
|
||||||
|
wrapW: 1
|
||||||
|
nPOTScale: 0
|
||||||
|
lightmap: 0
|
||||||
|
compressionQuality: 50
|
||||||
|
spriteMode: 1
|
||||||
|
spriteExtrude: 1
|
||||||
|
spriteMeshType: 1
|
||||||
|
alignment: 0
|
||||||
|
spritePivot: {x: 0.5, y: 0.5}
|
||||||
|
spritePixelsToUnits: 100
|
||||||
|
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||||
|
spriteGenerateFallbackPhysicsShape: 0
|
||||||
|
alphaUsage: 1
|
||||||
|
alphaIsTransparency: 1
|
||||||
|
spriteTessellationDetail: -1
|
||||||
|
textureType: 8
|
||||||
|
textureShape: 1
|
||||||
|
singleChannelComponent: 0
|
||||||
|
flipbookRows: 1
|
||||||
|
flipbookColumns: 1
|
||||||
|
maxTextureSizeSet: 0
|
||||||
|
compressionQualitySet: 0
|
||||||
|
textureFormatSet: 0
|
||||||
|
ignorePngGamma: 0
|
||||||
|
applyGammaDecoding: 0
|
||||||
|
swizzle: 50462976
|
||||||
|
cookieLightType: 0
|
||||||
|
platformSettings:
|
||||||
|
- serializedVersion: 4
|
||||||
|
buildTarget: DefaultTexturePlatform
|
||||||
|
maxTextureSize: 2048
|
||||||
|
resizeAlgorithm: 0
|
||||||
|
textureFormat: -1
|
||||||
|
textureCompression: 1
|
||||||
|
compressionQuality: 50
|
||||||
|
crunchedCompression: 0
|
||||||
|
allowsAlphaSplitting: 0
|
||||||
|
overridden: 0
|
||||||
|
ignorePlatformSupport: 0
|
||||||
|
androidETC2FallbackOverride: 0
|
||||||
|
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||||
|
- serializedVersion: 4
|
||||||
|
buildTarget: Win64
|
||||||
|
maxTextureSize: 2048
|
||||||
|
resizeAlgorithm: 0
|
||||||
|
textureFormat: -1
|
||||||
|
textureCompression: 1
|
||||||
|
compressionQuality: 50
|
||||||
|
crunchedCompression: 0
|
||||||
|
allowsAlphaSplitting: 0
|
||||||
|
overridden: 0
|
||||||
|
ignorePlatformSupport: 0
|
||||||
|
androidETC2FallbackOverride: 0
|
||||||
|
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||||
|
- serializedVersion: 4
|
||||||
|
buildTarget: WebGL
|
||||||
|
maxTextureSize: 2048
|
||||||
|
resizeAlgorithm: 0
|
||||||
|
textureFormat: -1
|
||||||
|
textureCompression: 1
|
||||||
|
compressionQuality: 50
|
||||||
|
crunchedCompression: 0
|
||||||
|
allowsAlphaSplitting: 0
|
||||||
|
overridden: 0
|
||||||
|
ignorePlatformSupport: 0
|
||||||
|
androidETC2FallbackOverride: 0
|
||||||
|
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||||
|
- serializedVersion: 4
|
||||||
|
buildTarget: Standalone
|
||||||
|
maxTextureSize: 2048
|
||||||
|
resizeAlgorithm: 0
|
||||||
|
textureFormat: -1
|
||||||
|
textureCompression: 1
|
||||||
|
compressionQuality: 50
|
||||||
|
crunchedCompression: 0
|
||||||
|
allowsAlphaSplitting: 0
|
||||||
|
overridden: 0
|
||||||
|
ignorePlatformSupport: 0
|
||||||
|
androidETC2FallbackOverride: 0
|
||||||
|
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||||
|
- serializedVersion: 4
|
||||||
|
buildTarget: Android
|
||||||
|
maxTextureSize: 2048
|
||||||
|
resizeAlgorithm: 0
|
||||||
|
textureFormat: -1
|
||||||
|
textureCompression: 1
|
||||||
|
compressionQuality: 50
|
||||||
|
crunchedCompression: 0
|
||||||
|
allowsAlphaSplitting: 0
|
||||||
|
overridden: 0
|
||||||
|
ignorePlatformSupport: 0
|
||||||
|
androidETC2FallbackOverride: 0
|
||||||
|
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||||
|
- serializedVersion: 4
|
||||||
|
buildTarget: WindowsStoreApps
|
||||||
|
maxTextureSize: 2048
|
||||||
|
resizeAlgorithm: 0
|
||||||
|
textureFormat: -1
|
||||||
|
textureCompression: 1
|
||||||
|
compressionQuality: 50
|
||||||
|
crunchedCompression: 0
|
||||||
|
allowsAlphaSplitting: 0
|
||||||
|
overridden: 0
|
||||||
|
ignorePlatformSupport: 0
|
||||||
|
androidETC2FallbackOverride: 0
|
||||||
|
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||||
|
spriteSheet:
|
||||||
|
serializedVersion: 2
|
||||||
|
sprites: []
|
||||||
|
outline: []
|
||||||
|
customData:
|
||||||
|
physicsShape: []
|
||||||
|
bones: []
|
||||||
|
spriteID: 5e97eb03825dee720800000000000000
|
||||||
|
internalID: 0
|
||||||
|
vertices: []
|
||||||
|
indices:
|
||||||
|
edges: []
|
||||||
|
weights: []
|
||||||
|
secondaryTextures: []
|
||||||
|
spriteCustomMetadata:
|
||||||
|
entries: []
|
||||||
|
nameFileIdTable: {}
|
||||||
|
mipmapLimitGroupName:
|
||||||
|
pSDRemoveMatte: 0
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
@ -388,6 +388,43 @@ MonoBehaviour:
|
|||||||
-
|
-
|
||||||
Flags: 000000
|
Flags: 000000
|
||||||
Languages_Touch: []
|
Languages_Touch: []
|
||||||
|
- Term: ar_ARSnack
|
||||||
|
TermType: 0
|
||||||
|
Description:
|
||||||
|
Languages:
|
||||||
|
- "AR\u8D2A\u5403\u86C7"
|
||||||
|
- ARSnacks
|
||||||
|
- "AR\u8CAA\u5403\u86C7"
|
||||||
|
Flags: 000000
|
||||||
|
Languages_Touch: []
|
||||||
|
- Term: ar_ARSnackPlay
|
||||||
|
TermType: 0
|
||||||
|
Description:
|
||||||
|
Languages:
|
||||||
|
- "\u2191\u70B9\u51FBPlay\u5F00\u59CB\u6E38\u620F\uFF0C\u63A7\u5236\u86C7\u5403\u968F\u673A\u51FA\u73B0\u7684\u98DF\u7269"
|
||||||
|
- "\u2191 Click Play to start the game and control the snake to eat random
|
||||||
|
food"
|
||||||
|
- "\u2191\u9EDE\u64CAPlay\u958B\u59CB\u904A\u6232\uFF0C\u63A7\u5236\u86C7\u5403\u96A8\u6A5F\u51FA\u73FE\u7684\u98DF\u7269"
|
||||||
|
Flags: 000000
|
||||||
|
Languages_Touch: []
|
||||||
|
- Term: ar_ARSnackLeft
|
||||||
|
TermType: 0
|
||||||
|
Description:
|
||||||
|
Languages:
|
||||||
|
- "\u86C7\u5934\u5DE6\u8F6C90\u5EA6"
|
||||||
|
- The head of the snake turns 90 degrees to the left
|
||||||
|
- "\u86C7\u982D\u5DE6\u8F4990\u5EA6"
|
||||||
|
Flags: 000000
|
||||||
|
Languages_Touch: []
|
||||||
|
- Term: ar_ARSnackRight
|
||||||
|
TermType: 0
|
||||||
|
Description:
|
||||||
|
Languages:
|
||||||
|
- "\u86C7\u5934\u53F3\u8F6C90\u5EA6"
|
||||||
|
- The head of the snake turns 90 degrees to the right
|
||||||
|
- "\u86C7\u982D\u53F3\u8F4990\u5EA6"
|
||||||
|
Flags: 000000
|
||||||
|
Languages_Touch: []
|
||||||
CaseInsensitiveTerms: 0
|
CaseInsensitiveTerms: 0
|
||||||
OnMissingTranslation: 1
|
OnMissingTranslation: 1
|
||||||
mTerm_AppName:
|
mTerm_AppName:
|
||||||
|
@ -0,0 +1,8 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: f0f5bbcd0fbb4c64eafdeba53f64b51d
|
||||||
|
folderAsset: yes
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
@ -0,0 +1,68 @@
|
|||||||
|
using Cysharp.Threading.Tasks;
|
||||||
|
using UnityEngine;
|
||||||
|
using UnityEngine.UI;
|
||||||
|
using TEngine;
|
||||||
|
|
||||||
|
namespace GameLogic
|
||||||
|
{
|
||||||
|
[Window(UILayer.UI)]
|
||||||
|
class UISnackWindow : UIWindow
|
||||||
|
{
|
||||||
|
#region 脚本工具生成的代码
|
||||||
|
private GameObject m_goSocre_01;
|
||||||
|
private GameObject m_goSocre_02;
|
||||||
|
private GameObject m_goSocre_03;
|
||||||
|
private GameObject m_goSocre_04;
|
||||||
|
private GameObject m_goSocre_05;
|
||||||
|
private GameObject m_goSocre_06;
|
||||||
|
private GameObject m_goSocre_07;
|
||||||
|
private GameObject m_goSocre_08;
|
||||||
|
private GameObject m_goSocre_09;
|
||||||
|
private GameObject m_goSocre_10;
|
||||||
|
private Button m_btnPlay;
|
||||||
|
private Text m_textStart;
|
||||||
|
private Text m_textLeft;
|
||||||
|
private Text m_textRight;
|
||||||
|
private Button m_btnLeft;
|
||||||
|
private Button m_btnRight;
|
||||||
|
protected override void ScriptGenerator()
|
||||||
|
{
|
||||||
|
m_goSocre_01 = FindChild("Parent/Top/Score/Group/m_goSocre_01").gameObject;
|
||||||
|
m_goSocre_02 = FindChild("Parent/Top/Score/Group/m_goSocre_02").gameObject;
|
||||||
|
m_goSocre_03 = FindChild("Parent/Top/Score/Group/m_goSocre_03").gameObject;
|
||||||
|
m_goSocre_04 = FindChild("Parent/Top/Score/Group/m_goSocre_04").gameObject;
|
||||||
|
m_goSocre_05 = FindChild("Parent/Top/Score/Group/m_goSocre_05").gameObject;
|
||||||
|
m_goSocre_06 = FindChild("Parent/Top/Score/Group/m_goSocre_06").gameObject;
|
||||||
|
m_goSocre_07 = FindChild("Parent/Top/Score/Group/m_goSocre_07").gameObject;
|
||||||
|
m_goSocre_08 = FindChild("Parent/Top/Score/Group/m_goSocre_08").gameObject;
|
||||||
|
m_goSocre_09 = FindChild("Parent/Top/Score/Group/m_goSocre_09").gameObject;
|
||||||
|
m_goSocre_10 = FindChild("Parent/Top/Score/Group/m_goSocre_10").gameObject;
|
||||||
|
m_btnPlay = FindChildComponent<Button>("Parent/GameControll/Center/m_btnPlay");
|
||||||
|
m_textStart = FindChildComponent<Text>("Parent/GameControll/Center/Bottom/Tips/m_textStart");
|
||||||
|
m_textLeft = FindChildComponent<Text>("Parent/GameControll/Center/Bottom/Tips/LeftAndRight/m_textLeft");
|
||||||
|
m_textRight = FindChildComponent<Text>("Parent/GameControll/Center/Bottom/Tips/LeftAndRight/m_textRight");
|
||||||
|
m_btnLeft = FindChildComponent<Button>("Parent/GameControll/Center/Bottom/RoleControl/m_btnLeft");
|
||||||
|
m_btnRight = FindChildComponent<Button>("Parent/GameControll/Center/Bottom/RoleControl/m_btnRight");
|
||||||
|
m_btnPlay.onClick.AddListener(UniTask.UnityAction(OnClickPlayBtn));
|
||||||
|
m_btnLeft.onClick.AddListener(UniTask.UnityAction(OnClickLeftBtn));
|
||||||
|
m_btnRight.onClick.AddListener(UniTask.UnityAction(OnClickRightBtn));
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 事件
|
||||||
|
private async UniTaskVoid OnClickPlayBtn()
|
||||||
|
{
|
||||||
|
await UniTask.Yield();
|
||||||
|
}
|
||||||
|
private async UniTaskVoid OnClickLeftBtn()
|
||||||
|
{
|
||||||
|
await UniTask.Yield();
|
||||||
|
}
|
||||||
|
private async UniTaskVoid OnClickRightBtn()
|
||||||
|
{
|
||||||
|
await UniTask.Yield();
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,2 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 0206186d9c4d0ec4b852c5e6271c066b
|
File diff suppressed because one or more lines are too long
@ -30,10 +30,10 @@ EditorUserSettings:
|
|||||||
value: 0705000004570c59555b097112770d40144f41722f7d7e652f7c1f66e6b5646a
|
value: 0705000004570c59555b097112770d40144f41722f7d7e652f7c1f66e6b5646a
|
||||||
flags: 0
|
flags: 0
|
||||||
RecentlyUsedSceneGuid-8:
|
RecentlyUsedSceneGuid-8:
|
||||||
value: 02500105010d500359565b7616225a44474e4c7d7b2c27337b7f4d31b1b8666f
|
value: 57030d0300505b0c0f08552413270e44124f4a287b2a7f652b704b65bae6366a
|
||||||
flags: 0
|
flags: 0
|
||||||
RecentlyUsedSceneGuid-9:
|
RecentlyUsedSceneGuid-9:
|
||||||
value: 57030d0300505b0c0f08552413270e44124f4a287b2a7f652b704b65bae6366a
|
value: 02500105010d500359565b7616225a44474e4c7d7b2c27337b7f4d31b1b8666f
|
||||||
flags: 0
|
flags: 0
|
||||||
vcSharedLogLevel:
|
vcSharedLogLevel:
|
||||||
value: 0d5e400f0650
|
value: 0d5e400f0650
|
||||||
|
Loading…
x
Reference in New Issue
Block a user