Пример #1
0
 public virtual bool Initialize()
 {
     if (this.def == null)
     {
         if (!DefLookupUtil.TryGetDef(this.defName, out this.def))
         {
             Log.Error("Could not load def " + this.defName);
         }
     }
     return(this.def != null);
 }
Пример #2
0
        public override bool Initialize()
        {
            if (!base.Initialize())
            {
                return(false);
            }

            if (this.def2 == null && !string.IsNullOrEmpty(this.defName2))
            {
                if (!DefLookupUtil.TryGetDef(this.defName2, out this.def2))
                {
                    Log.Error("Could not load def " + this.defName2);
                }
                return(this.def2 != null);
            }
            return(true);
        }