You've already forked taptap2024_GJ_chidouren
增加特效 ,优化道具外观
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user