Пример #1
0
 public void SetCallbacks(IAttackActions instance)
 {
     if (m_Wrapper.m_AttackActionsCallbackInterface != null)
     {
         @ShootPrimary.started     -= m_Wrapper.m_AttackActionsCallbackInterface.OnShootPrimary;
         @ShootPrimary.performed   -= m_Wrapper.m_AttackActionsCallbackInterface.OnShootPrimary;
         @ShootPrimary.canceled    -= m_Wrapper.m_AttackActionsCallbackInterface.OnShootPrimary;
         @ShootSecondary.started   -= m_Wrapper.m_AttackActionsCallbackInterface.OnShootSecondary;
         @ShootSecondary.performed -= m_Wrapper.m_AttackActionsCallbackInterface.OnShootSecondary;
         @ShootSecondary.canceled  -= m_Wrapper.m_AttackActionsCallbackInterface.OnShootSecondary;
         @Special.started          -= m_Wrapper.m_AttackActionsCallbackInterface.OnSpecial;
         @Special.performed        -= m_Wrapper.m_AttackActionsCallbackInterface.OnSpecial;
         @Special.canceled         -= m_Wrapper.m_AttackActionsCallbackInterface.OnSpecial;
         @ToggleAim.started        -= m_Wrapper.m_AttackActionsCallbackInterface.OnToggleAim;
         @ToggleAim.performed      -= m_Wrapper.m_AttackActionsCallbackInterface.OnToggleAim;
         @ToggleAim.canceled       -= m_Wrapper.m_AttackActionsCallbackInterface.OnToggleAim;
     }
     m_Wrapper.m_AttackActionsCallbackInterface = instance;
     if (instance != null)
     {
         @ShootPrimary.started     += instance.OnShootPrimary;
         @ShootPrimary.performed   += instance.OnShootPrimary;
         @ShootPrimary.canceled    += instance.OnShootPrimary;
         @ShootSecondary.started   += instance.OnShootSecondary;
         @ShootSecondary.performed += instance.OnShootSecondary;
         @ShootSecondary.canceled  += instance.OnShootSecondary;
         @Special.started          += instance.OnSpecial;
         @Special.performed        += instance.OnSpecial;
         @Special.canceled         += instance.OnSpecial;
         @ToggleAim.started        += instance.OnToggleAim;
         @ToggleAim.performed      += instance.OnToggleAim;
         @ToggleAim.canceled       += instance.OnToggleAim;
     }
 }
Пример #2
0
 public void SetCallbacks(IAttackActions instance)
 {
     if (m_Wrapper.m_AttackActionsCallbackInterface != null)
     {
         @Shoot.started   -= m_Wrapper.m_AttackActionsCallbackInterface.OnShoot;
         @Shoot.performed -= m_Wrapper.m_AttackActionsCallbackInterface.OnShoot;
         @Shoot.canceled  -= m_Wrapper.m_AttackActionsCallbackInterface.OnShoot;
     }
     m_Wrapper.m_AttackActionsCallbackInterface = instance;
     if (instance != null)
     {
         @Shoot.started   += instance.OnShoot;
         @Shoot.performed += instance.OnShoot;
         @Shoot.canceled  += instance.OnShoot;
     }
 }
Пример #3
0
 public void SetCallbacks(IAttackActions instance)
 {
     if (m_Wrapper.m_AttackActionsCallbackInterface != null)
     {
         @attack.started          -= m_Wrapper.m_AttackActionsCallbackInterface.OnAttack;
         @attack.performed        -= m_Wrapper.m_AttackActionsCallbackInterface.OnAttack;
         @attack.canceled         -= m_Wrapper.m_AttackActionsCallbackInterface.OnAttack;
         @charge_attack.started   -= m_Wrapper.m_AttackActionsCallbackInterface.OnCharge_attack;
         @charge_attack.performed -= m_Wrapper.m_AttackActionsCallbackInterface.OnCharge_attack;
         @charge_attack.canceled  -= m_Wrapper.m_AttackActionsCallbackInterface.OnCharge_attack;
     }
     m_Wrapper.m_AttackActionsCallbackInterface = instance;
     if (instance != null)
     {
         @attack.started          += instance.OnAttack;
         @attack.performed        += instance.OnAttack;
         @attack.canceled         += instance.OnAttack;
         @charge_attack.started   += instance.OnCharge_attack;
         @charge_attack.performed += instance.OnCharge_attack;
         @charge_attack.canceled  += instance.OnCharge_attack;
     }
 }