public void UpdateModel() { model = ActorModel.Model.equip_skil[skill_joy_stick_id]; if (model == null) { isDisable = true; skill_image.gameObject.SetActive(false); } else { isDisable = false; skill_image.gameObject.SetActive(true); skill_image.sprite = model._config.GetSprite(); cool_timer = model.GetCoolTime(); if (model._config.skill_type == SkillType.点击) { isDrag = false; } else { isDrag = true; } } }
private void Update() { if (isCoolDown) { isDisable = true; cool_timer -= Time.fixedDeltaTime; cool_mask_image.fillAmount = (float)(cool_timer / model.GetCoolTime()); cool_mask_image.GetComponentInChildren <Text>().text = cool_timer.ToString("f1") + "s"; if (cool_timer <= 0) { cool_mask_image.GetComponentInChildren <Text>().text = ""; cool_timer = model.GetCoolTime(); if (!no_enrgy_mask_image.gameObject.activeSelf) { isDisable = false; } isCoolDown = false; } } }