Cute_demon_attacks/meng_yao/Assets/script/ConnactServer/InitInfo.cs
2024-10-31 02:49:53 +08:00

73 lines
2.1 KiB
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class InitInfo : MonoBehaviour
{
// Start is called before the first frame update
private async void Start()
{
string response = await web.SendRequest("http://47.109.133.52/Item/GetList", "POST");
Debug.Log(response);
}
// Update is called once per frame
void Update()
{
}
}
/// <summary>
/// 获取所有商品数据
/// </summary>
public class LevelUpNeedItem
{
public int Num;
public int Count;
}
public class LevelUpNeedThing
{
public int Gold;
public List<LevelUpNeedItem> Items;
}
public class Character
{
public int Num; // 角色编号
public string Name; // 角色名称
public float Hp; // 生命值
public float HpUpMul; // 生命值成长倍率
public float Attack; // 攻击力
public float AttackUpMul; // 攻击力成长倍率
public float Defense; // 防御力
public float DefenseUpMul; // 防御力成长倍率
public float AttackSpeed; // 攻击速度
public float AttackSpeedUpMul; // 攻击速度成长倍率
public float Move; // 移动速度
public float MoveUpMul; // 移动速度成长倍率
public List<int> Skill; // 技能ID列表
public int Attribute; // 角色属性
public string LevelUpNeedThingsJson; // 升级所需物品的JSON字符串
public string Expand; // 扩展字段(用于未来扩展或附加数据)
public int Type; // 角色类型
public int Rarity; // 角色稀有度
public string WeaponBulletEffectPath; // 武器子弹效果路径
public string WeaponBulletHitEffectPath; // 武器子弹命中效果路径
public int UltimateSkill; // 终极技能ID
public int Access; // 获取途径或可用性
public List<string> SellDate; // 售卖日期列表(如果适用)
}
public class CharacterListResponse
{
public List<Character> List;
public int ErrorCode;
public string ErrorMessage;
}