```
feat(gameplay): 提升单位检测范围并添加法师属性 - 将所有单位的检测范围从默认值提升至100 - 为法师预制体添加护盾、等级等新属性 - 为法师添加暴击、吸血、伤害减免等战斗属性 - 更换法师弹丸预设并调整相关参数 - 添加锚点交战Z线控制功能 - 更新玩家数据中配备的召唤师技能 - 移除多余的纹理配置文件 ```
This commit is contained in:
1 parent
6089308f66
commit
23c559d9f7
243 files changed
+150612
-1459
No files matched your search
@@ -0,0 +1,39 @@
|
||||
using UnityEngine;
|
||||
using System.Collections;
|
||||
|
||||
namespace TJGeneratorLibEffects
|
||||
{
|
||||
public class ETFXLightFade : MonoBehaviour
|
||||
{
|
||||
[Header("Seconds to dim the light")]
|
||||
public float life = 0.2f;
|
||||
public bool killAfterLife = true;
|
||||
|
||||
private Light li;
|
||||
private float initIntensity;
|
||||
|
||||
// Use this for initialization
|
||||
void Start()
|
||||
{
|
||||
if (gameObject.GetComponent<Light>())
|
||||
{
|
||||
li = gameObject.GetComponent<Light>();
|
||||
initIntensity = li.intensity;
|
||||
}
|
||||
else
|
||||
print("No light object found on " + gameObject.name);
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
if (gameObject.GetComponent<Light>())
|
||||
{
|
||||
li.intensity -= initIntensity * (Time.deltaTime / life);
|
||||
if (killAfterLife && li.intensity <= 0)
|
||||
//Destroy(gameObject);
|
||||
Destroy(gameObject.GetComponent<Light>());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user