diff --git a/Assets/Resources/Art/Fix/温控器/温控器 1.psb b/Assets/Resources/Art/Fix/温控器/温控器 1.psb new file mode 100644 index 000000000..d8353a392 --- /dev/null +++ b/Assets/Resources/Art/Fix/温控器/温控器 1.psb @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:78041b93345614a4a3c0bee01e884381de0153a42aaa72022e63b2e19f5f95f1 +size 1315084 diff --git a/Assets/Resources/Art/Fix/温控器/温控器 1.psb.meta b/Assets/Resources/Art/Fix/温控器/温控器 1.psb.meta new file mode 100644 index 000000000..78ce24270 --- /dev/null +++ b/Assets/Resources/Art/Fix/温控器/温控器 1.psb.meta @@ -0,0 +1,311 @@ +fileFormatVersion: 2 +guid: af0c993887e3e7e4a8ec5ea614265c94 +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 11500000, guid: b2a9591990af98743ba3ff7cf1000886, type: 3} + textureImporterSettings: + alphaSource: 1 + mipMapMode: 0 + enableMipMap: 1 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + convertToNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + flipGreenChannel: 0 + swizzle: 50462976 + isReadable: 0 + streamingMipmaps: 1 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 + nPOTScale: 1 + sRGBTexture: 1 + spriteMode: 2 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 200 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 0 + flipbookColumns: 0 + ignorePngGamma: 0 + cookieMode: 0 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 0 + wrapV: 0 + wrapW: 0 + normalMap: 0 + textureFormat: 0 + maxTextureSize: 0 + lightmap: 0 + compressionQuality: 0 + linearTexture: 0 + grayScaleToAlpha: 0 + rGBM: 0 + cubemapConvolutionSteps: 0 + cubemapConvolutionExponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + applyGammaDecoding: 0 + spriteImportData: + - name: + originalName: + pivot: {x: 0, y: 0} + alignment: 0 + border: {x: 0, y: 0, z: 0, w: 0} + rect: + serializedVersion: 2 + x: 0 + y: 0 + width: 0 + height: 0 + spriteID: + spriteBone: [] + spriteOutline: [] + vertices: [] + spritePhysicsOutline: [] + indices: + edges: [] + tessellationDetail: 0 + uvTransform: {x: 0, y: 0} + spritePosition: {x: 0, y: 0} + mosaicSpriteImportData: [] + rigSpriteImportData: + - name: "\u6E29\u5EA6\u68C0\u6D4B\u4EEA" + originalName: + pivot: {x: 0.5, y: 0.5} + alignment: 0 + border: {x: 0, y: 0, z: 0, w: 0} + rect: + serializedVersion: 2 + x: 2669 + y: 4 + width: 703 + height: 704 + spriteID: 8a0019c77539efb4a8ef129b7668c0d9 + spriteBone: [] + spriteOutline: [] + vertices: [] + spritePhysicsOutline: [] + indices: + edges: [] + tessellationDetail: 0 + uvTransform: {x: 2669, y: 4} + spritePosition: {x: 44, y: 8} + - name: "\u6309\u94AE" + originalName: + pivot: {x: 0.5, y: 0.5} + alignment: 0 + border: {x: 0, y: 0, z: 0, w: 0} + rect: + serializedVersion: 2 + x: 2669 + y: 716 + width: 191 + height: 212 + spriteID: 4e46a4bd6cc574742bbdbaa50fced38b + spriteBone: [] + spriteOutline: [] + vertices: [] + spritePhysicsOutline: [] + indices: + edges: [] + tessellationDetail: 0 + uvTransform: {x: 2669, y: 716} + spritePosition: {x: 754, y: 429} + - name: "\u6E29\u63A7\u5668 " + originalName: + pivot: {x: 0.5, y: 0.5} + alignment: 0 + border: {x: 0, y: 0, z: 0, w: 0} + rect: + serializedVersion: 2 + x: 4 + y: 4 + width: 2657 + height: 718 + spriteID: a668fcd0f8a7c154da3ba9c448c7ff7a + spriteBone: [] + spriteOutline: [] + vertices: [] + spritePhysicsOutline: [] + indices: + edges: [] + tessellationDetail: 0 + uvTransform: {x: 4, y: 4} + spritePosition: {x: 0, y: 0} + - name: "\u98CE\u6247" + originalName: + pivot: {x: 0.5, y: 0.5} + alignment: 0 + border: {x: 0, y: 0, z: 0, w: 0} + rect: + serializedVersion: 2 + x: 3380 + y: 4 + width: 653 + height: 655 + spriteID: 8507261c86be68d4cac19f17617c4bd2 + spriteBone: [] + spriteOutline: [] + vertices: [] + spritePhysicsOutline: [] + indices: + edges: [] + tessellationDetail: 0 + uvTransform: {x: 3380, y: 4} + spritePosition: {x: 41, y: 31} + characterData: + bones: [] + parts: [] + dimension: {x: 0, y: 0} + characterGroups: [] + pivot: {x: 0, y: 0} + boneReadOnly: 0 + sharedRigSpriteImportData: [] + sharedRigCharacterData: + bones: [] + parts: [] + dimension: {x: 0, y: 0} + characterGroups: [] + pivot: {x: 0, y: 0} + boneReadOnly: 0 + platformSettings: + - name: DefaultTexturePlatform + overridden: 0 + ignorePlatformSupport: 0 + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + forceMaximumCompressionQuality_BC6H_BC7: 0 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + androidETC2FallbackOverride: 0 + - name: Standalone + overridden: 0 + ignorePlatformSupport: 0 + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + forceMaximumCompressionQuality_BC6H_BC7: 0 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + androidETC2FallbackOverride: 0 + - name: Server + overridden: 0 + ignorePlatformSupport: 0 + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + forceMaximumCompressionQuality_BC6H_BC7: 0 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + androidETC2FallbackOverride: 0 + mosaicLayers: 1 + characterMode: 1 + documentPivot: {x: 0, y: 0} + documentAlignment: 7 + importHiddenLayers: 0 + layerMappingOption: 2 + generatePhysicsShape: 0 + paperDollMode: 0 + keepDupilcateSpriteName: 1 + skeletonAssetReferenceID: + padding: 4 + spriteSizeExpand: 0 + spriteCategoryList: + categories: [] + spritePackingTag: + resliceFromLayer: 0 + mosaicPSDLayers: [] + rigPSDLayers: + - name: "\u6E29\u5EA6\u68C0\u6D4B\u63A7\u5236\u5668" + spriteName: + isGroup: 1 + parentIndex: -1 + spriteID: f0bed0715a446e84b9402ff288652082 + layerID: 7 + mosaicPosition: {x: 0, y: 0} + flatten: 0 + isImported: 0 + isVisible: 1 + - name: "\u6E29\u5EA6\u68C0\u6D4B\u4EEA" + spriteName: "\u6E29\u5EA6\u68C0\u6D4B\u4EEA" + isGroup: 0 + parentIndex: 0 + spriteID: 8a0019c77539efb4a8ef129b7668c0d9 + layerID: 6 + mosaicPosition: {x: 2669, y: 4} + flatten: 0 + isImported: 1 + isVisible: 1 + - name: "\u6309\u94AE" + spriteName: "\u6309\u94AE" + isGroup: 0 + parentIndex: 0 + spriteID: 4e46a4bd6cc574742bbdbaa50fced38b + layerID: 13 + mosaicPosition: {x: 2669, y: 716} + flatten: 0 + isImported: 1 + isVisible: 1 + - name: "\u6E29\u63A7\u5668 " + spriteName: "\u6E29\u63A7\u5668 " + isGroup: 0 + parentIndex: 0 + spriteID: a668fcd0f8a7c154da3ba9c448c7ff7a + layerID: 3 + mosaicPosition: {x: 4, y: 4} + flatten: 0 + isImported: 1 + isVisible: 1 + - name: "\u98CE\u6247" + spriteName: "\u98CE\u6247" + isGroup: 0 + parentIndex: 0 + spriteID: 8507261c86be68d4cac19f17617c4bd2 + layerID: 4 + mosaicPosition: {x: 3380, y: 4} + flatten: 0 + isImported: 1 + isVisible: 1 + sharedRigPSDLayers: [] + pSDLayerImportSetting: [] + importFileNodeState: 1 + platformSettingsDirtyTick: 0 + spriteSizeExpandChanged: 0 + generateGOHierarchy: 0 + textureAssetName: + prefabAssetName: + spriteLibAssetName: + skeletonAssetName: + secondarySpriteTextures: [] diff --git a/Assets/Resources/Yarn/FP_Peipei2/Start.yarn b/Assets/Resources/Yarn/FP_Peipei2/Start.yarn index dcdf73130..ec41d7ae5 100644 --- a/Assets/Resources/Yarn/FP_Peipei2/Start.yarn +++ b/Assets/Resources/Yarn/FP_Peipei2/Start.yarn @@ -123,7 +123,7 @@ colorID: 1 <> <> <> -<> +<>x <> <> <> @@ -132,6 +132,9 @@ colorID: 1 <> <> <> +<> + <> +<> <> <> <> diff --git a/Assets/Scenes/PeipeiFixScene.unity b/Assets/Scenes/PeipeiFixScene.unity index 87de5f69e..56148abb5 100644 --- a/Assets/Scenes/PeipeiFixScene.unity +++ b/Assets/Scenes/PeipeiFixScene.unity @@ -1741,12 +1741,12 @@ Transform: m_GameObject: {fileID: 110632226} serializedVersion: 2 m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: -30.589087, y: -0.108584344, z: -0.022224218} + m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: - - {fileID: 709172887} - {fileID: 746183474} + - {fileID: 709172887} m_Father: {fileID: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!114 &110632229 @@ -13180,7 +13180,7 @@ Transform: m_GameObject: {fileID: 709172886} serializedVersion: 2 m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: -0.2, y: 0.65, z: -9.977776} + m_LocalPosition: {x: -30.789087, y: 0.54141563, z: -10} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: @@ -13582,7 +13582,7 @@ Transform: m_GameObject: {fileID: 746183473} serializedVersion: 2 m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 70.3, y: 0, z: -21.866077} + m_LocalPosition: {x: 40, y: 0, z: -10} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: @@ -13605,7 +13605,7 @@ MonoBehaviour: - m_Script m_LockStageInInspector: m_StreamingVersion: 20170927 - m_Priority: 10 + m_Priority: 9 m_StandbyUpdate: 2 m_LookAt: {fileID: 0} m_Follow: {fileID: 0} diff --git a/Assets/Scenes/Persistence.unity b/Assets/Scenes/Persistence.unity index 1ca487c43..ca838c49e 100644 --- a/Assets/Scenes/Persistence.unity +++ b/Assets/Scenes/Persistence.unity @@ -8082,7 +8082,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 1 + m_IsActive: 0 --- !u!224 &614046222 RectTransform: m_ObjectHideFlags: 0 @@ -9336,7 +9336,7 @@ MonoBehaviour: - {fileID: 11400000, guid: afc5b01ef301cc74db7cae741acad427, type: 2} - {fileID: 11400000, guid: 9e3b2c77ad4a9454188d458da2cf0ddd, type: 2} - {fileID: 11400000, guid: e749fe0f9aa32f44097e037f52a5bfe0, type: 2} - runMode: 2 + runMode: 0 firstTalkSo: {fileID: 11400000, guid: ac5ca9a66ff22ab4b9cd5adbdade6b8c, type: 2} testTalkSo: {fileID: 11400000, guid: e749fe0f9aa32f44097e037f52a5bfe0, type: 2} saveFileName: "PeipeiDay2_\u5F00\u573A\u5BF9\u8BDD" @@ -9436,7 +9436,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 1 + m_IsActive: 0 --- !u!224 &731599308 RectTransform: m_ObjectHideFlags: 0 @@ -25351,10 +25351,10 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3} m_Name: m_EditorClassIdentifier: - m_UiScaleMode: 0 + m_UiScaleMode: 1 m_ReferencePixelsPerUnit: 100 m_ScaleFactor: 1 - m_ReferenceResolution: {x: 800, y: 600} + m_ReferenceResolution: {x: 1920, y: 1080} m_ScreenMatchMode: 0 m_MatchWidthOrHeight: 0 m_PhysicalUnit: 3 @@ -39365,7 +39365,7 @@ MonoBehaviour: m_ScaleFactor: 1 m_ReferenceResolution: {x: 1920, y: 1080} m_ScreenMatchMode: 0 - m_MatchWidthOrHeight: 0.5 + m_MatchWidthOrHeight: 0 m_PhysicalUnit: 3 m_FallbackScreenDPI: 96 m_DefaultSpriteDPI: 96 diff --git a/Assets/Scripts/FixSystem/Effect/MouseFollowEffect.cs b/Assets/Scripts/FixSystem/Effect/MouseFollowEffect.cs index 241f4f516..86220ac85 100644 --- a/Assets/Scripts/FixSystem/Effect/MouseFollowEffect.cs +++ b/Assets/Scripts/FixSystem/Effect/MouseFollowEffect.cs @@ -102,9 +102,8 @@ public class MouseFollowAndZoom : MonoBehaviour { // 获取鼠标位置 Vector3 mousePosition = Input.mousePosition; - mousePosition.x += viewOffset; // 添加偏移量 Vector3 worldPosition = Camera.main.ScreenToWorldPoint(mousePosition); - RaycastHit2D hit = Physics2D.Raycast(worldPosition, Vector2.zero); + RaycastHit2D hit = Physics2D.Raycast(worldPosition+viewCamera.transform.position-Camera.main.transform.position, Vector2.zero); // 检查是否有目标 if (hit.collider != null && hit.collider.CompareTag("EyeTarget")) diff --git a/Assets/Scripts/Framework/AudioKit/AudioManager.cs b/Assets/Scripts/Framework/AudioKit/AudioManager.cs index 65ab6c030..e7263a245 100644 --- a/Assets/Scripts/Framework/AudioKit/AudioManager.cs +++ b/Assets/Scripts/Framework/AudioKit/AudioManager.cs @@ -54,7 +54,6 @@ namespace AibisDream.Kit { _ambInstance = RuntimeManager.CreateInstance(ambEvent); _ambInstance.start(); - _ambInstance.set3DAttributes(transform.position.To3DAttributes()); } public void ChangeAmb(AmbState state) @@ -135,11 +134,11 @@ namespace AibisDream.Kit _voiceInstance.release(); } - if (string.IsNullOrEmpty(dialogText.actor.voicePath) || FModEx.IsEventExist(dialogText.actor.VoicePath)) + if (string.IsNullOrEmpty(dialogText.actor.voicePath) || !FModEx.IsEventExist(dialogText.actor.VoicePath)) { return; } - + _voiceInstance = RuntimeManager.CreateInstance(dialogText.actor.VoicePath); _voiceInstance.start(); } diff --git a/Assets/Scripts/Framework/OtherKit/SpriteGroupKit.cs b/Assets/Scripts/Framework/OtherKit/SpriteGroupKit.cs index 8ab37f615..8a396affa 100644 --- a/Assets/Scripts/Framework/OtherKit/SpriteGroupKit.cs +++ b/Assets/Scripts/Framework/OtherKit/SpriteGroupKit.cs @@ -59,10 +59,18 @@ namespace AibisDream.Framework // 再新建 InstantiateGroup(); // 把PSD名字填进去 - config = new SpriteGroupConfig + // 加载配置文件,没有就空着 + if (ConfigUtil.Instance.TryGetSpriteConfig(config.key, out var oldConfig)) { - key = spriteGroup.name - }; + config = oldConfig; + } + else + { + config = new SpriteGroupConfig() + { + key = spriteGroup.name + }; + } } else { diff --git a/Assets/Scripts/Game Loop/GameLoopManager.cs b/Assets/Scripts/Game Loop/GameLoopManager.cs index 86937241c..d34cf59e6 100644 --- a/Assets/Scripts/Game Loop/GameLoopManager.cs +++ b/Assets/Scripts/Game Loop/GameLoopManager.cs @@ -16,11 +16,10 @@ namespace AibisDream { #region 运行模式相关 - [Header("可用so合集")] - public TalkSceneSO[] totalSceneSos; + [Header("可用so合集")] public TalkSceneSO[] totalSceneSos; public RunMode runMode; - + [Header("生产环境数据(一般不动)")] public TalkSceneSO firstTalkSo; [Header("单场景测试")] public TalkSceneSO testTalkSo; [Header("存档测试")] public string saveFileName; @@ -28,13 +27,13 @@ namespace AibisDream #endregion private TalkSceneSO _currentTalkSceneSo; - + public void Start() { + #if UNITY_EDITOR if (runMode == RunMode.SingleScene) { - MainUIController.Instance.TVFadeOut(1); StartMenu.Instance.HideStartMenu(); StartSingleSceneTest(); } @@ -44,16 +43,27 @@ namespace AibisDream StartMenu.Instance.HideStartMenu(); StartCoroutine(LoadSaveFile($"{TestSaveFilePath}/{saveFileName}")); } + else + { + StartCoroutine(LoadClinicOut()); + } #else + StartCoroutine(LoadClinicScene()) runMode = RunMode.Product; #endif } + + private IEnumerator LoadClinicOut() + { + yield return SceneLoader.Instance.LoadSceneAsync("ClinicOut"); + FindObjectOfType().SetTimeOfDayCommand("day"); + yield return FindObjectOfType().FadeInActorByName("医生", 0.1f); + } + public void StartWithTalkSceneSO(TalkSceneSO sceneSO) { _currentTalkSceneSo = sceneSO; StartCoroutine(LoadScene()); - - } public void StartNewGame() @@ -74,13 +84,12 @@ namespace AibisDream StartMenu.Instance.HideStartMenu(); DialogController.Instance.StartDialog(_currentTalkSceneSo.yarnProject); } + private IEnumerator LoadScene() { yield return SceneLoader.Instance.LoadSceneAsync(_currentTalkSceneSo.firstSceneName); StartMenu.Instance.HideStartMenu(); DialogController.Instance.StartDialog(_currentTalkSceneSo.yarnProject); - MainUIController.Instance.TVFadeOut(1); - //MainUIController.Instance.HideMainUI(); } public IEnumerator NextSceneSo() @@ -116,7 +125,7 @@ namespace AibisDream // 状态机 private string _fixStateArgs; private FixState _fixState; - + public override void OnSingletonInit() { _dialogStorage = FindObjectOfType(); @@ -168,7 +177,7 @@ namespace AibisDream _fixState = saveFile["fixState"]!.ToObject(); _fixStateArgs = saveFile["fixStateArgs"]!.ToString(); yield return FixSystemCenter.StateMachine.SwitchState(_fixState, _fixStateArgs); - + // 开启对话 DialogController.Instance.LoadDialog(_currentTalkSceneSo.yarnProject); } @@ -190,9 +199,9 @@ namespace AibisDream // 保存场景数据 saveFile["curSceneKey"] = _curSceneKey; saveFile["curTalkSceneSo"] = _currentTalkSceneSo.name; - + // 保存状态机数据 - saveFile["fixState"] = (int) _fixState; + saveFile["fixState"] = (int)_fixState; saveFile["fixStateArgs"] = _fixStateArgs; // 存为Json @@ -212,7 +221,7 @@ namespace AibisDream _dialogStorage.TryGetValue("$gameStage", out string gameStage); gameStageStr = gameStage; } - + return $"{SaveFilePath}/{_currentTalkSceneSo.name}_{gameStageStr}_{DateTime.Now:yyyyMMdd_HHmmss}"; } diff --git a/ProjectSettings/ProjectSettings.asset b/ProjectSettings/ProjectSettings.asset index aea1b8045..14d214e28 100644 --- a/ProjectSettings/ProjectSettings.asset +++ b/ProjectSettings/ProjectSettings.asset @@ -100,7 +100,7 @@ PlayerSettings: xboxEnableFitness: 0 visibleInBackground: 1 allowFullscreenSwitch: 1 - fullscreenMode: 3 + fullscreenMode: 1 xboxSpeechDB: 0 xboxEnableHeadOrientation: 0 xboxEnableGuest: 0 @@ -154,7 +154,7 @@ PlayerSettings: androidSupportedAspectRatio: 1 androidMaxAspectRatio: 2.1 applicationIdentifier: - Standalone: com.DefaultCompany.AIBIS-Dream + Standalone: com.Tin-Bird.Love-RobotRepair buildNumber: Standalone: 0 VisionOS: 0