82 lines
1.7 KiB
C#
82 lines
1.7 KiB
C#
using System;
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using System.Text.RegularExpressions;
|
|
using UnityEngine;
|
|
|
|
namespace SimpleInventorySystem
|
|
{
|
|
public enum ItemTags
|
|
{
|
|
Any,
|
|
Helmet,
|
|
Headset,
|
|
Glasses,
|
|
FaceCover,
|
|
Plate,
|
|
Weapon,
|
|
Sidearm,
|
|
MeleeWeapon,
|
|
TacticalRig,
|
|
TacticalRigAttachment,
|
|
MedPouch,
|
|
Backpack,
|
|
Pouch1x1,
|
|
Pouch2x1,
|
|
Pouch3x1,
|
|
Pouch2x2,
|
|
BodyArmor,
|
|
PlateCarrier,
|
|
HeavyAmmunition,
|
|
MediumAmmunition,
|
|
LightAmmunition,
|
|
ShotgunRounds
|
|
}
|
|
|
|
public enum ItemCategory
|
|
{
|
|
Gear
|
|
}
|
|
|
|
public enum ItemSubCategory
|
|
{
|
|
PlateCarriers
|
|
}
|
|
|
|
public enum RarityType
|
|
{
|
|
Common,
|
|
Uncommon,
|
|
Rare,
|
|
Epic,
|
|
Legendary
|
|
}
|
|
|
|
[Serializable]
|
|
public class Rarity
|
|
{
|
|
public RarityType rarityType;
|
|
public Color color;
|
|
}
|
|
|
|
|
|
public class InventorySystemPreferences
|
|
{
|
|
// This class is simply there for convenience. The bulk of this file will contain elements that the game developer or programmer can modify to extend their game.
|
|
|
|
|
|
public static Dictionary<ItemCategory, ItemSubCategory> ItemCategorySubcategoryMapping = new Dictionary<ItemCategory, ItemSubCategory>()
|
|
{
|
|
{ ItemCategory.Gear, ItemSubCategory.PlateCarriers }
|
|
};
|
|
|
|
public static string SeparateWords(string input)
|
|
{
|
|
string output = input;
|
|
//Regex.Replace(output, "(\\B[A-Z])", " $1");
|
|
Regex.Replace(output, "(\\B[A-Z0-9])", " $1");
|
|
return output;
|
|
}
|
|
}
|
|
}
|