public void TeardownDefinitionCollection() { _col1 = null; _col2 = null; _col3 = null; _stat1 = null; _stat2 = null; _stat3 = null; }
public void SetupDefinitionCollection() { _col1 = ScriptableObject.CreateInstance <StatDefinitionCollection>(); _col2 = ScriptableObject.CreateInstance <StatDefinitionCollection>(); _col3 = ScriptableObject.CreateInstance <StatDefinitionCollection>(); _stat1 = ScriptableObject.CreateInstance <StatDefinition>(); _stat2 = ScriptableObject.CreateInstance <StatDefinition>(); _stat3 = ScriptableObject.CreateInstance <StatDefinition>(); }
public void SetupStatsData() { _statCol = ScriptableObject.CreateInstance <StatDefinitionCollection>(); _statInt = ScriptableObject.CreateInstance <StatDefinition>(); _statInt.Value.type = StatValueType.Int; _statCol.definitions.Add(_statInt); _statInt.Value.GetValue().SetInt(INT_BASE); _statFloat = ScriptableObject.CreateInstance <StatDefinition>(); _statFloat.Value.type = StatValueType.Float; _statCol.definitions.Add(_statFloat); _statFloat.Value.GetValue().SetFloat(FLOAT_BASE); _data = ScriptableObject.CreateInstance <StatsContainer>(); _data.collection = _statCol; }
public void SetupStatsAdjustment() { _adjustment = ScriptableObject.CreateInstance <StatsAdjustment>(); _statCol = ScriptableObject.CreateInstance <StatDefinitionCollection>(); _health = ScriptableObject.CreateInstance <StatDefinition>(); SetPrivateField(_health, "_id", "health"); _health.Value.type = StatValueType.Int; _health.Value.GetValue().SetInt(10); _statCol.definitions.Add(_health); _attack = ScriptableObject.CreateInstance <StatDefinition>(); SetPrivateField(_attack, "_id", "attack"); _attack.Value.type = StatValueType.Float; _attack.Value.GetValue().SetFloat(3); _statCol.definitions.Add(_attack); _data = ScriptableObject.CreateInstance <StatsContainer>(); _data.collection = _statCol; }
public void SetupStatsData() { _statColDefault = ScriptableObject.CreateInstance <StatDefinitionCollection>(); SetPrivateField(settings, "_defaultStats", _statColDefault); _statCol = ScriptableObject.CreateInstance <StatDefinitionCollection>(); _health = ScriptableObject.CreateInstance <StatDefinition>(); SetPrivateField(_health, "_id", "health"); _health.Value.type = StatValueType.Int; _health.Value.GetValue().SetInt(10); _statColDefault.definitions.Add(_health); _attack = ScriptableObject.CreateInstance <StatDefinition>(); SetPrivateField(_attack, "_id", "attack"); _attack.Value.type = StatValueType.Float; _attack.Value.GetValue().SetFloat(3); _statCol.definitions.Add(_attack); _armor = ScriptableObject.CreateInstance <StatDefinition>(); SetPrivateField(_armor, "_id", "armor"); _armor.Value.type = StatValueType.FloatCurve; var armorValue = _armor.Value.GetValue(); armorValue.SetFloat(2, 2); armorValue.SetFloat(3, 3); _statCol.definitions.Add(_armor); _dodge = ScriptableObject.CreateInstance <StatDefinition>(); SetPrivateField(_dodge, "_id", "_dodge"); _dodge.Value.type = StatValueType.IntCurve; var dodgeValue = _dodge.Value.GetValue(); dodgeValue.SetInt(2, 2); dodgeValue.SetInt(3, 3); _statCol.definitions.Add(_dodge); _data = ScriptableObject.CreateInstance <StatsContainer>(); _data.collection = _statCol; }