增加场景道具

This commit is contained in:
2024-10-19 03:04:15 +08:00
parent f7d5f98604
commit 4a9f891d76
79 changed files with 1674 additions and 27 deletions

View File

@@ -0,0 +1,27 @@
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
}
}