Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
be5aebde3b | ||
|
|
142593a9f2 | ||
|
|
63e8bf3291 | ||
|
|
0268e131f1 | ||
|
|
a3277187cf | ||
|
|
de45ada269 | ||
|
|
5e42873ca2 | ||
|
|
6a0648e3de | ||
|
|
9a114775dd | ||
|
|
45f5aefbaa | ||
|
|
f54efce2eb | ||
|
|
758e37cfab | ||
|
|
a9f9b5efdd | ||
|
|
f7a3a77130 | ||
|
|
97bc1a9c80 | ||
|
|
45bbca6c78 | ||
|
|
cfcf7fd493 | ||
|
|
188056e260 | ||
|
|
b55eca02bc | ||
|
|
4ff25872a0 | ||
|
|
9c6a742db6 | ||
|
|
a9b1fab282 | ||
|
|
fd3bf05aee | ||
|
|
11480c0fda | ||
|
|
1404ad41e6 | ||
|
|
86b82feecc | ||
|
|
488797d118 | ||
|
|
041f3ba2e9 | ||
|
|
cb0982d69c | ||
|
|
9024de3920 | ||
|
|
fbcba999aa | ||
|
|
0247d19677 | ||
|
|
31416dd1df | ||
|
|
f660dacfa6 | ||
|
|
a7648df691 | ||
|
|
273fd398ff | ||
|
|
5d7595970e | ||
|
|
57d1da275f | ||
|
|
07bf42ee04 | ||
|
|
2fe8e61032 | ||
|
|
10d9cc9eca | ||
|
|
86a698d66d | ||
|
|
efba3b899b | ||
|
|
c369b1cf14 | ||
|
|
8e7f6bdbe0 | ||
|
|
d37348e503 | ||
|
|
79435a7edb | ||
|
|
68026452c5 | ||
|
|
bd3243213c | ||
|
|
bae12e066d | ||
|
|
c57b4aaf78 | ||
|
|
e5449c0f06 | ||
|
|
54344ead7f | ||
|
|
f26636ca8c | ||
|
|
7ea58826cf | ||
|
|
c957519b50 | ||
|
|
95208f5328 | ||
|
|
74a1cd88e2 | ||
|
|
ddc1e7565b | ||
|
|
255103b36a | ||
|
|
6155eca8ce | ||
|
|
a0d6b9c725 | ||
|
|
5276462b8e | ||
|
|
5081dfd0d1 | ||
|
|
c2c69497d2 | ||
|
|
d05637763b | ||
|
|
3e8c0b2979 | ||
|
|
f1bd8a57db | ||
|
|
94c8e824d2 | ||
|
|
b49a24caf7 | ||
|
|
fba2ff7481 | ||
|
|
f621ab34b4 |
No files matched your search
@@ -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
|
||||
@@ -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
|
||||
@@ -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:
|
||||
@@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 06415fcd9086a4b3b9cb0804bf1013aa
|
||||
guid: 9e1d886e63529bb4ca3c95ece3e3189c
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
@@ -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
|
||||
@@ -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 @@
|
||||
!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~·—‘’“”…、。《》【】!(),:;?~+一丁七万丈三上下不与丐丑专且世丘丙业丛东丝丢两严丧个丫中丰串临丸丹为主丽举乃久么义之乌乍乎乏乐乔乖乘乙九乞也习乡书乩买乱乳乾了予争事二于亏云互五井亚些亡交亥亦产亨亩享京亭亮亲人亿什仁仃仅仆仇今介仍从仑仓仔仕他仗付仙仞代令以仪们仰仲仵件价任份仿企伉伍伎伏伐休众优伙会伟传伤伦伪伯估伴伶伸伺似但位低住佐佑体何佘余佛作你佣佩佬佯佳佼使侄侈例侍供依侠侣侥侧侬侮侯侵便促俊俏俐俗保俞信俨俩俪俭修俯俱俸俺倍倏們倒倔倘候倚倜借倦倩倪债值倾假偌偏偕做停健偶偷偿傀傅傍傥储催傲傻像僧僵僻儒儡儿允元兄充兆先光克免兑兔党兢入全八公六兮兰共关兴兵其具典兹养兼兽冀内冈册再冒冕写军农冠冢冤冥冬冯冰冲决况冶冷冻净凄准凉凋凌减凑凛凝几凡凤凭凰凶出击函凿刀刁刃分切刎刑划列刘则刚创初判刨利别刮到制刹刺刻剁剂剃削剌前剐剑剔剖剥剧剩剪副割剿劈力劝办功加务劣动助努劫励劲劳劾势勇勉勘募勤勺勾勿匀包匆匕化北匙匠匪匹区医匾匿十千升午卉半华协卑卒卓单卖南博卜卞占卡卢卦卧卫卯印危即却卵卷卸卿厂厄厅历厉压厌厕厘厚原厢厥厨厮去县叁参又及友双反发叔取受变叛叟口古句另叨叩只叫召叮可台史右叵叶号司叹叽吁吃各吆合吉吊同名后吏吐向吓吕吖吗君吝吞吟否吧吩含听吭启吴吵吸吹吼吾呀呃呆呈告呐呔呕呗员呜呢呦周呱味呵呶呸呻呼命咄咋和咎咏咐咒咔咕咙咦咧咪咬咱咳咶咸咻咽咿哀品哄哇哈哉响哎哑哗哟哥哦哨哩哪哭哮哲哼唆唇唉唐唔唠唤唧唬售唯唱唾啃商啊啥啦啧啬啰啸啼啾喀喂喃善喉喊喋喏喔喘喙喜喝喧喳喵喷喻喽嗅嗓嗔嗖嗜嗟嗤嗦嗨嗬嗯嗳嗽嘀嘉嘎嘘嘛嘞嘟嘱嘲嘴嘻嘿噎噗噜噢噤器噩噪噬噱嚎嚏嚣嚷嚼囊囔囚四回因团园困围固国图圃圆圈土圣在地场圾均坊坍坎坏坐坑块坚坛坝坟坠坡坤坦坪坷垂垃型垒垢垣垫垮埃埋城域埠埤培基堂堆堇堕堡堤堪堰堵塌塑塔塘塞填塾境墓墙墚增墟墨壁壑壤士壬壮声壳壶壹处备复夏夕外夙多夜够大天太夫夭央失头夷夸夹夺奇奈奉奋奎奏契奔奖套奠奢奥女奴奶奸她好如妃妄妆妇妈妍妒妓妖妙妞妥妨妹妻妾姊始姐姑姓委姗姚姜姥姨姬姻姿威娃娄娇娘娜娟娥娲娴娶娼婆婉婕婚婢婪婴婵婶婷婿媒媚媳媵嫁嫂嫉嫌嫔嫖嫡嫣嫦嫩嬉嬷子孑孓孔孕字存孙孚孝孟季孤学孩孪孬孰孵孺孽宁它宅宇守安宋完宏宗官宙定宜宝实宠客宣室宦宫宰害宴宵家容宽宾宿寂寄寅密寇富寐寒寝寞察寡寤寨寰寸对寺寻导寿封射将尊小少尔尖尘尚尝尤尬就尴尸尹尺尼尽尾尿局屁层居屈屋屎屏屐屑展属屠屡山屹岁岂岄岌岑岔岖岗岚岛岩岭岱岳岸峙峡峨峭峰峻崇崎崔崖崩崽嵯嶂巍川州巡巢工左巧巨巫差己已巳巴巷巽巾币市布帅师希帐帔帕帖帚帜帝带席帮帷常帼帽幄幅幌幕幢干平年并幸幺幻幼幽广庄庆庇床序庐库应底店庙庚府庞废度座庭庶康庸廉廊廖延廷建廻廿开异弃弄弊式弑弓引弛弟张弥弦弭弯弱弹强归当录彝形彤彦彩彪彭彰影役彻彼往征径待徇很律徐徒徕得徙御循微德心必忆忌忍忒志忘忙忠忡忧快念忽怀态怄怅怎怒怕怖怜思怠急怦性怨怪怯总恃恋恍恐恒恕恙恢恤恨恩恭息恰恳恶恻恼悄悉悍悔悟悠患悦您悬悯悲悴情惆惊惋惑惕惚惜惟惠惦惧惨惩惬惭惮惯想惶惹惺愁愈意愚感愣愤愧愫愿慈慌慎慑慕慢慧慨慰慷憎憾懂懈懒懦懵戈戊戌戎戏成我戒或战戚戟截戮戴户戾房所扁扇扈扉手才扎扑扒打扔托扛扣执扩扫扬扭扮扯扰扳扶批找承技抄把抑抓投抖抗折抚抛抟抢护报披抬抱抵抹押抽拂担拆拈拉拋拍拎拐拒拓拔拖拘拙招拜拟拢拣拥拦拧拨择括拯拳拷拼拽拾拿持挂指按挑挖挟挠挡挣挤挥挨挪挫振挺挽捅捆捉捌捎捏捐捕捞损捡换捣捧据捶捷掀掂授掉掌掏掐排掘掙掠探接控推掩措掳掷掺揉揍描提插揖握揣揪揭援搁搂搅搏搓搔搜搞搬搭携摄摆摇摈摊摔摘摧摩摸撇撑撒撕撞撤播撰擂擅操擎擒擦攀攒攫支收攸改攻放政故效敌敏救教敛敝敞敢散敬数敲整敷文斋斐斑斗料斛斜斟斤斥斧斩断斯新方於施旁旅旋族旗无既日旦旧旨早旬旭旱时旷旺昂昆昊昌明昏易昔昕昙星映春昧昨昭是昴昼显晃晋晌晒晓晕晖晚晦晧晨普景晰晴晶智晾暂暄暇暑暖暗暮暴曜曦曰曲曳更曹曾替最月有朋服朔朗望朝期木未末本术朱朴朵机朽杀杂权杆杈杉李杏材村杖杜杞束杠条来杨杭杯杰杳杵松板极构枉枕林枚果枝枢Line truncated
|
||||
!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~·—‘’“”…、。《》【】!(),:;?~+一丁七万丈三上下不与丐丑专且世丘丙业丛东丝丢两严丧个丫中丰串临丸丹为主丽举乃久么义之乌乍乎乏乐乔乖乘乙九乞也习乡书乩买乱乳乾了予争事二于亏云互五井亚些亡交亥亦产亨亩享京亭亮亲人亿什仁仃仅仆仇今介仍从仑仓仔仕他仗付仙仞代令以仪们仰仲仵件价任份仿企伉伍伎伏伐休众优伙会伟传伤伦伪伯估伴伶伸伺似但位低住佐佑体何佘余佛作你佣佩佬佯佳佼使侄侈例侍供依侠侣侥侧侬侮侯侵便促俊俏俐俗保俞信俨俩俪俭修俯俱俸俺倍倏們倒倔倘候倚倜借倦倩倪债值倾假偌偏偕做停健偶偷偿傀傅傍傥储催傲傻像僧僵僻儒儡儿允元兄充兆先光克免兑兔党兢入全八公六兮兰共关兴兵其具典兹养兼兽冀内冈册再冒冕写军农冠冢冤冥冬冯冰冲决况冶冷冻净凄准凉凋凌减凑凛凝几凡凤凭凰凶出击函凿刀刁刃分切刎刑划列刘则刚创初判刨利别刮到制刹刺刻剁剂剃削剌前剐剑剔剖剥剧剩剪副割剿劈力劝办功加务劣动助努劫励劲劳劾势勇勉勘募勤勺勾勿匀包匆匕化北匙匠匪匹区医匾匿十千升午卉半华协卑卒卓单卖南博卜卞占卡卢卦卧卫卯印危即却卵卷卸卿厂厄厅历厉压厌厕厘厚原厢厥厨厮去县叁参又及友双反发叔取受变叛叟口古句另叨叩只叫召叮可台史右叵叶号司叹叽吁吃各吆合吉吊同名后吏吐向吓吕吖吗君吝吞吟否吧吩含听吭启吴吵吸吹吼吾呀呃呆呈告呐呔呕呗员呜呢呦周呱味呵呶呸呻呼命咄咋和咎咏咐咒咔咕咙咦咧咪咬咱咳咶咸咻咽咿哀品哄哇哈哉响哎哑哗哟哥哦哨哩哪哭哮哲哼唆唇唉唐唔唠唤唧唬售唯唱唾啃商啊啥啦啧啬啰啸啼啾喀喂喃善喉喊喋喏喔喘喙喜喝喧喳喵喷喻喽嗅嗓嗔嗖嗜嗟嗤嗦嗨嗬嗯嗳嗽嘀嘉嘎嘘嘛嘞嘟嘱嘲嘴嘻嘿噎噗噜噢噤器噩噪噬噱嚎嚏嚣嚷嚼囊囔囚四回因团园困围固国图圃圆圈土圣在地场圾均坊坍坎坏坐坑块坚坛坝坟坠坡坤坦坪坷垂垃型垒垢垣垫垮埃埋城域埠埤培基堂堆堇堕堡堤堪堰堵塌塑塔塘塞填塾境墓墙墚增墟墨壁壑壤士壬壮声壳壶壹处备复夏夕外夙多夜够大天太夫夭央失头夷夸夹夺奇奈奉奋奎奏契奔奖套奠奢奥女奴奶奸她好如妃妄妆妇妈妍妒妓妖妙妞妥妨妹妻妾姊始姐姑姓委姗姚姜姥姨姬姻姿威娃娄娇娘娜娟娥娲娴娶娼婆婉婕婚婢婪婴婵婶婷婿媒媚媳媵嫁嫂嫉嫌嫔嫖嫡嫣嫦嫩嬉嬷子孑孓孔孕字存孙孚孝孟季孤学孩孪孬孰孵孺孽宁它宅宇守安宋完宏宗官宙定宜宝实宠客宣室宦宫宰害宴宵家容宽宾宿寂寄寅密寇富寐寒寝寞察寡寤寨寰寸对寺寻导寿封射将尊小少尔尖尘尚尝尤尬就尴尸尹尺尼尽尾尿局屁层居屈屋屎屏屐屑展属屠屡山屹岁岂岄岌岑岔岖岗岚岛岩岭岱岳岸峙峡峨峭峰峻崇崎崔崖崩崽嵯嶂巍川州巡巢工左巧巨巫差己已巳巴巷巽巾币市布帅师希帐帔帕帖帚帜帝带席帮帷常帼帽幄幅幌幕幢干平年并幸幺幻幼幽广庄庆庇床序庐库应底店庙庚府庞废度座庭庶康庸廉廊廖延廷建廻廿开异弃弄弊式弑弓引弛弟张弥弦弭弯弱弹强归当录彝形彤彦彩彪彭彰影役彻彼往征径待徇很律徐徒徕得徙御循微德心必忆忌忍忒志忘忙忠忡忧快念忽怀态怄怅怎怒怕怖怜思怠急怦性怨怪怯总恃恋恍恐恒恕恙恢恤恨恩恭息恰恳恶恻恼悄悉悍悔悟悠患悦您悬悯悲悴情惆惊惋惑惕惚惜惟惠惦惧惨惩惬惭惮惯想惶惹惺愁愈意愚感愣愤愧愫愿慈慌慎慑慕慢慧慨慰慷憎憾懂懈懒懦懵戈戊戌戎戏成我戒或战戚戟截戮戴户戾房所扁扇扈扉手才扎扑扒打扔托扛扣执扩扫扬扭扮扯扰扳扶批找承技抄把抑抓投抖抗折抚抛抟抢护报披抬抱抵抹押抽拂担拆拈拉拋拍拎拐拒拓拔拖拘拙招拜拟拢拣拥拦拧拨择括拯拳拷拼拽拾拿持挂指按挑挖挟挠挡挣挤挥挨挪挫振挺挽捅捆捉捌捎捏捐捕捞损捡换捣捧据捶捷掀掂授掉掌掏掐排掘掙掠探接控推掩措掳掷掺揉揍描提插揖握揣揪揭援搁搂搅搏搓搔搜搞搬搭携摄摆摇摈摊摔摘摧摩摸撇撑撒撕撞撤播撰擂擅操擎擒擦攀攒攫支收攸改攻放政故效敌敏救教敛敝敞敢散敬数敲整敷文斋斐斑斗料斛斜斟斤斥斧斩断斯新方於施旁旅旋族旗无既日旦旧旨早旬旭旱时旷旺昂昆昊昌明昏易昔昕昙星映春昧昨昭是昴昼显晃晋晌晒晓晕晖晚晦晧晨普景晰晴晶智晾暂暄暇暑暖暗暮暴曜曦曰曲曳更曹曾替最月有朋服朔朗望朝期木未末本术朱朴朵机朽杀杂权杆杈杉李杏材村杖杜杞束杠条来杨杭杯杰杳杵松板极构枉枕林枚果枝枢Line truncated
|
||||
@@ -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:
|
||||
@@ -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:
|
||||
@@ -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
|
||||
@@ -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
|
||||
}
|
||||
@@ -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: []
|
||||
|
Before Width: | Height: | Size: 1.6 KiB |
@@ -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:
|
||||
|
Before Width: | Height: | Size: 1012 B |
@@ -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:
|
||||
|
Before Width: | Height: | Size: 1.1 KiB |
@@ -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:
|
||||
|
Before Width: | Height: | Size: 329 B After Width: | Height: | Size: 329 B |
@@ -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:
|
||||
@@ -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:
|
||||
|
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 1.0 KiB |
|
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:
|
||||
|
Before Width: | Height: | Size: 1.6 KiB |
|
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:
|
||||
|
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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
@@ -29,6 +29,7 @@ namespace Core.Utils
|
||||
{
|
||||
name = typeof(T).ToString()
|
||||
};
|
||||
|
||||
_instance = singletonObj.AddComponent<T>();
|
||||
|
||||
return _instance;
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ namespace Pal3.Actor
|
||||
using Core.Services;
|
||||
using Data;
|
||||
using MetaData;
|
||||
using Player;
|
||||
using GamePlay;
|
||||
using Renderer;
|
||||
using Script.Waiter;
|
||||
using State;
|
||||
@@ -197,8 +197,7 @@ namespace Pal3.Actor
|
||||
textureProvider,
|
||||
_tintColor,
|
||||
polFile,
|
||||
weaponTextureProvider,
|
||||
Color.white);
|
||||
weaponTextureProvider);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -16,8 +16,7 @@ namespace Pal3.Actor
|
||||
using Core.Services;
|
||||
using Input;
|
||||
using MetaData;
|
||||
using Player;
|
||||
using Scene;
|
||||
using GamePlay;
|
||||
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)
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
#if PAL3A
|
||||
|
||||
namespace Pal3.Player
|
||||
namespace Pal3.Actor
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@@ -10,7 +10,7 @@ namespace Pal3.Actor
|
||||
using Command.InternalCommands;
|
||||
using Command.SceCommands;
|
||||
using Core.GameBox;
|
||||
using Player;
|
||||
using GamePlay;
|
||||
using Script.Waiter;
|
||||
using UnityEngine;
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
// See LICENSE file in the project root for license information.
|
||||
// ---------------------------------------------------------------------------------------------
|
||||
|
||||
namespace Pal3.Player
|
||||
namespace Pal3.Actor
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@@ -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;
|
||||
|
||||
@@ -17,9 +17,9 @@ namespace Pal3.Camera
|
||||
using Core.DataReader.Scn;
|
||||
using Core.GameBox;
|
||||
using Core.Utils;
|
||||
using GamePlay;
|
||||
using Input;
|
||||
using MetaData;
|
||||
using Player;
|
||||
using Scene;
|
||||
using Script.Waiter;
|
||||
using State;
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 515d83a628644044955b51117dde338d
|
||||
timeCreated: 1680489008
|
||||
@@ -0,0 +1,929 @@
|
||||
// ---------------------------------------------------------------------------------------------
|
||||
// Copyright (c) 2021-2023, Jiaqi Liu. All rights reserved.
|
||||
// See LICENSE file in the project root for license information.
|
||||
// ---------------------------------------------------------------------------------------------
|
||||
|
||||
namespace Pal3.Dev
|
||||
{
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
using Audio;
|
||||
using Command;
|
||||
using Command.InternalCommands;
|
||||
using Command.SceCommands;
|
||||
using Core.Utils;
|
||||
using GameSystem;
|
||||
using IngameDebugConsole;
|
||||
using Input;
|
||||
using MetaData;
|
||||
using Scene;
|
||||
using Script;
|
||||
using Script.Waiter;
|
||||
using Settings;
|
||||
using State;
|
||||
using TMPro;
|
||||
using UI;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Events;
|
||||
using UnityEngine.EventSystems;
|
||||
using UnityEngine.InputSystem;
|
||||
using UnityEngine.InputSystem.DualShock;
|
||||
using UnityEngine.UI;
|
||||
|
||||
public sealed class MainMenu : MonoBehaviour,
|
||||
ICommandExecutor<ToggleMainMenuRequest>,
|
||||
ICommandExecutor<GameSwitchToMainMenuCommand>,
|
||||
ICommandExecutor<ScenePostLoadingNotification>,
|
||||
ICommandExecutor<GameStateChangedNotification>
|
||||
{
|
||||
private const int SAVE_SLOT_COUNT = 5;
|
||||
|
||||
private GameSettings _gameSettings;
|
||||
private AudioManager _audioManager;
|
||||
private InputManager _inputManager;
|
||||
private EventSystem _eventSystem;
|
||||
private PlayerInputActions _playerInputActions;
|
||||
private ScriptManager _scriptManager;
|
||||
private TeamManager _teamManager;
|
||||
private GameStateManager _gameStateManager;
|
||||
private SceneManager _sceneManager;
|
||||
private SaveManager _saveManager;
|
||||
private InformationManager _informationManager;
|
||||
private MazeSkipper _mazeSkipper;
|
||||
|
||||
private CanvasGroup _mainMenuCanvasGroup;
|
||||
private GameObject _menuButtonPrefab;
|
||||
private RectTransform _backgroundTransform;
|
||||
private RectTransform _contentTransform;
|
||||
private GridLayoutGroup _contentGridLayoutGroup;
|
||||
private ScrollRect _contentScrollRect;
|
||||
|
||||
private bool _isInInitView = true;
|
||||
private CancellationTokenSource _initViewCameraOrbitAnimationCts = new ();
|
||||
private Camera _mainCamera;
|
||||
|
||||
private readonly List<string> _deferredExecutionCommands = new();
|
||||
|
||||
private readonly List<GameObject> _menuItems = new();
|
||||
|
||||
public void Init(GameSettings gameSettings,
|
||||
AudioManager audioManager,
|
||||
InputManager inputManager,
|
||||
EventSystem eventSystem,
|
||||
SceneManager sceneManager,
|
||||
GameStateManager gameStateManager,
|
||||
ScriptManager scriptManager,
|
||||
TeamManager teamManager,
|
||||
SaveManager saveManager,
|
||||
InformationManager informationManager,
|
||||
MazeSkipper mazeSkipper,
|
||||
CanvasGroup mainMenuCanvasGroup,
|
||||
GameObject menuButtonPrefab,
|
||||
ScrollRect contentScrollRect,
|
||||
RectTransform backgroundTransform,
|
||||
RectTransform contentTransform,
|
||||
Camera mainCamera)
|
||||
{
|
||||
_gameSettings = Requires.IsNotNull(gameSettings, nameof(gameSettings));
|
||||
_audioManager = Requires.IsNotNull(audioManager, nameof(audioManager));
|
||||
_inputManager = Requires.IsNotNull(inputManager, nameof(inputManager));
|
||||
_eventSystem = Requires.IsNotNull(eventSystem, nameof(eventSystem));
|
||||
_sceneManager = Requires.IsNotNull(sceneManager, nameof(sceneManager));
|
||||
_gameStateManager = Requires.IsNotNull(gameStateManager, nameof(gameStateManager));
|
||||
_scriptManager = Requires.IsNotNull(scriptManager, nameof(scriptManager));
|
||||
_teamManager = Requires.IsNotNull(teamManager, nameof(teamManager));
|
||||
_saveManager = Requires.IsNotNull(saveManager, nameof(saveManager));
|
||||
_informationManager = Requires.IsNotNull(informationManager, nameof(informationManager));
|
||||
_mazeSkipper = Requires.IsNotNull(mazeSkipper, nameof(mazeSkipper));
|
||||
_mainMenuCanvasGroup = Requires.IsNotNull(mainMenuCanvasGroup, nameof(mainMenuCanvasGroup));
|
||||
_menuButtonPrefab = Requires.IsNotNull(menuButtonPrefab, nameof(menuButtonPrefab));
|
||||
_contentScrollRect = Requires.IsNotNull(contentScrollRect, nameof(contentScrollRect));
|
||||
_backgroundTransform = Requires.IsNotNull(backgroundTransform, nameof(backgroundTransform));
|
||||
_contentTransform = Requires.IsNotNull(contentTransform, nameof(contentTransform));
|
||||
_mainCamera = Requires.IsNotNull(mainCamera, nameof(mainCamera));
|
||||
|
||||
_contentGridLayoutGroup = Requires.IsNotNull(
|
||||
_contentTransform.GetComponent<GridLayoutGroup>(), "ContentTransform's GridLayoutGroup");
|
||||
|
||||
_playerInputActions = inputManager.GetPlayerInputActions();
|
||||
|
||||
_mainMenuCanvasGroup.alpha = 0f;
|
||||
_mainMenuCanvasGroup.interactable = false;
|
||||
|
||||
_playerInputActions.Gameplay.ToggleStorySelector.performed += ToggleMainMenuPerformed;
|
||||
_playerInputActions.Cutscene.ToggleStorySelector.performed += ToggleMainMenuPerformed;
|
||||
_playerInputActions.Cutscene.ExitCurrentShowingMenu.performed += HideMainMenuPerformed;
|
||||
}
|
||||
|
||||
private void OnEnable()
|
||||
{
|
||||
CommandExecutorRegistry<ICommand>.Instance.Register(this);
|
||||
}
|
||||
|
||||
private void OnDisable()
|
||||
{
|
||||
CommandExecutorRegistry<ICommand>.Instance.UnRegister(this);
|
||||
_playerInputActions.Gameplay.ToggleStorySelector.performed -= ToggleMainMenuPerformed;
|
||||
_playerInputActions.Cutscene.ToggleStorySelector.performed -= ToggleMainMenuPerformed;
|
||||
_playerInputActions.Cutscene.ExitCurrentShowingMenu.performed -= HideMainMenuPerformed;
|
||||
}
|
||||
|
||||
private void ToggleMainMenuPerformed(InputAction.CallbackContext _)
|
||||
{
|
||||
ToggleMainMenu();
|
||||
}
|
||||
|
||||
private void HideMainMenuPerformed(InputAction.CallbackContext _)
|
||||
{
|
||||
if (_isInInitView) return;
|
||||
|
||||
if (_mainMenuCanvasGroup.interactable)
|
||||
{
|
||||
HideMenu();
|
||||
_gameStateManager.GoToState(GameState.Gameplay);
|
||||
}
|
||||
}
|
||||
|
||||
private void ToggleMainMenu()
|
||||
{
|
||||
if (_isInInitView) return;
|
||||
|
||||
if (_mainMenuCanvasGroup.interactable)
|
||||
{
|
||||
HideMenu();
|
||||
_gameStateManager.GoToState(GameState.Gameplay);
|
||||
}
|
||||
else if (_gameStateManager.GetCurrentState() == GameState.Gameplay)
|
||||
{
|
||||
ShowMenu();
|
||||
}
|
||||
}
|
||||
|
||||
public void ShowInitView()
|
||||
{
|
||||
#if PAL3
|
||||
// 景天房间
|
||||
_deferredExecutionCommands.Add("SceneActivateObject 14 0");
|
||||
_deferredExecutionCommands.Add("SceneActivateObject 15 0");
|
||||
_deferredExecutionCommands.Add("PlayerEnableInput 0");
|
||||
_deferredExecutionCommands.Add("CameraFollowPlayer 0");
|
||||
_deferredExecutionCommands.Add("CameraSetTransform -33.24 -19.48 688.0 308.31 240.44 480.61");
|
||||
_deferredExecutionCommands.Add("CameraFadeIn");
|
||||
CommandDispatcher<ICommand>.Instance.Dispatch(new SceneLoadCommand("q01", "yn09a"));
|
||||
#elif PAL3A
|
||||
// 南宫煌房间
|
||||
_deferredExecutionCommands.Add("PlayerEnableInput 0");
|
||||
_deferredExecutionCommands.Add("CameraFollowPlayer 0");
|
||||
_deferredExecutionCommands.Add("CameraSetTransform -21.69 -22.48 688.0 182.87 263.07 531.61");
|
||||
_deferredExecutionCommands.Add("CameraFadeIn");
|
||||
CommandDispatcher<ICommand>.Instance.Dispatch(new SceneLoadCommand("q02", "qn08y"));
|
||||
#endif
|
||||
|
||||
_audioManager.PlayThemeMusic();
|
||||
|
||||
if (!_initViewCameraOrbitAnimationCts.IsCancellationRequested)
|
||||
{
|
||||
_initViewCameraOrbitAnimationCts.Cancel();
|
||||
}
|
||||
_initViewCameraOrbitAnimationCts = new CancellationTokenSource();
|
||||
StartCoroutine(StartCameraOrbitAnimationAsync(_initViewCameraOrbitAnimationCts.Token));
|
||||
}
|
||||
|
||||
private IEnumerator StartCameraOrbitAnimationAsync(CancellationToken cancellationToken)
|
||||
{
|
||||
#if PAL3
|
||||
_mainCamera.fieldOfView = 14f;
|
||||
#elif PAL3A
|
||||
_mainCamera.fieldOfView = 16f;
|
||||
#endif
|
||||
|
||||
yield return new WaitUntil(() => _deferredExecutionCommands.Count == 0);
|
||||
|
||||
if (!_isInInitView || cancellationToken.IsCancellationRequested)
|
||||
{
|
||||
yield break;
|
||||
}
|
||||
|
||||
const float animationDuration = 20f;
|
||||
WaitForSeconds waitDuration = new WaitForSeconds(animationDuration + 3f);
|
||||
|
||||
while (_isInInitView && !cancellationToken.IsCancellationRequested)
|
||||
{
|
||||
#if PAL3
|
||||
CommandDispatcher<ICommand>.Instance.Dispatch(
|
||||
new CameraOrbitHorizontalCommand(-43.99f, -28.73f, 688.0f, animationDuration, 1, 0));
|
||||
#elif PAL3A
|
||||
CommandDispatcher<ICommand>.Instance.Dispatch(
|
||||
new CameraOrbitHorizontalCommand(-39.99f, -27.73f, 688.0f, animationDuration, 1, 0));
|
||||
#endif
|
||||
yield return waitDuration;
|
||||
if (!_isInInitView || cancellationToken.IsCancellationRequested) { yield break; }
|
||||
#if PAL3
|
||||
CommandDispatcher<ICommand>.Instance.Dispatch(
|
||||
new CameraOrbitHorizontalCommand(-33.24f, -19.48f, 688.0f, animationDuration, 1, 0));
|
||||
#elif PAL3A
|
||||
CommandDispatcher<ICommand>.Instance.Dispatch(
|
||||
new CameraOrbitHorizontalCommand(-21.69f, -22.48f, 688.0f, animationDuration, 1, 0));
|
||||
#endif
|
||||
yield return waitDuration;
|
||||
}
|
||||
}
|
||||
|
||||
public void ShowMenu()
|
||||
{
|
||||
_gameStateManager.GoToState(GameState.Cutscene);
|
||||
CommandDispatcher<ICommand>.Instance.Dispatch(
|
||||
new ActorStopActionAndStandCommand(ActorConstants.PlayerActorVirtualID));
|
||||
SetupMainMenuButtons();
|
||||
|
||||
_mainMenuCanvasGroup.alpha = 1f;
|
||||
_mainMenuCanvasGroup.interactable = true;
|
||||
}
|
||||
|
||||
public void HideMenu()
|
||||
{
|
||||
_gameSettings.SaveSettings();
|
||||
|
||||
_mainMenuCanvasGroup.alpha = 0f;
|
||||
_mainMenuCanvasGroup.interactable = false;
|
||||
DestroyAllMenuItems();
|
||||
|
||||
_isInInitView = false;
|
||||
if (!_initViewCameraOrbitAnimationCts.IsCancellationRequested)
|
||||
{
|
||||
_initViewCameraOrbitAnimationCts.Cancel();
|
||||
}
|
||||
}
|
||||
|
||||
private void SetupMainMenuButtons()
|
||||
{
|
||||
SetupMenuLayout(isVertical: true);
|
||||
|
||||
if (!_isInInitView)
|
||||
{
|
||||
_menuItems.Add(CreateMenuButton("返回游戏", delegate
|
||||
{
|
||||
HideMenu();
|
||||
_gameStateManager.GoToState(GameState.Gameplay);
|
||||
}));
|
||||
}
|
||||
|
||||
_menuItems.Add(CreateMenuButton("新的游戏", delegate
|
||||
{
|
||||
CommandDispatcher<ICommand>.Instance.Dispatch(new ResetGameStateCommand());
|
||||
HideMenu();
|
||||
StartNewGame();
|
||||
}));
|
||||
|
||||
if (!_isInInitView)
|
||||
{
|
||||
_menuItems.Add(CreateMenuButton("保存游戏", delegate
|
||||
{
|
||||
DestroyAllMenuItems();
|
||||
SetupSaveMenuButtons();
|
||||
}));
|
||||
}
|
||||
|
||||
_menuItems.Add(CreateMenuButton("读取存档", delegate
|
||||
{
|
||||
DestroyAllMenuItems();
|
||||
SetupLoadMenuButtons();
|
||||
}));
|
||||
|
||||
_menuItems.Add(CreateMenuButton("剧情选择", delegate
|
||||
{
|
||||
DestroyAllMenuItems();
|
||||
SetupStorySelectionButtons();
|
||||
}));
|
||||
|
||||
if (!_isInInitView &&
|
||||
_mazeSkipper.IsMazeSceneAndHasSkipperCommands(_sceneManager.GetCurrentScene().GetSceneInfo()))
|
||||
{
|
||||
_menuItems.Add(CreateMenuButton("迷宫入口", delegate
|
||||
{
|
||||
_mazeSkipper.PortalToEntrance();
|
||||
HideMenu();
|
||||
_gameStateManager.GoToState(GameState.Gameplay);
|
||||
}));
|
||||
_menuItems.Add(CreateMenuButton("迷宫出口或剧情点", delegate
|
||||
{
|
||||
_mazeSkipper.PortalToExitOrNextStoryPoint();
|
||||
HideMenu();
|
||||
_gameStateManager.GoToState(GameState.Gameplay);
|
||||
}));
|
||||
}
|
||||
|
||||
_menuItems.Add(CreateMenuButton("游戏设置", delegate
|
||||
{
|
||||
DestroyAllMenuItems();
|
||||
SetupSettingButtons();
|
||||
}));
|
||||
|
||||
#if UNITY_STANDALONE
|
||||
_menuItems.Add(CreateMenuButton("退出游戏", delegate
|
||||
{
|
||||
#if UNITY_EDITOR
|
||||
UnityEditor.EditorApplication.isPlaying = false;
|
||||
#else
|
||||
Application.Quit();
|
||||
#endif
|
||||
}));
|
||||
#endif
|
||||
|
||||
SetupButtonNavigations(isUpAndDown: true);
|
||||
|
||||
SelectFirstButtonForEventSystem();
|
||||
|
||||
UpdateRectTransformWidthAndHeight(_backgroundTransform,
|
||||
_contentGridLayoutGroup.cellSize.x + 100f,
|
||||
(_contentGridLayoutGroup.cellSize.y + _contentGridLayoutGroup.spacing.y) * _menuItems.Count
|
||||
- _contentGridLayoutGroup.spacing.y + 100f);
|
||||
}
|
||||
|
||||
private void SetupSettingButtons()
|
||||
{
|
||||
SetupMenuLayout(isVertical: true);
|
||||
|
||||
const string lightingEnabledText = "实时光影:已开启";
|
||||
const string lightingDisabledText = "实时光影:已关闭";
|
||||
const string ssaoEnabledText = "环境光遮蔽:已开启";
|
||||
const string ssaoDisabledText = "环境光遮蔽:已关闭";
|
||||
|
||||
// Toon materials are not available in open source build.
|
||||
// so lighting and shadow will not work, thus we remove the option.
|
||||
if (!_gameSettings.IsOpenSourceVersion)
|
||||
{
|
||||
string lightAndShadowButtonText = _gameSettings.IsRealtimeLightingAndShadowsEnabled ?
|
||||
lightingEnabledText :
|
||||
lightingDisabledText;
|
||||
_menuItems.Add(CreateMenuButton(lightAndShadowButtonText, delegate
|
||||
{
|
||||
// Do not allow toggling lighting and shadow if there are scripts running
|
||||
// because it might cause unexpected behavior.
|
||||
if (_scriptManager.GetNumberOfRunningScripts() > 0) return;
|
||||
|
||||
_gameSettings.IsRealtimeLightingAndShadowsEnabled =
|
||||
!_gameSettings.IsRealtimeLightingAndShadowsEnabled;
|
||||
|
||||
// Update button text
|
||||
_menuItems.FirstOrDefault(_ => _.GetComponentInChildren<TextMeshProUGUI>() is
|
||||
{} textUGUI && textUGUI.text.StartsWith("实时光影:"))!.GetComponentInChildren<TextMeshProUGUI>().text =
|
||||
_gameSettings.IsRealtimeLightingAndShadowsEnabled ? lightingEnabledText : lightingDisabledText;
|
||||
|
||||
// Should turn off SSAO if realtime lighting and shadows is disabled
|
||||
if (!_gameSettings.IsRealtimeLightingAndShadowsEnabled && _gameSettings.IsAmbientOcclusionEnabled)
|
||||
{
|
||||
_gameSettings.IsAmbientOcclusionEnabled = false;
|
||||
_menuItems.FirstOrDefault(_ => _.GetComponentInChildren<TextMeshProUGUI>() is {text: ssaoEnabledText})!
|
||||
.GetComponentInChildren<TextMeshProUGUI>().text = ssaoDisabledText;
|
||||
CommandDispatcher<ICommand>.Instance.Dispatch(new UIDisplayNoteCommand("环境光遮蔽已关闭"));
|
||||
}
|
||||
|
||||
if (_isInInitView)
|
||||
{
|
||||
ShowInitView(); // Reload init scene to apply changes
|
||||
}
|
||||
else // reload scene to apply changes
|
||||
{
|
||||
var commands = _saveManager.ConvertCurrentGameStateToCommands(SaveLevel.Full);
|
||||
var saveFileContent = string.Join('\n', commands.Select(CommandExtensions.ToString).ToList());
|
||||
ExecuteCommandsFromSaveFile(saveFileContent);
|
||||
}
|
||||
|
||||
CommandDispatcher<ICommand>.Instance.Dispatch(new UIDisplayNoteCommand("实时光影已" +
|
||||
(_gameSettings.IsRealtimeLightingAndShadowsEnabled ? "开启(注意性能和耗电影响)" : "关闭") + ""));
|
||||
}));
|
||||
|
||||
#if !UNITY_ANDROID
|
||||
string ssaoButtonText = _gameSettings.IsAmbientOcclusionEnabled ? ssaoEnabledText : ssaoDisabledText;
|
||||
_menuItems.Add(CreateMenuButton(ssaoButtonText, delegate
|
||||
{
|
||||
if (!_gameSettings.IsAmbientOcclusionEnabled && !_gameSettings.IsRealtimeLightingAndShadowsEnabled)
|
||||
{
|
||||
CommandDispatcher<ICommand>.Instance.Dispatch(new UIDisplayNoteCommand("请先开启实时光影,再开启环境光遮蔽"));
|
||||
return;
|
||||
}
|
||||
|
||||
_gameSettings.IsAmbientOcclusionEnabled =
|
||||
!_gameSettings.IsAmbientOcclusionEnabled;
|
||||
|
||||
// Update button text
|
||||
_menuItems.FirstOrDefault(_ => _.GetComponentInChildren<TextMeshProUGUI>() is
|
||||
{} textUGUI && textUGUI.text.StartsWith("环境光遮蔽:"))!.GetComponentInChildren<TextMeshProUGUI>().text =
|
||||
_gameSettings.IsAmbientOcclusionEnabled ? ssaoEnabledText : ssaoDisabledText;
|
||||
|
||||
CommandDispatcher<ICommand>.Instance.Dispatch(new UIDisplayNoteCommand("环境光遮蔽已" +
|
||||
(_gameSettings.IsAmbientOcclusionEnabled ? "开启(注意性能和耗电影响)" : "关闭") + ""));
|
||||
}));
|
||||
#endif
|
||||
}
|
||||
|
||||
#if UNITY_STANDALONE
|
||||
const string vsyncEnabledText = "垂直同步:已开启";
|
||||
const string vsyncDisabledText = "垂直同步:已关闭";
|
||||
string vsyncButtonText = _gameSettings.VSyncCount == 0 ? vsyncDisabledText : vsyncEnabledText;
|
||||
_menuItems.Add(CreateMenuButton(vsyncButtonText, delegate
|
||||
{
|
||||
_gameSettings.VSyncCount = _gameSettings.VSyncCount == 0 ? 1 : 0;
|
||||
|
||||
// Update button text
|
||||
_menuItems.FirstOrDefault(_ => _.GetComponentInChildren<TextMeshProUGUI>() is
|
||||
{} textUGUI && textUGUI.text.StartsWith("垂直同步:"))!.GetComponentInChildren<TextMeshProUGUI>().text =
|
||||
_gameSettings.VSyncCount == 0 ? vsyncDisabledText : vsyncEnabledText;
|
||||
|
||||
CommandDispatcher<ICommand>.Instance.Dispatch(new UIDisplayNoteCommand("垂直同步已" +
|
||||
(_gameSettings.VSyncCount == 0 ? "关闭" : "开启") + ""));
|
||||
}));
|
||||
#endif
|
||||
|
||||
#if UNITY_IOS || UNITY_ANDROID
|
||||
const string fullResolutionScaleText = "渲染分辨率:100%";
|
||||
const string halfResolutionScaleText = "渲染分辨率:75%";
|
||||
string resolutionButtonText = Math.Abs(_gameSettings.ResolutionScale - 1f) < 0.01f
|
||||
? fullResolutionScaleText
|
||||
: halfResolutionScaleText;
|
||||
_menuItems.Add(CreateMenuButton(resolutionButtonText, delegate
|
||||
{
|
||||
_gameSettings.ResolutionScale = Math.Abs(_gameSettings.ResolutionScale - 1f) < 0.01f ? 0.75f : 1f;
|
||||
|
||||
// Update button text
|
||||
_menuItems.FirstOrDefault(_ => _.GetComponentInChildren<TextMeshProUGUI>() is { } textUGUI &&
|
||||
textUGUI.text.StartsWith("渲染分辨率:"))!.GetComponentInChildren<TextMeshProUGUI>().text =
|
||||
Math.Abs(_gameSettings.ResolutionScale - 1f) < 0.01f ? fullResolutionScaleText : halfResolutionScaleText;
|
||||
|
||||
CommandDispatcher<ICommand>.Instance.Dispatch(new UIDisplayNoteCommand("渲染分辨率已" +
|
||||
(Math.Abs(_gameSettings.ResolutionScale - 1f) < 0.01f ? "调整为100%" : "调整为75%") + ""));
|
||||
}));
|
||||
#endif
|
||||
|
||||
// #if UNITY_STANDALONE
|
||||
// Dictionary<int, string> antiAliasingText = new ()
|
||||
// {
|
||||
// [0] = "抗锯齿:关闭",
|
||||
// [2] = "抗锯齿:2x",
|
||||
// [4] = "抗锯齿:4x",
|
||||
// [8] = "抗锯齿:8x",
|
||||
// };
|
||||
//
|
||||
// string antiAliasingButtonText = antiAliasingText[0];
|
||||
// if (antiAliasingText.ContainsKey(_gameSettings.AntiAliasing))
|
||||
// {
|
||||
// antiAliasingButtonText = antiAliasingText[_gameSettings.AntiAliasing];
|
||||
// }
|
||||
//
|
||||
// _menuItems.Add(CreateMenuButton(antiAliasingButtonText, delegate
|
||||
// {
|
||||
// _gameSettings.AntiAliasing = _gameSettings.AntiAliasing switch
|
||||
// {
|
||||
// 0 => 2, 2 => 4, 4 => 8, 8 => 0, _ => 0,
|
||||
// };
|
||||
//
|
||||
// _menuItems.FirstOrDefault(_ => _.GetComponentInChildren<TextMeshProUGUI>() is { } textUGUI &&
|
||||
// textUGUI.text.StartsWith("抗锯齿:"))!.GetComponentInChildren<TextMeshProUGUI>().text =
|
||||
// antiAliasingText[_gameSettings.AntiAliasing];
|
||||
//
|
||||
// CommandDispatcher<ICommand>.Instance.Dispatch(_gameSettings.AntiAliasing == 0
|
||||
// ? new UIDisplayNoteCommand("抗锯齿已关闭")
|
||||
// : new UIDisplayNoteCommand("抗锯齿已开启,等级:" + _gameSettings.AntiAliasing));
|
||||
// }));
|
||||
// #endif
|
||||
|
||||
const string musicEnabledText = "音乐:已开启";
|
||||
const string musicDisabledText = "音乐:已关闭";
|
||||
string musicButtonText = _gameSettings.MusicVolume == 0f ? musicDisabledText : musicEnabledText;
|
||||
_menuItems.Add(CreateMenuButton(musicButtonText, delegate
|
||||
{
|
||||
_gameSettings.MusicVolume = _gameSettings.MusicVolume == 0f ? 0.5f : 0f;
|
||||
|
||||
// Update button text
|
||||
_menuItems.FirstOrDefault(_ => _.GetComponentInChildren<TextMeshProUGUI>() is
|
||||
{} textUGUI && textUGUI.text.StartsWith("音乐:"))!.GetComponentInChildren<TextMeshProUGUI>().text =
|
||||
_gameSettings.MusicVolume == 0f ? musicDisabledText : musicEnabledText;
|
||||
|
||||
CommandDispatcher<ICommand>.Instance.Dispatch(new UIDisplayNoteCommand("音乐已" +
|
||||
(_gameSettings.MusicVolume == 0f ? "关闭" : "开启") + ""));
|
||||
}));
|
||||
|
||||
const string sfxEnabledText = "音效:已开启";
|
||||
const string sfxDisabledText = "音效:已关闭";
|
||||
string sfxButtonText = _gameSettings.SfxVolume == 0f ? sfxDisabledText : sfxEnabledText;
|
||||
_menuItems.Add(CreateMenuButton(sfxButtonText, delegate
|
||||
{
|
||||
_gameSettings.SfxVolume = _gameSettings.SfxVolume == 0f ? 0.5f : 0f;
|
||||
|
||||
// Update button text
|
||||
_menuItems.FirstOrDefault(_ => _.GetComponentInChildren<TextMeshProUGUI>() is
|
||||
{} textUGUI && textUGUI.text.StartsWith("音效:"))!.GetComponentInChildren<TextMeshProUGUI>().text =
|
||||
_gameSettings.SfxVolume == 0f ? sfxDisabledText : sfxEnabledText;
|
||||
|
||||
CommandDispatcher<ICommand>.Instance.Dispatch(new UIDisplayNoteCommand("音效已" +
|
||||
(_gameSettings.SfxVolume == 0f ? "关闭" : "开启") + ""));
|
||||
}));
|
||||
|
||||
_menuItems.Add(CreateMenuButton("返回", delegate
|
||||
{
|
||||
_gameSettings.SaveSettings();
|
||||
DestroyAllMenuItems();
|
||||
SetupMainMenuButtons();
|
||||
}));
|
||||
|
||||
SetupButtonNavigations(isUpAndDown: true);
|
||||
|
||||
SelectFirstButtonForEventSystem();
|
||||
|
||||
UpdateRectTransformWidthAndHeight(_backgroundTransform,
|
||||
_contentGridLayoutGroup.cellSize.x + 100f,
|
||||
(_contentGridLayoutGroup.cellSize.y + _contentGridLayoutGroup.spacing.y) * _menuItems.Count
|
||||
- _contentGridLayoutGroup.spacing.y + 100f);
|
||||
}
|
||||
|
||||
private void SetupSaveMenuButtons()
|
||||
{
|
||||
SetupMenuLayout(isVertical: true);
|
||||
|
||||
const string saveSlotButtonFormat = "存档位 {0}:{1}";
|
||||
// 0 is reserved for auto-save
|
||||
for (int i = 1; i <= SAVE_SLOT_COUNT; i++)
|
||||
{
|
||||
string slotButtonText = _saveManager.SaveSlotExists(i) ? string.Format(saveSlotButtonFormat, i,
|
||||
_saveManager.GetSaveSlotLastWriteTime(i)) : string.Format(saveSlotButtonFormat, i, "空");
|
||||
|
||||
var slotIndex = i;
|
||||
_menuItems.Add(CreateMenuButton(slotButtonText, delegate
|
||||
{
|
||||
IList<ICommand> gameStateCommands = _saveManager.ConvertCurrentGameStateToCommands(SaveLevel.Full);
|
||||
bool success = _saveManager.SaveGameStateToSlot(slotIndex, gameStateCommands);
|
||||
CommandDispatcher<ICommand>.Instance.Dispatch(success
|
||||
? new UIDisplayNoteCommand("游戏保存成功")
|
||||
: new UIDisplayNoteCommand("游戏保存失败"));
|
||||
if (success)
|
||||
{
|
||||
// Update button text
|
||||
_menuItems.FirstOrDefault(_ => _.GetComponentInChildren<TextMeshProUGUI>() is
|
||||
{ } textUGUI && textUGUI.text.Equals(slotButtonText, StringComparison.Ordinal))!
|
||||
.GetComponentInChildren<TextMeshProUGUI>().text =
|
||||
string.Format(saveSlotButtonFormat, slotIndex, _saveManager.GetSaveSlotLastWriteTime(slotIndex));
|
||||
}
|
||||
}));
|
||||
}
|
||||
|
||||
_menuItems.Add(CreateMenuButton("返回", delegate
|
||||
{
|
||||
DestroyAllMenuItems();
|
||||
SetupMainMenuButtons();
|
||||
}));
|
||||
|
||||
SetupButtonNavigations(isUpAndDown: true);
|
||||
|
||||
SelectFirstButtonForEventSystem();
|
||||
|
||||
UpdateRectTransformWidthAndHeight(_backgroundTransform,
|
||||
_contentGridLayoutGroup.cellSize.x + 100f,
|
||||
(_contentGridLayoutGroup.cellSize.y + _contentGridLayoutGroup.spacing.y) * _menuItems.Count
|
||||
- _contentGridLayoutGroup.spacing.y + 100f);
|
||||
}
|
||||
|
||||
private void SetupLoadMenuButtons()
|
||||
{
|
||||
SetupMenuLayout(isVertical: true);
|
||||
|
||||
bool autoSaveSlotExists = _saveManager.SaveSlotExists(SaveManager.AutoSaveSlotIndex);
|
||||
string autoSaveSlotButtonText = autoSaveSlotExists ? $"自动存档:{_saveManager.GetSaveSlotLastWriteTime(SaveManager.AutoSaveSlotIndex)}"
|
||||
: "自动存档:无";
|
||||
|
||||
_menuItems.Add(CreateMenuButton(autoSaveSlotButtonText, delegate
|
||||
{
|
||||
if (!autoSaveSlotExists) return;
|
||||
var saveFileContent = _saveManager.LoadFromSaveSlot(SaveManager.AutoSaveSlotIndex);
|
||||
if (saveFileContent != null)
|
||||
{
|
||||
HideMenu();
|
||||
ExecuteCommandsFromSaveFile(saveFileContent);
|
||||
}
|
||||
else
|
||||
{
|
||||
CommandDispatcher<ICommand>.Instance.Dispatch( new UIDisplayNoteCommand("存档文件不存在或读取失败"));
|
||||
}
|
||||
}));
|
||||
|
||||
const string saveSlotButtonFormat = "存档位 {0}:{1}";
|
||||
// 0 is reserved for auto-save
|
||||
for (int i = 1; i <= SAVE_SLOT_COUNT; i++)
|
||||
{
|
||||
bool slotExists = _saveManager.SaveSlotExists(i);
|
||||
string slotButtonText = slotExists ? string.Format(saveSlotButtonFormat, i,
|
||||
_saveManager.GetSaveSlotLastWriteTime(i)) : string.Format(saveSlotButtonFormat, i, "空");
|
||||
|
||||
var slotIndex = i;
|
||||
if (slotExists)
|
||||
{
|
||||
_menuItems.Add(CreateMenuButton(slotButtonText, delegate
|
||||
{
|
||||
var saveFileContent = _saveManager.LoadFromSaveSlot(slotIndex);
|
||||
if (saveFileContent != null)
|
||||
{
|
||||
HideMenu();
|
||||
ExecuteCommandsFromSaveFile(saveFileContent);
|
||||
}
|
||||
else
|
||||
{
|
||||
CommandDispatcher<ICommand>.Instance.Dispatch( new UIDisplayNoteCommand("存档文件不存在或读取失败"));
|
||||
}
|
||||
}));
|
||||
}
|
||||
else
|
||||
{
|
||||
_menuItems.Add(CreateMenuButton(slotButtonText, null));
|
||||
}
|
||||
}
|
||||
|
||||
_menuItems.Add(CreateMenuButton("返回", delegate
|
||||
{
|
||||
DestroyAllMenuItems();
|
||||
SetupMainMenuButtons();
|
||||
}));
|
||||
|
||||
SetupButtonNavigations(isUpAndDown: true);
|
||||
|
||||
SelectFirstButtonForEventSystem();
|
||||
|
||||
UpdateRectTransformWidthAndHeight(_backgroundTransform,
|
||||
_contentGridLayoutGroup.cellSize.x + 100f,
|
||||
(_contentGridLayoutGroup.cellSize.y + _contentGridLayoutGroup.spacing.y) * _menuItems.Count
|
||||
- _contentGridLayoutGroup.spacing.y + 100f);
|
||||
}
|
||||
|
||||
private void SetupStorySelectionButtons()
|
||||
{
|
||||
SetupMenuLayout(isVertical: false);
|
||||
|
||||
_menuItems.Add(CreateMenuButton("返回", delegate
|
||||
{
|
||||
_contentTransform.anchoredPosition = Vector2.zero;
|
||||
DestroyAllMenuItems();
|
||||
SetupMainMenuButtons();
|
||||
}));
|
||||
|
||||
foreach (var story in DevCommands.StoryJumpPoints)
|
||||
{
|
||||
_menuItems.Add(CreateMenuButton(story.Key, delegate
|
||||
{
|
||||
HideMenu();
|
||||
_saveManager.IsAutoSaveEnabled = false; // Disable auto save during loading
|
||||
CommandDispatcher<ICommand>.Instance.Dispatch(new ResetGameStateCommand());
|
||||
ExecuteCommands(story.Value);
|
||||
}));
|
||||
}
|
||||
|
||||
SetupButtonNavigations(isUpAndDown: false);
|
||||
|
||||
SelectFirstButtonForEventSystem();
|
||||
|
||||
UpdateRectTransformWidthAndHeight(_backgroundTransform,
|
||||
(_contentGridLayoutGroup.cellSize.x + _contentGridLayoutGroup.spacing.x) * _menuItems.Count
|
||||
- _contentGridLayoutGroup.spacing.x + 100f,
|
||||
_contentGridLayoutGroup.cellSize.y + 100f);
|
||||
}
|
||||
|
||||
private void UpdateRectTransformWidthAndHeight(RectTransform rectTransform, float width, float height)
|
||||
{
|
||||
rectTransform.SetSizeWithCurrentAnchors(RectTransform.Axis.Horizontal, width);
|
||||
rectTransform.SetSizeWithCurrentAnchors(RectTransform.Axis.Vertical, height);
|
||||
rectTransform.ForceUpdateRectTransforms();
|
||||
}
|
||||
|
||||
private void SelectFirstButtonForEventSystem()
|
||||
{
|
||||
InputDevice lastActiveInputDevice = _inputManager.GetLastActiveInputDevice();
|
||||
|
||||
if (lastActiveInputDevice == Keyboard.current ||
|
||||
lastActiveInputDevice == Gamepad.current ||
|
||||
lastActiveInputDevice == DualShockGamepad.current)
|
||||
{
|
||||
Button firstButton = _menuItems.First(_ => _.GetComponent<Button>() != null).GetComponent<Button>();
|
||||
_eventSystem.firstSelectedGameObject = firstButton.gameObject;
|
||||
firstButton.Select();
|
||||
}
|
||||
else
|
||||
{
|
||||
_eventSystem.firstSelectedGameObject = null;
|
||||
}
|
||||
}
|
||||
|
||||
GameObject CreateMenuButton(string text, UnityAction onSelection)
|
||||
{
|
||||
GameObject menuButton = Instantiate(_menuButtonPrefab, _contentTransform);
|
||||
var buttonTextUI = menuButton.GetComponentInChildren<TextMeshProUGUI>();
|
||||
buttonTextUI.text = text;
|
||||
var button = menuButton.GetComponent<Button>();
|
||||
button.colors = UITheme.GetButtonColors();
|
||||
if (onSelection != null)
|
||||
{
|
||||
button.onClick.AddListener(onSelection);
|
||||
}
|
||||
return menuButton;
|
||||
}
|
||||
|
||||
private void SetupMenuLayout(bool isVertical)
|
||||
{
|
||||
if (isVertical)
|
||||
{
|
||||
_contentGridLayoutGroup.constraint = GridLayoutGroup.Constraint.FixedColumnCount;
|
||||
_contentGridLayoutGroup.constraintCount = 1;
|
||||
_contentGridLayoutGroup.cellSize = new Vector2(500, 75);
|
||||
_contentGridLayoutGroup.spacing = new Vector2(20, 20);
|
||||
_contentScrollRect.horizontal = false;
|
||||
_contentScrollRect.vertical = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
_contentGridLayoutGroup.constraint = GridLayoutGroup.Constraint.FixedRowCount;
|
||||
_contentGridLayoutGroup.constraintCount = 1;
|
||||
_contentGridLayoutGroup.cellSize = new Vector2(45, 500);
|
||||
_contentGridLayoutGroup.spacing = new Vector2(10, 30);
|
||||
_contentScrollRect.horizontal = true;
|
||||
_contentScrollRect.vertical = false;
|
||||
}
|
||||
}
|
||||
|
||||
private void SetupButtonNavigations(bool isUpAndDown)
|
||||
{
|
||||
// Setup button navigation
|
||||
void ConfigureButtonNavigation(Button button, int index, int count)
|
||||
{
|
||||
Navigation buttonNavigation = button.navigation;
|
||||
buttonNavigation.mode = Navigation.Mode.Explicit;
|
||||
|
||||
int previousIndex = index == 0 ? count - 1 : index - 1;
|
||||
int nextIndex = index == count - 1 ? 0 : index + 1;
|
||||
|
||||
if (isUpAndDown)
|
||||
{
|
||||
buttonNavigation.selectOnUp = _menuItems[previousIndex].GetComponentInChildren<Button>();
|
||||
buttonNavigation.selectOnDown = _menuItems[nextIndex].GetComponentInChildren<Button>();
|
||||
}
|
||||
else
|
||||
{
|
||||
buttonNavigation.selectOnLeft = _menuItems[previousIndex].GetComponentInChildren<Button>();
|
||||
buttonNavigation.selectOnRight = _menuItems[nextIndex].GetComponentInChildren<Button>();
|
||||
}
|
||||
|
||||
button.navigation = buttonNavigation;
|
||||
}
|
||||
|
||||
for (var i = 0; i < _menuItems.Count; i++)
|
||||
{
|
||||
var button = _menuItems[i].GetComponentInChildren<Button>();
|
||||
ConfigureButtonNavigation(button, i, _menuItems.Count);
|
||||
}
|
||||
}
|
||||
|
||||
private void DestroyAllMenuItems()
|
||||
{
|
||||
foreach (GameObject item in _menuItems)
|
||||
{
|
||||
item.GetComponent<Button>()?.onClick.RemoveAllListeners();
|
||||
Destroy(item);
|
||||
}
|
||||
_menuItems.Clear();
|
||||
}
|
||||
|
||||
private void StartNewGame()
|
||||
{
|
||||
// Init main story progress
|
||||
_scriptManager.SetGlobalVariable(ScriptConstants.MainStoryVariableName, 0);
|
||||
|
||||
// Add init script
|
||||
_scriptManager.AddScript(ScriptConstants.InitScriptId);
|
||||
|
||||
// Add main actor to the team
|
||||
_teamManager.AddActor(0);
|
||||
|
||||
_gameStateManager.GoToState(GameState.Cutscene);
|
||||
}
|
||||
|
||||
private void ExecuteCommands(string commands)
|
||||
{
|
||||
foreach (var command in commands.Split('\n'))
|
||||
{
|
||||
if (!string.IsNullOrEmpty(command))
|
||||
{
|
||||
DebugLogConsole.ExecuteCommand(command);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void ExecuteCommandsFromSaveFile(string saveFileContent)
|
||||
{
|
||||
_informationManager.EnableNoteDisplay(false);
|
||||
_saveManager.IsAutoSaveEnabled = false; // Disable auto save during loading
|
||||
|
||||
_deferredExecutionCommands.Clear();
|
||||
|
||||
var commandsToExecute = new List<string>();
|
||||
|
||||
foreach (var command in saveFileContent.Split('\n'))
|
||||
{
|
||||
if (string.IsNullOrEmpty(command)) continue;
|
||||
|
||||
var arguments = new List<string>();
|
||||
|
||||
DebugLogConsole.FetchArgumentsFromCommand(command, arguments);
|
||||
|
||||
// These commands should be executed after the scene script is executed
|
||||
// to prevent unexpected behavior
|
||||
if (arguments[0] + "Command" == nameof(ActorActivateCommand) ||
|
||||
arguments[0] + "Command" == nameof(ActorSetNavLayerCommand) ||
|
||||
arguments[0] + "Command" == nameof(ActorSetWorldPositionCommand) ||
|
||||
arguments[0] + "Command" == nameof(ActorSetYPositionCommand) ||
|
||||
arguments[0] + "Command" == nameof(ActorSetFacingCommand) ||
|
||||
arguments[0] + "Command" == nameof(ActorSetScriptCommand) ||
|
||||
arguments[0] + "Command" == nameof(CameraFadeInCommand))
|
||||
{
|
||||
_deferredExecutionCommands.Add(command);
|
||||
}
|
||||
else
|
||||
{
|
||||
commandsToExecute.Add(command);
|
||||
}
|
||||
}
|
||||
|
||||
foreach (var command in commandsToExecute)
|
||||
{
|
||||
DebugLogConsole.ExecuteCommand(command);
|
||||
}
|
||||
|
||||
_informationManager.EnableNoteDisplay(true);
|
||||
}
|
||||
|
||||
public void Execute(ToggleMainMenuRequest command)
|
||||
{
|
||||
ToggleMainMenu();
|
||||
}
|
||||
|
||||
public void Execute(GameSwitchToMainMenuCommand command)
|
||||
{
|
||||
_isInInitView = true;
|
||||
DestroyAllMenuItems();
|
||||
ShowInitView();
|
||||
ShowMenu();
|
||||
}
|
||||
|
||||
public void Execute(ScenePostLoadingNotification command)
|
||||
{
|
||||
if (_deferredExecutionCommands.Count == 0)
|
||||
{
|
||||
if (!_isInInitView)
|
||||
{
|
||||
_saveManager.IsAutoSaveEnabled = true;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if (command.SceneScriptId == ScriptConstants.InvalidScriptId)
|
||||
{
|
||||
ExecuteCommands(string.Join('\n', _deferredExecutionCommands));
|
||||
_deferredExecutionCommands.Clear();
|
||||
if (!_isInInitView)
|
||||
{
|
||||
_saveManager.IsAutoSaveEnabled = true;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
StartCoroutine(ExecuteDeferredCommandsAfterSceneScriptFinishedAsync(command.SceneScriptId));
|
||||
}
|
||||
}
|
||||
|
||||
private IEnumerator ExecuteDeferredCommandsAfterSceneScriptFinishedAsync(uint scriptId)
|
||||
{
|
||||
yield return new WaitUntilScriptFinished(PalScriptType.Scene, scriptId);
|
||||
|
||||
if (_deferredExecutionCommands.Count > 0)
|
||||
{
|
||||
ExecuteCommands(string.Join('\n', _deferredExecutionCommands));
|
||||
_deferredExecutionCommands.Clear();
|
||||
}
|
||||
|
||||
if (!_isInInitView)
|
||||
{
|
||||
_saveManager.IsAutoSaveEnabled = true;
|
||||
}
|
||||
}
|
||||
|
||||
public void Execute(GameStateChangedNotification command)
|
||||
{
|
||||
// If menu is still active, go to cutscene state
|
||||
// When turn on/off real time lighting and shadow, the game will reload the scene
|
||||
// and run scene script again, so we need to check if the menu is still active
|
||||
// and set the game state to cutscene
|
||||
if (_mainMenuCanvasGroup.interactable)
|
||||
{
|
||||
_gameStateManager.GoToState(GameState.Cutscene);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -13,24 +13,16 @@ namespace Pal3.Dev
|
||||
using Command.SceCommands;
|
||||
using Core.DataReader.Scn;
|
||||
using Core.Services;
|
||||
using Core.Utils;
|
||||
using MetaData;
|
||||
using Scene;
|
||||
using Script;
|
||||
using State;
|
||||
using UI;
|
||||
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()
|
||||
@@ -664,7 +656,8 @@ namespace Pal3.Dev
|
||||
{ "m11_4_1", new List<ICommand>()
|
||||
{
|
||||
new ActorSetNavLayerCommand(-1, 1),
|
||||
new ActorSetTilePositionCommand(-1, 118, 236)
|
||||
new ActorSetTilePositionCommand(-1, 118, 236),
|
||||
new PlayerInteractWithObjectCommand(10)
|
||||
}},
|
||||
{ "m12_1_0", new List<ICommand>()
|
||||
{
|
||||
@@ -893,46 +886,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 +948,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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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()
|
||||
|
||||