From 3b0fc4481e828a4dd8ab431c96c1368c62c40d3f Mon Sep 17 00:00:00 2001 From: Branden J Brown Date: Sun, 30 Jul 2023 01:35:57 -0500 Subject: [PATCH] rename HeroAttributes -> HeroAttributesSO --- .../Scripts/{HeroAttributes.cs => HeroAttributesSO.cs} | 9 ++++++--- .../{HeroAttributes.cs.meta => HeroAttributesSO.cs.meta} | 0 2 files changed, 6 insertions(+), 3 deletions(-) rename Assets/Scripts/{HeroAttributes.cs => HeroAttributesSO.cs} (67%) rename Assets/Scripts/{HeroAttributes.cs.meta => HeroAttributesSO.cs.meta} (100%) diff --git a/Assets/Scripts/HeroAttributes.cs b/Assets/Scripts/HeroAttributesSO.cs similarity index 67% rename from Assets/Scripts/HeroAttributes.cs rename to Assets/Scripts/HeroAttributesSO.cs index 28f7ce7..2a949bb 100644 --- a/Assets/Scripts/HeroAttributes.cs +++ b/Assets/Scripts/HeroAttributesSO.cs @@ -2,14 +2,17 @@ using System.Collections; using System.Collections.Generic; using UnityEngine; -public class HeroAttributes : ScriptableObject +public class HeroAttributesSO : ScriptableObject { - // TODO(zeph): does these being private make it hard to create a new hero? - // what about applying effects? [SerializeField] private Attribute STR; [SerializeField] private Attribute MAG; [SerializeField] private Attribute DEX; [SerializeField] private Attribute CON; [SerializeField] private Attribute CHA; [SerializeField] private Attribute FTH; + + public static HeroAttributesSO New() + { + return ScriptableObject.CreateInstance(); + } } diff --git a/Assets/Scripts/HeroAttributes.cs.meta b/Assets/Scripts/HeroAttributesSO.cs.meta similarity index 100% rename from Assets/Scripts/HeroAttributes.cs.meta rename to Assets/Scripts/HeroAttributesSO.cs.meta