add kcp
This commit is contained in:
@@ -1,15 +0,0 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
namespace BITKit
|
||||
{
|
||||
public class ExcuteCommand : MonoBehaviour
|
||||
{
|
||||
public string command;
|
||||
public void Excute()
|
||||
{
|
||||
Data.Set("Cmd", command);
|
||||
}
|
||||
}
|
||||
}
|
22
Src/Unity/Scripts/Components/ExecuteCommand.cs
Normal file
22
Src/Unity/Scripts/Components/ExecuteCommand.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user