Commit 13b32f1c authored by lijin's avatar lijin

点击特效

parent 77297bae
......@@ -2,11 +2,14 @@ using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using static UnityEngine.ParticleSystem;
public class EffectItem : MonoBehaviour
{
public float life = 0;
public RectTransform Rect;
public ParticleSystem ps;
public void Init(Color c, Vector3 v)
{
life = 0.5f;
......@@ -15,6 +18,8 @@ public class EffectItem : MonoBehaviour
Rect.SetParent(md.imgpng.transform);
Rect.localPosition = v - new Vector3(md.png.width / 2, md.png.height / 2);
Rect.SetParent(p);
MainModule mm = ps.main;
mm.startColor = c;
gameObject.SetActive(true);
}
// Update is called once per frame
......
......@@ -8,16 +8,16 @@ Material:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: EffectItem
m_Shader: {fileID: 51, guid: 0000000000000000f000000000000000, type: 0}
m_Shader: {fileID: 200, guid: 0000000000000000f000000000000000, type: 0}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords: []
m_InvalidKeywords:
- _ALPHATEST_ON
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
- _ALPHAPREMULTIPLY_ON
m_LightmapFlags: 0
m_EnableInstancingVariants: 1
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
m_CustomRenderQueue: 2450
stringTagMap: {}
disabledShaderPasses: []
m_LockedProperties:
......@@ -36,6 +36,10 @@ Material:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailBump:
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}
......@@ -44,14 +48,26 @@ Material:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailTex:
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}
- _MainBump:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 2800000, guid: f4bb85eb67ae1b047adf11cdb81c8f3c, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _Mask:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MaskTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
......@@ -79,22 +95,41 @@ Material:
m_Ints: []
m_Floats:
- PixelSnap: 0
- _BlendOp: 0
- _BumpScale: 1
- _CameraFadingEnabled: 0
- _CameraFarFadeDistance: 2
- _CameraNearFadeDistance: 1
- _ColorMask: 15
- _ColorMode: 0
- _Cull: 2
- _Cutoff: 0.5
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _DistortionBlend: 0.5
- _DistortionEnabled: 0
- _DistortionStrength: 1
- _DistortionStrengthScaled: 0
- _DstBlend: 10
- _EmissionEnabled: 0
- _EnableExternalAlpha: 0
- _FlipbookMode: 0
- _Focus: -100
- _GlossMapScale: 1
- _Glossiness: 0.5
- _GlossyReflections: 1
- _Inside: 0
- _InvFade: 1
- _LightingEnabled: 1
- _Metallic: 0
- _Mode: 1
- _Mode: 3
- _OcclusionStrength: 1
- _Parallax: 0.02
- _R: 1
- _Shininess: 0.2
- _SmoothnessTextureChannel: 0
- _SoftParticlesEnabled: 0
- _SoftParticlesFarFadeDistance: 1
- _SoftParticlesNearFadeDistance: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _Stencil: 0
......@@ -104,12 +139,17 @@ Material:
- _StencilWriteMask: 255
- _UVSec: 0
- _UseUIAlphaClip: 0
- _ZWrite: 1
- _ZWrite: 0
- _sR: 0.5
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}
- _Flip: {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}
- _Specular: {r: 0, g: 0, b: 0, a: 0}
- _TintColor: {r: 1, g: 1, b: 1, a: 1}
m_BuildTextureStacks: []
......@@ -36,8 +36,8 @@ RectTransform:
m_Father: {fileID: 136994829194703267}
m_RootOrder: -1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
......@@ -435,6 +435,7 @@ GameObject:
- component: {fileID: 4388270849266874108}
- component: {fileID: 3772323112090822474}
- component: {fileID: 5506588344517602443}
- component: {fileID: 8742922010387628114}
m_Layer: 0
m_Name: View
m_TagString: Untagged
......@@ -652,7 +653,7 @@ ParticleSystem:
serializedVersion: 2
minMaxState: 0
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:
serializedVersion: 2
key0: {r: 1, g: 1, b: 1, a: 1}
......@@ -5315,6 +5316,18 @@ ParticleSystemRenderer:
m_MeshWeighting2: 1
m_MeshWeighting3: 1
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
GameObject:
m_ObjectHideFlags: 0
......@@ -5579,6 +5592,7 @@ MonoBehaviour:
m_EditorClassIdentifier:
life: 0
Rect: {fileID: 3855441703257783557}
ps: {fileID: 3772323112090822474}
--- !u!1 &4437478244303412374
GameObject:
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