public virtual void Deselect() { IsSelected = false; IsFocused = false; MatPropBlock.SetColor(ColorTint, StartColor); Renderers.ForEach(renderer => { renderer.SetPropertyBlock(MatPropBlock); }); }
public virtual void TryHighlight(Color highlightColor) { if (!IsSelected) { MatPropBlock.SetColor(ColorTint, highlightColor); Renderers.ForEach(renderer => { renderer.SetPropertyBlock(MatPropBlock); }); } }
public virtual void Select(Color selectionColor) { Timing.KillCoroutines(CoroutineName); jiggleAnim.Animate(CoroutineName); SFXManager.Instance.Play(SFXType.PLEPlaceObject, transform.position); IsSelected = true; MatPropBlock.SetColor(ColorTint, selectionColor); Renderers.ForEach(renderer => { renderer.SetPropertyBlock(MatPropBlock); }); }