// Update is called once per frame protected void Update() { //延迟获取技能UI条 if (SkillUI == null) { GameObject UIbar = GameObject.Find(UiBarName.ToString()); if (UIbar == null) { return; } SkillUI = UIbar.GetComponent <SkillBar>(); SkillUI.Initialize(SkillIcon); return; } if (Input.GetKeyDown(hotKey) && !SkillInCd) { DoSkillBody(); SkillInCd = true; Debug.Log("CD is begin" + System.DateTime.Now); Invoke("SkillCdOver", Skill_Cd); SkillUI.EnterSkillCd(Skill_Cd); } if (Input.GetKeyUp(hotKey)) { CancleSkillBody(); } }