예제 #1
0
        /// <summary>
        /// Returns true if a mapping is found for <see cref="ExampleContent.ItemType"/> <paramref name="key"/> to a
        /// <see cref="System.Collections.Generic.List<UnityEngine.GameObject>"/>, otherwise false.
        /// </summary>
        /// <param name="key"></param>
        /// <param name="value"></param>
        /// <returns></returns>
        public bool TryGetValue(ExampleContent.ItemType key, out System.Collections.Generic.List <UnityEngine.GameObject> value)
        {
            value = null;

            Mapping mapping;

            if (!MappingLookup.TryGetValue(key, out mapping))
            {
                return(false);
            }

            value = mapping.value;

            return(true);
        }
예제 #2
0
        /// <summary>
        /// Returns true if a mapping is found for <see cref="ExampleContent.ItemType"/> <paramref name="key"/> to a
        /// <see cref="UnityEngine.GameObject[]"/>, otherwise false.
        /// </summary>
        /// <param name="key"></param>
        /// <param name="value"></param>
        /// <returns></returns>
        public bool TryGetValue(ExampleContent.ItemType key, out UnityEngine.GameObject[] value)
        {
            value = null;

            Mapping mapping;

            if (!MappingLookup.TryGetValue(key, out mapping))
            {
                return(false);
            }

            value = mapping.value;

            return(true);
        }