Exemplo n.º 1
0
        /// <summary>
        /// Compares the specified name with the name of reference object.
        /// </summary>
        /// <returns><c>true</c>, if the compared names are identic, <c>false</c> otherwise.</returns>
        /// <param name="_name">Name.</param>
        public bool CompareByName(string _name)
        {
            if (string.IsNullOrEmpty(_name) || ReferenceGameObject == null)
            {
                return(false);
            }

            if (ReferenceGameObject.name == SystemTools.CleanName(_name))
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// Compares the specified _object with the reference object.
        /// </summary>
        /// <param name="_object">Object.</param>
        public bool Compare(GameObject _object)
        {
            if (_object == null || ReferenceGameObject == null)
            {
                return(false);
            }

            //( GroupByTag && ! string.IsNullOrEmpty( _object.tag ) && ReferenceGameObject.CompareTag( _object.tag ) ) ||
            if (SystemTools.CleanName(ReferenceGameObject.name) == SystemTools.CleanName(_object.name))
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Exemplo n.º 3
0
 public bool CompareName(string _name)
 {
     return(SystemTools.CleanName(this.name) == SystemTools.CleanName(_name) ? true : false);
 }