Пример #1
0
        /// <summary>
        /// <see cref="SkinPartsPropertryWithoutObjectReference.boolValues">を取得する
        /// </summary>
        /// <param name="variable">ユーザー変数</param>
        public static bool GetBool(this SkinPartsPropertry property, UserLogicVariable variable)
        {
            int valueIndex;

            if (m_ActiveUserLogic.TryGetValueIndex(variable.VariableId, out valueIndex))
            {
                return(property.boolValues[valueIndex]);
            }
            return(default);
Пример #2
0
        /// <summary>
        /// <see cref="SkinPartsPropertry.objectReferenceValues">を型変換して取得する
        /// </summary>
        /// <typeparam name="T">変換する型</typeparam>
        /// <param name="variable">ユーザー変数</param>
        public static T GetObjectReference <T>(this SkinPartsPropertry property, UserLogicVariable variable) where T : Object
        {
            int valueIndex;

            if (m_ActiveUserLogic.TryGetValueIndex(variable.VariableId, out valueIndex))
            {
                return(property.objectReferenceValues[valueIndex] as T);
            }
            return(null);
        }