35 lines
1.1 KiB
C#
35 lines
1.1 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using UnityEngine;
|
|
|
|
[Serializable]
|
|
public class CollectRequiredSubjectData : RequiredSubjectData
|
|
{
|
|
protected override string MODEL_LOCALIZATION => "Items/";
|
|
|
|
public CollectRequiredSubjectData(int requiredAmount) : base(requiredAmount) { }
|
|
|
|
public CollectRequiredSubjectData(int requiredAmount, string requiredObjectName) : base(requiredAmount, requiredObjectName) { }
|
|
|
|
public CollectRequiredSubjectData(CollectRequiredSubject requiredSubject) : base(requiredSubject) { }
|
|
|
|
|
|
|
|
public override RequiredSubject MapDataToObject(string prefarbAssetName)
|
|
{
|
|
var newCollectRequirement = new CollectRequiredSubject(RequiredAmount);
|
|
|
|
newCollectRequirement.RequiredObject = newCollectRequirement.FindObjectInResource(prefarbAssetName);
|
|
|
|
return newCollectRequirement;
|
|
}
|
|
|
|
public override RequiredSubject MapDataToObject()
|
|
{
|
|
return new CollectRequiredSubject(RequiredAmount, RequiredObjectName);
|
|
}
|
|
}
|