コード例 #1
0
    /// <summary>
    /// This function is called when the behaviour becomes disabled or inactive.
    /// </summary>
    void OnDisable()
    {
        if (PlayerManager.HasInstance())
        {
            PlayerManager.Instance().onDamaged -= OnDamaged;
        }

        if (TopMostControl.HasInstance())
        {
            TopMostControl.Instance().onCameraShake -= CameraShake_Rot;
        }
    }
コード例 #2
0
    private void OnDestroy()
    {
        if (playerStatus != null)
        {
            playerStatus.onChangePlayerStatus -= OnChangePlayerStatus;
        }

        if (TopMostControl.HasInstance())
        {
            TopMostControl.Instance().onClickGameOverMenu -= OnClickGameOverMenu;
        }
    }
コード例 #3
0
    private void OnDestroy()
    {
        if (flickController != null)
        {
            flickController.onPointerUp   -= OnPointerUp;
            flickController.onPointerDown -= OnPointerDown;
        }

        if (PlayerManager.HasInstance())
        {
            PlayerManager.Instance().onDeath            -= OnDeath;
            PlayerManager.Instance().onFinishAirTime    -= OnFinishAirTime;
            PlayerManager.Instance().onChangePlayerSkin -= OnChangePlayerSkin;
        }

        if (TopMostControl.HasInstance())
        {
            TopMostControl.Instance().onClickReturn       -= OnClickReturnButton;
            TopMostControl.Instance().onClickGameOverMenu -= OnClickGameOverMenu;
        }
    }