1
This commit is contained in:
@@ -1,11 +1,55 @@
|
||||
using System.Collections.Generic;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using Cysharp.Threading.Tasks;
|
||||
using System.Text;
|
||||
|
||||
#if UNITY_64
|
||||
using UnityEngine;
|
||||
#endif
|
||||
namespace BITKit
|
||||
{
|
||||
#if UNITY_64
|
||||
[Serializable]
|
||||
public sealed class ExecuteCommandAction : IAction
|
||||
{
|
||||
[SerializeField] private string command;
|
||||
public void Execute()
|
||||
{
|
||||
BITCommands.Excute(command);
|
||||
}
|
||||
}
|
||||
[Serializable]
|
||||
public sealed class DataCondition : ICondition
|
||||
{
|
||||
[SerializeReference, SubclassSelector] private IReference key;
|
||||
public bool OnCheck()
|
||||
{
|
||||
return Data.Get<bool>(key.Value);
|
||||
}
|
||||
}
|
||||
[Serializable]
|
||||
public sealed class DataCommand : IAction,IConfigProvider
|
||||
{
|
||||
[SerializeReference, SubclassSelector] private IReference key;
|
||||
[SerializeReference, SubclassSelector] private IReference value = new Reference();
|
||||
public void Execute()
|
||||
{
|
||||
//Data.Set(key.Value, value.Value);
|
||||
DataParser.Set(key.Value, value.Value);
|
||||
}
|
||||
|
||||
public string GetConfig(params object[] args)
|
||||
{
|
||||
return $"{key.Value} {value.Value}";
|
||||
}
|
||||
|
||||
public void Configure(params object[] args)
|
||||
{
|
||||
Execute();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
public static class BITCommands
|
||||
{
|
||||
[BITCommand]
|
||||
|
Reference in New Issue
Block a user