protected override void Initialize() { base.Initialize(); if (string.IsNullOrEmpty(this.FollowEntityPath) || string.IsNullOrEmpty(this.TiledMapEntityPath)) { return; } this.followEntity = this.EntityManager.Find(this.FollowEntityPath); this.followTransform = this.followEntity.FindComponent<Transform2D>(); this.tiledMapEntity = this.EntityManager.Find(this.TiledMapEntityPath); this.tiledMap = this.tiledMapEntity.FindComponent<WaveEngine.TiledMap.TiledMap>(); this.viewportManager = this.Owner.Scene.VirtualScreenManager; this.platform = WaveServices.Platform; this.platform.OnScreenSizeChanged += OnScreenSizeChanged; this.needRefreshLimits = true; }
protected override void Initialize() { base.Initialize(); if (string.IsNullOrEmpty(this.FollowEntityPath) || string.IsNullOrEmpty(this.TiledMapEntityPath)) { return; } this.followEntity = this.EntityManager.Find(this.FollowEntityPath); this.followTransform = this.followEntity.FindComponent <Transform2D>(); this.tiledMapEntity = this.EntityManager.Find(this.TiledMapEntityPath); this.tiledMap = this.tiledMapEntity.FindComponent <WaveEngine.TiledMap.TiledMap>(); this.viewportManager = this.Owner.Scene.VirtualScreenManager; this.platform = WaveServices.Platform; this.platform.OnScreenSizeChanged += OnScreenSizeChanged; this.needRefreshLimits = true; }