添加粒子效果
This commit is contained in:
@@ -7,8 +7,8 @@
|
||||
"top": 0,
|
||||
"bottom": 0,
|
||||
"name": "Scene2D",
|
||||
"width": 1920,
|
||||
"height": 1080,
|
||||
"width": 1080,
|
||||
"height": 1920,
|
||||
"_$comp": [
|
||||
{
|
||||
"_$type": "7bad1742-6eed-4d8d-81c0-501dc5bf03d6",
|
||||
@@ -27,12 +27,61 @@
|
||||
}
|
||||
],
|
||||
"_$child": [
|
||||
{
|
||||
"_$id": "02keq35w",
|
||||
"_$type": "Scene3D",
|
||||
"name": "Scene3D",
|
||||
"skyRenderer": {
|
||||
"meshType": "dome"
|
||||
},
|
||||
"ambientColor": {
|
||||
"_$type": "Color",
|
||||
"r": 0.212,
|
||||
"g": 0.227,
|
||||
"b": 0.259
|
||||
},
|
||||
"_$child": [
|
||||
{
|
||||
"_$id": "ynv9f3r4",
|
||||
"_$type": "Camera",
|
||||
"name": "Camera",
|
||||
"transform": {
|
||||
"localPosition": {
|
||||
"_$type": "Vector3",
|
||||
"y": 2,
|
||||
"z": 2
|
||||
}
|
||||
},
|
||||
"orthographic": true,
|
||||
"nearPlane": 0.3,
|
||||
"farPlane": 20,
|
||||
"clearColor": {
|
||||
"_$type": "Color",
|
||||
"r": 0,
|
||||
"g": 0,
|
||||
"b": 0,
|
||||
"a": 0
|
||||
},
|
||||
"renderTarget": {
|
||||
"_$uuid": "c664507a-67fa-47cb-802f-dd7a41c0029c",
|
||||
"_$type": "RenderTexture"
|
||||
}
|
||||
},
|
||||
{
|
||||
"_$id": "3d0vjlm1",
|
||||
"_$prefab": "95371d68-d67d-4a76-b586-e77dc05187da",
|
||||
"name": "dc_particle3D_1",
|
||||
"active": true,
|
||||
"layer": 0
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"_$id": "4rxcl2w3",
|
||||
"_$type": "Panel",
|
||||
"name": "UIRoot",
|
||||
"width": 1920,
|
||||
"height": 1080,
|
||||
"width": 1080,
|
||||
"height": 1920,
|
||||
"_mouseState": 2,
|
||||
"left": 0,
|
||||
"right": 0,
|
||||
@@ -43,8 +92,8 @@
|
||||
"_$id": "2668mvhf",
|
||||
"_$type": "Image",
|
||||
"name": "mask",
|
||||
"width": 1920,
|
||||
"height": 1080,
|
||||
"width": 1080,
|
||||
"height": 1920,
|
||||
"alpha": 0,
|
||||
"left": 0,
|
||||
"right": 0,
|
||||
@@ -57,8 +106,8 @@
|
||||
"_$id": "c5p596do",
|
||||
"_$type": "Box",
|
||||
"name": "btn_clean",
|
||||
"x": 860,
|
||||
"y": 1020,
|
||||
"x": 440,
|
||||
"y": 1860,
|
||||
"width": 200,
|
||||
"height": 60,
|
||||
"visible": false,
|
||||
|
||||
3
assets/atlas/effect/Material3.lmat.meta
Normal file
3
assets/atlas/effect/Material3.lmat.meta
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"uuid": "0f26c893-976a-43fb-b90e-51f65c5da90e"
|
||||
}
|
||||
55
assets/atlas/effect/Material_0.lmat
Normal file
55
assets/atlas/effect/Material_0.lmat
Normal file
@@ -0,0 +1,55 @@
|
||||
{
|
||||
"version": "LAYAMATERIAL:04",
|
||||
"props": {
|
||||
"textures": [
|
||||
{
|
||||
"path": "res://bc6b3297-0b09-4ab3-ba5d-9a8249f4a98e",
|
||||
"constructParams": [
|
||||
128,
|
||||
128,
|
||||
1,
|
||||
false,
|
||||
false,
|
||||
true
|
||||
],
|
||||
"propertyParams": {
|
||||
"filterMode": 1,
|
||||
"wrapModeU": 1,
|
||||
"wrapModeV": 1,
|
||||
"anisoLevel": 1
|
||||
},
|
||||
"name": "u_texture"
|
||||
}
|
||||
],
|
||||
"type": "PARTICLESHURIKEN",
|
||||
"renderQueue": 3000,
|
||||
"materialRenderMode": 2,
|
||||
"u_AlphaTestValue": 0.5,
|
||||
"s_Cull": 2,
|
||||
"s_Blend": 1,
|
||||
"s_BlendSrc": 6,
|
||||
"s_BlendDst": 7,
|
||||
"s_BlendSrcRGB": 1,
|
||||
"s_BlendDstRGB": 0,
|
||||
"s_BlendSrcAlpha": 1,
|
||||
"s_BlendDstAlpha": 0,
|
||||
"s_DepthTest": 1,
|
||||
"s_DepthWrite": false,
|
||||
"u_TilingOffset": [
|
||||
1,
|
||||
1,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"u_Tintcolor": [
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1
|
||||
],
|
||||
"defines": [
|
||||
"DIFFUSEMAP",
|
||||
"TINTCOLOR"
|
||||
]
|
||||
}
|
||||
}
|
||||
3
assets/atlas/effect/Material_0.lmat.meta
Normal file
3
assets/atlas/effect/Material_0.lmat.meta
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"uuid": "972bb0d4-6b6c-4abb-8af4-b37ee29641da"
|
||||
}
|
||||
55
assets/atlas/effect/Material_1.lmat
Normal file
55
assets/atlas/effect/Material_1.lmat
Normal file
@@ -0,0 +1,55 @@
|
||||
{
|
||||
"version": "LAYAMATERIAL:04",
|
||||
"props": {
|
||||
"textures": [
|
||||
{
|
||||
"path": "res://da748b9e-ed0a-45d0-bf07-57c69aa0f65a",
|
||||
"constructParams": [
|
||||
232,
|
||||
232,
|
||||
1,
|
||||
false,
|
||||
false,
|
||||
true
|
||||
],
|
||||
"propertyParams": {
|
||||
"filterMode": 1,
|
||||
"wrapModeU": 1,
|
||||
"wrapModeV": 1,
|
||||
"anisoLevel": 1
|
||||
},
|
||||
"name": "u_texture"
|
||||
}
|
||||
],
|
||||
"type": "PARTICLESHURIKEN",
|
||||
"renderQueue": 3000,
|
||||
"materialRenderMode": 2,
|
||||
"u_AlphaTestValue": 0.5,
|
||||
"s_Cull": 2,
|
||||
"s_Blend": 1,
|
||||
"s_BlendSrc": 6,
|
||||
"s_BlendDst": 7,
|
||||
"s_BlendSrcRGB": 1,
|
||||
"s_BlendDstRGB": 0,
|
||||
"s_BlendSrcAlpha": 1,
|
||||
"s_BlendDstAlpha": 0,
|
||||
"s_DepthTest": 1,
|
||||
"s_DepthWrite": false,
|
||||
"u_TilingOffset": [
|
||||
1,
|
||||
1,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"u_Tintcolor": [
|
||||
0.5,
|
||||
0.5,
|
||||
0.5,
|
||||
1
|
||||
],
|
||||
"defines": [
|
||||
"DIFFUSEMAP",
|
||||
"TINTCOLOR"
|
||||
]
|
||||
}
|
||||
}
|
||||
3
assets/atlas/effect/Material_1.lmat.meta
Normal file
3
assets/atlas/effect/Material_1.lmat.meta
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"uuid": "87437940-0279-4fa2-b9b4-eaf7adfbbc8f"
|
||||
}
|
||||
105
assets/atlas/effect/dc_particle3D_0.lh
Normal file
105
assets/atlas/effect/dc_particle3D_0.lh
Normal file
@@ -0,0 +1,105 @@
|
||||
{
|
||||
"_$ver": 1,
|
||||
"_$id": "hk7m93of",
|
||||
"_$type": "Sprite3D",
|
||||
"name": "Particle3D_0",
|
||||
"_$child": [
|
||||
{
|
||||
"_$id": "t4efy2dz",
|
||||
"_$type": "Sprite3D",
|
||||
"name": "Particle3D",
|
||||
"transform": {
|
||||
"localRotation": {
|
||||
"_$type": "Quaternion",
|
||||
"x": -0.7071067811865475,
|
||||
"w": 0.7071067811865476
|
||||
}
|
||||
},
|
||||
"_$comp": [
|
||||
{
|
||||
"_$type": "ShurikenParticleRenderer",
|
||||
"lightmapScaleOffset": {
|
||||
"_$type": "Vector4"
|
||||
},
|
||||
"sharedMaterials": [
|
||||
{
|
||||
"_$uuid": "972bb0d4-6b6c-4abb-8af4-b37ee29641da",
|
||||
"_$type": "Material"
|
||||
}
|
||||
],
|
||||
"_particleSystem": {
|
||||
"_isPlaying": true,
|
||||
"duration": 1,
|
||||
"startLifetimeConstant": 10,
|
||||
"startSpeedConstant": 1,
|
||||
"startSizeType": 2,
|
||||
"startSizeConstant": 0.5,
|
||||
"startSizeConstantMin": 1,
|
||||
"startSizeConstantMax": 2,
|
||||
"startSizeConstantSeparate": {
|
||||
"_$type": "Vector3",
|
||||
"x": 1,
|
||||
"y": 1,
|
||||
"z": 1
|
||||
},
|
||||
"startSizeConstantMinSeparate": {
|
||||
"_$type": "Vector3"
|
||||
},
|
||||
"startSizeConstantMaxSeparate": {
|
||||
"_$type": "Vector3",
|
||||
"x": 1,
|
||||
"y": 1,
|
||||
"z": 1
|
||||
},
|
||||
"startRotationType": 2,
|
||||
"threeDStartRotation": true,
|
||||
"startRotationConstantSeparate": {
|
||||
"_$type": "Vector3"
|
||||
},
|
||||
"startRotationConstantMinSeparate": {
|
||||
"_$type": "Vector3",
|
||||
"z": 180
|
||||
},
|
||||
"startRotationConstantMaxSeparate": {
|
||||
"_$type": "Vector3",
|
||||
"z": 180
|
||||
},
|
||||
"startColorConstant": {
|
||||
"_$type": "Vector4",
|
||||
"x": 1,
|
||||
"y": 1,
|
||||
"z": 1,
|
||||
"w": 1
|
||||
},
|
||||
"startColorConstantMin": {
|
||||
"_$type": "Vector4"
|
||||
},
|
||||
"startColorConstantMax": {
|
||||
"_$type": "Vector4",
|
||||
"x": 1,
|
||||
"y": 1,
|
||||
"z": 1,
|
||||
"w": 1
|
||||
},
|
||||
"maxParticles": 100,
|
||||
"randomSeed": {
|
||||
"_$type": "Uint32Array",
|
||||
"value": [
|
||||
0
|
||||
]
|
||||
},
|
||||
"emission": {
|
||||
"emissionRate": 2
|
||||
},
|
||||
"shape": {
|
||||
"_$type": "ConeShape",
|
||||
"angleDEG": 0,
|
||||
"radius": 5,
|
||||
"length": 10
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
3
assets/atlas/effect/dc_particle3D_0.lh.meta
Normal file
3
assets/atlas/effect/dc_particle3D_0.lh.meta
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"uuid": "065a4525-af3c-4ec2-8a9a-d23940fb316a"
|
||||
}
|
||||
105
assets/atlas/effect/dc_particle3D_1.lh
Normal file
105
assets/atlas/effect/dc_particle3D_1.lh
Normal file
@@ -0,0 +1,105 @@
|
||||
{
|
||||
"_$ver": 1,
|
||||
"_$id": "7pd12x9m",
|
||||
"_$type": "Sprite3D",
|
||||
"name": "Particle3D_1",
|
||||
"_$child": [
|
||||
{
|
||||
"_$id": "dcjedgpn",
|
||||
"_$type": "Sprite3D",
|
||||
"name": "Particle3D",
|
||||
"transform": {
|
||||
"localRotation": {
|
||||
"_$type": "Quaternion",
|
||||
"x": -0.7071067811865475,
|
||||
"w": 0.7071067811865476
|
||||
}
|
||||
},
|
||||
"_$comp": [
|
||||
{
|
||||
"_$type": "ShurikenParticleRenderer",
|
||||
"lightmapScaleOffset": {
|
||||
"_$type": "Vector4"
|
||||
},
|
||||
"sharedMaterials": [
|
||||
{
|
||||
"_$uuid": "87437940-0279-4fa2-b9b4-eaf7adfbbc8f",
|
||||
"_$type": "Material"
|
||||
}
|
||||
],
|
||||
"_particleSystem": {
|
||||
"_isPlaying": true,
|
||||
"duration": 1,
|
||||
"startLifetimeConstant": 5,
|
||||
"startSpeedConstant": 1,
|
||||
"startSizeType": 2,
|
||||
"startSizeConstant": 0.5,
|
||||
"startSizeConstantMin": 1,
|
||||
"startSizeConstantMax": 2,
|
||||
"startSizeConstantSeparate": {
|
||||
"_$type": "Vector3",
|
||||
"x": 1,
|
||||
"y": 1,
|
||||
"z": 1
|
||||
},
|
||||
"startSizeConstantMinSeparate": {
|
||||
"_$type": "Vector3"
|
||||
},
|
||||
"startSizeConstantMaxSeparate": {
|
||||
"_$type": "Vector3",
|
||||
"x": 1,
|
||||
"y": 1,
|
||||
"z": 1
|
||||
},
|
||||
"startRotationType": 2,
|
||||
"threeDStartRotation": true,
|
||||
"startRotationConstantSeparate": {
|
||||
"_$type": "Vector3"
|
||||
},
|
||||
"startRotationConstantMinSeparate": {
|
||||
"_$type": "Vector3",
|
||||
"z": 180
|
||||
},
|
||||
"startRotationConstantMaxSeparate": {
|
||||
"_$type": "Vector3",
|
||||
"z": 180
|
||||
},
|
||||
"startColorConstant": {
|
||||
"_$type": "Vector4",
|
||||
"x": 1,
|
||||
"y": 1,
|
||||
"z": 1,
|
||||
"w": 1
|
||||
},
|
||||
"startColorConstantMin": {
|
||||
"_$type": "Vector4"
|
||||
},
|
||||
"startColorConstantMax": {
|
||||
"_$type": "Vector4",
|
||||
"x": 1,
|
||||
"y": 1,
|
||||
"z": 1,
|
||||
"w": 1
|
||||
},
|
||||
"maxParticles": 100,
|
||||
"randomSeed": {
|
||||
"_$type": "Uint32Array",
|
||||
"value": [
|
||||
0
|
||||
]
|
||||
},
|
||||
"emission": {
|
||||
"emissionRate": 2
|
||||
},
|
||||
"shape": {
|
||||
"_$type": "ConeShape",
|
||||
"angleDEG": 0,
|
||||
"radius": 2,
|
||||
"length": 10
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
3
assets/atlas/effect/dc_particle3D_1.lh.meta
Normal file
3
assets/atlas/effect/dc_particle3D_1.lh.meta
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"uuid": "95371d68-d67d-4a76-b586-e77dc05187da"
|
||||
}
|
||||
5
assets/atlas/effect/dc_render_texture.rendertexture
Normal file
5
assets/atlas/effect/dc_render_texture.rendertexture
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"width": 1024,
|
||||
"height": 1024,
|
||||
"colorFormat": 17
|
||||
}
|
||||
3
assets/atlas/effect/dc_render_texture.rendertexture.meta
Normal file
3
assets/atlas/effect/dc_render_texture.rendertexture.meta
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"uuid": "c664507a-67fa-47cb-802f-dd7a41c0029c"
|
||||
}
|
||||
BIN
assets/atlas/effect/img_0.png
Normal file
BIN
assets/atlas/effect/img_0.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 539 B |
6
assets/atlas/effect/img_0.png.meta
Normal file
6
assets/atlas/effect/img_0.png.meta
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"uuid": "bc6b3297-0b09-4ab3-ba5d-9a8249f4a98e",
|
||||
"importer": {
|
||||
"textureType": 2
|
||||
}
|
||||
}
|
||||
BIN
assets/atlas/effect/img_1.png
Normal file
BIN
assets/atlas/effect/img_1.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.0 KiB |
6
assets/atlas/effect/img_1.png.meta
Normal file
6
assets/atlas/effect/img_1.png.meta
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"uuid": "da748b9e-ed0a-45d0-bf07-57c69aa0f65a",
|
||||
"importer": {
|
||||
"textureType": 2
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 44 KiB |
@@ -1,6 +0,0 @@
|
||||
{
|
||||
"uuid": "2a5d1872-8a36-4ac1-ad80-f375499754a6",
|
||||
"importer": {
|
||||
"textureType": 2
|
||||
}
|
||||
}
|
||||
@@ -110,13 +110,14 @@
|
||||
"_$id": "et3t0uy6",
|
||||
"_$type": "Image",
|
||||
"name": "trophy_light",
|
||||
"x": 375,
|
||||
"width": 705,
|
||||
"height": 960,
|
||||
"right": 0,
|
||||
"top": 0,
|
||||
"skin": "res://2a5d1872-8a36-4ac1-ad80-f375499754a6",
|
||||
"useSourceSize": true,
|
||||
"x": 225,
|
||||
"y": -136,
|
||||
"width": 1024,
|
||||
"height": 1024,
|
||||
"right": null,
|
||||
"top": -144,
|
||||
"centerX": 224,
|
||||
"skin": "res://07b90718-84ee-4924-9098-8f0ee3663d92",
|
||||
"color": "#ffffff"
|
||||
},
|
||||
{
|
||||
@@ -128,7 +129,7 @@
|
||||
"width": 468,
|
||||
"height": 468,
|
||||
"top": 110,
|
||||
"centerX": 225,
|
||||
"centerX": 224,
|
||||
"skin": "res://07b90718-84ee-4924-9098-8f0ee3663d92",
|
||||
"color": "#ffffff"
|
||||
},
|
||||
|
||||
@@ -103,14 +103,13 @@
|
||||
"_$id": "geon9fbm",
|
||||
"_$type": "Image",
|
||||
"name": "light",
|
||||
"x": 8,
|
||||
"y": -30,
|
||||
"width": 705,
|
||||
"height": 960,
|
||||
"x": -172,
|
||||
"y": 0,
|
||||
"width": 1024,
|
||||
"height": 1024,
|
||||
"bottom": 30,
|
||||
"centerX": 0,
|
||||
"skin": "res://2a5d1872-8a36-4ac1-ad80-f375499754a6",
|
||||
"useSourceSize": true,
|
||||
"color": "#ffffff"
|
||||
},
|
||||
{
|
||||
|
||||
@@ -53,6 +53,7 @@ export const respath = {
|
||||
home_top_dc_bg_finish: "atlas/images/bg_dc_top2.png",
|
||||
dc_top_bg_normal: "atlas/images/img_dc_bg2.png",
|
||||
dc_top_bg_finish: "atlas/images/img_dc_finished.png",
|
||||
dc_render_texture: "atlas/effect/dc_render_texture.rendertexture",
|
||||
|
||||
trophy_bg_light_gold: "atlas/trophys/img_trophy_bg_light_gold.png",
|
||||
trophy_bg_light_grey: "atlas/trophys/img_trophy_bg_light_gray.png",
|
||||
|
||||
@@ -37,6 +37,7 @@ export class ResourceManager {
|
||||
this.resources.push({ url: respath.home_top_dc_bg_finish, type: Laya.Loader.IMAGE })
|
||||
this.resources.push({ url: respath.dc_top_bg_normal, type: Laya.Loader.IMAGE })
|
||||
this.resources.push({ url: respath.dc_top_bg_finish, type: Laya.Loader.IMAGE })
|
||||
this.resources.push({ url: respath.dc_render_texture })
|
||||
|
||||
this.resources.push({ url: respath.trophy_bg_light_gold, type: Laya.Loader.IMAGE })
|
||||
this.resources.push({ url: respath.trophy_bg_light_grey, type: Laya.Loader.IMAGE })
|
||||
|
||||
@@ -190,14 +190,13 @@ export class DailyChallenge extends Laya.Script {
|
||||
const nowDay = new Date().getDate()
|
||||
|
||||
ResourceManager.getInstance().loadTexture(info.icon_res, this.trophy_icon)
|
||||
ResourceManager.getInstance().loadTexture(respath.dc_render_texture, this.trophy_light)
|
||||
// 设置背景
|
||||
if (user.get_trophyRecord(info.year, info.month)) {
|
||||
ResourceManager.getInstance().loadTexture(respath.dc_top_bg_finish, this.bg_dc)
|
||||
this.trophy_light.visible = true
|
||||
this.trophy_icon.gray = false
|
||||
} else {
|
||||
ResourceManager.getInstance().loadTexture(respath.dc_top_bg_normal, this.bg_dc)
|
||||
this.trophy_light.visible = false
|
||||
this.trophy_icon.gray = true
|
||||
}
|
||||
const starCount = user.get_doneCountByDate(info.year, info.month)
|
||||
|
||||
Reference in New Issue
Block a user