void OnClick() { switch (mode) { case Mode.ADD: capturer.CapturePic(); break; case Mode.DELETE: Destroy(main.t); main.t = null; break; } }