Пример #1
0
 public static void StaticInit()
 {
     CollisionFilters.BUILDING       = new FilterComponent(1, 2769);
     CollisionFilters.BUILDING_SKIRT = new FilterComponent(0, 2641);
     CollisionFilters.BUILDING_GHOST = new FilterComponent(2, 2769);
     CollisionFilters.WALL           = new FilterComponent(16, 2769);
     CollisionFilters.WALL_SKIRT     = new FilterComponent(0, 2113);
     CollisionFilters.WALL_GHOST     = new FilterComponent(32, 2769);
     CollisionFilters.TRAP           = new FilterComponent(512, 2769);
     CollisionFilters.TRAP_GHOST     = new FilterComponent(1024, 2769);
     CollisionFilters.PLATFORM       = new FilterComponent(2048, 2769);
     CollisionFilters.PLATFORM_GHOST = new FilterComponent(4096, 2769);
     CollisionFilters.TROOP          = new FilterComponent(4, 145);
     CollisionFilters.BUILDABLE_AREA = new FilterComponent(0, 8179);
     CollisionFilters.CLEARABLE      = new FilterComponent(64, 2769);
     CollisionFilters.BLOCKER        = new FilterComponent(128, 2769);
     CollisionFilters.BLOCKER_GHOST  = new FilterComponent(256, 2769);
 }
Пример #2
0
 public static void StaticReset()
 {
     CollisionFilters.BUILDING       = null;
     CollisionFilters.BUILDING_SKIRT = null;
     CollisionFilters.WALL           = null;
     CollisionFilters.WALL_SKIRT     = null;
     CollisionFilters.BUILDING_GHOST = null;
     CollisionFilters.WALL_GHOST     = null;
     CollisionFilters.TROOP          = null;
     CollisionFilters.BUILDABLE_AREA = null;
     CollisionFilters.CLEARABLE      = null;
     CollisionFilters.TRAP           = null;
     CollisionFilters.TRAP_GHOST     = null;
     CollisionFilters.BLOCKER        = null;
     CollisionFilters.BLOCKER_GHOST  = null;
     CollisionFilters.PLATFORM       = null;
     CollisionFilters.PLATFORM_GHOST = null;
 }
Пример #3
0
 public bool CollidesWith(FilterComponent filter)
 {
     if (this.defaultFilter != null && this.defaultFilter.CollidesWith(filter))
     {
         return(true);
     }
     if (this.children != null)
     {
         foreach (BoardItem current in this.children)
         {
             if (current.Filter != null && current.Filter.CollidesWith(filter))
             {
                 return(true);
             }
         }
         return(false);
     }
     return(false);
 }
Пример #4
0
        public bool SkirtCollidesWith(BoardItem item, int x, int z, int walkableGap)
        {
            FilterComponent filter = null;

            if (item.Filter == CollisionFilters.BUILDING || item.Filter == CollisionFilters.BUILDING_GHOST || item.Filter == CollisionFilters.PLATFORM || item.Filter == CollisionFilters.PLATFORM_GHOST)
            {
                filter = CollisionFilters.BUILDING_SKIRT;
            }
            else if (item.Filter == CollisionFilters.WALL || item.Filter == CollisionFilters.WALL_GHOST || item.Filter == CollisionFilters.TRAP || item.Filter == CollisionFilters.TRAP_GHOST)
            {
                filter = CollisionFilters.WALL_SKIRT;
            }
            int num  = x + item.Width - walkableGap;
            int num2 = z + item.Depth - walkableGap;

            for (int i = x - 1; i <= num; i++)
            {
                BoardCell cellAt = this.GetCellAt(i, z - 1);
                if (cellAt != null && cellAt.CollidesWith(filter))
                {
                    return(true);
                }
                cellAt = this.GetCellAt(i, num2);
                if (cellAt != null && cellAt.CollidesWith(filter))
                {
                    return(true);
                }
            }
            for (int j = z; j < num2; j++)
            {
                BoardCell cellAt = this.GetCellAt(x - 1, j);
                if (cellAt != null && cellAt.CollidesWith(filter))
                {
                    return(true);
                }
                cellAt = this.GetCellAt(num, j);
                if (cellAt != null && cellAt.CollidesWith(filter))
                {
                    return(true);
                }
            }
            return(false);
        }
Пример #5
0
 public bool CollidesWith(FilterComponent filter)
 {
     if (this.defaultFilter != null && this.defaultFilter.CollidesWith(filter))
     {
         return(true);
     }
     if (this.children != null)
     {
         using (IEnumerator <BoardItem <T> > enumerator = this.children.GetEnumerator())
         {
             while (enumerator.MoveNext())
             {
                 BoardItem <T> current = enumerator.get_Current();
                 if (current.Filter != null && current.Filter.CollidesWith(filter))
                 {
                     return(true);
                 }
             }
         }
         return(false);
     }
     return(false);
 }
        //private ProcessComponent _process = null;

        public Room(RoomData Data)
        {
            this.IsLagging = 0;
            this.IdleTime  = 0;

            this.BallSpeed = 150; //you can change this using a command (milliseconds)

            this._roomData = Data;
            RoomMuted      = false;
            mDisposed      = false;


            this.Id          = Data.Id;
            this.Name        = Data.Name;
            this.Description = Data.Description;
            this.OwnerName   = Data.OwnerName;
            this.OwnerId     = Data.OwnerId;

            this.WiredScoreBordDay              = Data.WiredScoreBordDay;
            this.WiredScoreBordWeek             = Data.WiredScoreBordWeek;
            this.WiredScoreBordMonth            = Data.WiredScoreBordMonth;
            this.WiredScoreFirstBordInformation = Data.WiredScoreFirstBordInformation;

            this.ForSale   = false;
            this.SalePrice = 0;
            this.Category  = Data.Category;
            this.Type      = Data.Type;
            this.Access    = Data.Access;
            this.UsersNow  = 0;
            this.UsersMax  = Data.UsersMax;
            this.ModelName = Data.ModelName;
            this.Score     = Data.Score;
            this.Tags      = new List <string>();
            foreach (string tag in Data.Tags)
            {
                Tags.Add(tag);
            }

            this.AllowPets           = Data.AllowPets;
            this.AllowPetsEating     = Data.AllowPetsEating;
            this.RoomBlockingEnabled = Data.RoomBlockingEnabled;
            this.Hidewall            = Data.Hidewall;
            this.Group = Data.Group;

            this.Password  = Data.Password;
            this.Wallpaper = Data.Wallpaper;
            this.Floor     = Data.Floor;
            this.Landscape = Data.Landscape;

            this.WallThickness  = Data.WallThickness;
            this.FloorThickness = Data.FloorThickness;

            this.chatMode     = Data.chatMode;
            this.chatSize     = Data.chatSize;
            this.chatSpeed    = Data.chatSpeed;
            this.chatDistance = Data.chatDistance;
            this.extraFlood   = Data.extraFlood;

            this.TradeSettings = Data.TradeSettings;

            this.WhoCanBan  = Data.WhoCanBan;
            this.WhoCanKick = Data.WhoCanKick;
            this.WhoCanBan  = Data.WhoCanBan;

            this.GolpeEnabled   = Data.GolpeEnabled;
            this.PushEnabled    = Data.PushEnabled;
            this.PullEnabled    = Data.PullEnabled;
            this.SPullEnabled   = Data.SPullEnabled;
            this.SPushEnabled   = Data.SPushEnabled;
            this.EnablesEnabled = Data.EnablesEnabled;
            this.RespectNotificationsEnabled = Data.RespectNotificationsEnabled;
            this.PetMorphsAllowed            = Data.PetMorphsAllowed;

            this.poolQuestion   = string.Empty;
            this.yesPoolAnswers = new List <int>();
            this.noPoolAnswers  = new List <int>();

            this.ActiveTrades = new ArrayList();
            this.Bans         = new Dictionary <int, double>();
            this.MutedUsers   = new Dictionary <int, double>();
            this.Tents        = new Dictionary <int, List <RoomUser> >();

            _gamemap = new Gamemap(this);
            if (_roomItemHandling == null)
            {
                _roomItemHandling = new RoomItemHandling(this);
            }
            _roomUserManager = new RoomUserManager(this);

            this._filterComponent = new FilterComponent(this);
            this._wiredComponent  = new WiredComponent(this);
            this._traxManager     = new RoomTraxManager(this);

            GetRoomItemHandler().LoadFurniture();
            GetGameMap().GenerateMaps();
            OnFurnisLoad();

            this.LoadPromotions();
            this.LoadRights();
            this.LoadBans();
            this.LoadFilter();
            this.InitBots();
            this.InitPets();

            Data.UsersNow = 1;
        }
Пример #7
0
        public ILogStreamOptions WithFilter(string filter)
        {
            _queryComponents[Filter] = new FilterComponent(filter);

            return(this);
        }
Пример #8
0
        public Room(RoomData Data)
        {
            IsLagging   = 0;
            IdleTime    = 0;
            RoomData    = Data;
            RoomMuted   = false;
            mDisposed   = false;
            Id          = Data.Id;
            Name        = Data.Name;
            Description = Data.Description;
            OwnerName   = Data.OwnerName;
            OwnerId     = Data.OwnerId;
            Category    = Data.Category;
            Type        = Data.Type;
            Access      = Data.Access;
            UsersNow    = 0;
            UsersMax    = Data.UsersMax;
            ModelName   = Data.ModelName;
            Score       = Data.Score;
            Tags        = new List <string>();
            foreach (var tag in Data.Tags)
            {
                Tags.Add(tag);
            }

            AllowPets           = Data.AllowPets;
            AllowPetsEating     = Data.AllowPetsEating;
            RoomBlockingEnabled = Data.RoomBlockingEnabled;
            Hidewall            = Data.Hidewall;
            Group          = Data.Group;
            Password       = Data.Password;
            Wallpaper      = Data.Wallpaper;
            Floor          = Data.Floor;
            Landscape      = Data.Landscape;
            WallThickness  = Data.WallThickness;
            FloorThickness = Data.FloorThickness;
            chatMode       = Data.chatMode;
            chatSize       = Data.chatSize;
            chatSpeed      = Data.chatSpeed;
            chatDistance   = Data.chatDistance;
            extraFlood     = Data.extraFlood;
            TradeSettings  = Data.TradeSettings;
            WhoCanBan      = Data.WhoCanBan;
            WhoCanKick     = Data.WhoCanKick;
            WhoCanBan      = Data.WhoCanBan;
            PushEnabled    = Data.PushEnabled;
            PullEnabled    = Data.PullEnabled;
            SPullEnabled   = Data.SPullEnabled;
            SPushEnabled   = Data.SPushEnabled;
            EnablesEnabled = Data.EnablesEnabled;
            RespectNotificationsEnabled = Data.RespectNotificationsEnabled;
            PetMorphsAllowed            = Data.PetMorphsAllowed;
            ActiveTrades = new ArrayList();
            MutedUsers   = new Dictionary <int, double>();
            Tents        = new Dictionary <int, List <RoomUser> >();
            _gamemap     = new Gamemap(this);
            if (_roomItemHandling == null)
            {
                _roomItemHandling = new RoomItemHandling(this);
            }
            _roomUserManager  = new RoomUserManager(this);
            _filterComponent  = new FilterComponent(this);
            _wiredComponent   = new WiredComponent(this);
            _bansComponent    = new BansComponent(this);
            _tradingComponent = new TradingComponent(this);
            GetRoomItemHandler().LoadFurniture();
            GetGameMap().GenerateMaps();
            LoadPromotions();
            LoadRights();
            LoadFilter();
            InitBots();
            InitPets();
            Data.UsersNow = 1;
        }
Пример #9
0
        //private ProcessComponent _process = null;

        public Room(RoomData Data)
        {
            this.IsLagging = 0;
            this.IdleTime  = 0;

            this._roomData = Data;
            RoomMuted      = false;
            mDisposed      = false;

            this.Id          = Data.Id;
            this.Name        = Data.Name;
            this.Description = Data.Description;
            this.OwnerName   = Data.OwnerName;
            this.OwnerId     = Data.OwnerId;

            this.Category  = Data.Category;
            this.Type      = Data.Type;
            this.Access    = Data.Access;
            this.UsersNow  = 0;
            this.UsersMax  = Data.UsersMax;
            this.ModelName = Data.ModelName;
            this.Score     = Data.Score;
            this.Tags      = new List <string>();
            foreach (string tag in Data.Tags)
            {
                Tags.Add(tag);
            }

            this.AllowPets           = Data.AllowPets;
            this.AllowPetsEating     = Data.AllowPetsEating;
            this.RoomBlockingEnabled = Data.RoomBlockingEnabled;
            this.Hidewall            = Data.Hidewall;
            this.Group = Data.Group;

            this.Password  = Data.Password;
            this.Wallpaper = Data.Wallpaper;
            this.Floor     = Data.Floor;
            this.Landscape = Data.Landscape;

            this.WallThickness  = Data.WallThickness;
            this.FloorThickness = Data.FloorThickness;

            this.chatMode     = Data.chatMode;
            this.chatSize     = Data.chatSize;
            this.chatSpeed    = Data.chatSpeed;
            this.chatDistance = Data.chatDistance;
            this.extraFlood   = Data.extraFlood;

            this.TradeSettings = Data.TradeSettings;

            this.WhoCanBan  = Data.WhoCanBan;
            this.WhoCanKick = Data.WhoCanKick;
            this.WhoCanBan  = Data.WhoCanBan;

            this.PushEnabled    = Data.PushEnabled;
            this.PullEnabled    = Data.PullEnabled;
            this.SPullEnabled   = Data.SPullEnabled;
            this.SPushEnabled   = Data.SPushEnabled;
            this.EnablesEnabled = Data.EnablesEnabled;
            this.RespectNotificationsEnabled = Data.RespectNotificationsEnabled;
            this.PetMorphsAllowed            = Data.PetMorphsAllowed;

            this.BankEnabled        = Data.BankEnabled;
            this.ShootEnabled       = Data.ShootEnabled;
            this.HitEnabled         = Data.HitEnabled;
            this.SafeZoneEnabled    = Data.SafeZoneEnabled;
            this.SexCommandsEnabled = Data.SexCommandsEnabled;
            this.TurfEnabled        = Data.TurfEnabled;
            this.RobEnabled         = Data.RobEnabled;
            this.GymEnabled         = Data.GymEnabled;
            this.DeliveryEnabled    = Data.DeliveryEnabled;
            this.TutorialEnabled    = Data.TutorialEnabled;
            this.DriveEnabled       = Data.DriveEnabled;
            this.TaxiFromEnabled    = Data.TaxiFromEnabled;
            this.TaxiToEnabled      = Data.TaxiToEnabled;
            this.EnterRoomMessage   = Data.EnterRoomMessage;
            this.RoleplayEvent      = Data.RoleplayEvent;

            this.ActiveTrades = new ArrayList();
            this.Bans         = new Dictionary <int, double>();
            this.MutedUsers   = new Dictionary <int, double>();
            this.Tents        = new Dictionary <int, List <RoomUser> >();

            _gamemap = new Gamemap(this);
            if (_roomItemHandling == null)
            {
                _roomItemHandling = new RoomItemHandling(this);
            }
            _roomUserManager = new RoomUserManager(this);

            this._filterComponent = new FilterComponent(this);
            this._wiredComponent  = new WiredComponent(this);

            GetRoomItemHandler().LoadFurniture();
            GetGameMap().GenerateMaps();

            this.LoadPromotions();
            this.LoadRights();
            this.LoadBans();
            this.LoadFilter();
            this.InitBots();
            this.InitPets();

            if (this.GetRoomUserManager() != null && this.GetRoomUserManager().GetRoomUsers() != null && this.GetRoomUserManager().GetRoomUsers().Where(x => !x.IsBot) != null)
            {
                Data.UsersNow = this.GetRoomUserManager().GetRoomUsers().Where(x => !x.IsBot).ToList().Count;
            }
            else
            {
                Data.UsersNow = 0;
            }
        }
Пример #10
0
        //public RoomTraxManager traxManager; // Added

        //private ProcessComponent _process = null;

        public Room(RoomData Data)
        {
            IsLagging = 0;
            IdleTime  = 0;

            _roomData         = Data;
            RoomMuted         = false;
            mDisposed         = false;
            muteSignalEnabled = false;

            Id          = Data.Id;
            Name        = Data.Name;
            Description = Data.Description;
            OwnerName   = Data.OwnerName;
            OwnerId     = Data.OwnerId;

            WiredScoreBordDay              = Data.WiredScoreBordDay;
            WiredScoreBordWeek             = Data.WiredScoreBordWeek;
            WiredScoreBordMonth            = Data.WiredScoreBordMonth;
            WiredScoreFirstBordInformation = Data.WiredScoreFirstBordInformation;

            ForSale   = false;
            SalePrice = 0;
            Category  = Data.Category;
            Type      = Data.Type;
            Access    = Data.Access;
            UsersNow  = 0;
            UsersMax  = Data.UsersMax;
            ModelName = Data.ModelName;
            Score     = Data.Score;
            Tags      = new List <string>();
            foreach (string tag in Data.Tags)
            {
                Tags.Add(tag);
            }

            AllowPets           = Data.AllowPets;
            AllowPetsEating     = Data.AllowPetsEating;
            RoomBlockingEnabled = Data.RoomBlockingEnabled;
            Hidewall            = Data.Hidewall;
            Group = Data.Group;

            Password  = Data.Password;
            Wallpaper = Data.Wallpaper;
            Floor     = Data.Floor;
            Landscape = Data.Landscape;

            WallThickness  = Data.WallThickness;
            FloorThickness = Data.FloorThickness;

            chatMode     = Data.chatMode;
            chatSize     = Data.chatSize;
            chatSpeed    = Data.chatSpeed;
            chatDistance = Data.chatDistance;
            extraFlood   = Data.extraFlood;

            TradeSettings = Data.TradeSettings;

            WhoCanBan  = Data.WhoCanBan;
            WhoCanKick = Data.WhoCanKick;
            WhoCanBan  = Data.WhoCanBan;

            poolQuestion   = string.Empty;
            yesPoolAnswers = new List <int>();
            noPoolAnswers  = new List <int>();

            ActiveTrades = new ArrayList();
            Bans         = new Dictionary <int, double>();
            MutedUsers   = new Dictionary <int, double>();
            Tents        = new Dictionary <int, List <RoomUser> >();

            _gamemap = new Gamemap(this);
            if (_roomItemHandling == null)
            {
                _roomItemHandling = new RoomItemHandling(this);
            }
            _roomUserManager = new RoomUserManager(this);

            _filterComponent = new FilterComponent(this);
            _wiredComponent  = new WiredComponent(this);
            _bansComponent   = new BansComponent(this);
            _traxManager     = new RoomTraxManager(this);
            OnFurnisLoad();

            GetRoomItemHandler().LoadFurniture();
            GetGameMap().GenerateMaps();

            LoadPromotions();
            LoadRights();
            LoadBans();
            LoadFilter();
            InitBots();
            InitPets();

            Data.UsersNow = 1;
        }
Пример #11
0
 public BoardItem(SizeComponent size, Entity data, FilterComponent filter)
 {
     this.size   = size;
     this.data   = data;
     this.filter = filter;
 }
Пример #12
0
        private SmartEntity CreateBuildingEntity(BuildingTypeVO buildingType, Building building, bool createCollider, bool requestAsset, bool addSupport)
        {
            int           x           = building.X;
            int           z           = building.Z;
            bool          flag        = buildingType.Type == BuildingType.Blocker;
            SmartEntity   smartEntity = this.NewEntity();
            TeamComponent component   = new TeamComponent(TeamType.Defender);

            smartEntity.Add(component);
            int num = 0;

            if (!flag && buildingType.SizeX > 1 && buildingType.SizeY > 1)
            {
                num = 1;
            }
            TransformComponent transformComponent = new TransformComponent(Units.GridToBoardX(x), Units.GridToBoardZ(z), 1.57079637f, true, Units.GridToBoardX(buildingType.SizeX - num), Units.GridToBoardZ(buildingType.SizeY - num));

            smartEntity.Add(transformComponent);
            SizeComponent sizeComponent = Units.SizeCompFromGrid(buildingType.SizeX, buildingType.SizeY);

            smartEntity.Add(sizeComponent);
            if (buildingType.Type != BuildingType.Clearable)
            {
                smartEntity.Add(new DamageableComponent(transformComponent));
            }
            BuildingComponent buildingComponent = new BuildingComponent(buildingType, building);

            smartEntity.Add(buildingComponent);
            smartEntity.Add(new BuffComponent());
            smartEntity.Add(new HealthViewComponent());
            FilterComponent filter = CollisionFilters.BUILDING;

            if (buildingType.Type == BuildingType.Trap)
            {
                filter = CollisionFilters.TRAP;
            }
            else if (buildingType.Type == BuildingType.Wall)
            {
                filter = CollisionFilters.WALL;
            }
            else if (buildingType.Type == BuildingType.Clearable)
            {
                filter = CollisionFilters.CLEARABLE;
            }
            else if (buildingType.Type == BuildingType.ChampionPlatform)
            {
                filter = CollisionFilters.PLATFORM;
            }
            BoardItem <Entity> boardItem = new BoardItem <Entity>(sizeComponent, smartEntity, filter);

            smartEntity.Add(new BoardItemComponent(boardItem));
            if (buildingType.Type == BuildingType.Turret)
            {
                TurretTypeVO turretType = Service.Get <IDataController>().Get <TurretTypeVO>(buildingType.TurretUid);
                this.AddTurretComponentsToEntity(smartEntity, turretType);
            }
            if (buildingType.Type == BuildingType.Trap)
            {
                this.AddTrapComponentsToEntity(smartEntity, buildingType);
            }
            if (buildingType.Type == BuildingType.ShieldGenerator)
            {
                this.AddShieldComponentsToEntity(smartEntity, buildingType);
            }
            HealthComponent component2 = new HealthComponent(buildingType.Health, buildingComponent.BuildingType.ArmorType);

            smartEntity.Add(component2);
            if (addSupport)
            {
                smartEntity.Add <SupportComponent>(new SupportComponent());
            }
            if (buildingType.Type == BuildingType.ChampionPlatform)
            {
                smartEntity.Add <ChampionPlatformComponent>(new ChampionPlatformComponent());
            }
            if (buildingType.Type == BuildingType.Housing)
            {
                smartEntity.Add <HousingComponent>(new HousingComponent());
            }
            switch (buildingType.Type)
            {
            case BuildingType.HQ:
                smartEntity.Add <HQComponent>(new HQComponent());
                break;

            case BuildingType.Barracks:
                smartEntity.Add <BarracksComponent>(new BarracksComponent());
                break;

            case BuildingType.Factory:
                smartEntity.Add <FactoryComponent>(new FactoryComponent());
                break;

            case BuildingType.FleetCommand:
                smartEntity.Add <FleetCommandComponent>(new FleetCommandComponent());
                break;

            case BuildingType.HeroMobilizer:
                smartEntity.Add <TacticalCommandComponent>(new TacticalCommandComponent());
                break;

            case BuildingType.Squad:
                smartEntity.Add <SquadBuildingComponent>(new SquadBuildingComponent());
                break;

            case BuildingType.Starport:
                smartEntity.Add <StarportComponent>(new StarportComponent());
                break;

            case BuildingType.DroidHut:
                smartEntity.Add <DroidHutComponent>(new DroidHutComponent());
                break;

            case BuildingType.Wall:
                smartEntity.Add <WallComponent>(new WallComponent());
                break;

            case BuildingType.Turret:
                smartEntity.Add <TurretBuildingComponent>(new TurretBuildingComponent());
                break;

            case BuildingType.TroopResearch:
                smartEntity.Add <OffenseLabComponent>(new OffenseLabComponent());
                break;

            case BuildingType.DefenseResearch:
                smartEntity.Add <DefenseLabComponent>(new DefenseLabComponent());
                break;

            case BuildingType.Resource:
                if (building.LastCollectTime == 0u)
                {
                    building.LastCollectTime = ServerTime.Time;
                }
                smartEntity.Add <GeneratorComponent>(new GeneratorComponent());
                break;

            case BuildingType.Storage:
                smartEntity.Add <StorageComponent>(new StorageComponent());
                break;

            case BuildingType.Clearable:
                smartEntity.Add <ClearableComponent>(new ClearableComponent());
                break;

            case BuildingType.Cantina:
                smartEntity.Add <CantinaComponent>(new CantinaComponent());
                break;

            case BuildingType.NavigationCenter:
                smartEntity.Add <NavigationCenterComponent>(new NavigationCenterComponent());
                break;

            case BuildingType.ScoutTower:
                smartEntity.Add <ScoutTowerComponent>(new ScoutTowerComponent());
                break;

            case BuildingType.Armory:
                smartEntity.Add <ArmoryComponent>(new ArmoryComponent());
                break;
            }
            if (buildingType.IsLootable)
            {
                LootComponent component3 = new LootComponent();
                smartEntity.Add <LootComponent>(component3);
            }
            if (requestAsset)
            {
                Service.Get <EntityViewManager>().LoadEntityAsset(smartEntity);
            }
            return(smartEntity);
        }