/// <summary> /// 接受普攻响应 /// </summary> /// <param name="fromId"></param> /// <param name="targetId"></param> private void OnAttack(int fromId, int targetId) { //释放者控制器 BaseControl formCon = idControlDict[fromId]; //被攻击者控制器 BaseControl TargetCon = idControlDict[targetId]; //调用攻击方法 formCon.AttackResponse(TargetCon.transform); }
/// <summary> /// 接收到普攻的响应 /// </summary> /// <param name="fromId"></param> /// <param name="toId"></param> private void onAttack(int fromId, int toId) { //使用者控制器 BaseControl fromCon = idControlDict[fromId]; //目标控制器 BaseControl toCon = idControlDict[toId]; //调用攻击方法 fromCon.AttackResponse(toCon.transform); }