/// <summary>
        /// Retrieve ReferenceableObject By Name from List by Name.
        /// </summary>
        /// <param name="nameOfObject">Name of Object</param>
        /// <param name="nameOfObjectList">Name of ObjectList</param>
        /// <returns></returns>
        public virtual ReferencableObject RetrieveObject(string nameOfObject, string nameOfObjectList)
        {
            ReferencableObject tempObject = null;

            tempObject = this.RetrieveObjectList(nameOfObjectList).RetrieveObject(nameOfObject);

            return(tempObject);
        }
        /// <summary>
        /// Retrieve Object By Name from List by Name.
        /// </summary>
        /// <param name="nameOfObject">Name of Object</param>
        /// <param name="nameOfObjectList">Name of ObjectList</param>
        /// <returns></returns>
        public virtual ReferencableObject RetrieveObject(string nameOfObject, string nameOfObjectList)
        {
            ReferencableObject tempObject = null;

            foreach (ReferencableObjectList childObjectList in this.activeObjectLists)
            {
                if (childObjectList.ObjectListName == nameOfObjectList)
                {
                    tempObject = childObjectList.RetrieveObject(nameOfObject);
                }
            }

            return(tempObject);
        }
Пример #3
0
        /// <summary>
        /// Retrieve ReferenceableObject by name
        /// </summary>
        /// <param name="nameOfObject">Name of Object</param>
        /// <returns></returns>
        public virtual ReferencableObject RetrieveObject(string nameOfObject)
        {
            ReferencableObject tempObject = new ReferencableObject();

            foreach (ReferencableObject childObject in this.objects)
            {
                if (childObject.ObjectName == nameOfObject)
                {
                    tempObject = childObject;
                    break;
                }
            }

            return(tempObject);
        }
        /// <summary>
        /// Retrieve ReferenceableObject by name 
        /// </summary>
        /// <param name="nameOfObject">Name of Object</param>
        /// <returns></returns>
        public virtual ReferencableObject RetrieveObject(string nameOfObject)
        {
            ReferencableObject tempObject = new ReferencableObject();

            foreach (ReferencableObject childObject in this.objects)
            {
                if (childObject.ObjectName == nameOfObject)
                {
                    tempObject = childObject;
                    break;
                }
            }

            return tempObject;
        }
Пример #5
0
        protected override void GetObjects()
        {
            base.GetObjects();

            ValueMap[]           tempScoreSheets = this.gameObject.GetComponents <ValueMap>();
            ReferencableObject[] tempRefObjects  = new ReferencableObject[tempScoreSheets.Length];

            for (int i = 0; i < tempRefObjects.Length; i++)
            {
                tempRefObjects[i]                   = new ReferencableObject();
                tempRefObjects[i].ObjectName        = tempScoreSheets[i].ValueMapName;
                tempRefObjects[i].ObjectToReference = tempScoreSheets[i];
            }

            this.Objects = new ReferencableObject[tempRefObjects.Length];
            this.Objects = tempRefObjects;
        }
        protected override void GetObjects()
        {
            base.GetObjects();

            ValueMap[] tempScoreSheets = this.gameObject.GetComponents<ValueMap>();
            ReferencableObject[] tempRefObjects = new ReferencableObject[tempScoreSheets.Length];

            for(int i = 0; i < tempRefObjects.Length; i++)
            {
                tempRefObjects[i] = new ReferencableObject();
                tempRefObjects[i].ObjectName = tempScoreSheets[i].ValueMapName;
                tempRefObjects[i].ObjectToReference = tempScoreSheets[i];
            }

            this.Objects = new ReferencableObject[tempRefObjects.Length];
            this.Objects = tempRefObjects;
        }