public RoundUI(GameHandler roundHandlerCtx, Game gameCtx, uint mapWidth, uint mapHeight, Map mapCtx, uint screenWidth, uint screenHeight, View viewPlayer, View viewATH) { Texture _athLifeBar = new Texture("../../../../Images/HUD/LifeBar.png"); Random _random = new Random(); _roundHandlerCtx = roundHandlerCtx; _monsterTexture = new Texture("../../../../Images/Monster" + _roundHandlerCtx.RoundObject.Level + "-" + _roundHandlerCtx.RoundObject.Stage + ".png"); _monsterSprite = new Sprite(_monsterTexture); _bossTexture = new Texture("../../../../Images/dragon.png"); _bossSprite = new Sprite(_bossTexture); _sheepTexture = new Texture("../../../../Images/SheepTransform.png"); _sheepSprite = new Sprite(_sheepTexture); Texture _weaponTexture = new Texture("../../../../Images/soulcalibur.png"); Texture _bulletTexture = new Texture("../../../../Images/fireball.png"); _doorTexture = new Texture("../../../../Images/doortextureclosed.png"); _doorSprite = new Sprite(_doorTexture); _portalTexture = new Texture("../../../../Images/portal.png"); _portalSprite = new Sprite(_doorTexture); _blindEffecTexture = new Texture("../../../../Images/soulcalibur.png"); _blindSprite = new Sprite(_blindEffecTexture); _musicReset = false; _effectMusic = new Music("../../../../Images/brute.ogg"); _gameCtx = gameCtx; _mapCtx = mapCtx; _view = viewPlayer; _viewATH = viewATH; _playerUI = new PlayerUI(this, 2, 3, 32, 32, new Vector(0, 0), mapWidth, mapHeight, mapCtx); _boundingBoxPackage = new List <FloatRect>(); _enemies = new EnemiesUI[_roundHandlerCtx.RoundObject.Enemies.Length]; _collide = mapCtx.CollideMap; for (int i = 0; i < this._roundHandlerCtx.RoundObject.CountEnnemi; i++) { _enemies[i] = new EnemiesUI(this, _monsterTexture, 3, 32, 32, _roundHandlerCtx.RoundObject.Enemies[i], mapWidth, mapHeight, mapCtx); } if (this._roundHandlerCtx.RoundObject._boss != null) { _bossUI = new EnemiesUI(this, _bossTexture, 3, 100, 100, _roundHandlerCtx.RoundObject._boss, mapWidth, mapHeight, mapCtx); } _ath = new ATH(_roundHandlerCtx.RoundObject, screenWidth, screenHeight, _view, this); _weaponUI = new WeaponUI(this, _weaponTexture, _bulletTexture, _roundHandlerCtx.RoundObject.Player.Place, mapWidth, mapHeight); _mapWidth = mapWidth; _mapHeight = mapHeight; }
public void UpdateSpawnEnnemie() { if (this._roundHandlerCtx.RoundObject.Time == 120) { int index = this._roundHandlerCtx.RoundObject.CountEnnemi - this._roundHandlerCtx.RoundObject.SpawnCount; if (index < 0) { index = 0; } for (int i = index; i < this._roundHandlerCtx.RoundObject.CountEnnemi; i++) { _enemies[i] = new EnemiesUI(this, _monsterTexture, 3, 32, 32, _roundHandlerCtx.RoundObject.Enemies[i], MapWidth, MapHeight, _roundHandlerCtx.Map); } this._roundHandlerCtx.RoundObject.Time = 0; } }
public void CreateBoss() { _bossUI = new EnemiesUI(this, _bossTexture, 3, 100, 100, _roundHandlerCtx.RoundObject._boss, MapWidth, MapHeight, Map); }