123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124 |
- using System;
- using UnityEngine;
- namespace TriLib
- {
- [Serializable]
- public class AssetAdvancedConfig
- {
- public AssetAdvancedConfig()
- {
- }
- public AssetAdvancedConfig(string key)
- {
- this.Key = key;
- }
- public AssetAdvancedConfig(string key, int defaultValue)
- {
- this.Key = key;
- this.IntValue = defaultValue;
- }
- public AssetAdvancedConfig(string key, float defaultValue)
- {
- this.Key = key;
- this.FloatValue = defaultValue;
- }
- public AssetAdvancedConfig(string key, bool defaultValue)
- {
- this.Key = key;
- this.BoolValue = defaultValue;
- }
- public AssetAdvancedConfig(string key, string defaultValue)
- {
- this.Key = key;
- this.StringValue = defaultValue;
- }
- public AssetAdvancedConfig(string key, AiComponent defaultValue)
- {
- this.Key = key;
- this.IntValue = (int)defaultValue;
- }
- public AssetAdvancedConfig(string key, AiPrimitiveType defaultValue)
- {
- this.Key = key;
- this.IntValue = (int)defaultValue;
- }
- public AssetAdvancedConfig(string key, AiUVTransform defaultValue)
- {
- this.Key = key;
- this.IntValue = (int)defaultValue;
- }
- public AssetAdvancedConfig(string key, Vector3 translation, Vector3 rotation, Vector3 scale)
- {
- this.Key = key;
- this.TranslationValue = translation;
- this.RotationValue = rotation;
- this.ScaleValue = scale;
- }
- public static AssetAdvancedConfig CreateConfig(AssetAdvancedPropertyClassNames className, int value)
- {
- return new AssetAdvancedConfig(AssetAdvancedPropertyMetadata.GetConfigKey(className), value);
- }
- public static AssetAdvancedConfig CreateConfig(AssetAdvancedPropertyClassNames className, float value)
- {
- return new AssetAdvancedConfig(AssetAdvancedPropertyMetadata.GetConfigKey(className), value);
- }
- public static AssetAdvancedConfig CreateConfig(AssetAdvancedPropertyClassNames className, bool value)
- {
- return new AssetAdvancedConfig(AssetAdvancedPropertyMetadata.GetConfigKey(className), value);
- }
- public static AssetAdvancedConfig CreateConfig(AssetAdvancedPropertyClassNames className, string value)
- {
- return new AssetAdvancedConfig(AssetAdvancedPropertyMetadata.GetConfigKey(className), value);
- }
- public static AssetAdvancedConfig CreateConfig(AssetAdvancedPropertyClassNames className, AiComponent value)
- {
- return new AssetAdvancedConfig(AssetAdvancedPropertyMetadata.GetConfigKey(className), value);
- }
- public static AssetAdvancedConfig CreateConfig(AssetAdvancedPropertyClassNames className, AiPrimitiveType value)
- {
- return new AssetAdvancedConfig(AssetAdvancedPropertyMetadata.GetConfigKey(className), value);
- }
- public static AssetAdvancedConfig CreateConfig(AssetAdvancedPropertyClassNames className, AiUVTransform value)
- {
- return new AssetAdvancedConfig(AssetAdvancedPropertyMetadata.GetConfigKey(className), value);
- }
- public static AssetAdvancedConfig CreateConfig(AssetAdvancedPropertyClassNames className, Vector3 translation, Vector3 rotation, Vector3 scale)
- {
- return new AssetAdvancedConfig(AssetAdvancedPropertyMetadata.GetConfigKey(className), translation, rotation, scale);
- }
- public string Key;
- public int IntValue;
- public float FloatValue;
- public bool BoolValue;
- public string StringValue;
- public Vector3 TranslationValue;
- public Vector3 RotationValue;
- public Vector3 ScaleValue;
- }
- }
|