private void OnDisable() { if (PlayerInputs != null) { PlayerInputs.Disable(); } }
public void InitializeAstroid(TriggerSide side) { Side = side; PlayerInputs = new WorldTriggerInputs(); PlayerInputs.Disable(); if (Side == TriggerSide.Main) { PlayerInputs.Astroid.AstroidCancelMainTrigger.performed += ctx => OnAstroidCancelMainTrigger(ctx); PlayerInputs.Astroid.AstroidChargeMainTrigger.performed += ctx => OnAstroidChargeMainTrigger(ctx); PlayerInputs.Astroid.AstroidFireMainTrigger.performed += ctx => OnAstroidFireMainTrigger(ctx); } else { PlayerInputs.Astroid.AstroidCancelSubTrigger.performed += ctx => OnAstroidCancelSubTrigger(ctx); PlayerInputs.Astroid.AstroidChargeMainTrigger.performed += ctx => OnAstroidChargeSubTrigger(ctx); PlayerInputs.Astroid.AstroidFireMainTrigger.performed += ctx => OnAstroidFireSubTrigger(ctx); } PlayerInputs.Astroid.Reload.performed += ctx => OnReload(ctx); }
private void OnDisable() { PlayerInputs.Disable(); }