public void AddLifeClick() { string lifeValue = playerCurrentLifeName.text.Trim(); if (string.IsNullOrEmpty(lifeValue)) { GetComponentInParent <RootEditGameView>().errorMessage.ShowMessage("设定的命值不能为空!", SoundType.Error); return; } string bulletCountValue = playerBulletCountInput.text.Trim(); if (string.IsNullOrEmpty(bulletCountValue)) { GetComponentInParent <RootEditGameView>().errorMessage.ShowMessage("设定的弹量不能为空!", SoundType.Error); return; } RestFulProxy.AddLife(lifeValue, bulletCountValue, userId.ToString(), (result) => { }); GetComponentInParent <RootEditGameView>().errorMessage.ShowMessage("操作成功", SoundType.Success); ShowOrHide(false); }