Compare commits

..

No commits in common. "3f9f887c4113528dfcbe3071c88fcf83f878d557" and "4e37f6c8f03a6d20a5010ecdd8a57f1b09b49494" have entirely different histories.

3 changed files with 6 additions and 2 deletions

View File

@ -261,7 +261,7 @@ public class Interactions : NetworkBehaviour
_lightIntensity = Mathf.Lerp(_lightIntensity, (_gunSpread < Time.time) && (controller.currentEnergy >= controller.shootDepletion) ? 1f : 0f, Time.deltaTime * 5f);
if (gunLayerWeight == 1) gun.SetActive(true);
if (gunRig.weight <= 0.1 || controller.currentEnergy <= 0) gun.SetActive(false);
if (gunRig.weight <= 0.1) gun.SetActive(false);
if (gun != null)
{

View File

@ -214,7 +214,10 @@ namespace StarterAssets
{
if (Input.GetKey(KeyCode.LeftShift) && _inputMove.magnitude != 0)
{
currentEnergy = Mathf.MoveTowards(currentEnergy, 0, _depletionSpeed * Time.deltaTime);
if (currentEnergy > 0)
{
currentEnergy = Mathf.MoveTowards(currentEnergy, 0, _depletionSpeed * Time.deltaTime);
}
}
else if (currentEnergy <= _maxEnergy)
{

View File

@ -8,6 +8,7 @@ using TMPro;
public class NetworkManagerUI : MonoBehaviour
{
public NetworkManager manager;
public GameObject adressInputGO;
public TMP_InputField adressInput;
public TMP_InputField nicknameInput;
public TMP_InputField MaxPlayersInput;