public void CmdTaskClose() { if (CurrentTask == null) { return; } GameTask t = CurrentTask.GetComponent <GameTask>(); if (!t.Closeable) { return; } t.OnTaskClose(this); CurrentTask = null; TargetSetTask(connectionToClient, null); }