根据提供的code differences信息,由于没有具体的代码变更内容,我将生成一个通用的commit message模板:
``` docs(readme): 更新文档说明 - 添加项目使用指南 - 完善API接口说明 - 修正错误的配置示例 ``` 注意:由于您提供的code differences部分为空,以上是一个示例模板。当您有具体的代码变更时,请提供详细的变更内容以便生成更准确的commit message。
This commit is contained in:
1 parent
1abd0de32f
commit
a74d1e62d7
43 files changed
+1860
-2
No files matched your search
@@ -0,0 +1,54 @@
|
||||
using UnityEngine;
|
||||
|
||||
/// <summary>
|
||||
/// 石头人砸地冲击波 · 触发脚本
|
||||
/// 挂在平躺的 Quad 上,砸地命中帧调用 Play()
|
||||
/// </summary>
|
||||
[RequireComponent(typeof(Renderer))]
|
||||
public class ShockwaveRing : MonoBehaviour
|
||||
{
|
||||
[Header("扩散持续时间(秒)")]
|
||||
public float duration = 0.6f;
|
||||
|
||||
[Header("起始缩放(可选,Play 时自动应用)")]
|
||||
public Vector3 startScale = new Vector3(8f, 8f, 1f);
|
||||
|
||||
private Material mat;
|
||||
private float timer = -1f;
|
||||
|
||||
void Start()
|
||||
{
|
||||
// 用 .material 生成独立实例,不影响材质资产
|
||||
mat = GetComponent<Renderer>().material;
|
||||
mat.SetFloat("_Progress", 0f);
|
||||
transform.localScale = startScale;
|
||||
gameObject.SetActive(false);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 外部调用:石头人拳头砸到地面的那一帧触发
|
||||
/// </summary>
|
||||
public void Play()
|
||||
{
|
||||
gameObject.SetActive(true);
|
||||
timer = 0f;
|
||||
mat.SetFloat("_Progress", 0f);
|
||||
}
|
||||
|
||||
void Update()
|
||||
{
|
||||
if (timer < 0f) return;
|
||||
|
||||
timer += Time.deltaTime;
|
||||
float progress = Mathf.Clamp01(timer / duration);
|
||||
mat.SetFloat("_Progress", progress);
|
||||
|
||||
// 扩散结束自动隐藏
|
||||
if (progress >= 1f)
|
||||
{
|
||||
gameObject.SetActive(false);
|
||||
timer = -1f;
|
||||
}
|
||||
}
|
||||
}
|
||||
//(注:内容由AI生成)
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: B34Y4yqvAXpU5CE4SPGfTgQBDKelFplpCEiiRIYn81Q6UFqK5TwH1MY=
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,87 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:yousandi.cn,2023:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: ShockwaveRing
|
||||
m_Shader: {fileID: 4800000, guid: 89f8d8554d701be46a822b7f5766c3a9, type: 3}
|
||||
m_Parent: {fileID: 0}
|
||||
m_ModifiedSerializedProperties: 0
|
||||
m_ValidKeywords: []
|
||||
m_InvalidKeywords: []
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
disabledShaderPasses: []
|
||||
m_LockedProperties:
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _BumpMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailAlbedoMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailMask:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailNormalMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _EmissionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MetallicGlossMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _OcclusionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _ParallaxMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _BumpScale: 1
|
||||
- _Cutoff: 0.5
|
||||
- _DetailNormalMapScale: 1
|
||||
- _DstBlend: 0
|
||||
- _GlossMapScale: 1
|
||||
- _Glossiness: 0.5
|
||||
- _GlossyReflections: 1
|
||||
- _Metallic: 0
|
||||
- _Mode: 0
|
||||
- _OcclusionStrength: 1
|
||||
- _Parallax: 0.02
|
||||
- _Progress: 0
|
||||
- _RingWidth: 0.042
|
||||
- _SmoothnessTextureChannel: 0
|
||||
- _Softness: 0.1
|
||||
- _SpecularHighlights: 1
|
||||
- _SrcBlend: 1
|
||||
- _UVSec: 0
|
||||
- _ZWrite: 1
|
||||
m_Colors:
|
||||
- _Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
- _RingColor: {r: 0.91823894, g: 0.10683896, b: 0.10683896, a: 1}
|
||||
m_BuildTextureStacks: []
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: CnIZ53n8AnNUyki9ODKZCK+uMd+D6upRZMSPUCUZG2lmBu4R890c1Q4=
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 2100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,129 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:yousandi.cn,2023:
|
||||
--- !u!1 &2197285705285267162
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 7
|
||||
m_Component:
|
||||
- component: {fileID: 4020866831795778633}
|
||||
- component: {fileID: 1358226497107868658}
|
||||
- component: {fileID: 6653878438231707856}
|
||||
- component: {fileID: 5219757987150270572}
|
||||
- component: {fileID: 4182678691765920525}
|
||||
m_Layer: 0
|
||||
m_HasEditorInfo: 1
|
||||
m_Name: ShockwaveRing
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &4020866831795778633
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2197285705285267162}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0.7071068, y: 0, z: 0, w: 0.7071068}
|
||||
m_LocalPosition: {x: 0, y: 0.05, z: 0}
|
||||
m_LocalScale: {x: 12, y: 12, z: 12}
|
||||
m_ConstrainProportionsScale: 1
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 90, y: 0, z: 0}
|
||||
--- !u!33 &1358226497107868658
|
||||
MeshFilter:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2197285705285267162}
|
||||
m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0}
|
||||
--- !u!23 &6653878438231707856
|
||||
MeshRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2197285705285267162}
|
||||
m_Enabled: 1
|
||||
m_CastShadows: 1
|
||||
m_ReceiveShadows: 1
|
||||
m_DynamicOccludee: 1
|
||||
m_StaticShadowCaster: 0
|
||||
m_MotionVectors: 1
|
||||
m_LightProbeUsage: 1
|
||||
m_ReflectionProbeUsage: 1
|
||||
m_RayTracingMode: 2
|
||||
m_RayTraceProcedural: 0
|
||||
m_virtualGeometry: 0
|
||||
m_ShadingRate: 0
|
||||
m_ForceDisableGRD: 0
|
||||
m_ForceDisableSmallMeshCull: 0
|
||||
m_RenderingLayerMask: 1
|
||||
m_RendererPriority: 0
|
||||
m_Materials:
|
||||
- {fileID: 2100000, guid: 586bcaa871de75f439eb1a7a8e608104, type: 2}
|
||||
m_StaticBatchInfo:
|
||||
firstSubMesh: 0
|
||||
subMeshCount: 0
|
||||
m_StaticBatchRoot: {fileID: 0}
|
||||
m_ProbeAnchor: {fileID: 0}
|
||||
m_LightProbeVolumeOverride: {fileID: 0}
|
||||
m_ScaleInLightmap: 1
|
||||
m_ReceiveGI: 1
|
||||
m_PreserveUVs: 0
|
||||
m_IgnoreNormalsForChartDetection: 0
|
||||
m_ImportantGI: 0
|
||||
m_StitchLightmapSeams: 1
|
||||
m_SelectedEditorRenderState: 3
|
||||
m_MinimumChartSize: 4
|
||||
m_AutoUVMaxDistance: 0.5
|
||||
m_AutoUVMaxAngle: 89
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_SortingLayerID: 0
|
||||
m_SortingLayer: 0
|
||||
m_SortingOrder: 0
|
||||
m_AdditionalVertexStreams: {fileID: 0}
|
||||
m_MaskInteraction: 0
|
||||
--- !u!64 &5219757987150270572
|
||||
MeshCollider:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2197285705285267162}
|
||||
m_Material: {fileID: 0}
|
||||
m_IncludeLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 0
|
||||
m_ExcludeLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 0
|
||||
m_LayerOverridePriority: 0
|
||||
m_IsTrigger: 0
|
||||
m_ProvidesContacts: 0
|
||||
m_Enabled: 1
|
||||
serializedVersion: 5
|
||||
m_Convex: 0
|
||||
m_CookingOptions: 30
|
||||
m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0}
|
||||
--- !u!114 &4182678691765920525
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2197285705285267162}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: eea3716984bdfd24e8b4643824291caf, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
duration: 0.5
|
||||
autoDestroy: 1
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: XHgdsy78AXIB7tztX2N/j9Ez537wfFV8MxdCkR8Qd7wtLdUPnV9+BcA=
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,73 @@
|
||||
// 石头人砸地 · 扩散冲击波圆环 Shader
|
||||
// 用法:挂在一个平躺的 Quad 上,由 C# 脚本驱动 _Progress 从 0→1
|
||||
Shader "Custom/ShockwaveRing"
|
||||
{
|
||||
Properties
|
||||
{
|
||||
_RingColor ("圆环颜色", Color) = (0.8, 0.75, 0.6, 1.0)
|
||||
_Progress ("扩散进度 (0~1)", Range(0, 1)) = 0
|
||||
_RingWidth ("圆环粗细", Range(0.02, 0.3)) = 0.08
|
||||
_Softness ("边缘柔化", Range(0.001, 0.1)) = 0.02
|
||||
}
|
||||
SubShader
|
||||
{
|
||||
Tags { "RenderType"="Transparent" "Queue"="Transparent" "IgnoreProjector"="True" }
|
||||
LOD 100
|
||||
ZWrite Off
|
||||
Blend SrcAlpha OneMinusSrcAlpha
|
||||
|
||||
Pass
|
||||
{
|
||||
CGPROGRAM
|
||||
#pragma vertex vert
|
||||
#pragma fragment frag
|
||||
#include "UnityCG.cginc"
|
||||
|
||||
struct appdata
|
||||
{
|
||||
float4 vertex : POSITION;
|
||||
float2 uv : TEXCOORD0;
|
||||
};
|
||||
|
||||
struct v2f
|
||||
{
|
||||
float2 uv : TEXCOORD0;
|
||||
float4 vertex : SV_POSITION;
|
||||
};
|
||||
|
||||
float4 _RingColor;
|
||||
float _Progress;
|
||||
float _RingWidth;
|
||||
float _Softness;
|
||||
|
||||
v2f vert (appdata v)
|
||||
{
|
||||
v2f o;
|
||||
o.vertex = UnityObjectToClipPos(v.vertex);
|
||||
o.uv = v.uv;
|
||||
return o;
|
||||
}
|
||||
|
||||
fixed4 frag (v2f i) : SV_Target
|
||||
{
|
||||
// 以 UV 中心(0.5,0.5)为圆心
|
||||
float2 p = i.uv - 0.5;
|
||||
float dist = length(p);
|
||||
|
||||
// 当前圆环半径:从中心(0)扩散到边缘(0.5)
|
||||
float radius = _Progress * 0.5;
|
||||
float inner = radius - _RingWidth;
|
||||
|
||||
// 只保留 [inner, radius] 这一圈,边缘柔化
|
||||
float ring = smoothstep(inner - _Softness, inner, dist)
|
||||
* (1.0 - smoothstep(radius - _Softness, radius, dist));
|
||||
|
||||
// 越扩散越淡
|
||||
float alpha = ring * (1.0 - _Progress) * _RingColor.a;
|
||||
|
||||
return float4(_RingColor.rgb, alpha);
|
||||
}
|
||||
ENDCG
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: B3NJvX6lVn70pO0vvWO5tPrkuX6N6JjA46uenP7dqYXN1/u9Xe0qwco=
|
||||
ShaderImporter:
|
||||
externalObjects: {}
|
||||
defaultTextures: []
|
||||
nonModifiableTextures: []
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in new issue
Block a user