public void onDllGetOver()
    {
        // 优先使用热更新的代码
        if (ILRuntimeUtil.getInstance().checkDllClassHasFunc("LoginScript_hotfix", "onDllGetOver"))
        {
            ILRuntimeUtil.getInstance().getAppDomain().Invoke("HotFix_Project.LoginScript_hotfix", "onDllGetOver", null, null);
            return;
        }

        {
            // 禁止多点触摸
            Input.multiTouchEnabled = false;

            // 永不息屏
            Screen.sleepTimeout = SleepTimeout.NeverSleep;

            OtherData.s_screenSize = new Vector2(Screen.width, Screen.height);

            // 安卓回调
            AndroidCallBack.s_onPauseCallBack  = onPauseCallBack;
            AndroidCallBack.s_onResumeCallBack = onResumeCallBack;
        }

        ToastScript.clear();

        {
            GameUtil.hideGameObject(m_debugLog);

            // 用于打印屏幕日志
            m_debugLogScript = m_debugLog.GetComponent <DebugLogScript>();
        }

        m_inputAccount.text  = PlayerPrefs.GetString("account", "");
        m_inputPassword.text = PlayerPrefs.GetString("password", "");

        Set3rdLogin();
        setLogonTypeUI();

        if (!OtherData.s_isFromSetToLogin)
        {
            m_healthTipPanel.transform.localScale = new Vector3(1, 1, 1);
            showHealth();
        }
        else
        {
            NetLoading.getInstance().Show();

            // 获取数值表
            OtherData.s_getNetEntityFile.getNetFile();
        }
    }
Esempio n. 2
0
    public void ResetPlayerScreen()
    {
        DebugLogScript      debugLog      = GetComponentInChildren <DebugLogScript>();
        TimeDisplayScript   timeDisplay   = GetComponentInChildren <TimeDisplayScript>();
        WeaponDisplayScript weaponDisplay = GetComponentInChildren <WeaponDisplayScript>();

        if (debugLog != null)
        {
            debugLog.ClearLog();
        }
        if (debugLog != null)
        {
            timeDisplay.ResetTime();
        }
        if (debugLog != null)
        {
            weaponDisplay.DisplayWeapon("");
        }
    }
Esempio n. 3
0
    // private bool isGrounded = true;

    // Awake is called once before the Start method
    void Awake()
    {
        // Detect user input
        playerControls = new PlayerControls();
        playerControls.Movement.Jump.performed += _ => Jump();

        // Debug commands
        if (GameManager.DebugMode)
        {
            debugLog = FindObjectOfType <DebugLogScript>();
            playerControls.Debug.ToggleSwitchTimer.performed += _ => DebugToggleTimer();
            playerControls.Debug.HealthDecrease.performed    += _ => DebugTakeDamage(10);
            playerControls.Debug.HealthIncrease.performed    += _ => DebugAddHealth(10);
            playerControls.Debug.SummonHandGun.performed     += _ => ActivateWeapon(0);
            playerControls.Debug.SummonLaserGun.performed    += _ => ActivateWeapon(1);
            playerControls.Debug.SummonSword.performed       += _ => ActivateWeapon(2);
            playerControls.Debug.SummonBanana.performed      += _ => ActivateWeapon(3);
            playerControls.Debug.SummonBoomerang.performed   += _ => ActivateWeapon(4);
            // playerControls.Debug.SummonShield.performed += _ => ActivateWeapon(5);
        }
    }