コード例 #1
0
ファイル: SlotsHelper.cs プロジェクト: joeeyaura/Nitrox
        public static List <EntitySlot.Type> GetEntitySlotTypes(IEntitySlot entitySlot)
        {
            if (entitySlot is EntitySlot)
            {
                return(((EntitySlot)entitySlot).allowedTypes);
            }
            else if (entitySlot is EntitySlotData)
            {
                return(ConvertSlotTypes(((EntitySlotData)entitySlot).allowedTypes));
            }

            throw new System.Exception("Unknown EntitySlotType " + entitySlot.GetType());
        }