public void Init(float offset, Transform camera)
 {
     _offset   = offset;
     _camera   = camera;
     _renderer = GetComponent <SpriteRenderer>();
     LifeCycleMgr.Single.Add(LifeName.UPDATE, this);
     _currentLevel = GameModel.Single.SelectedLevel;
     SetSprite(_currentLevel);
     _cloud = transform.GetChild(0).AddComponent <MapCloud>();
 }
Example #2
0
        private void worldMapClouds(GameTime gameTime)
        {
            _cloudsInPlay.ForEach(a => a.Update());
            _cloudsInPlay.RemoveAll(a => !a.isAlive);

            if (_cloudsInPlay.Count < 500)
            {
                MapCloud newCloud = new MapCloud(_worldCloudTexSet[0].Width, _worldCloudTexSet[0].Height, mapWidth, mapHeight);
                _cloudsInPlay.Add(newCloud);
            }
        }
        private void WorldMapClouds(GameTime gameTime)
        {
            _cloudsInPlay.ForEach(a => a.Update());
            _cloudsInPlay.RemoveAll(a => !a.IsAlive);

            if (_cloudsInPlay.Count < 500)
            {
                MapCloud newCloud = new MapCloud(cloudsTileCollection.GetTile().Width, cloudsTileCollection.GetTile().Height);
                _cloudsInPlay.Add(newCloud);
            }
        }