protected override void onEnter(TBTWorkingData wData) { BattleBehaviorWorkingData behaviorData = wData as BattleBehaviorWorkingData; BattleUnit source = behaviorData.owner; Ability ability = source.SelectCastableAbility(); BattleLog.Log("【NOD_CastAbility】onEnter {0}", ability.GetConfigName()); source.CastAbility(ability); }
private void OnCastAbility(AbilityCastType castType) { if (m_PlayerUnit != null) { Ability ability = m_PlayerUnit.GetAbility(castType); if (ability.CD > 0) { GameLog.Log("冷却中"); return; } m_PlayerUnit.CastAbility(ability); } }