You've already forked taptap2024_GJ_chidouren
27 lines
780 B
C#
27 lines
780 B
C#
using UnityEngine;
|
|
|
|
namespace Game.Component.SceneProp
|
|
{
|
|
public class BlueProp : BaseProp
|
|
{
|
|
[SerializeField ,Header ("加速时长")] private float _duration = 3.0f;
|
|
[SerializeField ,Header ("额外加速幅度")] private float _speedOffset = 0.5f;
|
|
|
|
protected override void OnTrigger (PlayerEntity entity)
|
|
{
|
|
entity.AddSpeedBuff (this._duration , this._speedOffset);
|
|
}
|
|
|
|
#if UNITY_EDITOR
|
|
protected void OnDrawGizmos ()
|
|
{
|
|
//绘制一个蓝色圆形
|
|
Gizmos.color = Color.blue;
|
|
Gizmos.DrawWireSphere (transform.position , 0.5f);
|
|
//文字提示“加速”
|
|
UnityEditor.Handles.Label (transform.position , "加速");
|
|
}
|
|
|
|
#endif
|
|
}
|
|
} |