|
|
|
|
@ -28,40 +28,51 @@ namespace DisComputer
|
|
|
|
|
{
|
|
|
|
|
SetUnLoadMode(0);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void Update()
|
|
|
|
|
{
|
|
|
|
|
if (Input.GetKey(KeyCode.U)&& Input.GetKeyDown(KeyCode.Alpha1))
|
|
|
|
|
{
|
|
|
|
|
SetUnLoadMode(6);
|
|
|
|
|
SetUnLoadMode(7);
|
|
|
|
|
}
|
|
|
|
|
if (Input.GetKey(KeyCode.U) && Input.GetKeyDown(KeyCode.Alpha2))
|
|
|
|
|
{
|
|
|
|
|
SetUnLoadMode(5);
|
|
|
|
|
SetUnLoadMode(6);
|
|
|
|
|
}
|
|
|
|
|
if (Input.GetKey(KeyCode.U) && Input.GetKeyDown(KeyCode.Alpha3))
|
|
|
|
|
{
|
|
|
|
|
SetUnLoadMode(4);
|
|
|
|
|
SetUnLoadMode(5);
|
|
|
|
|
}
|
|
|
|
|
if (Input.GetKey(KeyCode.U) && Input.GetKeyDown(KeyCode.Alpha4))
|
|
|
|
|
{
|
|
|
|
|
SetUnLoadMode(3);
|
|
|
|
|
SetUnLoadMode(4);
|
|
|
|
|
}
|
|
|
|
|
if (Input.GetKey(KeyCode.U) && Input.GetKeyDown(KeyCode.Alpha5))
|
|
|
|
|
{
|
|
|
|
|
SetUnLoadMode(2);
|
|
|
|
|
SetUnLoadMode(3);
|
|
|
|
|
}
|
|
|
|
|
if (Input.GetKey(KeyCode.U) && Input.GetKeyDown(KeyCode.Alpha6))
|
|
|
|
|
{
|
|
|
|
|
SetUnLoadMode(1);
|
|
|
|
|
SetUnLoadMode(2);
|
|
|
|
|
}
|
|
|
|
|
if (Input.GetKey(KeyCode.U) && Input.GetKeyDown(KeyCode.Alpha7))
|
|
|
|
|
{
|
|
|
|
|
SetUnLoadMode(1);
|
|
|
|
|
}
|
|
|
|
|
if (Input.GetKey(KeyCode.U) && Input.GetKeyDown(KeyCode.Alpha8))
|
|
|
|
|
{
|
|
|
|
|
SetUnLoadMode(0);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (Input.GetKey(KeyCode.R)&&Input.GetKeyDown(KeyCode.Alpha1))
|
|
|
|
|
{
|
|
|
|
|
SetLoadMode(0);
|
|
|
|
|
@ -90,9 +101,40 @@ namespace DisComputer
|
|
|
|
|
{
|
|
|
|
|
SetLoadMode(6);
|
|
|
|
|
}
|
|
|
|
|
if (Input.GetKey(KeyCode.R) && Input.GetKeyDown(KeyCode.Alpha8))
|
|
|
|
|
{
|
|
|
|
|
SetLoadMode(7);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 设置延时安装
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="delay"></param>
|
|
|
|
|
/// <param name="index"></param>
|
|
|
|
|
public void DelaySetLoad(float delay,int index)
|
|
|
|
|
{
|
|
|
|
|
CommonTool.WaitTimeAfterDo(this, delay, () =>
|
|
|
|
|
{
|
|
|
|
|
SetLoadMode(index);
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 设置延时拆卸
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="delay"></param>
|
|
|
|
|
/// <param name="index"></param>
|
|
|
|
|
public void DelaySetUnLoad(float delay, int index)
|
|
|
|
|
{
|
|
|
|
|
CommonTool.WaitTimeAfterDo(this, delay, () =>
|
|
|
|
|
{
|
|
|
|
|
SetUnLoadMode(index);
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 改变状态
|
|
|
|
|
/// </summary>
|
|
|
|
|
|