public void setState(Enums.SelectorState newState) { if (newState == Enums.SelectorState.Free) { Color color = GetComponent <SpriteRenderer> ().color; color.a = 1; renderer.material.color = color; } if (newState == Enums.SelectorState.Blocked) { Color color = GetComponent <SpriteRenderer> ().color; color.a = 0; renderer.material.color = color; } state = newState; }
public void setState (Enums.SelectorState newState) { if (newState == Enums.SelectorState.Free) { Color color = GetComponent<SpriteRenderer> ().color; color.a = 1; renderer.material.color = color; } if (newState == Enums.SelectorState.Blocked) { Color color = GetComponent<SpriteRenderer> ().color; color.a = 0; renderer.material.color = color; } state = newState; }