예제 #1
0
        internal static TCondition AddTestCondition <TCondition, TData>(GameObject go,
                                                                        int traitIndex = 0, float value = 0f)
            where TCondition : Component, ITestCondition <TData, float>
        {
            var condition = go.AddComponent <TCondition>();

            condition.traitName = DatabaseTestData.TraitNameForIndex <TData>(traitIndex);
            condition.value     = value;
            return(condition);
        }
 public virtual void Initialize(int traitIndex)
 {
     traitName = DatabaseTestData.TraitNameForIndex <T>(traitIndex);
 }