Esempio n. 1
0
    /// <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);
    }
Esempio n. 2
0
    private void OnClickSetting(EventContext context)
    {
        var data = UserData as ShopData;

        SetShopPriceCommand.Do(data.Id, Price);
    }