39 lines
1020 B
C#
39 lines
1020 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using System.Data.Common;
|
|
using BITKit;
|
|
using Microsoft.Extensions.DependencyInjection;
|
|
using Microsoft.Extensions.Logging;
|
|
using NodeCanvas.Framework;
|
|
using UnityEngine;
|
|
|
|
namespace Net.Project.B.Quest
|
|
{
|
|
public class CreateQuestNode : ActionTask
|
|
{
|
|
public BBParameter<int> QuestIdentity;
|
|
public BBParameter<string> QuestName;
|
|
public BBParameter<string> QuestDescription;
|
|
|
|
protected override void OnExecute()
|
|
{
|
|
var questService = BITApp.ServiceProvider.GetRequiredService<IQuestService>();
|
|
|
|
questService.AddOrUpdateQuest(new QuestData()
|
|
{
|
|
Identity = QuestIdentity.value,
|
|
Name = QuestName.value,
|
|
Description = QuestDescription.value,
|
|
IsCompleted = false,
|
|
CurrentState = QuestState.Active
|
|
});
|
|
|
|
|
|
EndAction();
|
|
|
|
|
|
}
|
|
}
|
|
}
|
|
|