improve Highlight
This commit is contained in:
@@ -4,11 +4,12 @@ using UnityEngine;
|
||||
public class Hightlight : MonoBehaviour
|
||||
{
|
||||
[SerializeField]
|
||||
private Color color = new Color(147, 142, 142, 1);
|
||||
private Color color = Color.white;
|
||||
|
||||
private Renderer[] renderers;
|
||||
//helper list to cache all the materials ofd this object
|
||||
private List<Material> materials;
|
||||
private const float INTENSITY = .15f;
|
||||
|
||||
//Gets all the materials from each renderer
|
||||
private void Awake()
|
||||
@@ -21,6 +22,7 @@ public class Hightlight : MonoBehaviour
|
||||
//that is why we need to all materials with "s"
|
||||
materials.AddRange(new List<Material>(renderer.materials));
|
||||
}
|
||||
color = color * INTENSITY;
|
||||
}
|
||||
|
||||
public void ToggleHighlight(bool val)
|
||||
|
||||
@@ -11,8 +11,8 @@ public class TimeSystem
|
||||
|
||||
private TimeSpan _startTime = new TimeSpan(1, 08, 00, 00);
|
||||
|
||||
private float _sunriseHour;
|
||||
private float _sunsetHour;
|
||||
private float _sunriseHour=8;
|
||||
private float _sunsetHour=20;
|
||||
|
||||
private TimeSpan _sunriseTime;
|
||||
private TimeSpan _sunsetTime;
|
||||
|
||||
@@ -20,10 +20,10 @@ public class TopBarUI : MonoBehaviour
|
||||
[SerializeField]
|
||||
public Slider _food;
|
||||
|
||||
|
||||
// Start is called before the first frame update
|
||||
private void Start()
|
||||
private void Awake()
|
||||
{
|
||||
GameManager.Instance.Time.OnMinuteChanged -= UpdateTime;
|
||||
GameManager.Instance.Time.OnMinuteChanged += UpdateTime;
|
||||
}
|
||||
|
||||
@@ -37,7 +37,6 @@ public class TopBarUI : MonoBehaviour
|
||||
{
|
||||
_moneyText.text = $"${(Player.Instance.Stats[StatsId.Money] as INumericStat).Value}";
|
||||
_locationText.text= $"{(Player.Instance.Stats[StatsId.LocationName] as IStringStat).Value}";
|
||||
|
||||
}
|
||||
|
||||
private void UpdateTime()
|
||||
|
||||
Reference in New Issue
Block a user