重构
This commit is contained in:
@@ -0,0 +1,84 @@
|
||||
using System;
|
||||
|
||||
namespace AibisDream.FixSystem
|
||||
{
|
||||
public interface ISocketCommand
|
||||
{
|
||||
void Execute();
|
||||
void ShowWave();
|
||||
void HandleDeepIn();
|
||||
bool CanDeepIn();
|
||||
}
|
||||
|
||||
// public class CommandFactory
|
||||
// {
|
||||
// public ICommand CreateCommand(string commandType)
|
||||
// {
|
||||
// return new EyeCommand();
|
||||
// }
|
||||
// }
|
||||
|
||||
public abstract class AbsSocketCommand : ISocketCommand
|
||||
{
|
||||
public bool canDeepIn;
|
||||
public bool isFirstPlugIn;
|
||||
|
||||
public string moduleName;
|
||||
public string firstPlugYarnNode;
|
||||
public string repeatPlugYarnNode;
|
||||
|
||||
public WaveformType waveformType;
|
||||
|
||||
public void Execute()
|
||||
{
|
||||
ShowWave();
|
||||
DialogController.Instance.StartDialogNode(isFirstPlugIn ? firstPlugYarnNode : repeatPlugYarnNode);
|
||||
if (isFirstPlugIn) isFirstPlugIn = false;
|
||||
}
|
||||
|
||||
public void ShowWave()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public void HandleDeepIn()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public bool CanDeepIn()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class EngineSocketCommand : ISocketCommand
|
||||
{
|
||||
public bool canDeepIn;
|
||||
|
||||
public void Execute()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public void ShowWave()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public void HandleDeepIn()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 是否可以进行深入
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public bool CanDeepIn()
|
||||
{
|
||||
return canDeepIn;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user