This commit is contained in:
杨号敬 2024-11-27 22:09:59 +08:00
parent 1e02e34a86
commit a7b1782755
32 changed files with 10665 additions and 24 deletions

9
Assets/More Assets.url Normal file
View File

@ -0,0 +1,9 @@
[DEFAULT]
BASEURL=http://www.cgsoso.com/
[InternetShortcut]
URL=http://www.cgsoso.com/
IDList=
IconFile=http://www.cgsoso.com/favicon.ico
IconIndex=1
[{000214A0-0000-0000-C000-000000000046}]
Prop3=19,2

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: ea41eb7cdaa803b4a9893d4a696e8b05
timeCreated: 1509509222
licenseType: Pro
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

View File

@ -566,6 +566,7 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
OreHp: 100
OwupinPrefab: {fileID: 7633408680753978024, guid: bf1df065d43b43946bf3956fc4c23eb7, type: 3}
--- !u!65 &120972001
BoxCollider:
m_ObjectHideFlags: 0
@ -695,6 +696,7 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
OreHp: 100
OwupinPrefab: {fileID: 7633408680753978024, guid: bf1df065d43b43946bf3956fc4c23eb7, type: 3}
--- !u!65 &192320966
BoxCollider:
m_ObjectHideFlags: 0
@ -996,6 +998,7 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
OreHp: 100
OwupinPrefab: {fileID: 7633408680753978024, guid: bf1df065d43b43946bf3956fc4c23eb7, type: 3}
--- !u!65 &258632384
BoxCollider:
m_ObjectHideFlags: 0
@ -1125,6 +1128,7 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
OreHp: 100
OwupinPrefab: {fileID: 7633408680753978024, guid: bf1df065d43b43946bf3956fc4c23eb7, type: 3}
--- !u!65 &305902982
BoxCollider:
m_ObjectHideFlags: 0
@ -1407,6 +1411,7 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
OreHp: 100
OwupinPrefab: {fileID: 7633408680753978024, guid: bf1df065d43b43946bf3956fc4c23eb7, type: 3}
--- !u!65 &320824350
BoxCollider:
m_ObjectHideFlags: 0
@ -1713,6 +1718,7 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
OreHp: 100
OwupinPrefab: {fileID: 7633408680753978024, guid: bf1df065d43b43946bf3956fc4c23eb7, type: 3}
--- !u!65 &410745418
BoxCollider:
m_ObjectHideFlags: 0
@ -2312,6 +2318,7 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
OreHp: 100
OwupinPrefab: {fileID: 7633408680753978024, guid: bf1df065d43b43946bf3956fc4c23eb7, type: 3}
--- !u!65 &523132117
BoxCollider:
m_ObjectHideFlags: 0
@ -2441,6 +2448,7 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
OreHp: 100
OwupinPrefab: {fileID: 7633408680753978024, guid: bf1df065d43b43946bf3956fc4c23eb7, type: 3}
--- !u!65 &536671860
BoxCollider:
m_ObjectHideFlags: 0
@ -2670,6 +2678,7 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
OreHp: 100
OwupinPrefab: {fileID: 7633408680753978024, guid: bf1df065d43b43946bf3956fc4c23eb7, type: 3}
--- !u!54 &564820392
Rigidbody:
m_ObjectHideFlags: 0
@ -2786,6 +2795,7 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
OreHp: 100
OwupinPrefab: {fileID: 7633408680753978024, guid: bf1df065d43b43946bf3956fc4c23eb7, type: 3}
--- !u!65 &603605533
BoxCollider:
m_ObjectHideFlags: 0
@ -3092,6 +3102,7 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
OreHp: 100
OwupinPrefab: {fileID: 7633408680753978024, guid: bf1df065d43b43946bf3956fc4c23eb7, type: 3}
--- !u!65 &646849366
BoxCollider:
m_ObjectHideFlags: 0
@ -3221,6 +3232,7 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
OreHp: 100
OwupinPrefab: {fileID: 7633408680753978024, guid: bf1df065d43b43946bf3956fc4c23eb7, type: 3}
--- !u!65 &697020959
BoxCollider:
m_ObjectHideFlags: 0
@ -3570,6 +3582,7 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
OreHp: 100
OwupinPrefab: {fileID: 7633408680753978024, guid: bf1df065d43b43946bf3956fc4c23eb7, type: 3}
--- !u!1001 &724390012
PrefabInstance:
m_ObjectHideFlags: 0
@ -3670,6 +3683,7 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
OreHp: 100
OwupinPrefab: {fileID: 7633408680753978024, guid: bf1df065d43b43946bf3956fc4c23eb7, type: 3}
--- !u!65 &724390016
BoxCollider:
m_ObjectHideFlags: 0
@ -3799,6 +3813,7 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
OreHp: 100
OwupinPrefab: {fileID: 7633408680753978024, guid: bf1df065d43b43946bf3956fc4c23eb7, type: 3}
--- !u!65 &724676296
BoxCollider:
m_ObjectHideFlags: 0
@ -3928,6 +3943,7 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
OreHp: 100
OwupinPrefab: {fileID: 7633408680753978024, guid: bf1df065d43b43946bf3956fc4c23eb7, type: 3}
--- !u!65 &800725855
BoxCollider:
m_ObjectHideFlags: 0
@ -4057,6 +4073,7 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
OreHp: 100
OwupinPrefab: {fileID: 7633408680753978024, guid: bf1df065d43b43946bf3956fc4c23eb7, type: 3}
--- !u!65 &856878023
BoxCollider:
m_ObjectHideFlags: 0
@ -4476,6 +4493,7 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
OreHp: 100
OwupinPrefab: {fileID: 7633408680753978024, guid: bf1df065d43b43946bf3956fc4c23eb7, type: 3}
--- !u!65 &928654032
BoxCollider:
m_ObjectHideFlags: 0
@ -4605,6 +4623,7 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
OreHp: 100
OwupinPrefab: {fileID: 7633408680753978024, guid: bf1df065d43b43946bf3956fc4c23eb7, type: 3}
--- !u!65 &930601293
BoxCollider:
m_ObjectHideFlags: 0
@ -4734,6 +4753,7 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
OreHp: 100
OwupinPrefab: {fileID: 7633408680753978024, guid: bf1df065d43b43946bf3956fc4c23eb7, type: 3}
--- !u!65 &935812091
BoxCollider:
m_ObjectHideFlags: 0
@ -5735,6 +5755,7 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
OreHp: 100
OwupinPrefab: {fileID: 7633408680753978024, guid: bf1df065d43b43946bf3956fc4c23eb7, type: 3}
--- !u!65 &1201653137
BoxCollider:
m_ObjectHideFlags: 0
@ -6093,6 +6114,7 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
OreHp: 100
OwupinPrefab: {fileID: 7633408680753978024, guid: bf1df065d43b43946bf3956fc4c23eb7, type: 3}
--- !u!65 &1302051325
BoxCollider:
m_ObjectHideFlags: 0
@ -6222,6 +6244,7 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
OreHp: 100
OwupinPrefab: {fileID: 7633408680753978024, guid: bf1df065d43b43946bf3956fc4c23eb7, type: 3}
--- !u!65 &1314496827
BoxCollider:
m_ObjectHideFlags: 0
@ -6480,6 +6503,7 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
OreHp: 100
OwupinPrefab: {fileID: 7633408680753978024, guid: bf1df065d43b43946bf3956fc4c23eb7, type: 3}
--- !u!65 &1391489164
BoxCollider:
m_ObjectHideFlags: 0
@ -6561,6 +6585,7 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
OreHp: 100
OwupinPrefab: {fileID: 7633408680753978024, guid: bf1df065d43b43946bf3956fc4c23eb7, type: 3}
--- !u!1 &1426147315
GameObject:
m_ObjectHideFlags: 0
@ -6758,6 +6783,7 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
OreHp: 100
OwupinPrefab: {fileID: 7633408680753978024, guid: bf1df065d43b43946bf3956fc4c23eb7, type: 3}
--- !u!65 &1468868526
BoxCollider:
m_ObjectHideFlags: 0
@ -6887,6 +6913,7 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
OreHp: 100
OwupinPrefab: {fileID: 7633408680753978024, guid: bf1df065d43b43946bf3956fc4c23eb7, type: 3}
--- !u!65 &1469395358
BoxCollider:
m_ObjectHideFlags: 0
@ -7016,6 +7043,7 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
OreHp: 100
OwupinPrefab: {fileID: 7633408680753978024, guid: bf1df065d43b43946bf3956fc4c23eb7, type: 3}
--- !u!65 &1501288586
BoxCollider:
m_ObjectHideFlags: 0
@ -7149,6 +7177,7 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
OreHp: 100
OwupinPrefab: {fileID: 7633408680753978024, guid: bf1df065d43b43946bf3956fc4c23eb7, type: 3}
--- !u!54 &1502306332
Rigidbody:
m_ObjectHideFlags: 0
@ -8392,6 +8421,7 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
OreHp: 100
OwupinPrefab: {fileID: 7633408680753978024, guid: bf1df065d43b43946bf3956fc4c23eb7, type: 3}
--- !u!65 &1716749585
BoxCollider:
m_ObjectHideFlags: 0
@ -8865,6 +8895,7 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
OreHp: 100
OwupinPrefab: {fileID: 7633408680753978024, guid: bf1df065d43b43946bf3956fc4c23eb7, type: 3}
--- !u!65 &1721540338
BoxCollider:
m_ObjectHideFlags: 0
@ -9051,6 +9082,7 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
OreHp: 100
OwupinPrefab: {fileID: 7633408680753978024, guid: bf1df065d43b43946bf3956fc4c23eb7, type: 3}
--- !u!65 &1827496789
BoxCollider:
m_ObjectHideFlags: 0
@ -9444,6 +9476,7 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
OreHp: 100
OwupinPrefab: {fileID: 7633408680753978024, guid: bf1df065d43b43946bf3956fc4c23eb7, type: 3}
--- !u!54 &1978476589
Rigidbody:
m_ObjectHideFlags: 0

View File

Before

Width:  |  Height:  |  Size: 192 KiB

After

Width:  |  Height:  |  Size: 192 KiB

View File

@ -0,0 +1,90 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Asteroids_A
m_Shader: {fileID: 4800000, guid: ca91693666370664c877c48cb0aaf003, type: 3}
m_ValidKeywords: []
m_InvalidKeywords: []
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
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}
- _Illum:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 2800000, guid: fc0b3bb726e3ce44f851f3505484b215, type: 3}
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
- _EmissionLM: 0
- _GlossMapScale: 1
- _Glossiness: 0.5
- _GlossyReflections: 1
- _Metallic: 0
- _Mode: 0
- _OcclusionStrength: 1
- _Parallax: 0.02
- _RimPower: 2.6
- _Shininess: 0.7
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _UVSec: 0
- _ZWrite: 1
m_Colors:
- _Color: {r: 0.5418654, g: 0.5849056, b: 0.55334276, a: 1}
- _Emission: {r: 0, g: 0, b: 0, a: 0}
- _EmissionColor: {r: 0.16981131, g: 0.16981131, b: 0.16981131, a: 1}
- _RimColor: {r: 0.31228408, g: 0.8037735, b: 0.14407252, a: 1}
- _SpecColor: {r: 1, g: 1, b: 1, a: 1}
m_BuildTextureStacks: []

View File

@ -8,7 +8,7 @@ Material:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Crystal_A
m_Shader: {fileID: 10752, guid: 0000000000000000f000000000000000, type: 0}
m_Shader: {fileID: 4800000, guid: 0620fcb85216bed41adbbee026ed8c95, type: 3}
m_ValidKeywords: []
m_InvalidKeywords: []
m_LightmapFlags: 4
@ -25,7 +25,11 @@ Material:
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats: []
m_Floats:
- _OutLightPow: 10
- _OutLightStrength: 9.1
- _Size: 0.08
m_Colors:
- _Color: {r: 0.588, g: 0.588, b: 0.588, a: 1}
- _AtmoColor: {r: 0.4188679, g: 0.06875754, b: 0.06875754, a: 0}
- _Color: {r: 0.7509433, g: 0.26495546, b: 0.26495546, a: 1}
m_BuildTextureStacks: []

View File

@ -0,0 +1,74 @@
Shader "Custom/GlowStoneShader"
{
Properties
{
_Color ("Main Color", Color) = (1, 1, 1, 1) // 主颜色(矿石的基本颜色)
_EmissionColor ("Emission Color", Color) = (1, 1, 1, 1) // 发光颜色
_MainTex ("Base Texture", 2D) = "white" { } // 基本纹理
}
SubShader
{
Tags { "RenderType"="Opaque" }
Pass
{
Name "FORWARD"
Tags { "LightMode"="ForwardBase" }
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#pragma multi_compile_fog
#include "UnityCG.cginc"
struct appdata
{
float4 vertex : POSITION;
float3 normal : NORMAL;
float2 uv : TEXCOORD0;
};
struct v2f
{
float4 pos : POSITION;
float3 normal : TEXCOORD0;
float2 uv : TEXCOORD1;
float4 fog : FOG;
};
uniform float4 _Color;
uniform float4 _EmissionColor;
sampler2D _MainTex;
float4 _MainTex_ST;
v2f vert(appdata v)
{
v2f o;
o.pos = UnityObjectToClipPos(v.vertex);
o.normal = v.normal;
o.uv = TRANSFORM_TEX(v.uv, _MainTex);
return o;
}
half4 frag(v2f i) : SV_Target
{
// 基本纹理采样
half4 texColor = tex2D(_MainTex, i.uv) * _Color;
// 计算发光颜色
half4 emission = _EmissionColor;
// 将发光颜色与基础纹理颜色合成
half4 finalColor = texColor + emission;
// 输出最终颜色
return finalColor;
}
ENDCG
}
}
FallBack "Diffuse"
}

View File

@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: 6633e74b63cad454791f7af924a7738b
ShaderImporter:
externalObjects: {}
defaultTextures: []
nonModifiableTextures: []
preprocessorOverride: 0
userData:
assetBundleName:
assetBundleVariant:

110
Assets/mat/OutLine2.shader Normal file
View File

@ -0,0 +1,110 @@
Shader "Custom/OutLine2" {
Properties
{
_MainTex("Texture(RGB)",2D) = "grey"{} //主纹理
_Color("Color",Color) = (0,0,0,1) //主纹理颜色
_AtmoColor("Atmosphere Color",Color) = (0,0,0,0) //光晕颜色
_Size("Size",Range(0,1)) = 0.1 //光晕范围
_OutLightPow("Falloff",Range(1,10)) = 5 //光晕系数
_OutLightStrength("Transparency",Range(5,20)) = 15 //光晕强度
}
SubShader{
Pass{
Name "PlaneBase"
Tags{"LightMode" = "Always"}
Cull Back //剔除背面
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#include "UnityCG.cginc"
uniform sampler2D _MainTex;
uniform float4 _MainTex_ST;
uniform float4 _Color;
uniform float4 _AtmoColor;
uniform float _Size;
uniform float _OutLightPow;
uniform float _OutLightStrength;
struct vertexOutput {
float4 pos : SV_POSITION;
float3 normal : TEXCOORD0;
float3 worldvertpos : TEXCOORD1;
float2 texcoord : TEXCOORD2;
};
//顶点着色器
vertexOutput vert(appdata_base v)
{
vertexOutput o;
//顶点位置
o.pos = UnityObjectToClipPos(v.vertex);
//法线
o.normal = v.normal;
//世界坐标顶点位置
o.worldvertpos = mul(unity_ObjectToWorld, v.vertex).xyz;
o.texcoord = TRANSFORM_TEX(v.texcoord, _MainTex);
return o;
}
float4 frag(vertexOutput i) : COLOR
{
float4 color = tex2D(_MainTex,i.texcoord);
return color * _Color;
}
ENDCG
}
Pass{
Name "AtmosphereBase"
Tags{"LightMode" = "Always"}
Cull Front
Blend SrcAlpha One
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#include "UnityCG.cginc"
uniform float4 _Color;
uniform float4 _AtmoColor;
uniform float _Size;
uniform float _OutLightPow;
uniform float _OutLightStrength;
struct vertexOutput
{
float4 pos : SV_POSITION;
float3 normal : TEXCOORD0;
float3 worldvertpos : TEXCOORD1;
};
vertexOutput vert(appdata_base v) {
vertexOutput o;
//顶点位置以法线方向向外延伸
v.vertex.xyz += v.normal * _Size;
o.pos = UnityObjectToClipPos(v.vertex);
o.normal = v.normal;
o.worldvertpos = mul(unity_ObjectToWorld, v.vertex);
return o;
}
float4 frag(vertexOutput i) : COLOR
{
i.normal = normalize(i.normal);
//视角法线
float3 viewdir = normalize(i.worldvertpos.xyz - _WorldSpaceCameraPos.xyz);
float4 color = _AtmoColor;
//视角法线与模型法线点积形成中间为1向四周逐渐衰减为0的点积值赋值透明通道形成光晕效果
color.a = pow(saturate(dot(viewdir, i.normal)),_OutLightPow);
color.a *= _OutLightStrength * dot(viewdir, i.normal);
return color;
}
ENDCG
}
}
FallBack "Diffuse"
}

View File

@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: 0620fcb85216bed41adbbee026ed8c95
ShaderImporter:
externalObjects: {}
defaultTextures: []
nonModifiableTextures: []
preprocessorOverride: 0
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,52 @@
Shader "Custom/Outline1" {
Properties
{
_MainTex("main tex",2D) = "black"{}
_RimColor("rim color",Color) = (1,1,1,1)//边缘颜色
_RimPower("rim power",range(1,10)) = 2//边缘强度
}
SubShader
{
Pass
{
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#include"UnityCG.cginc"
struct v2f
{
float4 vertex:POSITION;
float4 uv:TEXCOORD0;
float4 NdotV:COLOR;
};
sampler2D _MainTex;
float4 _RimColor;
float _RimPower;
v2f vert(appdata_base v)
{
v2f o;
o.vertex = UnityObjectToClipPos(v.vertex);
o.uv = v.texcoord;
float3 V = WorldSpaceViewDir(v.vertex);
V = mul(unity_WorldToObject,V);//视方向从世界到模型坐标系的转换
o.NdotV.x = saturate(dot(v.normal,normalize(V)));//必须在同一坐标系才能正确做点乘运算
return o;
}
half4 frag(v2f IN) :COLOR
{
half4 c = tex2D(_MainTex,IN.uv);
//用视方向和法线方向做点乘越边缘的地方法线和视方向越接近90度点乘越接近0.
//用1- 上面点乘的结果)*颜色,来反映边缘颜色情况
c.rgb += pow((1 - IN.NdotV.x) ,_RimPower)* _RimColor.rgb;
return c;
}
ENDCG
}
}
FallBack "Diffuse"
}

View File

@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: ca91693666370664c877c48cb0aaf003
ShaderImporter:
externalObjects: {}
defaultTextures: []
nonModifiableTextures: []
preprocessorOverride: 0
userData:
assetBundleName:
assetBundleVariant:

8
Assets/mat/zhanli.meta Normal file
View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: b3f5106b6aedaa84fbe97a1056fa9c1d
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,84 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: PolySolidGlow
m_Shader: {fileID: 203, guid: 0000000000000000f000000000000000, type: 0}
m_ValidKeywords: []
m_InvalidKeywords:
- _EMISSION
m_LightmapFlags: 1
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
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: 0.047664467, y: 1}
m_Offset: {x: -89.75733, 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
- _InvFade: 3
- _Metallic: 0
- _Mode: 0
- _OcclusionStrength: 1
- _Parallax: 0.02
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _UVSec: 0
- _ZWrite: 1
m_Colors:
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _EmisColor: {r: 0.4852941, g: 0.4852941, b: 0.4852941, a: 0}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
- _TintColor: {r: 0.6528301, g: 0.18599501, b: 0.18599501, a: 0.5}
m_BuildTextureStacks: []

View File

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 46c46885d5e9e194ba96e80d167e7a05
timeCreated: 1508519579
licenseType: Store
NativeFormatImporter:
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,76 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: PolySolidOil
m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}
m_ShaderKeywords:
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
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_Floats:
- _BumpScale: 1
- _Cutoff: 0.5
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _GlossMapScale: 1
- _Glossiness: 0.723
- _GlossyReflections: 1
- _Metallic: 1
- _Mode: 0
- _OcclusionStrength: 1
- _Parallax: 0.02
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _UVSec: 0
- _ZWrite: 1
m_Colors:
- _Color: {r: 0.2946583, g: 0.30422232, b: 0.36764705, a: 0.566}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}

View File

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: c8b2ceefd71d8224b8c06ee0ffa9adc9
timeCreated: 1508519579
licenseType: Store
NativeFormatImporter:
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

View File

@ -0,0 +1,88 @@
fileFormatVersion: 2
guid: 6385e85ec369bac4c8b20fdb297d102b
timeCreated: 1508518917
licenseType: Store
ModelImporter:
serializedVersion: 21
fileIDToRecycleName:
100000: //RootNode
400000: //RootNode
2300000: //RootNode
3300000: //RootNode
4300000: PolySphereMega
9500000: //RootNode
materials:
importMaterials: 1
materialName: 0
materialSearch: 1
animations:
legacyGenerateAnimations: 4
bakeSimulation: 0
resampleCurves: 1
optimizeGameObjects: 0
motionNodeName:
rigImportErrors:
rigImportWarnings:
animationImportErrors:
animationImportWarnings:
animationRetargetingWarnings:
animationDoRetargetingWarnings: 0
animationCompression: 1
animationRotationError: 0.5
animationPositionError: 0.5
animationScaleError: 0.5
animationWrapMode: 0
extraExposedTransformPaths: []
extraUserProperties: []
clipAnimations: []
isReadable: 1
meshes:
lODScreenPercentages: []
globalScale: 1
meshCompression: 0
addColliders: 0
importVisibility: 1
importBlendShapes: 1
importCameras: 1
importLights: 1
swapUVChannels: 0
generateSecondaryUV: 0
useFileUnits: 1
optimizeMeshForGPU: 1
keepQuads: 0
weldVertices: 1
secondaryUVAngleDistortion: 8
secondaryUVAreaDistortion: 15.000001
secondaryUVHardAngle: 88
secondaryUVPackMargin: 4
useFileScale: 1
tangentSpace:
normalSmoothAngle: 60
normalImportMode: 0
tangentImportMode: 3
normalCalculationMode: 4
importAnimation: 1
copyAvatar: 0
humanDescription:
serializedVersion: 2
human: []
skeleton: []
armTwist: 0.5
foreArmTwist: 0.5
upperLegTwist: 0.5
legTwist: 0.5
armStretch: 0.05
legStretch: 0.05
feetSpacing: 0
rootMotionBoneName:
rootMotionBoneRotation: {x: 0, y: 0, z: 0, w: 1}
hasTranslationDoF: 0
hasExtraRoot: 0
skeletonHasParents: 1
lastHumanDescriptionAvatarSource: {instanceID: 0}
animationType: 2
humanoidOversampling: 1
additionalBone: 0
userData:
assetBundleName:
assetBundleVariant:

View File

@ -7,8 +7,8 @@ Material:
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Asteroids_A
m_Shader: {fileID: 10752, guid: 0000000000000000f000000000000000, type: 0}
m_Name: PolySpriteGlow
m_Shader: {fileID: 200, guid: 0000000000000000f000000000000000, type: 0}
m_ValidKeywords: []
m_InvalidKeywords: []
m_LightmapFlags: 4
@ -20,20 +20,13 @@ Material:
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _Illum:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 2800000, guid: fc0b3bb726e3ce44f851f3505484b215, type: 3}
m_Texture: {fileID: 2800000, guid: 1c62d9feb9569b44c8ed7a2f35c2abf9, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _EmissionLM: 0
- _Shininess: 0.7
- _InvFade: 3
m_Colors:
- _Color: {r: 0.588, g: 0.588, b: 0.588, a: 1}
- _Emission: {r: 0, g: 0, b: 0, a: 0}
- _SpecColor: {r: 1, g: 1, b: 1, a: 1}
- _TintColor: {r: 0, g: 1, b: 0.30086112, a: 0.5}
m_BuildTextureStacks: []

View File

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 2f3f789aad8546a488298feff43c3082
timeCreated: 1508778075
licenseType: Store
NativeFormatImporter:
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,84 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: PolyTransparentGlow
m_Shader: {fileID: 200, guid: 0000000000000000f000000000000000, type: 0}
m_ValidKeywords: []
m_InvalidKeywords:
- _EMISSION
m_LightmapFlags: 1
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
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
- _InvFade: 3
- _Metallic: 0
- _Mode: 0
- _OcclusionStrength: 1
- _Parallax: 0.02
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _UVSec: 0
- _ZWrite: 1
m_Colors:
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _EmisColor: {r: 0.4852941, g: 0.4852941, b: 0.4852941, a: 0}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
- _TintColor: {r: 0.83823526, g: 0.83823526, b: 0.83823526, a: 0.5}
m_BuildTextureStacks: []

View File

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 20fbdc32471af924d825be10e0be7cbe
timeCreated: 1508519579
licenseType: Store
NativeFormatImporter:
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: bf1df065d43b43946bf3956fc4c23eb7
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -7,7 +7,7 @@ public class Bomb : MonoBehaviour
{
public float harm;
public GameObject bomb;
public float explosionRadius = 50000f; // 爆炸半径
public float explosionRadius = 1000f; // ±¬Õ¨°ë¾¶
public float maxDamage = 100f; // 最大伤害
private void Start()
{
@ -16,34 +16,34 @@ public class Bomb : MonoBehaviour
void Explode()
{
// 获取爆炸范围内的所有目标
Collider[] colliders = Physics.OverlapSphere(transform.position, explosionRadius);
Collider[] colliders = Physics.OverlapBox(transform.position, new Vector3(50f,50f,50f));
foreach (Collider collider in colliders)
{
// 计算与目标的距离
float distance = Vector3.Distance(transform.position, collider.transform.position);
// 计算伤害值,距离越远伤害越小
float damage = Mathf.Lerp(maxDamage, 0, distance / explosionRadius);
if(distance > maxDamage) return;
//具体伤害
if(collider.gameObject.tag=="enemy")
{
Enemy enemy = collider.gameObject.GetComponent<Enemy>();
enemy.EnemyHpDown(maxDamage);
DesSelf();
}
if (collider.gameObject.tag == "ore")
{
Ore ore = collider.gameObject.GetComponent<Ore>();
ore.OreHpDown(maxDamage);
DesSelf();
}
}
}
void OnCollisionEnter(Collision collision)
{
Explode();
Explode();
DesSelf();
}
void DesSelf()
{

View File

@ -5,7 +5,7 @@ using UnityEngine;
public class Ore : MonoBehaviour
{
public float OreHp;
public GameObject OwupinPrefab;
// Start is called before the first frame update
void Start()
{
@ -22,7 +22,8 @@ public class Ore : MonoBehaviour
if(OreHp<=0)
{
//ToDo
GameObject wupin=Instantiate(OwupinPrefab);
wupin.transform.position=this.transform.position;
Destroy(gameObject);
}
}

30
Assets/scripts/wupin.cs Normal file
View File

@ -0,0 +1,30 @@
using DG.Tweening;
using System.Collections;
using System.Collections.Generic;
using TMPro;
using UnityEngine;
public class wupin : MonoBehaviour
{
public float distance = 50f;
void Start()
{
}
// Update is called once per frame
void Update()
{
MoveToPlayer();
}
void MoveToPlayer()
{
Transform player = GameObject.FindWithTag("Player").transform;
float dis = Vector3.Distance(player.position, this.transform.position);
if (dis > distance)
{
this.transform.DOMove(player.position, 1f);
}
Destroy(this.gameObject,1f);
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: d14ad51eec509d94d9e91c57eda60b29
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant: