Exemple #1
0
 private void Update()
 {
     if (Input.GetKeyDown(KeyCode.KeypadPlus))
     {
         FixPoint.IncreaseDifficulty();
         ReloadScene();
     }
     if (Input.GetKeyDown(KeyCode.KeypadMinus))
     {
         FixPoint.DecreaseDifficulty();
         ReloadScene();
     }
 }
Exemple #2
0
        private void TryInteractNearby()
        {
            Debug.Log("Trying to fix nearby");
            Collider[] fixPointCols = Physics.OverlapSphere(transform.position, 2f, fixPointLayer.value);

            foreach (Collider fixPointCol in fixPointCols)
            {
                FixPoint fixPoint = fixPointCol.GetComponent <FixPoint>();
                if (fixPoint != null)
                {
                    fixPoint.Fix();
                    Debug.Log("Fixed nearby");
                }
                else
                {
                    Ressuply ressuply = fixPointCol.GetComponent <Ressuply>();
                    if (ressuply != null)
                    {
                        ressuply.RessuplyAstronaut(this);
                    }
                }
            }
        }