public bool UseSkill(SkillNode node, string skillType = "") { // Debug.LogError(Time.realtimeSinceStartup + " " + name + " use " + skillType + " skill id " + node.skill_id); int indx = (int)node.site; if (thisCs == CharacterManager.playerCS && FightTouch._instance != null && FightTouch._instance.gameObject.activeSelf) { if (FightTouch._instance.GetSkillBtn(indx).isCD) { return(false); } FightTouch._instance.GetSkillBtn(indx).StartCd(); } if (node.IsSerialSkill()) { float totalCD = UseSerialSkill(node); StartAllSkillCD(totalCD + 0.5f); } else { UseNormalSkill(node); StartAllSkillCD(); } if (skillsCDOver.Contains(node)) { skillsCDOver.Remove(node); //if(thisCs.state == Modestatus.Player) // Debug.LogError("use and remove " + node.skill_id + "| count is " + skillsCDOver.Count); } CDTimer.GetInstance().AddCD(node.cooling, (int count, long cid) => { AddSkill(node); }); return(true); }