static StackObject *set_Position_0(ILIntepreter __intp, StackObject *__esp, IList <object> __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject *ptr_of_this_method; StackObject *__ret = ILIntepreter.Minus(__esp, 2); ptr_of_this_method = ILIntepreter.Minus(__esp, 1); UnityEngine.Vector3 @value = (UnityEngine.Vector3) typeof(UnityEngine.Vector3).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack)); __intp.Free(ptr_of_this_method); ptr_of_this_method = ILIntepreter.Minus(__esp, 2); ETModel.Tank instance_of_this_method = (ETModel.Tank) typeof(ETModel.Tank).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack)); __intp.Free(ptr_of_this_method); instance_of_this_method.Position = value; return(__ret); }
/// <summary> /// 如果是自己打中了别的坦克才发送 /// </summary> /// <param name="targetId"></param> /// <param name="damage"></param> private async ETVoid Send_C2B_AttackTank(long targetId, int damage) { C2B_AttackTankRequest msg = new C2B_AttackTankRequest(); msg.SourceTankId = PlayerComponent.Instance.MyPlayer.TankId; msg.TargetTankId = targetId; msg.Damage = damage; B2C_AttackTankResponse response = (B2C_AttackTankResponse)await SessionComponent.Instance.Session.Call(msg); if (response.SourceTankId != msg.SourceTankId || response.TargetTankId != msg.TargetTankId) { Log.Error("回包错误"); } ETModel.Tank tank = Game.Scene.GetComponent <TankComponent>().Get(targetId); tank.GetComponent <NumericComponent>().Set(NumericType.HpBase, response.CurrentHp); }