示例#1
0
 public Potion(PotionSO potion)
 {
     Name      = potion.Name;
     Type      = potion.Type;
     Value     = potion.Value;
     Price     = potion.Price;
     MaxInCell = potion.MaxInCell;
     HPRestore = potion.HPRestore;
     MPRestore = potion.MPRestore;
     XPBonus   = potion.XPBonus;
 }
示例#2
0
    private static void ThrowPotion(PlayerStats player, PotionSO potion)
    {
        Vector2Int TargetPos = Targeting.Position;

        for (int x = -1; x <= 1; x++)
        {
            for (int y = -1; y <= 1; y++)
            {
                try
                {
                    Tile t = MapManager.map[TargetPos.x + x, TargetPos.y + y];

                    /*if (MapManager.map[TargetPos.x + x, TargetPos.y + y].hasPlayer)
                     * {
                     *  potion.Use(player, Info.CurrentItem);
                     * }*/
                }
                catch (System.Exception)
                {
                }
            }
        }
    }
示例#3
0
 public Potion(PotionSO potionData) : base(new Item(potionData.itemID, potionData.itemName, 0), potionData.isStackable, potionData.itemSprite)
 {
 }