You've already forked taptap2024_GJ_chidouren
updat core
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
using System;
|
||||
using Framework.GamePool.manager;
|
||||
using Framework.Timer;
|
||||
using Sirenix.Utilities;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Game.Component.SceneProp
|
||||
@@ -9,10 +11,12 @@ namespace Game.Component.SceneProp
|
||||
/// </summary>
|
||||
public class BaseProp : MonoBehaviour
|
||||
{
|
||||
[SerializeField, Header ("触发特效")] private string effectPoolPath;
|
||||
|
||||
// 间隔cd
|
||||
[SerializeField , Header ("间隔cd")] private float _invalidTime = 0f;
|
||||
[SerializeField , Header ("间隔cd")] private float _invalidTime = 0f;
|
||||
[SerializeField] protected bool HasOnce = true;
|
||||
private TimeHandler _timeHandler;
|
||||
private TimeHandler _timeHandler;
|
||||
protected bool isReady => this._timeHandler == null || this._timeHandler.IsDone;
|
||||
|
||||
public void ResetProp ()
|
||||
@@ -28,6 +32,13 @@ namespace Game.Component.SceneProp
|
||||
if (isReady)
|
||||
{
|
||||
var entity = other.gameObject.GetComponent<PlayerEntity> ();
|
||||
if (!this.effectPoolPath.IsNullOrWhitespace ())
|
||||
{
|
||||
var transform1 = this.transform;
|
||||
GamePoolManager.Instance.InstantiatePoolObject<PropEffect_PoolObject> (this.effectPoolPath).transform.position
|
||||
= transform1.position;
|
||||
}
|
||||
|
||||
this.OnTrigger (entity);
|
||||
if (HasOnce)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user