/// <summary> /// Compares the specified id with the id of reference object. /// </summary> /// <returns><c>true</c>, if by ID was compared, <c>false</c> otherwise.</returns> /// <param name="_id">Identifier.</param> public bool CompareByID(int _id) { if (ReferenceGameObject == null) { return(false); } return(ReferenceGameObject.GetInstanceID() == _id ? true : false); }
/// <summary> /// Compares the specified tag with the tag of reference object. /// </summary> /// <returns><c>true</c>, if the compared tags are identic, <c>false</c> otherwise.</returns> /// <param name="_tag">Tag.</param> public bool CompareByTag(string _tag) { if (string.IsNullOrEmpty(_tag) || ReferenceGameObject == null) { return(false); } if (ReferenceGameObject.CompareTag(_tag)) { return(true); } else { return(false); } }