You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
1.0 KiB
C#
33 lines
1.0 KiB
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
public class TWS_CustomizableCharacter : MonoBehaviour
|
|
{
|
|
public List<TWS_ItemCustomizationApplier> customizationAppliers;
|
|
|
|
protected void ApplyItemCustomization(TWS_AppliedCustomizationsData appliedCustomization)
|
|
{
|
|
TWS_ItemCustomizationApplier fetchedItem = customizationAppliers.Find(x => x.catagoryName.Equals(appliedCustomization.catagoryName));
|
|
fetchedItem.ApplyCustomizationData(appliedCustomization);
|
|
|
|
}
|
|
|
|
protected void ApplyAllCustomizationsFromCustomizationData()
|
|
{
|
|
List<TWS_AppliedCustomizationsData> data = FetchAppliedCustomizationData();
|
|
|
|
foreach (TWS_AppliedCustomizationsData appliedData in data)
|
|
{
|
|
ApplyItemCustomization(appliedData);
|
|
}
|
|
}
|
|
|
|
protected List<TWS_AppliedCustomizationsData> FetchAppliedCustomizationData()
|
|
{
|
|
List<TWS_AppliedCustomizationsData> data = GameManager.Instance.currentAppliedCustomizations;
|
|
return data;
|
|
}
|
|
|
|
}
|