mirror of
https://github.com/0x7c13/Pal3.Unity.git
synced 2026-11-27 09:58:06 +08:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a9f9b5efdd | ||
|
|
f7a3a77130 | ||
|
|
97bc1a9c80 | ||
|
|
45bbca6c78 | ||
|
|
cfcf7fd493 | ||
|
|
188056e260 | ||
|
|
b55eca02bc |
No files matched your search
@@ -1842,7 +1842,7 @@ CanvasGroup:
|
||||
m_Enabled: 1
|
||||
m_Alpha: 1
|
||||
m_Interactable: 1
|
||||
m_BlocksRaycasts: 1
|
||||
m_BlocksRaycasts: 0
|
||||
m_IgnoreParentGroups: 0
|
||||
--- !u!1 &2304897035941010229
|
||||
GameObject:
|
||||
|
||||
+1
-1
@@ -104,7 +104,7 @@ Shader "Pal3/RoundedFrostedGlass"
|
||||
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);
|
||||
File renamed without changes.
@@ -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:
|
||||
@@ -34,7 +34,8 @@ namespace Pal3.Dev
|
||||
public sealed class MainMenu : MonoBehaviour,
|
||||
ICommandExecutor<ToggleMainMenuRequest>,
|
||||
ICommandExecutor<GameSwitchToMainMenuCommand>,
|
||||
ICommandExecutor<ScenePostLoadingNotification>
|
||||
ICommandExecutor<ScenePostLoadingNotification>,
|
||||
ICommandExecutor<GameStateChangedNotification>
|
||||
{
|
||||
private GameSettings _gameSettings;
|
||||
private InputManager _inputManager;
|
||||
@@ -1684,14 +1685,15 @@ namespace Pal3.Dev
|
||||
_menuItems.Add(CreateMainMenuButton("新的游戏", delegate
|
||||
{
|
||||
CommandDispatcher<ICommand>.Instance.Dispatch(new ResetGameStateCommand());
|
||||
StartNewGame();
|
||||
Hide();
|
||||
StartNewGame();
|
||||
}));
|
||||
|
||||
if (_saveManager.SaveFileExists())
|
||||
{
|
||||
_menuItems.Add(CreateMainMenuButton("读取存档", delegate
|
||||
{
|
||||
Hide();
|
||||
var saveFileContent = _saveManager.LoadFromSaveFile();
|
||||
if (saveFileContent == null)
|
||||
{
|
||||
@@ -1702,7 +1704,6 @@ namespace Pal3.Dev
|
||||
{
|
||||
ExecuteCommandsFromSaveFile(saveFileContent);
|
||||
}
|
||||
Hide();
|
||||
}));
|
||||
}
|
||||
|
||||
@@ -1838,8 +1839,6 @@ namespace Pal3.Dev
|
||||
var commands = _saveManager.ConvertCurrentGameStateToCommands(SaveLevel.Full);
|
||||
var saveFileContent = string.Join('\n', commands.Select(CommandExtensions.ToString).ToList());
|
||||
ExecuteCommandsFromSaveFile(saveFileContent);
|
||||
// Since we are not hiding the menu, we need to keep the game state as Cutscene
|
||||
CommandDispatcher<ICommand>.Instance.Dispatch(new GameStateChangeRequest(GameState.Cutscene));
|
||||
}
|
||||
|
||||
CommandDispatcher<ICommand>.Instance.Dispatch(new UIDisplayNoteCommand("实时光影已" +
|
||||
@@ -2024,9 +2023,9 @@ namespace Pal3.Dev
|
||||
{
|
||||
_menuItems.Add(CreateStorySelectionButton(story.Key, delegate
|
||||
{
|
||||
Hide();
|
||||
CommandDispatcher<ICommand>.Instance.Dispatch(new ResetGameStateCommand());
|
||||
ExecuteCommands(story.Value);
|
||||
Hide();
|
||||
}));
|
||||
}
|
||||
|
||||
@@ -2175,5 +2174,17 @@ namespace Pal3.Dev
|
||||
_deferredExecutionCommands.Clear();
|
||||
}
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -6,6 +6,7 @@
|
||||
namespace Pal3.Effect.PostProcessing
|
||||
{
|
||||
using System;
|
||||
using System.Collections;
|
||||
using Command;
|
||||
using Command.InternalCommands;
|
||||
using Command.SceCommands;
|
||||
@@ -163,6 +164,33 @@ namespace Pal3.Effect.PostProcessing
|
||||
ToggleAmbientOcclusionBasedOnSetting();
|
||||
TogglePostProcessLayerWhenNeeded();
|
||||
}
|
||||
|
||||
#if UNITY_IOS
|
||||
if (command.SettingName is nameof(GameSettings.ResolutionScale))
|
||||
{
|
||||
StartCoroutine(ReloadAmbientOcclusionSetting());
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
#if UNITY_IOS
|
||||
private IEnumerator Start()
|
||||
{
|
||||
yield return ReloadAmbientOcclusionSetting();
|
||||
}
|
||||
|
||||
// On iOS, the SSAO and Resolution changing are causing the RoundedFrostedGlass
|
||||
// shader to malfunction. This is a workaround to disable and re-enable SSAO to fix the issue.
|
||||
private IEnumerator ReloadAmbientOcclusionSetting()
|
||||
{
|
||||
if (_gameSettings.IsAmbientOcclusionEnabled)
|
||||
{
|
||||
yield return null;
|
||||
_gameSettings.IsAmbientOcclusionEnabled = false;
|
||||
yield return null;
|
||||
_gameSettings.IsAmbientOcclusionEnabled = true;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was auto-generated by com.unity.inputsystem:InputActionCodeGenerator
|
||||
// version 1.5.0
|
||||
// version 1.5.1
|
||||
// from Assets/Scripts/Pal3/Input/PlayerInputActions.inputactions
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
|
||||
@@ -39,6 +39,12 @@ namespace Pal3.UI
|
||||
UpdateLayout();
|
||||
}
|
||||
|
||||
private void Start()
|
||||
{
|
||||
Init();
|
||||
UpdateLayout();
|
||||
}
|
||||
|
||||
private void OnDestroy()
|
||||
{
|
||||
Destroy(_material);
|
||||
@@ -59,6 +65,11 @@ namespace Pal3.UI
|
||||
if (_shader == null)
|
||||
{
|
||||
_shader = Shader.Find("Pal3/RoundedFrostedGlass");
|
||||
if (_shader == null)
|
||||
{
|
||||
Debug.LogError("Shader not found: Pal3/RoundedFrostedGlass");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (_material == null)
|
||||
@@ -79,6 +90,8 @@ namespace Pal3.UI
|
||||
|
||||
private void UpdateLayout()
|
||||
{
|
||||
if (_material == null) return;
|
||||
|
||||
Rect rect = ((RectTransform)transform).rect;
|
||||
_material.SetFloat(BlurAmountPropertyId, blurAmount);
|
||||
_material.SetColor(AdditiveColorPropertyId, additiveTintColor);
|
||||
|
||||
@@ -133,7 +133,7 @@ PlayerSettings:
|
||||
vulkanEnableLateAcquireNextImage: 0
|
||||
vulkanEnableCommandBufferRecycling: 1
|
||||
loadStoreDebugModeEnabled: 0
|
||||
bundleVersion: 0.60
|
||||
bundleVersion: 0.61
|
||||
preloadedAssets: []
|
||||
metroInputSource: 0
|
||||
wsaTransparentSwapchain: 0
|
||||
|
||||
Reference in new issue
Block a user