Compare commits

...
67 Commits
Author SHA1 Message Date
Jackie Liu de45ada269 Fixing sort order 2023-04-02 05:33:12 -07:00
Jackie Liu 5e42873ca2 v0.62 2023-04-02 05:07:57 -07:00
Jackie Liu 6a0648e3de BigMap UI rework + improve button navigation 2023-04-02 04:52:59 -07:00
Jackie Liu 9a114775dd Fix iOS build issue 2023-04-02 03:23:21 -07:00
Jackie Liu 45f5aefbaa Downgrade Unity version to 2022.2.12f1 to pass the CI 2023-04-02 03:00:46 -07:00
Jackie Liu f54efce2eb Rework on game init view 2023-04-02 02:55:12 -07:00
Jackie Liu 758e37cfab Code refactoring 2023-04-01 18:05:06 -07:00
Jiaqi Liu a9f9b5efdd v0.61 2023-04-01 04:51:05 -07:00
Jiaqi Liu f7a3a77130 Fix a bug where info notes might block user interaction on buttons 2023-04-01 04:49:27 -07:00
Jiaqi Liu 97bc1a9c80 Remove unused log code 2023-04-01 02:59:15 -07:00
Jiaqi Liu 45bbca6c78 Fix another bug related to resolution scale changing on iOS devices 2023-04-01 02:58:47 -07:00
Jiaqi Liu cfcf7fd493 Workaround on iOS to enable SSAO without affecting blur shader on startup 2023-04-01 02:35:54 -07:00
Jiaqi Liu 188056e260 Disable game icon compression 2023-04-01 01:47:28 -07:00
Jiaqi Liu b55eca02bc Bug fixes 2023-04-01 01:17:43 -07:00
Jackie Liu 4ff25872a0 Reset anchored position after returning to main menu 2023-03-31 23:10:14 -07:00
Jackie Liu 9c6a742db6 Save settings after initialization 2023-03-31 22:23:10 -07:00
Jackie Liu a9b1fab282 Minor fix 2023-03-31 22:13:39 -07:00
Jackie Liu fd3bf05aee Persist settings when exit main menu 2023-03-31 22:06:16 -07:00
Jackie Liu 11480c0fda Bump bundle version 2023-03-31 21:38:22 -07:00
Jackie Liu 1404ad41e6 v0.60 2023-03-31 21:37:44 -07:00
Jackie Liu 86b82feecc Add resolution setting for non-standalone devices 2023-03-31 20:42:23 -07:00
Jackie Liu 488797d118 Update virtual joystick icons 2023-03-31 20:08:03 -07:00
Jackie Liu 041f3ba2e9 Implement settings in main menu 2023-03-31 18:51:16 -07:00
Jackie Liu cb0982d69c Implement dialogue popup/hide animation 2023-03-31 15:05:39 -07:00
Jiaqi Liu 9024de3920 Implement rounded frosted glass shader + UI tweaks 2023-03-31 02:12:51 -07:00
Jiaqi Liu fbcba999aa Upgrade input system package 2023-03-31 00:35:37 -07:00
Jackie Liu 0247d19677 UI tweaks 2023-03-30 03:22:53 -07:00
Jackie Liu 31416dd1df UI Code refactoring Part 2 2023-03-30 02:52:19 -07:00
Jackie Liu f660dacfa6 UI Code refactoring Part 1 2023-03-29 02:21:23 -07:00
Jackie Liu a7648df691 Create .gitattributes 2023-03-28 20:21:12 -07:00
Jackie Liu 273fd398ff Update quality settings 2023-03-28 00:34:29 -07:00
Jackie Liu 5d7595970e Update READMEs to include dependencies 2023-03-27 02:38:55 -07:00
Jackie Liu 57d1da275f v0.52 2023-03-26 00:31:55 -07:00
Jackie Liu 07bf42ee04 Support and enable game folder picker for Android devices 2023-03-26 00:30:18 -07:00
Jackie Liu 2fe8e61032 Allow custom game data folder selection on standalone devices only 2023-03-25 20:01:29 -07:00
Jackie Liu 10d9cc9eca Translate few Strings into Chinese in SimpleFileBrowser 2023-03-25 19:23:09 -07:00
Jiaqi Liu 86a698d66d Search all possible game data file locations when possible (#13)
* Search all possible game data file locations when possible

* Add checks for gameDataFolderSearchLocations queue

* Update README
2023-03-26 09:06:07 +08:00
Jackie Liu efba3b899b Bug fixes 2023-03-24 23:02:55 -07:00
Jackie Liu c369b1cf14 Disable light and shadow toggle in open source build
Disable light and shadow toggle in open source build since toon materials will not be available anyway
2023-03-24 20:25:05 -07:00
Jackie Liu 8e7f6bdbe0 Add version info in README 2023-03-24 19:15:24 -07:00
Jiaqi Liu d37348e503 Delete activation.yml 2023-03-25 09:40:14 +08:00
Jackie Liu 79435a7edb [CI] Update CI files and README 2023-03-24 18:37:06 -07:00
Jackie Liu 68026452c5 [CI] Fixed a bug in main.yml 2023-03-24 14:08:53 -07:00
Jackie Liu bd3243213c [CI] Update action versions 2023-03-24 14:07:58 -07:00
Jiaqi Liu bae12e066d [CI] Revert versioning method to Semantic 2023-03-24 04:54:52 -07:00
Jiaqi Liu c57b4aaf78 [CI] Use Tag as versioning method 2023-03-24 04:41:46 -07:00
Jiaqi Liu e5449c0f06 [CI] Update main.yml 2023-03-24 04:14:53 -07:00
Jiaqi Liu 54344ead7f [CI] Fix syntax issue in main.yml 2023-03-24 03:41:26 -07:00
Jiaqi Liu f26636ca8c [CI] Bug fixes 2023-03-24 03:39:08 -07:00
Jiaqi Liu 7ea58826cf [CI] Fix issues in main.yml 2023-03-24 03:37:28 -07:00
Jiaqi Liu c957519b50 [CI] Correcting build artifact names 2023-03-24 03:09:20 -07:00
Jackie Liu 95208f5328 Update READMEs 2023-03-24 00:46:12 -07:00
Jackie Liu 74a1cd88e2 Update README.md and add README.en-US.md 2023-03-24 00:29:32 -07:00
Jackie Liu ddc1e7565b Add workflow build badge to README.md 2023-03-23 23:20:11 -07:00
Jackie Liu 255103b36a [CI] Set allowDirtyBuild for PAL3 build job 2023-03-23 22:59:50 -07:00
Jackie Liu 6155eca8ce [CI] Add build steps for PAL3A 2023-03-23 22:56:56 -07:00
Jackie Liu a0d6b9c725 Update ProjectSettings.asset 2023-03-23 22:33:35 -07:00
Jackie Liu 5276462b8e Update main.yml 2023-03-23 22:17:19 -07:00
Jackie Liu 5081dfd0d1 [CI] Add main.yml 2023-03-23 21:27:48 -07:00
Jackie Liu c2c69497d2 [CI] Add activation.yml 2023-03-23 21:03:32 -07:00
Jackie Liu d05637763b Implement editor option to zip release files 2023-03-23 20:28:03 -07:00
Jiaqi Liu 3e8c0b2979 Create XCode project for MacOS build in build pipelines script 2023-03-23 01:23:18 -07:00
Jiaqi Liu f1bd8a57db Improve SetDisplaySafeAreaCompatibilityModeProcessor logic to handle two types of builds for MacOS 2023-03-23 01:15:06 -07:00
Jiaqi Liu 94c8e824d2 Upgrade Unity version to 2022.2.12 + Finishing up BuildPipelines 2023-03-23 00:06:26 -07:00
Jackie Liu b49a24caf7 Implement in-editor build pipelines 2023-03-22 21:41:03 -07:00
Jackie Liu fba2ff7481 Code refactoring 2023-03-22 20:28:49 -07:00
Jackie Liu f621ab34b4 Implement helper command to decompile all dialogues to file 2023-03-22 06:06:25 -07:00
138 changed files with 97794 additions and 93829 deletions

No files matched your search

+24
View File
@@ -0,0 +1,24 @@
# * text=auto
# Unity files
*.anim text eol=lf
*.asmdef text eol=lf
*.asset text eol=lf
*.controller text eol=lf
*.mat text eol=lf
*.meta text eol=lf
*.overrideController text eol=lf
*.prefab text eol=lf
*.preset text eol=lf
*.spriteatlas text eol=lf
*.unity text eol=lf
*.mixer text eol=lf
*.renderTexture text eol=lf
*.json text eol=lf
*.xml text eol=lf
# Source files
*.sln text eol=crlf
*.csproj text eol=crlf
*.cs text eol=crlf
*.shader text eol=crlf
+9
View File
@@ -0,0 +1,9 @@
version: 2
updates:
- package-ecosystem: "github-actions"
# default location of `.github/workflows`
directory: "/"
schedule:
interval: "weekly"
commit-message:
prefix: 'action-deps: '
@@ -0,0 +1,35 @@
name: Builds - PAL3 - Mono - Android
on: [push, pull_request]
jobs:
build_pal3_mono_android:
name: Build PAL3 for ${{ matrix.targetPlatform }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
targetPlatform:
- Android # Build an Android .apk standalone app.
steps:
- uses: actions/checkout@v3.5.0
with:
fetch-depth: 0
lfs: true
- uses: actions/cache@v3.3.1
with:
path: Library
key: Library-${{ matrix.targetPlatform }}
restore-keys: Library-
- uses: game-ci/unity-builder@v2
env:
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
with:
targetPlatform: ${{ matrix.targetPlatform }}
buildName: PAL3
versioning: Semantic
- uses: actions/upload-artifact@v3.1.2
with:
name: PAL3-Mono-${{ matrix.targetPlatform }}
path: build/${{ matrix.targetPlatform }}
retention-days: 14
+31
View File
@@ -0,0 +1,31 @@
name: Builds - PAL3 - Mono - iOS
on: [push, pull_request]
jobs:
build_pal3_mono_ios:
name: Build PAL3 for ${{ matrix.targetPlatform }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
targetPlatform:
- iOS # Build an iOS player.
steps:
- uses: actions/checkout@v3.5.0
with:
fetch-depth: 0
lfs: true
- uses: actions/cache@v3.3.1
with:
path: Library
key: Library-${{ matrix.targetPlatform }}
restore-keys: Library-
- uses: game-ci/unity-builder@v2
env:
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
with:
targetPlatform: ${{ matrix.targetPlatform }}
buildName: PAL3
versioning: Semantic
# do not upload artifacts for iOS builds
@@ -0,0 +1,35 @@
name: Builds - PAL3 - Mono - Linux
on: [push, pull_request]
jobs:
build_pal3_mono_linux:
name: Build PAL3 for ${{ matrix.targetPlatform }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
targetPlatform:
- StandaloneLinux64 # Build a Linux 64-bit standalone.
steps:
- uses: actions/checkout@v3.5.0
with:
fetch-depth: 0
lfs: true
- uses: actions/cache@v3.3.1
with:
path: Library
key: Library-${{ matrix.targetPlatform }}
restore-keys: Library-
- uses: game-ci/unity-builder@v2
env:
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
with:
targetPlatform: ${{ matrix.targetPlatform }}
buildName: PAL3
versioning: Semantic
- uses: actions/upload-artifact@v3.1.2
with:
name: PAL3-Mono-${{ matrix.targetPlatform }}
path: build/${{ matrix.targetPlatform }}
retention-days: 14
@@ -0,0 +1,35 @@
name: Builds - PAL3 - Mono - MacOS
on: [push, pull_request]
jobs:
build_pal3_mono_macos:
name: Build PAL3 for ${{ matrix.targetPlatform }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
targetPlatform:
- StandaloneOSX # Build a macOS standalone (Intel 64-bit).
steps:
- uses: actions/checkout@v3.5.0
with:
fetch-depth: 0
lfs: true
- uses: actions/cache@v3.3.1
with:
path: Library
key: Library-${{ matrix.targetPlatform }}
restore-keys: Library-
- uses: game-ci/unity-builder@v2
env:
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
with:
targetPlatform: ${{ matrix.targetPlatform }}
buildName: PAL3
versioning: Semantic
- uses: actions/upload-artifact@v3.1.2
with:
name: PAL3-Mono-${{ matrix.targetPlatform }}
path: build/${{ matrix.targetPlatform }}
retention-days: 14
@@ -0,0 +1,36 @@
name: Builds - PAL3 - Mono - Windows
on: [push, pull_request]
jobs:
build_pal3_mono_windows:
name: Build PAL3 for ${{ matrix.targetPlatform }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
targetPlatform:
- StandaloneWindows # Build a Windows standalone.
- StandaloneWindows64 # Build a Windows 64-bit standalone.
steps:
- uses: actions/checkout@v3.5.0
with:
fetch-depth: 0
lfs: true
- uses: actions/cache@v3.3.1
with:
path: Library
key: Library-${{ matrix.targetPlatform }}
restore-keys: Library-
- uses: game-ci/unity-builder@v2
env:
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
with:
targetPlatform: ${{ matrix.targetPlatform }}
buildName: PAL3
versioning: Semantic
- uses: actions/upload-artifact@v3.1.2
with:
name: PAL3-Mono-${{ matrix.targetPlatform }}
path: build/${{ matrix.targetPlatform }}
retention-days: 14
@@ -0,0 +1,48 @@
name: Builds - PAL3A - Mono - Android
on: [push, pull_request]
jobs:
build_pal3a_mono_android:
name: Build PAL3A for ${{ matrix.targetPlatform }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
targetPlatform:
- Android # Build an Android .apk standalone app.
steps:
- uses: actions/checkout@v3.5.0
with:
fetch-depth: 0
lfs: true
- name: Switch define symbol from PAL3 to PAL3A
uses: jacobtomlinson/gha-find-replace@v3
with:
find: "PAL3"
replace: "PAL3A"
include: "**ProjectSettings.asset"
- name: Replace PAL3 game icon with PAL3A one
uses: jacobtomlinson/gha-find-replace@v3
with:
find: "6b32649dccc45df4ebe8e3f8eccee249"
replace: "d03d417e5660d5849939c8fe43732dbd"
include: "**ProjectSettings.asset"
- uses: actions/cache@v3.3.1
with:
path: Library
key: Library-${{ matrix.targetPlatform }}
restore-keys: Library-
- uses: game-ci/unity-builder@v2
env:
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
with:
allowDirtyBuild: true
targetPlatform: ${{ matrix.targetPlatform }}
buildName: PAL3A
versioning: Semantic
- uses: actions/upload-artifact@v3.1.2
with:
name: PAL3A-Mono-${{ matrix.targetPlatform }}
path: build/${{ matrix.targetPlatform }}
retention-days: 14
@@ -0,0 +1,44 @@
name: Builds - PAL3A - Mono - iOS
on: [push, pull_request]
jobs:
build_pal3a_mono_ios:
name: Build PAL3A for ${{ matrix.targetPlatform }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
targetPlatform:
- iOS # Build an iOS player.
steps:
- uses: actions/checkout@v3.5.0
with:
fetch-depth: 0
lfs: true
- name: Switch define symbol from PAL3 to PAL3A
uses: jacobtomlinson/gha-find-replace@v3
with:
find: "PAL3"
replace: "PAL3A"
include: "**ProjectSettings.asset"
- name: Replace PAL3 game icon with PAL3A one
uses: jacobtomlinson/gha-find-replace@v3
with:
find: "6b32649dccc45df4ebe8e3f8eccee249"
replace: "d03d417e5660d5849939c8fe43732dbd"
include: "**ProjectSettings.asset"
- uses: actions/cache@v3.3.1
with:
path: Library
key: Library-${{ matrix.targetPlatform }}
restore-keys: Library-
- uses: game-ci/unity-builder@v2
env:
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
with:
allowDirtyBuild: true
targetPlatform: ${{ matrix.targetPlatform }}
buildName: PAL3A
versioning: Semantic
# do not upload artifacts for iOS builds
@@ -0,0 +1,48 @@
name: Builds - PAL3A - Mono - Linux
on: [push, pull_request]
jobs:
build_pal3a_mono_linux:
name: Build PAL3A for ${{ matrix.targetPlatform }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
targetPlatform:
- StandaloneLinux64 # Build a Linux 64-bit standalone.
steps:
- uses: actions/checkout@v3.5.0
with:
fetch-depth: 0
lfs: true
- name: Switch define symbol from PAL3 to PAL3A
uses: jacobtomlinson/gha-find-replace@v3
with:
find: "PAL3"
replace: "PAL3A"
include: "**ProjectSettings.asset"
- name: Replace PAL3 game icon with PAL3A one
uses: jacobtomlinson/gha-find-replace@v3
with:
find: "6b32649dccc45df4ebe8e3f8eccee249"
replace: "d03d417e5660d5849939c8fe43732dbd"
include: "**ProjectSettings.asset"
- uses: actions/cache@v3.3.1
with:
path: Library
key: Library-${{ matrix.targetPlatform }}
restore-keys: Library-
- uses: game-ci/unity-builder@v2
env:
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
with:
allowDirtyBuild: true
targetPlatform: ${{ matrix.targetPlatform }}
buildName: PAL3A
versioning: Semantic
- uses: actions/upload-artifact@v3.1.2
with:
name: PAL3A-Mono-${{ matrix.targetPlatform }}
path: build/${{ matrix.targetPlatform }}
retention-days: 14
@@ -0,0 +1,48 @@
name: Builds - PAL3A - Mono - MacOS
on: [push, pull_request]
jobs:
build_pal3a_mono_macos:
name: Build PAL3A for ${{ matrix.targetPlatform }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
targetPlatform:
- StandaloneOSX # Build a macOS standalone (Intel 64-bit).
steps:
- uses: actions/checkout@v3.5.0
with:
fetch-depth: 0
lfs: true
- name: Switch define symbol from PAL3 to PAL3A
uses: jacobtomlinson/gha-find-replace@v3
with:
find: "PAL3"
replace: "PAL3A"
include: "**ProjectSettings.asset"
- name: Replace PAL3 game icon with PAL3A one
uses: jacobtomlinson/gha-find-replace@v3
with:
find: "6b32649dccc45df4ebe8e3f8eccee249"
replace: "d03d417e5660d5849939c8fe43732dbd"
include: "**ProjectSettings.asset"
- uses: actions/cache@v3.3.1
with:
path: Library
key: Library-${{ matrix.targetPlatform }}
restore-keys: Library-
- uses: game-ci/unity-builder@v2
env:
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
with:
allowDirtyBuild: true
targetPlatform: ${{ matrix.targetPlatform }}
buildName: PAL3A
versioning: Semantic
- uses: actions/upload-artifact@v3.1.2
with:
name: PAL3A-Mono-${{ matrix.targetPlatform }}
path: build/${{ matrix.targetPlatform }}
retention-days: 14
@@ -0,0 +1,49 @@
name: Builds - PAL3A - Mono - Windows
on: [push, pull_request]
jobs:
build_pal3a_mono_windows:
name: Build PAL3A for ${{ matrix.targetPlatform }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
targetPlatform:
- StandaloneWindows # Build a Windows standalone.
- StandaloneWindows64 # Build a Windows 64-bit standalone.
steps:
- uses: actions/checkout@v3.5.0
with:
fetch-depth: 0
lfs: true
- name: Switch define symbol from PAL3 to PAL3A
uses: jacobtomlinson/gha-find-replace@v3
with:
find: "PAL3"
replace: "PAL3A"
include: "**ProjectSettings.asset"
- name: Replace PAL3 game icon with PAL3A one
uses: jacobtomlinson/gha-find-replace@v3
with:
find: "6b32649dccc45df4ebe8e3f8eccee249"
replace: "d03d417e5660d5849939c8fe43732dbd"
include: "**ProjectSettings.asset"
- uses: actions/cache@v3.3.1
with:
path: Library
key: Library-${{ matrix.targetPlatform }}
restore-keys: Library-
- uses: game-ci/unity-builder@v2
env:
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
with:
allowDirtyBuild: true
targetPlatform: ${{ matrix.targetPlatform }}
buildName: PAL3A
versioning: Semantic
- uses: actions/upload-artifact@v3.1.2
with:
name: PAL3A-Mono-${{ matrix.targetPlatform }}
path: build/${{ matrix.targetPlatform }}
retention-days: 14
@@ -536,7 +536,7 @@ MonoBehaviour:
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text: Cancel
m_Text: "\u53D6\u6D88"
--- !u!1 &1000010571070120
GameObject:
m_ObjectHideFlags: 0
@@ -1806,7 +1806,7 @@ MonoBehaviour:
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text: Search...
m_Text: "\u641C\u7D22..."
--- !u!1 &1000011474259412
GameObject:
m_ObjectHideFlags: 0
@@ -5094,7 +5094,7 @@ MonoBehaviour:
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text: Show hidden files
m_Text: "\u663E\u793A\u9690\u85CF\u6587\u4EF6"
--- !u!1 &1017798384541682
GameObject:
m_ObjectHideFlags: 0
@@ -6640,7 +6640,7 @@ MonoBehaviour:
m_PressedTrigger: Pressed
m_SelectedTrigger: Highlighted
m_DisabledTrigger: Disabled
m_Interactable: 1
m_Interactable: 0
m_TargetGraphic: {fileID: 114938008637452676}
m_OnClick:
m_PersistentCalls:
@@ -301,7 +301,7 @@ namespace SimpleFileBrowser
}
}
private static string m_foldersFilterText = "Folders";
private static string m_foldersFilterText = "文件夹";
public static string FoldersFilterText
{
get { return m_foldersFilterText; }
@@ -1027,7 +1027,7 @@ namespace SimpleFileBrowser
if( FileBrowserHelpers.ShouldUseSAF )
{
AddQuickLink( m_skin.DriveIcon, PickFolderQuickLinkText, SAF_PICK_FOLDER_QUICK_LINK_PATH );
try
{
FetchPersistedSAFQuickLinks();
@@ -1145,7 +1145,7 @@ namespace SimpleFileBrowser
// {
// driveName = "Drive " + driveIndex++;
// }
//}
//}
string driveName;
if( !defaultPathInitialized )
@@ -2,20 +2,24 @@
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2180264
Material:
serializedVersion: 6
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: LiberationSans SDF Material
m_Shader: {fileID: 4800000, guid: fe393ace9b354375a9cb14cdbbc28be4, type: 3}
m_ShaderKeywords:
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords: []
m_InvalidKeywords: []
m_LightmapFlags: 1
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
@@ -67,6 +71,7 @@ Material:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _Ambient: 0.5
- _Bevel: 0.5
@@ -107,9 +112,9 @@ Material:
- _Parallax: 0.02
- _PerspectiveFilter: 0.875
- _Reflectivity: 10
- _ScaleRatioA: 0.90909094
- _ScaleRatioA: 0.9
- _ScaleRatioB: 0.73125
- _ScaleRatioC: 0.7386364
- _ScaleRatioC: 0.73125
- _ScaleX: 1
- _ScaleY: 1
- _ShaderFlags: 0
@@ -148,6 +153,7 @@ Material:
- _ReflectOutlineColor: {r: 0, g: 0, b: 0, a: 1}
- _SpecularColor: {r: 1, g: 1, b: 1, a: 1}
- _UnderlayColor: {r: 0, g: 0, b: 0, a: 0.5}
m_BuildTextureStacks: []
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
@@ -165,15 +171,16 @@ MonoBehaviour:
materialHashCode: 462855346
m_Version: 1.1.0
m_SourceFontFileGUID: e3265ab4bf004d28a9537516768c1c75
m_SourceFontFile_EditorRef: {fileID: 12800000, guid: e3265ab4bf004d28a9537516768c1c75,
type: 3}
m_SourceFontFile_EditorRef: {fileID: 12800000, guid: e3265ab4bf004d28a9537516768c1c75, type: 3}
m_SourceFontFile: {fileID: 12800000, guid: e3265ab4bf004d28a9537516768c1c75, type: 3}
m_AtlasPopulationMode: 1
m_FaceInfo:
m_FaceIndex: 0
m_FamilyName: Liberation Sans
m_StyleName: Regular
m_PointSize: 86
m_Scale: 1
m_UnitsPerEM: 0
m_LineHeight: 98.8916
m_AscentLine: 77.853516
m_CapLine: 59
@@ -313,15 +320,21 @@ Texture2D:
Hash: 00000000000000000000000000000000
m_ForcedFallbackFormat: 4
m_DownscaleFallback: 0
m_IsAlphaChannelOptional: 0
serializedVersion: 2
m_Width: 0
m_Height: 0
m_CompleteImageSize: 0
m_MipsStripped: 0
m_TextureFormat: 1
m_MipCount: 1
m_IsReadable: 1
m_IsPreProcessed: 0
m_IgnoreMipmapLimit: 0
m_MipmapLimitGroupName:
m_StreamingMipmaps: 0
m_StreamingMipmapsPriority: 0
m_VTOnly: 0
m_AlphaIsTransparency: 0
m_ImageCount: 1
m_TextureDimension: 2
@@ -335,9 +348,11 @@ Texture2D:
m_WrapW: 0
m_LightmapFormat: 0
m_ColorSpace: 0
m_PlatformBlob:
image data: 0
_typelessdata:
m_StreamData:
serializedVersion: 2
offset: 0
size: 0
path:
File diff suppressed because it is too large. Load diff
Binary file not shown.
@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 06415fcd9086a4b3b9cb0804bf1013aa
guid: 9e1d886e63529bb4ca3c95ece3e3189c
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
Binary file not shown.
@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 7626a558c078543429fe82dd67dabac9
guid: d96ea4d5faefce3439cfdd534fc1656b
TrueTypeFontImporter:
externalObjects: {}
serializedVersion: 4
@@ -9,7 +9,7 @@ TrueTypeFontImporter:
characterPadding: 1
includeFontData: 1
fontNames:
- Cascadia Code
- LXGW WenKai
fallbackFontReferences: []
customCharacters:
fontRenderingMode: 0
File diff suppressed because it is too large. Load diff
@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 2fdfd4ee855cc4e2ca02ab45b140b645
guid: 129c820b154da074e821d870a3627120
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 62722665bcac243b09727c19bb9e6eb1
guid: dcba7b37316258447a7e7b8a9faefba8
TrueTypeFontImporter:
externalObjects: {}
serializedVersion: 4
@@ -9,7 +9,7 @@ TrueTypeFontImporter:
characterPadding: 1
includeFontData: 1
fontNames:
- Source Han Sans CN
- Slidexiaxing
fallbackFontReferences: []
customCharacters:
fontRenderingMode: 0
+1 -1
View File
@@ -1 +1 @@
!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~·—‘’“”…、。《》【】!(),:;?~+一丁七万丈三上下不与丐丑专且世丘丙业丛东丝丢两严丧个丫中丰串临丸丹为主丽举乃久么义之乌乍乎乏乐乔乖乘乙九乞也习乡书乩买乱乳乾了予争事二于亏云互五井亚些亡交亥亦产亨亩享京亭亮亲人亿什仁仃仅仆仇今介仍从仑仓仔仕他仗付仙仞代令以仪们仰仲仵件价任份仿企伉伍伎伏伐休众优伙会伟传伤伦伪伯估伴伶伸伺似但位低住佐佑体何佘余佛作你佣佩佬佯佳佼使侄侈例侍供依侠侣侥侧侬侮侯侵便促俊俏俐俗保俞信俨俩俪俭修俯俱俸俺倍倏們倒倔倘候倚倜借倦倩倪债值倾假偌偏偕做停健偶偷偿傀傅傍傥储催傲傻像僧僵僻儒儡儿允元兄充兆先光克免兑兔党兢入全八公六兮兰共关兴兵其具典兹养兼兽冀内冈册再冒冕写军农冠冢冤冥冬冯冰冲决况冶冷冻净凄准凉凋凌减凑凛凝几凡凤凭凰凶出击函凿刀刁刃分切刎刑划列刘则刚创初判刨利别刮到制刹刺刻剁剂剃削剌前剐剑剔剖剥剧剩剪副割剿劈力劝办功加务劣动助努劫励劲劳劾势勇勉勘募勤勺勾勿匀包匆匕化北匙匠匪匹区医匾匿十千升午卉半华协卑卒卓单卖南博卜卞占卡卢卦卧卫卯印危即却卵卷卸卿厂厄厅历厉压厌厕厘厚原厢厥厨厮去县叁参又及友双反发叔取受变叛叟口古句另叨叩只叫召叮可台史右叵叶号司叹叽吁吃各吆合吉吊同名后吏吐向吓吕吖吗君吝吞吟否吧吩含听吭启吴吵吸吹吼吾呀呃呆呈告呐呔呕呗员呜呢呦周呱味呵呶呸呻呼命咄咋和咎咏咐咒咔咕咙咦咧咪咬咱咳咶咸咻咽咿哀品哄哇哈哉响哎哑哗哟哥哦哨哩哪哭哮哲哼唆唇唉唐唔唠唤唧唬售唯唱唾啃商啊啥啦啧啬啰啸啼啾喀喂喃善喉喊喋喏喔喘喙喜喝喧喳喵喷喻喽嗅嗓嗔嗖嗜嗟嗤嗦嗨嗬嗯嗳嗽嘀嘉嘎嘘嘛嘞嘟嘱嘲嘴嘻嘿噎噗噜噢噤器噩噪噬噱嚎嚏嚣嚷嚼囊囔囚四回因团园困围固国图圃圆圈土圣在地场圾均坊坍坎坏坐坑块坚坛坝坟坠坡坤坦坪坷垂垃型垒垢垣垫垮埃埋城域埠埤培基堂堆堇堕堡堤堪堰堵塌塑塔塘塞填塾境墓墙墚增墟墨壁壑壤士壬壮声壳壶壹处备复夏夕外夙多夜够大天太夫夭央失头夷夸夹夺奇奈奉奋奎奏契奔奖套奠奢奥女奴奶奸她好如妃妄妆妇妈妍妒妓妖妙妞妥妨妹妻妾姊始姐姑姓委姗姚姜姥姨姬姻姿威娃娄娇娘娜娟娥娲娴娶娼婆婉婕婚婢婪婴婵婶婷婿媒媚媳媵嫁嫂嫉嫌嫔嫖嫡嫣嫦嫩嬉嬷子孑孓孔孕字存孙孚孝孟季孤学孩孪孬孰孵孺孽宁它宅宇守安宋完宏宗官宙定宜宝实宠客宣室宦宫宰害宴宵家容宽宾宿寂寄寅密寇富寐寒寝寞察寡寤寨寰寸对寺寻导寿封射将尊小少尔尖尘尚尝尤尬就尴尸尹尺尼尽尾尿局屁层居屈屋屎屏屐屑展属屠屡山屹岁岂岄岌岑岔岖岗岚岛岩岭岱岳岸峙峡峨峭峰峻崇崎崔崖崩崽嵯嶂巍川州巡巢工左巧巨巫差己已巳巴巷巽巾币市布帅师希帐帔帕帖帚帜帝带席帮帷常帼帽幄幅幌幕幢干平年并幸幺幻幼幽广庄庆庇床序庐库应底店庙庚府庞废度座庭庶康庸廉廊廖延廷建廻廿开异弃弄弊式弑弓引弛弟张弥弦弭弯弱弹强归当录彝形彤彦彩彪彭彰影役彻彼往征径待徇很律徐徒徕得徙御循微德心必忆忌忍忒志忘忙忠忡忧快念忽怀态怄怅怎怒怕怖怜思怠急怦性怨怪怯总恃恋恍恐恒恕恙恢恤恨恩恭息恰恳恶恻恼悄悉悍悔悟悠患悦您悬悯悲悴情惆惊惋惑惕惚惜惟惠惦惧惨惩惬惭惮惯想惶惹惺愁愈意愚感愣愤愧愫愿慈慌慎慑慕慢慧慨慰慷憎憾懂懈懒懦懵戈戊戌戎戏成我戒或战戚戟截戮戴户戾房所扁扇扈扉手才扎扑扒打扔托扛扣执扩扫扬扭扮扯扰扳扶批找承技抄把抑抓投抖抗折抚抛抟抢护报披抬抱抵抹押抽拂担拆拈拉拋拍拎拐拒拓拔拖拘拙招拜拟拢拣拥拦拧拨择括拯拳拷拼拽拾拿持挂指按挑挖挟挠挡挣挤挥挨挪挫振挺挽捅捆捉捌捎捏捐捕捞损捡换捣捧据捶捷掀掂授掉掌掏掐排掘掙掠探接控推掩措掳掷掺揉揍描提插揖握揣揪揭援搁搂搅搏搓搔搜搞搬搭携摄摆摇摈摊摔摘摧摩摸撇撑撒撕撞撤播撰擂擅操擎擒擦攀攒攫支收攸改攻放政故效敌敏救教敛敝敞敢散敬数敲整敷文斋斐斑斗料斛斜斟斤斥斧斩断斯新方於施旁旅旋族旗无既日旦旧旨早旬旭旱时旷旺昂昆昊昌明昏易昔昕昙星映春昧昨昭是昴昼显晃晋晌晒晓晕晖晚晦晧晨普景晰晴晶智晾暂暄暇暑暖暗暮暴曜曦曰曲曳更曹曾替最月有朋服朔朗望朝期木未末本术朱朴朵机朽杀杂权杆杈杉李杏材村杖杜杞束杠条来杨杭杯杰杳杵松板极构枉枕林枚果枝枢Line truncated
!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~·—‘’“”…、。《》【】!(),:;?~+一丁七万丈三上下不与丐丑专且世丘丙业丛东丝丢两严丧个丫中丰串临丸丹为主丽举乃久么义之乌乍乎乏乐乔乖乘乙九乞也习乡书乩买乱乳乾了予争事二于亏云互五井亚些亡交亥亦产亨亩享京亭亮亲人亿什仁仃仅仆仇今介仍从仑仓仔仕他仗付仙仞代令以仪们仰仲仵件价任份仿企伉伍伎伏伐休众优伙会伟传伤伦伪伯估伴伶伸伺似但位低住佐佑体何佘余佛作你佣佩佬佯佳佼使侄侈例侍供依侠侣侥侧侬侮侯侵便促俊俏俐俗保俞信俨俩俪俭修俯俱俸俺倍倏們倒倔倘候倚倜借倦倩倪债值倾假偌偏偕做停健偶偷偿傀傅傍傥储催傲傻像僧僵僻儒儡儿允元兄充兆先光克免兑兔党兢入全八公六兮兰共关兴兵其具典兹养兼兽冀内冈册再冒冕写军农冠冢冤冥冬冯冰冲决况冶冷冻净凄准凉凋凌减凑凛凝几凡凤凭凰凶出击函凿刀刁刃分切刎刑划列刘则刚创初判刨利别刮到制刹刺刻剁剂剃削剌前剐剑剔剖剥剧剩剪副割剿劈力劝办功加务劣动助努劫励劲劳劾势勇勉勘募勤勺勾勿匀包匆匕化北匙匠匪匹区医匾匿十千升午卉半华协卑卒卓单卖南博卜卞占卡卢卦卧卫卯印危即却卵卷卸卿厂厄厅历厉压厌厕厘厚原厢厥厨厮去县叁参又及友双反发叔取受变叛叟口古句另叨叩只叫召叮可台史右叵叶号司叹叽吁吃各吆合吉吊同名后吏吐向吓吕吖吗君吝吞吟否吧吩含听吭启吴吵吸吹吼吾呀呃呆呈告呐呔呕呗员呜呢呦周呱味呵呶呸呻呼命咄咋和咎咏咐咒咔咕咙咦咧咪咬咱咳咶咸咻咽咿哀品哄哇哈哉响哎哑哗哟哥哦哨哩哪哭哮哲哼唆唇唉唐唔唠唤唧唬售唯唱唾啃商啊啥啦啧啬啰啸啼啾喀喂喃善喉喊喋喏喔喘喙喜喝喧喳喵喷喻喽嗅嗓嗔嗖嗜嗟嗤嗦嗨嗬嗯嗳嗽嘀嘉嘎嘘嘛嘞嘟嘱嘲嘴嘻嘿噎噗噜噢噤器噩噪噬噱嚎嚏嚣嚷嚼囊囔囚四回因团园困围固国图圃圆圈土圣在地场圾均坊坍坎坏坐坑块坚坛坝坟坠坡坤坦坪坷垂垃型垒垢垣垫垮埃埋城域埠埤培基堂堆堇堕堡堤堪堰堵塌塑塔塘塞填塾境墓墙墚增墟墨壁壑壤士壬壮声壳壶壹处备复夏夕外夙多夜够大天太夫夭央失头夷夸夹夺奇奈奉奋奎奏契奔奖套奠奢奥女奴奶奸她好如妃妄妆妇妈妍妒妓妖妙妞妥妨妹妻妾姊始姐姑姓委姗姚姜姥姨姬姻姿威娃娄娇娘娜娟娥娲娴娶娼婆婉婕婚婢婪婴婵婶婷婿媒媚媳媵嫁嫂嫉嫌嫔嫖嫡嫣嫦嫩嬉嬷子孑孓孔孕字存孙孚孝孟季孤学孩孪孬孰孵孺孽宁它宅宇守安宋完宏宗官宙定宜宝实宠客宣室宦宫宰害宴宵家容宽宾宿寂寄寅密寇富寐寒寝寞察寡寤寨寰寸对寺寻导寿封射将尊小少尔尖尘尚尝尤尬就尴尸尹尺尼尽尾尿局屁层居屈屋屎屏屐屑展属屠屡山屹岁岂岄岌岑岔岖岗岚岛岩岭岱岳岸峙峡峨峭峰峻崇崎崔崖崩崽嵯嶂巍川州巡巢工左巧巨巫差己已巳巴巷巽巾币市布帅师希帐帔帕帖帚帜帝带席帮帷常帼帽幄幅幌幕幢干平年并幸幺幻幼幽广庄庆庇床序庐库应底店庙庚府庞废度座庭庶康庸廉廊廖延廷建廻廿开异弃弄弊式弑弓引弛弟张弥弦弭弯弱弹强归当录彝形彤彦彩彪彭彰影役彻彼往征径待徇很律徐徒徕得徙御循微德心必忆忌忍忒志忘忙忠忡忧快念忽怀态怄怅怎怒怕怖怜思怠急怦性怨怪怯总恃恋恍恐恒恕恙恢恤恨恩恭息恰恳恶恻恼悄悉悍悔悟悠患悦您悬悯悲悴情惆惊惋惑惕惚惜惟惠惦惧惨惩惬惭惮惯想惶惹惺愁愈意愚感愣愤愧愫愿慈慌慎慑慕慢慧慨慰慷憎憾懂懈懒懦懵戈戊戌戎戏成我戒或战戚戟截戮戴户戾房所扁扇扈扉手才扎扑扒打扔托扛扣执扩扫扬扭扮扯扰扳扶批找承技抄把抑抓投抖抗折抚抛抟抢护报披抬抱抵抹押抽拂担拆拈拉拋拍拎拐拒拓拔拖拘拙招拜拟拢拣拥拦拧拨择括拯拳拷拼拽拾拿持挂指按挑挖挟挠挡挣挤挥挨挪挫振挺挽捅捆捉捌捎捏捐捕捞损捡换捣捧据捶捷掀掂授掉掌掏掐排掘掙掠探接控推掩措掳掷掺揉揍描提插揖握揣揪揭援搁搂搅搏搓搔搜搞搬搭携摄摆摇摈摊摔摘摧摩摸撇撑撒撕撞撤播撰擂擅操擎擒擦攀攒攫支收攸改攻放政故效敌敏救教敛敝敞敢散敬数敲整敷文斋斐斑斗料斛斜斟斤斥斧斩断斯新方於施旁旅旋族旗无既日旦旧旨早旬旭旱时旷旺昂昆昊昌明昏易昔昕昙星映春昧昨昭是昴昼显晃晋晌晒晓晕晖晚晦晧晨普景晰晴晶智晾暂暄暇暑暖暗暮暴曜曦曰曲曳更曹曾替最月有朋服朔朗望朝期木未末本术朱朴朵机朽杀杂权杆杈杉李杏材村杖杜杞束杠条来杨杭杯杰杳杵松板极构枉枕林枚果枝枢Line truncated
+16
View File
@@ -0,0 +1,16 @@
!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~·—‘’“”…、。《》【】!(),:;?~+
新的游戏
从存档继续
保存游戏
成功失败
关闭开启
实时光影
剧情测试选项
迷宫入口出口
或剧情点
选择
退出游戏
返回游戏
仙剑奇侠传三
外传问情篇
B站@柒才
@@ -1,6 +1,6 @@
fileFormatVersion: 2
guid: 6c6f55d45332bf34096a5ca9a5567681
PrefabImporter:
guid: 9cc10928f15fb6f4da9082d8125a6f9f
TextScriptImporter:
externalObjects: {}
userData:
assetBundleName:
@@ -1,8 +1,8 @@
fileFormatVersion: 2
guid: 9f26248a5279c4394abd7cd3dc2237f1
NativeFormatImporter:
guid: 8823f9f10b6763c4dbd59d68ba269fb3
folderAsset: yes
DefaultImporter:
externalObjects: {}
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:
Binary file not shown.
@@ -0,0 +1,23 @@
fileFormatVersion: 2
guid: ef4f7d0e73df0c14cbb42013105ca702
AudioImporter:
externalObjects: {}
serializedVersion: 7
defaultSettings:
serializedVersion: 2
loadType: 0
sampleRateSetting: 0
sampleRateOverride: 44100
compressionFormat: 1
quality: 1
conversionMode: 0
preloadAudioData: 0
platformSettingOverrides: {}
forceToMono: 0
normalize: 1
loadInBackground: 0
ambisonic: 0
3D: 1
userData:
assetBundleName:
assetBundleVariant:
Binary file not shown.
@@ -0,0 +1,23 @@
fileFormatVersion: 2
guid: 02dc80fb0da96d54390fb6d139807b52
AudioImporter:
externalObjects: {}
serializedVersion: 7
defaultSettings:
serializedVersion: 2
loadType: 0
sampleRateSetting: 0
sampleRateOverride: 44100
compressionFormat: 1
quality: 1
conversionMode: 0
preloadAudioData: 0
platformSettingOverrides: {}
forceToMono: 0
normalize: 1
loadInBackground: 0
ambisonic: 0
3D: 1
userData:
assetBundleName:
assetBundleVariant:
@@ -1,272 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &799485479191424804
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 7665318269030240274}
- component: {fileID: 8486152655749950645}
- component: {fileID: 5457408955285932580}
- component: {fileID: 3588581382288908559}
- component: {fileID: 8507618148138075644}
m_Layer: 0
m_Name: BigMapRegionButton
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &7665318269030240274
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 799485479191424804}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 7011635990956946161}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0, y: 0}
--- !u!222 &8486152655749950645
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 799485479191424804}
m_CullTransparentMesh: 1
--- !u!114 &5457408955285932580
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 799485479191424804}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0}
m_Type: 1
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!114 &3588581382288908559
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 799485479191424804}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Navigation:
m_Mode: 0
m_WrapAround: 0
m_SelectOnUp: {fileID: 0}
m_SelectOnDown: {fileID: 0}
m_SelectOnLeft: {fileID: 0}
m_SelectOnRight: {fileID: 0}
m_Transition: 1
m_Colors:
m_NormalColor: {r: 0.15686275, g: 0.15686275, b: 0.15686275, a: 0.78431374}
m_HighlightedColor: {r: 0.11764706, g: 0.29411766, b: 0.54901963, a: 0.78431374}
m_PressedColor: {r: 0.078431375, g: 0.19607843, b: 0.39215687, a: 0.78431374}
m_SelectedColor: {r: 0.11764706, g: 0.29411766, b: 0.54901963, a: 0.78431374}
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
m_ColorMultiplier: 1
m_FadeDuration: 0.1
m_SpriteState:
m_HighlightedSprite: {fileID: 0}
m_PressedSprite: {fileID: 0}
m_SelectedSprite: {fileID: 0}
m_DisabledSprite: {fileID: 0}
m_AnimationTriggers:
m_NormalTrigger: Normal
m_HighlightedTrigger: Highlighted
m_PressedTrigger: Pressed
m_SelectedTrigger: Selected
m_DisabledTrigger: Disabled
m_Interactable: 1
m_TargetGraphic: {fileID: 5457408955285932580}
m_OnClick:
m_PersistentCalls:
m_Calls: []
--- !u!114 &8507618148138075644
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 799485479191424804}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 15a694426cb54e98813a4c9a84640435, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &8820756242259669652
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 7011635990956946161}
- component: {fileID: 4505268126575713709}
- component: {fileID: 8244961573134555549}
m_Layer: 0
m_Name: Text (TMP)
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &7011635990956946161
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8820756242259669652}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 7665318269030240274}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &4505268126575713709
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8820756242259669652}
m_CullTransparentMesh: 1
--- !u!114 &8244961573134555549
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8820756242259669652}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_text: "\u8700\u5C71"
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 06415fcd9086a4b3b9cb0804bf1013aa, type: 2}
m_sharedMaterial: {fileID: 697520991437178811, guid: 06415fcd9086a4b3b9cb0804bf1013aa, type: 2}
m_fontSharedMaterials: []
m_fontMaterial: {fileID: 0}
m_fontMaterials: []
m_fontColor32:
serializedVersion: 2
rgba: 3707764735
m_fontColor: {r: 1, g: 1, b: 1, a: 0.8627451}
m_enableVertexGradient: 0
m_colorMode: 3
m_fontColorGradient:
topLeft: {r: 1, g: 1, b: 1, a: 1}
topRight: {r: 1, g: 1, b: 1, a: 1}
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
bottomRight: {r: 1, g: 1, b: 1, a: 1}
m_fontColorGradientPreset: {fileID: 0}
m_spriteAsset: {fileID: 0}
m_tintAllSprites: 0
m_StyleSheet: {fileID: 0}
m_TextStyleHashCode: -1183493901
m_overrideHtmlColors: 0
m_faceColor:
serializedVersion: 2
rgba: 4294967295
m_fontSize: 26
m_fontSizeBase: 26
m_fontWeight: 400
m_enableAutoSizing: 0
m_fontSizeMin: 18
m_fontSizeMax: 72
m_fontStyle: 0
m_HorizontalAlignment: 2
m_VerticalAlignment: 512
m_textAlignment: 65535
m_characterSpacing: 0
m_wordSpacing: 0
m_lineSpacing: 0
m_lineSpacingMax: 0
m_paragraphSpacing: 0
m_charWidthMaxAdj: 0
m_enableWordWrapping: 1
m_wordWrappingRatios: 0.4
m_overflowMode: 0
m_linkedTextComponent: {fileID: 0}
parentLinkedComponent: {fileID: 0}
m_enableKerning: 1
m_enableExtraPadding: 0
checkPaddingRequired: 0
m_isRichText: 1
m_parseCtrlCharacters: 1
m_isOrthographic: 1
m_isCullingEnabled: 0
m_horizontalMapping: 0
m_verticalMapping: 0
m_uvLineOffset: 0
m_geometrySortingOrder: 0
m_IsTextObjectScaleStatic: 0
m_VertexBufferAutoSizeReduction: 0
m_useMaxVisibleDescender: 1
m_pageToDisplay: 1
m_margin: {x: 0, y: 0, z: 0, w: 0}
m_isUsingLegacyAnimationComponent: 0
m_isVolumetricText: 0
m_hasFontAssetChanged: 0
m_baseMaterial: {fileID: 0}
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
@@ -211,8 +211,8 @@ MonoBehaviour:
m_Calls: []
m_text: Rand.mv3
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 2fdfd4ee855cc4e2ca02ab45b140b645, type: 2}
m_sharedMaterial: {fileID: 1781445408255303159, guid: 2fdfd4ee855cc4e2ca02ab45b140b645, type: 2}
m_fontAsset: {fileID: 11400000, guid: 9e1d886e63529bb4ca3c95ece3e3189c, type: 2}
m_sharedMaterial: {fileID: 2847917559404452115, guid: 9e1d886e63529bb4ca3c95ece3e3189c, type: 2}
m_fontSharedMaterials: []
m_fontMaterial: {fileID: 0}
m_fontMaterials: []
@@ -347,8 +347,8 @@ MonoBehaviour:
m_Calls: []
m_text:
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 2fdfd4ee855cc4e2ca02ab45b140b645, type: 2}
m_sharedMaterial: {fileID: 1781445408255303159, guid: 2fdfd4ee855cc4e2ca02ab45b140b645, type: 2}
m_fontAsset: {fileID: 11400000, guid: 9e1d886e63529bb4ca3c95ece3e3189c, type: 2}
m_sharedMaterial: {fileID: 2847917559404452115, guid: 9e1d886e63529bb4ca3c95ece3e3189c, type: 2}
m_fontSharedMaterials: []
m_fontMaterial: {fileID: 0}
m_fontMaterials: []
@@ -493,6 +493,7 @@ Canvas:
m_OverridePixelPerfect: 0
m_SortingBucketNormalizedSize: 0
m_AdditionalShaderChannelsFlag: 25
m_UpdateRectTransformForStandalone: 0
m_SortingLayerID: 0
m_SortingOrder: 0
m_TargetDisplay: 0
@@ -586,9 +587,17 @@ Camera:
m_projectionMatrixMode: 1
m_GateFitMode: 2
m_FOVAxisMode: 0
m_Iso: 200
m_ShutterSpeed: 0.005
m_Aperture: 16
m_FocusDistance: 10
m_FocalLength: 50
m_BladeCount: 5
m_Curvature: {x: 2, y: 11}
m_BarrelClipping: 0.25
m_Anamorphism: 0
m_SensorSize: {x: 36, y: 24}
m_LensShift: {x: 0, y: 0}
m_FocalLength: 50
m_NormalizedViewPortRect:
serializedVersion: 2
x: 0
@@ -884,8 +893,8 @@ MonoBehaviour:
m_Calls: []
m_text: Rand.pol
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 2fdfd4ee855cc4e2ca02ab45b140b645, type: 2}
m_sharedMaterial: {fileID: 1781445408255303159, guid: 2fdfd4ee855cc4e2ca02ab45b140b645, type: 2}
m_fontAsset: {fileID: 11400000, guid: 9e1d886e63529bb4ca3c95ece3e3189c, type: 2}
m_sharedMaterial: {fileID: 2847917559404452115, guid: 9e1d886e63529bb4ca3c95ece3e3189c, type: 2}
m_fontSharedMaterials: []
m_fontMaterial: {fileID: 0}
m_fontMaterials: []
@@ -1019,8 +1028,8 @@ MonoBehaviour:
m_Calls: []
m_text: Rand.mp3
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 2fdfd4ee855cc4e2ca02ab45b140b645, type: 2}
m_sharedMaterial: {fileID: 1781445408255303159, guid: 2fdfd4ee855cc4e2ca02ab45b140b645, type: 2}
m_fontAsset: {fileID: 11400000, guid: 9e1d886e63529bb4ca3c95ece3e3189c, type: 2}
m_sharedMaterial: {fileID: 2847917559404452115, guid: 9e1d886e63529bb4ca3c95ece3e3189c, type: 2}
m_fontSharedMaterials: []
m_fontMaterial: {fileID: 0}
m_fontMaterials: []
@@ -1212,8 +1221,8 @@ MonoBehaviour:
m_Calls: []
m_text:
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 2fdfd4ee855cc4e2ca02ab45b140b645, type: 2}
m_sharedMaterial: {fileID: 1781445408255303159, guid: 2fdfd4ee855cc4e2ca02ab45b140b645, type: 2}
m_fontAsset: {fileID: 11400000, guid: 9e1d886e63529bb4ca3c95ece3e3189c, type: 2}
m_sharedMaterial: {fileID: 2847917559404452115, guid: 9e1d886e63529bb4ca3c95ece3e3189c, type: 2}
m_fontSharedMaterials: []
m_fontMaterial: {fileID: 0}
m_fontMaterials: []
@@ -1367,8 +1376,8 @@ MonoBehaviour:
m_Calls: []
m_text: Rand.cvd
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 2fdfd4ee855cc4e2ca02ab45b140b645, type: 2}
m_sharedMaterial: {fileID: 1781445408255303159, guid: 2fdfd4ee855cc4e2ca02ab45b140b645, type: 2}
m_fontAsset: {fileID: 11400000, guid: 9e1d886e63529bb4ca3c95ece3e3189c, type: 2}
m_sharedMaterial: {fileID: 2847917559404452115, guid: 9e1d886e63529bb4ca3c95ece3e3189c, type: 2}
m_fontSharedMaterials: []
m_fontMaterial: {fileID: 0}
m_fontMaterials: []
@@ -1646,8 +1655,8 @@ MonoBehaviour:
m_Calls: []
m_text:
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 2fdfd4ee855cc4e2ca02ab45b140b645, type: 2}
m_sharedMaterial: {fileID: 1781445408255303159, guid: 2fdfd4ee855cc4e2ca02ab45b140b645, type: 2}
m_fontAsset: {fileID: 11400000, guid: 9e1d886e63529bb4ca3c95ece3e3189c, type: 2}
m_sharedMaterial: {fileID: 2847917559404452115, guid: 9e1d886e63529bb4ca3c95ece3e3189c, type: 2}
m_fontSharedMaterials: []
m_fontMaterial: {fileID: 0}
m_fontMaterials: []
@@ -2164,6 +2173,7 @@ Canvas:
m_OverridePixelPerfect: 0
m_SortingBucketNormalizedSize: 0
m_AdditionalShaderChannelsFlag: 25
m_UpdateRectTransformForStandalone: 0
m_SortingLayerID: 0
m_SortingOrder: 0
m_TargetDisplay: 0
@@ -2436,6 +2446,7 @@ Canvas:
m_OverridePixelPerfect: 0
m_SortingBucketNormalizedSize: 0
m_AdditionalShaderChannelsFlag: 25
m_UpdateRectTransformForStandalone: 0
m_SortingLayerID: 0
m_SortingOrder: 0
m_TargetDisplay: 0
@@ -14,7 +14,7 @@ GameObject:
- component: {fileID: 3588581382288908559}
- component: {fileID: 3965248316395714309}
m_Layer: 0
m_Name: StorySelectionButton
m_Name: MenuButton
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
@@ -34,7 +34,7 @@ RectTransform:
m_Children:
- {fileID: 7011635990956946161}
m_Father: {fileID: 0}
m_RootOrder: 0
m_RootOrder: -1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
@@ -146,6 +146,7 @@ GameObject:
- component: {fileID: 7011635990956946161}
- component: {fileID: 4505268126575713709}
- component: {fileID: 8244961573134555549}
- component: {fileID: 2825650428422629475}
m_Layer: 0
m_Name: Text (TMP)
m_TagString: Untagged
@@ -203,8 +204,8 @@ MonoBehaviour:
m_Calls: []
m_text: "\u8FF7\u5BAB\u5165\u53E3"
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 06415fcd9086a4b3b9cb0804bf1013aa, type: 2}
m_sharedMaterial: {fileID: 697520991437178811, guid: 06415fcd9086a4b3b9cb0804bf1013aa, type: 2}
m_fontAsset: {fileID: 11400000, guid: 9e1d886e63529bb4ca3c95ece3e3189c, type: 2}
m_sharedMaterial: {fileID: 2847917559404452115, guid: 9e1d886e63529bb4ca3c95ece3e3189c, type: 2}
m_fontSharedMaterials: []
m_fontMaterial: {fileID: 0}
m_fontMaterials: []
@@ -228,8 +229,8 @@ MonoBehaviour:
m_faceColor:
serializedVersion: 2
rgba: 4294967295
m_fontSize: 22
m_fontSizeBase: 22
m_fontSize: 28
m_fontSizeBase: 28
m_fontWeight: 400
m_enableAutoSizing: 0
m_fontSizeMin: 18
@@ -270,3 +271,18 @@ MonoBehaviour:
m_hasFontAssetChanged: 0
m_baseMaterial: {fileID: 0}
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
--- !u!114 &2825650428422629475
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8820756242259669652}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: cfabb0440166ab443bba8876756fdfa9, type: 3}
m_Name:
m_EditorClassIdentifier:
m_EffectColor: {r: 0, g: 0, b: 0, a: 0.5}
m_EffectDistance: {x: 1, y: -1}
m_UseGraphicAlpha: 1
File diff suppressed because it is too large. Load diff
@@ -46,9 +46,17 @@ Camera:
m_projectionMatrixMode: 1
m_GateFitMode: 2
m_FOVAxisMode: 0
m_Iso: 200
m_ShutterSpeed: 0.005
m_Aperture: 16
m_FocusDistance: 10
m_FocalLength: 50
m_BladeCount: 5
m_Curvature: {x: 2, y: 11}
m_BarrelClipping: 0.25
m_Anamorphism: 0
m_SensorSize: {x: 36, y: 24}
m_LensShift: {x: 0, y: 0}
m_FocalLength: 50
m_NormalizedViewPortRect:
serializedVersion: 2
x: 0
@@ -134,6 +142,7 @@ Canvas:
m_OverridePixelPerfect: 0
m_SortingBucketNormalizedSize: 0
m_AdditionalShaderChannelsFlag: 25
m_UpdateRectTransformForStandalone: 0
m_SortingLayerID: 0
m_SortingOrder: 7777
m_TargetDisplay: 0
@@ -321,8 +330,8 @@ MonoBehaviour:
m_Calls: []
m_text:
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 2fdfd4ee855cc4e2ca02ab45b140b645, type: 2}
m_sharedMaterial: {fileID: 1781445408255303159, guid: 2fdfd4ee855cc4e2ca02ab45b140b645, type: 2}
m_fontAsset: {fileID: 11400000, guid: 9e1d886e63529bb4ca3c95ece3e3189c, type: 2}
m_sharedMaterial: {fileID: 2847917559404452115, guid: 9e1d886e63529bb4ca3c95ece3e3189c, type: 2}
m_fontSharedMaterials: []
m_fontMaterial: {fileID: 0}
m_fontMaterials: []
@@ -305,8 +305,8 @@ MonoBehaviour:
m_Calls: []
m_text: Button
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 06415fcd9086a4b3b9cb0804bf1013aa, type: 2}
m_sharedMaterial: {fileID: 697520991437178811, guid: 06415fcd9086a4b3b9cb0804bf1013aa, type: 2}
m_fontAsset: {fileID: 11400000, guid: 9e1d886e63529bb4ca3c95ece3e3189c, type: 2}
m_sharedMaterial: {fileID: 2847917559404452115, guid: 9e1d886e63529bb4ca3c95ece3e3189c, type: 2}
m_fontSharedMaterials: []
m_fontMaterial: {fileID: 0}
m_fontMaterials: []
@@ -1,19 +1,22 @@
// Based on cician's shader from https://forum.unity3d.com/threads/simple-optimized-blur-shader.185327/#post-1267642
// Based on RoundedCorners.shader from https://github.com/kirevdokimov/Unity-UI-Rounded-Corners
// with some modifications
Shader "Pal3/FrostedGlass"
Shader "Pal3/RoundedFrostedGlass"
{
Properties
{
_Size ("Blur", Range(0, 30)) = 1
_BlurAmount ("Blur", Range(0, 30)) = 1
[HideInInspector] _MainTex ("Masking Texture", 2D) = "white" {}
_AdditiveColor ("Additive Tint color", Color) = (0, 0, 0, 0)
_MultiplyColor ("Multiply Tint color", Color) = (1, 1, 1, 1)
_WidthHeightRadius ("WidthHeightRadius", Vector) = (0, 0, 0, 0)
}
Category
{
// We must be transparent, so other objects are drawn before this one.
Tags { "Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Opaque" }
Tags { "Queue" = "Transparent" "IgnoreProjector" = "True" "RenderType" = "Opaque" }
SubShader
{
@@ -73,17 +76,43 @@ Shader "Pal3/FrostedGlass"
return o;
}
inline float roundedRectangle(float2 samplePosition, float absoluteRound, float2 halfSize){
halfSize = halfSize - absoluteRound;
float2 distanceToEdge = abs(samplePosition) - halfSize;
const float outsideDistance = length(max(distanceToEdge, 0));
const float insideDistance = min(max(distanceToEdge.x, distanceToEdge.y), 0);
return outsideDistance + insideDistance - absoluteRound;
}
inline float CalcAlpha(float2 samplePosition, float2 size, float radius){
const float2 samplePositionTranslated = (samplePosition - .5) * size;
const float distToRect = roundedRectangle(samplePositionTranslated, radius * .5, size * .5);
const float distanceChange = fwidth(distToRect) * 0.5;
return smoothstep(distanceChange, -distanceChange, distToRect);
}
inline fixed4 mixAlpha(fixed4 mainTexColor, fixed4 color, float sdfAlpha){
fixed4 col = mainTexColor * color;
col.a = min(col.a, sdfAlpha);
return col;
}
sampler2D _HBlur;
float4 _HBlur_TexelSize;
float _Size;
float _BlurAmount;
float4 _AdditiveColor;
float4 _MultiplyColor;
float4 _WidthHeightRadius;
half4 frag( v2f i ) : COLOR
half4 frag(v2f i) : COLOR
{
const float alpha = CalcAlpha(i.uvmain, _WidthHeightRadius.xy, _WidthHeightRadius.z);
half4 cutoffColor = mixAlpha(tex2D(_MainTex, i.uvmain), _AdditiveColor, alpha);
clip(cutoffColor.a - 0.001);
half4 sum = half4(0,0,0,0);
#define GRABPIXEL(weight,kernelx) tex2Dproj( _HBlur, UNITY_PROJ_COORD(float4(i.uvgrab.x + _HBlur_TexelSize.x * kernelx * _Size, i.uvgrab.y, i.uvgrab.z, i.uvgrab.w))) * weight
#define GRABPIXEL(weight,kernelx) tex2Dproj( _HBlur, UNITY_PROJ_COORD(float4(i.uvgrab.x + _HBlur_TexelSize.x * kernelx * _BlurAmount, i.uvgrab.y, i.uvgrab.z, i.uvgrab.w))) * weight
sum += GRABPIXEL(0.05, -4.0);
sum += GRABPIXEL(0.09, -3.0);
@@ -133,7 +162,7 @@ Shader "Pal3/FrostedGlass"
sampler2D _MainTex;
float4 _MainTex_ST;
v2f vert (appdata_t v) {
v2f vert(appdata_t v) {
v2f o;
o.vertex = UnityObjectToClipPos(v.vertex);
@@ -151,17 +180,43 @@ Shader "Pal3/FrostedGlass"
return o;
}
inline float roundedRectangle(float2 samplePosition, float absoluteRound, float2 halfSize){
halfSize = halfSize - absoluteRound;
float2 distanceToEdge = abs(samplePosition) - halfSize;
const float outsideDistance = length(max(distanceToEdge, 0));
const float insideDistance = min(max(distanceToEdge.x, distanceToEdge.y), 0);
return outsideDistance + insideDistance - absoluteRound;
}
inline float CalcAlpha(float2 samplePosition, float2 size, float radius){
const float2 samplePositionTranslated = (samplePosition - .5) * size;
const float distToRect = roundedRectangle(samplePositionTranslated, radius * .5, size * .5);
const float distanceChange = fwidth(distToRect) * 0.5;
return smoothstep(distanceChange, -distanceChange, distToRect);
}
inline fixed4 mixAlpha(fixed4 mainTexColor, fixed4 color, float sdfAlpha){
fixed4 col = mainTexColor * color;
col.a = min(col.a, sdfAlpha);
return col;
}
sampler2D _VBlur;
float4 _VBlur_TexelSize;
float _Size;
float _BlurAmount;
float4 _AdditiveColor;
float4 _MultiplyColor;
float4 _WidthHeightRadius;
half4 frag( v2f i ) : COLOR
half4 frag(v2f i) : COLOR
{
const float alpha = CalcAlpha(i.uvmain, _WidthHeightRadius.xy, _WidthHeightRadius.z);
half4 cutoffColor = mixAlpha(tex2D(_MainTex, i.uvmain), _AdditiveColor, alpha);
clip(cutoffColor.a - 0.001);
half4 sum = half4(0,0,0,0);
#define GRABPIXEL(weight,kernely) tex2Dproj( _VBlur, UNITY_PROJ_COORD(float4(i.uvgrab.x, i.uvgrab.y + _VBlur_TexelSize.y * kernely * _Size, i.uvgrab.z, i.uvgrab.w))) * weight
#define GRABPIXEL(weight, kernely) tex2Dproj( _VBlur, UNITY_PROJ_COORD(float4(i.uvgrab.x, i.uvgrab.y + _VBlur_TexelSize.y * kernely * _BlurAmount, i.uvgrab.z, i.uvgrab.w))) * weight
sum += GRABPIXEL(0.05, -4.0);
sum += GRABPIXEL(0.09, -3.0);
@@ -173,11 +228,12 @@ Shader "Pal3/FrostedGlass"
sum += GRABPIXEL(0.09, +3.0);
sum += GRABPIXEL(0.05, +4.0);
half4 result = half4(sum.r * _MultiplyColor.r + _AdditiveColor.r,
half4 blurResult = half4(sum.r * _MultiplyColor.r + _AdditiveColor.r,
sum.g * _MultiplyColor.g + _AdditiveColor.g,
sum.b * _MultiplyColor.b + _AdditiveColor.b,
tex2D(_MainTex, i.uvmain).a);
return result;
return blurResult;
}
ENDCG
}
-32
View File
@@ -1,32 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Pal3FrostedGlass
m_Shader: {fileID: 4800000, guid: 7207745e33764e88af7a51d39feb7b81, type: 3}
m_ShaderKeywords:
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _MainTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _Size: 3.5
m_Colors:
- _AdditiveColor: {r: 0, g: 0, b: 0, a: 0}
- _MultiplyColor: {r: 0.6862745, g: 0.6862745, b: 0.6862745, a: 1}
m_BuildTextureStacks: []
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

-122
View File
@@ -1,122 +0,0 @@
fileFormatVersion: 2
guid: b042769710026324a9269973c819f8dc
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 11
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
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMasterTextureLimit: 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: 0
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: 1
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
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: 4
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Server
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
nameFileIdTable: {}
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1012 B

-122
View File
@@ -1,122 +0,0 @@
fileFormatVersion: 2
guid: 5fb27d4a1e32bab4dbe09f858449820d
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 11
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
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMasterTextureLimit: 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: 0
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: 1
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
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: 4
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Server
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
nameFileIdTable: {}
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

-122
View File
@@ -1,122 +0,0 @@
fileFormatVersion: 2
guid: 19c174c730286934280bdf4570be1ec4
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 11
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
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMasterTextureLimit: 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: 0
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: 1
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
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: 4
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Server
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
nameFileIdTable: {}
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:
File renamed without changes.

Before

Width:  |  Height:  |  Size: 329 B

After

Width:  |  Height:  |  Size: 329 B

+5 -4
View File
@@ -20,11 +20,12 @@ TextureImporter:
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
flipGreenChannel: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMasterTextureLimit: 0
ignoreMipmapLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
@@ -63,6 +64,7 @@ TextureImporter:
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
swizzle: 50462976
cookieLightType: 0
platformSettings:
- serializedVersion: 3
@@ -70,7 +72,7 @@ TextureImporter:
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
textureCompression: 0
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
@@ -139,9 +141,8 @@ TextureImporter:
weights: []
secondaryTextures: []
nameFileIdTable: {}
spritePackingTag:
mipmapLimitGroupName:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:
+5 -4
View File
@@ -20,11 +20,12 @@ TextureImporter:
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
flipGreenChannel: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMasterTextureLimit: 0
ignoreMipmapLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
@@ -63,6 +64,7 @@ TextureImporter:
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
swizzle: 50462976
cookieLightType: 0
platformSettings:
- serializedVersion: 3
@@ -70,7 +72,7 @@ TextureImporter:
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
textureCompression: 0
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
@@ -139,9 +141,8 @@ TextureImporter:
weights: []
secondaryTextures: []
nameFileIdTable: {}
spritePackingTag:
mipmapLimitGroupName:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:
File renamed without changes.

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 597 B

@@ -1,9 +1,9 @@
fileFormatVersion: 2
guid: 1cea1d9e411f34a6f8841b03f00feef6
guid: 377b848599f332f4caff9cf7c7d2128a
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 11
serializedVersion: 12
mipmaps:
mipMapMode: 0
enableMipMap: 0
@@ -20,11 +20,12 @@ TextureImporter:
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
flipGreenChannel: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMasterTextureLimit: 0
ignoreMipmapLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
@@ -63,12 +64,14 @@ TextureImporter:
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
swizzle: 50462976
cookieLightType: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: 4
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
@@ -138,9 +141,8 @@ TextureImporter:
weights: []
secondaryTextures: []
nameFileIdTable: {}
spritePackingTag:
mipmapLimitGroupName:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 275 B

@@ -1,9 +1,9 @@
fileFormatVersion: 2
guid: ae6bfbdbb96b54d86991f396e7a66dae
guid: 2e5e9c4a8e1d0ce4facdbcd386364eda
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 11
serializedVersion: 12
mipmaps:
mipMapMode: 0
enableMipMap: 0
@@ -20,11 +20,12 @@ TextureImporter:
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
flipGreenChannel: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMasterTextureLimit: 0
ignoreMipmapLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
@@ -63,12 +64,14 @@ TextureImporter:
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
swizzle: 50462976
cookieLightType: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: 4
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
@@ -138,9 +141,8 @@ TextureImporter:
weights: []
secondaryTextures: []
nameFileIdTable: {}
spritePackingTag:
mipmapLimitGroupName:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:
Binary file not shown.

Before

Width:  |  Height:  |  Size: 340 B

@@ -21,7 +21,7 @@ namespace Build.Editor
[PostProcessBuild]
public static void ChangeXcodePlist(BuildTarget buildTarget, string pathToBuiltProject)
{
if (buildTarget != BuildTarget.iOS) return;
if (buildTarget != BuildTarget.iOS) return; // Only for iOS
// Get plist
string plistPath = pathToBuiltProject + "/Info.plist";
@@ -3,12 +3,15 @@
// See LICENSE file in the project root for license information.
// ---------------------------------------------------------------------------------------------
#if UNITY_EDITOR_OSX
#if UNITY_EDITOR_OSX && UNITY_STANDALONE_OSX
namespace Build.Editor
{
using System;
using System.IO;
using UnityEditor;
using UnityEditor.Build;
using UnityEditor.Build.Reporting;
using UnityEditor.Callbacks;
using UnityEditor.iOS.Xcode;
using UnityEngine;
@@ -23,11 +26,13 @@ namespace Build.Editor
{
if (buildTarget != BuildTarget.StandaloneOSX) return;
bool isBuiltProjectXCodeProject = !pathToBuiltProject.EndsWith(".app", StringComparison.OrdinalIgnoreCase);
// Get plist
#if PAL3
string plistPath = pathToBuiltProject + "/PAL3/Info.plist";
string plistPath = pathToBuiltProject + (isBuiltProjectXCodeProject ? "/PAL3" : "/Contents") + "/Info.plist";
#elif PAL3A
string plistPath = pathToBuiltProject + "/PAL3A/Info.plist";
string plistPath = pathToBuiltProject + (isBuiltProjectXCodeProject ? "/PAL3A" : "/Contents") + "/Info.plist";
#endif
PlistDocument plist = new PlistDocument();
@@ -44,6 +49,20 @@ namespace Build.Editor
Debug.Log("NSPrefersDisplaySafeAreaCompatibilityMode set to NO.");
}
}
public class MyPostprocessor : IPostprocessBuildWithReport
{
public int callbackOrder => int.MaxValue;
public void OnPostprocessBuild(BuildReport report)
{
if (report.summary.platform != BuildTarget.StandaloneOSX) return;
if (!report.summary.outputPath.EndsWith(".app", StringComparison.OrdinalIgnoreCase)) return;
UnityEditor.OSXStandalone.MacOSCodeSigning.CodeSignAppBundle(report.summary.outputPath);
Debug.Log($"Code re-signed for macOS app: {report.summary.outputPath}");
}
}
}
#endif
@@ -41,7 +41,7 @@ namespace Core.DataReader.Cpk
{
if (!File.Exists(cpkFilePath))
{
throw new ArgumentException($"File does not exists: {cpkFilePath}");
throw new ArgumentException($"游戏数据加载失败,游戏原CPK压缩包不存在: {cpkFilePath}");
}
_filePath = cpkFilePath;
@@ -251,9 +251,14 @@ namespace Core.DataReader.Scn
public string InitAction;
// uint[3] 怪物种类ID
public uint[] MonsterId;
public ushort MonsterNumber;
public ushort MonsterRepeat;
public uint[] MonsterIds;
public byte NumberOfMonsters;
public byte MonsterCanRespawn;
// Empty byte between the memory addresses to align the data in memory.
// NumberOfMonsters and MonsterCanRespawn take 2 bytes in memory, thus we need to
// add 2 more bytes here to align the data in memory (4 bytes).
internal byte[] PaddingBytes;
public ScnPath Path;
@@ -78,9 +78,10 @@ namespace Core.DataReader.Scn
ScriptId = reader.ReadUInt32(),
GameBoxYPosition = reader.ReadSingle(),
InitAction = reader.ReadString(16, codepage),
MonsterId = reader.ReadUInt32Array(3),
MonsterNumber = reader.ReadUInt16(),
MonsterRepeat = reader.ReadUInt16(),
MonsterIds = reader.ReadUInt32Array(3),
NumberOfMonsters = reader.ReadByte(),
MonsterCanRespawn = reader.ReadByte(),
PaddingBytes = reader.ReadBytes(2), // Empty padding bytes to complete 4-byte alignment
Path = new ScnPath()
{
NumberOfWaypoints = reader.ReadInt32(),
@@ -13,6 +13,7 @@ namespace Core.FileSystem
using System.Threading.Tasks;
using DataReader.Cpk;
using UnityEngine;
using Utils;
/// <summary>
/// File system wrapper for CPack archives
@@ -27,8 +28,8 @@ namespace Core.FileSystem
public CpkFileSystem(string rootPath, CrcHash crcHash)
{
rootPath = !string.IsNullOrEmpty(rootPath) ? rootPath : throw new ArgumentNullException(nameof(rootPath));
crcHash = crcHash ?? throw new ArgumentNullException(nameof(crcHash));
rootPath = Requires.IsNotNullOrEmpty(rootPath, nameof(rootPath));
crcHash = Requires.IsNotNull(crcHash, nameof(crcHash));
if (!rootPath.EndsWith(Path.DirectorySeparatorChar))
{
@@ -37,8 +38,7 @@ namespace Core.FileSystem
if (!Directory.Exists(rootPath))
{
var error = "Failed to initialize CpkFileSystem" +
$" since application's root directory does not exists: {rootPath}";
var error = $"游戏数据加载失败,原始游戏数据根目录不存在: {rootPath}";
Debug.LogError(error);
throw new ArgumentException(error);
}
@@ -25,6 +25,7 @@ namespace Core.Services
/// </summary>
/// <typeparam name="T">The type of the service to lookup</typeparam>
/// <returns>The service instance</returns>
/// <exception cref="InvalidOperationException">Thrown if the service is not registered.</exception>
public T Get<T>()
{
if (!_services.ContainsKey(typeof(T)))
@@ -41,11 +42,14 @@ namespace Core.Services
/// </summary>
/// <typeparam name="T">Service typ.</typeparam>
/// <param name="service">Service instance</param>
/// <exception cref="ArgumentNullException">Thrown if the service is null.</exception>
public void Register<T>(T service)
{
if (service == null) throw new ArgumentNullException(nameof(service));
if (_services.ContainsKey(typeof(T)))
{
Debug.LogError($"{typeof(T)} already registered.");
Debug.LogWarning($"{typeof(T)} already registered.");
return;
}
@@ -60,7 +64,7 @@ namespace Core.Services
{
if (!_services.ContainsKey(typeof(T)))
{
Debug.LogError($"Failed to unregister since {typeof(T)} is not registered yet.");
Debug.LogWarning($"Failed to unregister since {typeof(T)} is not registered yet.");
return;
}
+78
View File
@@ -0,0 +1,78 @@
// ---------------------------------------------------------------------------------------------
// Copyright (c) 2021-2023, Jiaqi Liu. All rights reserved.
// See LICENSE file in the project root for license information.
// ---------------------------------------------------------------------------------------------
namespace Core.Utils
{
using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
/// <summary>
/// Checks method arguments for both dotnet objects and Unity objects.
/// </summary>
public static class Requires
{
public static T IsNotNull<T>([NotNull] T instance, string paramName)
where T : class
{
if (typeof(T) == typeof(UnityEngine.Object) ||
typeof(T).IsSubclassOf(typeof(UnityEngine.Object)))
{
if (instance == null)
{
throw new ArgumentNullException(paramName);
}
else
{
return instance;
}
}
if (System.Object.ReferenceEquals(null, instance))
{
throw new ArgumentNullException(paramName);
}
return instance;
}
public static string IsNotNullOrEmpty([NotNull] string value, string paramName)
{
IsNotNull(value, paramName);
if (value == string.Empty)
{
throw new ArgumentException(paramName);
}
return value;
}
public static ICollection<T> IsNotNullOrEmpty<T>([NotNull] ICollection<T> value, string paramName)
{
IsNotNull(value, paramName);
if (!value.Any())
{
throw new ArgumentException("Collection is empty", paramName);
}
return value;
}
public static T[] IsNotNullOrEmpty<T>([NotNull] T[] instances, string paramName)
{
IsNotNull(instances, paramName);
if (instances.Length == 0)
{
throw new ArgumentException("Array is empty", paramName);
}
return instances;
}
}
}
@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 20ce7c5ef43049b8bd382b29499840a0
timeCreated: 1679519446
+1
View File
@@ -29,6 +29,7 @@ namespace Core.Utils
{
name = typeof(T).ToString()
};
_instance = singletonObj.AddComponent<T>();
return _instance;
+6 -2
View File
@@ -25,6 +25,8 @@ namespace Editor
SymbolsHelper.AddSymbol("PAL3");
ApplyPlayerSettingsForVariant("PAL3");
AssetDatabase.SaveAssets();
AssetDatabase.Refresh();
Debug.Log("Switched to PAL3");
}
#if PAL3
@@ -38,9 +40,9 @@ namespace Editor
}
#if PAL3
[MenuItem("PAL3/Switch Variant/PAL3A", priority = 2)]
[MenuItem("PAL3/Switch Variant/PAL3A", priority = 1)]
#elif PAL3A
[MenuItem("PAL3A/Switch Variant/PAL3A", priority = 2)]
[MenuItem("PAL3A/Switch Variant/PAL3A", priority = 1)]
#endif
public static void SwitchToPal3A()
{
@@ -48,6 +50,8 @@ namespace Editor
SymbolsHelper.AddSymbol("PAL3A");
ApplyPlayerSettingsForVariant("PAL3A");
AssetDatabase.SaveAssets();
AssetDatabase.Refresh();
Debug.Log("Switched to PAL3A");
}
#if PAL3
@@ -0,0 +1,290 @@
// ---------------------------------------------------------------------------------------------
// Copyright (c) 2021-2023, Jiaqi Liu. All rights reserved.
// See LICENSE file in the project root for license information.
// ---------------------------------------------------------------------------------------------
namespace Editor
{
using System;
using System.Collections.Generic;
using System.IO;
using System.IO.Compression;
using Pal3.MetaData;
using UnityEditor;
using UnityEditor.Build;
using UnityEditor.Build.Reporting;
using UnityEngine;
#if UNITY_2020_2_OR_NEWER && UNITY_STANDALONE_OSX
using UnityEditor.OSXStandalone;
#endif
[Flags]
public enum Pal3BuildTarget
{
Windows_x86 = 1 << 0,
Windows_x64 = 1 << 1,
Linux_x86_x64 = 1 << 2,
MacOS_arm64_x64 = 1 << 3,
Android = 1 << 4,
iOS = 1 << 5,
}
public static class ReleaseBuildPipeline
{
private static readonly string[] BuildLevels = { "Assets/Scenes/Game.unity" };
private static readonly char PathSeparator = Path.DirectorySeparatorChar;
#if PAL3
[MenuItem("PAL3/Build Pipelines/Build [Windows_x86] IL2CPP Release Executable")]
#elif PAL3A
[MenuItem("PAL3A/Build Pipelines/Build [Windows_x86] IL2CPP Release Executable")]
#endif
public static void Build_Windows_x86()
{
BuildGame(Pal3BuildTarget.Windows_x86);
}
#if PAL3
[MenuItem("PAL3/Build Pipelines/Build [Windows_x64] IL2CPP Release Executable")]
#elif PAL3A
[MenuItem("PAL3A/Build Pipelines/Build [Windows_x64] IL2CPP Release Executable")]
#endif
public static void Build_Windows_x64()
{
BuildGame(Pal3BuildTarget.Windows_x64);
}
#if PAL3
[MenuItem("PAL3/Build Pipelines/Build [Linux_x86_x64] IL2CPP Release Executable")]
#elif PAL3A
[MenuItem("PAL3A/Build Pipelines/Build [Linux_x86_x64] IL2CPP Release Executable")]
#endif
public static void Build_Linux_x86_x64()
{
BuildGame(Pal3BuildTarget.Linux_x86_x64);
}
#if PAL3
[MenuItem("PAL3/Build Pipelines/Build [MacOS_arm64_x64] IL2CPP XCode Project")]
#elif PAL3A
[MenuItem("PAL3A/Build Pipelines/Build [MacOS_arm64_x64] IL2CPP XCode Project")]
#endif
public static void Build_MacOS_arm64_x64()
{
BuildGame(Pal3BuildTarget.MacOS_arm64_x64);
}
#if PAL3
[MenuItem("PAL3/Build Pipelines/Build [Android] IL2CPP Release APK")]
#elif PAL3A
[MenuItem("PAL3A/Build Pipelines/Build [Android] IL2CPP Release APK")]
#endif
public static void Build_Android()
{
BuildGame(Pal3BuildTarget.Android);
}
#if PAL3
[MenuItem("PAL3/Build Pipelines/Build [iOS] IL2CPP XCode Project")]
#elif PAL3A
[MenuItem("PAL3A/Build Pipelines/Build [iOS] IL2CPP XCode Project")]
#endif
public static void Build_iOS()
{
BuildGame(Pal3BuildTarget.iOS);
}
#if PAL3
[MenuItem("PAL3/Build Pipelines/Build All [Windows, Linux, MacOS, Android, iOS]")]
#elif PAL3A
[MenuItem("PAL3A/Build Pipelines/Build All [Windows, Linux, MacOS, Android, iOS]")]
#endif
public static void BuildAll()
{
BuildGame(Pal3BuildTarget.Windows_x86 |
Pal3BuildTarget.Windows_x64 |
Pal3BuildTarget.Linux_x86_x64 |
Pal3BuildTarget.MacOS_arm64_x64 |
Pal3BuildTarget.Android |
Pal3BuildTarget.iOS);
}
#if PAL3
[MenuItem("PAL3/Build Pipelines/Zip Release files [Windows, Linux, Android]")]
#elif PAL3A
[MenuItem("PAL3A/Build Pipelines/Zip Release files [Windows, Linux, Android]")]
#endif
public static void ZipAll()
{
ZipReleaseFiles();
}
private static void BuildGame(Pal3BuildTarget buildTarget)
{
BuildTargetGroup targetGroupBeforeBuild = EditorUserBuildSettings.selectedBuildTargetGroup;
BuildTarget targetBeforeBuild = EditorUserBuildSettings.activeBuildTarget;
string buildOutputPath = EditorUtility.SaveFolderPanel("Choose Location of Built Game", "", "");
if (string.IsNullOrEmpty(buildOutputPath)) return;
buildOutputPath += $"{PathSeparator}{PlayerSettings.bundleVersion}{PathSeparator}";
var buildConfigurations = new[]
{
new { Platform = Pal3BuildTarget.Windows_x86, Extension = ".exe", Group = BuildTargetGroup.Standalone, Target = BuildTarget.StandaloneWindows },
new { Platform = Pal3BuildTarget.Windows_x64, Extension = ".exe", Group = BuildTargetGroup.Standalone, Target = BuildTarget.StandaloneWindows64 },
new { Platform = Pal3BuildTarget.Linux_x86_x64, Extension = "", Group = BuildTargetGroup.Standalone, Target = BuildTarget.StandaloneLinux64 },
new { Platform = Pal3BuildTarget.MacOS_arm64_x64, Extension = "", Group = BuildTargetGroup.Standalone, Target = BuildTarget.StandaloneOSX },
new { Platform = Pal3BuildTarget.Android, Extension = ".apk", Group = BuildTargetGroup.Android, Target = BuildTarget.Android },
new { Platform = Pal3BuildTarget.iOS, Extension = "", Group = BuildTargetGroup.iOS, Target = BuildTarget.iOS },
};
List<Action> logActions = new List<Action>();
foreach (var config in buildConfigurations)
{
if (buildTarget.HasFlag(config.Platform))
{
Build(config.Platform.ToString(),
config.Extension,
config.Group,
config.Target,
buildOutputPath,
logActions);
}
}
// Restore build target settings
EditorUserBuildSettings.SwitchActiveBuildTarget(targetGroupBeforeBuild, targetBeforeBuild);
// Execute report log actions
logActions.ForEach(action => action.Invoke());
Debug.Log($"Build for version {PlayerSettings.bundleVersion} complete! Output path: " +
$"{buildOutputPath}{GameConstants.AppName}");
}
private static void Build(string folderName,
string extension,
BuildTargetGroup buildTargetGroup,
BuildTarget buildTarget,
string buildOutputPath,
List<Action> logActions,
bool deletePdbFiles = true)
{
string outputFolder = buildOutputPath + $"{GameConstants.AppName}{PathSeparator}" +
$"{folderName}{PathSeparator}";
if (buildTarget is BuildTarget.StandaloneWindows
or BuildTarget.StandaloneWindows64
or BuildTarget.StandaloneLinux64)
{
outputFolder += $"{GameConstants.AppName}{PathSeparator}";
}
else if (buildTarget is BuildTarget.StandaloneOSX)
{
#if UNITY_2020_2_OR_NEWER && UNITY_STANDALONE_OSX
UserBuildSettings.architecture = OSArchitecture.x64ARM64;
UserBuildSettings.createXcodeProject = true;
#endif
}
string outputPath = outputFolder + $"{GameConstants.AppName}{extension}";
PlayerSettings.SetScriptingBackend(buildTargetGroup, ScriptingImplementation.IL2CPP);
BuildReport report = BuildPipeline.BuildPlayer(BuildLevels, outputPath, buildTarget, BuildOptions.None);
if (deletePdbFiles)
{
FileUtil.DeleteFileOrDirectory(outputFolder +
$"{GameConstants.AppName}_BackUpThisFolder_ButDontShipItWithYourGame");
}
WriteBuildReport(report, logActions);
}
private static void WriteBuildReport(BuildReport report, List<Action> logActions)
{
switch (report.summary.result)
{
case BuildResult.Succeeded:
string successReport = $"Build [{report.summary.platform}] succeeded. " +
$"Finished in {report.summary.totalTime.TotalMinutes:F2} minutes. " +
$"Build size: {(report.summary.totalSize / 1024f / 1024f):F2} MB";
logActions.Add(() => Debug.Log(successReport));
break;
case BuildResult.Failed:
string errorReport = $"Build [{report.summary.platform}] failed.";
logActions.Add(() => Debug.LogError(errorReport));
break;
case BuildResult.Cancelled:
string cancelReport = $"Build [{report.summary.platform}] cancelled.";
logActions.Add(() => Debug.LogWarning(cancelReport));
break;
case BuildResult.Unknown:
string unknownReport = $"Build [{report.summary.platform}] skipped or not completed.";
logActions.Add(() => Debug.LogWarning(unknownReport));
break;
}
}
private static void ZipReleaseFiles()
{
string buildOutputPath = EditorUtility.SaveFolderPanel("Choose Location of Built Game",
$"{PlayerSettings.bundleVersion}", $"{PlayerSettings.bundleVersion}");
if (string.IsNullOrEmpty(buildOutputPath)) return;
if (!buildOutputPath.EndsWith($"{PlayerSettings.bundleVersion}"))
{
Debug.LogError($"Invalid build output path: {buildOutputPath}. " +
$"Please choose the current release build folder \"{PlayerSettings.bundleVersion}\"");
return;
}
string releaseDirPath = $"{buildOutputPath}{PathSeparator}Release";
Directory.CreateDirectory(releaseDirPath);
List<(string FolderPath, Pal3BuildTarget Target)> buildTargets = new()
{
($"{GameConstants.AppName}{PathSeparator}{Pal3BuildTarget.Android.ToString()}{PathSeparator}{GameConstants.AppName}.apk", Pal3BuildTarget.Android),
($"{GameConstants.AppName}{PathSeparator}{Pal3BuildTarget.Windows_x86.ToString()}", Pal3BuildTarget.Windows_x86),
($"{GameConstants.AppName}{PathSeparator}{Pal3BuildTarget.Windows_x64.ToString()}", Pal3BuildTarget.Windows_x64),
($"{GameConstants.AppName}{PathSeparator}{Pal3BuildTarget.Linux_x86_x64.ToString()}", Pal3BuildTarget.Linux_x86_x64)
};
foreach ((string folderPath, Pal3BuildTarget target) in buildTargets)
{
string fullPath = $"{buildOutputPath}{PathSeparator}{folderPath}";
string zipFileName = $"{GameConstants.AppName}_v{PlayerSettings.bundleVersion}_{target.ToString()}.zip";
string zipFilePath = $"{releaseDirPath}{PathSeparator}{zipFileName}";
if (File.Exists(fullPath) || Directory.Exists(fullPath))
{
File.Delete(zipFilePath);
if (target == Pal3BuildTarget.Android)
{
using FileStream fileStream = new(zipFilePath, FileMode.Create);
using ZipArchive archive = new(fileStream, ZipArchiveMode.Create);
archive.CreateEntryFromFile(fullPath, $"{GameConstants.AppName}.apk");
}
else
{
ZipFile.CreateFromDirectory(fullPath, zipFilePath);
}
Debug.Log($"{target.ToString()} build zipped to {zipFilePath}");
}
else
{
Debug.LogWarning($"{target.ToString()} release folder not found at {fullPath}. Skipped.");
}
}
}
}
}
@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: d744af8977c74774b6027a7c6c1c5f3e
timeCreated: 1679528190
@@ -24,9 +24,9 @@ namespace Editor
#endif
#if PAL3
[MenuItem("PAL3/Source Generator/Generate ConsoleCommands.PAL3.generated.cs")]
[MenuItem("PAL3/Source Generator/Generate ConsoleCommands.PAL3.generated.cs", priority = 2)]
#elif PAL3A
[MenuItem("PAL3A/Source Generator/Generate ConsoleCommands.PAL3A.generated.cs")]
[MenuItem("PAL3A/Source Generator/Generate ConsoleCommands.PAL3A.generated.cs", priority = 2)]
#endif
public static void GenerateConsoleCommands()
{
@@ -69,6 +69,7 @@ namespace Editor
Debug.Log($"{fileName}.cs generated.");
AssetDatabase.SaveAssets();
AssetDatabase.Refresh();
}
}
@@ -197,8 +197,7 @@ namespace Pal3.Actor
textureProvider,
_tintColor,
polFile,
weaponTextureProvider,
Color.white);
weaponTextureProvider);
}
else
{
+1 -4
View File
@@ -17,7 +17,6 @@ namespace Pal3.Actor
using Input;
using MetaData;
using Player;
using Scene;
using Script.Waiter;
using UnityEngine;
@@ -167,9 +166,7 @@ namespace Pal3.Actor
private void OnCollisionEnter(Collision collision)
{
if (_actor.Info.Kind == ScnActorKind.CombatNpc &&
ServiceLocator.Instance.Get<SceneManager>()
.GetCurrentScene()
.GetSceneInfo().SceneType == ScnSceneType.Maze &&
(_actor.Info.MonsterIds[0] != 0 || _actor.Info.MonsterIds[1] != 0 || _actor.Info.MonsterIds[2] != 0) &&
collision.gameObject.GetComponent<ActorController>() is {} actorController &&
(byte) ServiceLocator.Instance.Get<PlayerManager>()
.GetPlayerActor() == actorController.GetActor().Info.Id)
+25 -6
View File
@@ -16,6 +16,7 @@ namespace Pal3.Audio
using Core.DataReader.Cpk;
using Core.DataReader.Scn;
using Core.Extensions;
using Core.Utils;
using Data;
using MetaData;
using Scene;
@@ -56,20 +57,27 @@ namespace Pal3.Audio
private CancellationTokenSource _sceneAudioCts = new ();
private AudioClip _themeMusicClip;
public void Init(Camera mainCamera,
GameResourceProvider resourceProvider,
SceneManager sceneManager,
AudioSource musicSource,
GameSettings gameSettings)
{
_mainCamera = mainCamera != null ? mainCamera : throw new ArgumentNullException(nameof(mainCamera));
_resourceProvider = resourceProvider ?? throw new ArgumentNullException(nameof(resourceProvider));
_sceneManager = sceneManager ?? throw new ArgumentNullException(nameof(sceneManager));
_musicPlayer = musicSource != null ? musicSource : throw new ArgumentNullException(nameof(musicSource));
_gameSettings = gameSettings ?? throw new ArgumentNullException(nameof(gameSettings));
_mainCamera = Requires.IsNotNull(mainCamera, nameof(mainCamera));
_resourceProvider = Requires.IsNotNull(resourceProvider, nameof(resourceProvider));
_sceneManager = Requires.IsNotNull(sceneManager, nameof(sceneManager));
_musicPlayer = Requires.IsNotNull(musicSource, nameof(musicSource));
_gameSettings = Requires.IsNotNull(gameSettings, nameof(gameSettings));
_musicVolume = _gameSettings.MusicVolume;
_sfxVolume = _gameSettings.SfxVolume;
// Load and play the theme music on init
_themeMusicClip = Requires.IsNotNull(
Resources.Load<AudioClip>($"Music/{GameConstants.AppName}-Theme"),
$"Music/{GameConstants.AppName}-Theme");
}
private void OnEnable()
@@ -82,6 +90,14 @@ namespace Pal3.Audio
CommandExecutorRegistry<ICommand>.Instance.UnRegister(this);
}
public void PlayThemeMusic()
{
_musicPlayer.clip = _themeMusicClip;
_musicPlayer.volume = _musicVolume;
_musicPlayer.loop = true;
_musicPlayer.Play();
}
public void Execute(SettingChangedNotification command)
{
if (command.SettingName == nameof(_gameSettings.MusicVolume))
@@ -142,7 +158,10 @@ namespace Pal3.Audio
if (audioSource.clip != null)
{
audioSource.Stop();
Destroy(audioSource.clip);
if (audioSource.clip != _themeMusicClip)
{
Destroy(audioSource.clip);
}
}
audioSource.clip = audioClip;
+9 -6
View File
@@ -33,9 +33,9 @@ namespace Pal3.Camera
ICommandExecutor<CameraShakeEffectCommand>,
ICommandExecutor<CameraOrbitCommand>,
ICommandExecutor<CameraRotateCommand>,
#if PAL3A
ICommandExecutor<CameraOrbitHorizontalCommand>,
ICommandExecutor<CameraOrbitVerticalCommand>,
#if PAL3A
ICommandExecutor<CameraMoveToLookAtPointCommand>,
ICommandExecutor<CameraMoveToDefaultLookAtPointCommand>,
#endif
@@ -110,10 +110,10 @@ namespace Pal3.Camera
Canvas touchControlUI,
Image curtainImage)
{
_inputActions = inputActions ?? throw new ArgumentNullException(nameof(inputActions));
_gamePlayController = gamePlayController != null ? gamePlayController : throw new ArgumentNullException(nameof(gamePlayController));
_sceneManager = sceneManager ?? throw new ArgumentNullException(nameof(sceneManager));
_gameStateManager = gameStateManager ?? throw new ArgumentNullException(nameof(gameStateManager));
_inputActions = Requires.IsNotNull(inputActions, nameof(inputActions));
_gamePlayController = Requires.IsNotNull(gamePlayController, nameof(gamePlayController));
_sceneManager = Requires.IsNotNull(sceneManager, nameof(sceneManager));
_gameStateManager = Requires.IsNotNull(gameStateManager, nameof(gameStateManager));
_camera = mainCamera;
_camera!.fieldOfView = HorizontalToVerticalFov(24.05f, 4f/3f);
@@ -761,6 +761,9 @@ namespace Pal3.Camera
public void Execute(ResetGameStateCommand command)
{
if (!_asyncCameraAnimationCts.IsCancellationRequested) _asyncCameraAnimationCts.Cancel();
_curtainImage.color = Color.black;
_currentAppliedDefaultTransformOption = 0;
_initTransformOptionOnSceneLoad = null;
_initRotationOnSceneLoad = null;
@@ -768,7 +771,6 @@ namespace Pal3.Camera
_cameraFollowPlayer = true;
}
#if PAL3A
public void Execute(CameraOrbitHorizontalCommand command)
{
if (!_asyncCameraAnimationCts.IsCancellationRequested) _asyncCameraAnimationCts.Cancel();
@@ -825,6 +827,7 @@ namespace Pal3.Camera
}
}
#if PAL3A
public void Execute(CameraMoveToLookAtPointCommand command)
{
if (!_asyncCameraAnimationCts.IsCancellationRequested) _asyncCameraAnimationCts.Cancel();
@@ -335,6 +335,22 @@ namespace Pal3.Command
new CameraOrbitCommand(yaw, pitch, duration, curveType));
}
// <auto-generated/>
[ConsoleMethodAttribute("CameraOrbitHorizontal", "镜头朝向固定点左右Orbit参数:目标Yaw,Pitch,目标镜头距离(原GameBox引擎下的距离单位),运动时间,插值类型(0:Linear,1:Sine),同步(1暂停当前脚本运行,0异步进行动画且继续执行脚本)")]
public static void CameraOrbitHorizontal(System.Single yaw, System.Single pitch, System.Single gameBoxDistance, System.Single duration, System.Int32 curveType, System.Int32 synchronous)
{
CommandDispatcher<ICommand>.Instance.Dispatch(
new CameraOrbitHorizontalCommand(yaw, pitch, gameBoxDistance, duration, curveType, synchronous));
}
// <auto-generated/>
[ConsoleMethodAttribute("CameraOrbitVertical", "镜头朝向固定点上下Orbit参数:目标Yaw,Pitch,目标镜头距离(原GameBox引擎下的距离单位),运动时间,插值类型(0:Linear,1:Sine),同步(1暂停当前脚本运行,0异步进行动画且继续执行脚本)")]
public static void CameraOrbitVertical(System.Single yaw, System.Single pitch, System.Single gameBoxDistance, System.Single duration, System.Int32 curveType, System.Int32 synchronous)
{
CommandDispatcher<ICommand>.Instance.Dispatch(
new CameraOrbitVerticalCommand(yaw, pitch, gameBoxDistance, duration, curveType, synchronous));
}
// <auto-generated/>
[ConsoleMethodAttribute("CameraPopState", "取出镜头状态")]
public static void CameraPopState()
@@ -1320,11 +1336,11 @@ namespace Pal3.Command
}
// <auto-generated/>
[ConsoleMethodAttribute("ToggleStorySelectorRequest", "Execute ToggleStorySelectorRequest.")]
public static void ToggleStorySelectorRequest()
[ConsoleMethodAttribute("ToggleMainMenuRequest", "Execute ToggleMainMenuRequest.")]
public static void ToggleMainMenuRequest()
{
CommandDispatcher<ICommand>.Instance.Dispatch(
new ToggleStorySelectorRequest());
new ToggleMainMenuRequest());
}
}
}
@@ -1400,11 +1400,11 @@ namespace Pal3.Command
}
// <auto-generated/>
[ConsoleMethodAttribute("ToggleStorySelectorRequest", "Execute ToggleStorySelectorRequest.")]
public static void ToggleStorySelectorRequest()
[ConsoleMethodAttribute("ToggleMainMenuRequest", "Execute ToggleMainMenuRequest.")]
public static void ToggleMainMenuRequest()
{
CommandDispatcher<ICommand>.Instance.Dispatch(
new ToggleStorySelectorRequest());
new ToggleMainMenuRequest());
}
}
}
@@ -6,8 +6,8 @@
namespace Pal3.Command.InternalCommands
{
[AvailableInConsole]
public class ToggleStorySelectorRequest: ICommand
public class ToggleMainMenuRequest: ICommand
{
public ToggleStorySelectorRequest() {}
public ToggleMainMenuRequest() {}
}
}
@@ -5,7 +5,6 @@
namespace Pal3.Command.SceCommands
{
#if PAL3A
[AvailableInConsole]
[SceCommand(174, "镜头朝向固定点左右Orbit" +
"参数:目标Yaw,Pitch,目标镜头距离(原GameBox引擎下的距离单位),运动时间,插值类型(0:Linear,1:Sine),同步(1暂停当前脚本运行,0异步进行动画且继续执行脚本)")]
@@ -34,5 +33,4 @@ namespace Pal3.Command.SceCommands
public int CurveType { get; }
public int Synchronous { get; }
}
#endif
}
@@ -5,7 +5,6 @@
namespace Pal3.Command.SceCommands
{
#if PAL3A
[AvailableInConsole]
[SceCommand(175, "镜头朝向固定点上下Orbit" +
"参数:目标Yaw,Pitch,目标镜头距离(原GameBox引擎下的距离单位),运动时间,插值类型(0:Linear,1:Sine),同步(1暂停当前脚本运行,0异步进行动画且继续执行脚本)")]
@@ -28,5 +27,4 @@ namespace Pal3.Command.SceCommands
public int CurveType { get; }
public int Synchronous { get; }
}
#endif
}
@@ -10,6 +10,7 @@ namespace Pal3.Data
using Command.InternalCommands;
using Core.DataReader.Cpk;
using Core.FileSystem;
using Core.Utils;
/// <summary>
/// Cache/dispose Cpk archive into memory based on scenarios.
@@ -23,7 +24,7 @@ namespace Pal3.Data
public FileSystemCacheManager(ICpkFileSystem fileSystem)
{
_fileSystem = fileSystem ?? throw new ArgumentNullException(nameof(fileSystem));
_fileSystem = Requires.IsNotNull(fileSystem, nameof(fileSystem));
CommandExecutorRegistry<ICommand>.Instance.Register(this);
}
@@ -93,11 +93,11 @@ namespace Pal3.Data
GameSettings gameSettings,
int codepage)
{
_fileSystem = fileSystem ?? throw new ArgumentNullException(nameof(fileSystem));
_textureLoaderFactory = textureLoaderFactory ?? throw new ArgumentNullException(nameof(textureLoaderFactory));
_unlitMaterialFactory = unlitMaterialFactory ?? throw new ArgumentNullException(nameof(unlitMaterialFactory));
_litMaterialFactory = litMaterialFactory ?? throw new ArgumentNullException(nameof(litMaterialFactory));
_gameSettings = gameSettings ?? throw new ArgumentNullException(nameof(gameSettings));
_fileSystem = Requires.IsNotNull(fileSystem, nameof(fileSystem));
_textureLoaderFactory = Requires.IsNotNull(textureLoaderFactory, nameof(textureLoaderFactory));
_unlitMaterialFactory = Requires.IsNotNull(unlitMaterialFactory, nameof(unlitMaterialFactory));
_litMaterialFactory = litMaterialFactory; // Lit materials are not required
_gameSettings = Requires.IsNotNull(gameSettings, nameof(gameSettings));
_codepage = codepage;
var gdbFilePath =
@@ -137,7 +137,7 @@ namespace Pal3.Data
public IMaterialFactory GetMaterialFactory()
{
return _gameSettings.IsRealtimeLightingAndShadowsEnabled ?
return !_gameSettings.IsOpenSourceVersion && _gameSettings.IsRealtimeLightingAndShadowsEnabled ?
_litMaterialFactory :
_unlitMaterialFactory;
}
+14 -18
View File
@@ -16,40 +16,36 @@ namespace Pal3.Data
{
private readonly Dictionary<string, (Texture2D texutre, bool hasAlphaChannel)> _textureCache = new ();
public void Add(string textureFullPath, Texture2D texture, bool hasAlphaChannel)
public void Add(string key, Texture2D texture, bool hasAlphaChannel)
{
if (texture == null) return;
textureFullPath = textureFullPath.ToLower();
key = key.ToLowerInvariant();
if (Contains(textureFullPath))
if (_textureCache.ContainsKey(key))
{
Debug.LogError($"Texture {textureFullPath} already existed in cache.");
Debug.LogError($"Texture {key} already existed in cache.");
}
else
{
texture.hideFlags = HideFlags.HideAndDontSave;
_textureCache[textureFullPath] = new (texture, hasAlphaChannel);
_textureCache[key] = new (texture, hasAlphaChannel);
}
}
public bool Contains(string textureFullPath)
public bool TryGetTextureFromCache(string key,
out (Texture2D texture, bool hasAlphaChannel) texture)
{
textureFullPath = textureFullPath.ToLower();
return _textureCache.ContainsKey(textureFullPath);
}
key = key.ToLowerInvariant();
public (Texture2D texture, bool hasAlphaChannel) GetTextureFromCache(string textureFullPath)
{
textureFullPath = textureFullPath.ToLower();
if (Contains(textureFullPath))
if (_textureCache.ContainsKey(key))
{
return _textureCache[textureFullPath];
}
else
{
throw new ArgumentException($"Texture {textureFullPath} does not exist in cache.");
texture = _textureCache[key];
return true;
}
texture = default;
return false;
}
public void DisposeAll()
+14 -11
View File
@@ -35,17 +35,16 @@ namespace Pal3.Data
_textureCache = textureCache;
}
private Texture2D GetTextureInCache(string textureFullPath, out bool hasAlphaChannel)
private bool TryGetTextureFromCache(string textureFullPath,
out (Texture2D texture, bool hasAlphaChannel) texture)
{
if (_textureCache != null && _textureCache.Contains(textureFullPath))
if (_textureCache != null)
{
(Texture2D texture, bool hasAlpha) = _textureCache.GetTextureFromCache(textureFullPath);
hasAlphaChannel = hasAlpha;
return texture;
return _textureCache.TryGetTextureFromCache(textureFullPath, out texture);
}
hasAlphaChannel = false;
return null;
texture = default;
return false;
}
public string GetTexturePath(string name)
@@ -87,15 +86,19 @@ namespace Pal3.Data
if (_textureCache != null)
{
// Check if dds texture exists in cache
if (GetTextureInCache(ddsTexturePath, out hasAlphaChannel) is { } ddsTextureInCache)
if (TryGetTextureFromCache(ddsTexturePath,
out (Texture2D texture, bool hasAlphaChannel) ddsTextureInCache))
{
return ddsTextureInCache;
hasAlphaChannel = ddsTextureInCache.hasAlphaChannel;
return ddsTextureInCache.texture;
}
// Check if texture exists in cache
if (GetTextureInCache(texturePath, out hasAlphaChannel) is { } textureInCache)
if (TryGetTextureFromCache(texturePath,
out (Texture2D texture, bool hasAlphaChannel) textureInCache))
{
return textureInCache;
hasAlphaChannel = textureInCache.hasAlphaChannel;
return textureInCache.texture;
}
}
File diff suppressed because it is too large. Load diff
+16 -81
View File
@@ -13,6 +13,7 @@ namespace Pal3.Dev
using Command.SceCommands;
using Core.DataReader.Scn;
using Core.Services;
using Core.Utils;
using MetaData;
using Scene;
using Script;
@@ -21,16 +22,11 @@ namespace Pal3.Dev
using UnityEngine;
using UnityEngine.UI;
public sealed class MazeSkipper : IDisposable,
ICommandExecutor<ScenePostLoadingNotification>,
ICommandExecutor<GameStateChangedNotification>
public sealed class MazeSkipper
{
private readonly GameStateManager _gameStateManager;
private readonly SceneManager _sceneManager;
private readonly CanvasGroup _mazeSkipperCanvasGroup;
private readonly Button _mazeEntranceButton;
private readonly Button _mazeExitButton;
#region Maze skipper commands
// _0 for entrance, _1 for exit
#if PAL3
private readonly Dictionary<string, IList<ICommand>> _skipperCommands = new()
@@ -893,46 +889,33 @@ namespace Pal3.Dev
}},
};
#endif
#endregion
public MazeSkipper(GameStateManager gameStateManager,
SceneManager sceneManager,
CanvasGroup mazeSkipperCanvasGroup,
Button mazeEntranceButton,
Button mazeExitButton)
public MazeSkipper(SceneManager sceneManager)
{
_gameStateManager = gameStateManager ?? throw new ArgumentNullException(nameof(gameStateManager));
_sceneManager = sceneManager ?? throw new ArgumentNullException(nameof(sceneManager));
_mazeSkipperCanvasGroup = mazeSkipperCanvasGroup != null ? mazeSkipperCanvasGroup : throw new ArgumentNullException(nameof(mazeSkipperCanvasGroup));
_mazeEntranceButton = mazeEntranceButton != null ? mazeEntranceButton : throw new ArgumentNullException(nameof(mazeEntranceButton));
_mazeExitButton = mazeExitButton != null ? mazeExitButton : throw new ArgumentNullException(nameof(mazeExitButton));
_mazeSkipperCanvasGroup.alpha = 0f;
_mazeSkipperCanvasGroup.interactable = false;
_mazeEntranceButton.colors = UITheme.GetButtonColors();
_mazeEntranceButton.onClick
.AddListener(EntranceButtonClicked);
_mazeExitButton.colors = UITheme.GetButtonColors();
_mazeExitButton.onClick
.AddListener(ExitButtonClicked);
CommandExecutorRegistry<ICommand>.Instance.Register(this);
_sceneManager = Requires.IsNotNull(sceneManager, nameof(sceneManager));
}
private void EntranceButtonClicked()
public bool IsMazeSceneAndHasSkipperCommands(ScnSceneInfo sceneInfo)
{
var cmdHashKeyPrefix = GetCommandHashKeyPrefix(sceneInfo);
return _skipperCommands.Keys.Any(_ => _.StartsWith(cmdHashKeyPrefix, StringComparison.OrdinalIgnoreCase));
}
public void PortalToEntrance()
{
if (_gameStateManager.GetCurrentState() != GameState.Gameplay) return;
if (_sceneManager.GetCurrentScene() is not { } currentScene) return;
foreach (ICommand command in _skipperCommands[GetCommandHashKeyPrefix(currentScene.GetSceneInfo()) + "0"])
{
CommandDispatcher<ICommand>.Instance.Dispatch(command);
}
CommandDispatcher<ICommand>.Instance.Dispatch(new ActorStopActionAndStandCommand(ActorConstants.PlayerActorVirtualID));
}
private void ExitButtonClicked()
public void PortalToExitOrNextStoryPoint()
{
if (_gameStateManager.GetCurrentState() != GameState.Gameplay) return;
if (_sceneManager.GetCurrentScene() is not { } currentScene) return;
// This is how exit button works:
@@ -968,57 +951,9 @@ namespace Pal3.Dev
CommandDispatcher<ICommand>.Instance.Dispatch(new ActorStopActionAndStandCommand(ActorConstants.PlayerActorVirtualID));
}
public void Dispose()
{
CommandExecutorRegistry<ICommand>.Instance.UnRegister(this);
_mazeEntranceButton.onClick
.RemoveListener(EntranceButtonClicked);
_mazeExitButton.onClick
.RemoveListener(ExitButtonClicked);
}
private string GetCommandHashKeyPrefix(ScnSceneInfo sceneInfo)
{
return $"{sceneInfo.CityName}_{sceneInfo.SceneName}_".ToLower();
}
public void Execute(GameStateChangedNotification command)
{
if (command.NewState != GameState.Gameplay)
{
_mazeSkipperCanvasGroup.alpha = 0f;
_mazeSkipperCanvasGroup.interactable = false;
return;
}
if (_sceneManager.GetCurrentScene() is not { } currentScene) return;
ScnSceneInfo currentSceneInfo = currentScene.GetSceneInfo();
var cmdHashKeyPrefix = GetCommandHashKeyPrefix(currentSceneInfo);
if (command.NewState == GameState.Gameplay &&
_skipperCommands.Keys.Any(_ => _.StartsWith(cmdHashKeyPrefix, StringComparison.OrdinalIgnoreCase)))
{
_mazeSkipperCanvasGroup.alpha = 1f;
_mazeSkipperCanvasGroup.interactable = true;
}
}
public void Execute(ScenePostLoadingNotification command)
{
var cmdHashKeyPrefix = GetCommandHashKeyPrefix(command.NewSceneInfo);
if (_gameStateManager.GetCurrentState() == GameState.Gameplay &&
_skipperCommands.Keys.Any(_ => _.StartsWith(cmdHashKeyPrefix, StringComparison.OrdinalIgnoreCase)))
{
_mazeSkipperCanvasGroup.alpha = 1f;
_mazeSkipperCanvasGroup.interactable = true;
}
else
{
_mazeSkipperCanvasGroup.alpha = 0f;
_mazeSkipperCanvasGroup.interactable = false;
}
}
}
}
+3 -2
View File
@@ -11,6 +11,7 @@ namespace Pal3.Effect
using Command.InternalCommands;
using Command.SceCommands;
using Core.GameBox;
using Core.Utils;
using Data;
using MetaData;
using Scene;
@@ -32,8 +33,8 @@ namespace Pal3.Effect
public void Init(GameResourceProvider resourceProvider,
SceneManager sceneManager)
{
_resourceProvider = resourceProvider ?? throw new ArgumentNullException(nameof(resourceProvider));
_sceneManager = sceneManager ?? throw new ArgumentNullException(nameof(sceneManager));
_resourceProvider = Requires.IsNotNull(resourceProvider, nameof(resourceProvider));
_sceneManager = Requires.IsNotNull(sceneManager, nameof(sceneManager));
}
private void OnEnable()
+3 -3
View File
@@ -7,6 +7,7 @@ namespace Pal3.Effect
{
using System;
using Core.DataLoader;
using Core.DataReader.Pol;
using Core.Renderer;
using Data;
using MetaData;
@@ -31,12 +32,11 @@ namespace Pal3.Effect
if (!string.IsNullOrEmpty(info.ModelPath))
{
(Core.DataReader.Pol.PolFile PolFile, ITextureResourceProvider TextureProvider) poly = resourceProvider.GetPol(info.ModelPath);
(PolFile PolFile, ITextureResourceProvider TextureProvider) poly = resourceProvider.GetPol(info.ModelPath);
_sceneObjectRenderer = gameObject.AddComponent<PolyModelRenderer>();
_sceneObjectRenderer.Render(poly.PolFile,
materialFactory,
poly.TextureProvider,
Color.white);
materialFactory);
}
if (!string.IsNullOrEmpty(info.TexturePathFormat))
@@ -6,6 +6,7 @@
namespace Pal3.Effect.PostProcessing
{
using System;
using System.Collections;
using Command;
using Command.InternalCommands;
using Command.SceCommands;
@@ -35,9 +36,9 @@ namespace Pal3.Effect.PostProcessing
PostProcessLayer postProcessLayer,
GameSettings gameSettings)
{
_postProcessVolume = volume != null ? volume : throw new ArgumentNullException(nameof(volume));
_postProcessLayer = postProcessLayer != null ? postProcessLayer : throw new ArgumentNullException(nameof(postProcessLayer));
_gameSettings = gameSettings ?? throw new ArgumentNullException(nameof(gameSettings));
_postProcessVolume = Requires.IsNotNull(volume, nameof(volume));
_postProcessLayer = Requires.IsNotNull(postProcessLayer, nameof(postProcessLayer));
_gameSettings = Requires.IsNotNull(gameSettings, nameof(gameSettings));
_bloom = _postProcessVolume.profile.GetSetting<Bloom>();
ToggleBloomBasedOnSetting();
@@ -163,6 +164,33 @@ namespace Pal3.Effect.PostProcessing
ToggleAmbientOcclusionBasedOnSetting();
TogglePostProcessLayerWhenNeeded();
}
#if UNITY_IOS
if (command.SettingName is nameof(GameSettings.ResolutionScale))
{
StartCoroutine(ReloadAmbientOcclusionSetting());
}
#endif
}
#if UNITY_IOS
private IEnumerator Start()
{
yield return ReloadAmbientOcclusionSetting();
}
// On iOS, the SSAO and Resolution changing are causing the RoundedFrostedGlass
// shader to malfunction. This is a workaround to disable and re-enable SSAO to fix the issue.
private IEnumerator ReloadAmbientOcclusionSetting()
{
if (_gameSettings.IsAmbientOcclusionEnabled)
{
yield return null;
_gameSettings.IsAmbientOcclusionEnabled = false;
yield return null;
_gameSettings.IsAmbientOcclusionEnabled = true;
}
}
#endif
}
}
@@ -11,6 +11,7 @@ namespace Pal3.Feature
using Command.InternalCommands;
using Command.SceCommands;
using Core.Animation;
using Core.Utils;
using Data;
using Input;
using Script.Waiter;
@@ -37,9 +38,9 @@ namespace Pal3.Feature
PlayerInputActions playerInputActions,
Image captionImage)
{
_gameResourceProvider = gameResourceProvider ?? throw new ArgumentNullException(nameof(gameResourceProvider));
_playerInputActions = playerInputActions ?? throw new ArgumentNullException(nameof(playerInputActions));
_captionImage = captionImage != null ? captionImage : throw new ArgumentNullException(nameof(captionImage));
_gameResourceProvider = Requires.IsNotNull(gameResourceProvider, nameof(gameResourceProvider));
_playerInputActions = Requires.IsNotNull(playerInputActions, nameof(playerInputActions));
_captionImage = Requires.IsNotNull(captionImage, nameof(captionImage));
_captionImage.preserveAspect = true;
_playerInputActions.Cutscene.Continue.performed += CutsceneContinueOnPerformed;
+3 -2
View File
@@ -9,6 +9,7 @@ namespace Pal3.Feature
using Command;
using Command.InternalCommands;
using Command.SceCommands;
using Core.Utils;
using MetaData;
using Scene;
using Script;
@@ -23,8 +24,8 @@ namespace Pal3.Feature
public void Init(ScriptManager scriptManager, SceneManager sceneManager)
{
_scriptManager = scriptManager ?? throw new ArgumentNullException(nameof(scriptManager));
_sceneManager = sceneManager ?? throw new ArgumentNullException(nameof(sceneManager));
_scriptManager = Requires.IsNotNull(scriptManager, nameof(scriptManager));
_sceneManager = Requires.IsNotNull(sceneManager, nameof(sceneManager));
}
private void OnEnable()
+109 -69
View File
@@ -19,11 +19,8 @@ namespace Pal3
using MetaData;
using Renderer;
using Settings;
#if UNITY_EDITOR || UNITY_STANDALONE
using SimpleFileBrowser;
#endif
using TMPro;
using UnityEditor;
using UnityEngine;
using UnityEngine.UI;
using Debug = UnityEngine.Debug;
@@ -42,10 +39,18 @@ namespace Pal3
private const int DEFAULT_CODE_PAGE = 936; // GBK Encoding's code page
// change it to 950 to supports Traditional Chinese (Big5)
// Optional materials that are used in the game but not open sourced
private Material _toonDefaultMaterial;
private Material _toonTransparentMaterial;
private IEnumerator Start()
{
loadingText.text = "Loading game assets...";
loadingText.text = "正在加载游戏数据...";
yield return null; // Wait for next frame to make sure the text is updated
_toonDefaultMaterial = Resources.Load<Material>("Materials/ToonDefault");
_toonTransparentMaterial = Resources.Load<Material>("Materials/ToonTransparent");
yield return InitResourceAsync();
}
@@ -59,68 +64,73 @@ namespace Pal3
crcHash.Init();
ServiceLocator.Instance.Register<CrcHash>(crcHash);
// If toon materials are not present, it's an open source build
bool isOpenSourceVersion = _toonDefaultMaterial == null || _toonTransparentMaterial == null;
// Init settings store
ITransactionalKeyValueStore settingsStore = new PlayerPrefsStore();
// Init settings
GameSettings gameSettings = new (settingsStore);
GameSettings gameSettings = new (settingsStore, isOpenSourceVersion);
gameSettings.InitOrLoadSettings();
ServiceLocator.Instance.Register<GameSettings>(gameSettings);
// Init file system
string gameDataFolderPath = gameSettings.GameDataFolderPath;
Queue<string> gameDataFolderSearchLocations = new(gameSettings.GetGameDataFolderSearchLocations());
ICpkFileSystem cpkFileSystem = null;
while (cpkFileSystem == null)
if (gameDataFolderSearchLocations.Count == 0)
{
Debug.LogError("No game data folder search locations found.");
yield break;
}
while (gameDataFolderSearchLocations.Count > 0)
{
string gameDataFolderPath = gameDataFolderSearchLocations.Dequeue();
Exception exception = null;
yield return InitFileSystemAsync(gameDataFolderPath,
crcHash, codepage, fileSystem =>
crcHash, codepage, (fileSystem, ex) =>
{
cpkFileSystem = fileSystem;
exception = ex;
});
if (cpkFileSystem == null)
if (cpkFileSystem != null) // Init file system successfully
{
string userPickedGameDataFolderPath = null;
ServiceLocator.Instance.Register<ICpkFileSystem>(cpkFileSystem);
#if UNITY_EDITOR || UNITY_STANDALONE
yield return FileBrowser.WaitForLoadDialog(FileBrowser.PickMode.Folders,
allowMultiSelection: false,
initialPath: null,
initialFilename: GameConstants.AppName,
title: $"请选择<<{GameConstants.AppNameCNFull}>>原始游戏文件夹根目录",
loadButtonText: "选择");
if (FileBrowser.Success && FileBrowser.Result.Length == 1)
{
userPickedGameDataFolderPath = FileBrowser.Result[0];
}
#endif
// Save game data folder path when file system initialized successfully,
// since it's possible that user changed the game data folder path
// during the file system initialization
gameSettings.GameDataFolderPath = gameDataFolderPath;
gameSettings.SaveSettings();
if (!string.IsNullOrEmpty(userPickedGameDataFolderPath))
{
gameDataFolderPath = userPickedGameDataFolderPath;
loadingText.text = "Loading game assets...";
yield return null; // Wait for next frame to make sure the text is updated
continue; // Retry when new root path is picked
}
else
{
#if UNITY_EDITOR
EditorApplication.ExitPlaymode();
#elif UNITY_STANDALONE
Application.Quit();
#endif
}
yield break; // Stop initialization if failed to init file system
break; // Stop searching when file system is initialized successfully
}
ServiceLocator.Instance.Register<ICpkFileSystem>(cpkFileSystem);
// If file system is not initialized successfully, retry with next search
// location when there is any
if (gameDataFolderSearchLocations.Count > 0) continue;
// Save game data folder path when file system initialized successfully,
// since it's possible that user changed the game data folder path
// during the file system initialization
gameSettings.GameDataFolderPath = gameDataFolderPath;
string userPickedGameDataFolderPath = null;
yield return WaitForUserToPickGameDataFolder((path) => userPickedGameDataFolderPath = path);
if (!string.IsNullOrEmpty(userPickedGameDataFolderPath))
{
// Enqueue the user picked game data folder path to the search
// locations and retry
gameDataFolderSearchLocations.Enqueue(userPickedGameDataFolderPath);
loadingText.text = "正在重新加载游戏数据...";
yield return null; // Wait for next frame to make sure the text is updated
}
else
{
loadingText.text = exception == null ? "游戏数据加载失败,未能找到原游戏数据文件" : $"{exception.Message}";
yield break; // Stop initialization if failed to init file system
}
}
// Init TextureLoaderFactory
@@ -129,23 +139,12 @@ namespace Pal3
// Init material factories
IMaterialFactory unlitMaterialFactory = new UnlitMaterialFactory();
IMaterialFactory litMaterialFactory;
IMaterialFactory litMaterialFactory = null;
// Check if toon materials are present
if (Resources.Load<Material>("Materials/ToonDefault") is { } toonDefaultMaterial &&
Resources.Load<Material>("Materials/ToonTransparent") is { } toonTransparentMaterial )
// Only create litMaterialFactory when toon materials are present
if (_toonDefaultMaterial != null && _toonTransparentMaterial != null)
{
litMaterialFactory = new LitMaterialFactory(toonDefaultMaterial, toonTransparentMaterial);
}
else
{
// Fallback to unlit material factory
litMaterialFactory = new UnlitMaterialFactory();
Debug.LogWarning("Toon materials not found. " +
"Cannot create LitMaterialFactory. " +
"Falling back to UnlitMaterialFactory instead. " +
"Lighting and shadow may not work properly when enabled.");
litMaterialFactory = new LitMaterialFactory(_toonDefaultMaterial, _toonTransparentMaterial);
}
// Init Game resource provider
@@ -169,6 +168,55 @@ namespace Pal3
FinalizeInit();
}
private IEnumerator WaitForUserToPickGameDataFolder(Action<string> callback)
{
string userPickedGameDataFolderPath = null;
yield return FileBrowser.WaitForLoadDialog(
FileBrowser.PickMode.Folders,
allowMultiSelection: false,
initialPath: null,
initialFilename: null,
title: $"请选择<<{GameConstants.AppNameCNFull}>>原始游戏文件夹根目录",
loadButtonText: "选择");
if (FileBrowser.Success &&
FileBrowser.Result.Length == 1)
{
#if !UNITY_EDITOR && UNITY_ANDROID
// On Android 10+, the result is a content URI of the selected folder in
// SAF (Storage Access Framework) format, so we need to copy it to the
// persistent data path in order to use it with System.IO APIs
if (FileBrowserHelpers.ShouldUseSAF)
{
string persistentDataPath = Application.persistentDataPath +
Path.DirectorySeparatorChar +
GameConstants.AppName +
Path.DirectorySeparatorChar;
// Delete the old folder if it exists
if (Directory.Exists(persistentDataPath))
{
Directory.Delete(persistentDataPath, true);
}
loadingText.text = "正在拷贝游戏数据至游戏可访问目录(预计需要几分钟)...";
yield return null; // Wait for next frame to make sure the text is updated
FileBrowserHelpers.CopyDirectory(FileBrowser.Result[0], persistentDataPath);
userPickedGameDataFolderPath = persistentDataPath;
}
else
#endif
{
userPickedGameDataFolderPath = FileBrowser.Result[0];
}
}
callback.Invoke(userPickedGameDataFolderPath);
}
private void FinalizeInit()
{
foreach (Transform child in transform)
@@ -186,7 +234,7 @@ namespace Pal3
private IEnumerator InitFileSystemAsync(string gameDataFolderPath,
CrcHash crcHash,
int codepage,
Action<ICpkFileSystem> callback)
Action<ICpkFileSystem, Exception> callback)
{
ICpkFileSystem cpkFileSystem = null;
var path = gameDataFolderPath;
@@ -222,15 +270,7 @@ namespace Pal3
yield return null;
}
if (cpkFileSystem != null)
{
callback?.Invoke(cpkFileSystem);
}
else
{
loadingText.text = $"{exception.Message}";
yield return null; // Wait for next frame to make sure the text is updated
}
callback?.Invoke(cpkFileSystem, exception);
}
private IEnumerator FadeTextAndBackgroundImageAsync()
+7 -3
View File
@@ -8,6 +8,7 @@ namespace Pal3.Input
using System;
using Command;
using Command.InternalCommands;
using Core.Utils;
using State;
using UnityEngine.InputSystem;
@@ -18,8 +19,11 @@ namespace Pal3.Input
public InputManager(PlayerInputActions playerInputActions)
{
_playerInputActions = playerInputActions ?? throw new ArgumentNullException(nameof(playerInputActions));
SwitchCurrentActionMap(GameState.UI);
_playerInputActions = Requires.IsNotNull(playerInputActions, nameof(playerInputActions));
// Goto initial state
SwitchCurrentActionMap(GameState.MenuShowing);
InputSystem.onActionChange += OnInputActionChange;
}
@@ -59,10 +63,10 @@ namespace Pal3.Input
InputActionMap inputActionMap = state switch
{
GameState.MenuShowing => _playerInputActions.UI.Get(),
GameState.Gameplay => _playerInputActions.Gameplay.Get(),
GameState.Cutscene => _playerInputActions.Cutscene.Get(),
GameState.VideoPlaying => _playerInputActions.VideoPlaying.Get(),
GameState.UI => _playerInputActions.UI.Get(),
_ => null
};
@@ -1,7 +1,7 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was auto-generated by com.unity.inputsystem:InputActionCodeGenerator
// version 1.5.0
// version 1.5.1
// from Assets/Scripts/Pal3/Input/PlayerInputActions.inputactions
//
// Changes to this file may cause incorrect behavior and will be lost if
Loaded 100 of 138 files, more files were not shown because too many files have changed in this diff. Show more