Copie depuis Unity VCS vers GitHub

This commit is contained in:
Denis L.
2025-12-10 18:51:40 +01:00
parent 5cfd9de581
commit 7383621db3
902 changed files with 588195 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
using System.Linq;
using CharacterCustomizationTool.Editor.Character;
namespace CharacterCustomizationTool.Editor.SlotValidation
{
public class FullBodyToggledRule : ISlotValidationRules
{
private readonly SlotType[] _slotExceptions =
{
SlotType.FullBody,
SlotType.Body,
SlotType.Faces,
};
public void Validate(CustomizableCharacter character, SlotType type, bool isToggled)
{
if (type != SlotType.FullBody || !isToggled)
{
return;
}
foreach (var slot in character.Slots.Where(s => !_slotExceptions.Contains(s.Type)))
{
slot.Toggle(false);
}
}
}
}

View File

@@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: e8892e8bc6414128bef2a15222ef42e5
timeCreated: 1736328372
AssetOrigin:
serializedVersion: 1
productId: 304841
packageName: Creative Characters FREE - Animated Low Poly 3D Models
packageVersion: 2.2
assetPath: Assets/ithappy/Creative_Characters_FREE/Scripts/Editor/SlotValidation/FullBodyToggledRule.cs
uploadId: 780839

View File

@@ -0,0 +1,9 @@
using CharacterCustomizationTool.Editor.Character;
namespace CharacterCustomizationTool.Editor.SlotValidation
{
public interface ISlotValidationRules
{
void Validate(CustomizableCharacter character, SlotType type, bool isToggled);
}
}

View File

@@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: 113b8583712d407b82fec0990f671ae0
timeCreated: 1736328556
AssetOrigin:
serializedVersion: 1
productId: 304841
packageName: Creative Characters FREE - Animated Low Poly 3D Models
packageVersion: 2.2
assetPath: Assets/ithappy/Creative_Characters_FREE/Scripts/Editor/SlotValidation/ISlotValidationRules.cs
uploadId: 780839

View File

@@ -0,0 +1,25 @@
using System.Linq;
using CharacterCustomizationTool.Editor.Character;
namespace CharacterCustomizationTool.Editor.SlotValidation
{
public class SlotToggledRule : ISlotValidationRules
{
private readonly SlotType[] _slotExceptions =
{
SlotType.FullBody,
SlotType.Body,
SlotType.Faces,
};
public void Validate(CustomizableCharacter character, SlotType type, bool isToggled)
{
if (_slotExceptions.Contains(type) || !isToggled)
{
return;
}
character.Toggle(SlotType.FullBody, false);
}
}
}

View File

@@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: dccaf01db21644c6b99b0de86d77381e
timeCreated: 1736329298
AssetOrigin:
serializedVersion: 1
productId: 304841
packageName: Creative Characters FREE - Animated Low Poly 3D Models
packageVersion: 2.2
assetPath: Assets/ithappy/Creative_Characters_FREE/Scripts/Editor/SlotValidation/SlotToggledRule.cs
uploadId: 780839

View File

@@ -0,0 +1,21 @@
using CharacterCustomizationTool.Editor.Character;
namespace CharacterCustomizationTool.Editor.SlotValidation
{
public class SlotValidator
{
private readonly ISlotValidationRules[] _slotValidationRules =
{
new FullBodyToggledRule(),
new SlotToggledRule(),
};
public void Validate(CustomizableCharacter character, SlotType type, bool isToggled)
{
foreach (var rule in _slotValidationRules)
{
rule.Validate(character, type, isToggled);
}
}
}
}

View File

@@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: 59d0e64fe5d64ef2b950220f1d6fac4b
timeCreated: 1736972000
AssetOrigin:
serializedVersion: 1
productId: 304841
packageName: Creative Characters FREE - Animated Low Poly 3D Models
packageVersion: 2.2
assetPath: Assets/ithappy/Creative_Characters_FREE/Scripts/Editor/SlotValidation/SlotValidator.cs
uploadId: 780839