# UI_SubView_Switch_358.luac
; fn @Switch.lua  line 0-0 np=0 va=1 ms=2 code=30 consts=10 upvals=1 protos=8
;   K[0]='Switch'
;   K[1]='__index'
;   K[2]='Init'
;   K[3]='SetOn'
;   K[4]='IsOn'
;   K[5]='_OnClick'
;   K[6]='_Callback'
;   K[7]='PlaySoundEffect'
;   K[8]='SetText'
;   K[9]='SetInteractable'
;   upvals: _ENV
0000  NEWTABLE  R0 = {} (0 items)
0001  SETTABUP  _ENV[K0('Switch')] = R0
0002  GETTABUP  R0 = _ENV[K0('Switch')]
0003  GETTABUP  R1 = _ENV[K0('Switch')]
0004  SETTABLE  R0[K1('__index')] = R1
0005  GETTABUP  R0 = _ENV[K0('Switch')]
0006  CLOSURE   R1 = closure proto0
0007  SETTABLE  R0[K2('Init')] = R1
0008  GETTABUP  R0 = _ENV[K0('Switch')]
0009  CLOSURE   R1 = closure proto1
0010  SETTABLE  R0[K3('SetOn')] = R1
0011  GETTABUP  R0 = _ENV[K0('Switch')]
0012  CLOSURE   R1 = closure proto2
0013  SETTABLE  R0[K4('IsOn')] = R1
0014  GETTABUP  R0 = _ENV[K0('Switch')]
0015  CLOSURE   R1 = closure proto3
0016  SETTABLE  R0[K5('_OnClick')] = R1
0017  GETTABUP  R0 = _ENV[K0('Switch')]
0018  CLOSURE   R1 = closure proto4
0019  SETTABLE  R0[K6('_Callback')] = R1
0020  GETTABUP  R0 = _ENV[K0('Switch')]
0021  CLOSURE   R1 = closure proto5
0022  SETTABLE  R0[K7('PlaySoundEffect')] = R1
0023  GETTABUP  R0 = _ENV[K0('Switch')]
0024  CLOSURE   R1 = closure proto6
0025  SETTABLE  R0[K8('SetText')] = R1
0026  GETTABUP  R0 = _ENV[K0('Switch')]
0027  CLOSURE   R1 = closure proto7
0028  SETTABLE  R0[K9('SetInteractable')] = R1
0029  RETURN    return R0..R-1
; ---------- proto0 [Init] ----------
  ; fn ?  line 5-10 np=3 va=0 ms=6 code=11 consts=6 upvals=1 protos=0
  ;   K[0]='Log'
  ;   K[1]='Assert'
  ;   K[2]='没有设置 Switch 回调'
  ;   K[3]='m_funcOnToggle'
  ;   K[4]='m_tag'
  ;   K[5]='SetInteractable'
  ;   upvals: _ENV
  ;   locals: self(0-11), funcOnToggle(0-11), tag(0-11)
  0000  GETTABUP  R3 = _ENV[K0('Log')]
  0001  GETTABLE  R3 = R3[K1('Assert')]
  0002  MOVE      R4 = R0
  0003  LOADK     R5 = K2 '没有设置 Switch 回调'
  0004  CALL      R3 = call(R3, 0 args, 2 rets)
  0005  SETTABLE  R0[K3('m_funcOnToggle')] = R1
  0006  SETTABLE  R0[K4('m_tag')] = R2
  0007  SELF      R4 = R0[K5('SetInteractable')] (self)
  0008  LOADBOOL  R5 = true
  0009  CALL      R3 = call(R3, 0 args, 2 rets)
  0010  RETURN    return R0..R-1
; ---------- proto1 [SetOn] ----------
  ; fn ?  line 12-18 np=3 va=0 ms=6 code=14 consts=4 upvals=0 protos=0
  ;   K[0]=nil
  ;   K[1]='m_flagGo'
  ;   K[2]='SetActive'
  ;   K[3]='_Callback'
  ;   locals: self(0-14), bOn(0-14), triggerToggleFunc(0-14)
  0000  EQ        if R1 eq K0(nil)   -> -129790
  0001  JMP       (jump)   -> 4
  0002  JMP       (jump)   -> 5
  0003  LOADBOOL  R2 = false
  0004  LOADBOOL  R2 = true
  0005  GETTABLE  R3 = R0[K1('m_flagGo')]
  0006  SELF      R4 = R3[K2('SetActive')] (self)
  0007  MOVE      R5 = R0
  0008  CALL      R3 = call(R3, 0 args, 2 rets)
  0009  TEST      if not R2 then   -> -131061
  0010  JMP       (jump)   -> 13
  0011  SELF      R4 = R0[K3('_Callback')] (self)
  0012  CALL      R3 = call(R3, 0 args, 1 rets)
  0013  RETURN    return R0..R-1
; ---------- proto2 [IsOn] ----------
  ; fn ?  line 20-22 np=1 va=0 ms=2 code=4 consts=2 upvals=0 protos=0
  ;   K[0]='m_flagGo'
  ;   K[1]='activeSelf'
  ;   locals: self(0-4)
  0000  GETTABLE  R1 = R0[K0('m_flagGo')]
  0001  GETTABLE  R1 = R1[K1('activeSelf')]
  0002  RETURN    return R1..R0
  0003  RETURN    return R0..R-1
; ---------- proto3 [_OnClick] ----------
  ; fn ?  line 24-27 np=1 va=0 ms=4 code=9 consts=4 upvals=0 protos=0
  ;   K[0]='m_flagGo'
  ;   K[1]='SetActive'
  ;   K[2]='activeSelf'
  ;   K[3]='_Callback'
  ;   locals: self(0-9)
  0000  GETTABLE  R1 = R0[K0('m_flagGo')]
  0001  SELF      R2 = R1[K1('SetActive')] (self)
  0002  GETTABLE  R3 = R0[K0('m_flagGo')]
  0003  GETTABLE  R3 = R3[K2('activeSelf')]
  0004  NOT       R3 = not R0
  0005  CALL      R1 = call(R1, 0 args, 2 rets)
  0006  SELF      R2 = R0[K3('_Callback')] (self)
  0007  CALL      R1 = call(R1, 0 args, 1 rets)
  0008  RETURN    return R0..R-1
; ---------- proto4 [_Callback] ----------
  ; fn ?  line 29-31 np=1 va=0 ms=4 code=6 consts=4 upvals=0 protos=0
  ;   K[0]='m_funcOnToggle'
  ;   K[1]='m_flagGo'
  ;   K[2]='activeSelf'
  ;   K[3]='m_tag'
  ;   locals: self(0-6)
  0000  GETTABLE  R1 = R0[K0('m_funcOnToggle')]
  0001  GETTABLE  R2 = R0[K1('m_flagGo')]
  0002  GETTABLE  R2 = R2[K2('activeSelf')]
  0003  GETTABLE  R3 = R0[K3('m_tag')]
  0004  CALL      R1 = call(R1, 0 args, 2 rets)
  0005  RETURN    return R0..R-1
; ---------- proto5 [PlaySoundEffect] ----------
  ; fn ?  line 33-37 np=1 va=0 ms=4 code=9 consts=4 upvals=1 protos=0
  ;   K[0]='m_strSoundEffectName'
  ;   K[1]='GM'
  ;   K[2]='AudioModel'
  ;   K[3]='PlayEffect'
  ;   upvals: _ENV
  ;   locals: self(0-9)
  0000  GETTABLE  R1 = R0[K0('m_strSoundEffectName')]
  0001  TEST      if not R1 then   -> -131069
  0002  JMP       (jump)   -> 8
  0003  GETTABUP  R1 = _ENV[K1('GM')]
  0004  GETTABLE  R1 = R1[K2('AudioModel')]
  0005  SELF      R2 = R1[K3('PlayEffect')] (self)
  0006  GETTABLE  R3 = R0[K0('m_strSoundEffectName')]
  0007  CALL      R1 = call(R1, 0 args, 2 rets)
  0008  RETURN    return R0..R-1
; ---------- proto6 [SetText] ----------
  ; fn ?  line 39-41 np=2 va=0 ms=3 code=3 consts=2 upvals=0 protos=0
  ;   K[0]='m_textComp'
  ;   K[1]='text'
  ;   locals: self(0-3), text(0-3)
  0000  GETTABLE  R2 = R0[K0('m_textComp')]
  0001  SETTABLE  R2[K1('text')] = R1
  0002  RETURN    return R0..R-1
; ---------- proto7 [SetInteractable] ----------
  ; fn ?  line 43-49 np=2 va=0 ms=3 code=10 consts=2 upvals=0 protos=0
  ;   K[0]='m_switchBtn'
  ;   K[1]='interactable'
  ;   locals: self(0-10), interactable(0-10)
  0000  GETTABLE  R2 = R0[K0('m_switchBtn')]
  0001  TEST      if not R2 then   -> -131069
  0002  JMP       (jump)   -> 9
  0003  GETTABLE  R2 = R0[K0('m_switchBtn')]
  0004  GETTABLE  R2 = R2[K1('interactable')]
  0005  EQ        if R1 eq R1   -> -130040
  0006  JMP       (jump)   -> 9
  0007  GETTABLE  R2 = R0[K0('m_switchBtn')]
  0008  SETTABLE  R2[K1('interactable')] = R1
  0009  RETURN    return R0..R-1
