/// <summary> /// 创建指令 /// </summary> public static void Do(int shopId, int newPrice) { var command = new SetShopPriceCommand(); command.NewPrice = newPrice; command.ShopId = shopId; var sequence = GameEntry.Command.Sequence(); sequence.AppendCommand(command); sequence.AppendCommand(new DataUpdatedCommand()); sequence.AppendResultHandler(command.HandleResult); }
private void OnClickSetting(EventContext context) { var data = UserData as ShopData; SetShopPriceCommand.Do(data.Id, Price); }