增加收获属性逻辑,优化掉落物表现效果
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
using SepCore.Entity;
|
||||
using UnityEngine;
|
||||
using UnityGameFramework.Runtime;
|
||||
|
||||
@@ -22,8 +21,6 @@ namespace SepCore.Entity
|
||||
{
|
||||
Log.Error("DropEntity.OnShow() called with wrong type: {0}.", userData?.GetType().Name);
|
||||
}
|
||||
|
||||
CachedTransform.localScale = new Vector3(0.3f, 0.3f, 0.3f);
|
||||
}
|
||||
|
||||
public bool TryCollect(Player player, float collectDistance = 0f)
|
||||
@@ -48,10 +45,5 @@ namespace SepCore.Entity
|
||||
GameEntry.Entity.HideEntity(this);
|
||||
return true;
|
||||
}
|
||||
|
||||
private void OnTriggerEnter(Collider other)
|
||||
{
|
||||
TryCollect(other.GetComponent<Player>());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user