22 lines
534 B
C#
22 lines
534 B
C#
|
using System.Collections;
|
||
|
using System.Collections.Generic;
|
||
|
using UnityEngine;
|
||
|
|
||
|
namespace BITKit
|
||
|
{
|
||
|
public class ExecuteCommand : MonoBehaviour
|
||
|
{
|
||
|
public string command;
|
||
|
[SerializeReference, SubclassSelector] private IReference format;
|
||
|
public void Execute()
|
||
|
{
|
||
|
Data.Set("Cmd", command);
|
||
|
}
|
||
|
public void Execute(string cmd)
|
||
|
{
|
||
|
if(format!=null)
|
||
|
cmd = format.Value.Replace("{x}",cmd);
|
||
|
BITCommands.Excute(cmd);
|
||
|
}
|
||
|
}
|
||
|
}
|