Example #1
0
 /// <summary>
 /// This checks if a state has been defined.
 /// </summary>
 public bool HasState(string statename)
 {
     if (states.ContainsKey(statename))
     {
         return(true);
     }
     if (!skipsuper && (baseclass != null))
     {
         return(baseclass.HasState(statename));
     }
     return(false);
 }
        /// <summary>
        /// This checks if a state has been defined.
        /// </summary>
        public bool HasState(string statename)
        {
            // [ZZ] we should NOT pick up any states from Actor. (except Spawn, as the very default state)
            //      for the greater good. (otherwise POL5 from GenericCrush is displayed for actors without frames, preferred before TNT1)
            if (classname.ToLowerInvariant() == "actor" && statename.ToLowerInvariant() != "spawn")
            {
                return(false);
            }

            if (states.ContainsKey(statename))
            {
                return(true);
            }
            if (!skipsuper && (baseclass != null))
            {
                return(baseclass.HasState(statename));
            }
            return(false);
        }