This commit is contained in:
JA
2026-06-20 19:34:23 +08:00
parent e5031c0068
commit d442805c3f
4136 changed files with 514641 additions and 0 deletions

View File

@@ -0,0 +1,33 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Item
{
public int Id { get; set; }
public string ItemName { get; set; }
public string Descripte;
public ItemClass type;
public LotteryType lotteryType;
public string Path { get; set; }
public int value;
public void UseItem(Item item)
{
switch(item.lotteryType)
{
case LotteryType.Hp:
Debug.LogFormat("UseItem:[{0}],AddHp {1}",item.Id,item.value);
PlayerInfo.Instance.AddHp(item.value);
break;
case LotteryType.Attack:
Debug.LogFormat("UseItem:[{0}],AddAttack {1}", item.Id,value);
PlayerInfo.Instance.AddAttack(item.value);
break;
case LotteryType.Mp:
Debug.LogFormat("UseItem:[{0}],AddMp {1}", item.Id,item.value);
PlayerInfo.Instance.AddMp(item.value);
break;
}
}
}