增加特效 ,优化道具外观

This commit is contained in:
2024-10-27 17:14:19 +08:00
parent daeaa8487a
commit e6616c90d5
6 changed files with 24513 additions and 10 deletions

File diff suppressed because it is too large Load Diff

View File

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

File diff suppressed because it is too large Load Diff

View File

@@ -613,6 +613,10 @@ PrefabInstance:
propertyPath: m_IsActive
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8247442098040652398, guid: 121fd30183d15fd41b7db01d2d435331, type: 3}
propertyPath: deadEffect
value: deadEffect
objectReference: {fileID: 0}
m_RemovedComponents: []
m_RemovedGameObjects: []
m_AddedGameObjects: []

View File

@@ -1,7 +1,9 @@
using System;
using Framework.GamePool.manager;
using Framework.Timer;
using Framework.Utils.Extend;
using Game.EventDefine;
using Sirenix.Utilities;
using UnityEngine;
namespace Game.Component
@@ -10,9 +12,11 @@ namespace Game.Component
{
public float speed = 10;
public Rigidbody2D rigidbody2D;
public string deadEffect;
private float speedBuffOffset;
private TimeHandler speedBuffTimer;
public float CurSpeed => MapContent.Instance.MoveGlobalOffset * this.speed *
(1 + (this.speedBuffTimer?.IsPlaying ?? false ? this.speedBuffOffset * (1 - this.speedBuffTimer.CurProgress) : 0));
@@ -63,6 +67,13 @@ namespace Game.Component
{
if (other.CompareTag ("Enemy"))
{
if (!this.deadEffect.IsNullOrWhitespace ())
{
this.gameObject.SetActive (false);
var transform1 = this.transform;
GamePoolManager.Instance.InstantiatePoolObject<PropEffect_PoolObject> (this.deadEffect).transform.position
= transform1.position;
}
//死亡特效
GameEventDefine.ChangeGameFsm.SendMessage (GameState.FieldGame);
}

View File

@@ -46,7 +46,7 @@ Material:
m_Ints: []
m_Floats:
- Vector1_c9f2135c9d254951b22c018d295f8558: 0.003
- _blurOffset: 0.013344013
- _blurOffset: 0.020151433
m_Colors: []
m_BuildTextureStacks: []
--- !u!114 &268278646524644520