Commit dad803f7 authored by shujianhe's avatar shujianhe

1游戏中缩放和移动

2utilsTools中添加设定 外部调用方式
parent e2ab5933
...@@ -8,9 +8,6 @@ ExportedObj/ ...@@ -8,9 +8,6 @@ ExportedObj/
*.user *.user
*.unityproj *.unityproj
*.booproj *.booproj
# ============ #
# OS generated #
# ============ #
.DS_Store .DS_Store
.DS_Store? .DS_Store?
._* ._*
...@@ -24,4 +21,7 @@ Library/ ...@@ -24,4 +21,7 @@ Library/
srcImgs srcImgs
srcImgs/ srcImgs/
Logs/ Logs/
Logs Logs
\ No newline at end of file *.log
obj
obj/
\ No newline at end of file
...@@ -70,12 +70,12 @@ Material: ...@@ -70,12 +70,12 @@ Material:
- _GlossMapScale: 1 - _GlossMapScale: 1
- _Glossiness: 0.5 - _Glossiness: 0.5
- _GlossyReflections: 1 - _GlossyReflections: 1
- _Inside: 0.878 - _Inside: 0.666
- _Metallic: 0 - _Metallic: 0
- _Mode: 0 - _Mode: 0
- _OcclusionStrength: 1 - _OcclusionStrength: 1
- _Parallax: 0.02 - _Parallax: 0.02
- _R: 0.49 - _R: 0.468
- _SmoothnessTextureChannel: 0 - _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1 - _SpecularHighlights: 1
- _SrcBlend: 1 - _SrcBlend: 1
...@@ -87,7 +87,7 @@ Material: ...@@ -87,7 +87,7 @@ Material:
- _UVSec: 0 - _UVSec: 0
- _UseUIAlphaClip: 0 - _UseUIAlphaClip: 0
- _ZWrite: 1 - _ZWrite: 1
- _sR: 0.359 - _sR: 0.475
m_Colors: m_Colors:
- _Color: {r: 1, g: 1, b: 1, a: 1} - _Color: {r: 1, g: 1, b: 1, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1} - _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
......
This diff is collapsed.
using System.Collections; using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using UnityEngine; using UnityEngine;
using static UnityEditor.Progress;
public class gameSceneLogic : MonoBehaviour, IEventHandler public class gameSceneLogic : MonoBehaviour, IEventHandler
{ {
...@@ -16,10 +15,10 @@ public class gameSceneLogic : MonoBehaviour, IEventHandler ...@@ -16,10 +15,10 @@ public class gameSceneLogic : MonoBehaviour, IEventHandler
{ {
utilsTools.onEvent(this, "switchGameAreaGroupId"); utilsTools.onEvent(this, "switchGameAreaGroupId");
utilsTools.onEvent(this, "gameViewOnInitEnd"); utilsTools.onEvent(this, "gameViewOnInitEnd");
var gridViewList = areaGroupList.GetComponent<gridView>(); var gridViewList = areaGroupList.GetComponent<gameSceneAreaGroupHandler>();
gridViewList.gameObject.SetActive(false); gridViewList.gameObject.SetActive(true);
gameShowView.GetComponent<mainGameView>().loadTest(); gameShowView.GetComponent<mainGameView>().loadTest();
gridViewList.setDataNoGrid(20,100,100,5, (GameObject gobject, int idx, ListViewBackTypeEnum lvbType) => gridViewList.setDataNoGrid(20, 100, 100, 5, (GameObject gobject, int idx, ListViewBackTypeEnum lvbType) =>
{ {
if (lvbType == ListViewBackTypeEnum.create || ListViewBackTypeEnum.update == lvbType) if (lvbType == ListViewBackTypeEnum.create || ListViewBackTypeEnum.update == lvbType)
{ {
...@@ -54,7 +53,7 @@ public class gameSceneLogic : MonoBehaviour, IEventHandler ...@@ -54,7 +53,7 @@ public class gameSceneLogic : MonoBehaviour, IEventHandler
{ {
Vector3 vector3; Vector3 vector3;
Quaternion quaternion; Quaternion quaternion;
var gridViewList = areaGroupList.GetComponent<gridView>(); var gridViewList = areaGroupList.GetComponent<gameSceneAreaGroupHandler>();
colorItem item = null; colorItem item = null;
if (nowSelectGroupId >= 0) if (nowSelectGroupId >= 0)
{ {
...@@ -77,11 +76,11 @@ public class gameSceneLogic : MonoBehaviour, IEventHandler ...@@ -77,11 +76,11 @@ public class gameSceneLogic : MonoBehaviour, IEventHandler
}); });
}else if (eventName.Equals("gameViewOnInitEnd")) }else if (eventName.Equals("gameViewOnInitEnd"))
{ {
var gridViewList = areaGroupList.GetComponent<gridView>(); var gridViewList = areaGroupList.GetComponent<gameSceneAreaGroupHandler>();
gridViewList.gameObject.SetActive(true); gridViewList.gameObject.SetActive(true);
var maingameView = gameShowView.GetComponent<mainGameView>(); var maingameView = gameShowView.GetComponent<mainGameView>();
var ColorInfos = maingameView.getGroups(); var ColorInfos = maingameView.getGroups();
gridViewList.setDataNoGrid(ColorInfos.Count, 100, 100, 5, (GameObject gobject, int idx, ListViewBackTypeEnum lvbType) => gridViewList.setDataNoGrid(ColorInfos.Count, 150, 150, 100, (GameObject gobject, int idx, ListViewBackTypeEnum lvbType) =>
{ {
if (lvbType == ListViewBackTypeEnum.create || ListViewBackTypeEnum.update == lvbType) if (lvbType == ListViewBackTypeEnum.create || ListViewBackTypeEnum.update == lvbType)
{ {
......
...@@ -175,7 +175,11 @@ public class mainGameView : MonoBehaviour ...@@ -175,7 +175,11 @@ public class mainGameView : MonoBehaviour
// showArea(i); // showArea(i);
//} //}
utilsTools.sendEvent("gameViewOnInitEnd"); utilsTools.sendEvent("gameViewOnInitEnd");
for (int i = 0; i < 35; i++)
{
showArea(i);
}
} }
//typeId 1 == line //typeId 1 == line
//typeId 2 == color //typeId 2 == color
......
using System.Collections; using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using UnityEngine; using UnityEngine;
using UnityEngine.UI;
//class ListViewBackHandler { //class ListViewBackHandler {
public enum ListViewBackTypeEnum public enum ListViewBackTypeEnum
{ {
...@@ -26,4 +27,5 @@ public delegate bool DigitMatrixIsEqual<T>(T t1, T t2); ...@@ -26,4 +27,5 @@ public delegate bool DigitMatrixIsEqual<T>(T t1, T t2);
public delegate bool DigitMatrixSetBackT<T>(short x, short y, T c); public delegate bool DigitMatrixSetBackT<T>(short x, short y, T c);
public delegate void TaskItemBack(System.Object[] list); public delegate void TaskItemBack(System.Object[] list);
public delegate void OnAreaHandler(int id, bool isOk);//显示区域或者显示组完成回调 public delegate void OnAreaHandler(int id, bool isOk);//显示区域或者显示组完成回调
public delegate void LoadImageBack(Sprite sprite,string id,Image image);
//} //}
...@@ -76,8 +76,13 @@ public class utilsTools ...@@ -76,8 +76,13 @@ public class utilsTools
{ {
value = (T)newvalue; value = (T)newvalue;
return true; return true;
} }
}
public static void delUserDataByKey(GameObject gameObject,string key)
{
IRunUserData runUserData = gameObject.GetComponent<IRunUserData>();
if (runUserData == null) return;
runUserData.delDataByKey(key);
} }
public static bool onEvent(MonoBehaviour monoBehaviour,string name) public static bool onEvent(MonoBehaviour monoBehaviour,string name)
{ {
...@@ -316,4 +321,20 @@ public class utilsTools ...@@ -316,4 +321,20 @@ public class utilsTools
else else
return (value2 - mismatch) < value1; return (value2 - mismatch) < value1;
} }
//外面列表的并且有本地进度时候的调用
//loadImageThumbnailById("6573",(Sprite sprite,string id,Image image)=>{if(image == null) image = gameObject.GetComponent<Image>();image.sprite = sprite;...},image1)
public static void loadImageThumbnailById(string id, LoadImageBack loadImageBack, Image image = null)
{
}
//初始化播放游戏过程
//OnAreaHandler 回调的时候才能调用replayGameProcessById
public static void initPlayGameById(string id,GameObject gameObject, OnAreaHandler onAreaHandler)
{
}
//开始播放游戏过程
public static void replayGameProcessById(string id,GameObject gameObject,List<Tuple<short,float,float>> playOrders)
{
}
} }
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
Base path: 'D:/ProgramFiles/localinstall/2022.2.20f1c1/Editor/Data', plugins path 'D:/ProgramFiles/localinstall/2022.2.20f1c1/Editor/Data/PlaybackEngines'
Cmd: initializeCompiler
Unhandled exception: Protocol error - failed to read magic number (error -2147483644, transferred 0/4)
Quitting shader compiler process
Base path: 'D:/ProgramFiles/localinstall/2022.2.20f1c1/Editor/Data', plugins path 'D:/ProgramFiles/localinstall/2022.2.20f1c1/Editor/Data/PlaybackEngines' Base path: 'C:/Program Files/Unity/Hub/Editor/2022.3.0f1c1/Editor/Data', plugins path 'C:/Program Files/Unity/Hub/Editor/2022.3.0f1c1/Editor/Data/PlaybackEngines'
Cmd: initializeCompiler Cmd: initializeCompiler
Cmd: shutdown
Quitting shader compiler process
{ {
"dependencies": { "dependencies": {
"com.unity.collab-proxy": "2.0.4", "com.unity.collab-proxy": "2.0.4",
"com.unity.device-simulator.devices": "1.0.0",
"com.unity.feature.2d": "1.0.0", "com.unity.feature.2d": "1.0.0",
"com.unity.ide.rider": "3.0.21", "com.unity.ide.rider": "3.0.21",
"com.unity.ide.visualstudio": "2.0.18", "com.unity.ide.visualstudio": "2.0.18",
......
...@@ -108,6 +108,13 @@ ...@@ -108,6 +108,13 @@
}, },
"url": "https://packages.unity.cn" "url": "https://packages.unity.cn"
}, },
"com.unity.device-simulator.devices": {
"version": "1.0.0",
"depth": 0,
"source": "registry",
"dependencies": {},
"url": "https://packages.unity.cn"
},
"com.unity.ext.nunit": { "com.unity.ext.nunit": {
"version": "1.0.6", "version": "1.0.6",
"depth": 1, "depth": 1,
......
...@@ -8,10 +8,10 @@ EditorBuildSettings: ...@@ -8,10 +8,10 @@ EditorBuildSettings:
- enabled: 1 - enabled: 1
path: Assets/Scenes/gameScene.unity path: Assets/Scenes/gameScene.unity
guid: 0a0992afe56bcce42b70269dcae5c736 guid: 0a0992afe56bcce42b70269dcae5c736
- enabled: 0 - enabled: 1
path: Assets/Scenes/hallScene.unity path: Assets/Scenes/hallScene.unity
guid: 85b032e93d853d84a829ed945b313152 guid: 85b032e93d853d84a829ed945b313152
- enabled: 0 - enabled: 1
path: Assets/Scenes/SampleScene.unity path: Assets/Scenes/SampleScene.unity
guid: 2cda990e2423bbf4892e6590ba056729 guid: 2cda990e2423bbf4892e6590ba056729
m_configObjects: {} m_configObjects: {}
...@@ -8,7 +8,7 @@ PlayerSettings: ...@@ -8,7 +8,7 @@ PlayerSettings:
AndroidProfiler: 0 AndroidProfiler: 0
AndroidFilterTouchesWhenObscured: 0 AndroidFilterTouchesWhenObscured: 0
AndroidEnableSustainedPerformanceMode: 0 AndroidEnableSustainedPerformanceMode: 0
defaultScreenOrientation: 4 defaultScreenOrientation: 0
targetDevice: 2 targetDevice: 2
useOnDemandResources: 0 useOnDemandResources: 0
accelerometerFrequency: 60 accelerometerFrequency: 60
...@@ -42,8 +42,8 @@ PlayerSettings: ...@@ -42,8 +42,8 @@ PlayerSettings:
m_SplashScreenLogos: [] m_SplashScreenLogos: []
m_VirtualRealitySplashScreen: {fileID: 0} m_VirtualRealitySplashScreen: {fileID: 0}
m_HolographicTrackingLossScreen: {fileID: 0} m_HolographicTrackingLossScreen: {fileID: 0}
defaultScreenWidth: 640 defaultScreenWidth: 450
defaultScreenHeight: 960 defaultScreenHeight: 975
defaultScreenWidthWeb: 960 defaultScreenWidthWeb: 960
defaultScreenHeightWeb: 600 defaultScreenHeightWeb: 600
m_StereoRenderingPath: 0 m_StereoRenderingPath: 0
...@@ -69,13 +69,13 @@ PlayerSettings: ...@@ -69,13 +69,13 @@ PlayerSettings:
androidRenderOutsideSafeArea: 1 androidRenderOutsideSafeArea: 1
androidUseSwappy: 1 androidUseSwappy: 1
androidBlitType: 0 androidBlitType: 0
androidResizableWindow: 0 androidResizableWindow: 1
androidDefaultWindowWidth: 1920 androidDefaultWindowWidth: 1920
androidDefaultWindowHeight: 1080 androidDefaultWindowHeight: 1080
androidMinimumWindowWidth: 400 androidMinimumWindowWidth: 400
androidMinimumWindowHeight: 300 androidMinimumWindowHeight: 300
androidFullscreenMode: 1 androidFullscreenMode: 1
defaultIsNativeResolution: 0 defaultIsNativeResolution: 1
macRetinaSupport: 1 macRetinaSupport: 1
runInBackground: 1 runInBackground: 1
captureSingleScreen: 0 captureSingleScreen: 0
...@@ -89,7 +89,7 @@ PlayerSettings: ...@@ -89,7 +89,7 @@ PlayerSettings:
bakeCollisionMeshes: 0 bakeCollisionMeshes: 0
forceSingleInstance: 0 forceSingleInstance: 0
useFlipModelSwapchain: 1 useFlipModelSwapchain: 1
resizableWindow: 0 resizableWindow: 1
useMacAppStoreValidation: 0 useMacAppStoreValidation: 0
macAppStoreCategory: public.app-category.games macAppStoreCategory: public.app-category.games
gpuSkinning: 0 gpuSkinning: 0
...@@ -100,7 +100,7 @@ PlayerSettings: ...@@ -100,7 +100,7 @@ PlayerSettings:
xboxEnableFitness: 0 xboxEnableFitness: 0
visibleInBackground: 1 visibleInBackground: 1
allowFullscreenSwitch: 1 allowFullscreenSwitch: 1
fullscreenMode: 1 fullscreenMode: 3
xboxSpeechDB: 0 xboxSpeechDB: 0
xboxEnableHeadOrientation: 0 xboxEnableHeadOrientation: 0
xboxEnableGuest: 0 xboxEnableGuest: 0
...@@ -154,6 +154,7 @@ PlayerSettings: ...@@ -154,6 +154,7 @@ PlayerSettings:
androidSupportedAspectRatio: 1 androidSupportedAspectRatio: 1
androidMaxAspectRatio: 2.1 androidMaxAspectRatio: 2.1
applicationIdentifier: applicationIdentifier:
Android: game.testtuse.com
Standalone: com.DefaultCompany.2DProject Standalone: com.DefaultCompany.2DProject
buildNumber: buildNumber:
Standalone: 0 Standalone: 0
...@@ -307,62 +308,62 @@ PlayerSettings: ...@@ -307,62 +308,62 @@ PlayerSettings:
- m_Textures: [] - m_Textures: []
m_Width: 192 m_Width: 192
m_Height: 192 m_Height: 192
m_Kind: 1 m_Kind: 0
m_SubKind: m_SubKind:
- m_Textures: [] - m_Textures: []
m_Width: 144 m_Width: 144
m_Height: 144 m_Height: 144
m_Kind: 1 m_Kind: 0
m_SubKind: m_SubKind:
- m_Textures: [] - m_Textures: []
m_Width: 96 m_Width: 96
m_Height: 96 m_Height: 96
m_Kind: 1 m_Kind: 0
m_SubKind: m_SubKind:
- m_Textures: [] - m_Textures: []
m_Width: 72 m_Width: 72
m_Height: 72 m_Height: 72
m_Kind: 1 m_Kind: 0
m_SubKind: m_SubKind:
- m_Textures: [] - m_Textures: []
m_Width: 48 m_Width: 48
m_Height: 48 m_Height: 48
m_Kind: 1 m_Kind: 0
m_SubKind: m_SubKind:
- m_Textures: [] - m_Textures: []
m_Width: 36 m_Width: 36
m_Height: 36 m_Height: 36
m_Kind: 1 m_Kind: 0
m_SubKind: m_SubKind:
- m_Textures: [] - m_Textures: []
m_Width: 192 m_Width: 192
m_Height: 192 m_Height: 192
m_Kind: 0 m_Kind: 1
m_SubKind: m_SubKind:
- m_Textures: [] - m_Textures: []
m_Width: 144 m_Width: 144
m_Height: 144 m_Height: 144
m_Kind: 0 m_Kind: 1
m_SubKind: m_SubKind:
- m_Textures: [] - m_Textures: []
m_Width: 96 m_Width: 96
m_Height: 96 m_Height: 96
m_Kind: 0 m_Kind: 1
m_SubKind: m_SubKind:
- m_Textures: [] - m_Textures: []
m_Width: 72 m_Width: 72
m_Height: 72 m_Height: 72
m_Kind: 0 m_Kind: 1
m_SubKind: m_SubKind:
- m_Textures: [] - m_Textures: []
m_Width: 48 m_Width: 48
m_Height: 48 m_Height: 48
m_Kind: 0 m_Kind: 1
m_SubKind: m_SubKind:
- m_Textures: [] - m_Textures: []
m_Width: 36 m_Width: 36
m_Height: 36 m_Height: 36
m_Kind: 0 m_Kind: 1
m_SubKind: m_SubKind:
m_BuildTargetBatching: [] m_BuildTargetBatching: []
m_BuildTargetShaderSettings: [] m_BuildTargetShaderSettings: []
...@@ -702,7 +703,7 @@ PlayerSettings: ...@@ -702,7 +703,7 @@ PlayerSettings:
suppressCommonWarnings: 1 suppressCommonWarnings: 1
allowUnsafeCode: 0 allowUnsafeCode: 0
useDeterministicCompilation: 1 useDeterministicCompilation: 1
selectedPlatform: 1 selectedPlatform: 2
additionalIl2CppArgs: additionalIl2CppArgs:
scriptingRuntimeVersion: 1 scriptingRuntimeVersion: 1
gcIncremental: 1 gcIncremental: 1
...@@ -795,4 +796,4 @@ PlayerSettings: ...@@ -795,4 +796,4 @@ PlayerSettings:
hmiLoadingImage: {fileID: 0} hmiLoadingImage: {fileID: 0}
platformRequiresReadableAssets: 0 platformRequiresReadableAssets: 0
virtualTexturingSupportEnabled: 0 virtualTexturingSupportEnabled: 0
insecureHttpOption: 0 insecureHttpOption: 1
m_EditorVersion: 2022.2.20f1c1 m_EditorVersion: 2022.3.0f1c1
m_EditorVersionWithRevision: 2022.2.20f1c1 (a24eba7a984e) m_EditorVersionWithRevision: 2022.3.0f1c1 (aad67108fc1f)
...@@ -6,16 +6,16 @@ EditorUserSettings: ...@@ -6,16 +6,16 @@ EditorUserSettings:
serializedVersion: 4 serializedVersion: 4
m_ConfigSettings: m_ConfigSettings:
RecentlyUsedSceneGuid-0: RecentlyUsedSceneGuid-0:
value: 515250075c0c595e5f5a5e71122159444e4e4a2f7a7d7f602f284d66b4b76661 value: 0752045f560d5a025a0b5f7b12250e44424f407b757b7e612b7d4e61b3e13061
flags: 0 flags: 0
RecentlyUsedSceneGuid-1: RecentlyUsedSceneGuid-1:
value: 5350045f5c07085d085b5a2013205a4444154f7a7e7e7f342e281866e1b7676e value: 5b04565656070c025e0a547743270744174f4a73292c7f64782b4e62b1b1616a
flags: 0 flags: 0
RecentlyUsedSceneGuid-2: RecentlyUsedSceneGuid-2:
value: 5b04565656070c025e0a547743270744174f4a73292c7f64782b4e62b1b1616a value: 515250075c0c595e5f5a5e71122159444e4e4a2f7a7d7f602f284d66b4b76661
flags: 0 flags: 0
RecentlyUsedSceneGuid-3: RecentlyUsedSceneGuid-3:
value: 0752045f560d5a025a0b5f7b12250e44424f407b757b7e612b7d4e61b3e13061 value: 5350045f5c07085d085b5a2013205a4444154f7a7e7e7f342e281866e1b7676e
flags: 0 flags: 0
vcSharedLogLevel: vcSharedLogLevel:
value: 0d5e400f0650 value: 0d5e400f0650
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment