Esempio n. 1
0
        /// <summary>
        /// Find an AnimationTag by name on this Entity.
        /// </summary>
        /// <returns>The tag with the specified name. Logs an error and returns null if none was found.</returns>
        /// <param name="name">Name of the tag.</param>
        public AnimationTag FindTag(string name)
        {
            //If the engine is shutdown ignore any incoming calls.
            if (_destroyed)
            {
                return(null);
            }

            if (_dirty)
            {
                Initialize(false);
            }

            if (_animationContext == null)
            {
                Log.Error <CharacterAnimator>("Unable to find the specified tag because the Animator is not yet initialized properly for Entity {1}!", name, Entity.Name);
                return(null);
            }

            return(_animationContext.FindAnimationTag(name));
        }