Пример #1
0
    void FixedUpdate()
    {
        Image                 NoteImage = NotesUIImage.GetComponent <Image>();
        CrosshairGUI          Crosshair = Camera.main.GetComponent <CrosshairGUI>();
        FirstPersonController FPSComp   = FPSScript.GetComponent <FirstPersonController>();

        if (showNote)
        {
            NoteImage.enabled = true;
            Crosshair.enabled = false;
            UI.SetActive(true);
            this.GetComponent <Renderer>().enabled = false;
            this.GetComponent <Collider>().enabled = false;
            FPSComp.enabled = false;
        }

        if (backNote)
        {
            NoteImage.enabled = false;
            Crosshair.enabled = true;
            UI.SetActive(false);
            Crosshair.m_DefaultReticle = true;
            Crosshair.m_UseReticle     = false;
            FPSComp.enabled            = true;
            Remove();
        }
    }
Пример #2
0
    public void RunStart()
    {
        if (mpReferenceOnly)
        {
            return;
        }

        PlayerReference pr = GeneralVariables.playerRef;

        pl  = pr.GetComponent <PlayerLook>();
        pm  = pr.GetComponent <PlayerMovement>();
        wm  = pr.wm;
        dm  = pr.dm;
        ac  = pr.ac;
        acs = pr.acs;
        tss = firePos.GetComponent <TimeScaleSound>();

        UIController uiController = GeneralVariables.uiController;

        curAmmoDisplay  = uiController.curAmmoDisplay;
        ammoLeftDisplay = uiController.ammoLeftDisplay;
        ammoBar         = uiController.ammoBar;
        crosshair       = uiController.crosshairs;

        if (muzzleLight != null)
        {
            muzzleBrightness = muzzleLight.intensity;
        }

        initializeTime = Time.time;
        PoolManager.Instance.Initialize();
        gunVisuals       = GetComponent <GunVisuals>();
        shootImpulseGUI  = 1f;
        reloadImpulseGUI = 1f;

        pa       = GetComponent <PistolAnim>();
        maxIndex = 2;
        SwitchFiringMethod();
        flashlightOn  = false;
        startCounting = false;
        fireCount     = 0;
        asm           = 1f;
        spreadReal    = baseSpreadAmount;
        bsna          = baseSpreadAmount;
    }