//Speed does not have a bool value since it can be change runtime without recreate everything public void ChangeSpeed() { Text text = SpeedUI.GetComponent <Text>(); Slider slider = SpeedUI.transform.GetChild(0).GetComponent <Slider>(); timer = 2 - slider.value; text.text = "Speed: " + slider.value; }
// Start is called before the first frame update void Start() { so = SocketObject.Instance; dw = DataWorker.Instance; gm = GameManager.Instance; a = AttackUI.GetComponent <filledImage> (); d = DiffenceUI.GetComponent <filledImage> (); s = SpeedUI.GetComponent <filledImage> (); }