GameEntities.Unit.OnLoad C# (CSharp) Method

OnLoad() protected method

Overridden from Engine.EntitySystem.Entity.OnLoad(TextBlock).
protected OnLoad ( TextBlock block ) : bool
block TextBlock
return bool
        protected override bool OnLoad( TextBlock block )
        {
            //for compatibility with old versions.
            if( block.IsAttributeExist( "initFaction" ) )
                initialFaction = (FactionType)EntityTypes.Instance.GetByName(
                    block.GetAttribute( "initFaction" ) );

            return base.OnLoad( block );
        }