导入敌人模型素材,统一经验和金币掉落物
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
using NUnit.Framework;
|
||||
using SepCore.Entity;
|
||||
using UnityEngine;
|
||||
|
||||
namespace VampireLike.Tests.Gameplay.EditMode
|
||||
{
|
||||
[TestFixture]
|
||||
public class DropEntityTests
|
||||
{
|
||||
[Test]
|
||||
public void DropData_ConstructsWithCorrectValues_AndDefaultAssetName()
|
||||
{
|
||||
var dropData = new DropData(10, 25, 1001);
|
||||
|
||||
Assert.AreEqual(10, dropData.CoinCount);
|
||||
Assert.AreEqual(25, dropData.ExpCount);
|
||||
Assert.AreEqual(1001, dropData.Id);
|
||||
Assert.AreEqual("DropEntity", dropData.AssetName);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void DropData_CanModifyCoinAndExpCount()
|
||||
{
|
||||
var dropData = new DropData(1, 1, 1002);
|
||||
dropData.CoinCount = 5;
|
||||
dropData.ExpCount = 15;
|
||||
|
||||
Assert.AreEqual(5, dropData.CoinCount);
|
||||
Assert.AreEqual(15, dropData.ExpCount);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void DropEntity_TryCollect_WhenPlayerNull_ReturnsFalse()
|
||||
{
|
||||
var go = new GameObject("TestDropEntity");
|
||||
var dropEntity = go.AddComponent<DropEntity>();
|
||||
|
||||
bool collected = dropEntity.TryCollect(null);
|
||||
Assert.IsFalse(collected);
|
||||
|
||||
Object.DestroyImmediate(go);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user