GetThrusterFuelAmount() public method

public GetThrusterFuelAmount ( ) : float
return float
Ejemplo n.º 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);
        }
    }
Ejemplo n.º 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);
        }
    }
Ejemplo n.º 3
0
 void Update()
 {
     SetFuelAmount(controller.GetThrusterFuelAmount());
     if (Input.GetKeyDown(KeyCode.Escape))
     {
         TogglePauseMenu();
     }
 }
Ejemplo n.º 4
0
 void Update()
 {
     SetFuelAmount(controller.GetThrusterFuelAmount());
     SetHealthAmount(player.GetHealthPct());
     if (weaponManager != null && weaponManager.GetCurrentWeapon() != null)
     {
         SetAmmoAmount(weaponManager.GetCurrentWeapon().bullets);
     }
 }
Ejemplo n.º 5
0
    void Update()
    {
        SetHealthAmount(player.GetHealthPct());
        SetFuelAmount(controller.GetThrusterFuelAmount());
        SetAmmoAmount(weaponManager.GetCurrentWeapon().bullets);

        if (Input.GetKeyDown(KeyCode.Escape))
        {
            TogglePauseMenu();
        }
    }
Ejemplo n.º 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);
        }
    }
Ejemplo n.º 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);
        }
    }
Ejemplo n.º 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);
        }
    }
Ejemplo n.º 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);
            }
        }
    }
Ejemplo n.º 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);
        }
    }
Ejemplo n.º 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");
        }
    }
Ejemplo n.º 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();
        }
    }
Ejemplo n.º 13
0
 void Update()
 {
     SetFuelAmount(controller.GetThrusterFuelAmount());
     SetHealthAmount(player.GetHealthPercentage());
     SetIconsState();
 }
Ejemplo n.º 14
0
 private void Update()
 {
     SetFuelAmount(controller.GetThrusterFuelAmount());
     SetHealthAmount(player.GetCurHealth());
 }
Ejemplo n.º 15
0
 void Update()
 {
     SetFuelAmount(_controller.GetThrusterFuelAmount());
     SetHealthAmount(_player.GetHealthPct());
     SetAmmoAmount(_weaponManager.GetCurrentWeapon().bullets);
 }
Ejemplo n.º 16
0
 void Update()
 {
     SetFuelAmount(controller.GetThrusterFuelAmount());
 }
Ejemplo n.º 17
0
 void Update()
 {
     // Set the fuel.
     SetFuelAmount(controller.GetThrusterFuelAmount());
 }