Commit 13b32f1c authored by lijin's avatar lijin

点击特效

parent 77297bae
...@@ -2,19 +2,24 @@ using System; ...@@ -2,19 +2,24 @@ using System;
using System.Collections; using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using UnityEngine; using UnityEngine;
using static UnityEngine.ParticleSystem;
public class EffectItem : MonoBehaviour public class EffectItem : MonoBehaviour
{ {
public float life = 0; public float life = 0;
public RectTransform Rect; public RectTransform Rect;
public ParticleSystem ps;
public void Init(Color c, Vector3 v) public void Init(Color c, Vector3 v)
{ {
life = 0.5f; life = 0.5f;
MainData md = GameMgr.Ins.md; MainData md = GameMgr.Ins.md;
Transform p = Rect.parent; Transform p = Rect.parent;
Rect.SetParent(md.imgpng.transform); Rect.SetParent(md.imgpng.transform);
Rect.localPosition = v - new Vector3(md.png.width / 2, md.png.height / 2); Rect.localPosition = v - new Vector3(md.png.width / 2, md.png.height / 2);
Rect.SetParent(p); Rect.SetParent(p);
MainModule mm = ps.main;
mm.startColor = c;
gameObject.SetActive(true); gameObject.SetActive(true);
} }
// Update is called once per frame // Update is called once per frame
......
...@@ -8,16 +8,16 @@ Material: ...@@ -8,16 +8,16 @@ Material:
m_PrefabInstance: {fileID: 0} m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_Name: EffectItem m_Name: EffectItem
m_Shader: {fileID: 51, guid: 0000000000000000f000000000000000, type: 0} m_Shader: {fileID: 200, guid: 0000000000000000f000000000000000, type: 0}
m_Parent: {fileID: 0} m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0 m_ModifiedSerializedProperties: 0
m_ValidKeywords: [] m_ValidKeywords: []
m_InvalidKeywords: m_InvalidKeywords:
- _ALPHATEST_ON - _ALPHAPREMULTIPLY_ON
m_LightmapFlags: 4 m_LightmapFlags: 0
m_EnableInstancingVariants: 0 m_EnableInstancingVariants: 1
m_DoubleSidedGI: 0 m_DoubleSidedGI: 0
m_CustomRenderQueue: -1 m_CustomRenderQueue: 2450
stringTagMap: {} stringTagMap: {}
disabledShaderPasses: [] disabledShaderPasses: []
m_LockedProperties: m_LockedProperties:
...@@ -36,6 +36,10 @@ Material: ...@@ -36,6 +36,10 @@ Material:
m_Texture: {fileID: 0} m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1} m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0} m_Offset: {x: 0, y: 0}
- _DetailBump:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailMask: - _DetailMask:
m_Texture: {fileID: 0} m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1} m_Scale: {x: 1, y: 1}
...@@ -44,14 +48,26 @@ Material: ...@@ -44,14 +48,26 @@ Material:
m_Texture: {fileID: 0} m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1} m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0} m_Offset: {x: 0, y: 0}
- _DetailTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _EmissionMap: - _EmissionMap:
m_Texture: {fileID: 0} m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1} m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0} m_Offset: {x: 0, y: 0}
- _MainBump:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex: - _MainTex:
m_Texture: {fileID: 2800000, guid: f4bb85eb67ae1b047adf11cdb81c8f3c, type: 3} m_Texture: {fileID: 2800000, guid: f4bb85eb67ae1b047adf11cdb81c8f3c, type: 3}
m_Scale: {x: 1, y: 1} m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0} m_Offset: {x: 0, y: 0}
- _Mask:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MaskTex: - _MaskTex:
m_Texture: {fileID: 0} m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1} m_Scale: {x: 1, y: 1}
...@@ -79,22 +95,41 @@ Material: ...@@ -79,22 +95,41 @@ Material:
m_Ints: [] m_Ints: []
m_Floats: m_Floats:
- PixelSnap: 0 - PixelSnap: 0
- _BlendOp: 0
- _BumpScale: 1 - _BumpScale: 1
- _CameraFadingEnabled: 0
- _CameraFarFadeDistance: 2
- _CameraNearFadeDistance: 1
- _ColorMask: 15 - _ColorMask: 15
- _ColorMode: 0
- _Cull: 2
- _Cutoff: 0.5 - _Cutoff: 0.5
- _DetailNormalMapScale: 1 - _DetailNormalMapScale: 1
- _DstBlend: 0 - _DistortionBlend: 0.5
- _DistortionEnabled: 0
- _DistortionStrength: 1
- _DistortionStrengthScaled: 0
- _DstBlend: 10
- _EmissionEnabled: 0
- _EnableExternalAlpha: 0 - _EnableExternalAlpha: 0
- _FlipbookMode: 0
- _Focus: -100
- _GlossMapScale: 1 - _GlossMapScale: 1
- _Glossiness: 0.5 - _Glossiness: 0.5
- _GlossyReflections: 1 - _GlossyReflections: 1
- _Inside: 0 - _Inside: 0
- _InvFade: 1
- _LightingEnabled: 1
- _Metallic: 0 - _Metallic: 0
- _Mode: 1 - _Mode: 3
- _OcclusionStrength: 1 - _OcclusionStrength: 1
- _Parallax: 0.02 - _Parallax: 0.02
- _R: 1 - _R: 1
- _Shininess: 0.2
- _SmoothnessTextureChannel: 0 - _SmoothnessTextureChannel: 0
- _SoftParticlesEnabled: 0
- _SoftParticlesFarFadeDistance: 1
- _SoftParticlesNearFadeDistance: 0
- _SpecularHighlights: 1 - _SpecularHighlights: 1
- _SrcBlend: 1 - _SrcBlend: 1
- _Stencil: 0 - _Stencil: 0
...@@ -104,12 +139,17 @@ Material: ...@@ -104,12 +139,17 @@ Material:
- _StencilWriteMask: 255 - _StencilWriteMask: 255
- _UVSec: 0 - _UVSec: 0
- _UseUIAlphaClip: 0 - _UseUIAlphaClip: 0
- _ZWrite: 1 - _ZWrite: 0
- _sR: 0.5 - _sR: 0.5
m_Colors: m_Colors:
- _Color: {r: 1, g: 1, b: 1, a: 1} - _CameraFadeParams: {r: 0, g: Infinity, b: 0, a: 0}
- _Color: {r: 1, g: 0, b: 0, a: 1}
- _ColorAddSubDiff: {r: 0, g: 0, b: 0, a: 0}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1} - _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
- _Flip: {r: 1, g: 1, b: 1, a: 1} - _Flip: {r: 1, g: 1, b: 1, a: 1}
- _RendererColor: {r: 1, g: 1, b: 1, a: 1} - _RendererColor: {r: 1, g: 1, b: 1, a: 1}
- _SoftParticleFadeParams: {r: 0, g: 0, b: 0, a: 0}
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1} - _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
- _Specular: {r: 0, g: 0, b: 0, a: 0}
- _TintColor: {r: 1, g: 1, b: 1, a: 1}
m_BuildTextureStacks: [] m_BuildTextureStacks: []
...@@ -36,8 +36,8 @@ RectTransform: ...@@ -36,8 +36,8 @@ RectTransform:
m_Father: {fileID: 136994829194703267} m_Father: {fileID: 136994829194703267}
m_RootOrder: -1 m_RootOrder: -1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0} m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 0, y: 0} m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0} m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 0.5, y: 0.5}
...@@ -435,6 +435,7 @@ GameObject: ...@@ -435,6 +435,7 @@ GameObject:
- component: {fileID: 4388270849266874108} - component: {fileID: 4388270849266874108}
- component: {fileID: 3772323112090822474} - component: {fileID: 3772323112090822474}
- component: {fileID: 5506588344517602443} - component: {fileID: 5506588344517602443}
- component: {fileID: 8742922010387628114}
m_Layer: 0 m_Layer: 0
m_Name: View m_Name: View
m_TagString: Untagged m_TagString: Untagged
...@@ -652,7 +653,7 @@ ParticleSystem: ...@@ -652,7 +653,7 @@ ParticleSystem:
serializedVersion: 2 serializedVersion: 2
minMaxState: 0 minMaxState: 0
minColor: {r: 1, g: 1, b: 1, a: 1} minColor: {r: 1, g: 1, b: 1, a: 1}
maxColor: {r: 1, g: 1, b: 1, a: 1} maxColor: {r: 1, g: 0, b: 0, a: 1}
maxGradient: maxGradient:
serializedVersion: 2 serializedVersion: 2
key0: {r: 1, g: 1, b: 1, a: 1} key0: {r: 1, g: 1, b: 1, a: 1}
...@@ -5315,6 +5316,18 @@ ParticleSystemRenderer: ...@@ -5315,6 +5316,18 @@ ParticleSystemRenderer:
m_MeshWeighting2: 1 m_MeshWeighting2: 1
m_MeshWeighting3: 1 m_MeshWeighting3: 1
m_MaskInteraction: 0 m_MaskInteraction: 0
--- !u!210 &8742922010387628114
SortingGroup:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2274036273993049645}
m_Enabled: 1
m_SortingLayerID: -230597399
m_SortingLayer: 1
m_SortingOrder: 1
m_SortAtRoot: 0
--- !u!1 &2370487241309862268 --- !u!1 &2370487241309862268
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
...@@ -5579,6 +5592,7 @@ MonoBehaviour: ...@@ -5579,6 +5592,7 @@ MonoBehaviour:
m_EditorClassIdentifier: m_EditorClassIdentifier:
life: 0 life: 0
Rect: {fileID: 3855441703257783557} Rect: {fileID: 3855441703257783557}
ps: {fileID: 3772323112090822474}
--- !u!1 &4437478244303412374 --- !u!1 &4437478244303412374
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment