Beispiel #1
0
        /// <summary>
        /// Returns the current blueprint or child blueprints (e.g. <see cref="Actions"/>)
        /// </summary>
        public virtual HasStatsBlueprint TryGetBlueprint(string name)
        {
            if (Is(name))
            {
                return(this);
            }

            return
                (Behaviours.Select(a => a.TryGetBlueprint(name)).FirstOrDefault(b => b != null) ??
                 Actions.Select(a => a.TryGetBlueprint(name)).FirstOrDefault(b => b != null));
        }