void SendBattleOpera(EBattleOperation opera, ulong targetId, Vector3 pos) { BattleOperation msg = new BattleOperation(); msg.Opera = opera; msg.TargetId = targetId; if (null != pos) { msg.Pos = new PBVector2() { X = pos.x, Y = pos.z }; Vector3 tmp_dir = pos - mainHero.pos; msg.Dir = Vector2.SignedAngle(Vector2.up, new Vector2(tmp_dir.x, tmp_dir.z)); } if (null != pos) { } App.my.gameNetwork.Send(ProtoId.PidBattleOperaReq, msg); }
void SendBattleOpera(EBattleOperation opera, ulong targetId) { this.SendBattleOpera(opera, targetId, new Vector3()); }
void SendBattleOpera(EBattleOperation opera) { this.SendBattleOpera(opera, 0, new Vector3()); }