GetThrusterFuelAmount() публичный Метод

public GetThrusterFuelAmount ( ) : float
Результат float
Пример #1
0
    void Update()
    {
        if (type == 1)
        {
            SetFuelAmount(controller1.GetThrusterFuelAmount());
        }
        else if (type == 2)
        {
            SetFuelAmount(controller2.GetThrusterFuelAmount());
        }

        //health
        SetHealthAmount(car.GetHealthPercentage());
        //ammo
        SetAmmoAmount(weaponManager.GetCurrentWeapon().bullets, weaponManager.GetCurrentWeapon().maxBullets);


        if (Input.GetKeyDown(KeyCode.Escape))
        {
            TogglePauseMenu();
        }

        if (Input.GetKeyDown(KeyCode.Tab))
        {
            scoreBoard.SetActive(true);
        }
        else if (Input.GetKeyUp(KeyCode.Tab))
        {
            scoreBoard.SetActive(false);
        }
    }
Пример #2
0
    private void Update()
    {
        if (player.isLocalPlayer)
        {
            Vector3 newPosition = player.transform.position;
            newPosition.y = player.transform.position.y + 10;
            minimapCamera.transform.position = newPosition;
        }

        SetFuelAmount(controller.GetThrusterFuelAmount());
        SetHealthAmount(player.GetHealthPct());
        SetAmmoAmount(weaponManager.GetCurrentWeapon().bullets);

        if (Input.GetKeyDown(KeyCode.Escape))
        {
            TogglePauseMenu();
        }

        if (Input.GetKeyDown(KeyCode.Tab))
        {
            scoreboard.SetActive(true);
        }
        else if (Input.GetKeyUp(KeyCode.Tab))
        {
            scoreboard.SetActive(false);
        }
    }
Пример #3
0
 void Update()
 {
     SetFuelAmount(controller.GetThrusterFuelAmount());
     if (Input.GetKeyDown(KeyCode.Escape))
     {
         TogglePauseMenu();
     }
 }
Пример #4
0
 void Update()
 {
     SetFuelAmount(controller.GetThrusterFuelAmount());
     SetHealthAmount(player.GetHealthPct());
     if (weaponManager != null && weaponManager.GetCurrentWeapon() != null)
     {
         SetAmmoAmount(weaponManager.GetCurrentWeapon().bullets);
     }
 }
Пример #5
0
    void Update()
    {
        SetHealthAmount(player.GetHealthPct());
        SetFuelAmount(controller.GetThrusterFuelAmount());
        SetAmmoAmount(weaponManager.GetCurrentWeapon().bullets);

        if (Input.GetKeyDown(KeyCode.Escape))
        {
            TogglePauseMenu();
        }
    }
Пример #6
0
    private void Update()
    {
        SetFuelAmount(controller.GetThrusterFuelAmount());

        if (Input.GetKeyDown(KeyCode.Escape))
        {
            TogglePauseMenu();
        }

        if (Input.GetKeyDown(KeyCode.Tab))
        {
            scoreboard.SetActive(true);
        }
        else if (Input.GetKeyUp(KeyCode.Tab))
        {
            scoreboard.SetActive(false);
        }
    }
Пример #7
0
    void Update()
    {
        SetFuelAmount(controller.GetThrusterFuelAmount());
        SetHealthAmount(player.getHealthPerc());
        SetAmmoAmount(weaponManager.GetCurrWeapon().currBullets, weaponManager.GetCurrWeapon().maxBullets);

        if (Input.GetKeyDown(KeyCode.Escape))
        {
            TogglePauseMenu();
        }
        if (Input.GetKeyDown(KeyCode.Tab))
        {
            scoreBoard.SetActive(true);
        }
        else if (Input.GetKeyUp(KeyCode.Tab))
        {
            scoreBoard.SetActive(false);
        }
    }
Пример #8
0
    private void Update()
    {
        SetFuelAmount(controller.GetThrusterFuelAmount());
        SetHeathAmount(player.GetHeathPct());
        SetAmmoAmount(weaponManager.getCurrentWeapon().ammo);
        if (Input.GetKeyDown(KeyCode.Escape))
        {
            ToggelPauseMenu();
        }
        void SetFuelAmount(float _amount)
        {
            thrusterFuelFill.localScale = new Vector3(1f, _amount, 1f);
        }

        void SetHeathAmount(float _amount)
        {
            heathBarFill.localScale = new Vector3(1f, _amount, 1f);
        }
    }
Пример #9
0
    private void Update()
    {
        SetFuelAmount(controller.GetThrusterFuelAmount());
        SetHealthAmount(player.GetHealthPercentage());
        if (weaponManager.GetCurrentWeapon() != null)
        {
            if (weaponManager.isReloading)
            {
                SetAmmoCount(reloadText);
            }
            else
            {
                SetAmmoCount(weaponManager.GetCurrentWeapon().bullets, weaponManager.GetCurrentWeapon().maxBullets);
            }
        }

        if (Input.GetKeyDown(KeyCode.Escape))
        {
            TogglePauseMenu();
        }
        if (Input.GetKeyDown(KeyCode.Tab))
        {
            scoreboard.SetActive(true);
        }
        else if (Input.GetKeyUp(KeyCode.Tab))
        {
            scoreboard.SetActive(false);
        }

        if (weaponManager.currentWeaponIndex == 3)
        {
            if (Input.GetButtonDown("Fire2"))
            {
                scopeOverlay.SetActive(true);
            }
            else if (Input.GetButtonUp("Fire2"))
            {
                scopeOverlay.SetActive(false);
            }
        }
    }
Пример #10
0
    void Update()
    {
        SetFuelAmount(controller.GetThrusterFuelAmount());
        SetHealthAmount(player.GetHealthPct());
        SetAmmoAmount(weaponManager.GetCurrentWeapon().bullets);

        //Pause by using escape key
        if (Input.GetKeyDown(KeyCode.Escape))
        {
            TogglePauseMenu();
        }
        //enabling scoreboard view by pressing tab key
        if (Input.GetKeyDown(KeyCode.Tab))
        {
            scoreboard.SetActive(true);
        }
        else if (Input.GetKeyUp(KeyCode.Tab))
        {
            scoreboard.SetActive(false);
        }
    }
Пример #11
0
    void Update()
    {
        SetFuelAmount(controller.GetThrusterFuelAmount());
        SetHealthAmount(player.GetHealthPct());
        SetAmmoAmount(weaponManager.GetCurrentWeapon().bullets);

        if (Input.GetKeyDown(KeyCode.Escape))
        {
            TogglePauseMenu();
        }

        if (Input.GetKeyDown(KeyCode.Tab))
        {
            scoreboard.SetActive(true);
            //Debug.Log("Scoreboard is active");
        }
        else if (Input.GetKeyUp(KeyCode.Tab))
        {
            scoreboard.SetActive(false);
            //Debug.Log("Scoreboard is inactive");
        }
    }
Пример #12
0
    // Update is called once per frame
    void Update()
    {
        //TODO remove
        Debug.Log("Broadcasting " + OverrideNeworkDiscovery.singleton.broadcastData);


        //update thuster fuel level in UI
        SetFuelAmount(playerController.GetThrusterFuelAmount());

        //ScoreCard

        scorecard.SetActive(Input.GetButton("Tab"));
        if (Input.GetButton("Tab"))
        {
            updateScorecard();
        }

        //Pause Game
        if (Input.GetButtonDown("Cancel"))
        {
            PauseGame();
        }
    }
Пример #13
0
 void Update()
 {
     SetFuelAmount(controller.GetThrusterFuelAmount());
     SetHealthAmount(player.GetHealthPercentage());
     SetIconsState();
 }
Пример #14
0
 private void Update()
 {
     SetFuelAmount(controller.GetThrusterFuelAmount());
     SetHealthAmount(player.GetCurHealth());
 }
Пример #15
0
 void Update()
 {
     SetFuelAmount(_controller.GetThrusterFuelAmount());
     SetHealthAmount(_player.GetHealthPct());
     SetAmmoAmount(_weaponManager.GetCurrentWeapon().bullets);
 }
Пример #16
0
 void Update()
 {
     SetFuelAmount(controller.GetThrusterFuelAmount());
 }
Пример #17
0
 void Update()
 {
     // Set the fuel.
     SetFuelAmount(controller.GetThrusterFuelAmount());
 }