Exemple #1
0
    private void Update()
    {
        if (vCamera.Follow == null)
        {
            vCamera.Follow = PlayerChoices.FindGaiosComponent <MonoBehaviour>().transform;
        }

        vCamera.m_Lens.OrthographicSize = PlayerChoices.Instance.hasFullVision ? wideZoom : closeZoom;
    }
Exemple #2
0
 // Update is called once per frame
 void Update()
 {
     if (trackGaios && trackerToDisplay == null)
     {
         trackerToDisplay = PlayerChoices.FindGaiosComponent <HealthTracker>();
     }
     if (trackerToDisplay != null)
     {
         text.text = string.Format("{0}/{1}", trackerToDisplay.currentHealth, trackerToDisplay.maxHealth);
     }
 }
 // Update is called once per frame
 void Update()
 {
     if (trackGaios && trackerToDisplay == null)
     {
         trackerToDisplay = PlayerChoices.FindGaiosComponent <HealthTracker>();
     }
     if (trackerToDisplay != null)
     {
         float percentage = trackerToDisplay.currentHealth / trackerToDisplay.maxHealth;
         myRect.anchorMax = new Vector2(percentage, myRect.anchorMax.y);
     }
 }