特效新内容。修复gameplay致命bug和分数保存bug

This commit is contained in:
2026-02-16 01:55:18 +08:00
parent 3a7a0b4669
commit 9f7c1c57b7
206 changed files with 112684 additions and 857 deletions
@@ -0,0 +1,88 @@
using UnityEngine;
namespace Graphy.Runtime.UI
{
[RequireComponent(typeof(RectTransform))]
public sealed class G_SafeArea : MonoBehaviour
{
[SerializeField] private bool m_conformX = true; // Conform to screen safe area on X-axis (default true, disable to ignore)
[SerializeField] private bool m_conformY = true; // Conform to screen safe area on Y-axis (default true, disable to ignore)
private RectTransform m_rectTransform;
private Rect m_lastSafeArea = new Rect (0, 0, 0, 0);
#if UNITY_EDITOR
private DrivenRectTransformTracker m_rectTransformTracker;
#endif
private void Awake()
{
m_rectTransform = GetComponent<RectTransform> ();
Refresh();
}
private void Update()
{
Refresh();
}
#if UNITY_EDITOR
private void OnDisable()
{
m_rectTransformTracker.Clear();
}
#endif
private void Refresh()
{
#if UNITY_EDITOR
// Make the rectTransform not editable in the inspector.
m_rectTransformTracker.Clear();
m_rectTransformTracker.Add(
this,
m_rectTransform,
DrivenTransformProperties.AnchoredPosition
| DrivenTransformProperties.SizeDelta
| DrivenTransformProperties.AnchorMin
| DrivenTransformProperties.AnchorMax
| DrivenTransformProperties.Pivot
);
#endif
Rect safeArea = Screen.safeArea;
if (safeArea != m_lastSafeArea)
ApplySafeArea (safeArea);
}
private void ApplySafeArea(Rect r)
{
m_lastSafeArea = r;
// Ignore x-axis?
if (!m_conformX)
{
r.x = 0;
r.width = Screen.width;
}
// Ignore y-axis?
if (!m_conformY)
{
r.y = 0;
r.height = Screen.height;
}
// Convert safe area rectangle from absolute pixels to normalised anchor coordinates
Vector2 anchorMin = r.position;
Vector2 anchorMax = r.position + r.size;
anchorMin.x /= Screen.width;
anchorMin.y /= Screen.height;
anchorMax.x /= Screen.width;
anchorMax.y /= Screen.height;
m_rectTransform.anchorMin = anchorMin;
m_rectTransform.anchorMax = anchorMax;
}
}
}
@@ -0,0 +1,18 @@
fileFormatVersion: 2
guid: 2f4bf9244f3564807b739e8f5138ce08
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 105778
packageName: '[Graphy] - Ultimate FPS Counter - Stats Monitor & Debugger'
packageVersion: 3.0.5
assetPath: Assets/Graphy - Ultimate Stats Monitor/Runtime/UI/G_SafeArea.cs
uploadId: 626547
@@ -0,0 +1,26 @@
/* ---------------------------------------
* Author: Martin Pane (martintayx@gmail.com) (@martinTayx)
* Contributors: https://github.com/Tayx94/graphy/graphs/contributors
* Project: Graphy - Ultimate Stats Monitor
* Date: 03-Jan-18
* Studio: Tayx
*
* Git repo: https://github.com/Tayx94/graphy
*
* This project is released under the MIT license.
* Attribution is not required, but it is always welcomed!
* -------------------------------------*/
namespace Tayx.Graphy.UI
{
public interface IModifiableState
{
/// <summary>
/// Set the module state.
/// </summary>
/// <param name="newState">
/// The new state.
/// </param>
void SetState( GraphyManager.ModuleState newState, bool silentUpdate );
}
}
@@ -0,0 +1,19 @@
fileFormatVersion: 2
guid: cbc1852edf51f8046aed2f13ea532ea9
timeCreated: 1514998527
licenseType: Store
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 105778
packageName: '[Graphy] - Ultimate FPS Counter - Stats Monitor & Debugger'
packageVersion: 3.0.5
assetPath: Assets/Graphy - Ultimate Stats Monitor/Runtime/UI/IModifiableState.cs
uploadId: 626547
@@ -0,0 +1,28 @@
/* ---------------------------------------
* Author: Martin Pane (martintayx@gmail.com) (@martinTayx)
* Contributors: https://github.com/Tayx94/graphy/graphs/contributors
* Project: Graphy - Ultimate Stats Monitor
* Date: 03-Jan-18
* Studio: Tayx
*
* Git repo: https://github.com/Tayx94/graphy
*
* This project is released under the MIT license.
* Attribution is not required, but it is always welcomed!
* -------------------------------------*/
using UnityEngine;
namespace Tayx.Graphy.UI
{
public interface IMovable
{
/// <summary>
/// Sets the position of the module.
/// </summary>
/// <param name="newModulePosition">
/// The new position of the module.
/// </param>
void SetPosition( GraphyManager.ModulePosition newModulePosition, Vector2 offset );
}
}
@@ -0,0 +1,19 @@
fileFormatVersion: 2
guid: 8a935302390075f45843775173889f94
timeCreated: 1514998535
licenseType: Store
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 105778
packageName: '[Graphy] - Ultimate FPS Counter - Stats Monitor & Debugger'
packageVersion: 3.0.5
assetPath: Assets/Graphy - Ultimate Stats Monitor/Runtime/UI/IMovable.cs
uploadId: 626547