Ignore:
Timestamp:
2015-06-25 03:34:50 (6 years ago)
Author:
mijoliim
Message:
 
Location:
2015/26/MikkoL/JRPG/JRPG/JRPG/Battle
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • 2015/26/MikkoL/JRPG/JRPG/JRPG/Battle/AttackList.cs

    r6304 r6305  
    3737            character.CurrentHP.Value -= TrueDamage; 
    3838 
     39            if(SoundEffects.Battle.Hit_01.IsPlaying) 
     40            { 
     41                SoundEffects.Battle.Hit_01.Stop(); 
     42            } 
     43            SoundEffects.Battle.Hit_01.Play(); 
     44 
    3945            BattleView.CurrentBattleView.IsAttackAnimationPlaying = false; 
    4046            BattleView.CurrentBattleView.IsTimerActive = true; 
  • 2015/26/MikkoL/JRPG/JRPG/JRPG/Battle/BattleView.cs

    r6304 r6305  
    3232    public Queue<Action> ActionQueue = new Queue<Action>(); 
    3333 
     34    private BetterLabel EnemyName; 
     35    private Pointer Pointer; 
     36 
    3437    private Widget BattleHUD { get; set; } 
    3538    private List<GameObject> ToDeleteOnExit = new List<GameObject>(); 
    3639    private ScrollingTextMenu BattleMenu { get; set; } 
     40 
     41    private int SelectedAllyIndex; 
    3742 
    3843    private float WaitTimeBetweenActions = 1f; 
     
    173178                if (Allies[Index].CurrentHP.Value == 0) 
    174179                { 
     180                    if (SelectedAllyIndex == Allies[Index].Index) 
     181                    { 
     182                        JRPG.Game.ClearControls(); 
     183 
     184                        IsInMenu = false; 
     185                        AllyNames[SelectedAllyIndex].IsFlashing = false; 
     186                        BattleMenu.Destroy(); 
     187                        EnemyName.Destroy(); 
     188                        Pointer.Destroy(); 
     189                    } 
     190 
    175191                    Name.TextColor = Microsoft.Xna.Framework.Color.Gray; 
    176192                    HPMeter.TextColor = Microsoft.Xna.Framework.Color.Gray; 
     
    196212        SelectedEnemy = PrevSelectedEnemy; 
    197213 
    198         BetterLabel EnemyName = new BetterLabel(JRPG.Game.MainFont, Vector.Zero, Enemies[SelectedEnemy].Name); 
     214        EnemyName = new BetterLabel(JRPG.Game.MainFont, Vector.Zero, Enemies[SelectedEnemy].Name); 
    199215        EnemyName.IsFlashing = true; 
    200         Pointer Pointer = new Pointer(Vector.Zero); 
     216        Pointer = new Pointer(Vector.Zero); 
    201217        Pointer.IsFlashing = true; 
    202218 
     
    415431            if (!character.IsDead) 
    416432            { 
     433                SelectedAllyIndex = character.Index; 
    417434 
    418435                IsInMenu = true; 
Note: See TracChangeset for help on using the changeset viewer.