/// <summary> /// This is the constructor for the battle builder. /// </summary> /// <param name="enemy">The enemy collided with</param> public BattleBuilder(PartyUtils.Enemy enemy) { this.enemy = enemy; // Load the battle configurations for the first time if (battleConfigs == null) { battleConfigs = FileUtils.LoadBattleConfigurations(); } r = ArenaController.instance.getGenerator(); generateBattle(); }
/// <summary> /// This is the default constructor for the arena enemy. /// </summary> /// <param name="createTile">The tile to start on</param> /// <param name="Content">The content manager for loading</param> public ArenaEnemy(Tile createTile, ContentManager Content, PartyUtils.Enemy type) { // Add this to the collidables list ArenaScene.instance.collidables.Add(this); _currentTile = createTile; _Position = new Vector3(_currentTile.getModelPos().X, 0, _currentTile.getModelPos().Z); //should start in the middle of the start tile (X, Y, Z); scale = 0.5f; // Set the wait turns randomly waitTurns = ArenaController.instance.getGenerator().Next(1, WAIT_TURNS + 1); this.type = type; myModel = Content.Load<Model>("Models/hero"); setTexture(Content); }
public Skill(string name, BaseGambit gambit, PartyUtils.PlayerAction action) { this.name = name; this.gambit = gambit; this.action = action; }
public void startBattle(PartyUtils.Enemy enemy) { BattleBuilder battleBuilder = new BattleBuilder(enemy); // Check if this battle gets a conversation Conversation c = null; if (firstBattle && controller.getLevel() == 1) { // First fight c = DialogueUtils.makeConversation(ConversationType.BATTLE_FIRST); firstBattle = false; } if (battleBuilder.getFront()[1] == PartyUtils.Enemy.Boss) { // If this is the boss fight c = DialogueUtils.makeConversation(ConversationType.BATTLE_BOSS); } // Create and switch to the battle BattleScene battle = new BattleScene(battleBuilder.getFront(), battleBuilder.getBack(), c); SoundUtils.Play(SoundUtils.Sound.BattleStart); SceneManager.setScene(SceneState.battle, battle, true); }